/* Martijn Van Baelen - futuristic motorsport portfolio.
   Pit-wall dashboard aesthetic. Dark base, neon red primary, electric blue
   secondary, silver/white type. Tech-mono for labels, sans for body. */

:root {
  --bg:        #06090f;
  --bg-2:      #0a0e14;
  --bg-3:      #101822;
  --panel:     #0d131c;
  --panel-2:   #131c28;
  --line:      #1c2533;
  --line-2:    #283246;
  --fg:        #e8edf5;
  --fg-2:      #b9c2d2;
  --fg-3:      #6f7c8e;
  --fg-4:      #4a5365;
  --accent:    #ff2e3e;
  --accent-2:  #00d9ff;
  --warn:      #ffb000;
  --good:      #22c55e;
  --bad:       #ef4444;
  --silver:    #c4cad6;

  --mono: ui-monospace, "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;
  --sans: "Inter", "Helvetica Neue", Arial, system-ui, sans-serif;
  --display: "Space Grotesk", "Inter", system-ui, sans-serif;

  --maxw: 1480px;
  --pad-x: clamp(20px, 5vw, 96px);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  letter-spacing: 0.005em;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

#root {
  position: relative;
  min-height: 100vh;
  isolation: isolate;
  overflow-x: hidden;
}

/* Global background */
#bg-canvas {
  position: fixed; inset: 0;
  z-index: -2;
  background:
    radial-gradient(1200px 700px at 70% -10%, rgba(255, 46, 62, 0.08), transparent 60%),
    radial-gradient(900px 600px at 10% 110%, rgba(0, 217, 255, 0.06), transparent 60%),
    var(--bg);
}
#bg-grid {
  position: fixed; inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.35;
  background-image:
    linear-gradient(transparent 0, transparent calc(100% - 1px), rgba(28, 37, 51, 0.7) 100%),
    linear-gradient(90deg, transparent 0, transparent calc(100% - 1px), rgba(28, 37, 51, 0.7) 100%);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, #000 60%, transparent 100%);
}

::selection { background: var(--accent); color: #000; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ───── Top nav ─────────────────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px var(--pad-x);
  background: rgba(6, 9, 15, 0.78);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.nav-left { display: flex; align-items: center; gap: 18px; }
.nav-mark {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 700; letter-spacing: 0.18em; color: var(--fg);
}
.nav-mark .dot {
  width: 10px; height: 10px; border-radius: 999px; background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
  animation: pulse 1.6s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}
.nav-right { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.nav-burger {
  display: none;
  background: transparent;
  border: 1px solid var(--line-2);
  border-radius: 4px;
  padding: 8px 10px;
  cursor: pointer;
  flex-direction: column;
  gap: 4px;
  margin-left: auto;
}
.nav-burger span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--fg);
  border-radius: 1px;
  transition: transform 0.18s, opacity 0.18s;
}
.nav-burger.on span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-burger.on span:nth-child(2) { opacity: 0; }
.nav-burger.on span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.nav-link {
  color: var(--fg-3); text-decoration: none; padding: 6px 10px;
  border-radius: 4px; transition: color 0.18s, background 0.18s;
}
.nav-link:hover { color: var(--fg); background: var(--bg-3); }
.nav-status {
  margin-left: 6px; padding: 6px 10px; border: 1px solid var(--line-2);
  border-radius: 4px; color: var(--good); font-variant-numeric: tabular-nums;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em;
  display: inline-flex; align-items: center; gap: 8px;
}
.nav-status::before {
  content: ""; width: 6px; height: 6px; border-radius: 999px; background: var(--good);
  box-shadow: 0 0 8px var(--good);
  animation: pulse-good 2.4s ease-in-out infinite;
}
@keyframes pulse-good {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

/* Language dropdown */
.lang-dd { position: relative; margin-left: 8px; }
.lang-trigger {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 10px;
  background: transparent;
  border: 1px solid var(--line-2);
  border-radius: 4px;
  color: var(--fg-2);
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em;
  cursor: pointer;
  transition: border-color 0.18s, color 0.18s;
}
.lang-trigger:hover { color: var(--fg); border-color: var(--accent); }
.lang-globe {
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--accent-2); font-size: 14px; line-height: 1;
}
.lang-current { color: var(--fg); font-weight: 600; }
.lang-caret { font-size: 10px; color: var(--fg-3); transition: transform 0.18s; }
.lang-caret.open { transform: rotate(180deg); }
.lang-menu {
  position: absolute; right: 0; top: calc(100% + 6px);
  list-style: none; margin: 0; padding: 4px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.6);
  min-width: 170px;
  z-index: 100;
  backdrop-filter: blur(10px);
}
.lang-opt {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  width: 100%;
  padding: 8px 10px;
  background: transparent;
  border: 0;
  color: var(--fg-2);
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em;
  cursor: pointer;
  border-radius: 4px;
  text-align: left;
}
.lang-opt:hover { background: var(--bg-3); color: var(--fg); }
.lang-opt.on { background: var(--bg-3); color: var(--accent); }
.lang-opt .short { font-weight: 700; }
.lang-opt .long { color: var(--fg-3); text-transform: none; letter-spacing: 0.04em; font-size: 11px; }
.lang-opt.on .long { color: var(--fg-2); }

