:root {
  --bg: #fbfaf7;
  --fg: #1f2328;
  --muted: #6a737d;
  --accent: #0b6e4f;
  --rule: #e4e1da;
  --code-bg: #f1efe9;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16181b;
    --fg: #e6e6e3;
    --muted: #9aa0a6;
    --accent: #5fc79b;
    --rule: #2a2d31;
    --code-bg: #212428;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 17px/1.65 Charter, "Bitstream Charter", "Sitka Text", Cambria, serif;
}

main, header, footer {
  max-width: 40rem;
  margin: 0 auto;
  padding: 0 1rem;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-top: 2.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--rule);
}

header a.title {
  font: 600 1.15rem/1 system-ui, sans-serif;
  color: var(--fg);
  text-decoration: none;
}

nav a {
  margin-left: 1rem;
  font: 0.9rem system-ui, sans-serif;
  color: var(--muted);
}

a { color: var(--accent); }

h1, h2 {
  font-family: system-ui, sans-serif;
  line-height: 1.25;
}

h1 { font-size: 1.8rem; margin: 2rem 0 0.25rem; }
h2 { font-size: 1.2rem; margin: 2rem 0 0.5rem; }

.meta {
  color: var(--muted);
  font: 0.85rem system-ui, sans-serif;
}

ul.posts {
  list-style: none;
  padding: 0;
}

ul.posts li {
  padding: 1rem 0;
  border-bottom: 1px solid var(--rule);
}

ul.posts a {
  font: 600 1.05rem system-ui, sans-serif;
  text-decoration: none;
}

ul.posts p { margin: 0.25rem 0 0; }

code, pre {
  font: 0.85rem/1.5 ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  background: var(--code-bg);
  border-radius: 4px;
}

code { padding: 0.1rem 0.3rem; }

pre {
  padding: 0.9rem 1rem;
  overflow-x: auto;
}

pre code { padding: 0; background: none; }

footer {
  margin-top: 3rem;
  padding-top: 1rem;
  padding-bottom: 2rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font: 0.85rem system-ui, sans-serif;
}
