@font-face {
  font-family: "NVIDIA Sans";
  src: url("../font/NVIDIASansVF_NALA_W_Wght.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  /* Dark frontier-lab theme — one restrained, NVIDIA-authentic green accent */
  --green: #84cc3f;          /* accent (var name kept; used site-wide) */
  --green-dim: #9bdd55;      /* brighter, for hovers */
  --green-deep: #6aa82f;
  --green-soft: rgba(132, 204, 63, 0.12);
  --lime: #a6dd66;
  --bg: #07090c;             /* near-black canvas */
  --bg-2: #0a0d12;
  --surface: #0e131b;        /* panels / cards */
  --surface-2: #131a24;
  --surface-tint: #0c1117;
  --text: #e9eef5;
  --muted: #8b96a6;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --max: 880px;
  --max-figure: 1500px;
  --nav-h: 56px;
  --section-pad: 6rem;
  --font: "Inter", "NVIDIA Sans", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", "SF Mono", ui-monospace, "Menlo", monospace;
  --font-display: "NVIDIA Sans", "Inter", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  background: var(--bg);
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 1rem);
  scrollbar-width: none;
  -ms-overflow-style: none;
  /* Stop iOS Safari from auto-enlarging text in landscape (keeps fonts as
     authored; still allows the user to pinch-zoom). */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

body {
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(circle at 12% -8%, rgba(132, 204, 63, 0.08), transparent 34rem),
    radial-gradient(circle at 88% 2%, rgba(80, 200, 255, 0.06), transparent 30rem),
    var(--bg);
  line-height: 1.65;
  font-size: 1rem;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--green); }

::selection { background: rgba(132, 204, 63, 0.28); color: #fff; }

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding-left: 2rem;
  padding-right: 2rem;
}

.container-wide {
  max-width: 1100px;
}

/* Nav */
.navbar {
  position: fixed;
  inset: 0 0 auto;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  max-width: 100%;
  z-index: 100;
  background: rgba(8, 10, 14, 0.72);
  backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, background 0.2s;
}

.navbar.scrolled { border-bottom-color: var(--line); background: rgba(8, 10, 14, 0.85); }

.nav-brand {
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  gap: 1.25rem;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}

.nav-link {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
}

.nav-cta {
  color: var(--green-dim);
  font-weight: 600;
  border: 1px solid rgba(132, 204, 63, 0.28);
  border-radius: 999px;
  padding: 0.32rem 0.7rem;
  background: rgba(132, 204, 63, 0.08);
}

.nav-team {
  font-size: 0.8rem;
  color: var(--muted);
  margin-left: 0.75rem;
  flex-shrink: 0;
  white-space: nowrap;
}

/* Sections */
.section {
  padding: var(--section-pad) 0;
}

.section-alt {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(132, 204, 63, 0.02));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-header {
  text-align: left;
  margin: 0 0 3.25rem;
  padding-left: 1.25rem;
  border-left: 4px solid var(--green);
}

.section-header h2 {
  font-size: clamp(1.9rem, 3vw, 2.35rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.12;
  margin-bottom: 0.75rem;
}

.section-header p {
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.6;
}

/* 1. Intro */
.intro-block {
  text-align: center;
  max-width: 64rem;
  margin: 0 auto;
}


.page-title {
  font-size: clamp(2.15rem, 4.6vw, 3.55rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.08;
  margin-bottom: 0.9rem;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .page-title {
    white-space: normal;
    font-size: clamp(1.7rem, 7vw, 2.4rem);
  }
}

.page-title .accent {
  color: transparent;
  background: linear-gradient(135deg, #6aa82f, #84cc3f 58%, #c2e890);
  -webkit-background-clip: text;
  background-clip: text;
}

.page-authors {
  display: grid;
  gap: 0.55rem;
  font-size: 0.98rem;
  color: var(--muted);
  line-height: 1.55;
  margin: 0 auto 1.6rem;
  max-width: 62rem;
}

.author-line {
  display: block;
  color: #d4dbe6;
  font-weight: 500;
  margin: 0;
}

/* a bit more breathing room before the affiliations block */
.affiliation-line { margin-top: 0.5rem; }

.page-authors sup {
  color: var(--green-dim);
  font-size: 0.68em;
  font-weight: 700;
  line-height: 0;
}

.author-sep {
  color: #9aa8bb;
  padding: 0 0.2rem;
}

.affiliation-line,
.author-note-line {
  display: block;
  font-size: 0.9rem;
  color: var(--muted);
}

.author-note-line {
  font-size: 0.86rem;
}

.intro-text {
  font-size: 1.08rem;
  color: #c4cdd9;
  line-height: 1.8;
  text-align: left;
  max-width: 48rem;
  margin: 0 auto 2.1rem;
  padding: 1.4rem 1.6rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(6px);
}

.intro-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  margin-bottom: 2.25rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  padding: 0.7rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 999px;
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.btn-primary {
  background: linear-gradient(135deg, #84cc3f, #b6e07a);
  color: #0a1400;
  border: 1px solid var(--green);
  box-shadow: 0 8px 30px rgba(132, 204, 63, 0.2);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #9bdd55, #e4ff9a);
  border-color: var(--green);
  color: #0a1400;
  box-shadow: 0 12px 38px rgba(132, 204, 63, 0.38);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line-strong);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: var(--green);
  color: var(--green);
  background: rgba(132, 204, 63, 0.08);
}

/* Figure 1 */
.figure-block {
  margin: 0;
}

.section-alt#method .container {
  max-width: 1100px;
}

.section-alt#method .section-header {
  margin-bottom: 1.25rem;
}

.section-alt#method .figure-full {
  width: 100%;
  max-width: none;
  margin: 0;
}

.figure-full img {
  display: block;
  width: 100%;
  max-width: none;
  height: auto;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #ffffff;
  padding: 1.25rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

/* Charts */
.chart-block {
  margin-bottom: 4.5rem;
}

.chart-block:last-child {
  margin-bottom: 0;
}

.chart-header {
  margin-bottom: 1rem;
  padding-left: 0.9rem;
  border-left: 2px solid rgba(90, 143, 0, 0.3);
}

.chart-header h3 {
  font-size: 1.18rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.35rem;
}

.chart-header p {
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.55;
}

.panel-label {
  font-size: 0.92rem;
  color: var(--muted);
  font-weight: 500;
  line-height: 1.5;
  margin-top: 0;
}

.panel-label em {
  font-style: italic;
}

.chart-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 1.25rem 1.25rem 0.75rem;
  min-height: 240px;
  overflow-x: auto;
  box-shadow: 0 18px 45px rgba(20, 24, 14, 0.06);
}

.section-alt .chart-panel {
  background: rgba(255, 255, 255, 0.025);
}

.chart-panel svg {
  display: block;
  max-width: 100%;
  height: auto;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  margin-top: 1rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.chart-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

/* Keep the label (incl. any <sub>) as one inline run so subscripts render
   normally instead of being treated as separate flex items. */
.chart-legend-text {
  white-space: nowrap;
}

.legend sub,
.panel-label sub {
  font-size: 0.72em;
  line-height: 0;
  position: relative;
  bottom: -0.22em;
  vertical-align: baseline;
}

.chart-legend-swatch {
  width: 11px;
  height: 11px;
  border-radius: 2px;
}

.chart-legend-line {
  width: 18px;
  height: 3px;
  border-radius: 2px;
}

.chart-legend-dash {
  width: 18px;
  height: 0;
  border-top: 2px dashed currentColor;
  opacity: 0.85;
}

.chart-tooltip-floating {
  position: fixed;
  z-index: 200;
  background: #111;
  color: #fff;
  padding: 0.55rem 0.85rem;
  border-radius: 6px;
  font-size: 0.8rem;
  border-left: 3px solid var(--green);
  pointer-events: none;
  max-width: 240px;
}

.chart-tooltip-floating strong { color: var(--green); }

/* Videos */
video { display: block; }

/* ── Scroll progress bar ── */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--green-dim), var(--green), var(--lime));
  z-index: 200;
  transition: width 0.05s linear;
}

.subsection-sub {
  font-size: 0.95rem;
  color: var(--muted);
  margin: 0 0 1.5rem;
}

.ba-tag {
  position: absolute;
  top: 0.7rem;
  z-index: 2;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1;
  text-transform: uppercase;
  padding: 0.18rem 0.38rem;
  border-radius: 4px;
  color: #fff;
  pointer-events: none;
}

.ba-tag-fail { left: 0.7rem; background: rgba(198, 52, 42, 0.9); }
.ba-tag-pass { right: 0.7rem; background: rgba(90, 143, 0, 0.92); }

/* ── Scroll reveal ── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

.footer {
  padding: 2.5rem 0;
  text-align: center;
  font-size: 1rem;
  color: var(--muted);
  background: linear-gradient(180deg, transparent, rgba(132, 204, 63, 0.03));
  border-top: 1px solid var(--line);
}

.footer a {
  color: var(--green);
  font-weight: 500;
}

@media (max-width: 900px) {
  .nav-team { display: none; }

  :root { --section-pad: 3.5rem; }

  .section-header {
    margin-bottom: 2.5rem;
  }

}

@media (max-width: 640px) {
  .container { padding-left: 1.25rem; padding-right: 1.25rem; }

  .nav-links { gap: 0.75rem; }

  .nav-link { font-size: 0.75rem; }

  .intro-text { font-size: 1rem; }

  .section-header {
    padding-left: 0.9rem;
  }
}

/* ============================================================
   REVAMP — fullscreen cinematic hero + live "Claude Code" overlay
   ============================================================ */

/* Navbar transparent while over the hero video, solid once scrolled */
.navbar-over:not(.scrolled) {
  background: linear-gradient(180deg, rgba(8, 10, 6, 0.55), rgba(8, 10, 6, 0));
  backdrop-filter: none;
  border-bottom-color: transparent;
}
.navbar-over:not(.scrolled) .nav-brand,
.navbar-over:not(.scrolled) .nav-link,
.navbar-over:not(.scrolled) .nav-team { color: rgba(255, 255, 255, 0.9); }
.navbar-over:not(.scrolled) .nav-link:hover { color: #fff; }
.navbar-over:not(.scrolled) .nav-cta {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.1);
}
.navbar-over:not(.scrolled) .nav-cta:hover { background: rgba(132, 204, 63, 0.5); border-color: var(--green); }

.hero {
  position: relative;
  height: 100svh;
  min-height: 600px;
  width: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  isolation: isolate;
}

/* ── Full-screen cover video hero ── */
.hero-cover { background: #05070a; }
.cover-video {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #05070a;
}
/* Soft scrim at the bottom so the scroll cue stays legible */
.hero-cover::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 22%;
  z-index: 1;
  background: linear-gradient(180deg, transparent, rgba(5, 7, 10, 0.55));
  pointer-events: none;
}
.hero-cover .hero-scroll {
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
}

/* ── Grid-wall section: skill grid + left wordmark + right live-edit code ──
   Section 2, below the cover video. The wall-video is the looping skill grid;
   the wordmark sits left, the live-edit code stream (driven by grid.js) sits
   right, so the two never collide. Only .gh-content is in-flow, so the flex
   container centres it vertically while margin pushes it left. */