/* ───── Section chrome ──────────────────────────────────────────────────── */
.section {
  position: relative;
  padding: clamp(80px, 10vw, 140px) var(--pad-x);
  max-width: var(--maxw); margin: 0 auto;
}
.section-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 24px; margin-bottom: clamp(40px, 5vw, 72px);
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
  flex-wrap: wrap;
}
.eyebrow {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.24em;
  text-transform: uppercase; color: var(--accent);
  display: inline-flex; align-items: center; gap: 8px;
}
.eyebrow::before {
  content: ""; width: 18px; height: 2px; background: var(--accent);
  display: inline-block;
}
.section-title {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(36px, 4.5vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 8px 0 0;
  color: var(--fg);
  text-wrap: balance;
}
.section-sub {
  color: var(--fg-2);
  max-width: 60ch;
  margin-top: 12px;
  font-size: 16px;
  text-wrap: pretty;
}
.section-meta {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--fg-3);
  display: flex; flex-direction: column; gap: 4px; align-items: flex-end;
}
.section-num { color: var(--accent); font-weight: 700; }

/* ───── Hero - helmet visor scroll-zoom ─────────────────────────────────── */
.hero {
  position: relative;
  min-height: calc(100vh - 50px);
  padding: 80px var(--pad-x) 40px;
  max-width: var(--maxw); margin: 0 auto;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 24px;
}

.hero-helmet {
  position: relative;
  height: 220vh;
  min-height: 220vh;
  padding: 0;
  margin: 0;
  max-width: none;
  display: block;
  /* Clip the scaled helmet bg (transform: scale up to 5x paints past the
     element box) so it can't bleed into the Profile section below. */
  overflow: hidden;
  isolation: isolate;
}
.hero-helmet > * {
  position: sticky;
  top: 0;
}
.helmet-bg {
  position: sticky;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  margin-left: calc(50% - 50vw);
  background-image: url("assets/new_helmet.png");
  background-size: cover;
  background-position: center 42%;
  background-repeat: no-repeat;
  background-color: #06090f;
  transform-origin: 50% 38%;
  will-change: transform;
  z-index: 0;
}
.helmet-vignette {
  position: sticky;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  margin-left: calc(50% - 50vw);
  margin-top: -100vh;
  pointer-events: none;
  background:
    radial-gradient(ellipse 60% 45% at 50% 38%, transparent 30%, rgba(6,9,15,0.55) 75%, rgba(6,9,15,0.95) 100%);
  z-index: 1;
}
.helmet-beam-glow {
  position: sticky;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  margin-left: calc(50% - 50vw);
  margin-top: -100vh;
  pointer-events: none;
  background:
    radial-gradient(ellipse 32% 24% at 50% 38%, rgba(0, 217, 255, 0.18), rgba(255, 122, 0, 0.10) 35%, transparent 70%);
  mix-blend-mode: screen;
  transform-origin: 50% 38%;
  z-index: 2;
}
.hero-helmet-center {
  position: sticky;
  top: 0;
  margin-top: -100vh;
  width: 100%;
  height: 100vh;
  z-index: 4;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 var(--pad-x);
  max-width: var(--maxw);
  margin-left: auto;
  margin-right: auto;
  pointer-events: none;
}
.hero-helmet-center > * { pointer-events: auto; }
.hero-helmet-center .hero-headline {
  text-shadow: 0 4px 32px rgba(0, 0, 0, 0.7), 0 1px 2px rgba(0, 0, 0, 0.9);
}
.hero-helmet-center .hero-sub {
  color: var(--fg);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.85);
  max-width: 56ch;
}
/* (Hero ticker removed - replaced by .hero-helmet-streaks visor exhaust.) */
.hero-scroll-hint {
  position: sticky;
  bottom: 18px;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 12px;
  width: max-content;
  margin: -32px auto 0;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.32em;
  color: var(--fg-2);
  text-transform: uppercase;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.85);
}
.hero-scroll-hint .line {
  width: 56px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-2));
  animation: scroll-hint 2s ease-in-out infinite;
}
@keyframes scroll-hint {
  0%, 100% { transform: translateX(0); opacity: 0.4; }
  50% { transform: translateX(8px); opacity: 1; }
}

.hero-headline {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(44px, 7vw, 112px);
  line-height: 0.96;
  letter-spacing: -0.025em;
  margin: 0;
  color: var(--fg);
  text-wrap: balance;
}
.hero-headline em {
  font-style: normal;
  color: var(--accent);
  position: relative;
}
.hero-headline em::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0.05em;
  height: 0.08em; background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
  opacity: 0.5;
}
.hero-sub {
  margin-top: 28px;
  max-width: 60ch;
  font-size: 18px;
  color: var(--fg-2);
  text-wrap: pretty;
}

.hero-cta-row { display: flex; gap: 14px; margin-top: 36px; flex-wrap: wrap; }

