:root {
  --fg: #222;
  --bg: #fff;
  --muted: #666;
  --link: #0050b3;
  --rule: #e5e5e5;
  --code-bg: #f6f8fa;
}

@media (prefers-color-scheme: dark) {
  :root {
    --fg: #e5e5e5;
    --bg: #1a1a1a;
    --muted: #999;
    --link: #5eb1ff;
    --rule: #333;
    --code-bg: #2a2a2a;
  }
}

* { box-sizing: border-box; }

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: var(--fg);
  background: var(--bg);
  max-width: 38rem;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

header {
  margin-bottom: 2.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--rule);
}

.site-title {
  font-size: 1.4rem;
  margin: 0 0 0.5rem;
}

.site-title a {
  color: var(--fg);
  text-decoration: none;
}

nav a {
  margin-right: 1rem;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
}

nav a:hover { color: var(--link); }

main { min-height: 60vh; }

h2, h3 {
  margin-top: 2rem;
  line-height: 1.3;
}

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

.post-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.post-list li {
  display: flex;
  gap: 1rem;
  align-items: baseline;
  padding: 0.25rem 0;
}

.post-list time {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-size: 0.9rem;
  min-width: 6rem;
  flex-shrink: 0;
}

.post-list a { text-decoration: none; }
.post-list a:hover { text-decoration: underline; }

article header {
  border-bottom: none;
  margin-bottom: 1rem;
  padding-bottom: 0;
}

.post-meta {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0;
}

article h2 {
  margin-top: 0;
  margin-bottom: 0.25rem;
}

pre, code {
  font-family: ui-monospace, SFMono-Regular, 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: 0.75rem 1rem;
  border-radius: 4px;
  overflow-x: auto;
  line-height: 1.45;
}

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

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

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

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