.grid-hero { justify-content: flex-start; background: #05070a; }

/* Vignette below the code/text — it only dims the busy grid behind them */
.grid-hero .wall-vignette { z-index: 1; }

.grid-hero .gh-content {
  position: relative;
  z-index: 3;
  margin-left: clamp(1.5rem, 6vw, 6rem);
  max-width: none;
  text-align: left;
}
/* Soft feathered blur + dark blob behind the type so it reads over the busy
   grid — matches the cover video, where the grid is blurred & dimmed behind the
   title and stays sharp toward the right edge. */
.grid-hero .gh-content::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -16% -32% -16% -50%;
  background: radial-gradient(60% 62% at 34% 48%, rgba(6, 9, 13, 0.68) 0%, rgba(6, 9, 13, 0.44) 46%, rgba(6, 9, 13, 0.16) 72%, transparent 90%);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  -webkit-mask-image: radial-gradient(74% 72% at 34% 48%, #000 0%, #000 30%, rgba(0, 0, 0, 0.5) 58%, transparent 86%);
  mask-image: radial-gradient(74% 72% at 34% 48%, #000 0%, #000 30%, rgba(0, 0, 0, 0.5) 58%, transparent 86%);
  pointer-events: none;
}

.grid-hero .gh-title {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  color: #fff;
  /* NVIDIA Sans to match the video wordmark (not the site's serif --font-display) */
  font-family: "NVIDIA Sans", "Inter", system-ui, sans-serif;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.04em;
  font-size: clamp(3.4rem, 11vw, 9.5rem);
  text-shadow: 0 3px 28px rgba(0, 0, 0, 0.6);
}
.grid-hero .gh-title .gh-line { display: block; white-space: nowrap; }
.grid-hero .gh-title .gh-line-accent {
  color: var(--green-dim);
  font-family: var(--font-mono);
  font-weight: 700;
  letter-spacing: -0.03em;
  font-size: 1.4em;   /* the green /Skills reads much larger, like the cover video */
}

.grid-hero .gh-tagline {
  margin: 1.6rem 0 0;
  text-align: left;
  font-size: clamp(1.7rem, 4vw, 3.1rem);
  font-weight: 500;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.6);
}
.grid-hero .gh-num { color: var(--green-dim); font-weight: 600; }

/* Live-edit code stream pinned to the right, fading toward the wordmark.
   Scoped under .grid-hero so it beats the later base `.hero-code { inset:0 }`. */
.grid-hero .grid-code {
  z-index: 2;
  left: auto;
  right: 0;
  width: 38%;
  opacity: 0.6;
  padding-top: calc(var(--nav-h) + 1.4rem);
  padding-left: 1.5rem;
  padding-right: clamp(1.25rem, 4vw, 4rem);
  -webkit-mask-image:
    linear-gradient(90deg, transparent 0%, #000 40%, #000 100%),
    linear-gradient(180deg, transparent 0%, #000 9%, #000 86%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(90deg, transparent 0%, #000 40%, #000 100%),
    linear-gradient(180deg, transparent 0%, #000 9%, #000 86%, transparent 100%);
  mask-composite: intersect;
}

@media (max-width: 860px) {
  .grid-hero { justify-content: center; }
  .grid-hero .grid-code { display: none; }
  .grid-hero .gh-content {
    margin-left: 0;
    max-width: 90vw;
    text-align: center;
  }
  .grid-hero .gh-title { align-items: center; }
  .grid-hero .gh-tagline { text-align: center; }
  .grid-hero .gh-content::before { inset: -14% -10%; background: radial-gradient(60% 60% at 50% 50%, rgba(6, 9, 13, 0.66), transparent 78%); }
}

/* ── Centered hero copy ── */
.hero-content {
  position: relative;
  z-index: 3;
  text-align: center;
  padding: 0 1.5rem;
  max-width: 50rem;
  animation: hero-rise 1s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes hero-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

.hero-title {
  font-size: clamp(4rem, 12vw, 8.5rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.95;
  color: transparent;
  background: linear-gradient(180deg, #ffffff 8%, #eef6dc 48%, #84cc3f 130%);
  -webkit-background-clip: text;
  background-clip: text;
  text-shadow: 0 8px 60px rgba(132, 204, 63, 0.25);
  filter: drop-shadow(0 2px 30px rgba(0, 0, 0, 0.35));
}

.hero-tagline {
  margin: 1rem auto 0;
  font-size: clamp(1.05rem, 2.4vw, 1.6rem);
  font-weight: 400;
  letter-spacing: 0.01em;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
}

.hero-actions {
  display: flex;
  gap: 0.85rem;
  justify-content: center;
  margin-top: 2.1rem;
}

.btn-glass {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
  backdrop-filter: blur(8px);
}
.btn-glass:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: #fff;
  color: #fff;
}

/* ── Scroll cue ── */
.hero-scroll {
  position: absolute;
  z-index: 3;
  bottom: 1.6rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255, 255, 255, 0.75);
}
.hero-scroll:hover { color: #fff; }
.hero-scroll-label {
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.hero-scroll-chev {
  width: 11px; height: 11px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  animation: scroll-bounce 1.8s ease-in-out infinite;
}
@keyframes scroll-bounce {
  0%, 100% { transform: rotate(45deg) translate(0, 0); opacity: 0.5; }
  50% { transform: rotate(45deg) translate(3px, 3px); opacity: 1; }
}

/* ============================================================
   Live "Claude Code" editor overlay
   ============================================================ */
.code-overlay {
  position: absolute;
  z-index: 2;
  top: 50%;
  right: clamp(1.5rem, 6vw, 6rem);
  transform: translateY(-50%);
  width: min(430px, 38vw);
  animation: code-float-in 1.1s cubic-bezier(0.16, 1, 0.3, 1) 0.25s both;
}

@keyframes code-float-in { from { opacity: 0; transform: translateY(-50%) translateX(26px) scale(0.97); } to { opacity: 1; transform: translateY(-50%) translateX(0) scale(1); } }

.code-window {
  border-radius: 14px;
  overflow: hidden;
  background: rgba(15, 19, 13, 0.82);
  backdrop-filter: blur(18px) saturate(1.1);
  border: 1px solid rgba(164, 210, 51, 0.22);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  font-family: "SF Mono", "JetBrains Mono", ui-monospace, "Menlo", monospace;
}

.cw-bar {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.6rem 0.85rem;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.cw-dots { display: inline-flex; gap: 0.4rem; }
.cw-dots i { width: 11px; height: 11px; border-radius: 50%; display: block; }
.cw-dots i:nth-child(1) { background: #ff5f57; }
.cw-dots i:nth-child(2) { background: #febc2e; }
.cw-dots i:nth-child(3) { background: #28c840; }
.cw-file {
  font-size: 0.74rem;
  font-weight: 500;
  color: #cdd6c4;
  margin-right: auto;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cw-file-path { color: #74815f; }
.cw-agent {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--lime);
  background: rgba(132, 204, 63, 0.12);
  border: 1px solid rgba(132, 204, 63, 0.3);
  padding: 0.18rem 0.5rem 0.18rem 0.42rem;
  border-radius: 999px;
  white-space: nowrap;
}
.cw-body {
  padding: 0.75rem 0.4rem 0.85rem 0;
  max-height: 46vh;
  overflow: hidden;
}
.cw-code {
  margin: 0;
  font-size: clamp(0.66rem, 0.95vw, 0.8rem);
  line-height: 1.62;
  white-space: pre;
  counter-reset: ln;
}
.cw-line {
  display: block;
  position: relative;
  padding: 0 0.9rem 0 2.6rem;
  min-height: 1.62em;
  border-left: 2px solid transparent;
}
.cw-line::before {
  counter-increment: ln;
  content: counter(ln);
  position: absolute;
  left: 0;
  width: 2rem;
  text-align: right;
  color: #4d5944;
  font-size: 0.86em;
}

/* token palette — dark editor leaning green/gold to match the brand */
.t-c { color: #5f6f55; font-style: italic; }
.t-k { color: #76b900; font-weight: 600; }
.t-f { color: #cfe8ff; }
.t-n { color: #b6e562; }
.t-s { color: #b5e8a0; }

/* ── Responsive: keep title centred, gracefully shrink/relocate editor ── */
@media (max-width: 1024px) {
  .code-overlay {
    top: auto;
    bottom: 5.5rem;
    right: 50%;
    transform: translateX(50%);
    width: min(440px, 88vw);
    animation: none;
  }
}
@media (max-width: 560px) {
  .code-overlay { display: none; }
  .hero { height: 88svh; }
}

/* Overview section sits below the full-bleed hero */
.section-overview {
  padding-top: 5rem;
  background:
    radial-gradient(ellipse 70% 50% at 50% 0%, rgba(132, 204, 63, 0.07), transparent),
    var(--bg);
}
.section-overview .intro-block { text-align: center; }
.section-overview .page-title { white-space: normal; }

/* ============================================================
   HERO — the "wall of agents" grid
   ============================================================ */
.hero-wall { background: #05070a; }

/* Centre vignette so the wordmark always reads over busy tiles */
.wall-vignette {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(58% 56% at 50% 46%, rgba(5, 7, 10, 0.86) 0%, rgba(5, 7, 10, 0.62) 32%, rgba(5, 7, 10, 0.12) 64%, transparent 80%),
    linear-gradient(180deg, rgba(5, 7, 10, 0.7) 0%, transparent 18%, transparent 62%, rgba(5, 7, 10, 0.92) 100%);
}

/* ============================================================
   REALITY — full-bleed real-robot self-debug section
   ============================================================ */
.reality {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
  border-top: 1px solid var(--line);
}
.reality-bg { position: absolute; inset: 0; z-index: 0; }
.reality-video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  background: #05070a;
}
.reality-scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(5, 7, 10, 0.9) 0%, rgba(5, 7, 10, 0.72) 26%, rgba(5, 7, 10, 0.3) 50%, rgba(5, 7, 10, 0.05) 72%, rgba(5, 7, 10, 0.12) 100%),
    linear-gradient(180deg, rgba(5, 7, 10, 0.25), transparent 22%, transparent 78%, rgba(5, 7, 10, 0.28));
}
.reality-copy {
  position: relative;
  z-index: 3;
  max-width: 34rem;
  margin-left: clamp(1.5rem, 7vw, 7rem);
  padding: 2rem 0;
}
.reality-title {
  font-size: clamp(2rem, 4.2vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.08;
  color: #fff;
  margin-bottom: 1.1rem;
}
.reality-title em {
  font-style: normal;
  color: transparent;
  background: linear-gradient(120deg, #84cc3f, #c2e890);
  -webkit-background-clip: text; background-clip: text;
}
.reality-text {
  font-size: 1.08rem;
  line-height: 1.7;
  color: #c4cdd9;
}

/* Re-pin the shared code overlay inside the reality section (right side) */
.code-overlay-reality {
  position: absolute;
  z-index: 4;
  top: 50%;
  right: clamp(1.5rem, 6vw, 6rem);
  transform: translateY(-50%);
  width: min(440px, 40vw);
  animation: code-float-in 1s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@media (max-width: 1024px) {
  .code-overlay-reality {
    position: relative;
    top: auto; right: auto; transform: none;
    width: min(440px, 92vw);
    margin: 2rem auto 0;
    animation: none;
  }
  .reality { flex-direction: column; justify-content: center; padding: 6rem 1.25rem; }
  .reality-copy { margin: 0 auto; text-align: center; max-width: 36rem; }
}

/* ============================================================
   PIPELINE — the formal explainer player
   ============================================================ */
.pipeline-player { margin: 0 auto; max-width: 940px; }
.pp-frame {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: #0a0d12;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  aspect-ratio: 16 / 9;
}
.pp-frame video {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  background: #fff;
}
/* In native fullscreen the screen rarely matches the 16:9 video, so `cover`
   would zoom in and clip the edges — show the whole frame instead. */
.pp-frame video:fullscreen { object-fit: contain; background: #000; }
.pp-frame video:-webkit-full-screen { object-fit: contain; background: #000; }
/* ============================================================
   HERO v2 — full-screen live code layer over a dimmed wall
   ============================================================ */
/* Layer order: wall(0) → code(1) → vignette(2) → grain → content(3) */
.wall-vignette { z-index: 2; }

/* The full-screen editor stream */
.hero-code {
  position: absolute;
  inset: 0;
  z-index: 1;
  margin: 0;
  padding: calc(var(--nav-h) + 1.4rem) 2vw 3rem clamp(1.25rem, 4.5vw, 4.5rem);
  font-family: var(--font-mono);
  font-size: clamp(0.68rem, 1.02vw, 0.9rem);
  line-height: 1.72;
  white-space: pre;
  overflow: hidden;
  color: rgba(168, 214, 162, 0.5);
  text-shadow: 0 0 18px rgba(0, 0, 0, 0.55);
  /* feather the edges so it reads as ambient, not a hard panel */
  -webkit-mask-image:
    linear-gradient(90deg, #000 0%, #000 52%, transparent 92%),
    linear-gradient(180deg, transparent 0%, #000 9%, #000 86%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(90deg, #000 0%, #000 52%, transparent 92%),
    linear-gradient(180deg, transparent 0%, #000 9%, #000 86%, transparent 100%);
  mask-composite: intersect;
}
.hc-line {
  display: block;
  min-height: 1.72em;
  border-left: 2px solid transparent;
  padding-left: 0.6rem;
  margin-left: -0.6rem;
  transition: background 0.25s, border-color 0.25s;
  overflow: hidden;
}
.hc-scroll { will-change: transform; }
.hl-k { color: rgba(132, 204, 63, 0.78); }
.hl-c { color: rgba(150, 166, 142, 0.58); font-style: italic; }
.hl-s { color: rgba(190, 238, 164, 0.74); }
.hl-n { color: rgba(214, 255, 158, 0.86); }
.hl-d { color: rgba(132, 208, 255, 0.7); }

/* Active edit lines glow — that's where the eye goes */
.hc-line.hc-add {
  border-left-color: var(--green);
  background: rgba(132, 204, 63, 0.13);
  color: rgba(214, 255, 158, 0.96);
  text-shadow: 0 0 16px rgba(132, 204, 63, 0.5);
}
.hc-line.hc-add .hl-k,
.hc-line.hc-add .hl-n,
.hc-line.hc-add .hl-s { color: #e8ffce; }
.hc-line.hc-del {
  border-left-color: #ff5f57;
  background: rgba(255, 95, 87, 0.16);
  color: rgba(255, 150, 142, 0.92);
  text-decoration: line-through;
  text-decoration-color: rgba(255, 95, 87, 0.7);
}
.hc-line.hc-del * { color: rgba(255, 150, 142, 0.92) !important; }

@media (prefers-reduced-motion: reduce) {
  .hero-code { color: rgba(150, 196, 150, 0.28); }
}
@media (max-width: 560px) {
  .hero-code { font-size: 0.62rem; padding-left: 1rem; }
}

/* ============================================================
   CINEMATIC PASS — display type + editorial "lab readout" layout
   ============================================================ */
.hero-title,
.reality-title,
.page-title,
.section-header h2,
.nav-brand,
.chart-header h3 { font-family: var(--font-display); }

/* Big, tracked, technical section headers with an index rule */
.section-header {
  border-left: none;
  padding-left: 0;
  position: relative;
  margin-bottom: 3rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--line);
}
.section-header h2 {
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.02;
  margin-top: 0.7rem;
  margin-bottom: 1rem;
}
.section-header p {
  font-size: 1.12rem;
  max-width: 52rem;
  color: #aab4c2;
}
/* Subsection + chart titles */
.subsection-sub { font-size: 1rem; color: #98a3b2; }
.chart-header h3 {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.025em;
}
.chart-header { border-left: none; padding-left: 0; }
.chart-header h3::before {
  content: "";
  display: inline-block;
  width: 10px; height: 10px;
  margin-right: 0.6rem;
  border-radius: 2px;
  background: var(--green);
  box-shadow: 0 0 12px rgba(132, 204, 63, 0.6);
  vertical-align: middle;
}

/* Hero + reality titles get the display face with tighter tracking */
.hero-title { font-weight: 600; letter-spacing: -0.05em; }
.reality-title { font-weight: 600; }
.page-title { font-weight: 600; }
.section-header h2 { text-wrap: balance; }

/* Panels: sharper, thinner, with a faint top highlight + glow */
.chart-panel {
  border-radius: 14px;
  border-color: var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,0.025), rgba(255,255,255,0.008));
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255,255,255,0.05);
  position: relative;
}

/* More breathing room between major sections */
:root { --section-pad: 7rem; }

/* Subtle full-width hairline glow under the nav when over content */
.navbar.scrolled { box-shadow: 0 1px 0 rgba(132, 204, 63, 0.08); }

/* ── Mobile nav: drop the section anchors, keep brand + Paper/Code ── */
@media (max-width: 820px) {
  .nav-links { gap: 0.85rem; }
  .nav-link:not([data-link]) { display: none; }
}
@media (max-width: 420px) {
  .hero-title { font-size: clamp(3.2rem, 22vw, 5rem); }
  .hero-actions { flex-direction: column; width: 100%; max-width: 16rem; margin-left: auto; margin-right: auto; }
  .hero-actions .btn { justify-content: center; }
}

/* ============================================================
   TYPE WEIGHTS (Archivo) + powerful ASPIRE wordmark
   ============================================================ */
.section-header h2 { font-weight: 700; letter-spacing: -0.03em; }
.reality-title { font-weight: 700; }
.page-title { font-weight: 700; }
.chart-header h3 { font-weight: 700; }

/* Hero wordmark: all-caps, heavy, commanding */
.hero-title {
  text-transform: uppercase;
  font-weight: 900;
  letter-spacing: -0.015em;
  font-size: clamp(4.5rem, 14vw, 10rem);
  line-height: 0.9;
}
@media (max-width: 420px) {
  .hero-title { font-size: clamp(3.4rem, 24vw, 5.5rem); }
}

/* ============================================================
   INTRO REVEAL — ASPIRE first, then the wall fades up from black
   ============================================================ */
@keyframes intro-word {
  0%   { opacity: 0; transform: translateY(10px) scale(0.985); filter: blur(6px); }
  100% { opacity: 1; transform: none; filter: blur(0); }
}
@keyframes intro-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes intro-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* hero starts as pure darkness */
.hero-wall { background: #05070a; }

/* background layers fade in AFTER the wordmark */
.hero-wall .hero-code,
.hero-wall .wall-vignette {
  opacity: 0;
  animation: intro-fade 1.6s ease 1.15s forwards;
}
.hero-wall .hero-code { animation-delay: 1.5s; }

/* the wordmark leads */
.hero-wall .hero-content { animation: none; }
.hero-wall .hero-title {
  opacity: 0;
  animation: intro-word 1.1s cubic-bezier(0.16, 1, 0.3, 1) 0.35s forwards;
}
.hero-wall .hero-tagline {
  opacity: 0;
  animation: intro-rise 0.9s cubic-bezier(0.16, 1, 0.3, 1) 1.9s forwards;
}
.hero-wall .hero-actions {
  opacity: 0;
  animation: intro-rise 0.9s cubic-bezier(0.16, 1, 0.3, 1) 2.15s forwards;
}
.hero-wall .hero-scroll {
  opacity: 0;
  animation: intro-fade 1s ease 2.6s forwards;
}

@media (prefers-reduced-motion: reduce) {
  .hero-wall .hero-code,
  .hero-wall .wall-vignette,
  .hero-wall .hero-title,
  .hero-wall .hero-tagline,
  .hero-wall .hero-actions,
  .hero-wall .hero-scroll { opacity: 1; animation: none; }
}

/* ── Footer (cinematic) ── */
.footer { padding: 3.5rem 0 2.5rem; }
.footer-inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}
.footer-brand { display: flex; flex-direction: column; gap: 0.35rem; }
.footer-mark {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.8rem;
  letter-spacing: -0.01em;
  color: transparent;
  background: linear-gradient(180deg, #eef6dc, #84cc3f 160%);
  -webkit-background-clip: text; background-clip: text;
}
.footer-tag { font-size: 0.9rem; color: var(--muted); }
.footer-links { display: flex; gap: 1.6rem; }
.footer-links a {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  color: #c4cdd9;
}
.footer-links a:hover { color: var(--green); }
.footer-affil {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: #7a8494;
  text-align: left;
}
@media (max-width: 560px) {
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 1.2rem; }
}

/* ============================================================
   FRONTIER-LAB REFINEMENT — restraint over neon (v15)
   Display = NVIDIA Sans. Lighter wordmark, fewer glows, sparing accent.
   ============================================================ */

/* A slightly calmer accent for large areas; keep crisp green for thin marks */
:root {
  --accent: #84cc3f;          /* a touch deeper than the electric lime */
  --accent-bright: #84cc3f;
}

/* ASPIRE wordmark — thinner, smaller, airy, refined (not bombastic) */
.hero-title {
  font-family: var(--font-display);
  text-transform: uppercase;
  font-weight: 400;
  font-size: clamp(3rem, 8vw, 6.4rem);
  letter-spacing: 0.06em;
  line-height: 1;
  /* clean light wordmark with the faintest warm-green undertone */
  color: #eef3ea;
  background: none;
  -webkit-text-fill-color: #eef3ea;
  text-shadow: 0 2px 40px rgba(0, 0, 0, 0.5);
  filter: none;
}
@media (max-width: 420px) {
  .hero-title { font-size: clamp(2.6rem, 16vw, 4rem); letter-spacing: 0.05em; }
}
.hero-tagline {
  font-weight: 400;
  letter-spacing: 0.005em;
  color: rgba(238, 243, 234, 0.86);
}

/* Headings: NVIDIA Sans, medium weight — clean, not chunky */
.section-header h2 { font-weight: 500; letter-spacing: -0.015em; font-size: clamp(2rem, 3.6vw, 2.9rem); }
.reality-title { font-weight: 500; letter-spacing: -0.012em; }
.page-title { font-weight: 500; letter-spacing: -0.015em; }
.chart-header h3 { font-weight: 600; }

/* Kill the glowing bullet on chart titles → a small flat square */
.chart-header h3::before { box-shadow: none; background: var(--accent); width: 8px; height: 8px; border-radius: 1px; }

/* Buttons: flatter, less glow */
.btn-primary {
  background: var(--accent-bright);
  color: #0a1400;
  border: 1px solid var(--accent-bright);
  box-shadow: none;
}
.btn-primary:hover { background: #9bdd55; box-shadow: 0 6px 24px rgba(132, 204, 63, 0.22); }
.btn-glass { backdrop-filter: blur(8px); }

/* Reality editor + code window: calmer borders, less neon glow */
.code-window { border-color: rgba(255, 255, 255, 0.12); box-shadow: 0 30px 80px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.05); }
.cw-agent { color: #cdd6c4; background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.12); }

/* Scroll progress + nav cta: subtle */
.nav-cta { border-color: rgba(132, 204, 63, 0.4); background: rgba(132, 204, 63, 0.08); color: #b6e07a; }
.navbar.scrolled { box-shadow: none; }

/* Hero code: function-call color + refined editor palette (calmer) */
.hl-f { color: rgba(150, 200, 245, 0.66); }
.hl-k { color: rgba(150, 220, 130, 0.7); }
.hl-c { color: rgba(150, 162, 142, 0.5); font-style: italic; }
.hl-s { color: rgba(200, 196, 150, 0.66); }
.hl-n { color: rgba(190, 210, 235, 0.7); }
.hl-d { color: rgba(132, 204, 63, 0.6); }
.section-overview { padding-top: 5.5rem; }
.section-overview .section-header { max-width: 60rem; }
.section-overview .section-header h2 { max-width: 22ch; }

/* ── Abstract: plain paper formatting, not a boxed card ── */
.abstract-block { text-align: left; max-width: 46rem; margin: 1.5rem auto 0; }

/* Full evo-forest cover video under the abstract (native controls: scrub + fullscreen) */
.overview-video {
  margin: 2.6rem auto 0;
  max-width: 100%;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 20px 50px rgba(20, 24, 14, 0.10);
  background: #05070a;
  line-height: 0;
}
.overview-video video { display: block; width: 100%; height: auto; }
.intro-text {
  background: none;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
  border-radius: 0;
  padding: 0;
  margin: 0 auto;
  color: #b9c2cf;
  font-size: 1rem;
  line-height: 1.75;
}

/* ============================================================
   CODE VIEWER POPUP — full real-robot demo with subtask tabs
   ============================================================ */
.cv { position: fixed; inset: 0; z-index: 1000; display: none; }
.cv.open { display: block; }
.cv-backdrop { position: absolute; inset: 0; background: rgba(4, 6, 9, 0.78); backdrop-filter: blur(8px); animation: cv-fade 0.18s ease; }
.cv-window {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  width: min(960px, 94vw);
  height: min(86vh, 900px);
  display: flex;
  flex-direction: column;
  background: #0b0e13;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.7);
  animation: cv-pop 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes cv-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes cv-pop { from { opacity: 0; transform: translate(-50%, -48%) scale(0.98); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }

.cv-bar {
  display: flex; align-items: center; gap: 0.7rem;
  padding: 0.7rem 0.9rem;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--line);
}
.cv-dots { display: inline-flex; gap: 0.4rem; }
.cv-dots i { width: 11px; height: 11px; border-radius: 50%; }
.cv-dots i:nth-child(1) { background: #ff5f57; }
.cv-dots i:nth-child(2) { background: #febc2e; }
.cv-dots i:nth-child(3) { background: #28c840; }
.cv-file {
  font-family: var(--font-mono); font-size: 0.8rem; color: #cdd6c4;
  margin-right: auto; letter-spacing: 0.01em;
}
.cv-close {
  font-family: var(--font-mono); font-size: 0.72rem; color: var(--muted);
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line);
  border-radius: 6px; padding: 0.2rem 0.55rem; cursor: pointer; transition: all 0.15s;
}
.cv-close:hover { color: #fff; border-color: var(--line-strong); }

.cv-tabs {
  display: flex; gap: 0.3rem; padding: 0.55rem 0.9rem;
  overflow-x: auto; border-bottom: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.25);
}
.cv-tab {
  flex: 0 0 auto;
  font-family: var(--font-mono); font-size: 0.74rem; font-weight: 500;
  color: var(--muted); background: transparent;
  border: 1px solid transparent; border-radius: 7px;
  padding: 0.32rem 0.7rem; cursor: pointer; white-space: nowrap; transition: all 0.15s;
}
.cv-tab:hover { color: #dfe6ee; background: rgba(255, 255, 255, 0.04); }
.cv-tab.active { color: #0a1400; background: var(--accent); border-color: var(--accent); }

.cv-body { flex: 1; overflow-y: auto; padding: 1rem 0 2rem; }
.cv-pre { margin: 0; }
.cv-code {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.65;
  counter-reset: cvln;
}
.cv-line {
  display: block; white-space: pre; position: relative;
  padding: 0 1.2rem 0 3.6rem;
}
.cv-line::before {
  counter-increment: cvln; content: counter(cvln);
  position: absolute; left: 0; width: 2.8rem; text-align: right;
  color: #3c4658; font-size: 0.92em;
}
.cv-line.cv-section {
  background: rgba(132, 204, 63, 0.06);
  border-left: 2px solid var(--accent);
  margin-left: -2px; color: var(--accent);
}
/* shared token palette (editor-grade) */
.cv-code .t-c { color: #6b7768; font-style: italic; }
.cv-code .t-k { color: #8fcf6a; }
.cv-code .t-s { color: #c8bf84; }
.cv-code .t-n { color: #aebfe0; }
.cv-code .t-f { color: #9cc9f0; }

/* ── Before/after PAIRS shown side-by-side ── */
.pair-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.45rem 1rem; }
@media (max-width: 980px) { .pair-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 680px) { .pair-grid { grid-template-columns: 1fr; } }
.ba-pair { margin: 0; }
.pair-videos {
  position: relative;
  display: grid; grid-template-columns: 1fr 1fr; gap: 2px;
  border-radius: 12px; overflow: hidden;
  border: 1px solid var(--line); background: #000;
}
.pair-clip { position: relative; overflow: hidden; background: #000; }
.pair-clip video { display: block; width: 100%; aspect-ratio: 5 / 4; object-fit: cover; }
.pair-clip .ba-tag { top: 0.35rem; left: 0.35rem; right: auto; text-transform: none; }
.ba-pair figcaption { margin-top: 0.7rem; font-size: 0.92rem; color: var(--muted); text-align: left; }
.ba-pair:hover .pair-videos { border-color: rgba(132, 204, 63, 0.3); }

/* ── Reality editor as a clickable real-code preview ── */
.cw-scroll { display: block; will-change: transform; }
.code-overlay-reality { cursor: pointer; }
.code-overlay-reality .code-window { transition: border-color 0.2s, box-shadow 0.2s; }
.code-overlay-reality:hover .code-window {
  border-color: rgba(132, 204, 63, 0.45);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.62), 0 0 0 1px rgba(132, 204, 63, 0.18);
}
.cw-agent { text-transform: none; }

/* ── Reality editor: hover eye overlay ── */
.code-overlay-reality .cw-body { position: relative; padding-left: 16px; }
#cw-lines { display: block; }
.cw-hover {
  position: absolute; inset: 0; z-index: 5;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.5rem;
  background: rgba(8, 11, 15, 0.62); backdrop-filter: blur(2px);
  color: #eef3ea; font-size: 0.92rem; font-weight: 500; letter-spacing: 0.01em;
  opacity: 0; transition: opacity 0.2s ease; cursor: pointer;
}
.code-overlay-reality .code-window:hover .cw-hover,
.cw-hover:focus-visible { opacity: 1; }
.cw-hover .eye { width: 28px; height: 28px; color: var(--accent); }

/* ============================================================
   Top navbar active state + frontier-lab content styling (v28)
   ============================================================ */
.nav-link.active { color: var(--text); }
.navbar-over:not(.scrolled) .nav-link.active { color: #fff; }

/* ── frontier-lab refinement of the content sections (not hero/reality) ── */
.section { padding: 5rem 0; }
.section-header {
  border-top: 1px solid var(--line); border-left: none;
  padding: 1.4rem 0 0; margin: 0 0 2.4rem;
}
.section-header h2 {
  font-family: var(--font-display); font-size: clamp(1.55rem, 2.3vw, 2.05rem);
  font-weight: 600; letter-spacing: -0.022em; line-height: 1.12;
  margin: 0.55rem 0 0.6rem;
}
.section-header p { font-size: 1rem; line-height: 1.6; color: #97a2b1; max-width: 46rem; }

.subsection-sub { font-size: 0.95rem; color: #8b95a4; }
.chart-header h3 { font-size: 1.18rem; font-weight: 600; letter-spacing: -0.01em; }
.chart-header h3::before { display: none; }      /* drop the playful green square */

/* squared, restrained buttons + panels */
.btn { border-radius: 7px; padding: 0.6rem 1.2rem; font-size: 0.88rem; font-weight: 500; }
.chart-panel, .pp-frame { border-radius: 10px; }
.figure-full img { border-radius: 10px; }

/* overview: smaller paper title, video under the abstract */
.section-overview .page-title { font-size: clamp(1.5rem, 2.8vw, 2.1rem); font-weight: 600; white-space: normal; }
.section-overview .pipeline-player { margin: 2.6rem auto 0; max-width: 48rem; }
.section-overview .pp-frame { border: 1px solid var(--line); }

/* ── Reality video player controls (draggable seek, play/pause, restart, speed) ── */
.reality-controls {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 7;
  display: flex; align-items: center; gap: 0.8rem;
  padding: 1rem clamp(1rem, 4vw, 2.5rem);
  background: linear-gradient(transparent, rgba(5, 7, 10, 0.82));
}
.rc-btn {
  flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 8px;
  background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.13);
  color: #eef3ea; cursor: pointer; transition: background 0.15s, border-color 0.15s;
}
.rc-btn:hover { background: rgba(255, 255, 255, 0.16); border-color: rgba(255, 255, 255, 0.26); }
.rc-btn svg { width: 18px; height: 18px; }
.rc-speed { width: auto; padding: 0 0.62rem; font-family: var(--font-mono); font-size: 0.78rem; font-weight: 500; }
.rc-track { flex: 1; position: relative; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, 0.2); cursor: pointer; }
.rc-fill { position: absolute; left: 0; top: 0; height: 100%; width: 0; background: var(--accent); border-radius: 3px; }
.rc-knob { position: absolute; top: 50%; left: 0; width: 13px; height: 13px; transform: translate(-50%, -50%); border-radius: 50%; background: var(--accent); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5); }
.rc-track:hover .rc-knob, .rc-knob:active { width: 15px; height: 15px; }
.rc-time { flex: 0 0 auto; font-family: var(--font-mono); font-size: 0.74rem; color: #d4dbe6; min-width: 2.5rem; }
@media (max-width: 1024px) {
  .reality-controls { padding: 0.8rem 1.25rem; }
}
.rc-speedlabel { flex: 0 0 auto; font-family: var(--font-mono); font-size: 0.78rem; font-weight: 500; color: #cdd6c4; letter-spacing: 0.02em; }
/* task-gallery prompts: a touch brighter for readability */
.ba-pair figcaption { color: #bcc6d2; }

/* ── Method: the three components (alternating video + paper text) ── */
.method-figure { margin-bottom: 3rem; }
.components { display: flex; flex-direction: column; gap: 3.5rem; }
.component { display: grid; grid-template-columns: 1.1fr 1fr; gap: 2.6rem; align-items: center; }
.component-rev .component-media { order: 2; }
.component-media {
  border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: #000;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
}
.component-media video { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #000; }
.method-video-expandable {
  position: relative;
  cursor: zoom-in;
}
.method-video-expandable::after {
  content: "⤢";
  position: absolute;
  right: 0.65rem;
  bottom: 0.65rem;
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(8, 10, 12, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.24);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.18s, transform 0.18s;
}
.method-video-expandable:hover::after,
.method-video-expandable:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}
.method-video-modal {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 4vw, 3rem);
  background: rgba(0, 0, 0, 0.92);
}
.method-video-modal.open { display: flex; }
.method-video-full {
  width: calc(100vw - 2rem);
  height: calc(100vh - 2rem);
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  background: #000;
}
.method-video-close {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 1;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(10, 12, 14, 0.72);
  color: #ffffff;
  font-size: 1.6rem;
  line-height: 1;
}
.method-video-close:hover,
.method-video-close:focus-visible {
  background: rgba(132, 204, 63, 0.9);
  color: #0a1400;
}
.component-text h3 { font-family: var(--font-display); font-size: 1.38rem; font-weight: 600; letter-spacing: -0.015em; margin: 0.55rem 0 0.7rem; }
.component-text h3:first-child { margin-top: 0; }
.component-text p { font-size: 1rem; line-height: 1.66; color: #aab4c2; }
@media (max-width: 820px) {
  .component { grid-template-columns: 1fr; gap: 1.1rem; }
  .component-rev .component-media { order: 0; }
}
/* ============================================================
   v35 — FRONTIER REFINEMENT
   Flatten surfaces, remove gradient-text / glows / glassmorphism,
   unify radii, widen whitespace. The HERO (wall + live code) and the
   REALITY (real-robot) sections are intentionally left untouched.
   ============================================================ */

:root {
  --r: 6px;            /* default radius — tight, serious */
  --r-md: 10px;        /* media frames / panels */
  /* warmer, calmer hairlines for a flatter editorial feel */
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
}

/* Flat canvas — drop the decorative radial washes behind content */
body {
  background: var(--bg);
}
.section-alt {
  background: var(--bg-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.section-overview {
  background: var(--bg);
}

/* Solid scroll indicator — no rainbow gradient */
.scroll-progress {
  background: var(--accent);
}

/* ── Typography: solid ink, no gradient fills, no glow ── */
.page-title .accent {
  background: none;
  -webkit-text-fill-color: currentColor;
  color: var(--text);
}
.footer-mark {
  background: none;
  -webkit-text-fill-color: currentColor;
  color: var(--text);
  font-weight: 700;
  letter-spacing: 0.01em;
}

/* ── Surfaces: flat fill + hairline, no colored glow, no glass ── */
.chart-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: none;
  backdrop-filter: none;
}
/* ── Media frames: light neutral elevation, not heavy black slabs ── */
.pp-frame {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.32);
}
.component-media {
  border-radius: var(--r-md);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.28);
}
.figure-full img {
  border-radius: var(--r-md);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.3);
}
.pair-videos { border-radius: var(--r-md); }

/* ── Buttons: quiet, rectangular; one solid accent action ── */
.btn {
  border-radius: var(--r);
  font-weight: 500;
  letter-spacing: 0.005em;
}
.btn-primary {
  background: var(--accent);
  border: 1px solid var(--accent);
  color: #0a1400;
  box-shadow: none;
}
.btn-primary:hover {
  background: var(--green-dim);
  border-color: var(--green-dim);
  box-shadow: none;
}
.btn-ghost {
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--text);
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: transparent;
}

/* Nav "Code" pill → a restrained squared chip */
.nav-cta {
  border-radius: var(--r);
  padding: 0.34rem 0.74rem;
}

/* ── Whitespace: a more generous, editorial section rhythm ── */
.section { padding: clamp(4.5rem, 9vw, 7.5rem) 0; }
.section-header { margin-bottom: 3rem; }
#method { padding-bottom: clamp(3.75rem, 6vw, 5rem); }
#gallery {
  padding-top: clamp(3.75rem, 6vw, 5rem);
  padding-bottom: clamp(2.75rem, 4.5vw, 4rem);
}
#skills {
  padding-top: clamp(3rem, 5vw, 4.5rem);
  padding-bottom: clamp(3rem, 5vw, 4.5rem);
}
#benchmarks { padding-top: clamp(3rem, 4.75vw, 4.25rem); }

@media (max-width: 720px) {
  .section { padding: 3.75rem 0; }
  #method { padding-bottom: 3rem; }
  #gallery { padding-top: 3rem; padding-bottom: 2.5rem; }
  #skills { padding-top: 2.75rem; padding-bottom: 2.75rem; }
  #benchmarks { padding-top: 2.75rem; }
}

/* ============================================================
   SERIF DISPLAY TRIAL — editorial serif headings (PI / Anthropic style)
   Toggle the --font-display line below to compare faces.
   ============================================================ */
:root { --font-display: "Newsreader", Georgia, "Times New Roman", serif; }

/* Keep the ASPIRE hero wordmark on the brand sans (it's the logotype) */
.hero-title { font-family: "NVIDIA Sans", "Inter", system-ui, sans-serif; }

/* Serif reads best with near-normal tracking + its display optical size */
.section-header h2, .page-title, .reality-title,
.component-text h3, .chart-header h3 {
  letter-spacing: -0.005em;
  font-optical-sizing: auto;
}

/* ── Benchmarks as a 2×2 grid ── */
.bench-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3rem 2rem;
  align-items: start;
}
.bench-grid .chart-block { margin-bottom: 0; }
@media (max-width: 860px) {
  .bench-grid { grid-template-columns: 1fr; gap: 2.5rem; }
}

/* Side-by-side cost plots: Output tokens | Total tokens */
.cost-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 1.75rem;
  align-items: start;
}
.cost-col-title {
  margin: 0 0 0.4rem;
  text-align: center;
  font-family: var(--font);
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--muted);
}
/* Held-out success plot stacked beneath the cost pair (no prose between) */
.transfer-success-row { margin-top: 1.6rem; }
@media (max-width: 720px) {
  .cost-pair { grid-template-columns: 1fr; gap: 1.75rem; }
}

/* Method intro is a full abstract — let it span the content width so it
   aligns with the full-width Figure 1 below instead of stopping short. */
#method .section-header p { max-width: none; }
#skills .section-header p { max-width: none; }

/* ── Brand icons inside hero buttons (Paper / GitHub) ── */
.btn { gap: 0.55rem; }
.btn-ico {
  width: 1.05em;
  height: 1.05em;
  flex-shrink: 0;
  display: block;
}

/* ── Benchmarks layout: scaling-law and LIBERO-PRO each span a full row;
   Robosuite + BEHAVIOR-1K share the last row ── */
.bench-grid > .chart-block:nth-child(1),
.bench-grid > .chart-block:nth-child(2) { grid-column: 1 / -1; }

/* Benchmarks summary spans the content width so it aligns with the full-width
   charts below instead of stopping short and looking mis-indented. */
#benchmarks .section-header p { max-width: none; }

/* ============================================================
   v45 — GitHub-gray action buttons + plain "GitHub" nav link
   ============================================================ */

/* Paper / GitHub action buttons in GitHub's neutral gray (hero + overview) */
.hero-actions .btn,
.intro-actions .btn {
  background: #272c34;
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #ffffff;
  box-shadow: none;
}
.hero-actions .btn:hover,
.intro-actions .btn:hover {
  background: #333a45;
  border-color: rgba(255, 255, 255, 0.38);
  color: #ffffff;
  box-shadow: none;
}

/* Top-bar "GitHub": drop the pill bubble, behave like a normal nav link */
.nav-cta {
  background: none;
  border: none;
  border-radius: 0;
  padding: 0;
  color: var(--muted);
  font-weight: 500;
}
.nav-cta:hover { color: var(--green); }
.navbar-over:not(.scrolled) .nav-cta {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.9);
}
.navbar-over:not(.scrolled) .nav-cta:hover { color: #fff; }

/* ── Persistent "view code" hint at the bottom of the real-robot overlay ── */
.cw-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.62rem 0.85rem;
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(132, 204, 63, 0.09);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  color: var(--green-dim);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.cw-cta:hover { background: rgba(132, 204, 63, 0.18); color: #c8ef8c; }
.cw-cta svg { width: 14px; height: 14px; }

/* ============================================================
   v47 — LIGHT THEME  (warm off-white · NVIDIA green accent)
   Content + hero + reality all lightened. Code-editor panels
   (.code-window / .cv-* / hero-code) intentionally stay dark.
   ============================================================ */
:root {
  --bg: #f2ece6;            /* cream — visually matches the "How ASPIRE Works" animation bg */
  --bg-2: #e9e2db;          /* section band, a touch deeper than --bg */
  --surface: #ffffff;       /* cards / panels */
  --surface-2: #f3f1ea;
  --surface-tint: #f2f1ec;
  --text: #1b1e23;          /* warm near-black */
  --muted: #5c636e;         /* readable muted */
  --line: rgba(0, 0, 0, 0.12);
  --line-strong: rgba(0, 0, 0, 0.20);
  --accent: #76b900;        /* NVIDIA green */
  --green: #76b900;
  --green-dim: #5f9c00;     /* darker for hover on light */
  --green-soft: rgba(118, 185, 0, 0.12);
}

body { color: var(--text); background: var(--bg); }
::selection { background: rgba(118, 185, 0, 0.22); color: #0f1a00; }
a:hover { color: var(--green-dim); }

/* ---- content text: dark, readable ---- */
.section-header p, .chart-header p, .panel-label,
.component-text p,
.subsection-sub, .ba-pair figcaption, .intro-text, .page-authors,
.affiliation-line, .author-note-line { color: var(--muted); }
.author-line { color: #2b313a; }
.author-sep { color: #9aa1ab; }

/* ---- surfaces / panels ---- */
.chart-panel { background: #f8f4ef; border-color: var(--line); }   /* same as the BibTeX panel */
.section-alt { background: var(--bg-2); border-color: var(--line); }
.section-overview { background: var(--bg); }
.figure-full img { background: #fff; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.10); }
.pp-frame, .component-media, .pair-videos { box-shadow: 0 10px 28px rgba(0, 0, 0, 0.10); }

/* ---- nav: light bar ---- */
.navbar { background: rgba(247, 246, 242, 0.82); }
.navbar.scrolled { background: rgba(247, 246, 242, 0.93); border-bottom-color: var(--line); }
.nav-brand, .nav-team { color: var(--text); }
.nav-link { color: var(--muted); }
/* Scrolled (light) nav: active link in NVIDIA green */
.nav-link.active { color: var(--green-dim); }

/* The hero (grid wall + ASPIRE wordmark) and the real-robot section keep their
   ORIGINAL dark cinematic treatment — only the content theme is light.
   Re-scope the original lime accent inside them so they match "before". */
.hero-wall, .reality { --green: #84cc3f; --accent: #84cc3f; --green-dim: #9bdd55; }

/* ---- footer ---- */
.footer { background: var(--bg-2); border-top: 1px solid var(--line); }
.footer-mark { color: var(--text); }
.footer-tag, .footer-links a, .footer-affil { color: var(--muted); }
.footer-links a:hover { color: var(--green-dim); }
.footer-affil { border-top-color: var(--line); }

/* ============================================================
   v49 — light-theme polish, dark↔light transition, gallery & figure
   ============================================================ */

/* (1) Remove the light hairline seam where the dark hero meets the dark reality */
.reality { border-top: none; margin-top: -1px; }

/* (4) Transparent navbar over the hero: drop the dark band, keep text legible */
.navbar-over:not(.scrolled) { background: transparent; }
.navbar-over:not(.scrolled) .nav-brand,
.navbar-over:not(.scrolled) .nav-link,
.navbar-over:not(.scrolled) .nav-team,
.navbar-over:not(.scrolled) .nav-cta { text-shadow: 0 1px 12px rgba(0, 0, 0, 0.55); }

/* (2) Full-code popup keeps the dark editor theme (don't inherit light tokens) */
.cv {
  --accent: #84cc3f;
  --muted: #8b96a6;
  --text: #e9eef5;
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.2);
}

/* (5) Task gallery: light-mode dividers/frames instead of black */
.pair-videos { background: var(--line); border-color: var(--line); }
.pair-clip { background: #ece9e3; }
.component-media, .pp-frame { background: #ece9e3; }

/* (6) Figure 1 diagram: the PNG uses alpha; the image background matches the
   section behind transparent regions with no blend mode or repaint flashing. */
.method-figure img,
.method-figure-video {
  background: var(--bg-2);
  border: none;
  box-shadow: none;
  padding: 0;
}

.method-figure-video {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  background: #f2ece6;
}

/* Match the Method section background to the video's flat backdrop
   so the figure reads as transparent. */
.section.section-soft#method { background: #f0eae4; }

/* (7) Give the large system diagram deliberate spacing without framing it. */
.section-alt#method .method-figure {
  width: min(100%, 1120px);
  margin: 2.4rem auto 3.5rem;
}

/* ============================================================
   v50 — fix invisible code text on the dark editor overlays
   (plain/untokenized code was inheriting the light theme's dark --text)
   ============================================================ */
.code-window { color: #cdd6c4; }      /* light default for the dark reality editor */
.cv-code, .cv-window { color: #e9eef5; }

/* ── Benchmarks: one chart per row (Robosuite & BEHAVIOR-1K no longer share a row) ── */
.bench-grid { grid-template-columns: 1fr; }

/* ============================================================
   v53 — HERO PERFORMANCE
   Kill per-frame GPU work (filters + blend modes on the video wall) and
   isolate the wordmark / code layers so heavy video compositing can't drop
   them. Fixes the "ASPIRE" flicker and the code-scroll / NxN jank.
   ============================================================ */

/* Promote the wordmark, the streaming code, and the vignette to their own
   compositor layers so they paint independently of the videos. */
.hero-content { transform: translateZ(0); will-change: transform; }
.hero-code { transform: translateZ(0); }
.wall-vignette { transform: translateZ(0); }

/* ============================================================
   v54 — 6x8 wall is now ONE montage video (grid_montage.mp4)
   Single decode replaces dozens of <video>s. Darkened in CSS to the
   original cinematic level; the grain layer is gone (it caused the white haze).
   ============================================================ */
.wall-video {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #05070a;
  /* Even, moderate dim only — the GRADUAL darkening (dark centre for the
     wordmark, dark top/bottom, lighter mid-band) comes from .wall-vignette,
     not a flat wash. */
  filter: brightness(0.62) saturate(0.9);
  transform: translateZ(0);
}
/* keep the original intro reveal (ASPIRE first, then the wall fades up) */
.hero-wall .wall-video { opacity: 0; animation: intro-fade 1.6s ease 1.15s forwards; }
@media (prefers-reduced-motion: reduce) {
  .hero-wall .wall-video { opacity: 1; animation: none; }
}

/* ============================================================
   Task gallery + side-by-side code viewer
   ============================================================ */
.gallery-shell {
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: visible;
}
.gallery-toolbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.15rem;
  padding: 0;
  background: transparent;
  border: 0;
  flex-wrap: wrap;
}
.gallery-filters {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  flex-wrap: wrap;
}
.gallery-filter-buttons {
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
}
.gallery-filter {
  font-family: var(--font);
  font-size: 0.87rem;
  font-weight: 600;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  padding: 0.18rem 0 0.34rem;
  cursor: pointer;
}
.gallery-filter.active {
  color: var(--text);
  background: transparent;
  border-color: var(--green-dim);
}
.gallery-search {
  flex: 1 1 16rem;
  min-width: 13rem;
}
.gallery-search input {
  width: 100%;
  min-height: 2.15rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.52);
  color: var(--text);
  font: inherit;
  font-size: 0.86rem;
  padding: 0.34rem 0.68rem;
}
.gallery-search input:focus {
  outline: none;
  border-color: rgba(118, 185, 0, 0.7);
  box-shadow: 0 0 0 3px rgba(118, 185, 0, 0.13);
}
.gallery-count {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
}
.gallery-pagination {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-left: auto;
}
.gallery-page-btn {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.48);
  color: var(--text);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.28rem 0.58rem;
  cursor: pointer;
}
.gallery-page-btn:hover:not(:disabled) {
  border-color: rgba(118, 185, 0, 0.55);
  color: var(--green-dim);
}
.gallery-page-btn:disabled {
  cursor: default;
  opacity: 0.42;
}
.gallery-page-label {
  min-width: 6rem;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
}
.gallery-scroll {
  max-height: none;
  overflow: visible;
  padding: 1.15rem;
  border: 1px solid var(--line);
  border-radius: var(--r-md, 8px);
  background: rgba(255, 255, 255, 0.36);
}
.gallery-empty {
  grid-column: 1 / -1;
  padding: 3rem 1rem;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: var(--r-md, 8px);
  background: rgba(255, 255, 255, 0.35);
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* single-video cards keep the same footprint as paired cards */
.pair-videos.gallery-single {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.pair-videos.gallery-single .pair-clip {
  grid-column: 1 / -1;
  justify-self: center;
  width: calc((100% - 2px) / 2);
}
.pair-videos.gallery-wide .pair-clip video {
  aspect-ratio: 25 / 16;
}

/* ── Skill library atlas ── */
.section-skills {
  background: #f4f3ee;
}
.skill-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  max-width: 100%;
  margin-bottom: 1.15rem;
}
.skill-stat {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f8f4ef;   /* same as the BibTeX panel — slightly lighter than the page */
  padding: 0.8rem 0.95rem;
}
.skill-stat span {
  display: block;
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 400;
  line-height: 1;
  color: var(--text);
}
.skill-stat small {
  display: block;
  margin-top: 0.32rem;
  font-family: var(--font);
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: none;
  letter-spacing: 0;
}
.skill-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.15rem;
  flex-wrap: wrap;
}
.skill-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}
.skill-tab {
  font-family: var(--font);
  font-size: 0.87rem;
  font-weight: 600;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  padding: 0.18rem 0 0.34rem;
  cursor: pointer;
}
.skill-tab.active {
  color: var(--text);
  background: transparent;
  border-color: var(--green-dim);
}
.skill-search {
  flex: 1 1 16rem;
  min-width: 13rem;
}
.skill-search input {
  width: 100%;
  min-height: 2.15rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.52);
  color: var(--text);
  font: inherit;
  font-size: 0.86rem;
  padding: 0.34rem 0.68rem;
}
.skill-search input:focus {
  outline: none;
  border-color: rgba(118, 185, 0, 0.72);
  box-shadow: 0 0 0 3px rgba(118, 185, 0, 0.13);
}
.skill-atlas {
  display: grid;
  grid-template-columns: minmax(20rem, 0.9fr) minmax(0, 1.1fr);
  gap: 1.15rem;
  align-items: stretch;
}
.skill-list {
  display: flex;
  flex-direction: column;
  gap: 0.72rem;
  min-height: 0;
  border: 0;
}
.skill-page-items {
  display: grid;
  align-content: start;
  gap: 0.62rem;
}
.skill-card {
  --skill-accent: rgba(118, 185, 0, 0.58);
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  display: grid;
  gap: 0.38rem;
  width: 100%;
  height: auto;
  min-height: 7.5rem;
  align-items: start;
  font-family: var(--font);
  text-align: left;
  border: 1px solid var(--line);
  border-left: 4px solid var(--skill-accent);
  border-radius: 7px;
  background: #f8f4ef;   /* same as the BibTeX panel — slightly lighter than the page */
  padding: 0.82rem 0.9rem;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.skill-card > * {
  position: relative;
  z-index: 2;
  transition: filter 0.15s, opacity 0.15s;
}
.skill-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(251, 250, 246, 0.5);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
}
.skill-card:hover {
  background: rgba(255, 255, 255, 0.82);
  border-color: rgba(38, 46, 23, 0.18);
  border-left-color: var(--skill-accent);
}
/* Active card keeps the SAME background as the rest (border/shadow mark it
   selected) so the grid reads as one consistent colour. */
.skill-card.active {
  border-color: rgba(38, 46, 23, 0.18);
  border-left-color: var(--skill-accent);
}
.skill-card:hover::after,
.skill-card:focus-visible::after {
  opacity: 1;
}
.skill-card:hover > :not(.skill-card-action),
.skill-card:focus-visible > :not(.skill-card-action) {
  filter: blur(2px);
  opacity: 0.72;
}
.skill-card.active {
  box-shadow: 0 1px 0 rgba(38, 46, 23, 0.04);
}
.skill-card.domain-libero { --skill-accent: rgba(40, 126, 160, 0.58); }
.skill-card.domain-robosuite { --skill-accent: rgba(143, 106, 35, 0.6); }
.skill-card-meta {
  font-family: var(--font);
  font-size: 0.7rem;
  font-weight: 700;
  color: #6e7365;
  text-transform: uppercase;
  letter-spacing: 0.035em;
}
.skill-card strong {
  font-family: var(--font-display);
  color: var(--text);
  font-size: 1.18rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.15;
}
.skill-card-summary {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}
.skill-card-action {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 3;
  color: #2f371f;
  font-family: var(--font);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  white-space: nowrap;
  opacity: 0;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.skill-card:hover .skill-card-action,
.skill-card:focus-visible .skill-card-action {
  opacity: 1;
}
.skill-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding-bottom: 0.12rem;
}
.skill-page-btn {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.48);
  color: var(--text);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.28rem 0.58rem;
  cursor: pointer;
}
.skill-page-btn:hover:not(:disabled) {
  border-color: rgba(118, 185, 0, 0.55);
  color: var(--green-dim);
}
.skill-page-btn:disabled {
  cursor: default;
  opacity: 0.42;
}
.skill-page-label {
  min-width: 6rem;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
}
.skill-reader {
  --skill-accent: rgba(118, 185, 0, 0.58);
  /* Match the left card-stack's height and scroll internally so the panel
     bottom-aligns with the 5 stacked cards (the left column sizes the row). */
  height: 0;
  min-height: 100%;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-left: 3px solid var(--skill-accent);
  border-radius: 6px;
  background: #fbfaf6;
  padding: clamp(1.1rem, 1.8vw, 1.45rem);
  scrollbar-color: rgba(112, 116, 122, 0.58) transparent;
  scrollbar-width: thin;
}
.skill-reader::-webkit-scrollbar { width: 9px; }
.skill-reader::-webkit-scrollbar-track,
.skill-reader::-webkit-scrollbar-track-piece {
  background: transparent;
}
.skill-reader::-webkit-scrollbar-thumb {
  background: rgba(112, 116, 122, 0.58);
  border-radius: 999px;
}
.skill-reader.domain-libero { --skill-accent: rgba(40, 126, 160, 0.58); }
.skill-reader.domain-robosuite { --skill-accent: rgba(143, 106, 35, 0.6); }
.skill-reader-head h3 {
  margin: 0 0 0.65rem;
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 2.6vw, 2.25rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.04;
  color: var(--text);
}
.skill-reader-head p {
  max-width: 58rem;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.6;
  margin-bottom: 0;
}
.skill-markdown {
  margin-top: 1.05rem;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.58;
}
.skill-markdown h4,
.skill-markdown h5,
.skill-markdown h6 {
  margin: 1.25rem 0 0.45rem;
  color: var(--text);
  font-family: var(--font);
  font-size: 0.98rem;
  line-height: 1.3;
}
.skill-markdown h4:first-child,
.skill-markdown p:first-child {
  margin-top: 0;
}
.skill-markdown p {
  margin: 0.58rem 0;
}
.skill-markdown ul,
.skill-markdown ol {
  margin: 0.5rem 0 0.82rem;
  padding-left: 1.08rem;
}
.skill-markdown li {
  margin: 0.24rem 0;
}
.skill-markdown blockquote {
  margin: 0.75rem 0;
  padding: 0.5rem 0.72rem;
  border-left: 3px solid var(--skill-accent);
  color: var(--text);
  background: rgba(255, 255, 255, 0.48);
}
.skill-markdown hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 1rem 0;
}
.skill-code-block {
  margin: 0.75rem 0 1rem;
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid rgba(38, 46, 23, 0.16);
  border-radius: 5px;
  background: #f1f0eb;
  padding: 0.78rem;
}
.skill-code-block code {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  line-height: 1.55;
  color: #1d2512;
  white-space: pre;
}
.skill-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  margin: 0.75rem 0 1rem;
  border: 1px solid var(--line);
  border-radius: 5px;
}
.skill-table {
  width: 100%;
  min-width: 30rem;
  border-collapse: collapse;
  font-size: 0.8rem;
}
.skill-table th,
.skill-table td {
  padding: 0.5rem 0.6rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}
.skill-table th {
  color: var(--text);
  background: rgba(247, 246, 242, 0.88);
}
.skill-table tr:last-child td {
  border-bottom: 0;
}
.skill-snippets {
  display: grid;
  gap: 0.8rem;
  margin-top: 1rem;
}
.skill-snippet {
  border-top: 1px solid var(--line);
  padding-top: 0.8rem;
}
.skill-snippet h4 {
  margin: 0 0 0.35rem;
  font-size: 0.92rem;
  color: var(--text);
}
.skill-snippet p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
}
.skill-inline-code {
  display: inline;
  font-family: var(--font-mono);
  font-size: 0.88em;
  line-height: 1.25;
  color: #24291a;
  background: rgba(38, 46, 23, 0.07);
  border: 1px solid rgba(38, 46, 23, 0.13);
  border-radius: 4px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  overflow-wrap: anywhere;
  padding: 0.02rem 0.22rem;
  vertical-align: baseline;
}
.skill-empty {
  padding: 2rem 1rem;
  color: var(--muted);
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: var(--r-md, 8px);
}

@media (max-width: 900px) {
  .skill-atlas { grid-template-columns: 1fr; }
  .skill-reader { height: auto; min-height: 0; max-height: none; }
}
@media (max-width: 640px) {
  .skill-stats { grid-template-columns: 1fr; width: 100%; }
  .skill-stat { padding-inline: 0.8rem; }
  .skill-controls { align-items: stretch; }
  .skill-search { min-width: 100%; }
  .gallery-pagination {
    width: 100%;
    justify-content: space-between;
    margin-left: 0;
  }
  .gallery-page-label { min-width: auto; }
  .skill-pagination {
    justify-content: space-between;
  }
  .skill-page-label { min-width: auto; }
}

.conclusion-body {
  max-width: 46rem;
  color: var(--muted);
  line-height: 1.7;
}
.conclusion-body p { margin: 0 0 1.2rem; }
.conclusion-body p:last-child { margin-bottom: 0; }

/* Limitations as a scannable list */
.limitations-list {
  margin: 0; padding: 0; list-style: none;
  max-width: 52rem;
}
.limitations-list li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 1.1rem;
  color: var(--muted);
  line-height: 1.7;
}
.limitations-list li:last-child { margin-bottom: 0; }
.limitations-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.6em;
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 1px;
}
.limitations-list strong { color: var(--text); font-weight: 600; }

/* Second header sharing a section with the block above it */
.section-header.section-subhead { margin-top: 3rem; }

/* Soft tone matching the skill gallery background */
.section.section-soft { background: #f4f3ee; }

/* More breathing room before BibTeX; tuck Acknowledgments close beneath it */
#citation.section-subhead { margin-top: 5.5rem; }
#limitations { padding-bottom: 2.25rem; }
#acknowledgments { padding-top: 2.25rem; }

/* Citation / BibTeX */
/* ── Team grid (photo placeholders + names) ── */
.team-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);   /* all 14 on a 2 × 7 grid */
  gap: 1.25rem 0.7rem;
  margin: 1.4rem 0 0;
}
.team-member { margin: 0; text-align: center; }
.team-photo {
  width: 100%;
  height: auto;                  /* override the img height attr so aspect-ratio governs */
  aspect-ratio: 1 / 1;
  background: #ddd6cc;            /* placeholder square on the cream page */
  border: 1px solid var(--line);
  border-radius: 5px;
  object-fit: cover;             /* applies once swapped for <img> */
  display: block;
}
.team-name {
  margin-top: 0.5rem;
  font-family: var(--font);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
}
.team-name sup { color: var(--muted); font-weight: 600; }
.team-note { margin: 1.3rem 0 0; font-size: 0.82rem; color: var(--muted); }
.team-note sup { font-weight: 600; }
@media (max-width: 860px) { .team-grid { grid-template-columns: repeat(5, 1fr); } }
@media (max-width: 560px) { .team-grid { grid-template-columns: repeat(3, 1fr); gap: 1.25rem 0.8rem; } }

.bibtex-block { position: relative; max-width: 52rem; }
.bibtex-code {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.65;
  color: var(--text);
  background: #f8f4ef;   /* slightly lighter than the cream page */
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.4rem 1.6rem;
  overflow-x: auto;
  white-space: pre;
}
.bibtex-copy {
  position: absolute; top: 0.85rem; right: 0.85rem;
  font-family: var(--font-mono); font-size: 0.72rem; font-weight: 500;
  color: var(--muted);
  background: var(--bg-2);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 0.35rem 0.75rem;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.bibtex-copy:hover { color: var(--text); border-color: var(--accent); }
.bibtex-copy.copied { color: #0a1400; background: var(--accent); border-color: var(--accent); }

/* hover "View code" affordance over a demo */
.gallery-viewcode {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 600;
  color: #eef3ea;
  background: rgba(8, 11, 15, 0.62);
  border: none;
  backdrop-filter: blur(2px);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.ba-pair:hover .gallery-viewcode,
.gallery-viewcode:focus-visible { opacity: 1; }
.gallery-viewcode .eye { width: 30px; height: 30px; color: var(--accent); }

/* ── side-by-side code modal ── */
.gcv {
  --gcv-border: rgba(132, 204, 63, 0.14);
  --gcv-border-dim: rgba(132, 204, 63, 0.1);
  --gcv-scroll-track: #070a0f;
  --gcv-scroll-thumb: #25331f;
  --gcv-scroll-thumb-hover: #3e592b;
  color-scheme: dark;
  position: fixed; inset: 0; z-index: 1000; display: none;
}
.gcv.open { display: block; }
.gcv-backdrop { position: absolute; inset: 0; background: rgba(4, 6, 9, 0.82); backdrop-filter: blur(6px); animation: cv-fade 0.18s ease; }
.gcv-window {
  position: absolute; inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  width: min(1180px, 95vw); height: min(88vh, 920px);
  display: flex; flex-direction: column;
  background: #0b0e13; border: 1px solid var(--gcv-border);
  border-radius: 14px; overflow: hidden;
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.7);
  animation: cv-pop 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
.gcv-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.7rem 0.95rem; background: rgba(8, 11, 15, 0.96);
  border-bottom: 1px solid var(--gcv-border-dim);
}
.gcv-title { font-family: var(--font-mono); font-size: 0.82rem; color: #cdd6c4; letter-spacing: 0.01em; }
.gcv-close {
  font-family: var(--font-mono); font-size: 0.72rem; color: #8b96a6;
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--gcv-border);
  border-radius: 6px; padding: 0.2rem 0.6rem; cursor: pointer; transition: color 0.15s, border-color 0.15s;
}
.gcv-close:hover { color: #fff; border-color: rgba(132, 204, 63, 0.32); }
.gcv-panes { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr); min-height: 0; background: #080b0f; }
.gcv-panes.two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.gcv-pane { display: flex; flex-direction: column; min-height: 0; min-width: 0; border-left: 1px solid var(--gcv-border-dim); }
.gcv-pane:first-child { border-left: none; }
.gcv-pane-head {
  flex: 0 0 auto; padding: 0.5rem 0.95rem;
  font-family: var(--font-mono); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.04em;
  border-bottom: 1px solid var(--gcv-border-dim);
}
.gcv-pane-head.gcv-fail { color: #ff8c82; background: rgba(255, 95, 87, 0.08); }
.gcv-pane-head.gcv-pass { color: #c8ef8c; background: rgba(132, 204, 63, 0.1); }
.gcv-pre {
  flex: 1; margin: 0; overflow: auto; padding: 0.6rem 0 1.2rem;
  background: #080b0f;
  scrollbar-color: var(--gcv-scroll-thumb) var(--gcv-scroll-track);
  scrollbar-width: thin;
}
.gcv-pre::-webkit-scrollbar { width: 11px; height: 11px; }
.gcv-pre::-webkit-scrollbar-track { background: var(--gcv-scroll-track); }
.gcv-pre::-webkit-scrollbar-thumb {
  background: var(--gcv-scroll-thumb);
  border: 2px solid var(--gcv-scroll-track);
  border-radius: 999px;
}
.gcv-pre::-webkit-scrollbar-thumb:hover { background: var(--gcv-scroll-thumb-hover); }
.gcv-pre::-webkit-scrollbar-corner { background: var(--gcv-scroll-track); }
.gcv-code {
  display: block; font-family: var(--font-mono); font-size: 0.78rem; line-height: 1.6;
  color: #cdd6c4; counter-reset: gln;
}
.gcv-line { display: block; white-space: pre; position: relative; padding: 0 1rem 0 3rem; }
.gcv-line::before {
  counter-increment: gln; content: counter(gln);
  position: absolute; left: 0; width: 2.4rem; text-align: right; color: #3c4658; font-size: 0.9em;
}
.gcv-code .t-c { color: #6b7768; font-style: italic; }
.gcv-code .t-k { color: #8fcf6a; }
.gcv-code .t-s { color: #c8bf84; }
.gcv-code .t-n { color: #aebfe0; }
.gcv-code .t-f { color: #9cc9f0; }
@media (max-width: 760px) {
  .gcv-panes.two { grid-template-columns: 1fr; }    /* stack the two programs on phones */
  .gcv-window { width: 96vw; height: 90vh; }
}

/* ============================================================
   Left nav rail — replaces the old top bar.
   Hidden while over the hero (the 3x3 front page); slides in from
   the left once the hero is scrolled past (.scrolled toggled in main.js).
   Appended last so it overrides the earlier top-bar rules.
   ============================================================ */
.navbar {
  inset: 0 auto 0 0;                 /* pin to the left edge, full height */
  height: 100vh;
  width: 200px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 0;
  padding: 1.75rem 1.35rem;
  background: transparent;
  backdrop-filter: none;
  border-bottom: 0;
  border-right: 0;
  /* hidden until the hero is scrolled past */
  transform: translateX(-100%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}
.navbar.scrolled {
  transform: none;
  opacity: 1;
  pointer-events: auto;
  background: transparent;
  border-right: 0;
  box-shadow: none;
}

.nav-brand {
  position: relative;
  font-size: 1.18rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 2.5rem;
  padding-left: 0.95rem;
}
.nav-brand::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 1.05em;
  border-radius: 2px;
  background: var(--accent);
}

/* Section links hang off a thin vertical guide; the active one lights up
   with an accent bar and slides in slightly. */
.nav-links {
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  flex-wrap: nowrap;
  gap: 0;
  width: 100%;
  border-left: 1px solid var(--line);
}

.nav-links .nav-link {
  position: relative;
  display: block;
  font-size: 0.9rem;
  padding: 0.46rem 0 0.46rem 0.95rem;
  margin-left: -1px;
  border-left: 2px solid transparent;
}
.nav-link {
  color: var(--muted);
  transition: color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}
.nav-links .nav-link:hover {
  color: var(--text);
  transform: translateX(3px);
}
.nav-links .nav-link.active {
  color: var(--green-dim);
  font-weight: 600;
  border-left-color: var(--accent);
}

.nav-team {
  margin: auto 0 0;                  /* settle at the bottom of the rail */
  padding-top: 1.1rem;
  width: 100%;
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--muted);
  border-top: 1px solid var(--line);
  transition: color 0.18s ease;
}
.nav-team:hover { color: var(--green-dim); }

/* The page content is centered in max-width containers, so on wide screens
   the rail sits in the left margin. Below this width it would overlap, so
   nudge the content clear of the rail once it's docked. */
@media (max-width: 1320px) {
  body.nav-docked { padding-left: 200px; }
}

/* On phones the full-height rail is overkill — let it span the top edge as a
   slim docked bar instead, still hidden until scrolled past the hero. */
@media (max-width: 640px) {
  .navbar {
    inset: 0 0 auto 0;
    height: auto;
    width: 100%;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 1rem;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    transform: translateY(-100%);
    overflow-x: auto;
  }
  .navbar.scrolled { transform: none; }
  .nav-brand { margin: 0 1rem 0 0; }
  .nav-links { flex-direction: row; gap: 0.85rem; width: auto; }
  .nav-links .nav-link { font-size: 0.78rem; }
  .nav-team { margin: 0 0 0 0.75rem; }
  body.nav-docked { padding-left: 0; }
}

/* smooth the content nudge when the rail docks/undocks */
body { transition: padding-left 0.45s cubic-bezier(0.16, 1, 0.3, 1); }

/* ============================================================
   Single flat background — no alternating section bands
   ============================================================ */
.section,
.section-alt,
.section-soft,
.section-overview,
.section-skills,
.section.section-soft,
.section.section-soft#method {
  background: var(--bg);
  border-top: 0;
  border-bottom: 0;
}

/* ── Benchmarks: one section title, two subtitles ──
   "Benchmark Results" is the section title; "Main Evaluation Results" and
   "Zero-Shot Transfer of Skill Library" sit beneath it as subtitles (smaller
   than the section title, larger than the individual chart headings). Scoped
   to #benchmarks so Conclusion/Team/BibTeX subheads keep their size. */
#benchmarks .section-subhead { border-left-width: 3px; margin-top: 3.25rem; }
#benchmarks .section-subhead h2 {
  font-size: clamp(1.4rem, 2.2vw, 1.8rem);
  font-weight: 600;
  letter-spacing: -0.02em;
}

/* Remove the hairline divider directly under the "Benchmark Results" title:
   the "Main Evaluation Results" subtitle should read as belonging to it, not
   be separated from it. (The second subsection keeps its top divider.) */
#benchmarks .section-header:not(.section-subhead) + .section-subhead {
  border-top: none;
  padding-top: 0;
  margin-top: 1rem;
}

/* ── Code buttons: visible but not yet clickable (repo not public) ── */
[data-link="code"] { pointer-events: none; cursor: default; }

/* ── Phone: present the cover video and grid-hero wordmark at the desktop
   16:9 aspect ratio, full phone width — so the cover video isn't cropped
   left-right and the hero text keeps its computer proportions. The cover and
   grid videos are 16:9, so a 16:9 hero box + object-fit:cover fits with no crop. ── */
@media (max-width: 640px) {
  .hero { height: auto; min-height: 0; aspect-ratio: 16 / 9; }
  .grid-hero .gh-title { font-size: clamp(1.5rem, 7vw, 2.6rem); }
}

/* ===========================================================================
   Mobile fixes
   =========================================================================== */

/* (2) Remove the left nav rail / top dock entirely on phones. */
@media (max-width: 768px) {
  .navbar { display: none !important; }
  body.nav-docked { padding-left: 0 !important; }
}

/* (3) Center the footer wordmark / brand on phones (was left-aligned). */
@media (max-width: 640px) {
  .footer-inner { flex-direction: column; align-items: center; text-align: center; }
  .footer-brand { align-items: center; }
  .footer-links { justify-content: center; flex-wrap: wrap; }
  .footer-affil { text-align: center; }
}

/* (4) On phones the expanded skill opens as a full-screen popup instead of a
   tall inline block: tap a card to open, X (or Esc) to close. */
.skill-reader-close { display: none; }
@media (max-width: 900px) {
  .skill-reader {
    position: fixed; inset: 0; z-index: 1200;
    height: auto; min-height: 0; max-height: none; margin: 0;
    border: 0; border-radius: 0;
    overflow-y: auto; -webkit-overflow-scrolling: touch;
    padding: 3.5rem 1.25rem 2.5rem;
    display: none;
  }
  body.skill-reader-open { overflow: hidden; }
  body.skill-reader-open .skill-reader { display: block; }
  .skill-reader-close {
    display: flex; position: fixed; top: 0.8rem; right: 0.9rem; z-index: 1210;
    width: 2.4rem; height: 2.4rem; padding: 0;
    align-items: center; justify-content: center;
    font-size: 1.7rem; line-height: 1; color: #fff;
    background: rgba(20, 24, 30, 0.92); border: 0; border-radius: 999px;
    cursor: pointer;
  }
}

/* ===========================================================================
   Phones held in LANDSCAPE: wide but short, so width-based mobile rules above
   don't trigger and the desktop layout leaks in. Re-apply the mobile treatment
   for any short landscape viewport (caught by height, regardless of width).
   =========================================================================== */
@media (orientation: landscape) and (max-height: 600px) {
  /* no left nav rail / dock */
  .navbar { display: none !important; }
  body.nav-docked { padding-left: 0 !important; }

  /* cover video + wordmark at the desktop 16:9 ratio (no zoom/crop, full width) */
  .hero { height: auto; min-height: 0; aspect-ratio: 16 / 9; }
  .grid-hero .gh-title { font-size: clamp(1.5rem, 6vw, 2.6rem); }

  /* centered footer */
  .footer-inner { flex-direction: column; align-items: center; text-align: center; }
  .footer-brand { align-items: center; }
  .footer-links { justify-content: center; flex-wrap: wrap; }
  .footer-affil { text-align: center; }

  /* expanded skill opens as a full-screen popup */
  .skill-atlas { grid-template-columns: 1fr; }
  .skill-reader {
    position: fixed; inset: 0; z-index: 1200;
    height: auto; min-height: 0; max-height: none; margin: 0;
    border: 0; border-radius: 0;
    overflow-y: auto; -webkit-overflow-scrolling: touch;
    padding: 3.5rem 1.25rem 2.5rem;
    display: none;
  }
  body.skill-reader-open { overflow: hidden; }
  body.skill-reader-open .skill-reader { display: block; }
  .skill-reader-close {
    display: flex; position: fixed; top: 0.8rem; right: 0.9rem; z-index: 1210;
    width: 2.4rem; height: 2.4rem; padding: 0;
    align-items: center; justify-content: center;
    font-size: 1.7rem; line-height: 1; color: #fff;
    background: rgba(20, 24, 30, 0.92); border: 0; border-radius: 999px; cursor: pointer;
  }
}

/* Mobile: shrink the "SCROLL" cue so it doesn't crowd the hero wordmark in the
   short 16:9 hero bands. */
@media (max-width: 640px), (orientation: landscape) and (max-height: 600px) {
  .hero-scroll { bottom: 0.55rem; gap: 0.22rem; }
  .hero-scroll-label { font-size: 0.5rem; letter-spacing: 0.16em; }
  .hero-scroll-chev { width: 8px; height: 8px; }
}

/* Mobile: force black around the two cover videos (no pastel page bg showing
   through any letterbox / coverage gap). */
@media (max-width: 640px), (orientation: landscape) and (max-height: 600px) {
  .hero, .hero-cover, .grid-hero, .cover-video, .wall-video { background: #000; }
}

/* ── Portrait phones: tighten vertical space (page reads too "tall") ── */
@media (max-width: 640px) and (orientation: portrait) {
  /* author list: smaller + tighter line spacing */
  .page-authors { font-size: 0.8rem; line-height: 1.32; gap: 0.25rem; margin-bottom: 0.9rem; }
  .affiliation-line { margin-top: 0.28rem; }
  .affiliation-line, .author-note-line { font-size: 0.72rem; }

  /* 90+ and 150+ side by side */
  .skill-stats { grid-template-columns: 1fr 1fr; }
  .skill-stat { padding: 0.55rem 0.7rem; }
  .skill-stat span { font-size: 1.35rem; }

  /* footer shorter */
  .footer { padding: 1.9rem 0 1.3rem; }

  /* BibTeX denser */
  .bibtex-code { font-size: 0.62rem; line-height: 1.45; padding: 0.85rem 0.95rem; }

  /* token-analysis pair: trim the gaps around it */
  .cost-pair { gap: 0.9rem; }
  .transfer-success-row { margin-top: 0.8rem; }
  .cost-col-title { margin-bottom: 0.3rem; }
}

/* Author names never break across lines (mid-name) */
.author-name { white-space: nowrap; }

/* Portrait phones: let authors flow as one centered, wrapping list rather than
   the desktop's fixed 4-line grouping (too wide for a phone). */
@media (max-width: 640px) and (orientation: portrait) {
  .page-authors { display: block; text-align: center; }
  .page-authors .author-line { display: inline; }
  .page-authors .author-line + .author-line::before {
    content: "·"; color: #9aa8bb; padding: 0 0.18rem;
  }
}
