:root {
  --ink: #171918;
  --paper: #f4f1ea;
  --cream: #fbfaf7;
  --line: #d8d5cc;
  --accent: #ed5b35;
  --green: #356357;
  --muted: #6d716d;
}

:root[data-theme="dark"] {
  --ink: #f2efe7;
  --paper: #202421;
  --cream: #171916;
  --line: #383d38;
  --accent: #ff7552;
  --green: #91b3a7;
  --muted: #aaaFA7;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--cream);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  transition: color .25s ease, background-color .25s ease;
}
a { color: inherit; text-decoration: none; }
img { display: block; width: 100%; }

.site-header, main, footer { width: min(1180px, calc(100% - 48px)); margin-inline: auto; }
.site-header {
  height: 112px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 46px; height: 46px; display: grid; place-items: center;
  border: 1.5px solid var(--ink); border-radius: 50%;
  font-family: Georgia, serif; font-size: 16px;
}
.brand strong { display: block; font-family: Georgia, serif; font-size: 17px; }
.brand small { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
nav { display: flex; gap: 34px; }
nav a { position: relative; font-size: 14px; font-weight: 700; }
nav a.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -12px;
  height: 2px; background: var(--accent);
}
.theme-toggle {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  transition: border-color .2s ease, transform .2s ease;
}
.theme-toggle:hover { border-color: var(--ink); transform: rotate(12deg); }
.theme-icon { font-size: 18px; line-height: 1; }
.theme-toggle[aria-pressed="true"] .theme-icon { transform: rotate(180deg); }

.intro { padding: 68px 0 72px; }
.eyebrow, .meta {
  color: var(--muted); text-transform: uppercase; letter-spacing: .16em;
  font-size: 11px; font-weight: 800;
}
.intro h1 {
  max-width: 900px; margin: 18px 0 42px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(54px, 7.4vw, 96px); line-height: .92;
  letter-spacing: -.055em; font-weight: 400;
}
.intro h1 em { color: var(--accent); font-weight: 400; }
.intro-footer { display: grid; grid-template-columns: 1fr 280px; align-items: end; border-top: 1px solid var(--line); padding-top: 22px; }
.intro-footer p { max-width: 480px; margin: 0; color: var(--muted); line-height: 1.65; }
.search { justify-self: end; width: 280px; border-bottom: 1px solid var(--ink); }
.search span { display: none; }
.search input { width: 100%; border: 0; background: transparent; color: var(--ink); padding: 10px 2px; outline: none; font: inherit; }

.featured {
  display: grid; grid-template-columns: 1.55fr 1fr;
  min-height: 520px; background: var(--paper);
}
.featured-image { position: relative; overflow: hidden; min-height: 520px; }
.featured-image img { height: 100%; object-fit: cover; filter: saturate(.72) contrast(.92); transition: transform .6s ease; }
.featured-election { background: #dbe2dc; }
.featured-election img { object-fit: contain; padding: 50px; }
.featured-image:hover img { transform: scale(1.025); }
.image-index, .card-image > span {
  position: absolute; left: 20px; bottom: 20px;
  width: 48px; height: 48px; display: grid; place-items: center;
  border-radius: 50%; background: var(--cream); font-size: 12px; font-weight: 800;
}
.featured-copy { display: flex; flex-direction: column; justify-content: center; padding: 56px; }
.meta { display: flex; justify-content: space-between; align-items: center; }
.meta span { color: var(--accent); }
.featured-copy h2 {
  margin: 28px 0 22px; font-family: Georgia, serif;
  font-size: clamp(38px, 4vw, 56px); line-height: 1.02; letter-spacing: -.04em;
}
.featured-copy h2 a:hover, .card h3 a:hover { color: var(--accent); }
.featured-copy p { color: var(--muted); line-height: 1.75; }
.read-link { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 13px; font-weight: 800; }
.read-link span { float: right; font-size: 18px; }

.archive { padding: 96px 0 110px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; padding-bottom: 18px; border-bottom: 1px solid var(--ink); }
.section-heading h2 { margin: 0; font-family: Georgia, serif; font-size: 44px; letter-spacing: -.03em; }
.section-heading span { color: var(--muted); font-size: 12px; }
.article-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; padding-top: 28px; }
.card { min-width: 0; }
.card[hidden] { display: none; }
.card-image { height: 280px; position: relative; overflow: hidden; display: block; background: #dedbd2; }
.card-image img { height: 100%; object-fit: cover; filter: saturate(.65); transition: transform .5s ease; }
.card:hover .card-image img { transform: scale(1.03); }
.card-election img { object-fit: contain; padding: 52px 28px; background: #dbe2dc; }
.card-math img { object-fit: contain; padding: 36px; background: #dfe4e3; }
.card-holland img { filter: saturate(.45) sepia(.12); }
.card .meta { margin-top: 18px; }
.card h3 { margin: 16px 0 12px; font-family: Georgia, serif; font-size: 27px; line-height: 1.12; letter-spacing: -.02em; }
.card p { color: var(--muted); line-height: 1.55; font-size: 14px; }

footer { min-height: 150px; display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); }
footer p { color: var(--muted); font-size: 12px; }

.article-page { width: min(820px, calc(100% - 48px)); margin: 70px auto 110px; }
.article-page .meta { max-width: 620px; }
.article-page h1 { font-family: Georgia, serif; font-size: clamp(48px, 7vw, 78px); line-height: 1; letter-spacing: -.045em; margin: 24px 0 32px; }
.article-lead { font-family: Georgia, serif; font-size: 22px; line-height: 1.55; color: var(--muted); }
.article-hero { margin: 42px 0; height: 480px; object-fit: cover; filter: saturate(.7); }
.article-body { font-family: Georgia, serif; font-size: 19px; line-height: 1.85; }
.article-body p { margin: 0 0 24px; }
.article-body h2 { margin-top: 42px; font-size: 32px; }
.back-link { display: inline-block; margin-bottom: 32px; color: var(--muted); font-size: 13px; font-weight: 800; }

@media (max-width: 820px) {
  .site-header, main, footer { width: min(100% - 32px, 1180px); }
  .site-header { height: 88px; }
  .brand small { display: none; }
  nav { gap: 18px; }
  .intro { padding: 48px 0 54px; }
  .intro-footer { grid-template-columns: 1fr; gap: 24px; }
  .search { justify-self: start; width: 100%; }
  .featured { grid-template-columns: 1fr; }
  .featured-image { min-height: 360px; }
  .featured-copy { padding: 38px 28px; }
  .article-grid { grid-template-columns: 1fr; }
  .card-image { height: 320px; }
  footer { padding: 40px 0; align-items: flex-start; flex-direction: column; gap: 24px; }
  .article-page { width: min(100% - 32px, 820px); }
  .article-hero { height: 320px; }
}
