
/* ---------- 1. TOKENS & THEMES ---------- */
:root {
  --font-display: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;

  --max: 1180px;
  --gutter: clamp(1.15rem, 4vw, 2.5rem);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;

  --step--1: clamp(0.82rem, 0.79rem + 0.14vw, 0.9rem);
  --step-0: clamp(0.98rem, 0.94rem + 0.2vw, 1.06rem);
  --step-1: clamp(1.15rem, 1.06rem + 0.42vw, 1.4rem);
  --step-2: clamp(1.45rem, 1.28rem + 0.85vw, 2rem);
  --step-3: clamp(1.9rem, 1.55rem + 1.7vw, 2.9rem);
  --step-4: clamp(2.6rem, 1.85rem + 3.6vw, 5rem);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --t-fast: 0.18s var(--ease);
  --t: 0.32s var(--ease);
}

/* Dark */
[data-theme="dark"] {
  --bg: #080c14;
  --bg-alt: #0b1120;
  --surface: #0f1727;
  --surface-2: #141d30;
  --border: rgba(148, 176, 214, 0.14);
  --border-strong: rgba(148, 176, 214, 0.26);

  --text: #e9eef7;
  --text-mid: #b3c0d4;
  --text-dim: #7d8ca4;

  --primary: #4cc2f5;
  --primary-soft: rgba(76, 194, 245, 0.14);
  --primary-deep: #2b7fd4;
  --accent: #fbbf3c;
  --accent-soft: rgba(251, 191, 60, 0.14);
  --green: #4ade9a;
  --violet: #a78bfa;
  --danger: var(--danger);

  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.4);
  --shadow: 0 18px 44px rgba(0, 0, 0, 0.5);
  --glow: 0 0 0 1px rgba(76, 194, 245, 0.25), 0 12px 40px rgba(43, 127, 212, 0.28);
  --grid-line: rgba(148, 176, 214, 0.07);
  color-scheme: dark;
}

/* Light */
[data-theme="light"] {
  --bg: #f6f8fc;
  --bg-alt: #eef2f9;
  --surface: #ffffff;
  --surface-2: #f3f6fb;
  --border: rgba(15, 33, 61, 0.11);
  --border-strong: rgba(15, 33, 61, 0.2);

  --text: #0d1728;
  --text-mid: #3f5069;
  --text-dim: #64748b;

  --primary: #0d74b8;
  --primary-soft: rgba(13, 116, 184, 0.1);
  --primary-deep: #075e96;
  --accent: #b06f05;
  --accent-soft: rgba(176, 111, 5, 0.1);
  --green: #12855c;
  --violet: #6d4bd6;
  --danger: #c0392b;

  --shadow-sm: 0 2px 8px rgba(15, 33, 61, 0.07);
  --shadow: 0 18px 40px rgba(15, 33, 61, 0.1);
  --glow: 0 0 0 1px rgba(13, 116, 184, 0.2), 0 12px 34px rgba(13, 116, 184, 0.16);
  --grid-line: rgba(15, 33, 61, 0.05);
  color-scheme: light;
}

/* ---------- 2. BASE & TYPOGRAPHY ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color var(--t), color var(--t);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.14;
  letter-spacing: -0.022em;
  margin: 0 0 0.5em;
  font-weight: 600;
}

p { margin: 0 0 1.1em; color: var(--text-mid); }
p:last-child { margin-bottom: 0; }

a { color: var(--primary); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--text); }

ul, ol { margin: 0; padding: 0; list-style: none; }
img { max-width: 100%; display: block; }
strong { color: var(--text); font-weight: 600; }
svg { width: 100%; height: 100%; display: block; }

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection { background: var(--primary); color: #04070d; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  padding: 0.75rem 1.25rem;
  background: var(--primary);
  color: #04070d;
  font-weight: 600;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

/* ---------- 3. LAYOUT PRIMITIVES ---------- */
.container {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding: clamp(4.5rem, 9vw, 8rem) 0; position: relative; }
.section--alt { background: var(--bg-alt); }

