:root {
  --bg: #f7f4ee;
  --ink: #172033;
  --muted: #647084;
  --line: rgba(23, 32, 51, 0.12);
  --card: rgba(255, 255, 255, 0.78);
  --accent: #3367d6;
  --accent-2: #7c4dff;
  --accent-3: #13b8a6;
  --dark: #111827;
  --dark-card: rgba(255, 255, 255, 0.08);
  --radius: 28px;
  --shadow: 0 24px 80px rgba(23, 32, 51, 0.12);
  --body-bg:
    radial-gradient(circle at 12% 0%, rgba(51, 103, 214, 0.16), transparent 32rem),
    radial-gradient(circle at 88% 10%, rgba(124, 77, 255, 0.14), transparent 34rem),
    linear-gradient(180deg, #fbf8f1 0%, var(--bg) 44%, #ffffff 100%);
  --grid-opacity: 0;
  --header-bg: rgba(247, 244, 238, 0.74);
  --nav-hover-bg: rgba(255, 255, 255, 0.78);
  --nav-hover-color: var(--ink);
  --hero-title: linear-gradient(180deg, #172033 0%, #24314a 52%, #556174 100%);
  --hero-subtitle: #3b465a;
  --hero-copy: #3d485c;
  --button-bg: rgba(255, 255, 255, 0.7);
  --button-shadow: 0 10px 24px rgba(23, 32, 51, 0.06);
  --showcase-bg: #fbfaf7;
  --showcase-shadow: 0 16px 48px rgba(23, 32, 51, 0.10);
  --card-text: #515d70;
  --figcaption: var(--muted);
  --section-band-text: #172033;
  --section-band-eyebrow: #3367d6;
  --section-band-heading: #172033;
  --metric-bg: rgba(255, 255, 255, 0.82);
  --metric-border: rgba(23, 32, 51, 0.10);
  --metric-title: linear-gradient(180deg, #1a2b4f, #3367d6);
  --metric-copy: #5d697d;
  --muted-button-bg: rgba(255, 255, 255, 0.45);
  --panel-head-bg: rgba(255, 255, 255, 0.96);
  --panel-head-text: #172033;
  --panel-head-link: #244fc7;
  --section-band-bg:
    radial-gradient(circle at 12% 20%, rgba(51, 103, 214, 0.14), transparent 32rem),
    radial-gradient(circle at 80% 0%, rgba(124, 77, 255, 0.12), transparent 38rem),
    rgba(255, 255, 255, 0.60);
}

body[data-theme="dark"] {
  --bg: #070a13;
  --ink: #f7f9ff;
  --muted: #a7b0c2;
  --line: rgba(255, 255, 255, 0.13);
  --card: rgba(255, 255, 255, 0.075);
  --accent: #74a7ff;
  --accent-2: #a78bfa;
  --accent-3: #5eead4;
  --dark: #070a13;
  --dark-card: rgba(255, 255, 255, 0.075);
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.38);
  --body-bg:
    radial-gradient(circle at 12% -4%, rgba(116, 167, 255, 0.30), transparent 34rem),
    radial-gradient(circle at 90% 4%, rgba(167, 139, 250, 0.26), transparent 38rem),
    radial-gradient(circle at 50% 52%, rgba(94, 234, 212, 0.08), transparent 42rem),
    linear-gradient(180deg, #0b1020 0%, #070a13 48%, #090d18 100%);
  --grid-opacity: 1;
  --header-bg: rgba(7, 10, 19, 0.72);
  --nav-hover-bg: rgba(255, 255, 255, 0.09);
  --nav-hover-color: #fff;
  --hero-title: linear-gradient(180deg, #ffffff 0%, #d7e2ff 48%, #8ea3c5 100%);
  --hero-subtitle: #c8d2e7;
  --hero-copy: #c0c9dc;
  --button-bg: rgba(255, 255, 255, 0.08);
  --button-shadow: 0 14px 36px rgba(0, 0, 0, 0.22);
  --showcase-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.03));
  --showcase-shadow: 0 22px 70px rgba(0, 0, 0, 0.32);
  --card-text: #b3bdcf;
  --figcaption: #98a4b8;
  --section-band-text: #fff;
  --section-band-eyebrow: #9db8ff;
  --section-band-heading: #fff;
  --metric-bg: rgba(255, 255, 255, 0.075);
  --metric-border: rgba(255, 255, 255, 0.14);
  --metric-title: linear-gradient(180deg, #ffffff, #8fb6ff);
  --metric-copy: rgba(255, 255, 255, 0.74);
  --muted-button-bg: rgba(255, 255, 255, 0.045);
  --panel-head-bg: rgba(255, 255, 255, 0.055);
  --panel-head-text: #f5f8ff;
  --panel-head-link: #bcd0ff;
  --section-band-bg:
    radial-gradient(circle at 12% 20%, rgba(51, 103, 214, 0.24), transparent 32rem),
    radial-gradient(circle at 80% 0%, rgba(124, 77, 255, 0.20), transparent 38rem),
    rgba(255, 255, 255, 0.025);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  zoom: 0.8;
  overflow-x: hidden;
}

body {
  overflow-x: hidden;
}

@media (max-width: 860px) {
  html { zoom: 1; }
}

body {
  margin: 0;
  font-family: "SF Pro Display", "Avenir Next", "Helvetica Neue", Helvetica, Arial, ui-sans-serif, system-ui, sans-serif;
  color: var(--ink);
  background: var(--body-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 72px 72px;
  opacity: var(--grid-opacity);
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), transparent 68%);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(18px, 4vw, 56px);
  backdrop-filter: blur(18px);
  background: var(--header-bg);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--panel-head-text);
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: 15px;
  text-decoration: none;
}

.brand img {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 8px 20px rgba(34, 197, 94, 0.28);
}

nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

nav a {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
}

nav a:hover {
  color: var(--nav-hover-color);
  background: var(--nav-hover-bg);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 13px;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 760;
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--button-bg);
  box-shadow: var(--button-shadow);
}

