/* ============================================================
   MATHIS MARSAULT — PORTFOLIO
   Design tokens
   ============================================================ */
:root {
  --navy-950: #05070f;
  --navy-900: #0a0e1c;
  --navy-800: #0f1428;
  --navy-700: #161c37;
  --indigo-500: #5b5cf0;
  --violet-500: #9166ff;
  --violet-300: #c3aeff;
  --gold-400: #d9a95f;
  --gold-300: #eec98a;
  --white-soft: #f4f2ff;
  --white-dim: #b9bad6;
  --white-faint: #7d7fa3;
  --line: rgba(244, 242, 255, 0.09);

  --font-display: "Sora", "Segoe UI", sans-serif;
  --font-body: "Inter", "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "Courier New", monospace;

  --container: 1180px;
  --radius: 18px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- i18n toggle ---------- */
body[data-lang="fr"] .lang-en { display: none; }
body[data-lang="en"] .lang-fr { display: none; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

@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;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  background: var(--navy-950);
  color: var(--white-soft);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.gate-locked { overflow: hidden; }

/* ---------- World gate ---------- */
.world-gate {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--navy-950);
  transition: opacity 0.8s var(--ease), visibility 0.8s;
}
.world-gate.is-opening { opacity: 0; visibility: hidden; pointer-events: none; }
.gate-noise { position: absolute; inset: 0; opacity: .07; background-image: repeating-linear-gradient(0deg, transparent 0 3px, rgba(244,242,255,.35) 4px), repeating-linear-gradient(90deg, transparent 0 7px, rgba(244,242,255,.18) 8px); mix-blend-mode: screen; }
.gate-orbit { position: absolute; border: 1px solid rgba(145,102,255,.25); border-radius: 50%; transform: rotate(-24deg); animation: orbit 16s linear infinite; }
.gate-orbit-one { width: 78vw; height: 38vw; min-height: 300px; }
.gate-orbit-two { width: 45vw; height: 80vw; min-width: 300px; border-color: rgba(217,169,95,.18); animation-duration: 21s; animation-direction: reverse; }
.gate-console { width: min(680px, calc(100% - 44px)); position: relative; text-align: center; animation: gate-arrive 1s var(--ease) both; }
.gate-topline, .gate-status { display: flex; justify-content: space-between; font: 11px var(--font-mono); letter-spacing: .1em; color: var(--white-faint); }
.gate-topline { border-bottom: 1px solid var(--line); padding-bottom: 14px; }
.gate-mark { display: flex; justify-content: center; gap: 7px; margin: 70px 0 28px; }
.gate-mark span { width: 8px; height: 8px; border-radius: 50%; background: var(--gold-300); box-shadow: 0 0 22px var(--gold-300); animation: pulse 1.8s ease-in-out infinite; }
.gate-mark span:nth-child(2) { animation-delay: .25s; background: var(--violet-300); box-shadow: 0 0 22px var(--violet-300); }
.gate-mark span:nth-child(3) { animation-delay: .5s; }
.gate-kicker { font: 11px var(--font-mono); letter-spacing: .18em; color: var(--violet-300); }
.gate-console h1 { font-size: clamp(42px, 8vw, 90px); line-height: .93; margin-top: 20px; }
.gate-console h1 em { color: var(--violet-300); font-style: normal; }
.gate-intro { color: var(--white-dim); margin: 24px auto 30px; }
.gate-button { display: inline-flex; align-items: center; gap: 28px; padding: 16px 18px 16px 24px; color: var(--navy-950); background: var(--gold-300); border: 0; border-radius: 999px; font: 600 13px var(--font-body); cursor: pointer; transition: transform .3s var(--ease), background .3s var(--ease); }
.gate-button:hover { transform: translateY(-4px); background: var(--white-soft); }
.gate-button-arrow { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--navy-950); color: var(--gold-300); font-size: 18px; }
.gate-status { justify-content: center; gap: 9px; margin-top: 42px; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: #71e2a4; box-shadow: 0 0 12px #71e2a4; }
.gate-status-code { color: var(--gold-300); margin-left: 10px; }
@keyframes gate-arrive { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes orbit { to { transform: rotate(336deg); } }
@keyframes pulse { 0%,100% { opacity: .35; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.25); } }
@media (max-width: 600px) { .gate-mark { margin-top: 48px; } .gate-topline { font-size: 9px; } .gate-console h1 { font-size: clamp(38px, 12vw, 70px); } }

::selection { background: var(--violet-500); color: var(--navy-950); }

a { color: inherit; text-decoration: none; }

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

img { max-width: 100%; display: block; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
}

section { position: relative; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-300);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--gold-300);
  display: inline-block;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  margin: 0;
  color: var(--white-soft);
  letter-spacing: -0.01em;
}

