/* ---------- Tokens ---------- */
:root {
  --red: #c8102e;
  --red-deep: #9b0c23;
  --red-soft: #fbe7ea;
  --ink: #17120f;
  --paper: #fbf8f3;
  --card: #ffffff;
  --muted: #625a54;
  --line: #e8e0d5;
  --on-red: #ffffff;
  --dark-band: #17120f;
  --on-dark: #f6f1ea;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 14px;
  --maxw: 1160px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --red: #ec3b52;
    --red-deep: #c8102e;
    --red-soft: #3a1a1f;
    --ink: #f4efe9;
    --paper: #12100f;
    --card: #1c1817;
    --muted: #aaa09a;
    --line: #2e2826;
    --dark-band: #080707;
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--red); text-underline-offset: 3px; }
a:hover { color: var(--red-deep); }
h1, h2, h3 { font-family: var(--serif); line-height: 1.1; letter-spacing: -0.01em; margin: 0 0 .5em; }
h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); font-weight: 800; }
h3 { font-size: 1.3rem; font-weight: 600; }
p { margin: 0 0 1em; }
::selection { background: var(--red); color: var(--on-red); }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }
.eyebrow {
  font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--red); margin-bottom: 1rem;
}
.eyebrow a { text-decoration: none; }
.lede { font-size: 1.2rem; color: var(--muted); max-width: 40em; }
section { padding: clamp(64px, 9vw, 112px) 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5em;
  padding: .8em 1.4em; border-radius: 999px; font-weight: 600; font-size: .95rem;
  text-decoration: none; border: 2px solid var(--red); transition: transform .15s, background .15s;
}
.btn:hover { transform: translateY(-2px); }
.btn-red { background: var(--red); color: var(--on-red); }
.btn-red:hover { background: var(--red-deep); border-color: var(--red-deep); color: var(--on-red); }
.btn-ghost { color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--red); color: var(--red); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-mark {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px;
  background: var(--red); color: var(--on-red); font: 800 1rem var(--serif);
}
.brand-name { font-family: var(--serif); font-weight: 600; font-size: 1.15rem; }
.site-nav { display: flex; gap: 4px; margin-left: auto; }
.lang-switch {
  display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px;
  border: 1.5px solid var(--line); border-radius: 999px; color: var(--ink);
  font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-decoration: none;
}
.lang-switch:hover { border-color: var(--red); color: var(--red); }
.lang-switch svg { width: 18px; height: 12px; border-radius: 2px; flex: none; box-shadow: 0 0 0 1px rgba(0,0,0,.08); }
.site-nav a {
  color: var(--ink); text-decoration: none; font-weight: 500; font-size: .95rem;
  padding: .45em .8em; border-radius: 8px;
}
.site-nav a:hover { background: var(--red-soft); color: var(--red); }
.site-nav a[aria-current] { color: var(--red); box-shadow: inset 0 -2px 0 var(--red); border-radius: 0; }