.section__head { max-width: 640px; margin-bottom: clamp(2.5rem, 5vw, 4rem); }

.section__kicker {
  display: inline-block;
  font-family: var(--font-display);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 0.9rem;
}

.section__title { font-size: var(--step-3); margin-bottom: 0.4em; }
.section__sub { font-size: var(--step-1); color: var(--text-dim); line-height: 1.55; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--text-mid);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  margin: 0 0 1.6rem;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--green) 60%, transparent);
  animation: pulse 2.4s infinite;
  flex: none;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--green) 55%, transparent); }
  70% { box-shadow: 0 0 0 8px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

.grad {
  background: linear-gradient(100deg, var(--primary), var(--accent) 88%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- 4. COMPONENTS ---------- */
.btn {
  --btn-pad: 0.85rem 1.55rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: var(--btn-pad);
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: var(--step-0);
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: transform var(--t-fast), box-shadow var(--t), background-color var(--t), border-color var(--t), color var(--t);
}
.btn svg { width: 1.05em; height: 1.05em; flex: none; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-deep));
  color: #03080f;
  box-shadow: var(--glow);
}
[data-theme="light"] .btn--primary { color: #fff; }
.btn--primary:hover { color: #03080f; box-shadow: 0 0 0 1px var(--primary), 0 16px 44px rgba(43, 127, 212, 0.4); }
[data-theme="light"] .btn--primary:hover { color: #fff; }

.btn--ghost {
  background: var(--surface);
  border-color: var(--border-strong);
  color: var(--text);
}
.btn--ghost:hover { border-color: var(--primary); color: var(--primary); }

.btn--icon {
  background: var(--surface);
  border-color: var(--border-strong);
  color: var(--text-mid);
  padding: 0.85rem;
  aspect-ratio: 1;
}
.btn--icon svg { width: 1.2em; height: 1.2em; }
.btn--icon:hover { border-color: var(--primary); color: var(--primary); }

.btn--block { width: 100%; }

.icon-btn {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-mid);
  cursor: pointer;
  transition: color var(--t-fast), border-color var(--t-fast), background-color var(--t-fast);
}
.icon-btn:hover { color: var(--primary); border-color: var(--primary); }
.icon-btn svg { width: 19px; height: 19px; }

#themeToggle .icon-sun { display: none; }
#themeToggle .icon-moon { display: block; }
[data-theme="light"] #themeToggle .icon-sun { display: block; }
[data-theme="light"] #themeToggle .icon-moon { display: none; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 3vw, 2.1rem);
  transition: transform var(--t), border-color var(--t), box-shadow var(--t);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: var(--step--1);
  font-weight: 500;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-dim);
  white-space: nowrap;
}
.pill--accent { color: var(--primary); background: var(--primary-soft); border-color: color-mix(in srgb, var(--primary) 32%, transparent); }
.pill--live { color: var(--green); background: color-mix(in srgb, var(--green) 12%, transparent); border-color: color-mix(in srgb, var(--green) 30%, transparent); }

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.25rem;
}
.tag-list li {
  font-size: var(--step--1);
  padding: 0.3rem 0.75rem;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-dim);
  transition: color var(--t-fast), border-color var(--t-fast);
}
.tag-list--lg li { padding: 0.45rem 0.9rem; }
.card:hover .tag-list li { border-color: var(--border-strong); }

.dot {
  width: 9px;
  height: 9px;
  border-radius: 3px;
  flex: none;
  display: inline-block;
}
.dot--blue { background: var(--primary); }
.dot--amber { background: var(--accent); }
.dot--green { background: var(--green); }
.dot--violet { background: var(--violet); }

