/* ─── Design Tokens ─────────────────────────────────────────── */
:root {
  --color-bg:        rgb(255, 255, 255);
  --color-bg-soft:   rgb(245, 245, 240);
  --color-text:      rgb(26, 26, 26);
  --color-text-muted:rgb(107, 107, 107);
  --color-accent:    rgb(192, 57, 43);
  --color-border:    rgb(224, 224, 224);

  --font-heading: 'Georgia, serif';
  --font-body:    'system-ui, sans-serif';

  --size-content: 1400px;
  --gap:          1.5rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-bg:        rgb(17, 17, 17);
    --color-bg-soft:   rgb(30, 30, 30);
    --color-text:      rgb(232, 232, 232);
    --color-text-muted:rgb(154, 154, 154);
    --color-accent:    rgb(224, 92, 75);
    --color-border:    rgb(46, 46, 46);
  }
}

[data-theme="dark"] {
  --color-bg:        rgb(17, 17, 17);
  --color-bg-soft:   rgb(30, 30, 30);
  --color-text:      rgb(232, 232, 232);
  --color-text-muted:rgb(154, 154, 154);
  --color-accent:    rgb(224, 92, 75);
  --color-border:    rgb(46, 46, 46);
}

[data-theme="light"] {
  --color-bg:        rgb(255, 255, 255);
  --color-bg-soft:   rgb(245, 245, 240);
  --color-text:      rgb(26, 26, 26);
  --color-text-muted:rgb(107, 107, 107);
  --color-accent:    rgb(192, 57, 43);
  --color-border:    rgb(224, 224, 224);
}

/* ─── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 18px; scroll-behavior: smooth; }

body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

img { max-width: 100%; display: block; }
a   { color: var(--color-accent); text-decoration: underline; }
a:hover { text-decoration: none; }

/* ─── Layout ─────────────────────────────────────────────────── */
.container {
  max-width: var(--size-content);
  margin: 0 auto;
  padding: 0 var(--gap);
}

.container--wide {
  max-width: var(--size-content);
  margin: 0 auto;
  padding: 0 var(--gap);
}

/* ─── Nav ────────────────────────────────────────────────────── */
.site-nav {
  border-bottom: 1px solid var(--color-border);
  padding: 1rem 0;
}

.site-nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: var(--size-content);
  margin: 0 auto;
  padding: 0 var(--gap);
}

.site-nav__brand {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: bold;
  color: var(--color-text);
  text-decoration: none;
}

.site-nav__links {
  display: flex;
  gap: 1.25rem;
  list-style: none;
  align-items: center;
}

.site-nav__links a {
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: 0.9rem;
}

.site-nav__links a:hover,
.site-nav__links a[aria-current="page"] {
  color: var(--color-accent);
}

.theme-toggle {
  background: none;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  padding: 0.2rem 0.5rem;
  cursor: pointer;
  color: var(--color-text-muted);
  font-size: 0.85rem;
}

/* ─── Footer ─────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--color-border);
  padding: 1.5rem 0;
  margin-top: 4rem;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.site-footer__inner {
  max-width: var(--size-content);
  margin: 0 auto;
  padding: 0 var(--gap);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* ─── Typography ─────────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  line-height: 1.25;
}

h1 { font-size: 2.2rem; margin-bottom: 0.5rem; }
h2 { font-size: 1.5rem; margin-bottom: 0.75rem; }
h3 { font-size: 1.15rem; margin-bottom: 0.5rem; }

p  { margin-bottom: 1rem; }

/* ─── Badges ─────────────────────────────────────────────────── */
.badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  border: 1px solid currentColor;
}

.badge--active   { color: #2ecc71; }
.badge--archived { color: var(--color-text-muted); }

/* ─── Cards ──────────────────────────────────────────────────── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--gap);
  margin-top: var(--gap);
}

.card {
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 1.25rem;
  background: var(--color-bg-soft);
}

.card__meta {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-bottom: 0.4rem;
}

.card__title { margin-bottom: 0.4rem; }

.card__excerpt {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-bottom: 0.75rem;
}

.card__link {
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--color-accent);
}

/* ─── Section spacing ────────────────────────────────────────── */
.section { padding: 3rem 0; }
.section + .section { border-top: 1px solid var(--color-border); }

.section__header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: var(--gap);
}

.section__see-all {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

