@font-face { font-family: "Fraunces"; src: url(/fonts/fraunces-latin-opsz-normal.woff2) format("woff2-variations"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url(/fonts/inter-latin-wght-normal.woff2) format("woff2-variations"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url(/fonts/inter-latin-wght-italic.woff2) format("woff2-variations"); font-weight: 100 900; font-style: italic; font-display: swap; }

:root {
  --text: #1a1a1a;
  --muted: #6b6b6b;
  --bg: #fdfdfc;
  --link: #c2410c;
  --rule: #e5e5e5;
  --border: #d4d4d0;
  --serif: "Fraunces", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --text: #e8e8e6; --muted: #9a9a96; --bg: #161616; --link: #fb923c; --rule: #2e2e2e; --border: #444441; }
}
* { box-sizing: border-box; }
body {
  margin: 0 auto;
  max-width: 40rem;
  padding: 3rem 1.25rem 5rem;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.7 var(--sans);
}
a { color: var(--link); text-underline-offset: 2px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 3rem; font-size: 0.95rem; }
header .name { color: var(--text); font-family: var(--serif); font-size: 1.15rem; font-weight: 600; text-decoration: none; }
header nav a { color: var(--muted); text-decoration: none; }
header nav a:hover { color: var(--text); }
h1, h2, h3 { font-family: var(--serif); line-height: 1.2; font-weight: 600; letter-spacing: -0.01em; }
h1 { font-size: 2.4rem; margin: 0 0 0.4rem; }
h2 { font-size: 1.3rem; margin-top: 2.5rem; }
time { color: var(--muted); font-size: 0.85rem; font-variant-numeric: tabular-nums; }
article > time { display: block; margin-bottom: 2rem; }
.intro { font-size: 1.1rem; }
.posts { list-style: none; padding: 0; }
.posts li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.4rem 0; border-bottom: 1px solid var(--rule); }
.posts time { white-space: nowrap; }
img { max-width: 100%; height: auto; display: block; margin: 1.5rem auto; }
blockquote { margin: 1.5rem 0; padding-left: 1rem; border-left: 3px solid var(--rule); color: var(--muted); }
pre { overflow-x: auto; padding: 1rem; background: var(--rule); border-radius: 4px; font-size: 0.85rem; }
code { font-size: 0.9em; }
/* Wide tables scroll inside their wrapper instead of widening the page. */
.table-wrap { overflow-x: auto; margin: 1.5rem 0; }
table { border-collapse: collapse; font-size: 0.9rem; line-height: 1.5; }
th, td { border: 1px solid var(--border); padding: 0.4rem 0.65rem; text-align: left; vertical-align: top; }
th { background: var(--rule); font-weight: 600; }
[align="right"] { text-align: right; }
[align="center"] { text-align: center; }
td code { white-space: nowrap; }
/* On phones, let tables keep readable column widths and scroll instead of squeezing. */
@media (max-width: 600px) { table { width: max-content; } th, td { max-width: 13rem; } }
hr { border: 0; border-top: 1px solid var(--rule); margin: 2.5rem 0; }
@media (max-width: 480px) { .posts li { flex-direction: column; gap: 0; } }
/* "In this post": collapsed at the top of the post on narrow screens, a sticky sidebar in the right margin on wide ones. */
h2[id], h3[id] { scroll-margin-top: 1.5rem; }
.post { position: relative; }
.toc { display: none; }
.toc nav, .toc-inline { font-size: 0.85rem; line-height: 1.4; }
.toc-inline { margin: -1rem 0 2rem; }
.toc-inline summary { color: var(--muted); cursor: pointer; width: max-content; }
.toc-inline summary:hover { color: var(--text); }
.toc ul, .toc-inline ul { list-style: none; margin: 0; padding: 0 0 0 0.9rem; border-left: 1px solid var(--rule); }
.toc-inline ul { margin-top: 0.6rem; }
.toc li, .toc-inline li { margin: 0.45rem 0; }
.toc .toc-h3, .toc-inline .toc-h3 { padding-left: 0.9rem; }
.toc a, .toc-inline a { color: var(--muted); text-decoration: none; }
.toc a:hover, .toc-inline a:hover { color: var(--text); }
@media (min-width: 76rem) {
  .toc-inline { display: none; }
  .toc { display: block; position: absolute; top: 0; bottom: 0; left: calc(100% + 3rem); width: 14rem; }
  .toc nav { position: sticky; top: 2rem; max-height: calc(100vh - 4rem); overflow-y: auto; }
  .toc p { margin: 0 0 0.6rem; color: var(--muted); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
}