.btn {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
  padding: 16px 22px;
  border: 1px solid var(--line-2);
  background: transparent;
  color: var(--fg);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.18s ease;
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none;
}
.btn:hover { border-color: var(--accent); color: var(--fg); transform: translateY(-1px); }
.btn-prim {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
  box-shadow: 0 8px 24px -8px var(--accent);
}
.btn-prim:hover { background: #ff4856; color: #000; box-shadow: 0 12px 30px -6px var(--accent); }
.btn-secondary { border-color: var(--accent-2); color: var(--accent-2); }
.btn-secondary:hover { background: var(--accent-2); color: #000; }
.btn .arrow { transition: transform 0.18s; }
.btn:hover .arrow { transform: translateX(3px); }

/* Visor exhaust - document-anchored streak layer behind page content.
   Streaks scroll with the page like normal content; only visible in the
   gaps between section cards. Opacity is driven by the React component
   via ref; transforms are driven by per-streak requestAnimationFrame. */
.visor-exhaust {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
  /* Default invisible so streaks never flash on initial render before the
     scroll handler runs. JS overrides this via the container ref. */
  opacity: 0;
}
.hero-streak {
  position: absolute;
  /* `top` is set inline per streak (its absolute document Y in pixels).
     The transform that animates the fall is driven entirely by JS via
     requestAnimationFrame - no CSS animation here. */
  width: 1.5px;
  /* Transparent at both ends so streaks fade in as they enter the visible
     area and out as they leave. */
  background: linear-gradient(
    180deg,
    transparent 0%,
    currentColor 35%,
    currentColor 65%,
    transparent 100%
  );
  filter: blur(0.4px);
  box-shadow: 0 0 6px currentColor, 0 0 14px currentColor;
  will-change: transform;
}

/* ───── Driver profile ──────────────────────────────────────────────────── */
.profile-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 32px;
}
.profile-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 28px;
  position: relative;
}
.profile-card::before {
  content: "";
  position: absolute; left: 28px; right: 28px; top: 0;
  height: 2px; background: var(--accent);
}
.profile-name {
  font-family: var(--display);
  font-size: 32px; font-weight: 600; letter-spacing: -0.02em;
  margin: 0;
}
.profile-meta { font-family: var(--mono); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--fg-3); }
.profile-bio { color: var(--fg-2); margin-top: 18px; }
.profile-section-label {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--fg-3); margin-bottom: 10px;
}
.profile-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em;
  text-transform: uppercase; padding: 5px 9px;
  border: 1px solid var(--line-2); border-radius: 999px;
  color: var(--fg-2);
}
.tag.accent { color: var(--accent); border-color: rgba(255, 46, 62, 0.4); background: rgba(255, 46, 62, 0.05); }

.skills-stack {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 28px;
}
.skills-stack h3 {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--fg-3); margin: 0 0 18px;
}
.skill-row {
  display: grid;
  grid-template-columns: 130px 1fr 60px;
  align-items: center;
  gap: 14px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 12px;
}
.skill-row:first-of-type { border-top: 0; }
.skill-row .lbl { color: var(--fg); letter-spacing: 0.04em; }
.skill-row .val { color: var(--accent); font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.skill-bar {
  height: 8px;
  background: var(--bg-3);
  border-radius: 1px;
  position: relative;
  overflow: hidden;
}
.skill-bar .fill {
  position: absolute; inset: 0 auto 0 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 1px;
  width: 0;
  transition: width 1s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.skill-bar .ticks {
  position: absolute; inset: 0;
  background-image: linear-gradient(90deg, transparent calc(10% - 1px), rgba(0,0,0,0.4) 10%);
  background-size: 10% 100%;
  pointer-events: none;
}
.radar-wrap {
  margin-top: 28px;
  display: flex; justify-content: center;
}

/* ───── AI / Data lab ───────────────────────────────────────────────────── */
.lab-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.lab-card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 24px;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.lab-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 217, 255, 0.4);
  box-shadow: 0 16px 40px -16px rgba(0, 217, 255, 0.4);
}
.lab-card .num {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.22em;
  color: var(--accent-2); display: block; margin-bottom: 12px;
}
.lab-card h4 {
  font-family: var(--display); font-size: 22px; letter-spacing: -0.01em;
  margin: 0 0 10px; font-weight: 600;
}
.lab-card p { color: var(--fg-2); margin: 0; font-size: 14px; }

