@import url('https://fonts.googleapis.com/css2?family=Merriweather:ital,wght@0,400;0,700;1,400&display=swap');

/* ── Tokens ─────────────────────────────────────────────── */
:root {
  --bg:     #fafaf8;
  --fg:     #1a1a1a;
  --muted:  #6b6b6b;
  --border: #ddd;
  --link:   #1a1a1a;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:     #1a1a1a;
    --fg:     #e8e6e1;
    --muted:  #888;
    --border: #333;
    --link:   #e8e6e1;
  }
}

/* ── Reset / base ───────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  font-size: 19px;
}

body {
  margin: 0;
  padding: 2rem 1.25rem;
  background: var(--bg);
  color: var(--fg);
  font-family: 'Merriweather', Georgia, serif;
  line-height: 1.75;
}

/* ── Layout ─────────────────────────────────────────────── */
header, main {
  max-width: 680px;
  margin: 0 auto;
}

header {
  margin-bottom: 0.5rem;
}

/* ── Typography ─────────────────────────────────────────── */
h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  line-height: 1.25;
}

h2 { font-size: 1.35rem; }
h3 { font-size: 1.1rem; }

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

p {
  margin: 0 0 1.25rem;
}

code {
  font-size: 0.85em;
  background: var(--border);
  padding: 0.1em 0.35em;
  border-radius: 3px;
}

pre {
  background: var(--border);
  padding: 1rem;
  border-radius: 4px;
  overflow-x: auto;
  font-size: 0.85rem;
  line-height: 1.5;
}

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

/* ── Links ──────────────────────────────────────────────── */

/* Default links (post body) */
a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Header "Home" link */
header a {
  font-size: 0.9rem;
  color: var(--muted);
  text-decoration: none;
}

header a:hover {
  color: var(--fg);
  opacity: 1;
}

/* Index post list links — plain text, underline on hover only */
.post-list a {
  color: var(--link);
  text-decoration: none;
}

.post-list a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
  opacity: 1;
}

/* ── Post list (index) ──────────────────────────────────── */
.post-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

ul, ol {
  padding-left: 1.5rem;
}

li {
  margin-bottom: 0.25rem;
}

.post-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.4rem 0;
}

.post-date {
  font-size: 0.85rem;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}