/* ---------- 5. NAVIGATION ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  transition: background-color var(--t), border-color var(--t), box-shadow var(--t);
  border-bottom: 1px solid transparent;
}
.nav.is-stuck {
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 74px;
}

.brand { display: inline-flex; align-items: center; gap: 0.7rem; color: var(--text); }
.brand:hover { color: var(--text); }

.brand__mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--primary), var(--primary-deep));
  color: #03080f;
  box-shadow: var(--shadow-sm);
}
[data-theme="light"] .brand__mark { color: #fff; }
.brand__mark svg { width: 20px; height: 20px; }

.brand__text { display: flex; flex-direction: column; line-height: 1.2; }
.brand__text strong { font-family: var(--font-display); font-size: 0.98rem; font-weight: 600; }
.brand__text small { font-size: 0.74rem; color: var(--text-dim); letter-spacing: 0.05em; }

.nav__links { display: flex; align-items: center; gap: 0.35rem; }
.nav__links a {
  position: relative;
  padding: 0.55rem 0.9rem;
  border-radius: 10px;
  font-size: 0.93rem;
  font-weight: 500;
  color: var(--text-mid);
}
.nav__links a:hover { color: var(--text); background: var(--surface); }
.nav__links a.is-active { color: var(--primary); }
.nav__links a.is-active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 2px;
  transform: translateX(-50%);
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: var(--primary);
}

.nav__links .nav__cta {
  margin-left: 0.5rem;
  padding: 0.55rem 1.15rem;
  background: var(--primary-soft);
  border: 1px solid color-mix(in srgb, var(--primary) 35%, transparent);
  color: var(--primary);
}
.nav__links .nav__cta:hover { background: var(--primary); color: #03080f; }
[data-theme="light"] .nav__links .nav__cta:hover { color: #fff; }
.nav__links .nav__cta.is-active::after { display: none; }

.nav__tools { display: flex; align-items: center; gap: 0.6rem; }

.nav__burger { display: none; flex-direction: column; gap: 4px; }
.nav__burger span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform var(--t), opacity var(--t-fast);
}
.nav__burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav__burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.nav__progress {
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width 0.1s linear;
}

/* ---------- 6. HERO ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 112px 0 72px;
  overflow: hidden;
  isolation: isolate;
}

.hero__bg { position: absolute; inset: 0; z-index: -1; }

.hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 62px 62px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 40%, #000 25%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 40%, #000 25%, transparent 78%);
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
  will-change: transform;
}
.orb--1 {
  width: 46vw; height: 46vw;
  max-width: 620px; max-height: 620px;
  top: -12%; right: -8%;
  background: radial-gradient(circle, var(--primary), transparent 68%);
  animation: drift1 22s ease-in-out infinite alternate;
}
.orb--2 {
  width: 38vw; height: 38vw;
  max-width: 520px; max-height: 520px;
  bottom: -16%; left: -10%;
  background: radial-gradient(circle, var(--accent), transparent 68%);
  opacity: 0.3;
  animation: drift2 26s ease-in-out infinite alternate;
}
[data-theme="light"] .orb { opacity: 0.28; }
[data-theme="light"] .orb--2 { opacity: 0.2; }

@keyframes drift1 { to { transform: translate3d(-70px, 50px, 0) scale(1.12); } }
@keyframes drift2 { to { transform: translate3d(60px, -45px, 0) scale(1.08); } }

.hero__wave {
  position: absolute;
  left: 0;
  bottom: 6%;
  width: 100%;
  height: 180px;
  opacity: 0.5;
}
.hero__wave path {
  fill: none;
  stroke: var(--border-strong);
  stroke-width: 1.5;
}
.hero__wave-pulse {
  stroke: var(--primary) !important;
  stroke-width: 2.5 !important;
  stroke-dasharray: 160 2400;
  animation: travel 6s linear infinite;
  filter: drop-shadow(0 0 6px var(--primary));
}
@keyframes travel { to { stroke-dashoffset: -2560; } }

.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.9fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.hero__title {
  font-size: var(--step-4);
  font-weight: 700;
  letter-spacing: -0.035em;
  margin-bottom: 0.35em;
}

.hero__role {
  font-family: var(--font-display);
  font-size: var(--step-2);
  font-weight: 500;
  color: var(--text);
  margin-bottom: 0.5em;
}
.hero__role-lead { display: block; }


.rotator {
  display: block;
  min-height: 1.2em;
  color: var(--primary);
  white-space: nowrap;
}
.rotator__caret {
  display: inline-block;
  width: 2px;
  height: 0.95em;
  margin-left: 2px;
  vertical-align: -0.11em;
  background: var(--accent);
  animation: caret 1s steps(1) infinite;
}
@keyframes caret { 50% { opacity: 0; } }

.rotator.is-typing .rotator__caret { animation: none; opacity: 1; }

.hero__lede {
  font-size: var(--step-1);
  color: var(--text-dim);
  max-width: 54ch;
  line-height: 1.6;
  margin-bottom: 1.7rem;
}

.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.8rem; }

.socials { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.socials .btn--icon { padding: 0.8rem; }
.socials--sm .btn--icon { padding: 0.6rem; }
.socials--sm .btn--icon svg { width: 1.05em; height: 1.05em; }

/* Portrait */
.hero__portrait {
  position: relative;
  display: flex;
  justify-content: center;
}