.theme-icon {
  color: var(--accent);
  font-size: 16px;
  line-height: 1;
}

main {
  width: min(1440px, calc(100% - 36px));
  margin: 0 auto;
}

.hero {
  padding: 96px 0 50px;
  text-align: center;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.20em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.hero h1 {
  max-width: 980px;
  margin: 0 auto;
  font-size: clamp(40px, 6.4vw, 82px);
  font-family: "SF Pro Display", "Helvetica Neue", "Avenir Next", Avenir, Helvetica, Arial, ui-sans-serif, system-ui, sans-serif;
  font-weight: 430;
  line-height: 0.98;
  letter-spacing: -0.05em;
  text-wrap: balance;
  background: var(--hero-title);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-bottom: 0.08em;
}

.hero h2 {
  max-width: 820px;
  margin: 4px auto 0;
  color: var(--hero-subtitle);
  font-size: clamp(22px, 3.2vw, 42px);
  font-family: "SF Pro Display", "Helvetica Neue", "Avenir Next", Avenir, Helvetica, Arial, ui-sans-serif, system-ui, sans-serif;
  font-weight: 360;
  line-height: 1.02;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.authors {
  margin: 24px auto 0;
  color: var(--muted);
  font-size: 18px;
  font-weight: 520;
}

.author-link {
  color: inherit;
  cursor: pointer;
  transition: color 0.2s ease;
}
.author-link:hover {
  color: var(--accent);
}

.authors sup,
.affiliations sup {
  color: var(--accent);
  font-size: 0.68em;
  font-weight: 800;
}

.affiliations {
  margin: 8px auto 0;
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
}

.author-note {
  margin: 6px auto 0;
  color: var(--muted);
  font-size: 13px;
  font-style: italic;
}

.hero-copy {
  max-width: 850px;
  margin: 30px auto 0;
  color: var(--hero-copy);
  font-size: 19px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin: 30px 0 0;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--button-bg);
  color: var(--ink);
  font-size: 14px;
  font-weight: 760;
  box-shadow: var(--button-shadow);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.button:hover {
  transform: translateY(-2px);
  border-color: rgba(116, 167, 255, 0.48);
  background: rgba(255, 255, 255, 0.13);
}

.button.primary {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, #4f8cff, #8b5cf6 52%, #22d3ee);
}

.button.muted {
  color: var(--muted);
  background: var(--muted-button-bg);
}

.showcase {
  padding: 28px 0 72px;
}

.highlights {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  padding: 18px 0 62px;
}

.highlight-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.highlight-card strong {
  display: block;
  margin-bottom: 10px;
  font-size: clamp(34px, 4vw, 56px);
  font-weight: 560;
  line-height: 0.95;
  letter-spacing: -0.055em;
  background: var(--metric-title);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.metric-unit {
  font-size: 0.55em;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin-left: 0.05em;
  opacity: 0.7;
}

/* --- Benchmark section extras --- */
.bench-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 26px 0 32px;
}
.bench-stat {
  padding: 22px 24px;
  border-radius: calc(var(--radius) - 6px);
  background: #ffffff;
  border: 1px solid rgba(23, 32, 51, 0.08);
  box-shadow: 0 12px 32px -22px rgba(23, 32, 51, 0.35);
  color: #172033;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
[data-theme="dark"] .bench-stat {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.14);
  color: #f8fafc;
  box-shadow: none;
}
.bench-stat:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 42px -22px rgba(51, 103, 214, 0.45);
}
.bench-stat strong {
  display: block;
  font-size: clamp(30px, 3.4vw, 46px);
  font-weight: 640;
  letter-spacing: -0.045em;
  line-height: 1;
  background: var(--metric-title);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.bench-stat span {
  display: block;
  margin-top: 12px;
  font-size: 14px;
  font-weight: 560;
  letter-spacing: 0.01em;
  color: #4a5468;
}
[data-theme="dark"] .bench-stat span {
  color: rgba(226, 232, 240, 0.82);
}

.bench-grid { margin-top: 30px; }
.bench-grid .card { color: var(--section-band-text); }
.bench-grid .card h3 { color: var(--section-band-heading); }
.bench-grid .card p,
.bench-grid .card .bench-list { color: var(--section-band-text); opacity: 0.9; }

.bench-list {
  margin: 10px 0 0;
  padding-left: 18px;
  font-size: 15px;
  line-height: 1.65;
}
.bench-list li { margin: 5px 0; }
.bench-list strong { color: var(--section-band-heading); font-weight: 620; }
.bench-list code {
  padding: 1px 6px;
  border-radius: 5px;
  background: color-mix(in srgb, var(--section-band-eyebrow) 12%, transparent);
  color: var(--section-band-eyebrow);
  font-size: 0.9em;
  font-weight: 560;
}

.bench-results {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 34px;
}
.bench-result {
  padding: 26px 28px;
  border-radius: calc(var(--radius) - 4px);
  background:
    linear-gradient(135deg,
      color-mix(in srgb, var(--section-band-eyebrow) 14%, transparent),
      color-mix(in srgb, var(--section-band-eyebrow) 4%, transparent));
  border: 1px solid color-mix(in srgb, var(--section-band-eyebrow) 26%, var(--metric-border));
  color: var(--section-band-text);
  box-shadow: 0 20px 42px -28px color-mix(in srgb, var(--section-band-eyebrow) 60%, transparent);
}
.bench-result strong {
  display: block;
  font-size: clamp(36px, 4.2vw, 56px);
  font-weight: 680;
  letter-spacing: -0.05em;
  line-height: 0.95;
  background: var(--metric-title);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.bench-result span {
  display: block;
  margin-top: 12px;
  font-size: 14px;
  font-weight: 520;
  color: var(--section-band-text);
  opacity: 0.85;
}

@media (max-width: 780px) {
  .bench-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bench-results { grid-template-columns: 1fr; }
}

.highlight-card span {
  display: block;
  color: var(--card-text);
  font-size: 14px;
  line-height: 1.45;
}

.panel,
.figure-card,
.card,
.link-card,
pre {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.visual-panel {
  overflow: hidden;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-head-bg);
  color: var(--panel-head-text);
  font-weight: 800;
}

.panel-head span {
  color: var(--panel-head-text);
  opacity: 1;
  font-weight: 850;
  letter-spacing: -0.02em;
}

.panel-head a {
  color: var(--panel-head-link);
  font-size: 14px;
  font-weight: 850;
}

.showcase-image-link {
  display: block;
  padding: 20px;
  background: var(--showcase-bg);
}

.showcase-image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: calc(var(--radius) - 12px);
  background: #fff;
  box-shadow: var(--showcase-shadow);
}

.result-figure {
  margin-top: 28px;
}

.stack-viewer {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin: 0 auto;
  max-width: 1440px;
}

.stack-stage {
  position: relative;
  width: 100%;
  max-width: 1320px;
  aspect-ratio: 16 / 9;
  perspective: 1600px;
}

.stack-card {
  position: absolute;
  inset: 0;
  --offset: 0;
  background: #050814;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow:
    0 2px 6px rgba(15, 23, 42, 0.06),
    0 24px 48px -18px rgba(15, 23, 42, 0.18);
  transform-origin: 50% 100%;
  transform: translate3d(calc(var(--offset) * 46px), calc(var(--offset) * 30px), 0)
             rotate(calc(var(--offset) * -3deg))
             scale(calc(1 - var(--offset) * 0.075));
  opacity: calc(1 - var(--offset) * 0.22);
  z-index: calc(100 - var(--offset));
  transition: transform 0.5s cubic-bezier(0.22, 0.61, 0.36, 1),
              opacity 0.4s ease,
              box-shadow 0.4s ease;
  cursor: pointer;
}

.stack-card.is-active {
  cursor: default;
  transform: translate3d(0, 0, 0) rotate(0deg) scale(1);
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 30px 60px -24px rgba(15, 23, 42, 0.22),
    0 60px 120px -40px rgba(15, 23, 42, 0.16);
}

.stack-card.is-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translate3d(0, 60px, 0) rotate(0deg) scale(0.8);
}

[data-theme="dark"] .stack-card {
  box-shadow:
    0 2px 6px rgba(0, 0, 0, 0.25),
    0 24px 48px -18px rgba(0, 0, 0, 0.55);
}
[data-theme="dark"] .stack-card.is-active {
  box-shadow:
    0 30px 60px -24px rgba(0, 0, 0, 0.6),
    0 60px 120px -40px rgba(0, 0, 0, 0.5);
}

.stack-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 1;
  transition: opacity 0.6s ease;
  pointer-events: none;
  z-index: 2;
}

