:root {
  --bg: #f5f4ef;
  --surface: #ffffff;
  --text: #15191f;
  --muted: #5d6573;
  --line: #e4e2da;
  --accent: #1f5f4f;        /* deep spruce */
  --accent-soft: #e3efe9;
  --highlight: #c8892b;     /* warm ochre */
  --shadow: 0 1px 2px rgba(20,25,31,.04), 0 8px 24px rgba(20,25,31,.06);
  --wide: 72rem;
  --prose: 44rem;
  --serif: "Fraunces", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1216; --surface: #171b21; --text: #e9ebee; --muted: #9aa3b0; --line: #262c35;
    --accent: #6cc3a6; --accent-soft: #1b2b27; --highlight: #e3ae5c;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25);
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.7 var(--sans); }
a { color: var(--accent); text-underline-offset: 3px; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.01em; }
h1, h2 { font-family: var(--serif); font-weight: 600; }
h1 { font-size: clamp(2.2rem, 4vw, 3.4rem); margin: 0 0 1rem; }
h2 { font-size: 1.6rem; margin: 0 0 1.25rem; }
h3 { font-size: 1.05rem; margin: 0 0 .3rem; }
code { font-size: .88em; background: var(--accent-soft); padding: .1em .35em; border-radius: 4px; }
time { color: var(--muted); font-size: .85rem; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* Frame */
.wrap { max-width: var(--wide); margin: 0 auto; padding: 0 1.5rem; }
header.site { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
header.site .wrap { display: flex; align-items: center; justify-content: space-between; height: 4rem; }
.brand { display: flex; align-items: center; gap: .6rem; font-weight: 700; color: var(--text); text-decoration: none; }
.mark { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 8px; background: var(--accent); color: var(--bg); font: 600 .8rem var(--sans); letter-spacing: .02em; }
nav { display: flex; gap: .25rem; }
nav a { color: var(--muted); text-decoration: none; font-size: .95rem; padding: .4rem .8rem; border-radius: 8px; }
nav a:hover { color: var(--text); background: var(--accent-soft); }
nav a[aria-current="page"] { color: var(--accent); background: var(--accent-soft); font-weight: 600; }
main { padding: 3.5rem 0 5rem; }
section + section { margin-top: 4.5rem; }
footer.site { border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; }
footer.site .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; padding-top: 1.5rem; padding-bottom: 2.5rem; }
footer.site a { color: var(--muted); }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: .4rem; padding: .65rem 1.15rem; border-radius: 10px; font-weight: 600; font-size: .95rem; text-decoration: none; border: 1px solid var(--line); color: var(--text); background: var(--surface); }
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.btn.primary:hover { filter: brightness(1.08); }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }

/* Hero */
.hero { display: grid; grid-template-columns: 1.6fr 1fr; gap: 3rem; align-items: center; }
.eyebrow { display: inline-block; margin: 0 0 1rem; color: var(--accent); font-size: .8rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.lede { font-size: 1.2rem; color: var(--muted); max-width: 38rem; margin: 0; }
.lede strong { color: var(--text); }
.profile-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 1.75rem; box-shadow: var(--shadow); }
.avatar { display: grid; place-items: center; width: 4.5rem; height: 4.5rem; border-radius: 50%; margin-bottom: 1rem; background: linear-gradient(135deg, var(--accent), var(--highlight)); color: #fff; font: 600 1.5rem var(--serif); }
.profile-card h3 { font-size: 1.2rem; }
.profile-card .role { color: var(--muted); margin: 0 0 1.25rem; }
.facts { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.facts li { display: flex; justify-content: space-between; gap: 1rem; padding: .6rem 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.facts li span:first-child { color: var(--muted); }
.facts li span:last-child { font-weight: 600; text-align: right; }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 1.5rem; }
.card .num { color: var(--highlight); font: 600 .85rem var(--sans); letter-spacing: .05em; }
.card p { margin: .4rem 0 0; color: var(--muted); font-size: .95rem; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.section-head a { font-weight: 600; font-size: .95rem; text-decoration: none; }

/* Post list */
.post-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
.post-list li { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; transition: border-color .15s, transform .15s; }
.post-list li:hover { border-color: var(--accent); transform: translateY(-1px); }
.post-list a { display: block; padding: 1.25rem 1.5rem; color: inherit; text-decoration: none; }
.post-list .title { display: block; font: 600 1.2rem/1.3 var(--serif); margin: .15rem 0 .3rem; }
.post-list p { margin: 0; color: var(--muted); font-size: .95rem; }

/* Page intro */
.page-intro { max-width: var(--prose); margin-bottom: 3rem; }
.page-intro p { font-size: 1.15rem; color: var(--muted); margin: 0; }

/* About */
.about-grid { display: grid; grid-template-columns: 1fr 18rem; gap: 4rem; align-items: start; }
.about-grid aside { position: sticky; top: 6rem; display: grid; gap: 1.25rem; }
.side-box { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 1.25rem 1.4rem; }
.side-box h3 { font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: .6rem; }
.side-box p { margin: 0; font-size: .95rem; }
.tags { display: flex; flex-wrap: wrap; gap: .4rem; }
.tags span { background: var(--accent-soft); color: var(--accent); border-radius: 999px; padding: .2rem .7rem; font-size: .85rem; font-weight: 600; }
.timeline { list-style: none; padding: 0; margin: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 7px; top: .5rem; bottom: .5rem; width: 2px; background: var(--line); }
.timeline li { position: relative; padding: 0 0 2rem 2.25rem; }
.timeline li::before { content: ""; position: absolute; left: 0; top: .4rem; width: 16px; height: 16px; border-radius: 50%; background: var(--bg); border: 3px solid var(--accent); }
.timeline li:first-child::before { background: var(--accent); }
.timeline h3 { font-size: 1.15rem; }
.timeline .role-line { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 1rem; margin: 0; }
.timeline .notes { margin: .4rem 0 0; color: var(--muted); font-size: .95rem; }

/* Article */
.post { max-width: var(--prose); margin: 0 auto; font-size: 1.1rem; }
.post .meta { font-size: .9rem; color: var(--muted); margin: 0 0 1rem; }
.post .meta a { text-decoration: none; }
.post h1 { margin-bottom: 2rem; }
.prose { max-width: var(--prose); }

@media (max-width: 860px) {
  .hero, .about-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .about-grid aside { position: static; }
  .cards { grid-template-columns: 1fr; }
  main { padding-top: 2.5rem; }
}
@media (max-width: 480px) {
  .brand .name { display: none; }
}
