:root {
  color-scheme: light;
  --bg-page: #f7f9fc;
  --surface-1: #ffffff;
  --surface-2: #f0f4f9;
  --surface-3: #e4ebf3;
  --border-subtle: #dde4ee;
  --grid-hairline: #e9eef5;
  --text-primary: #161d27;
  --text-secondary: #526071;
  --text-muted: #738296;
  --accent-ink: #1b64be;
  --accent-soft: rgba(37, 125, 224, 0.10);
  /* Validated dataviz categorical palette (light) */
  --series-1: #257de0; /* VoxWAM (Ours) - Blue */
  --series-2: #f47230; /* 3D/4D WAMs - Orange */
  --series-3: #00b894; /* Video/Image WAMs - Aqua */
  --series-4: #f2a600; /* VLA Policies - Yellow */
  --series-5: #ee7fac; /* Auxiliary module - Magenta */
  --bar-muted: #c7d2e0;
  --status-good: #0aac23;
  --code-bg: #0f1724;
  --code-fg: #e6edf7;
  --shadow-sm: 0 1px 3px rgba(15, 23, 36, 0.05);
  --shadow-md: 0 8px 24px rgba(15, 23, 36, 0.07);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
}

@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) {
    color-scheme: dark;
    --bg-page: #0f131a;
    --surface-1: #191e28;
    --surface-2: #212836;
    --surface-3: #2b3446;
    --border-subtle: #2c3648;
    --grid-hairline: #262f3f;
    --text-primary: #eef2f7;
    --text-secondary: #9fb0c4;
    --text-muted: #78899f;
    --accent-ink: #6aabf1;
    --accent-soft: rgba(51, 140, 237, 0.16);
    /* Validated dataviz categorical palette (dark) */
    --series-1: #338ced;
    --series-2: #e76624;
    --series-3: #00a888;
    --series-4: #d28e05;
    --series-5: #e24d8b;
    --bar-muted: #3c485e;
    --status-good: #0aac23;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.35);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg-page: #0f131a;
  --surface-1: #191e28;
  --surface-2: #212836;
  --surface-3: #2b3446;
  --border-subtle: #2c3648;
  --grid-hairline: #262f3f;
  --text-primary: #eef2f7;
  --text-secondary: #9fb0c4;
  --text-muted: #78899f;
  --accent-ink: #6aabf1;
  --accent-soft: rgba(51, 140, 237, 0.16);
  --series-1: #338ced;
  --series-2: #e76624;
  --series-3: #00a888;
  --series-4: #d28e05;
  --series-5: #e24d8b;
  --bar-muted: #3c485e;
  --status-good: #0aac23;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.35);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Sticky Top Navigation */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--bg-page) 84%, transparent);
  border-bottom: 1px solid var(--border-subtle);
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 58px;
  gap: 16px;
}
.brand {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
.brand-cube {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  background: var(--series-1);
  box-shadow: 3px 3px 0 var(--series-3);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  transition: color 0.15s;
}
.nav-links a:hover { color: var(--text-primary); }
.icon-btn {
  background: var(--surface-1);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 6px 11px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
}
.icon-btn:hover { background: var(--surface-2); }

/* Hero Section */
.hero {
  padding: 56px 0 36px;
  text-align: center;
}
.venue-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 18px;
}
.hero h1 {
  font-size: clamp(2rem, 4.1vw, 3.05rem);
  line-height: 1.16;
  letter-spacing: -0.03em;
  margin: 0 auto 18px;
  max-width: 980px;
}
.hero h1 .accent { color: var(--series-1); }
.authors {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
}
.cta-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 34px;
}
.btn-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--border-subtle);
  background: var(--surface-1);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
  transition: transform 0.14s, background 0.14s;
}
.btn-cta:hover { transform: translateY(-1px); background: var(--surface-2); }
.btn-cta.primary {
  background: var(--series-1);
  border-color: var(--series-1);
  color: #ffffff;
}
.btn-cta.primary:hover { filter: brightness(1.06); }
.badge-soon {
  font-size: 0.7rem;
  padding: 1px 6px;
  border-radius: 99px;
  background: var(--surface-2);
  color: var(--text-secondary);
}

/* KPI Stat Tiles (dataviz contract: proportional figures, sentence-case label) */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 28px;
  text-align: left;
}
.stat-tile {
  background: var(--surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
}
.stat-label {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.stat-value {
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
  color: var(--text-primary);
}
.stat-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 6px;
}

/* Sections & Cards */
section { padding: 42px 0; }
.section-head {
  margin-bottom: 22px;
}
.section-eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-ink);
  margin-bottom: 6px;
}
.section-head h2 {
  font-size: 1.72rem;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}
