:root {
  --bg: #fdfdfc;
  --fg: #1a1a1a;
  --muted: #6b6b66;
  --accent: #b4552d;
  --code-bg: #f2f1ee;
  --border: #e4e2dd;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14130f;
    --fg: #e6e4de;
    --muted: #8f8d85;
    --accent: #e08a5c;
    --code-bg: #1e1d18;
    --border: #2c2a24;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0 auto;
  padding: 0 1.25rem;
  max-width: 42rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--fg);
  background: var(--bg);
}

header nav {
  display: flex;
  gap: 1.5rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
  font-family: system-ui, sans-serif;
  font-size: 0.95rem;
}

.site-name { font-weight: 700; margin-right: auto; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
nav a, .site-name { color: var(--fg); }

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

h1 { font-size: 1.9rem; margin: 2.25rem 0 0.5rem; }
h2 { font-size: 1.3rem; margin: 2.75rem 0 0.75rem; }

article p { text-wrap: pretty; }

.post-meta {
  margin: 0.15rem 0 0;
  color: var(--muted);
  font-family: system-ui, sans-serif;
  font-size: 0.85rem;
}

article > .post-meta { margin-bottom: 2rem; }

.post-list { list-style: none; padding: 0; }
.post-list li { margin: 1.5rem 0; }
.post-list a { font-family: system-ui, sans-serif; font-weight: 600; color: var(--fg); }
.post-list a:hover { color: var(--accent); }
.post-hook { margin: 0.15rem 0 0; color: var(--muted); font-size: 0.95rem; }

pre {
  padding: 1rem;
  overflow-x: auto;
  border-radius: 6px;
  font-size: 0.85rem;
  line-height: 1.5;
}

code {
  font-family: ui-monospace, "JetBrains Mono", monospace;
  font-size: 0.9em;
}

p > code, li > code {
  background: var(--code-bg);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

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

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

table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
th, td { padding: 0.4rem 0.6rem; border: 1px solid var(--border); text-align: left; }

footer {
  margin-top: 4rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-family: system-ui, sans-serif;
  font-size: 0.85rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}
footer p { margin: 0; }
footer a { color: var(--muted); }
footer a:hover { color: var(--accent); }
.footer-links { display: flex; gap: 1.25rem; }
