:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --muted-bg: #f1f5f9;
  --text: #0f172a;
  --muted: #475569;
  --accent: #0ea5e9;
  --accent-2: #a855f7;
  --border: #e2e8f0;
  --shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
  --max-width: 1180px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background:
    radial-gradient(900px at 18% 18%, rgba(14,165,233,0.10), transparent 42%),
    radial-gradient(1100px at 82% 0%, rgba(168,85,247,0.12), transparent 40%),
    linear-gradient(180deg, #ffffff 0%, #f6f9fc 60%, #f4f7fb 100%);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  background: var(--muted-bg);
  padding: 0.15rem 0.35rem;
  border-radius: 6px;
}

pre {
  background: var(--muted-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1rem 1.2rem;
  overflow-x: auto;
}

main { width: 100%; }

section {
  scroll-margin-top: 50px;
}

.top-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2.5rem;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
}

.brand { display: flex; align-items: baseline; gap: 0.8rem; }
.brand-mark { font-weight: 700; letter-spacing: 0.08em; }
.brand-subtitle { color: var(--muted); font-size: 0.9rem; }

.top-nav nav { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.top-nav a {
  color: var(--muted);
  font-weight: 600;
  padding: 0.45rem 0.75rem;
  border-radius: 10px;
  transition: color 0.2s ease, background 0.2s ease;
}
.top-nav a:hover { color: var(--text); background: var(--muted-bg); }
.top-nav .pill {
  color: #0f172a;
  background: linear-gradient(120deg,
    rgba(255, 99, 132, 0.9),
    rgba(255, 205, 86, 0.88),
    rgba(75, 192, 192, 0.9),
    rgba(54, 162, 235, 0.9),
    rgba(153, 102, 255, 0.9));
  background-size: 280% 280%;
  animation: rainbowShift 9s ease-in-out infinite;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.12);
}

@keyframes rainbowShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.hero {
  padding: 4rem max(2.5rem, (100vw - var(--max-width)) / 2);
}

.hero-grid {
  display: grid;
  grid-template-columns: 2.4fr 0.7fr;
  gap: 1.5rem;
  align-items: start;
  max-width: var(--max-width);
  margin: 0 auto;
}

.hero-main h1 {
  font-size: clamp(2.4rem, 3.6vw, 3.2rem);
  margin: 0.2rem 0 1.1rem;
  line-height: 1.15;
}

.lede { color: var(--muted); max-width: 720px; margin-bottom: 1.5rem; }
.eyebrow {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
  font-size: 0.85rem;
  margin: 0;
}

.cta-row { display: flex; gap: 0.8rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border-radius: 12px;
  padding: 0.9rem 1.2rem;
  font-weight: 700;
  color: var(--text);
  border: 1px solid var(--border);
  background: #fff;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
}
.cta.primary {
  background: linear-gradient(120deg,
    rgba(255, 99, 132, 0.85),
    rgba(255, 205, 86, 0.82),
    rgba(75, 192, 192, 0.85),
    rgba(54, 162, 235, 0.86),
    rgba(153, 102, 255, 0.85));
  background-size: 280% 280%;
  animation: rainbowShift 9s ease-in-out infinite;
  color: #0f172a;
  border: none;
  box-shadow: 0 12px 22px rgba(15, 23, 42, 0.12);
}
.cta.outline { background: #fff; }
.cta.ghost { background: transparent; }
.cta:hover { transform: translateY(-2px); border-color: #cbd5e1; box-shadow: 0 12px 22px rgba(15, 23, 42, 0.08); }

.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.9rem;
  margin-top: 1.2rem;
}

.surface {
  background: var(--panel);
  border: 1px solid var(--border);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
  border-radius: 18px;
}

.stat-card { padding: 1rem 1.1rem; }
.stat-card .label { color: var(--muted); font-size: 0.9rem; }
.stat-card .value { display: block; font-weight: 700; font-size: 1.1rem; margin: 0.15rem 0 0.4rem; }
.stat-card .emphasis { font-size: 1.2rem; }

.hero-aside { display: flex; flex-direction: column; gap: 1rem; }
.callout {
  border-radius: 18px;
  padding: 1.15rem 1.1rem;
  box-shadow: var(--shadow);
}
.callout.gradient {
  background: linear-gradient(135deg, rgba(110,231,255,0.32), rgba(124,58,237,0.20));
  border: 1px solid rgba(14,165,233,0.22);
}
.callout.surface {
  background: var(--panel);
  border: 1px solid var(--border);
}
.callout .overline {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: var(--accent);
  margin-top: 0;
}
.callout ul { margin: 0.5rem 0 0; padding-left: 1.2rem; color: var(--muted); }

.section { padding: 4rem max(2.5rem, (100vw - var(--max-width)) / 2); }
.section-header h2 {
  margin: 0.3rem 0 0.5rem;
  font-size: 1.9rem;
  font-family: "Source Serif 4", "Inter", serif;
}
.section-body { margin-top: 1rem; }
.section-body.two-col,
.two-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.4rem;
  align-items: start;
}