.section-title {
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.12;
  max-width: 720px;
}

.section-lede {
  font-size: 17px;
  color: var(--white-dim);
  max-width: 560px;
  margin-top: 18px;
}

.section-pad { padding: 120px 0; }
@media (max-width: 720px) {
  .section-pad { padding: 76px 0; }
}

/* ---------- Ambient background ---------- */
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    radial-gradient(ellipse 900px 500px at 12% -10%, rgba(91, 92, 240, 0.16), transparent 60%),
    radial-gradient(ellipse 700px 500px at 90% 10%, rgba(145, 102, 255, 0.12), transparent 60%),
    radial-gradient(ellipse 800px 600px at 50% 100%, rgba(217, 169, 95, 0.05), transparent 60%);
}

/* ============================================================
   NAV
   ============================================================ */
.nav-wrap {
  position: fixed;
  top: 20px;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: center;
  padding: 0 20px;
}
.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(10, 14, 28, 0.72);
  border: 1px solid var(--line);
  backdrop-filter: blur(16px);
  border-radius: 999px;
  padding: 8px 8px 8px 18px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.35);
  max-width: 100%;
}
.nav .brand {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--gold-300);
  margin-right: 14px;
  white-space: nowrap;
}
.nav-links { display: flex; gap: 2px; }
.nav-links a {
  font-size: 13px;
  color: var(--white-dim);
  padding: 8px 12px;
  border-radius: 999px;
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
  white-space: nowrap;
}
.nav-links a:hover, .nav-links a.active { color: var(--white-soft); background: rgba(244,242,255,0.06); }
.nav-actions { display: flex; align-items: center; gap: 6px; margin-left: 8px; }
.lang-switch {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 11px;
}
.lang-switch button {
  background: transparent;
  border: none;
  color: var(--white-faint);
  padding: 7px 10px;
  cursor: pointer;
  transition: all 0.2s var(--ease);
}
.lang-switch button.active { background: var(--violet-500); color: var(--navy-950); font-weight: 700; }

@media (max-width: 880px) {
  .nav-links { display: none; }
  .nav .brand { margin-right: 8px; }
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: 110px;
  padding-bottom: 60px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-portrait { order: -1; }
}
.hero-kicker {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--violet-300);
  margin-bottom: 22px;
  opacity: 0;
  animation: rise 0.8s var(--ease) 0.1s forwards;
}
.hero h1 {
  font-size: clamp(40px, 6.4vw, 78px);
  line-height: 0.98;
  opacity: 0;
  animation: rise 0.9s var(--ease) 0.25s forwards;
}
.hero h1 span { color: var(--violet-300); }
.hero-role {
  font-size: clamp(18px, 2vw, 22px);
  color: var(--white-dim);
  margin-top: 22px;
  max-width: 520px;
  opacity: 0;
  animation: rise 0.9s var(--ease) 0.4s forwards;
}
.hero-role strong { color: var(--white-soft); font-weight: 600; }
.hero-dimensions { display: grid; grid-template-columns: repeat(2, minmax(150px, 1fr)); gap: 10px 24px; max-width: 500px; margin-top: 28px; opacity: 0; animation: rise .9s var(--ease) .5s forwards; }
.hero-dimensions span { display: flex; align-items: baseline; gap: 10px; color: var(--white-dim); font: 12px var(--font-mono); text-transform: uppercase; letter-spacing: .04em; }
.hero-dimensions b { color: var(--gold-300); font-size: 10px; font-weight: 400; }
@media (max-width: 520px) {
  .hero-dimensions { grid-template-columns: 1fr; }
  .hero-portrait { overflow: hidden; }
@media (max-width: 520px) {
  .container { padding-left: 22px; padding-right: 22px; }
  .hero { flex-direction: column; justify-content: center; }
  .hero .scroll-cue { position: static; transform: none; margin-top: 28px; }
}
  .hero-portrait .glow { inset: 0; }
}

