:root {
  --bg: #fbfaf8;
  --fg: #1b1b1a;
  --muted: #6b6a66;
  --rule: #e2e0da;
  --accent: #8a4b2a;
  --code-bg: #f2efe9;
  --pre-bg: #201f1d;
  --pre-fg: #e8e5df;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16161a;
    --fg: #e6e4df;
    --muted: #9a978f;
    --rule: #2e2e34;
    --accent: #d99a6c;
    --code-bg: #24242a;
    --pre-bg: #101014;
    --pre-fg: #dcd9d3;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 17px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif;
}

.wrap {
  max-width: 46rem;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { text-decoration-style: solid; }

.site-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding-bottom: 1rem;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--rule);
  font-size: 0.9rem;
}

.site-head a.brand {
  font-weight: 600;
  color: var(--fg);
  text-decoration: none;
  letter-spacing: 0.01em;
}

.site-head .nav a { color: var(--muted); text-decoration: none; }
.site-head .nav a:hover { color: var(--accent); }

h1 {
  font-size: 2rem;
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin: 0 0 0.75rem;
}

h2 {
  font-size: 1.3rem;
  line-height: 1.3;
  margin: 2.75rem 0 0.85rem;
  letter-spacing: -0.01em;
}

.byline {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 0 0 2rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--rule);
}

p { margin: 0 0 1.2rem; }

code {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
               "Liberation Mono", monospace;
  font-size: 0.87em;
  background: var(--code-bg);
  padding: 0.12em 0.35em;
  border-radius: 3px;
}

pre {
  background: var(--pre-bg);
  color: var(--pre-fg);
  padding: 1rem 1.1rem;
  border-radius: 6px;
  overflow-x: auto;
  font-size: 0.86rem;
  line-height: 1.5;
  margin: 0 0 1.5rem;
}

pre code {
  background: none;
  padding: 0;
  font-size: inherit;
  color: inherit;
}

strong { font-weight: 650; }

.entry ul { padding-left: 1.2rem; }

.post-list { list-style: none; padding: 0; margin: 0; }
.post-list li { margin-bottom: 1.75rem; }
.post-list h2 { font-size: 1.15rem; margin: 0 0 0.3rem; }
.post-list h2 a { color: var(--fg); text-decoration: none; }
.post-list h2 a:hover { color: var(--accent); }
.post-list .meta { color: var(--muted); font-size: 0.85rem; margin: 0 0 0.4rem; }
.post-list .dek { margin: 0; }

.note {
  margin-top: 3rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.87rem;
}

.note p { margin: 0 0 0.6rem; }

@media (max-width: 480px) {
  body { font-size: 16px; }
  h1 { font-size: 1.6rem; }
  .wrap { padding: 1.75rem 1rem 3rem; }
}