.highlight {
  border: 1px solid var(--border);
  background: var(--muted-bg);
  border-radius: 16px;
  padding: 1.2rem;
}
.highlight ul { margin: 0.4rem 0 0; padding-left: 1.2rem; color: var(--muted); }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.card {
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: 16px;
  padding: 1.1rem 1.2rem;
  box-shadow: var(--shadow);
}
.card h3 { margin: 0.1rem 0 0.4rem; }
.overline {
  margin: 0;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.figure-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.figure-card {
  padding: 0.75rem;
  border-radius: 16px;
  background: var(--panel);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.figure-card img {
  width: 100%;
  display: block;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
}

.figure-card figcaption {
  margin: 0.65rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.figure-card a {
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
}

.dataset-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1.5rem;
  margin-top: 1rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  background: var(--panel);
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
}
table th, table td {
  padding: 0.8rem 0.9rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
}
table th { color: var(--accent-2); background: var(--muted-bg); }
table tr:last-child td { border-bottom: none; }

.dataset-details ul { margin: 0.6rem 0 0; padding-left: 1.2rem; color: var(--muted); }
.bullet-list { list-style: disc; }
.footnote { color: var(--muted); font-size: 0.95rem; }

.table-card h3 { margin: 0 0 0.4rem; }
.table-compact th, .table-compact td { padding: 0.55rem 0.65rem; font-size: 0.98rem; }
.table-compact th { background: var(--muted-bg); color: var(--muted); }
.table-compact .total-row { font-weight: 700; background: rgba(148, 163, 184, 0.15); }

.author-stack {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.6rem;
  margin-top: 0.5rem;
}
.author-pill {
  padding: 0.9rem 1rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  text-align: center;
  font-weight: 700;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.05);
}

.citation { margin-top: 1rem; }
.citation-notes {
  margin: 0.4rem 0 0.6rem;
  color: var(--muted);
  font-size: 0.98rem;
}
.citation-notes a {
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
}

.team-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.8rem;
}
.name-chip {
  padding: 0.55rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.05);
  font-weight: 600;
}

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem max(2.5rem, (100vw - var(--max-width)) / 2);
  border-top: 1px solid var(--border);
  background: #fff;
}
.footer-links { display: flex; gap: 1rem; flex-wrap: wrap; color: var(--muted); }
.legal-footer {
  padding: 1rem max(2.5rem, (100vw - var(--max-width)) / 2);
  text-align: center;
  font-size: 0.95rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  background: #fff;
}
.legal-footer a { font-weight: 600; }

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .dataset-layout { grid-template-columns: 1fr; }
  .top-nav { padding: 1rem 1.5rem; }
  .hero { padding: 3rem 1.5rem; }
}

@media (max-width: 600px) {
  .hero, .section { padding: 2.8rem 1.2rem; }
  .footer { flex-direction: column; align-items: flex-start; }
}
