:root {
  color-scheme: light dark;
  --bg: #f5f3ee;
  --surface: #fffdf8;
  --text: #22211e;
  --muted: #6b6860;
  --border: #ddd8cd;
  --accent: #315c55;
  --accent-soft: #e3ece8;
  --max: 68rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #171816;
    --surface: #1e201d;
    --text: #ece9e1;
    --muted: #a7a399;
    --border: #343730;
    --accent: #8fc3b8;
    --accent-soft: #24322e;
  }
}

* {
  box-sizing: border-box;
}

html {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.6;
  background: var(--bg);
  color: var(--text);
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-thickness: 2px;
}

.site-header {
  width: min(100% - 2rem, var(--max));
  margin: 0 auto;
  padding: 1.5rem 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--border);
}

.brand {
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--text);
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.95rem;
}

nav a {
  color: var(--muted);
  text-decoration: none;
}

nav a:hover {
  color: var(--accent);
}

main {
  width: min(100% - 2rem, var(--max));
  margin: 0 auto;
  flex: 1;
}

.hero {
  padding: clamp(3rem, 8vw, 6rem) 0 2rem;
  max-width: 46rem;
}

.eyebrow,
.meta {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted);
}

.hero h1,
.prose h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
  margin: 0.3rem 0 1rem;
}

.lede {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--muted);
  max-width: 38rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1rem;
  padding: 1rem 0 4rem;
}

.grid h2 {
  grid-column: 1 / -1;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin: 1rem 0 0.25rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.9rem;
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.card h3 {
  font-size: 1.15rem;
  line-height: 1.25;
  margin: 0;
}

.card h3 a {
  color: var(--text);
  text-decoration: none;
}

.card h3 a:hover {
  color: var(--accent);
}

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

.card .read {
  margin-top: auto;
  padding-top: 0.6rem;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
}

.prose {
  max-width: 44rem;
  padding: clamp(2.5rem, 6vw, 5rem) 0;
}

.prose h2 {
  font-size: 1.25rem;
  margin: 2.2rem 0 0.6rem;
  letter-spacing: -0.01em;
}

.prose p,
.prose li {
  color: var(--text);
}

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

.prose .meta {
  margin-bottom: 0.5rem;
}

footer {
  width: min(100% - 2rem, var(--max));
  margin: 0 auto;
  padding: 1.5rem 0 2rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.85rem;
}

@media (max-width: 40rem) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  nav {
    gap: 0.75rem;
  }
}
