:root {
  --bg: #0d1117;
  --bg-alt: #11161f;
  --surface: #161c26;
  --border: #232c3a;
  --text: #d7dee9;
  --text-dim: #96a2b4;
  --accent: #6ea8fe;
  --accent-dim: #3d6fb5;
  --radius: 12px;
  --wrap: 1080px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

.narrow { max-width: 740px; }

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(13, 17, 23, 0.88);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
}
.brand:hover { text-decoration: none; }

.brand-mark { width: 30px; height: 30px; color: var(--accent); flex: none; }

.brand-name {
  font-weight: 650;
  letter-spacing: -0.01em;
  font-size: 1.05rem;
}
.brand-name em {
  display: block;
  font-style: normal;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  font-weight: 500;
}

.site-nav {
  display: flex;
  gap: 26px;
  font-size: 0.94rem;
}
.site-nav a { color: var(--text-dim); }
.site-nav a:hover { color: var(--text); text-decoration: none; }

/* ---------- hero ---------- */

.hero {
  padding: 92px 0 64px;
  background:
    radial-gradient(900px 380px at 18% -10%, rgba(110, 168, 254, 0.14), transparent 62%),
    radial-gradient(700px 320px at 92% 0%, rgba(110, 168, 254, 0.07), transparent 60%);
  border-bottom: 1px solid var(--border);
}

.eyebrow {
  margin: 0 0 18px;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
}

.hero h1 {
  margin: 0 0 22px;
  font-size: clamp(2.1rem, 5.2vw, 3.4rem);
  line-height: 1.12;
  letter-spacing: -0.022em;
  font-weight: 680;
  max-width: 21ch;
}

.lede {
  margin: 0 0 30px;
  font-size: clamp(1.02rem, 1.6vw, 1.16rem);
  color: var(--text-dim);
  max-width: 62ch;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 0; }

.btn {
  display: inline-block;
  padding: 11px 20px;
  border-radius: 9px;
  background: var(--accent);
  color: #07111f;
  font-weight: 620;
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition: transform 0.12s ease, background 0.12s ease;
}
.btn:hover { text-decoration: none; background: #8ab8fe; transform: translateY(-1px); }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover { background: var(--surface); }

/* ---------- stats ---------- */

.stats { border-bottom: 1px solid var(--border); }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  padding-top: 34px;
  padding-bottom: 34px;
}

.stat {
  padding: 4px 28px;
  border-left: 1px solid var(--border);
}
.stat:first-child { border-left: 0; padding-left: 24px; }

.stat-num {
  display: block;
  font-size: 1.7rem;
  font-weight: 680;
  letter-spacing: -0.02em;
  color: var(--text);
}
.stat-label {
  display: block;
  margin-top: 4px;
  font-size: 0.88rem;
  color: var(--text-dim);
  max-width: 26ch;
}

/* ---------- sections ---------- */

.section { padding: 76px 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.section h2 {
  margin: 0 0 24px;
  font-size: clamp(1.45rem, 2.6vw, 1.95rem);
  line-height: 1.22;
  letter-spacing: -0.018em;
  font-weight: 660;
}

.section p { margin: 0 0 18px; color: var(--text-dim); }
.section p:last-child { margin-bottom: 0; }

.section-lede {
  margin: -10px 0 34px;
  font-size: 1.02rem;
  color: var(--text-dim);
  max-width: 64ch;
}

.note {
  margin-top: 26px;
  padding: 16px 18px;
  border-left: 3px solid var(--accent-dim);
  background: rgba(110, 168, 254, 0.06);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.95rem;
}

/* ---------- cards ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin-top: 8px;
}

.card {
  padding: 26px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.card h3 {
  margin: 0 0 10px;
  font-size: 1.06rem;
  letter-spacing: -0.01em;
  font-weight: 640;
}
.card p { margin: 0; font-size: 0.96rem; color: var(--text-dim); }

/* ---------- publications ---------- */

.pubs { list-style: none; margin: 0; padding: 0; }

.pubs li { border-top: 1px solid var(--border); }
.pubs li:last-child { border-bottom: 1px solid var(--border); }

.pubs details { padding: 18px 0; }
.pubs summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 18px;
}
.pubs summary::-webkit-details-marker { display: none; }
.pubs summary::before {
  content: "+";
  display: inline-block;
  width: 1.1em;
  color: var(--accent);
  font-weight: 600;
}
.pubs details[open] summary::before { content: "–"; }

.pub-title {
  font-weight: 600;
  color: var(--text);
  flex: 1 1 24ch;
}
.pub-meta {
  font-size: 0.86rem;
  color: var(--text-dim);
  white-space: nowrap;
}
.pubs details p {
  margin: 14px 0 2px;
  padding-left: 1.1em;
  font-size: 0.96rem;
  color: var(--text-dim);
}

/* ---------- footer ---------- */

.site-footer { padding: 44px 0 56px; }

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 28px;
  align-items: baseline;
}

.footer-brand {
  margin: 0;
  font-weight: 620;
  font-size: 0.95rem;
  color: var(--text);
}
.footer-note {
  margin: 0;
  font-size: 0.86rem;
  color: var(--text-dim);
}

/* ---------- 404 ---------- */

.error-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 24px;
}
.error-code {
  font-size: clamp(3.4rem, 12vw, 6rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  margin: 0 0 10px;
  color: var(--accent);
}
.error-page h1 { margin: 0 0 14px; font-size: 1.5rem; font-weight: 640; }
.error-page p { color: var(--text-dim); margin: 0 auto 26px; max-width: 46ch; }

/* ---------- responsive ---------- */

@media (max-width: 820px) {
  .site-nav { gap: 18px; font-size: 0.88rem; }
  .stats-grid { grid-template-columns: 1fr; gap: 22px; }
  .stat { border-left: 0; padding: 0; }
  .stat:first-child { padding-left: 0; }
  .stat-label { max-width: none; }
  .cards { grid-template-columns: 1fr; }
  .hero { padding: 68px 0 52px; }
  .section { padding: 58px 0; }
}

@media (max-width: 560px) {
  .header-inner { flex-direction: column; align-items: flex-start; gap: 12px; padding-top: 14px; padding-bottom: 14px; }
  .site-nav { flex-wrap: wrap; gap: 14px; }
  .brand-name em { display: none; }
  body { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}

@media print {
  .site-header, .hero-actions, .site-footer { display: none; }
  body { background: #fff; color: #000; }
  .section-alt, .card { background: #fff; }
}
