:root {
  --max: 1120px;
  --radius: 18px;
  --line: rgba(100, 116, 139, .22);
  --muted: #64748b;
  --surface: #f8fafc;
  --accent: #0f766e;
  --accent2: #1d4ed8;
  color-scheme: light;
}
* { 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: #0f172a;
  background: #fff;
  line-height: 1.65;
}
a { color: inherit; }
.wrap { width: min(var(--max), calc(100% - 40px)); margin: 0 auto; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: blur(16px);
  background: rgba(255,255,255,.9);
  border-bottom: 1px solid var(--line);
}
.nav { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { text-decoration: none; font-weight: 800; letter-spacing: -.02em; }
.lang-switch { display: flex; gap: 8px; }
.lang {
  border: 1px solid var(--line); border-radius: 999px; background: white;
  padding: 8px 12px; cursor: pointer; color: #334155;
}
.lang.active { background: #0f172a; color: white; }
.hero {
  display: grid; grid-template-columns: 1.45fr .7fr; gap: 48px;
  align-items: center; padding: 88px 0 64px;
}
.eyebrow { font-size: .76rem; letter-spacing: .14em; font-weight: 800; color: var(--accent); }
h1 { font-size: clamp(2.6rem, 6vw, 5.6rem); line-height: .98; letter-spacing: -.055em; margin: 12px 0 24px; }
h2 { font-size: clamp(1.8rem, 3vw, 3rem); line-height: 1.1; letter-spacing: -.035em; }
h3 { line-height: 1.2; }
.lead { font-size: 1.18rem; color: #475569; max-width: 780px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.button {
  text-decoration: none; border: 1px solid var(--line); padding: 11px 16px;
  border-radius: 12px; font-weight: 700; background: white;
}
.button.primary { background: #0f172a; color: white; border-color: #0f172a; }
.hero-card, .callout, .card {
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
}
.hero-card { padding: 22px; }
.metric { padding: 14px 0; border-bottom: 1px solid var(--line); }
.metric:last-child { border-bottom: 0; }
.metric strong { display: block; font-size: 1.15rem; }
.metric span { color: var(--muted); font-size: .92rem; }
.section { padding: 56px 0; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; padding: 12px 0 56px; }
.card { padding: 22px; }
.index { color: var(--accent); font-weight: 800; font-size: .8rem; letter-spacing: .1em; }
.finding-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.big-number { font-size: 2.25rem; font-weight: 850; letter-spacing: -.04em; }
.muted { color: var(--muted); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font-size: .82rem; color: #475569; }
figure { margin: 36px 0; }
figure img { width: 100%; height: auto; border: 1px solid var(--line); border-radius: var(--radius); }
figcaption { color: var(--muted); font-size: .92rem; margin-top: 8px; }
.callout { padding: 20px; border-left: 4px solid var(--accent); }
.author { display: grid; grid-template-columns: 160px 1fr; gap: 30px; align-items: start; }
.author img { width: 150px; border-radius: 24px; border: 1px solid var(--line); }
.profiles { display: flex; flex-wrap: wrap; gap: 12px; }
.profiles a { font-weight: 700; }
footer { margin-top: 64px; border-top: 1px solid var(--line); color: var(--muted); }
footer .wrap { padding: 28px 0 44px; }
@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; padding-top: 56px; }
  .grid, .finding-grid { grid-template-columns: 1fr; }
  .author { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .nav { align-items: flex-start; flex-direction: column; padding: 12px 0; }
  .lang-switch { width: 100%; overflow-x: auto; }
}

/* v1.0 DOI + project documentation extensions */
.nav-right { display: flex; align-items: center; gap: 18px; }
.page-links { display: flex; align-items: center; gap: 14px; font-size: .92rem; }
.page-links a { text-decoration: none; font-weight: 700; color: #475569; }
.page-links a:hover { color: #0f172a; }
.project-hero { padding-bottom: 42px; }
.doi-banner {
  margin-top: 10px;
  margin-bottom: 18px;
  padding: 18px 22px;
  border: 1px solid rgba(15, 118, 110, .28);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(15,118,110,.08), rgba(29,78,216,.05));
}
.doi-banner > div { display: grid; gap: 5px; }
.doi-banner strong { font-size: 1.05rem; }
.doi-banner a { text-decoration: none; }
.kicker { font-size: .72rem; letter-spacing: .13em; font-weight: 850; color: var(--accent); }
.two-col { display: grid; grid-template-columns: 1.2fr .8fr; gap: 28px; align-items: start; }
.mini-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.step-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.pill {
  display: inline-block; border: 1px solid rgba(15,118,110,.24); border-radius: 999px;
  padding: 4px 9px; font-size: .75rem; font-weight: 800; color: var(--accent); background: rgba(15,118,110,.06);
}
.flow {
  display: grid; grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr auto 1fr auto 1fr;
  gap: 10px; align-items: stretch; margin-top: 28px;
}
.flow-node {
  border: 1px solid var(--line); border-radius: 14px; padding: 16px 12px; background: var(--surface);
  display: flex; flex-direction: column; gap: 5px; min-width: 0;
}
.flow-node span { font-size: .72rem; font-weight: 850; color: var(--accent); }
.flow-node small { color: var(--muted); line-height: 1.35; }
.flow-arrow { display: flex; align-items: center; color: var(--muted); font-weight: 850; }
.citation-box {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; background: #0f172a; color: #f8fafc;
  display: grid; gap: 10px;
}
.citation-box a { color: #bfdbfe; word-break: break-all; }
.citation-box code { color: #d1fae5; }
.citation-box small { color: #cbd5e1; }
.citation-box.wide { max-width: 900px; }
.codepath {
  display: grid; grid-template-columns: minmax(200px, .7fr) 1.3fr; gap: 18px;
  padding: 14px 0; border-bottom: 1px solid var(--line);
}
.codepath code { font-weight: 800; color: var(--accent2); }
.top-gap { margin-top: 24px; }
.footer-grid { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer-grid a { font-weight: 700; }

@media (max-width: 940px) {
  .flow { grid-template-columns: 1fr; }
  .flow-arrow { justify-content: center; transform: rotate(90deg); }
  .two-col, .mini-grid, .step-grid { grid-template-columns: 1fr; }
  .nav-right { align-items: flex-end; flex-direction: column-reverse; }
}
@media (max-width: 700px) {
  .page-links { flex-wrap: wrap; }
  .codepath { grid-template-columns: 1fr; gap: 6px; }
  .nav-right { width: 100%; align-items: flex-start; }
}


/* Project social preview */
.project-preview {
  margin-top: -18px;
  margin-bottom: 42px;
}

.project-preview a {
  display: block;
  text-decoration: none;
}

.project-preview img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: 0 20px 55px rgba(15, 23, 42, .11);
  background: #fff;
}

@media (max-width: 820px) {
  .project-preview {
    margin-top: 0;
    margin-bottom: 30px;
  }
}