.portrait {
  position: relative;
  width: min(340px, 78vw);
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 30% 25%, var(--primary-soft), transparent 60%),
    linear-gradient(150deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow);
}
.portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.portrait__initials {
  display: none;
  font-family: var(--font-display);
  font-size: clamp(4rem, 12vw, 6.5rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  background: linear-gradient(140deg, var(--primary), var(--accent) 95%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.portrait--fallback .portrait__initials { display: block; }

.portrait__ring {
  position: absolute;
  inset: -14px;
  border-radius: 50%;
  border: 1px dashed color-mix(in srgb, var(--primary) 45%, transparent);
  animation: spin 34s linear infinite;
  pointer-events: none;
}
@keyframes spin { to { transform: rotate(360deg); } }

.portrait__badge {
  position: absolute;
  bottom: 4%;
  left: 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.8rem 1.1rem;
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow);
  animation: float 5s ease-in-out infinite;
}
.portrait__badge svg { width: 26px; height: 26px; flex: none; color: var(--accent); }
.portrait__badge div { display: flex; flex-direction: column; line-height: 1.3; }
.portrait__badge strong { font-family: var(--font-display); font-size: 0.9rem; }
.portrait__badge span { font-size: 0.76rem; color: var(--text-dim); }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-9px); }
}

.hero__scroll {
  position: absolute;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  width: 24px;
  height: 40px;
  border: 1.5px solid var(--border-strong);
  border-radius: 999px;
  display: grid;
  justify-items: center;
  padding-top: 7px;
}
.hero__scroll span {
  width: 3px;
  height: 7px;
  border-radius: 2px;
  background: var(--primary);
  animation: scrollDot 1.9s ease-in-out infinite;
}
@keyframes scrollDot {
  0% { opacity: 0; transform: translateY(0); }
  35% { opacity: 1; }
  100% { opacity: 0; transform: translateY(16px); }
}

/* ---------- 7. SECTIONS ---------- */

/* Stats */
.stats {
  border-block: 1px solid var(--border);
  background: var(--bg-alt);
  padding: clamp(2.2rem, 4vw, 3.2rem) 0;
}
.stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(1.2rem, 3vw, 2.5rem);
}
.stat { text-align: center; }
.stat__num {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  background: linear-gradient(140deg, var(--primary), var(--accent) 95%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 0.5rem;
}
.stat__label {
  font-size: var(--step--1);
  color: var(--text-dim);
  line-height: 1.45;
  display: block;
  max-width: 22ch;
  margin-inline: auto;
}

/* About */
.about__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: start;
}
.lead { font-size: var(--step-1); color: var(--text); line-height: 1.6; }