.section-head p {
  margin: 0;
  color: var(--text-secondary);
  max-width: 820px;
}
.card {
  background: var(--surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
.figure-frame {
  background: #ffffff;
  border-radius: var(--radius-md);
  padding: 14px;
  border: 1px solid var(--border-subtle);
}
.figure-frame img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
}
.figure-caption {
  margin-top: 12px;
  font-size: 0.86rem;
  color: var(--text-secondary);
  text-align: left;
}

/* Motivation Paradigm Grid */
.paradigm-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 20px;
}
.paradigm-card {
  background: var(--surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
}
.paradigm-card.highlight {
  border-color: var(--series-1);
  box-shadow: 0 0 0 1px var(--series-1);
}
.paradigm-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 99px;
  background: var(--surface-2);
  color: var(--text-secondary);
  margin-bottom: 10px;
}
.paradigm-card.highlight .paradigm-tag {
  background: var(--accent-soft);
  color: var(--accent-ink);
}
.paradigm-card h3 { margin: 0 0 8px; font-size: 1.05rem; }
.paradigm-card p { margin: 0; font-size: 0.88rem; color: var(--text-secondary); }

/* UNITAS-style Immersive Dark 3D Volumetric Stages */
.stage-shell {
  background: radial-gradient(circle at 55% 32%, #182338 0%, #0b101b 75%);
  border: 1px solid #253248;
  border-radius: var(--radius-lg);
  padding: 20px;
  color: #edf2f9;
  box-shadow: 0 16px 40px rgba(7, 11, 20, 0.22);
}
.stage-top {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.scene-chip {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #b7c5da;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.79rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}
.scene-chip:hover { background: rgba(255, 255, 255, 0.12); color: #ffffff; }
.scene-chip.active {
  background: #257de0;
  border-color: #3b8ef0;
  color: #ffffff;
  font-weight: 600;
}

.stage-viewport-wrap {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 45%, #162033 0%, #090d16 100%);
  border: 1px solid rgba(255, 255, 255, 0.09);
}
.stage-canvas {
  display: block;
  width: 100%;
  height: 510px;
  cursor: grab;
}
.stage-canvas:active { cursor: grabbing; }

.stage-rgb-dock {
  position: absolute;
  top: 14px;
  left: 14px;
  width: 168px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 4;
}
.stage-rgb-card {
  margin: 0;
  background: rgba(11, 16, 27, 0.78);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 9px;
  padding: 5px;
}
.stage-rgb-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 5px;
}
.stage-rgb-card figcaption {
  font-size: 0.69rem;
  color: #cbd7e8;
  margin-top: 3px;
  text-align: center;
  font-weight: 500;
}

.stage-hud-top {
  position: absolute;
  top: 14px;
  right: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  z-index: 4;
}
.hud-btn, .hud-select {
  background: rgba(13, 19, 31, 0.82);
  backdrop-filter: blur(8px);
  color: #e6eef8;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  padding: 6px 11px;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
}
.hud-btn:hover, .hud-select:hover { background: rgba(34, 47, 72, 0.9); }
.hud-btn.active { background: #257de0; border-color: #4aa0ff; color: #fff; }

.stage-hud-bottom {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  pointer-events: none;
  z-index: 4;
}
.stage-caption-box {
  background: rgba(11, 16, 27, 0.80);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 9px;
  padding: 8px 13px;
  max-width: 68%;
}
.stage-caption-text {
  font-size: 0.88rem;
  font-weight: 600;
  color: #ffffff;
}
.stage-badge-text {
  font-size: 0.75rem;
  color: #9fb2cc;
  margin-top: 2px;
}
.orbit-hint {
  background: rgba(11, 16, 27, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 0.74rem;
  color: #b8c7dc;
}

.timeline-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 10px;
}
.timeline-slider {
  flex: 1;
  accent-color: #338ced;
  cursor: pointer;
}
.horizon-readout {
  min-width: 112px;
  text-align: right;
  font-size: 0.84rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #7cc0ff;
}

/* Full 19-Class Interactive Taxonomy Strip */
.taxonomy-strip-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 14px 0 8px;
  font-size: 0.76rem;
  color: #9cb0ca;
}
.taxonomy-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tax-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: #dce6f4;
  font-size: 0.73rem;
  cursor: pointer;
  transition: opacity 0.15s, background 0.15s;
}
.tax-pill.absent { opacity: 0.44; }
.tax-pill.off { opacity: 0.25; text-decoration: line-through; }
.tax-pill:hover { opacity: 1; background: rgba(255, 255, 255, 0.12); }
.tax-dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  flex-shrink: 0;
}
.tax-cnt {
  font-size: 0.68rem;
  color: #8ea6c4;
  font-variant-numeric: tabular-nums;
}
.mini-btn {
  font: inherit;
  font-size: 0.82rem;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  background: var(--surface-1);
  color: var(--text-primary);
  cursor: pointer;
  font-weight: 500;
}
.mini-btn:hover { background: var(--surface-2); }
.mini-btn.active { background: var(--series-1); color: #fff; border-color: var(--series-1); }
.case-meta { font-size: 0.8rem; color: var(--text-secondary); }
.legend-item { display: inline-flex; align-items: center; gap: 5px; }
.swatch { width: 9px; height: 9px; border-radius: 2px; display: inline-block; }

/* Method Pillars */
.method-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}
.step-card {
  background: var(--surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px 20px;
}
.step-num {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--series-1);
  margin-bottom: 4px;
}
.step-card h3 { margin: 0 0 8px; font-size: 1rem; }
.step-card p { margin: 0; font-size: 0.86rem; color: var(--text-secondary); }

/* Rollout Video Gallery */
.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}
.video-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.video-card {
  background: var(--surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.video-card video {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: #000;
  display: block;
}
.video-body { padding: 12px 14px; flex: 1; display: flex; flex-direction: column; gap: 5px; }
.video-suite {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.73rem;
  color: var(--text-muted);
}
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
  color: var(--text-primary);
}
.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--status-good);
}
.video-title { font-size: 0.88rem; font-weight: 600; margin: 0; }
.video-instr { font-size: 0.78rem; color: var(--text-secondary); margin: 0; }