.hero-avail {
  margin-top: 34px;
  display: inline-flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(244,242,255,0.03);
  opacity: 0;
  animation: rise 0.9s var(--ease) 0.55s forwards;
}
.hero-avail .label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--gold-300);
  text-transform: uppercase;
}
.hero-avail .tags { display: flex; flex-wrap: wrap; gap: 8px; }
.hero-avail .tags > span {
  font-size: 13px;
  color: var(--white-soft);
  border: 1px solid var(--line);
  padding: 5px 12px;
  border-radius: 999px;
}
.hero-avail .window {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--white-dim);
}
.hero-avail .window b { color: var(--gold-300); }

.hero-cta {
  margin-top: 32px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  opacity: 0;
  animation: rise 0.9s var(--ease) 0.7s forwards;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--line);
  transition: transform 0.25s var(--ease), background 0.25s var(--ease), border-color 0.25s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: linear-gradient(135deg, var(--indigo-500), var(--violet-500)); color: white; border: none; }
.btn-primary:hover { filter: brightness(1.08); }
.btn-prominent { box-shadow: 0 10px 30px rgba(91,92,240,.28); animation: cta-breathe 3.2s ease-in-out infinite; }
.btn-cv { border-color: rgba(238,201,138,.38); color: var(--gold-300); }
.btn-cv span { display: inline-block; transition: transform .25s var(--ease); }
.btn-cv:hover span { transform: translateY(3px); }
@keyframes cta-breathe { 0%,100% { box-shadow: 0 10px 30px rgba(91,92,240,.24); } 50% { box-shadow: 0 14px 38px rgba(145,102,255,.45); } }
.btn-ghost { background: transparent; color: var(--white-soft); }
.btn-ghost:hover { border-color: var(--violet-300); }

.hero-portrait {
  position: relative;
  display: flex;
  justify-content: center;
  opacity: 0;
  animation: fade 1.2s var(--ease) 0.3s forwards;
}
.hero-portrait .glow {
  position: absolute;
  inset: -10%;
  background: radial-gradient(ellipse at 50% 40%, rgba(145,102,255,0.35), transparent 65%);
  filter: blur(30px);
  z-index: 0;
}
.hero-portrait img {
  position: relative;
  z-index: 1;
  max-width: 420px;
  width: 100%;
  filter: drop-shadow(0 30px 60px rgba(0,0,0,0.5));
  animation: float 7s ease-in-out infinite;
}

@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes float { 0%,100% { transform: translateY(0px); } 50% { transform: translateY(-14px); } }

.scroll-cue {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--white-faint);
  letter-spacing: 0.1em;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.scroll-cue .line { width: 1px; height: 26px; background: linear-gradient(var(--white-faint), transparent); animation: scrolldown 1.8s ease-in-out infinite; }
@keyframes scrolldown { 0% { opacity: 0.2; } 50% { opacity: 1; } 100% { opacity: 0.2; } }

/* ============================================================
   REVEAL ON SCROLL
   ============================================================ */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.reveal.in { opacity: 1; transform: translateY(0); }
.reveal-d1 { transition-delay: 0.08s; }
.reveal-d2 { transition-delay: 0.16s; }
.reveal-d3 { transition-delay: 0.24s; }

/* ============================================================
   ABOUT
   ============================================================ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
  margin-top: 50px;
}
@media (max-width: 860px) { .about-grid { grid-template-columns: 1fr; gap: 30px; } }

.trait-list { display: flex; flex-direction: column; }
.trait {
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 20px;
  align-items: baseline;
}
.trait:first-child { padding-top: 0; }
.trait .tag { font-family: var(--font-mono); font-size: 12px; color: var(--gold-300); letter-spacing: 0.06em; }
.trait .desc { color: var(--white-dim); font-size: 15px; }
.trait .desc b { color: var(--white-soft); font-weight: 600; }

.about-copy p { color: var(--white-dim); font-size: 16.5px; margin: 0 0 20px; }
.about-copy p:first-child { color: var(--white-soft); font-size: 19px; line-height: 1.5; }

/* ============================================================
   PROJECT / FLOW BLOCKS (Build, P2Enjoy)
   ============================================================ */