.about__facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 2.2rem;
}
.about__facts li {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.95rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color var(--t);
}
.about__facts li:hover { border-color: var(--border-strong); }
.about__facts svg { width: 20px; height: 20px; flex: none; color: var(--primary); }
.about__facts div { display: flex; flex-direction: column; line-height: 1.35; min-width: 0; }
.about__facts strong { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.09em; color: var(--text-dim); font-weight: 600; }
.about__facts span { font-size: 0.95rem; color: var(--text); font-weight: 500; }

.about__aside { display: grid; gap: 1.25rem; }

.card--quote { position: relative; background: var(--surface-2); }
.quote-mark { width: 34px; height: 34px; color: var(--primary); opacity: 0.35; margin-bottom: 0.6rem; }
.card--quote p { font-family: var(--font-display); font-size: var(--step-1); line-height: 1.5; color: var(--text); font-weight: 500; }
.card--quote footer { margin-top: 1rem; font-size: var(--step--1); color: var(--text-dim); }
.card--quote footer::before { content: "— "; }

.card--list h3 { font-size: var(--step-1); margin-bottom: 1rem; }
.card--list ul { display: grid; gap: 0.7rem; }
.card--list li {
  position: relative;
  padding-left: 1.6rem;
  font-size: 0.95rem;
  color: var(--text-mid);
  line-height: 1.5;
}
.card--list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--primary);
  opacity: 0.8;
}

/* Expertise cards */
.cards-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.4rem; }
.cards-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.4rem; }

.card--feature { position: relative; overflow: hidden; }
.card--feature::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), transparent);
  opacity: 0;
  transition: opacity var(--t);
}
.card--feature:hover { transform: translateY(-6px); border-color: var(--border-strong); box-shadow: var(--shadow); }
.card--feature:hover::before { opacity: 1; }
.card--feature h3 { font-size: var(--step-1); margin-bottom: 0.6rem; }
.card--feature p { font-size: 0.96rem; }

.card__icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  margin-bottom: 1.3rem;
  background: var(--primary-soft);
  border: 1px solid color-mix(in srgb, var(--primary) 28%, transparent);
  color: var(--primary);
}
.card__icon svg { width: 25px; height: 25px; }
.card__icon--amber { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 28%, transparent); color: var(--accent); }
.card__icon--green { background: color-mix(in srgb, var(--green) 12%, transparent); border-color: color-mix(in srgb, var(--green) 28%, transparent); color: var(--green); }

/* Timeline */
.timeline { position: relative; display: grid; gap: 1.5rem; }
.timeline::before {
  content: "";
  position: absolute;
  left: 15px;
  top: 12px;
  bottom: 12px;
  width: 2px;
  background: linear-gradient(180deg, var(--primary), var(--border) 85%);
  opacity: 0.5;
}

.timeline__item { position: relative; padding-left: 3.25rem; }

.timeline__marker {
  position: absolute;
  left: 8px;
  top: 26px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--primary);
  z-index: 1;
  transition: box-shadow var(--t);
}
.section--alt .timeline__marker { background: var(--bg-alt); }
.timeline__item:hover .timeline__marker { box-shadow: 0 0 0 6px var(--primary-soft); }

.timeline__card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(1.35rem, 2.6vw, 1.9rem);
  transition: border-color var(--t), transform var(--t), box-shadow var(--t);
}
.timeline__item:hover .timeline__card {
  border-color: var(--border-strong);
  transform: translateX(4px);
  box-shadow: var(--shadow-sm);
}

.timeline__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}
.timeline__role { font-size: var(--step-1); margin: 0 0 0.2rem; }
.timeline__org { font-size: 0.96rem; color: var(--primary); font-weight: 500; margin: 0; }
.timeline__org span { color: var(--text-dim); font-weight: 400; }

.timeline__meta {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: var(--step--1);
  color: var(--text-dim);
  margin: 0 0 1.1rem;
}
.timeline__meta svg { width: 15px; height: 15px; flex: none; }