/* ───── Simulator ───────────────────────────────────────────────────────── */
.sim-frame {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  overflow: hidden;
}
.sim-headerbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 22px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em;
  text-transform: uppercase;
  flex-wrap: wrap;
  gap: 12px;
}
.sim-headerbar .left { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.sim-headerbar .pill {
  padding: 4px 9px; border: 1px solid var(--line-2); border-radius: 4px;
  color: var(--fg-2);
}
.sim-headerbar .live {
  color: var(--good);
  display: inline-flex; align-items: center; gap: 8px;
}
.sim-headerbar .live::before {
  content: ""; width: 6px; height: 6px; border-radius: 999px; background: var(--good);
  box-shadow: 0 0 8px var(--good);
}

.sim-body {
  display: grid;
  grid-template-columns: 300px 1fr;
  min-height: 920px;
}
.sim-side {
  border-right: 1px solid var(--line);
  padding: 20px;
  display: flex; flex-direction: column; gap: 18px;
  overflow-y: auto;
}
.sim-side h4 {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--fg-3); margin: 0 0 6px;
}
.sim-crew-name {
  font-family: var(--mono); font-size: 10px; color: var(--fg-3);
  letter-spacing: 0.18em; margin-bottom: 12px;
}
.sim-run-btn { margin-top: 12px; }
.sim-side-note {
  font-family: var(--mono); font-size: 10px; color: var(--fg-3);
  letter-spacing: 0.06em; line-height: 1.55; margin-top: 12px;
}
.sim-stage {
  display: flex; flex-direction: column;
  background: #0b0f15;
}
.sim-canvas-wrap { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.sim-median-banner {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px;
  padding: 28px 24px 32px;
  border-top: 1px solid var(--line);
  background:
    radial-gradient(ellipse 60% 100% at 50% 0%, rgba(255, 46, 62, 0.12), transparent 70%),
    var(--bg-2);
}
.sim-median-banner .lbl {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.28em;
  text-transform: uppercase; color: var(--fg-3);
}
.sim-median-banner .val {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(64px, 9vw, 132px);
  line-height: 1;
  color: var(--accent);
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 40px rgba(255, 46, 62, 0.35);
}
.sim-median-banner .val .unit {
  font-size: 0.45em;
  color: var(--fg-2);
  margin-left: 6px;
  font-weight: 500;
  letter-spacing: 0;
}
.sim-section { max-width: 1700px; }
.sim-section .pc-svg { min-height: 720px; }

.crew-selector {
  display: flex; flex-direction: column; gap: 6px;
  margin-bottom: 14px;
}
.crew-chip {
  display: flex; flex-direction: column; gap: 2px;
  padding: 10px 12px;
  text-align: left;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--fg-2);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.crew-chip:hover { border-color: var(--accent-2); }
.crew-chip.on {
  border-color: var(--accent);
  background: rgba(255, 46, 62, 0.08);
  color: var(--fg);
}
.crew-chip-name {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; font-weight: 700;
}
.crew-chip.on .crew-chip-name { color: var(--accent); }
.crew-chip-tag {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.04em;
  text-transform: none; color: var(--fg-3);
}

.crew-row {
  display: grid;
  grid-template-columns: 14px 1fr;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
}
.crew-row .swatch { width: 10px; height: 10px; border-radius: 999px; }
.crew-row label {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--fg-3); display: block;
}
.crew-row .crew-name {
  font-family: var(--mono); font-size: 12px; color: var(--fg);
  letter-spacing: 0.06em; padding-top: 2px;
}

/* Pitstop canvas */
.pc-root { display: flex; flex-direction: column; height: 100%; }
.pc-svg { width: 100%; flex: 1; min-height: 520px; display: block; background: var(--bg-2); }
.pc-controls {
  display: flex; align-items: center; gap: 10px; padding: 12px 16px;
  border-top: 1px solid var(--line); background: var(--bg-2);
  flex-wrap: wrap;
}
.pc-btn {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em;
  font-weight: 700; padding: 8px 14px; border: 1px solid var(--line-2);
  background: var(--bg-3); color: var(--fg); border-radius: 3px; cursor: pointer;
}
.pc-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.pc-btn-prim { color: #000 !important; border-color: transparent; }
.pc-speed {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.18em;
  color: var(--fg-3); margin-left: 8px;
}
.pc-speed-btn {
  font-family: var(--mono); font-size: 10px; font-weight: 700;
  padding: 4px 8px; border: 1px solid var(--line-2);
  background: var(--bg-3); color: var(--fg-3); border-radius: 3px; cursor: pointer;
}
.pc-speed-btn.on { color: #000; }
.pc-scrub {
  flex: 1; min-width: 100px;
  height: 3px;
}
.pc-time {
  font-family: var(--mono); font-size: 11px; color: var(--fg-2);
  width: 56px; text-align: right;
  font-variant-numeric: tabular-nums;
}

/* ───── Activities ──────────────────────────────────────────────────────── */
.filters {
  display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px;
}
.filter-chip {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em;
  text-transform: uppercase; padding: 8px 14px;
  border: 1px solid var(--line-2); background: var(--bg-2);
  color: var(--fg-2); border-radius: 4px; cursor: pointer;
  transition: all 0.15s;
}
.filter-chip:hover { color: var(--fg); border-color: var(--accent); }
.filter-chip.on { background: var(--accent); color: #000; border-color: var(--accent); }
.filter-chip .count { color: var(--fg-3); margin-left: 6px; font-weight: 600; }
.filter-chip.on .count { color: rgba(0,0,0,0.6); }

.activity-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 14px;
  align-items: stretch;
}
.activity-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 22px;
  transition: border-color 0.18s, transform 0.18s;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.activity-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.activity-card::after {
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.25s ease-out;
}
.activity-card:hover::after { transform: scaleY(1); }
.activity-card.flash {
  animation: card-flash 1.5s ease-out;
}
@keyframes card-flash {
  0%   { box-shadow: 0 0 0 0 rgba(255, 46, 62, 0.0), 0 0 0 0 rgba(255, 46, 62, 0.0); border-color: var(--line); }
  15%  { box-shadow: 0 0 0 3px rgba(255, 46, 62, 0.55), 0 0 28px rgba(255, 46, 62, 0.45); border-color: var(--accent); }
  100% { box-shadow: 0 0 0 0 rgba(255, 46, 62, 0.0), 0 0 0 0 rgba(255, 46, 62, 0.0); border-color: var(--line); }
}
.activity-card .top {
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--fg-3); margin-bottom: 14px;
}
.activity-card .top .domain {
  color: var(--accent-2);
  padding: 3px 7px; border: 1px solid rgba(0,217,255,0.3);
  border-radius: 4px;
}
.activity-card.dom-seminar .top .domain { color: var(--accent-2); border-color: rgba(0,217,255,0.3); }
.activity-card.dom-innovation .top .domain { color: var(--accent); border-color: rgba(255,46,62,0.4); }
.activity-card.dom-personal .top .domain { color: var(--warn); border-color: rgba(255,176,0,0.3); }
.activity-card.dom-international .top .domain { color: var(--good); border-color: rgba(34,197,94,0.3); }

.activity-card h4 {
  font-family: var(--display); font-size: 18px; line-height: 1.2;
  letter-spacing: -0.01em; margin: 0 0 8px; font-weight: 600;
  text-wrap: balance;
}
.activity-card p { color: var(--fg-2); font-size: 13px; margin: 8px 0 0; }
.activity-card .meta-rows {
  margin: 16px 0 0;
  padding: 12px 0 0;
  border-top: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 6px;
  margin-top: auto;
}
.activity-card .meta-row {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 10px;
  align-items: baseline;
  font-family: var(--mono);
  font-size: 11px;
}
.activity-card .meta-row dt {
  font-size: 9px; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--fg-3);
  margin: 0;
}
.activity-card .meta-row dd {
  margin: 0;
  color: var(--fg);
  letter-spacing: 0.04em;
  word-break: break-word;
}