.stack-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #050814;
  display: none;
  z-index: 1;
}

.stack-card.is-active .stack-video {
  display: block;
}

.stack-card.is-active.is-playing .stack-poster {
  opacity: 0;
}

.stack-card.is-active.is-playing:hover .stack-poster {
  opacity: 1;
}

.stack-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 8px;
  color: #f8fafc;
  background: linear-gradient(to top,
    rgba(6, 10, 22, 0.55) 0%,
    rgba(6, 10, 22, 0.28) 60%,
    rgba(6, 10, 22, 0) 100%);
  border-bottom-left-radius: var(--radius);
  border-bottom-right-radius: var(--radius);
  z-index: 200;
  pointer-events: auto;
}

.ctrl-btn {
  background: transparent;
  border: none;
  color: inherit;
  cursor: pointer;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
  padding: 0;
}

.ctrl-btn svg { width: 14px; height: 14px; }

.ctrl-btn:hover {
  background: rgba(255, 255, 255, 0.18);
}

.ctrl-time {
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: rgba(248, 250, 252, 0.85);
  min-width: 32px;
  text-align: center;
}

.ctrl-seek {
  flex: 1 1 auto;
  appearance: none;
  -webkit-appearance: none;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(to right,
    rgba(96, 165, 250, 0.95) 0%,
    rgba(96, 165, 250, 0.95) var(--progress, 0%),
    rgba(255, 255, 255, 0.22) var(--progress, 0%),
    rgba(255, 255, 255, 0.22) 100%);
  outline: none;
  cursor: pointer;
}