.timeline__points { display: grid; gap: 0.6rem; }
.timeline__points li {
  position: relative;
  padding-left: 1.5rem;
  font-size: 0.95rem;
  color: var(--text-mid);
  line-height: 1.6;
}
.timeline__points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* Education  */
.roadmap { position: relative; display: grid; gap: clamp(1.4rem, 3vw, 2.2rem); }


.roadmap::before {
  content: "";
  position: absolute;
  left: 50%;
  translate: -50% 0;
  top: 10px;
  bottom: 10px;
  width: 2px;
  background: linear-gradient(180deg, var(--primary), var(--border) 92%);
  opacity: 0.55;
}

.roadmap__item {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.roadmap__marker {
  position: absolute;
  left: 50%;
  top: 50%;
  translate: -50% -50%;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--bg-alt);
  border: 2px solid var(--primary);
  z-index: 1;
  transition: box-shadow var(--t);
}
.roadmap__item:hover .roadmap__marker { box-shadow: 0 0 0 6px var(--primary-soft); }

.roadmap__card { position: relative; }


.roadmap__item:nth-child(odd) .roadmap__card {
  grid-column: 1;
  margin-right: clamp(1.6rem, 4vw, 3rem);
}
.roadmap__item:nth-child(even) .roadmap__card {
  grid-column: 2;
  margin-left: clamp(1.6rem, 4vw, 3rem);
}

.roadmap__card::after {
  content: "";
  position: absolute;
  top: 50%;
  width: clamp(1.6rem, 4vw, 3rem);
  height: 2px;
  background: var(--border-strong);
}
.roadmap__item:nth-child(odd) .roadmap__card::after { left: 100%; }
.roadmap__item:nth-child(even) .roadmap__card::after { right: 100%; }

.js .roadmap__item.reveal { opacity: 1; transform: none; }

.js .roadmap__item.reveal .roadmap__card {
  opacity: 0;
  transition: opacity 0.55s var(--ease), translate 0.55s var(--ease);
}
.js .roadmap__item:nth-child(odd).reveal .roadmap__card { translate: -46px 0; }
.js .roadmap__item:nth-child(even).reveal .roadmap__card { translate: 46px 0; }
.js .roadmap__item.reveal.is-visible .roadmap__card { opacity: 1; translate: 0 0; }

.js .roadmap__item.reveal .roadmap__card::after {
  transform: scaleX(0);
  transition: transform 0.4s var(--ease) 0.4s;
}
.js .roadmap__item:nth-child(odd).reveal .roadmap__card::after { transform-origin: left center; }
.js .roadmap__item:nth-child(even).reveal .roadmap__card::after { transform-origin: right center; }
.js .roadmap__item.reveal.is-visible .roadmap__card::after { transform: scaleX(1); }

.js .roadmap__item.reveal .roadmap__marker {
  opacity: 0;
  scale: 0.2;
  transition: opacity 0.3s var(--ease) 0.75s, scale 0.4s var(--ease) 0.75s, box-shadow var(--t);
}
.js .roadmap__item.reveal.is-visible .roadmap__marker { opacity: 1; scale: 1; }

/* Education cards */
.card--edu:hover { transform: translateY(-5px); border-color: var(--border-strong); box-shadow: var(--shadow); }
.card--edu__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.4rem;
}

.edu__logo {
  width: 68px;
  height: 68px;
  flex: none;
  padding: 7px;
  border-radius: 15px;
  background: #fff;
  border: 1px solid var(--border);
  object-fit: contain;
  box-shadow: var(--shadow-sm);
}

.edu__logo--bleed {
  padding: 0;
  object-fit: cover;
}

.card--edu h3 { font-size: var(--step-1); margin-bottom: 0.35rem; }
.edu__field { font-size: 0.98rem; color: var(--text-mid); margin-bottom: 0.8rem; }
.edu__school { font-size: 0.93rem; color: var(--text); font-weight: 500; margin-bottom: 0.2rem; }
.edu__date { font-size: var(--step--1); color: var(--text-dim); margin-bottom: 0; }

