:root {
  color-scheme: light dark;
  --fg: #1a1a18;
  --bg: #fdfcfa;
  --muted: #6b6b66;
  --faint: #a3a39c;
  --accent: #1f7a52;
  --border: rgba(26, 26, 24, 0.1);
  --border-soft: rgba(26, 26, 24, 0.07);
  --max-width: 700px;
  --serif: "Fraunces", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --fg: #ece9e4;
    --bg: #15161a;
    --muted: #9a9a94;
    --faint: #6b6b68;
    --accent: #5ecb92;
    --border: rgba(236, 233, 228, 0.12);
    --border-soft: rgba(236, 233, 228, 0.08);
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.site-header, main, .site-footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-soft);
}

.site-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--fg);
  text-decoration: none;
}

nav { display: flex; gap: 0.25rem; }

nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  transition: background 0.15s ease, color 0.15s ease;
}

nav a:hover {
  color: var(--fg);
  background: var(--border-soft);
}

nav a.active {
  color: var(--bg);
  background: var(--accent);
}

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

a { color: var(--accent); text-underline-offset: 0.15em; }

.hero h1 {
  font-size: clamp(2.25rem, 5vw, 3rem);
  margin-bottom: 0.5rem;
}

.hero p { font-size: 1.05rem; }

article h1, section > h1 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  margin-bottom: 0.5rem;
}

article h2 {
  font-size: 1.4rem;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
}

.post-list {
  list-style: none;
  padding: 0;
  margin-top: 2rem;
}

.post-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1.5rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--border-soft);
}

.post-list a {
  font-family: var(--serif);
  font-size: 1.15rem;
  color: var(--fg);
  text-decoration: none;
}

.post-list a:hover { color: var(--accent); }

.post-list time {
  color: var(--faint);
  font-size: 0.85rem;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

article time {
  display: block;
  color: var(--faint);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 1.75rem;
}

audio {
  width: 100%;
  margin: 1rem 0;
  accent-color: var(--accent);
}

pre {
  overflow-x: auto;
  padding: 1.1rem 1.25rem;
  border-radius: 10px;
  border: 1px solid var(--border-soft);
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88em;
}

.site-footer {
  color: var(--faint);
  font-size: 0.85rem;
  padding-top: 1.5rem;
  padding-bottom: 2.5rem;
  border-top: 1px solid var(--border-soft);
  margin-top: 2rem;
}