.ctrl-seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid #3b82f6;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.ctrl-seek::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid #3b82f6;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  cursor: pointer;
}

.ctrl-seek:hover::-webkit-slider-thumb {
  transform: scale(1.15);
}

@media (max-width: 640px) {
  .stack-controls {
    gap: 8px;
    padding: 8px 10px;
  }
  .ctrl-time {
    display: none;
  }
}

.stack-nav {
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--button-bg);
  color: var(--panel-head-text);
  font-size: 28px;
  line-height: 1;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--button-shadow);
  transition: transform 0.2s ease, background 0.2s ease;
}

.stack-nav:hover {
  transform: translateY(-2px);
}

.stack-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 150px;
  flex-wrap: wrap;
}

.stack-caption {
  font-weight: 800;
  color: var(--panel-head-text);
  letter-spacing: -0.01em;
}

.stack-dots {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.stack-dot {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--card-text);
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.stack-dot:hover {
  transform: translateY(-1px);
}

.stack-dot.is-current {
  background: var(--panel-head-link);
  color: #fff;
  border-color: transparent;
}

@media (max-width: 780px) {
  .stack-nav {
    width: 40px;
    height: 40px;
    font-size: 22px;
  }
  .stack-viewer {
    gap: 8px;
  }
}

.video-panel {
  overflow: hidden;
  background: #030712;
}

.demo-video {
  display: block;
  width: 100%;
  max-height: 760px;
  background: #050814;
}

.video-caption {
  padding: 18px 22px;
  color: rgba(255, 255, 255, 0.76);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.video-caption p {
  margin: 0;
}

.video-caption a {
  flex: 0 0 auto;
  color: #bcd0ff;
  font-weight: 800;
}

.section {
  padding: 76px 0;
}

.section-title {
  max-width: 860px;
  margin-bottom: 28px;
}

.section-title h2 {
  margin: 0;
  font-size: clamp(30px, 4.2vw, 56px);
  font-weight: 520;
  line-height: 1.02;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.section-lede {
  margin: 18px 0 0;
  max-width: 780px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}

.method-figure {
  margin: 30px 0 32px;
}

.method-grid {
  margin-top: 8px;
}

.grid {
  display: grid;
  gap: 18px;
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card,
.link-card {
  padding: 24px;
}

.card h3 {
  margin-bottom: 10px;
  font-size: 21px;
  font-weight: 660;
  letter-spacing: -0.03em;
}

.card p {
  margin-bottom: 0;
  color: var(--card-text);
}

.figure-card {
  overflow: hidden;
  margin: 26px 0 0;
  padding: 20px;
}

.figure-card img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: calc(var(--radius) - 10px);
  background: #fff;
}

figcaption {
  margin-top: 14px;
  color: var(--figcaption);
  font-size: 14px;
  text-align: center;
}

.dark {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  padding-left: max(18px, calc((100vw - 1440px) / 2));
  padding-right: max(18px, calc((100vw - 1440px) / 2));
  color: var(--section-band-text);
  background: var(--section-band-bg);
  border-block: 1px solid var(--line);
}

.dark .eyebrow {
  color: var(--section-band-eyebrow);
}

.dark .section-title h2 {
  color: var(--section-band-heading);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.metrics div {
  min-height: 170px;
  padding: 24px;
  border: 1px solid var(--metric-border);
  border-radius: var(--radius);
  background: var(--metric-bg);
  box-shadow: 0 18px 52px rgba(23, 32, 51, 0.10), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.metrics strong {
  display: block;
  margin-bottom: 12px;
  font-size: clamp(38px, 5vw, 70px);
  line-height: 0.9;
  font-weight: 560;
  letter-spacing: -0.06em;
  background: var(--metric-title);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.metrics span {
  color: var(--metric-copy);
}

.dark .figure-card {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: none;
}

.dark figcaption {
  color: rgba(255, 255, 255, 0.66);
}

.link-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 120px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.link-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 28px 86px rgba(0, 0, 0, 0.34);
}

.link-card span {
  color: var(--muted);
  font-weight: 620;
}

.link-card strong {
  color: var(--accent);
}

.result-links {
  margin-top: 18px;
}

pre {
  overflow-x: auto;
  margin: 0;
  padding: 22px;
  color: #dbeafe;
  background: #0b1020;
  box-shadow: none;
}

code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 14px;
}

footer {
  width: min(1440px, calc(100% - 36px));
  margin: 0 auto;
  padding: 34px 0 54px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  text-align: center;
}

footer p {
  margin: 0;
}

@media (max-width: 860px) {
  .site-header {
    gap: 12px;
    padding: 12px 16px;
  }

  .brand { font-size: 14px; }
  .brand img { width: 32px; height: 32px; border-radius: 10px; }

  .header-actions {
    gap: 8px;
  }

  nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    max-width: min(56vw, 340px);
    padding-bottom: 2px;
    justify-content: flex-end;
  }
  nav::-webkit-scrollbar { display: none; }
  nav a {
    padding: 8px 12px;
    font-size: 13px;
    white-space: nowrap;
  }

  .theme-toggle {
    min-height: 36px;
    padding: 0 10px;
    font-size: 12px;
  }
  .theme-toggle .theme-label { display: none; }
  .theme-toggle { gap: 0; }

  main { width: min(100% - 24px, 1440px); }

  .hero {
    padding: 56px 0 32px;
  }
  .hero h1 { font-size: clamp(38px, 10vw, 56px); }
  .hero h2 { font-size: clamp(22px, 6vw, 32px); }
  .hero-copy { font-size: 16px; margin-top: 22px; }
  .authors { font-size: 15px; margin-top: 18px; }
  .affiliations, .author-note { font-size: 12px; }

  .actions { gap: 8px; margin-top: 22px; }
  .button { min-height: 40px; padding: 0 14px; font-size: 13px; }

  .section { padding: 48px 0; }
  .section-title h2 { font-size: clamp(26px, 6.5vw, 36px); }
  .section-lede { font-size: 15px; }

  .dark {
    padding-left: 16px;
    padding-right: 16px;
    border-radius: 0;
  }

  .grid.two,
  .grid.three {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .card, .link-card { padding: 20px; }

  .highlights {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 12px 0 40px;
  }
  .highlight-card { padding: 16px; border-radius: 20px; }
  .highlight-card strong { font-size: clamp(26px, 7vw, 36px); }
  .highlight-card span { font-size: 12.5px; }

  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .metrics div {
    min-height: 0;
    padding: 18px 16px;
    border-radius: 20px;
  }
  .metrics strong { font-size: clamp(28px, 8vw, 40px); margin-bottom: 8px; }
  .metrics span { font-size: 13px; }

  .bench-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 20px 0 24px;
  }
  .bench-stat { padding: 16px 14px; border-radius: 18px; }
  .bench-stat strong { font-size: clamp(26px, 7vw, 34px); }
  .bench-stat span { font-size: 12.5px; margin-top: 8px; }

  .bench-results {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 24px;
  }
  .bench-result { padding: 20px 22px; border-radius: 22px; }
  .bench-result strong { font-size: clamp(32px, 9vw, 44px); }
  .bench-result span { font-size: 13px; margin-top: 8px; }

  .bench-list { font-size: 13.5px; padding-left: 16px; }

  .figure-card { padding: 12px; margin-top: 20px; }
  .figure-card img { border-radius: 14px; }
  figcaption { font-size: 13px; margin-top: 10px; }

  .showcase-image-link { padding: 10px; }
  .panel-head { padding: 14px 16px; }
  .panel-head span { font-size: 14px; }
  .panel-head a { font-size: 12.5px; }

  .video-caption {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 16px;
    font-size: 13px;
  }

  .stack-viewer { gap: 6px; }
  .stack-stage { max-width: 100%; }
  .stack-nav {
    width: 36px;
    height: 36px;
    font-size: 18px;
  }
  .stack-meta {
    margin-top: 22px;
    gap: 12px;
  }
  .stack-caption { font-size: 14px; }
  .stack-dot { width: 28px; height: 28px; font-size: 12px; }

  footer {
    width: min(100% - 24px, 1440px);
    padding: 26px 0 40px;
    font-size: 13px;
  }
}

@media (max-width: 560px) {
  main, footer { width: min(100% - 20px, 1440px); }

  .site-header { padding: 10px 14px; }

  .hero { padding: 40px 0 24px; }
  .hero h1 { font-size: clamp(34px, 11vw, 46px); letter-spacing: -0.04em; }
  .hero h2 { font-size: clamp(20px, 6vw, 26px); }

  .actions { flex-direction: column; align-items: stretch; }
  .button { width: 100%; }

  .highlights { grid-template-columns: 1fr; }
  .bench-stats { grid-template-columns: 1fr; }
  .metrics { grid-template-columns: 1fr; }

  .stack-controls { padding: 4px 10px 6px; }
  .ctrl-btn { width: 24px; height: 24px; }
  .ctrl-btn svg { width: 12px; height: 12px; }
}