/* Quantitative Charts & Table Twin */
.charts-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 18px;
}
.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.chart-title { font-size: 1.05rem; font-weight: 700; margin: 0; }
.chart-sub { font-size: 0.8rem; color: var(--text-secondary); margin: 2px 0 0; }
.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-bottom: 10px;
}
.svg-wrap { position: relative; width: 100%; }
.svg-wrap svg { display: block; width: 100%; height: auto; overflow: visible; }

.viz-tooltip {
  position: fixed;
  pointer-events: none;
  z-index: 100;
  background: var(--surface-1);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-md);
  border-radius: 8px;
  padding: 8px 11px;
  font-size: 0.78rem;
  color: var(--text-primary);
  max-width: 260px;
  opacity: 0;
  transition: opacity 0.1s;
}
.viz-tooltip.visible { opacity: 1; }

/* Tall Segmented Bar (dataviz spec: 28px height, 4px corners, 2px surface gap) */
.seg-bar-wrap { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border-subtle); }
.seg-bar {
  display: flex;
  height: 28px;
  gap: 2px;
  width: 100%;
  margin: 8px 0 10px;
}
.seg-part {
  height: 100%;
  border-radius: 4px;
  display: flex;
  align-items: center;
  padding: 0 8px;
  font-size: 0.74rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
}
.data-table th, .data-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border-subtle);
  text-align: left;
}
.data-table th { color: var(--text-secondary); font-weight: 600; }
.data-table td.num, .data-table th.num { text-align: right; }

/* Code & Model Zoo */
.code-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 18px;
}
pre.code-block {
  background: var(--code-bg);
  color: var(--code-fg);
  padding: 16px 18px;
  border-radius: var(--radius-md);
  overflow-x: auto;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.8rem;
  line-height: 1.55;
  margin: 0;
}
.bib-wrap { position: relative; }
.copy-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 0.76rem;
  cursor: pointer;
}
.copy-btn:hover { background: rgba(255, 255, 255, 0.22); }

footer {
  padding: 36px 0 48px;
  border-top: 1px solid var(--border-subtle);
  margin-top: 32px;
  color: var(--text-muted);
  font-size: 0.82rem;
  text-align: center;
}

@media (max-width: 960px) {
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .paradigm-grid, .method-steps, .charts-grid, .code-grid { grid-template-columns: 1fr; }
  .stage-canvas { height: 420px; }
  .stage-rgb-dock { width: 132px; }
  .video-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .kpi-grid, .video-grid { grid-template-columns: 1fr; }
  .stage-canvas { height: 360px; }
  .stage-rgb-dock { position: static; width: 100%; flex-direction: row; padding: 10px 10px 0; }
  .stage-caption-box { max-width: 100%; }
  .orbit-hint { display: none; }
}