/* ───── Selected (race highlights) ──────────────────────────────────────── */
.selected-stack { display: flex; flex-direction: column; gap: 24px; }
.selected-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  display: grid;
  grid-template-columns: 320px 1fr;
  overflow: hidden;
  position: relative;
}
.selected-card.headline {
  grid-template-columns: 1fr;
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(255, 46, 62, 0.15), 0 24px 60px -20px rgba(255, 46, 62, 0.18);
}
.selected-card .meta {
  background: var(--bg-2);
  padding: 28px;
  display: flex; flex-direction: column; gap: 14px;
  border-right: 1px solid var(--line);
}
.selected-card.headline .meta { border-right: 0; border-bottom: 1px solid var(--line); }
.selected-card .meta .num {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.22em;
  color: var(--accent);
}
.selected-card .meta h3 {
  font-family: var(--display); font-size: 28px; letter-spacing: -0.02em;
  margin: 0; line-height: 1.05; font-weight: 600;
}
.selected-card .meta .sub {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--fg-3);
}
.selected-card .meta .meta-desc {
  color: var(--fg-2); font-size: 14px; margin: 0;
}
.selected-card .meta .meta-tags {
  display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap;
}
.selected-card .body {
  padding: 28px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.selected-card.headline .body {
  grid-template-columns: repeat(3, 1fr);
}
.selected-card .body section h4 {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--accent); margin: 0 0 8px;
}
.selected-card .body section p {
  color: var(--fg-2); font-size: 14px; margin: 0;
}
.selected-card .body section.span-2 { grid-column: span 2; }
.selected-card.headline .body section.span-2 { grid-column: span 3; }

.stage-headline-hero {
  position: relative;
  padding: 36px 32px 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: end;
}
.stage-headline-hero .map {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 24px;
  position: relative;
  min-height: 220px;
}
.stage-headline-hero .map svg { width: 100%; height: 100%; }
.stage-headline-hero h3 {
  font-family: var(--display);
  font-size: clamp(32px, 4vw, 56px);
  letter-spacing: -0.025em;
  font-weight: 600;
  margin: 0;
}
.stage-headline-hero .stamp {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  padding: 4px 8px;
  border: 1px solid var(--accent);
  color: var(--accent);
  margin-bottom: 14px;
  border-radius: 4px;
}
.stage-headline-meta {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--fg-3); margin-top: 8px;
}
.stage-headline-desc {
  color: var(--fg-2); font-size: 16px; margin-top: 18px; max-width: 60ch;
}

/* Trackside photo inside the Stage USA card - text on the left, photo on
   the right, sized so the photo isn't oversized and the text reads as
   editorial copy beside it. Stacks on phones. */
.stage-photo {
  margin: 28px 0 4px;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 32px;
  align-items: center;
  padding: 24px 28px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg-2);
}
.stage-photo img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: var(--bg);
}
.stage-photo figcaption {
  color: var(--fg-2);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.6;
  text-align: left;
  padding: 0;
}
.stage-photo figcaption .lbl {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}
.stage-photo figcaption .line {
  margin: 0 0 10px;
  color: var(--fg);
  font-size: 15px;
  line-height: 1.5;
}
.stage-photo figcaption .sub {
  margin: 0;
  color: var(--fg-2);
  font-size: 13px;
  line-height: 1.55;
}
@media (max-width: 900px) {
  .stage-photo {
    grid-template-columns: 1fr;
    padding: 20px;
    gap: 18px;
  }
  .stage-photo img {
    max-width: 320px;
    margin: 0 auto;
  }
  .stage-photo figcaption { text-align: center; }
}

