/* ============================================
   SITE — one readable column, no motion.
   Geist for text and headings, Geist Mono for
   small labels.
   Paper and ink, with red kept to small marks.
   ============================================ */

/* Fonts: self-hosted (OFL, fonts/OFL.txt) */
@font-face {
  font-family: 'Geist';
  src: url('../fonts/geist-latin.woff2') format('woff2');
  font-weight: 300 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Geist Mono';
  src: url('../fonts/geist-mono-latin.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #f2efe8;
  --text: #0e0f12;
  --soft: #4a4b50;
  --faint: #7b7a76;
  --rule: #d9d4c9;
  --mark: #e0321f;
  --code-bg: #e7e3d9;

  --sans: 'Geist', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'Geist Mono', ui-monospace, Menlo, monospace;

  --measure: 40rem;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e0f12;
    --text: #ecebe6;
    --soft: #b4b3ae;
    --faint: #85847f;
    --rule: #2a2b30;
    --code-bg: #17181c;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}

.page {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 4.5rem 1.25rem 5rem;
}

a { color: inherit; text-decoration: underline; text-decoration-color: var(--faint); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-color: var(--mark); }
a:focus-visible { outline: 2px solid var(--mark); outline-offset: 3px; border-radius: 2px; }

p { margin: 0; }
p + p { margin-top: 1em; }
strong { font-weight: 500; }

.label {
  font: 400 0.75rem/1.4 var(--mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--faint);
}

/* ---------- Header ---------- */
.intro__name {
  margin: 0;
  font: 600 clamp(2rem, 1.6rem + 2vw, 2.6rem)/1.1 var(--sans);
  letter-spacing: -0.03em;
}
.intro__name::before {
  content: '';
  display: inline-block;
  width: 0.32em; height: 0.32em;
  margin-right: 0.35em;
  vertical-align: 0.08em;
  background: var(--mark);
}
.intro__role { margin-top: 0.9rem; }
.intro__bio { margin-top: 1.75rem; font-size: 1.15rem; line-height: 1.6; }
.intro__bio + .intro__bio { margin-top: 0.9rem; color: var(--soft); font-size: 1.0625rem; }

.links { display: flex; flex-wrap: wrap; gap: 0.4rem 1.25rem; margin: 1.75rem 0 0; padding: 0; list-style: none; }
.links a { font: 400 0.8rem/1.4 var(--mono); letter-spacing: 0.04em; text-transform: uppercase; }

.back { display: inline-block; margin-bottom: 2.5rem; text-decoration: none; }
.back:hover { color: var(--text); }

/* ---------- Sections ---------- */
.section { margin-top: 4.5rem; }
.section > .label {
  display: block;
  padding-bottom: 0.6rem;
  margin: 0 0 1.75rem;
  border-bottom: 1px solid var(--rule);
}

.entry + .entry { margin-top: 2.75rem; }
.entry__title { margin: 0; font: 600 1.3rem/1.25 var(--sans); letter-spacing: -0.02em; }
.entry__title a { text-decoration: none; }
.entry__title a:hover { text-decoration: underline; text-decoration-color: var(--mark); }
.entry__meta { margin-top: 0.35rem; }
.entry__body { margin-top: 0.8rem; color: var(--soft); }

.stats { display: flex; flex-wrap: wrap; gap: 0.6rem 2rem; margin: 1rem 0 0; }
.stats div { display: flex; flex-direction: column-reverse; }
.stats dt { font: 400 0.7rem/1.4 var(--mono); letter-spacing: 0.04em; text-transform: uppercase; color: var(--faint); }
.stats dd { margin: 0; font: 500 1.35rem/1.25 var(--sans); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }

.case p { color: var(--soft); }
.case strong { color: var(--text); }

.rules { margin: 0; padding: 0; list-style: none; counter-reset: rule; }
.rules li { position: relative; padding-left: 2.25rem; counter-increment: rule; }
.rules li + li { margin-top: 1.1rem; }
.rules li::before { content: counter(rule, decimal-leading-zero); position: absolute; left: 0; top: 0.3em; font: 400 0.75rem/1.4 var(--mono); color: var(--mark); }
.rules strong { display: block; }
.rules span { color: var(--soft); }

.posts { margin: 0; padding: 0; list-style: none; }
.posts li { display: flex; gap: 1.5rem; align-items: baseline; }
.posts li + li { margin-top: 0.75rem; }
.posts time { flex: none; width: 6.5rem; }

.footer { margin-top: 5rem; padding-top: 1.25rem; border-top: 1px solid var(--rule); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem; }

@media (max-width: 520px) {
  .page { padding-top: 3rem; }
  .posts li { flex-direction: column; gap: 0.1rem; }
}

/* ---------- Posts ---------- */
.post__title { text-wrap: balance; margin: 0.75rem 0 0; font: 600 clamp(1.9rem, 1.5rem + 1.8vw, 2.5rem)/1.1 var(--sans); letter-spacing: -0.03em; }
.post__desc { margin-top: 1rem; color: var(--soft); font-size: 1.15rem; }

.prose { margin-top: 3rem; }
.prose > * + * { margin-top: 1.2em; }
.prose h2 { margin-top: 2.5em; font: 600 1.45rem/1.25 var(--sans); letter-spacing: -0.02em; }
.prose h3 { margin-top: 2em; font: 500 1.1rem/1.3 var(--sans); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: 0.4em; }
.prose img { display: block; max-width: 100%; height: auto; border-radius: 4px; }
.prose br { display: none; }
.prose blockquote { margin: 1.5em 0; padding-left: 1.2em; border-left: 2px solid var(--mark); color: var(--soft); }
.prose code { font: 0.88em var(--mono); background: var(--code-bg); padding: 0.1em 0.3em; border-radius: 3px; }
.prose pre { margin: 0; overflow-x: auto; padding: 1rem 1.1rem; background: var(--code-bg); border-radius: 4px; font-size: 0.85rem; line-height: 1.55; }
.prose pre code { background: none; padding: 0; font-size: inherit; }
.code-block__head { padding: 0 0 0.35rem; }
.hljs-keyword, .hljs-built_in { color: var(--mark); }
.hljs-string { color: #3f7d4e; }
.hljs-number, .hljs-literal { color: #8a5a00; }
.hljs-comment { color: var(--faint); font-style: italic; }
@media (prefers-color-scheme: dark) {
  .hljs-string { color: #8fc79c; }
  .hljs-number, .hljs-literal { color: #e0b25c; }
}
