:root {
  --ink: #1d1d1b;
  --muted: #6f6a63;
  --faint: #d9d4cc;
  --bg: #fbf9f5;
  --accent: #96421f;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #d9d6d2;
    --muted: #8e8a85;
    --faint: #373533;
    --bg: #161513;
    --accent: #d98a5f;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
  max-width: 42rem;
  font-family: Charter, "Bitstream Charter", "Sitka Text", Cambria, Georgia, serif;
  font-size: 1.125rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  text-rendering: optimizeLegibility;
}

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

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: 0.75rem;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--faint);
  font-size: 0.95rem;
}
.site-name { color: var(--ink); text-decoration: none; font-weight: 700; }
.site-header nav a { margin-left: 1rem; color: var(--muted); }

.intro { margin-bottom: 2.5rem; }
.intro p { margin: 0.5rem 0; }

.post-list { list-style: none; padding: 0; margin: 0; }
.post-list li { margin-bottom: 2rem; }
.post-list time { font-size: 0.85rem; color: var(--muted); }
.post-list h2 { margin: 0.15rem 0 0.25rem; font-size: 1.25rem; line-height: 1.35; }
.post-list h2 a { color: var(--ink); text-decoration: none; }
.post-list h2 a:hover { color: var(--accent); }
.post-desc { margin: 0; color: var(--muted); font-size: 1rem; }

.back-link { display: inline-block; margin-bottom: 1.5rem; color: var(--muted); text-decoration: none; font-size: 0.9rem; }
.back-link:hover { color: var(--accent); }

.post-header { margin-bottom: 2rem; }
.post-header h1 { font-size: 1.8rem; line-height: 1.25; margin: 0 0 0.35rem; }
.post-header time { color: var(--muted); font-size: 0.9rem; }

article h2 { font-size: 1.3rem; line-height: 1.3; margin: 2.25rem 0 0.75rem; }
article p { margin: 0 0 1.1rem; }
article ul, article ol { padding-left: 1.4rem; margin: 0 0 1.1rem; }
article li { margin-bottom: 0.5rem; }

/* the sanitization note at the top of each post */
article > p:first-of-type {
  color: var(--muted);
  font-size: 1rem;
}

article hr {
  border: none;
  border-top: 1px solid var(--faint);
  margin: 2.25rem auto;
  width: 5rem;
}
/* the stack note after the closing rule */
article hr:last-of-type ~ p { color: var(--muted); font-size: 0.95rem; }

blockquote {
  margin: 0 0 1.1rem;
  padding-left: 1rem;
  border-left: 3px solid var(--faint);
  color: var(--muted);
}

code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.88em;
  background: var(--faint);
  padding: 0.1em 0.3em;
  border-radius: 3px;
}

.site-footer {
  margin-top: 3.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--faint);
  color: var(--muted);
  font-size: 0.85rem;
}
