:root {
  --bg: #fdfdfb; --fg: #1b1b1a; --muted: #6a6a64; --rule: #e4e4de;
  --link: #1f4e79; --accent: #8a3b2e;
  --serif: Charter, "Bitstream Charter", "Sitka Text", Cambria, Georgia, serif;
  --mono: "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16171a; --fg: #dcdcd4; --muted: #989289; --rule: #2b2d32;
    --link: #82b4e2; --accent: #db8c7d;
  }
}

* { box-sizing: border-box; }
html { font-size: 19px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font-family: var(--serif); line-height: 1.55;
  text-rendering: optimizeLegibility; font-kerning: normal;
}

header.site, footer.site, main { max-width: 38rem; margin-inline: auto; padding-inline: 1rem; }
header.site { padding-block: 1.5rem; font-size: .8rem; letter-spacing: .05em; text-transform: lowercase; }
header.site a { color: var(--muted); text-decoration: none; }
footer.site { padding-block: 1.2rem; margin-top: 4rem; border-top: 1px solid var(--rule);
  color: var(--muted); font-size: .8rem; letter-spacing: .04em; text-transform: lowercase; }
footer.site a { color: var(--muted); }

article h1 { font-size: 1.75rem; line-height: 1.2; font-weight: 600; margin: .3rem 0 .2rem; }
.meta { color: var(--muted); font-size: .82rem; margin: 0 0 2rem; }
.meta a.tag { color: var(--muted); text-decoration: none; }
.meta a.tag:hover { color: var(--accent); }
.tagline { color: var(--muted); font-style: italic; margin: .5rem 0 2rem; }

a { color: var(--link); text-decoration-thickness: .06em; text-underline-offset: .12em; }
h2 { font-size: 1.25rem; margin-top: 2.2rem; }
h3 { font-size: 1.05rem; margin-top: 1.6rem; }
p, li { hyphens: auto; }
blockquote { margin: 1.4rem 0; padding-left: 1rem; border-left: 2px solid var(--rule); color: var(--muted); }

code { font-family: var(--mono); font-size: .85em; }
pre { font-family: var(--mono); font-size: .8rem; line-height: 1.45; padding: .9rem 1rem;
  overflow-x: auto; background: rgba(128,128,128,.09); border-radius: 4px; }
pre code { font-size: inherit; background: none; padding: 0; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 2.5rem 0; }

ul.posts, ul.tags { list-style: none; padding: 0; }
ul.posts li { margin: 0 0 1.6rem; }
ul.posts a { text-decoration: none; font-size: 1.12rem; }
ul.posts .date, ul.tags .date { color: var(--muted); font-size: .78rem; }
ul.posts p { margin: .15rem 0 0; color: var(--muted); font-size: .92rem; }
ul.tags li { display: inline-block; margin: 0 1rem .4rem 0; }
ul.tags a { text-decoration: none; }

/* Tufte-ish sidenotes: in the margin on wide screens, inline otherwise. */
.sidenote { font-size: .8rem; color: var(--muted); line-height: 1.4; }
@media (min-width: 60rem) {
  .sidenote { float: right; clear: right; width: 13rem; margin-right: -15rem; margin-bottom: 1rem; }
}

/* Syntax highlighting — skylighting class names, our own light/dark palette
   (pandoc classifies the tokens; we colour them, so the code block uses the
   page background and adapts to dark mode). */
:root {
  --c-com: #6a737d; --c-kw: #8a3b2e; --c-str: #2a7d4f; --c-num: #9a5a00;
  --c-fun: #1f4e79; --c-typ: #2a6f7d; --c-bul: #1f4e79;
}
@media (prefers-color-scheme: dark) {
  :root {
    --c-com: #8a93a0; --c-kw: #e0997f; --c-str: #8fc7a0; --c-num: #d6a86a;
    --c-fun: #82b4e2; --c-typ: #7fc6c0; --c-bul: #82b4e2;
  }
}
code span.co { color: var(--c-com); font-style: italic; }
code span.kw, code span.cf { color: var(--c-kw); }
code span.st, code span.ch, code span.vs, code span.ss { color: var(--c-str); }
code span.dv, code span.bn, code span.fl { color: var(--c-num); }
code span.fu { color: var(--c-fun); }
code span.dt { color: var(--c-typ); }
code span.bu, code span.op, code span.ot, code span.va { color: var(--c-bul); }
