:root {
  --bg: #faf9f6;
  --fg: #22221f;
  --muted: #74736c;
  --line: #e4e1d8;
  --accent: #2f4f43;
  --code-bg: #f1efe8;
  --width: 680px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141514;
    --fg: #e7e5df;
    --muted: #9a988f;
    --line: #2c2d2a;
    --accent: #9fc7b2;
    --code-bg: #1d1f1d;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 17px/1.65 Georgia, "Times New Roman", serif;
}

header.site, main, footer.site {
  max-width: var(--width);
  margin: 0 auto;
  padding: 0 22px;
}

header.site {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-top: 34px;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--line);
}

.brand {
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--fg);
  text-decoration: none;
}

nav { display: flex; gap: 18px; flex-wrap: wrap; }

nav a {
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
  padding-bottom: 2px;
}

nav a:hover, nav a[aria-current="page"] {
  color: var(--accent);
  border-bottom: 1px solid currentColor;
}

main { padding: 34px 22px 56px; }

h1 {
  font-size: 32px;
  line-height: 1.25;
  margin: 0 0 18px;
  font-weight: 600;
}

h2 {
  font-size: 22px;
  line-height: 1.3;
  margin: 38px 0 12px;
  font-weight: 600;
}

p { margin: 0 0 18px; }

a { color: var(--accent); text-underline-offset: 3px; }

.lead {
  font-size: 19px;
  color: var(--muted);
  margin-bottom: 34px;
}

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

.posts li {
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.posts li:first-child { padding-top: 0; }

.posts .title {
  display: block;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 6px;
  color: var(--fg);
  text-decoration: none;
}

.posts .title:hover { color: var(--accent); }

.meta {
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 8px;
}

.excerpt { margin: 0; color: var(--muted); }

.rss {
  margin-top: 34px;
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 14px;
}

article h1 { font-size: 30px; margin-bottom: 8px; }

article .meta {
  font-size: 13px;
  margin-bottom: 30px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

blockquote {
  margin: 24px 0;
  padding: 2px 0 2px 18px;
  border-left: 3px solid var(--line);
  color: var(--muted);
}

pre {
  background: var(--code-bg);
  padding: 16px 18px;
  overflow-x: auto;
  border-radius: 6px;
  font-size: 14px;
  line-height: 1.5;
}

code {
  font-family: "Cascadia Code", Consolas, "Liberation Mono", monospace;
  font-size: .92em;
}

p code, li code {
  background: var(--code-bg);
  padding: 1px 5px;
  border-radius: 3px;
}

ul, ol { padding-left: 24px; }

li { margin-bottom: 8px; }

.back {
  margin-top: 40px;
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 14px;
}

footer.site {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 22px;
  padding-bottom: 40px;
  border-top: 1px solid var(--line);
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 13px;
  color: var(--muted);
}

footer.site a { color: var(--muted); }

@media (max-width: 520px) {
  body { font-size: 16px; }
  h1 { font-size: 27px; }
  article h1 { font-size: 26px; }
  header.site { flex-direction: column; gap: 10px; }
}