.flow {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  align-items: center;
  margin: 44px 0 8px;
}
.flow .node {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.06em;
  color: var(--white-soft);
  border: 1px solid var(--line);
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(244,242,255,0.03);
  transition: border-color 0.4s var(--ease), color 0.4s var(--ease), background 0.4s var(--ease);
}
.flow .node.on { border-color: var(--violet-300); color: var(--violet-300); background: rgba(145,102,255,0.08); }
.flow .arrow { color: var(--white-faint); margin: 0 10px; font-size: 14px; }
@media (max-width: 640px) {
  .flow { flex-direction: column; align-items: flex-start; }
  .flow .arrow { transform: rotate(90deg); margin: 4px 0 4px 18px; }
}

.split-media {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.split-media.reverse { direction: rtl; }
.split-media.reverse > * { direction: ltr; }
@media (max-width: 900px) {
  .split-media, .split-media.reverse { grid-template-columns: 1fr; direction: ltr; }
}
.media-frame {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--navy-800);
}
.media-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-frame::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(5,7,15,0.55));
  pointer-events: none;
}

.tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.tag-row span {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--white-dim);
  border: 1px solid var(--line);
  padding: 5px 11px;
  border-radius: 999px;
}

/* ============================================================
   DESIGN4GREEN — signature case study
   ============================================================ */
.d4g {
  position: relative;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(91,92,240,0.10), rgba(217,169,95,0.05) 60%, transparent);
  padding: 56px;
  margin-top: 50px;
  overflow: hidden;
}
@media (max-width: 720px) { .d4g { padding: 30px 22px; } }
.d4g-top { display: grid; grid-template-columns: 1fr 260px; gap: 40px; align-items: center; }
@media (max-width: 780px) { .d4g-top { grid-template-columns: 1fr; } }
.d4g-trophy { border-radius: 16px; overflow: hidden; border: 1px solid var(--line); }

.d4g-sequence {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 40px;
  font-family: var(--font-mono);
}
.d4g-sequence .step {
  font-size: 12.5px;
  color: var(--white-faint);
  border: 1px dashed var(--line);
  padding: 9px 14px;
  border-radius: 10px;
  opacity: 0.35;
  transition: all 0.5s var(--ease);
}
.d4g-sequence .step.hit { opacity: 1; color: var(--white-soft); border-style: solid; border-color: var(--violet-300); }
.d4g-sequence .arrow { color: var(--white-faint); align-self: center; }

.d4g-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 40px;
}
@media (max-width: 640px) { .d4g-metrics { grid-template-columns: 1fr; } }
.d4g-metric {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
  background: rgba(5,7,15,0.35);
}
.d4g-metric .num {
  font-family: var(--font-mono);
  font-size: clamp(28px, 4vw, 40px);
  color: var(--gold-300);
  font-weight: 700;
}
.d4g-metric .lab { font-size: 13px; color: var(--white-dim); margin-top: 6px; }
.benchmark { margin-top: 34px; padding: 22px; border: 1px solid var(--line); border-radius: 12px; background: rgba(5,7,15,.28); }
.benchmark-head { display: flex; justify-content: space-between; gap: 14px; color: var(--white-faint); font: 11px var(--font-mono); letter-spacing: .06em; margin-bottom: 22px; }
.benchmark-row { display: grid; grid-template-columns: 70px 1fr 48px; gap: 14px; align-items: center; margin-top: 14px; color: var(--white-dim); font: 11px var(--font-mono); }
.benchmark-row b { color: var(--gold-300); font-weight: 500; }
.benchmark-bar { position: relative; height: 9px; background: rgba(244,242,255,.07); border-radius: 99px; overflow: hidden; }
.benchmark-bar i { position: absolute; left: 0; top: 0; bottom: 0; display: block; border-radius: inherit; transform-origin: left; }
.benchmark-before { width: 100%; background: rgba(244,242,255,.3); }
.benchmark-after { width: 76%; background: linear-gradient(90deg, var(--violet-500), var(--gold-300)); transform: scaleX(0); transition: transform 1.2s var(--ease) .25s; }
.benchmark-row:nth-of-type(3) .benchmark-after { width: 80%; }
.benchmark.in .benchmark-after { transform: scaleX(1); }
.d4g.in .benchmark-after { transform: scaleX(1); }
.benchmark-legend { display: flex; gap: 18px; margin-top: 20px; color: var(--white-faint); font-size: 11px; }
.benchmark-legend span { display: inline-flex; align-items: center; gap: 7px; }
.benchmark-legend i { width: 10px; height: 4px; border-radius: 3px; display: inline-block; }
.legend-before { background: rgba(244,242,255,.3); }.legend-after { background: var(--gold-300); }
@media (max-width: 600px) { .benchmark { padding: 18px 14px; }.benchmark-head { flex-direction: column; }.benchmark-row { grid-template-columns: 58px 1fr 42px; gap: 8px; } }

