:root {
  --bg: #ffffff;
  --ink: #1a1d21;
  --muted: #5c6570;
  --rule: #e3e6ea;
  --accent: #0f4c81;
  --code-bg: #f4f6f8;
  --max: 46rem;
}
@media (min-width: 1600px) {
  body { font-size: 18px; }
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14171a;
    --ink: #e6e9ec;
    --muted: #98a1ab;
    --rule: #2a2f35;
    --accent: #7ab3e0;
    --code-bg: #1d2126;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

header, main, footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.25rem;
}

header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-top: 2rem;
  padding-bottom: 1.5rem;
}
.brand {
  font-family: Charter, Georgia, Cambria, "Times New Roman", serif;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--ink);
  text-decoration: none;
}
nav a {
  color: var(--muted);
  text-decoration: none;
  margin-left: 1.1rem;
  font-size: 0.95rem;
}
nav a:hover, .brand:hover { color: var(--accent); }

main { min-height: 60vh; padding-bottom: 3rem; }

h1, h2, h3 {
  font-family: Charter, Georgia, Cambria, "Times New Roman", serif;
  line-height: 1.25;
  margin: 2.2rem 0 0.7rem;
}
h1 { font-size: 1.9rem; margin-top: 1rem; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.1rem; }

a { color: var(--accent); }
p, li { margin: 0.65rem 0; }
.meta { color: var(--muted); font-size: 0.92rem; }
.pron { color: var(--muted); font-style: italic; }

hr { border: 0; border-top: 1px solid var(--rule); margin: 2rem 0; }

code, pre {
  font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88em;
}
code { background: var(--code-bg); padding: 0.12em 0.35em; border-radius: 3px; }
pre {
  background: var(--code-bg);
  padding: 0.9rem 1.1rem;
  border-radius: 6px;
  overflow-x: auto;
  line-height: 1.5;
}
pre code { background: none; padding: 0; }

table { border-collapse: collapse; width: 100%; margin: 1rem 0; font-size: 0.95rem; }
th, td { text-align: left; padding: 0.45rem 0.8rem 0.45rem 0; border-bottom: 1px solid var(--rule); }
th { color: var(--muted); font-weight: 600; }

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

.postlist { list-style: none; padding: 0; }
.postlist li { margin: 0.9rem 0; }
.postlist time { color: var(--muted); font-size: 0.9rem; display: block; }
.postlist a { text-decoration: none; font-weight: 600; }
.postlist a:hover { text-decoration: underline; }

footer {
  border-top: 1px solid var(--rule);
  padding-top: 1.2rem;
  padding-bottom: 2.5rem;
  color: var(--muted);
  font-size: 0.9rem;
}
footer a { color: var(--muted); }
