/* Minimal editorial theme */

:root {
  --bg: #fdfcf9;
  --text: #22201c;
  --muted: #6f6a62;
  --rule: #e4e0d8;
  --link: #8a3b12;
  --code-bg: #f3f0ea;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

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

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1a1917;
    --text: #e6e2da;
    --muted: #9a948a;
    --rule: #34312c;
    --link: #e0a27a;
    --code-bg: #24221f;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0 auto;
  max-width: var(--measure);
  padding: 3rem 1.25rem 4rem;
  background: var(--bg);
  color: var(--text);
  font-family: var(--serif);
  font-size: 1.1875rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

a { color: var(--link); text-underline-offset: 0.15em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

/* Header & footer */

.site-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem 1.5rem;
  margin-bottom: 4rem;
  font-family: var(--sans);
  font-size: 0.9375rem;
}
.site-header a { color: var(--text); text-decoration: none; }
.site-header a:hover { color: var(--link); }
.site-title { font-weight: 600; letter-spacing: -0.01em; }
.site-header nav { display: flex; gap: 1.25rem; }
.site-header nav a { color: var(--muted); }

.site-footer {
  margin-top: 5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.875rem;
}

/* Post list */

.post-list { list-style: none; padding: 0; margin: 0; }
.post-list li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.25rem 1rem;
  padding: 0.6rem 0;
}
.post-list a { font-size: 1.25rem; text-decoration: none; color: var(--text); }
.post-list a:hover { color: var(--link); }

time {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
}

/* Post */

.post-header { margin-bottom: 2.5rem; }
.post-header h1 { margin: 0 0 0.5rem; }

h1, h2, h3 { line-height: 1.2; font-weight: 600; letter-spacing: -0.01em; }
h1 { font-size: 2.25rem; }
h2 { font-size: 1.5rem; margin-top: 2.5em; }
h3 { font-size: 1.2rem; margin-top: 2em; }

.prose p, .prose ul, .prose ol { margin: 0 0 1.25em; }
.prose li + li { margin-top: 0.3em; }

blockquote {
  margin: 1.75em 0;
  padding-left: 1.25em;
  border-left: 2px solid var(--rule);
  color: var(--muted);
  font-style: italic;
}

hr { border: 0; border-top: 1px solid var(--rule); margin: 3em auto; width: 30%; }

img, video { max-width: 100%; height: auto; display: block; margin: 2em auto; }
figcaption { text-align: center; color: var(--muted); font-size: 0.9rem; margin-top: -1.25em; }

code {
  font-family: var(--mono);
  font-size: 0.85em;
  background: var(--code-bg);
  padding: 0.1em 0.35em;
  border-radius: 3px;
}
pre {
  background: var(--code-bg);
  padding: 1rem 1.25rem;
  overflow-x: auto;
  border-radius: 4px;
  font-size: 0.875rem;
  line-height: 1.55;
}
pre code { background: none; padding: 0; font-size: inherit; }

.back { margin-top: 3rem; font-family: var(--sans); font-size: 0.9375rem; }
