:root {
  color-scheme: light dark;
  --bg: #fdfdfc;
  --fg: #1c1c1a;
  --muted: #5f5f59;
  --rule: #e3e3de;
  --accent: #9a3412;
  --code-bg: #f4f4f1;
  --measure: 34rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16161a;
    --fg: #e6e6e1;
    --muted: #a0a099;
    --rule: #2e2e34;
    --accent: #f0a882;
    --code-bg: #1f1f25;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding-block: 3rem 4rem;
  padding-inline: 1.25rem;
  background: var(--bg);
  color: var(--fg);
  font: 17px/1.65 ui-serif, Georgia, "Iowan Old Style", "Times New Roman", serif;
  -webkit-text-size-adjust: 100%;
}

.wrap { max-width: var(--measure); margin-inline: auto; }

a { color: var(--accent); text-underline-offset: 2px; }
a:hover { text-decoration: none; }

.masthead {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
  padding-bottom: 1rem;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--rule);
}
.masthead a.brand {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--fg);
  text-decoration: none;
}
.masthead nav { font-size: 0.85rem; }
.masthead nav a { margin-left: 1rem; color: var(--muted); text-decoration: none; }
.masthead nav a:hover { color: var(--accent); }

h1 { font-size: 1.95rem; line-height: 1.2; margin: 0 0 0.4rem; letter-spacing: -0.015em; }
h2 { font-size: 1.3rem; line-height: 1.3; margin: 2.6rem 0 0.8rem; letter-spacing: -0.01em; }
h3 { font-size: 1.05rem; margin: 2rem 0 0.6rem; }

.meta { color: var(--muted); font-size: 0.85rem; margin: 0 0 2.5rem; }
.lede { color: var(--muted); }

code, pre, table {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
code { background: var(--code-bg); padding: 0.1em 0.35em; border-radius: 3px; font-size: 0.85em; }
pre {
  background: var(--code-bg);
  padding: 0.9rem 1rem;
  border-radius: 6px;
  overflow-x: auto;
  font-size: 0.8rem;
  line-height: 1.55;
}
pre code { background: none; padding: 0; font-size: inherit; }

.table-scroll { overflow-x: auto; margin: 1.4rem 0; }
table { border-collapse: collapse; width: 100%; font-size: 0.8rem; }
th, td { text-align: left; padding: 0.45rem 0.7rem; border-bottom: 1px solid var(--rule); white-space: nowrap; }
th { font-weight: 600; color: var(--muted); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; }

blockquote {
  margin: 1.4rem 0;
  padding-left: 1rem;
  border-left: 2px solid var(--rule);
  color: var(--muted);
}

hr { border: 0; border-top: 1px solid var(--rule); margin: 3rem 0; }

img { max-width: 100%; height: auto; }

.post-list { list-style: none; padding: 0; margin: 0; }
.post-list li { padding-bottom: 1.6rem; margin-bottom: 1.6rem; border-bottom: 1px solid var(--rule); }
.post-list li:last-child { border-bottom: 0; }
.post-list h2 { margin: 0 0 0.3rem; font-size: 1.15rem; }
.post-list h2 a { color: var(--fg); text-decoration: none; }
.post-list h2 a:hover { color: var(--accent); }
.post-list time { color: var(--muted); font-size: 0.8rem; }
.post-list p { margin: 0.4rem 0 0; color: var(--muted); font-size: 0.92rem; }

footer.site {
  margin-top: 4rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.82rem;
}
footer.site a { color: var(--muted); }