/* ---------- Hero ---------- */
.hero { padding: clamp(48px, 7vw, 96px) 0 clamp(56px, 8vw, 104px); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.hero h1 {
  font-size: clamp(3.2rem, 9vw, 6.8rem); font-weight: 800; line-height: .95; letter-spacing: -0.03em;
  margin-bottom: .35em;
}
.hero h1 .accent { color: var(--red); }
.hero .lede { font-size: clamp(1.1rem, 1.8vw, 1.3rem); color: var(--ink); }
.hero .lede strong { color: var(--red); font-weight: 600; }
.hero-photo { position: relative; margin: 0; justify-self: end; max-width: 400px; width: 100%; }
.hero-photo::before {
  content: ""; position: absolute; inset: 22px -22px -22px 22px;
  background: var(--red); border-radius: var(--radius);
}
.hero-photo img { position: relative; border-radius: var(--radius); aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 20%; width: 100%; }
.hero-tag {
  position: absolute; left: -18px; bottom: 28px; z-index: 1;
  background: var(--card); color: var(--ink); border: 1px solid var(--line);
  padding: 10px 14px; border-radius: 10px; font-size: .82rem; font-weight: 600;
  box-shadow: 0 10px 30px rgba(0,0,0,.12);
}
.hero-tag span { color: var(--red); }

/* ---------- Stats band ---------- */
.stats { background: var(--red); color: var(--on-red); padding: 48px 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.stat-num { font: 800 clamp(2.2rem, 4.5vw, 3.2rem)/1 var(--serif); margin-bottom: 8px; }
.stat-label { font-size: .92rem; opacity: .92; margin: 0; }

/* ---------- Split sections ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 36px; flex-wrap: wrap; }
.section-head h2 { margin: 0; }

/* ---------- Causal chain ---------- */
.chain { display: grid; gap: 10px; }
.chain-step {
  display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: center;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px;
}
.chain-step b { display: block; font-family: var(--serif); font-size: 1.08rem; }
.chain-step small { color: var(--muted); font-size: .88rem; }
.chain-num {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: var(--red-soft); color: var(--red); font: 800 1.1rem var(--serif);
}
.chain-arrow { text-align: center; color: var(--red); font-size: 1.2rem; line-height: 1; }
.chain-buffer {
  margin-top: 6px; border: 2px dashed var(--red); border-radius: 12px; padding: 12px 18px;
  font-size: .92rem; color: var(--muted);
}
.chain-buffer b { color: var(--red); }

/* ---------- Cards ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 20px; }
.card {
  display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px; color: var(--ink); text-decoration: none;
  transition: transform .18s, border-color .18s, box-shadow .18s;
}
.card:hover { transform: translateY(-4px); border-color: var(--red); color: var(--ink); box-shadow: 0 18px 40px -20px rgba(200,16,46,.45); }
.card p { color: var(--muted); font-size: .96rem; }
.card-kicker { font-size: .75rem !important; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--red) !important; }
.card-more { margin-top: auto; font-weight: 600; font-size: .9rem; color: var(--red); }
.empty { color: var(--muted); font-style: italic; }

/* ---------- Dark band (politics teaser) ---------- */
.band-dark { background: var(--dark-band); color: var(--on-dark); }
.band-dark .lede { color: #c9c0b8; }
.band-dark .btn-ghost { color: var(--on-dark); border-color: #4a423e; }
.band-dark .btn-ghost:hover { border-color: var(--red); color: #fff; }
.pill-list { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; margin: 0; }
.pill-list li {
  border: 1px solid #4a423e; border-radius: 999px; padding: .5em 1em; font-size: .9rem;
}
.pill-list li b { color: #ff6b7d; font-weight: 600; }

/* ---------- Page header ---------- */
.page-head { padding: clamp(56px, 8vw, 96px) 0 clamp(32px, 5vw, 56px); border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: clamp(2.6rem, 7vw, 4.8rem); font-weight: 800; letter-spacing: -0.025em; }
.page-head h1 .accent { color: var(--red); }

/* ---------- Timeline ---------- */
.timeline { list-style: none; padding: 0; margin: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.timeline > li { position: relative; padding: 0 0 44px 44px; }
.timeline > li::before {
  content: ""; position: absolute; left: 0; top: 7px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--paper); border: 3px solid var(--red);
}
.timeline > li.major::before { background: var(--red); }
.tl-date { font-size: .8rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--red); margin-bottom: 4px; }
.tl-org { color: var(--muted); font-style: italic; margin-bottom: .6em; }
.timeline ul { padding-left: 1.1em; color: var(--muted); }
.timeline ul li { margin-bottom: .35em; }
.timeline ul li strong { color: var(--ink); }

/* ---------- Feature boxes ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.feature .feature-num { font: 800 2.4rem/1 var(--serif); color: var(--red); margin-bottom: 14px; }
.feature p { color: var(--muted); font-size: .96rem; margin: 0; }
.callout {
  background: var(--red-soft); border-left: 5px solid var(--red); border-radius: 0 var(--radius) var(--radius) 0;
  padding: 26px 30px;
}
.callout h3 { color: var(--red); }
.callout p:last-child { margin: 0; }
.country-list { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; margin: 20px 0 0; }
.country-list li { background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: .45em 1.1em; font-weight: 600; font-size: .92rem; }

/* ---------- Prose / articles ---------- */
.article-head { padding: clamp(56px, 8vw, 96px) 24px 32px; }
.article-head h1 { font-size: clamp(2.3rem, 6vw, 3.8rem); font-weight: 800; letter-spacing: -0.02em; }
.article-meta { color: var(--muted); }
.prose { font-size: 1.1rem; line-height: 1.75; padding-bottom: 40px; }
.prose h2 { font-size: 1.8rem; margin-top: 1.8em; }
.prose h3 { margin-top: 1.5em; }
.prose blockquote {
  margin: 1.6em 0; padding: .2em 0 .2em 1.2em; border-left: 4px solid var(--red);
  font-family: var(--serif); font-size: 1.3rem; line-height: 1.45;
}
.prose img { border-radius: 10px; margin: 1.5em 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: .95rem; margin: 1.5em 0; }
.prose th, .prose td { border-bottom: 1px solid var(--line); padding: .6em .5em; text-align: left; }
.prose code { background: var(--red-soft); padding: .1em .35em; border-radius: 4px; font-size: .9em; }
.prose .footnote { font-size: .9rem; color: var(--muted); border-top: 1px solid var(--line); margin-top: 2.5em; }
.article-foot { padding-bottom: 96px; }

/* ---------- CV ---------- */
.cv-grid { display: grid; grid-template-columns: 240px 1fr; gap: 48px; }
.cv-grid + .cv-grid { margin-top: 64px; padding-top: 64px; border-top: 1px solid var(--line); }
.cv-grid > h2 { font-size: 1.7rem; }
.cv-item { margin-bottom: 28px; }
.cv-item h3 { margin-bottom: .2em; }
.cv-item p { color: var(--muted); margin: 0; }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.tag-list li { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: .4em .8em; font-size: .92rem; }

/* ---------- Facts ---------- */
.fact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.fact { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.fact .stat-num { color: var(--red); }
.fact p:last-child { color: var(--muted); margin: 0; font-size: .95rem; }
.fact-grid.compact { grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 24px; }
.fact-grid.compact .fact { padding: 14px; }
.fact-grid.compact .stat-num { font-size: 1.6rem; margin-bottom: 6px; }
.fact-grid.compact .fact p:last-child { font-size: .8rem; line-height: 1.4; }
.photo-card { position: relative; margin: 0; justify-self: center; max-width: 420px; width: 100%; }
.photo-card::before {
  content: ""; position: absolute; inset: -18px 18px 18px -18px;
  border: 3px solid var(--red); border-radius: var(--radius);
}
.photo-card img { position: relative; border-radius: var(--radius); aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 70%; width: 100%; }
.photo-card figcaption { margin-top: 12px; font-size: .85rem; color: var(--muted); text-align: center; }

/* ---------- Papers ---------- */
.paper-list { display: grid; gap: 16px; }
.paper {
  background: var(--card); border: 1px solid var(--line); border-left: 5px solid var(--red);
  border-radius: var(--radius); padding: 24px 28px;
}
.paper h3 { font-size: 1.25rem; line-height: 1.3; margin-bottom: .4em; }
.paper p { color: var(--muted); margin: 0; }
.paper .paper-status { color: var(--red); font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 8px; }
.paper:has(.wip) { border-left-color: var(--line); }
.paper .paper-status.wip { color: var(--muted); }
#papers, #articles, #politics { scroll-margin-top: 80px; }

/* ---------- Funding ---------- */
.funding-note { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: .95rem; color: var(--muted); margin-top: 18px; }
.funding-note span {
  background: var(--red); color: var(--on-red); font-size: .72rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; padding: .35em .75em; border-radius: 999px;
}
.funding { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
.funding p { color: var(--muted); font-size: .85rem; margin: 0; max-width: 46em; }
.funding img { height: 44px; width: auto; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 48px 0 28px; }
.footer-inner { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; align-items: start; }
.footer-name { font: 700 1.3rem var(--serif); margin: 0 0 4px; }
.footer-meta { color: var(--muted); font-size: .9rem; }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-links a { color: var(--ink); text-decoration: none; font-weight: 500; }
.footer-links a:hover { color: var(--red); }
.copyright { color: var(--muted); font-size: .82rem; margin: 24px 0 0; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-grid, .split, .cv-grid { grid-template-columns: 1fr; }
  .cv-grid { gap: 16px; }
  .hero-photo { justify-self: start; max-width: 320px; margin-right: 22px; order: -1; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-grid { grid-template-columns: 1fr; }
  .fact-grid.compact { grid-template-columns: 1fr 1fr; }
  .photo-card { margin: 18px 0 0 18px; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .article-head { padding-left: 16px; padding-right: 16px; }
  .brand-name { display: none; }
  .site-nav { gap: 0; }
  .site-nav a { padding: .45em .35em; font-size: .8rem; white-space: nowrap; }
  .header-inner { gap: 6px; }
  .brand-mark { width: 32px; height: 32px; font-size: .9rem; }
  .lang-switch { height: 28px; padding: 0 6px; gap: 4px; font-size: .7rem; }
  .lang-switch span { display: none; }
  .lang-switch svg { width: 20px; height: 13px; }
  .hero-photo { max-width: 240px; }
  .hero-tag { left: auto; right: -10px; }
  .stats-grid { gap: 24px; }
  .callout { padding: 20px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