/* ============================================================
   RESEARCH — Oldenburg
   ============================================================ */
.research-pipeline {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 40px 0;
}
.research-pipeline .rnode {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid var(--line);
  color: var(--violet-300);
  background: rgba(91,92,240,0.06);
  position: relative;
}
.research-pipeline .rnode::after {
  content: "→";
  position: absolute;
  right: -20px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--white-faint);
  font-family: var(--font-body);
}
.research-pipeline .rnode:last-child::after { content: ""; }
.research-lab { margin-top: 28px; padding: 18px; border: 1px solid rgba(145,102,255,.28); border-radius: 12px; background: rgba(10,14,28,.7); font-family: var(--font-mono); }
.lab-head { display: flex; justify-content: space-between; color: var(--white-faint); font-size: 10px; letter-spacing: .08em; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.lab-live { color: #71e2a4; }.lab-live i { display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; background: #71e2a4; box-shadow: 0 0 10px #71e2a4; }
.lab-stats { display: flex; gap: 18px; flex-wrap: wrap; margin: 18px 0; color: var(--white-faint); font-size: 10px; }.lab-stats b { display: block; color: var(--gold-300); font-size: 22px; font-weight: 500; }
.lab-log { color: var(--white-faint); font-size: 10px; line-height: 1.5; }.lab-log p { margin: 7px 0; }.lab-log b { color: var(--violet-300); font-weight: 400; }.lab-log em { color: var(--gold-300); font-style: normal; }
@media (max-width: 720px) {
  .research-pipeline { flex-direction: column; }
  .research-pipeline .rnode::after { content: "↓"; right: auto; left: 16px; top: auto; bottom: -20px; transform: none; }
}

/* ============================================================
   EXPLAIN / YOUTUBE
   ============================================================ */
.yt-stats {
  display: flex;
  gap: 34px;
  margin-top: 30px;
  flex-wrap: wrap;
}
.yt-stats .stat .n { font-family: var(--font-mono); font-size: 30px; color: var(--gold-300); font-weight: 700; }
.yt-stats .stat .l { font-size: 12.5px; color: var(--white-faint); margin-top: 2px; }

.video-feature {
  margin-top: 40px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px;
  background: rgba(244,242,255,0.02);
}
.video-feature a.title { font-size: 17px; font-weight: 600; color: var(--white-soft); }
.video-feature a.title:hover { color: var(--violet-300); }
.video-feature .meta { font-family: var(--font-mono); font-size: 12px; color: var(--white-faint); margin-top: 6px; }

.video-more { margin-top: 18px; display: flex; flex-direction: column; gap: 4px; }
.video-more a { font-size: 14px; color: var(--white-dim); padding: 8px 0; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; }
.video-more a:hover { color: var(--white-soft); }
.video-more a span.v { font-family: var(--font-mono); font-size: 11.5px; color: var(--white-faint); white-space: nowrap; }

.quote-block {
  font-family: var(--font-display);
  font-size: clamp(20px, 2.6vw, 28px);
  color: var(--white-soft);
  border-left: 2px solid var(--gold-300);
  padding-left: 24px;
  margin: 46px 0 0;
  max-width: 640px;
}

/* ============================================================
  TESTIMONIAL SIGNAL
  ============================================================ */
.testimonials { max-width: 860px; margin: 64px auto 0; padding-top: 24px; border-top: 1px solid var(--line); }
.testimonials-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.testimonials-heading h3 { font-size: clamp(22px, 3vw, 32px); }
.testimonial-controls { display: flex; gap: 8px; }
.testimonial-control { width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 50%; color: var(--white-soft); background: transparent; cursor: pointer; transition: color .25s var(--ease), border-color .25s var(--ease), transform .25s var(--ease); }
.testimonial-control:hover { color: var(--gold-300); border-color: var(--gold-300); transform: translateY(-2px); }
.testimonial-window { overflow: hidden; margin-top: 28px; }
.testimonial-track { display: flex; width: 100%; min-width: 0; transition: transform .65s var(--ease); }
.testimonial { flex: 0 0 100%; min-width: 0; min-height: 144px; padding: 22px 26px; display: flex; flex-direction: column; justify-content: space-between; border: 1px solid var(--line); border-radius: 12px; background: linear-gradient(110deg, rgba(145,102,255,.07), rgba(244,242,255,.018)); }
.testimonial p { max-width: 700px; margin: 0; color: var(--white-soft); font: 500 clamp(16px, 1.8vw, 20px)/1.4 var(--font-display); }
.testimonial footer { border: 0; padding: 0; text-align: left; color: var(--gold-300); font: 12px var(--font-mono); }
.testimonial-bottom { display: flex; align-items: center; gap: 16px; margin-top: 18px; }
.testimonial-progress { height: 2px; flex: 1; background: var(--line); overflow: hidden; }
.testimonial-progress span { display: block; width: 10%; height: 100%; background: var(--gold-300); transition: width .65s var(--ease); }
.testimonial-count { color: var(--white-faint); font: 11px var(--font-mono); }
@media (max-width: 600px) { .testimonial { padding: 20px; min-height: 170px; } .testimonials-heading { align-items: start; flex-direction: column; } }

/* ============================================================
   MASTERCLASS
   ============================================================ */
.mc-stats { display: flex; gap: 30px; margin-top: 26px; flex-wrap: wrap; }
.mc-stats div { font-family: var(--font-mono); font-size: 13px; color: var(--white-dim); border: 1px solid var(--line); padding: 10px 16px; border-radius: 10px; }
.mc-stats b { color: var(--gold-300); }
.masterclass-layout { display: grid; grid-template-columns: minmax(0, .92fr) minmax(320px, 1.08fr); gap: 54px; align-items: center; }
.masterclass-copy .section-lede { max-width: 580px; }
.masterclass-visual { position: relative; max-width: 760px; margin-top: 34px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.masterclass-visual img { width: 100%; max-height: 390px; object-fit: cover; }
.masterclass-caption { position: absolute; bottom: 0; left: 0; right: 0; padding: 18px 22px; color: var(--white-soft); background: linear-gradient(transparent, rgba(5,7,15,.9)); font-family: var(--font-mono); font-size: 12px; }
@media (max-width: 900px) { .masterclass-layout { grid-template-columns: 1fr; gap: 30px; } .masterclass-visual { margin-top: 0; max-width: 680px; } }

/* ============================================================
   EXPLORATION — mountain transition
   ============================================================ */
.exploration {
  min-height: 92vh;
  display: flex;
  align-items: flex-end;
  position: relative;
  background-image: linear-gradient(180deg, rgba(5,7,15,0.15) 0%, rgba(5,7,15,0.55) 55%, var(--navy-950) 100%), url('images/mountain-exploration.png');
  background-size: cover;
  background-position: center 25%;
  padding-bottom: 90px;
}
.exploration-inner { position: relative; z-index: 2; }
.exploration-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 44px; }
.exploration-fact { padding-top: 18px; border-top: 1px solid rgba(244,242,255,.22); }
.fact-index { color: var(--gold-300); font: 11px var(--font-mono); }
.exploration-fact h3 { font-size: 19px; margin-top: 18px; }
.exploration-fact p { color: var(--white-dim); font-size: 14px; margin: 12px 0 0; }
@media (max-width: 720px) { .exploration-facts { grid-template-columns: 1fr; gap: 28px; } }
.exploration-words {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
}
.exploration-words span {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid rgba(244,242,255,0.25);
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--white-soft);
  backdrop-filter: blur(6px);
  background: rgba(5,7,15,0.25);
}

/* ============================================================
   INTERNATIONAL
   ============================================================ */
.intl-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 46px;
}
@media (max-width: 900px) { .intl-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .intl-grid { grid-template-columns: 1fr; } }
.intl-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px 20px;
  background: rgba(244,242,255,0.02);
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
}
.intl-card:hover { border-color: var(--violet-300); transform: translateY(-4px); }
.intl-card .flag { font: 700 19px var(--font-mono); color: var(--gold-300); letter-spacing: .08em; }
.intl-card .flag span { display: block; font: 13px var(--font-body); color: var(--white-soft); letter-spacing: 0; margin-top: 5px; }
.intl-card .place { font-family: var(--font-display); font-size: 17px; margin-top: 12px; }
.intl-card .kw { font-family: var(--font-mono); font-size: 11px; color: var(--gold-300); letter-spacing: 0.06em; text-transform: uppercase; margin-top: 8px; }
.intl-card .period { font-size: 12.5px; color: var(--white-faint); margin-top: 10px; }