/* ───── Timeline ────────────────────────────────────────────────────────── */
.timeline-frame {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  padding: 22px 0 0;
  position: relative;
  overflow: hidden;
}
.timeline-scroll {
  padding: 12px 28px 28px;
}
.timeline-year-row {
  position: relative;
  display: block;
}
.timeline-year-row + .timeline-year-row {
  margin-top: 36px;
  padding-top: 32px;
  border-top: 1px dashed var(--line);
}
.timeline-year-label {
  position: relative;
  z-index: 2;
  display: inline-flex; align-items: center; gap: 10px;
  margin: 0 0 10px 64px;
  padding: 6px 12px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--fg);
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 4px;
}
.timeline-year-label .badge {
  font-size: 9px; color: var(--accent);
  letter-spacing: 0.18em;
  padding: 2px 6px;
  border: 1px solid var(--accent);
  border-radius: 2px;
  background: rgba(255,46,62,0.08);
}
.timeline-year-label .desc {
  font-size: 10px; color: var(--fg-3); letter-spacing: 0.14em;
}
.timeline-track {
  position: relative;
  height: 240px;
  padding: 0 64px;
}
.timeline-track .axis {
  position: absolute; left: 64px; right: 64px; top: 130px;
  height: 1px; background: var(--line);
}
.timeline-track .axis::before, .timeline-track .axis::after {
  content: ""; position: absolute; top: -3px;
  width: 7px; height: 7px; border: 1px solid var(--line); transform: rotate(45deg);
  background: var(--bg);
}
.timeline-track .axis::before { left: -4px; }
.timeline-track .axis::after { right: -4px; }
.timeline-event {
  position: absolute;
  width: 92px;
  text-align: center;
  cursor: default;
  transition: transform 0.18s, filter 0.18s;
}
.timeline-event.clickable { cursor: pointer; }
.timeline-event.clickable:hover,
.timeline-event.clickable:focus-visible {
  transform: translateY(-2px);
  filter: brightness(1.15);
  outline: none;
}
.timeline-event.clickable:hover .label,
.timeline-event.clickable:focus-visible .label {
  color: var(--accent);
}
.timeline-event.clickable:hover .dot,
.timeline-event.clickable:focus-visible .dot {
  box-shadow: 0 0 0 4px var(--bg), 0 0 14px var(--accent), 0 0 0 6px rgba(255, 46, 62, 0.4);
}
.timeline-event .dot {
  width: 12px; height: 12px; border-radius: 999px;
  background: var(--accent-2);
  margin: 0 auto;
  box-shadow: 0 0 0 4px var(--bg), 0 0 0 5px var(--line);
  position: relative;
}
.timeline-event.t-seminar .dot { background: var(--accent-2); }
.timeline-event.t-innovation .dot { background: var(--accent); box-shadow: 0 0 0 4px var(--bg), 0 0 12px var(--accent); }
.timeline-event.t-personal .dot { background: var(--warn); }
.timeline-event.t-international .dot { background: var(--good); box-shadow: 0 0 0 4px var(--bg), 0 0 14px var(--good); }
.timeline-event.t-future .dot { background: var(--silver); }
.timeline-event.marquee .dot {
  width: 18px; height: 18px;
  box-shadow: 0 0 0 4px var(--bg), 0 0 24px var(--good);
}
.timeline-event .stem {
  position: absolute; left: 50%; top: 12px;
  width: 1px; height: 30px; background: var(--line-2);
  transform: translateX(-0.5px);
}
.timeline-event.below .stem { top: auto; bottom: 12px; }
.timeline-event .label {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--fg);
  display: block;
}
.timeline-event .date {
  font-family: var(--mono); font-size: 9px; color: var(--fg-3); letter-spacing: 0.18em;
  text-transform: uppercase;
  display: block;
}
.timeline-event .desc {
  font-size: 11px; color: var(--fg-3); line-height: 1.3; margin-top: 4px;
}
.timeline-legend {
  display: flex; gap: 14px; padding: 0 28px 22px; flex-wrap: wrap;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--fg-3);
}
.timeline-legend span { display: inline-flex; align-items: center; gap: 6px; }
.timeline-legend i { width: 8px; height: 8px; border-radius: 999px; }

/* ───── Final reflection ────────────────────────────────────────────────── */
.final-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.final-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 26px;
  position: relative;
}
.final-card .lbl {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 10px;
  display: block;
}
.final-card p { color: var(--fg-2); margin: 0; font-size: 15px; }
.final-card.span2 { grid-column: span 2; }
.final-card.future {
  /* Stack the accent gradient on TOP of the opaque panel base so streaks
     behind the page can't bleed through the card. */
  background:
    linear-gradient(135deg, rgba(255,46,62,0.05), rgba(0,217,255,0.04)),
    var(--panel);
  border-color: rgba(255,46,62,0.3);
}
.final-card.future .lbl { color: var(--accent-2); }
.final-card .future-text {
  color: var(--fg); font-size: 18px; font-family: var(--display);
  font-weight: 500; line-height: 1.4;
}

