:root {
  --bg: #0f172a;
  --panel: #111827;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --line: rgba(255,255,255,0.12);
  --line-strong: rgba(255,255,255,0.22);
  --accent: #8b5cf6;
  --accent-2: #06b6d4;
  --card: rgba(255,255,255,0.06);
  --card-strong: rgba(255,255,255,0.10);
  --maxw: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
code { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; }
img { max-width: 100%; height: auto; display: block; }

.hero {
  min-height: 760px;
  background:
    radial-gradient(circle at 18% 20%, rgba(139,92,246,0.38), transparent 34%),
    radial-gradient(circle at 78% 12%, rgba(6,182,212,0.25), transparent 30%),
    linear-gradient(135deg, #111827 0%, #0f172a 54%, #020617 100%);
  border-bottom: 1px solid var(--line);
}

.nav {
  width: min(var(--maxw), calc(100% - 40px));
  margin: 0 auto;
  padding: 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand { font-weight: 800; letter-spacing: -0.03em; font-size: 1.15rem; }
.nav-links { display: flex; gap: 18px; color: var(--muted); font-size: 0.95rem; }
.nav-links a:hover { color: var(--text); }

.hero-content {
  width: min(var(--maxw), calc(100% - 40px));
  margin: 0 auto;
  padding: 118px 0 120px;
}
.eyebrow, .section-label {
  margin: 0 0 16px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  font-weight: 800;
  color: #a5b4fc;
}
h1, h2, h3, p { margin-top: 0; }
h1 {
  max-width: 980px;
  font-size: clamp(2.55rem, 6vw, 5.3rem);
  line-height: 0.98;
  letter-spacing: -0.065em;
  margin-bottom: 26px;
}
.subtitle {
  max-width: 820px;
  color: #cbd5e1;
  font-size: clamp(1.08rem, 2vw, 1.35rem);
  margin-bottom: 34px;
}
.button-row { display: flex; gap: 14px; flex-wrap: wrap; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  font-weight: 700;
}
.button:hover { background: rgba(255,255,255,0.12); }
.button.primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); border-color: transparent; color: white; }

.section {
  width: min(var(--maxw), calc(100% - 40px));
  margin: 0 auto;
  padding: 86px 0;
  border-bottom: 1px solid var(--line);
  min-width: 0;
}
.two-col { display: grid; grid-template-columns: 0.9fr 1.25fr; gap: 64px; }
h2 { font-size: clamp(2rem, 4vw, 3.2rem); line-height: 1.05; letter-spacing: -0.045em; margin-bottom: 24px; }
h3 { font-size: 1.18rem; letter-spacing: -0.02em; margin-bottom: 10px; }
.body-text { color: #cbd5e1; font-size: 1.05rem; }
.body-text p { margin-bottom: 18px; }
.narrow-text { max-width: 860px; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin: 34px 0;
}
.stat, .config-list, .figure-card, .prompt-box, .takeaway, .table-wrap {
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 24px;
}
.stat {
  padding: 24px;
  display: flex;
  flex-direction: column;
  min-height: 140px;
  justify-content: flex-end;
}
.stat strong { display: block; font-size: clamp(2.4rem, 4vw, 4rem); line-height: 1; letter-spacing: -0.06em; }
.stat span { color: #cbd5e1; }

.pipeline-layout { margin-top: 30px; }
.pipeline-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  max-width: 900px;
}
.pipeline-list li {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  padding: 20px 22px;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 20px;
}
.pipeline-list p { margin: 0; color: #cbd5e1; }
.step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, rgba(139,92,246,0.95), rgba(6,182,212,0.85));
  font-weight: 900;
  letter-spacing: -0.03em;
}

.config-list { padding: 26px; }
.config-list ul { margin: 0; padding-left: 20px; }
.config-list li { color: #cbd5e1; }
.config-list li + li { margin-top: 8px; }
.lighting-grid { margin-top: 22px; }
.prompt-box { padding: 22px 24px; color: #cbd5e1; margin: 28px 0; }
.prompt-box strong { color: var(--text); margin-right: 6px; }

.figure-card {
  padding: 18px;
  margin: 28px 0 0;
  overflow: hidden;
}
.figure-card img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 16px;
  background: rgba(255,255,255,0.04);
  object-fit: contain;
}
.figure-card figcaption { margin-top: 14px; color: #cbd5e1; font-size: 0.95rem; }
.pipeline-figure { max-width: 100%; margin-top: 34px; }
.pipeline-figure img { max-height: 560px; object-fit: contain; }

.image-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 10px;
  align-items: stretch;
}
.compact-pair { max-width: 980px; }
.dataset-figure {
  display: flex;
  flex-direction: column;
  margin-top: 0;
}
.dataset-figure img {
  height: 260px;
  object-fit: contain;
}
.dataset-figure figcaption { min-height: 48px; }

.result-figure {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}
.result-figure img {
  max-height: 430px;
  object-fit: contain;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  padding: 18px;
  margin-top: 28px;
  scrollbar-color: rgba(165,180,252,0.6) rgba(255,255,255,0.06);
}
.data-table {
  width: 100%;
  min-width: 780px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.93rem;
  color: #dbeafe;
  overflow: hidden;
}
.compact-table { min-width: 680px; }
.data-table caption {
  caption-side: bottom;
  padding-top: 14px;
  color: #cbd5e1;
  text-align: left;
  line-height: 1.45;
}
.data-table th,
.data-table td {
  padding: 11px 12px;
  text-align: center;
  vertical-align: middle;
  border-right: 1px solid rgba(255,255,255,0.08);
  border-bottom: 1px solid rgba(255,255,255,0.10);
}
.data-table th:last-child,
.data-table td:last-child { border-right: 0; }
.data-table thead th {
  color: #f8fafc;
  font-weight: 850;
  background: rgba(139,92,246,0.18);
  border-bottom: 1px solid var(--line-strong);
}
.data-table thead tr:first-child th:first-child { border-top-left-radius: 14px; }
.data-table thead tr:first-child th:last-child { border-top-right-radius: 14px; }
.data-table tbody tr:nth-child(even) td,
.data-table tbody tr:nth-child(even) th.row-head { background: rgba(255,255,255,0.028); }
.data-table tbody tr:hover td,
.data-table tbody tr:hover th { background: rgba(6,182,212,0.08); }
.data-table .left,
.data-table .row-head,
.data-table .group-label,
.data-table .category { text-align: left; }
.data-table .row-head {
  color: #f8fafc;
  font-weight: 750;
  background: rgba(255,255,255,0.035);
}
.data-table .group-label {
  color: #f8fafc;
  font-weight: 850;
  background: rgba(139,92,246,0.13);
  border-right: 1px solid var(--line-strong);
}
.data-table .category {
  color: #dbeafe;
  background: rgba(255,255,255,0.025);
}
.grouped-table .group-start > th,
.grouped-table .group-start > td { border-top: 2px solid rgba(165,180,252,0.32); }
.grouped-table .subgroup-start > td,
.grouped-table .subgroup-start > th { border-top: 1px solid rgba(255,255,255,0.18); }
.best {
  color: #ffffff;
  font-weight: 850;
  background: rgba(6,182,212,0.14) !important;
}
.result-note { color: #cbd5e1; margin: 18px 0 0; max-width: 860px; }
.takeaway {
  padding: 22px 24px;
  margin-top: 28px;
  color: #cbd5e1;
  background: linear-gradient(135deg, rgba(139,92,246,0.16), rgba(6,182,212,0.10));
}
.takeaway strong { color: var(--text); }
.secondary-table { opacity: 0.96; }

.citation pre {
  overflow-x: auto;
  padding: 24px;
  border-radius: 24px;
  background: #020617;
  border: 1px solid var(--line);
  color: #d1d5db;
  font-size: 0.92rem;
}
.footer {
  width: min(var(--maxw), calc(100% - 40px));
  margin: 0 auto;
  padding: 34px 0 46px;
  color: var(--muted);
}

@media (max-width: 900px) {
  .nav { align-items: flex-start; flex-direction: column; }
  .nav-links { flex-wrap: wrap; }
  .hero { min-height: auto; }
  .hero-content { padding: 82px 0 96px; }
  .two-col, .stats-grid, .image-pair { grid-template-columns: 1fr; }
  .figure-card, .table-wrap { padding: 14px; }
  .dataset-figure img { height: auto; max-height: 340px; }
}

@media (max-width: 620px) {
  .section, .nav, .hero-content, .footer { width: min(var(--maxw), calc(100% - 28px)); }
  .pipeline-list li { grid-template-columns: 1fr; }
  .step { width: 40px; height: 40px; }
  h1 { font-size: clamp(2.25rem, 13vw, 3.8rem); }
}