/* Skills */
.skills__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.4rem;
}
.card--skill:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.card--skill h3 {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: var(--step-1);
  margin-bottom: 0.4rem;
}
.card--skill .tag-list { margin-top: 1rem; }

/* Contact */
.section--contact { background: var(--bg-alt); border-top: 1px solid var(--border); }
.section--contact .section__head { max-width: 660px; }

.contact__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}
.contact__side { display: grid; gap: 0.9rem; align-content: start; }

.contact__link {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.05rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  transition: border-color var(--t), transform var(--t), background-color var(--t);
}
.contact__link:hover { border-color: var(--primary); transform: translateX(4px); color: var(--text); }
.contact__link--static:hover { transform: none; border-color: var(--border); }

.contact__ico {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 12px;
  background: var(--primary-soft);
  color: var(--primary);
}
.contact__ico svg { width: 21px; height: 21px; }
.contact__link div { display: flex; flex-direction: column; line-height: 1.35; min-width: 0; }
.contact__link strong { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.09em; color: var(--text-dim); font-weight: 600; }
.contact__link span { font-size: 0.96rem; color: var(--text); overflow-wrap: anywhere; }

.contact__avail {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.4rem;
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius);
  border: 1px dashed color-mix(in srgb, var(--green) 40%, transparent);
  background: color-mix(in srgb, var(--green) 8%, transparent);
  font-size: var(--step--1);
  color: var(--text-mid);
}

.contact__form { display: grid; gap: 1.1rem; }
.field { display: grid; gap: 0.45rem; }
.field label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-dim);
}
.field input,
.field textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  font-size: 0.97rem;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
  resize: vertical;
}
.field input::placeholder,
.field textarea::placeholder { color: var(--text-dim); opacity: 0.75; }
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.field.is-invalid input,
.field.is-invalid textarea { border-color: var(--danger); }
.field__error {
  margin: 0;
  font-size: 0.8rem;
  color: var(--danger);
  min-height: 0;
}
.form__note { margin: 0; font-size: var(--step--1); text-align: center; color: var(--text-dim); }
.form__note.is-ok { color: var(--green); }

/* ---------- 8. FOOTER & UTILITIES ---------- */
.footer {
  border-top: 1px solid var(--border);
  background: var(--bg);
  padding: 2.5rem 0;
}
.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.footer__brand { display: flex; align-items: center; gap: 0.8rem; }
.footer__brand div { display: flex; flex-direction: column; line-height: 1.35; }
.footer__brand strong { font-family: var(--font-display); font-size: 0.98rem; }
.footer__brand span { font-size: 0.8rem; color: var(--text-dim); }

