:root {
  --text: #222;
  --muted: #666;
  --link: #0645ad;
  --link-visited: #0b0080;
  --rule: #ddd;
  --code-bg: #f4f4f4;
  --max-width: 38rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --text: #e8e8e8;
    --muted: #999;
    --link: #79b8ff;
    --link-visited: #c8a2c8;
    --rule: #333;
    --code-bg: #2a2a2a;
  }
  body { background: #111; }
}

* { box-sizing: border-box; }

body {
  font-family: ui-serif, Georgia, "Times New Roman", serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1rem 4rem;
}

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

.site-title {
  font-weight: bold;
  text-decoration: none;
  color: var(--text);
}

nav a {
  margin-left: 1rem;
}

a { color: var(--link); }
a:visited { color: var(--link-visited); }

h1, h2, h3 { line-height: 1.2; font-family: ui-sans-serif, system-ui, sans-serif; }
h1 { font-size: 1.8rem; margin-top: 2rem; }
h2 { font-size: 1.4rem; margin-top: 2.5rem; }
h3 { font-size: 1.15rem; margin-top: 2rem; }

.subtitle, .post-meta { color: var(--muted); margin-top: -0.5rem; }

pre, code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.9em;
}

code {
  background: var(--code-bg);
  padding: 0.1em 0.3em;
  border-radius: 3px;
}

pre {
  background: var(--code-bg);
  padding: 1rem;
  overflow-x: auto;
  border-radius: 4px;
}

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

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

footer {
  margin-top: 4rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.9rem;
}

.post-list { list-style: none; padding: 0; }
.post-list li { margin-bottom: 1.5rem; }
.post-list time { color: var(--muted); margin-right: 1rem; font-variant-numeric: tabular-nums; }
.post-list p { margin: 0.3rem 0 0; color: var(--muted); font-size: 0.95em; }