/* ───── PXL X-Factor block ──────────────────────────────────────────────── */
.xfactor-card {
  margin-top: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 32px 36px;
  position: relative;
  overflow: hidden;
}
.xfactor-card::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(circle at 50% 50%, rgba(255,46,62,0.06), transparent 55%),
    repeating-linear-gradient(90deg, transparent 0 60px, rgba(255,255,255,0.02) 60px 61px);
  pointer-events: none;
}
.xfactor-head {
  position: relative; z-index: 1;
  display: flex; justify-content: space-between; align-items: baseline;
  flex-wrap: wrap; gap: 14px;
  margin-bottom: 24px;
}
.xfactor-head .lbl {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--accent-2); margin: 0;
}
.xfactor-head h3 {
  margin: 4px 0 0; font-family: var(--display); font-size: 28px;
  font-weight: 600; letter-spacing: -0.015em; line-height: 1.1;
}
.xfactor-head .stamp {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 4px 8px;
  background: rgba(255,46,62,0.10);
  border: 1px solid rgba(255,46,62,0.35);
  color: var(--accent);
  border-radius: 2px;
}
.xfactor-text {
  position: relative; z-index: 1;
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
  margin-bottom: 24px;
  color: var(--fg-2);
  font-size: 14px;
  line-height: 1.6;
}
.xfactor-x-stage {
  position: relative; z-index: 1;
  width: 100%;
  max-width: 880px;
  margin: 0 auto;
  aspect-ratio: 800 / 550;
}
.xfactor-x-svg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
}
.xfactor-x-cell {
  position: absolute;
  width: 36%;
  padding: 14px 16px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  z-index: 2;
}
.xfactor-x-cell.tl { top: 0;    left: 0;  text-align: left;  }
.xfactor-x-cell.tr { top: 0;    right: 0; text-align: right; }
.xfactor-x-cell.bl { bottom: 0; left: 0;  text-align: left;  }
.xfactor-x-cell.br { bottom: 0; right: 0; text-align: right; }
.xfactor-x-cell .lbl {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--accent);
  margin-bottom: 8px;
}
.xfactor-x-cell .note {
  font-family: var(--sans); font-size: 13px; line-height: 1.5;
  color: var(--fg-2); letter-spacing: 0; text-transform: none;
}
@media (max-width: 900px) {
  .xfactor-x-stage {
    aspect-ratio: auto;
    max-width: 560px;
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  .xfactor-x-svg { display: none; }
  .xfactor-x-cell {
    position: static;
    width: 100%;
    text-align: left !important;
  }
}

/* ───── Contact ─────────────────────────────────────────────────────────── */
.contact-frame {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: clamp(40px, 6vw, 80px) clamp(28px, 5vw, 64px);
  background:
    radial-gradient(800px 400px at 80% 0%, rgba(255,46,62,0.10), transparent 60%),
    radial-gradient(600px 400px at 0% 100%, rgba(0,217,255,0.08), transparent 60%),
    var(--panel);
  text-align: left;
}
.contact-eyebrow {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 14px;
}
.contact-frame h2 {
  font-family: var(--display);
  font-size: clamp(40px, 6vw, 88px);
  letter-spacing: -0.025em;
  margin: 0;
  font-weight: 600;
  line-height: 0.96;
  text-wrap: balance;
}
.contact-frame .sub { color: var(--fg-2); margin: 18px 0 32px; max-width: 60ch; }
.contact-row { display: flex; gap: 12px; flex-wrap: wrap; }
.contact-row .btn { flex: 0 0 auto; }

/* ───── Footer ──────────────────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--line);
  padding: 24px var(--pad-x);
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--fg-3);
  display: flex; justify-content: center; gap: 18px; flex-wrap: wrap;
  text-align: center;
  max-width: var(--maxw); margin: 0 auto;
}

/* ───── Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .profile-grid { grid-template-columns: 1fr; }
  .selected-card { grid-template-columns: 1fr; }
  .selected-card .meta { border-right: 0; border-bottom: 1px solid var(--line); }
  .selected-card .body, .selected-card.headline .body { grid-template-columns: 1fr; }
  .selected-card .body section.span-2,
  .selected-card.headline .body section.span-2 { grid-column: span 1; }
  .stage-headline-hero { grid-template-columns: 1fr; }
  .sim-body { grid-template-columns: 1fr; min-height: 0; }
  .sim-side { border-right: 0; border-bottom: 1px solid var(--line); }
  .sim-section .pc-svg { min-height: 480px; }
}

/* Tablet + small laptop: collapse nav to hamburger, simplify timeline. */
@media (max-width: 900px) {
  .nav-burger { display: inline-flex; }
  .nav-right {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 14px var(--pad-x) 18px;
    background: rgba(6, 9, 15, 0.96);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5);
  }
  .nav.open .nav-right { display: flex; }
  .nav-link {
    padding: 14px 12px;
    border-bottom: 1px solid var(--line);
    color: var(--fg);
    font-size: 12px;
    letter-spacing: 0.18em;
  }
  .nav-link:last-of-type { border-bottom: 0; }
  .lang-dd { margin: 12px 0 0; align-self: flex-start; }
  .nav { position: sticky; }

  /* Activities cards always go single column when expanded — already 1 / -1.
     Other grid stacks. */
  .activity-grid { grid-template-columns: 1fr; }

  /* Final reflection two-column → single. */
  .final-grid { grid-template-columns: 1fr; }
  .final-card.span2 { grid-column: span 1; }

  /* Timeline: switch to vertical stacked layout — events laid out as a list,
     no more absolute positioning, no horizontal scroll. */
  .timeline-track {
    height: auto;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
  }
  .timeline-track .axis { display: none; }
  .timeline-event {
    position: static;
    width: 100%;
    text-align: left;
    display: grid;
    grid-template-columns: 24px 1fr;
    gap: 12px;
    align-items: start;
    padding: 12px 14px;
    background: var(--bg-2);
    border: 1px solid var(--line);
    border-radius: 4px;
  }
  .timeline-event.below, .timeline-event.above { top: auto; }
  .timeline-event .stem { display: none; }
  .timeline-event .dot { margin: 4px 0 0; }
  .timeline-event .label { margin-top: 0 !important; font-size: 11px; }
  .timeline-event .date { margin-top: 2px; }
  .timeline-event .desc { margin-top: 6px; font-size: 12px; }
  .timeline-year-label { margin-left: 0; }
  .timeline-scroll { padding: 12px 14px 22px; }

  /* X-Factor stacks on tablet too. */
  .xfactor-stage-v2 { grid-template-columns: 1fr; }
  .xfactor-logo-wrap { max-width: 320px; margin: 0 auto; }

  /* Simulator side panel scrolls naturally below the canvas now. */
  .sim-side { max-height: none; }
}