/* ============================================================
   SKILLS — tree, no progress bars
   ============================================================ */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 44px;
  margin-top: 50px;
}
@media (max-width: 720px) { .skills-grid { grid-template-columns: 1fr; } }
.skill-branch .branch-title {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--violet-300);
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 4px;
}
.skill-branch ul { list-style: none; margin: 0; padding: 0; }
.skill-branch li {
  padding: 13px 0 13px 20px;
  border-bottom: 1px solid var(--line);
  color: var(--white-dim);
  font-size: 15px;
  position: relative;
}
.skill-branch li::before {
  content: "";
  position: absolute; left: 0; top: 20px;
  width: 8px; height: 1px;
  background: var(--gold-300);
}
.skill-branch li:last-child { border-bottom: none; }

/* ============================================================
   ACADEMIC PATH — organic, non-linear
   ============================================================ */
.academic-path { margin-top: 50px; display: flex; flex-direction: column; gap: 0; }
.acad-item {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 30px;
  padding: 28px 0;
  border-top: 1px solid var(--line);
}
.acad-item:last-child { border-bottom: 1px solid var(--line); }
@media (max-width: 700px) { .acad-item { grid-template-columns: 1fr; gap: 10px; } }
.acad-item .when { font-family: var(--font-mono); font-size: 12.5px; color: var(--gold-300); }
.acad-item h4 { font-size: 18px; margin-bottom: 6px; }
.acad-item .where { font-size: 13.5px; color: var(--white-faint); margin-bottom: 10px; }
.acad-item p { color: var(--white-dim); font-size: 14.5px; margin: 0; }

/* ============================================================
   CONTACT
   ============================================================ */
.contact-section {
  padding: 140px 0 90px;
  text-align: center;
}
.contact-title {
  font-size: clamp(36px, 7vw, 84px);
  line-height: 1;
}
.contact-avail {
  margin: 40px auto 0;
  max-width: 520px;
}
.contact-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 46px;
}
.contact-links a {
  font-family: var(--font-mono);
  font-size: 13.5px;
  border: 1px solid var(--line);
  padding: 14px 24px;
  border-radius: 999px;
  transition: all 0.3s var(--ease);
}
.contact-links a:hover { border-color: var(--violet-300); color: var(--violet-300); transform: translateY(-2px); }
.contact-cta-row { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 34px; }

footer {
  border-top: 1px solid var(--line);
  padding: 30px 0;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--white-faint);
}

/* ============================================================
   Section separators
   ============================================================ */
.divider { height: 1px; background: var(--line); width: 100%; }
