:root {
  --bg: #faf8f4;
  --surface: #ffffff;
  --ink: #1d1b18;
  --muted: #6b655c;
  --line: #e6e1d8;
  --accent: #0f5c56;
  --accent-ink: #ffffff;
  --tag-bg: #ece7dd;
  --serif: "PT Serif", Georgia, serif;
  --sans: "Inter", -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #151412; --surface: #1d1c19; --ink: #ece8e1; --muted: #a39d93;
    --line: #2f2d29; --accent: #4fb3a8; --accent-ink: #0d1312; --tag-bg: #2a2824;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 var(--sans); }
a { color: inherit; text-decoration-color: var(--line); text-underline-offset: 3px; }
a:hover { color: var(--accent); text-decoration-color: currentColor; }
h1, h2, h3 { font-family: var(--serif); line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(30px, 5vw, 48px); }
h2 { font-size: clamp(22px, 3vw, 28px); }
h3 { font-size: 20px; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.wrap-narrow { max-width: 720px; margin: 0 auto; padding: 0 16px; }
section { margin: 56px auto; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.kicker { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); font-weight: 600; margin: 0 0 12px; }
.lede { font-size: 19px; color: var(--muted); max-width: 680px; }
.tag { display: inline-block; font-size: 12px; font-weight: 500; background: var(--tag-bg); border-radius: 4px; padding: 2px 8px; margin-right: 8px; text-decoration: none; }

/* header */
.top { border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 10; }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.brand { font-family: var(--serif); font-weight: 700; font-size: 20px; text-decoration: none; white-space: nowrap; }
.nav { display: flex; gap: 20px; align-items: center; font-size: 15px; }
.nav a { text-decoration: none; }
.nav a[aria-current] { color: var(--accent); }
.langs { display: flex; gap: 2px; font-size: 13px; border: 1px solid var(--line); border-radius: 6px; padding: 2px; }
.langs a { padding: 3px 7px; border-radius: 4px; color: var(--muted); }
.langs a[aria-current] { background: var(--tag-bg); color: var(--ink); font-weight: 600; }
.note { font-size: 14px; color: var(--muted); background: var(--tag-bg); border-radius: 6px; padding: 8px 12px; }
.nav-ask { background: var(--accent); color: var(--accent-ink) !important; padding: 7px 14px; border-radius: 6px; }
.topics-row { display: flex; gap: 20px; overflow-x: auto; padding-bottom: 10px; font-size: 14px; color: var(--muted); scrollbar-width: none; }
.topics-row a { text-decoration: none; white-space: nowrap; }
.topics-row a[aria-current] { color: var(--ink); font-weight: 600; }
@media (max-width: 760px) {
  .nav > a:not(.nav-ask) { display: none; }
  .nav { gap: 10px; }
}

/* buttons */
.btn { display: inline-block; background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 6px; padding: 11px 18px; font: 500 15px var(--sans); text-decoration: none; cursor: pointer; }
.btn:hover { color: var(--accent-ink); filter: brightness(1.08); }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.btn-ghost:hover { color: var(--accent); }

/* hero */
.hero { display: grid; grid-template-columns: 1.5fr 1fr; gap: 48px; align-items: center; margin-top: 48px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.photo-placeholder { aspect-ratio: 4/5; background: var(--tag-bg); border-radius: 8px; display: grid; place-items: center; color: var(--muted); }
.photo-placeholder.small { max-width: 240px; width: 100%; }
.portrait { display: block; width: 100%; height: auto; aspect-ratio: 4/5; object-fit: cover; border-radius: 8px; background: var(--tag-bg); }
.hero-photo { margin: 0; }
.two-col .portrait, .about-head .portrait { max-width: 240px; }
@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; gap: 24px; }
  .hero-photo { order: -1; max-width: 220px; margin: 0; }
}

.featured { border-left: 3px solid var(--accent); padding-left: 20px; }
.featured h2 a { text-decoration: none; }

.section-title { font-size: 22px; margin-bottom: 20px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }

.positions { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.position { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 20px; text-decoration: none; }
.position p { font-family: var(--serif); font-size: 17px; margin: 12px 0; }
.position:hover { border-color: var(--accent); color: inherit; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 32px 24px; }
.card h3 a { text-decoration: none; }
.card-sum { color: var(--muted); font-size: 15px; margin: 0; }
.meta { font-size: 13px; color: var(--muted); margin: 0 0 8px; }

.ask-band { display: flex; justify-content: space-between; align-items: center; gap: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 32px; }
.ask-band p { margin: 0; color: var(--muted); }
@media (max-width: 760px) { .ask-band { flex-direction: column; align-items: flex-start; padding: 20px; } }

/* lists */
.page-head { margin-top: 40px; }
.rows { list-style: none; padding: 0; margin: 0 0 32px; }
.row { display: grid; grid-template-columns: 150px 1fr; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.row time { color: var(--muted); font-size: 14px; padding-top: 2px; }
.row a { text-decoration: none; font-weight: 500; margin-right: 8px; }
@media (max-width: 600px) { .row { grid-template-columns: 1fr; gap: 2px; } }
.year { font-size: 18px; color: var(--muted); margin-top: 32px; }

.stance { margin: 24px 0 0; padding: 20px 24px; background: var(--surface); border-left: 3px solid var(--accent); border-radius: 0 8px 8px 0; }
.stance p { font-family: var(--serif); font-size: 20px; margin: 0 0 8px; }
.stance cite { font-style: normal; font-size: 14px; color: var(--muted); }

/* article */
.article { margin-top: 40px; }
.prose { font-family: var(--serif); font-size: 19px; line-height: 1.7; }
.prose h2, .prose h3, .prose h4 { font-size: 22px; margin-top: 1.6em; }
.prose table { border-collapse: collapse; font: 14px var(--sans); display: block; overflow-x: auto; }
.prose td, .prose th { border: 1px solid var(--line); padding: 6px 10px; }
.prose img { max-width: 100%; }
.cite-box { margin-top: 40px; padding: 16px 20px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; }
.cite-box p { margin: 0; }

/* about */
.about-head { display: grid; grid-template-columns: 1fr 240px; gap: 40px; align-items: start; }
@media (max-width: 760px) { .about-head { grid-template-columns: 1fr; } }
.two-col { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; }
@media (max-width: 760px) { .two-col { grid-template-columns: 1fr; } }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { display: grid; grid-template-columns: 140px 1fr; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.timeline p { margin: 4px 0 0; }
.tl-years { color: var(--muted); font-size: 14px; }
@media (max-width: 600px) { .timeline li { grid-template-columns: 1fr; gap: 2px; } }
.plain { padding-left: 18px; margin: 0 0 32px; }
.plain li { margin: 6px 0; }

/* ask */
.chat { display: flex; flex-direction: column; gap: 16px; margin-bottom: 16px; }
.msg { padding: 14px 18px; border-radius: 8px; }
.msg-q { background: var(--tag-bg); align-self: flex-end; max-width: 85%; }
.msg-a { background: var(--surface); border: 1px solid var(--line); }
.answer { font-family: var(--serif); font-size: 17px; line-height: 1.6; }
.answer p { margin: 0 0 .8em; }
.answer h4 { font-family: var(--sans); font-size: 15px; margin: 1.2em 0 .4em; }
.answer ul, .answer ol { padding-left: 22px; margin: 0 0 .8em; }
.sources-title { font-size: 13px; color: var(--muted); margin: 16px 0 4px; border-top: 1px solid var(--line); padding-top: 12px; }
.msg-a ol.sources { padding-left: 20px; font-size: 14px; margin: 0; }
.ask-form { display: flex; flex-direction: column; gap: 12px; }
.ask-form textarea { width: 100%; font: 16px var(--sans); padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); resize: vertical; }
.ask-form .btn { align-self: flex-end; }
.chip { font: 13px var(--sans); background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; margin: 4px 4px 0 0; cursor: pointer; }

/* footer */
.foot { border-top: 1px solid var(--line); margin-top: 80px; padding: 40px 0 24px; }
.foot-grid { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: end; }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr; } }
.foot-name { font-family: var(--serif); font-weight: 700; font-size: 18px; margin: 0; }
.foot-label { font-size: 13px; color: var(--muted); margin: 0 0 8px; }
.foot-small { font-size: 13px; margin-top: 32px; }