/* Phone: tighter paddings, smaller hero, single-column everywhere. */
@media (max-width: 720px) {
  :root { --pad-x: 18px; }
  .nav { padding: 12px 18px; gap: 10px; }
  .nav-mark { font-size: 10px; letter-spacing: 0.14em; }

  /* Section chrome: compact. */
  .section { padding: 60px var(--pad-x); }
  .section-head { margin-bottom: 28px; padding-bottom: 14px; }
  .section-title { font-size: clamp(28px, 8vw, 40px); }
  .section-sub { font-size: 14px; }

  /* Hero: shorter scroll-zoom (still works), smaller headline. */
  .hero-helmet { height: 180vh; min-height: 180vh; }
  .hero-headline { font-size: clamp(32px, 11vw, 64px); }
  .hero-sub { font-size: 14px; margin-top: 18px; }
  .hero-cta-row { gap: 10px; margin-top: 24px; }
  .btn { padding: 12px 16px; font-size: 11px; }

  /* Profile / radar: simpler. */
  .profile-card, .skills-stack { padding: 20px; }
  .profile-name { font-size: 24px; }
  .skill-row { grid-template-columns: 90px 1fr 40px; gap: 8px; font-size: 11px; }
  .radar-wrap svg { width: 220px; height: 220px; }

  /* Simulator: stage takes full width, smaller canvas. */
  .sim-headerbar { padding: 10px 14px; font-size: 10px; }
  .sim-body { grid-template-columns: 1fr; min-height: 0; }
  .sim-side { padding: 14px; }
  .sim-section .pc-svg { min-height: 320px; }
  .pc-controls { padding: 10px 12px; gap: 8px; }
  .pc-btn { padding: 6px 10px; font-size: 10px; }
  .sim-median-banner { padding: 18px 12px 22px; }
  .sim-median-banner .val { font-size: clamp(48px, 16vw, 72px); }

  /* Activities: smaller padding, simpler cards. */
  .activity-card { padding: 16px; }
  .activity-card h4 { font-size: 16px; }
  .activity-card .meta-row { grid-template-columns: 70px 1fr; }

  /* Selected highlights: stack everything, tighter. */
  .selected-card .meta, .selected-card .body { padding: 20px; }
  .selected-card .meta h3 { font-size: 22px; }
  .stage-headline-hero { padding: 24px 20px 0; gap: 18px; }
  .stage-headline-hero h3 { font-size: clamp(26px, 7vw, 36px); }
  .stage-headline-desc { font-size: 14px; }
  .stage-headline-hero .map { padding: 14px; min-height: 180px; }

  /* Final cards: compact. */
  .final-card { padding: 18px; }
  .final-card p { font-size: 13px; }
  .final-card .future-text { font-size: 15px; }

  /* X-Factor: compact. */
  .xfactor-card { padding: 22px 18px; }
  .xfactor-head h3 { font-size: 22px; }

  /* Contact: still readable, smaller hero text. */
  .contact-frame h2 { font-size: clamp(28px, 9vw, 44px); }
  .contact-frame .sub { font-size: 13px; }

  /* Footer columns on top of each other. */
  .footer { gap: 8px; flex-direction: column; align-items: flex-start; }
}

/* Very small phones (iPhone SE etc.) */
@media (max-width: 380px) {
  .nav-mark { font-size: 9px; }
  .hero-headline { font-size: clamp(26px, 12vw, 44px); }
  .section-title { font-size: clamp(22px, 9vw, 32px); }
  .sim-section .pc-svg { min-height: 240px; }
}

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