.footer__links { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.footer__links a { font-size: 0.9rem; color: var(--text-dim); }
.footer__links a:hover { color: var(--primary); }

.footer__copy { font-size: 0.82rem; color: var(--text-dim); margin: 0; width: 100%; padding-top: 1.5rem; border-top: 1px solid var(--border); }

.to-top {
  position: fixed;
  right: clamp(1rem, 3vw, 2rem);
  bottom: clamp(1rem, 3vw, 2rem);
  z-index: 90;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text-mid);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  box-shadow: var(--shadow-sm);
  transition: opacity var(--t), transform var(--t), visibility var(--t), color var(--t-fast), border-color var(--t-fast);
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { color: var(--primary); border-color: var(--primary); }
.to-top svg { width: 19px; height: 19px; }

/* ---------- 9. MOTION & RESPONSIVE ---------- */

.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.js .reveal.is-visible { opacity: 1; transform: none; }


.stats__grid .reveal:nth-child(2),
.cards-3 .reveal:nth-child(2),
.cards-2 .reveal:nth-child(2),
.skills__grid .reveal:nth-child(2) { transition-delay: 0.08s; }
.stats__grid .reveal:nth-child(3),
.cards-3 .reveal:nth-child(3),
.skills__grid .reveal:nth-child(3) { transition-delay: 0.16s; }
.stats__grid .reveal:nth-child(4),
.skills__grid .reveal:nth-child(4) { transition-delay: 0.24s; }

.hero__content .reveal:nth-child(1) { transition-delay: 0.05s; }
.hero__content .reveal:nth-child(2) { transition-delay: 0.13s; }
.hero__content .reveal:nth-child(3) { transition-delay: 0.21s; }
.hero__content .reveal:nth-child(4) { transition-delay: 0.29s; }
.hero__content .reveal:nth-child(5) { transition-delay: 0.37s; }

@media (max-width: 980px) {
  .hero { min-height: auto; padding: 120px 0 80px; text-align: center; }
  .hero__inner { grid-template-columns: 1fr; }
  .hero__content { order: 2; }
  .hero__portrait { order: 1; margin-bottom: 1rem; }
  .hero__lede { margin-inline: auto; }
  .hero__actions { justify-content: center; }
  .socials { justify-content: center; }
  .eyebrow { margin-inline: auto; }
  .hero__scroll { display: none; }
  
  .portrait__badge { left: 50%; translate: -50% 0; bottom: -14px; }
  .portrait__badge strong, .portrait__badge span { white-space: nowrap; }

  .about__grid,
  .contact__grid { grid-template-columns: 1fr; }
  .cards-3 { grid-template-columns: 1fr; }
  .stats__grid { grid-template-columns: repeat(2, 1fr); row-gap: 2rem; }
}

@media (max-width: 860px) {
  .nav__links {
    position: fixed;
    inset: 74px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
    padding: 1rem var(--gutter) 1.6rem;
    background: color-mix(in srgb, var(--bg) 96%, transparent);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    transform: translateY(-14px);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--t), transform var(--t), visibility var(--t);
  }
  .nav__links.is-open { opacity: 1; visibility: visible; transform: none; }
  .nav__links a { padding: 0.85rem 1rem; font-size: 1rem; }
  .nav__links a.is-active::after { display: none; }
  .nav__links .nav__cta { margin: 0.4rem 0 0; text-align: center; }
  .nav__burger { display: flex; }
  .brand__text small { display: none; }


  .roadmap::before { left: 11px; translate: none; }
  .roadmap__item { grid-template-columns: 1fr; }
  .roadmap__item:nth-child(odd) .roadmap__card,
  .roadmap__item:nth-child(even) .roadmap__card {
    grid-column: 1;
    margin: 0 0 0 2.6rem;
  }
  .roadmap__marker { left: 11px; top: 30px; translate: -50% 0; }
  .roadmap__card::after { display: none; }

  /* One rail, so every card comes from the same side. */
  .js .roadmap__item:nth-child(odd).reveal .roadmap__card,
  .js .roadmap__item:nth-child(even).reveal .roadmap__card { translate: -26px 0; }
  .js .roadmap__item.reveal.is-visible .roadmap__card { translate: 0 0; }
}

@media (max-width: 680px) {
  .cards-2,
  .skills__grid { grid-template-columns: 1fr; }
  .about__facts { grid-template-columns: 1fr; }
  .timeline__item { padding-left: 2.6rem; }
  .timeline::before { left: 11px; }
  .timeline__marker { left: 4px; width: 14px; height: 14px; }
  .footer__inner { flex-direction: column; align-items: flex-start; }
  .btn { width: 100%; }
  .btn--icon { width: auto; }
  .hero__actions { flex-direction: column; align-items: stretch; }
}

@media (max-width: 420px) {
  .stats__grid { grid-template-columns: 1fr; }
  .brand__text strong { font-size: 0.9rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .js .reveal { opacity: 1; transform: none; }
}

@media print {
  .nav, .to-top, .hero__bg, .hero__scroll, .contact__form, .portrait__ring { display: none !important; }
  body { background: #fff; color: #000; }
  .section { padding: 1.5rem 0; break-inside: avoid; }
  .reveal { opacity: 1 !important; transform: none !important; }
  a { color: #000; text-decoration: underline; }
}
