:root {
  --paper: #faf7f2;
  --paper-2: #f2ede4;
  --ink: #1c1a17;
  --ink-2: #57524a;
  --ink-3: #8a8378;
  --rule: #e2dbcf;
  --accent: #a3271f;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #161513;
    --paper-2: #1f1d1a;
    --ink: #ece7df;
    --ink-2: #b4ada2;
    --ink-3: #847d72;
    --rule: #2f2c28;
    --accent: #e0675c;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.6 var(--serif);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* Masthead */
.masthead {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}
.masthead-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.mark { font-style: italic; font-size: 20px; text-decoration: none; }
.masthead nav { display: flex; gap: 24px; font: 500 14px var(--sans); }
.masthead nav a { text-decoration: none; color: var(--ink-2); }
.masthead nav a:hover { color: var(--accent); }

/* Hero */
.hero { padding: 96px 24px 72px; display: grid; grid-template-columns: 1fr 340px; gap: 56px; align-items: center; }
.portrait { margin: 0; aspect-ratio: 4 / 5; overflow: hidden; border-radius: 2px; background: var(--paper-2); }
.portrait img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.kicker, .section-label, .meta, time, .chip, .btn, .facts dt, .count {
  font-family: var(--sans);
}
.kicker {
  font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 20px;
}
.hero h1 {
  font-weight: 400; font-size: clamp(48px, 9vw, 104px); line-height: .98;
  letter-spacing: -.02em; margin: 0 0 32px;
}
.hero h1 em { color: var(--accent); }
.lede { font-size: clamp(19px, 2.2vw, 23px); line-height: 1.5; color: var(--ink-2); max-width: 640px; margin: 0 0 36px; }
.hero-links { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; }
.btn {
  display: inline-block; padding: 12px 22px; border-radius: 999px;
  background: var(--ink); color: var(--paper); text-decoration: none;
  font-size: 15px; font-weight: 500;
}
.btn:hover { background: var(--accent); }
.link { font-family: var(--sans); font-size: 15px; color: var(--ink-2); text-underline-offset: 4px; }

/* Section labels */
.section-label {
  font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  border-top: 2px solid var(--ink); padding-top: 14px; margin: 0 0 32px;
}
.count { font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--ink-3); margin-left: 10px; }

/* About */
.about { padding-bottom: 88px; }
.about-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 56px; }
.about-text p { font-size: 20px; margin: 0 0 18px; }
.about-text a { color: var(--accent); text-underline-offset: 3px; }
.facts { margin: 0; }
.facts div { padding: 14px 0; border-bottom: 1px solid var(--rule); }
.facts div:first-child { padding-top: 4px; }
.facts dt { font-size: 12px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.facts dd { margin: 2px 0 0; font-size: 17px; }

/* Featured */
.features { display: grid; grid-template-columns: 1.6fr 1fr; grid-template-rows: auto auto; gap: 40px 40px; margin-bottom: 96px; }
.feature { text-decoration: none; display: block; }
.feature:first-child { grid-row: span 2; }
.feature-img { aspect-ratio: 3 / 2; overflow: hidden; background: var(--paper-2); margin-bottom: 18px; border-radius: 2px; }
.feature:first-child .feature-img { aspect-ratio: 4 / 3; }
.feature-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.feature:hover img { transform: scale(1.03); }
.feature h3 { font-weight: 500; font-size: 24px; line-height: 1.2; margin: 6px 0 10px; }
.feature:first-child h3 { font-size: 34px; }
.feature:hover h3, .row a:hover h4 { color: var(--accent); }
.meta { font-size: 13px; color: var(--ink-3); margin: 0; }
.tag { color: var(--accent); font-weight: 500; }
.dek { color: var(--ink-2); margin: 0; font-size: 16px; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.noimg {
  background:
    linear-gradient(135deg, transparent 49.5%, var(--rule) 49.5%, var(--rule) 50.5%, transparent 50.5%),
    var(--paper-2);
}

/* Archive */
.archive-head .section-label { margin-bottom: 20px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 40px; }
.chip {
  border: 1px solid var(--rule); background: transparent; color: var(--ink-2);
  padding: 7px 14px; border-radius: 999px; font-size: 14px; cursor: pointer;
}
.chip:hover { border-color: var(--ink-3); }
.chip.is-active { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.search {
  margin-left: auto; font: 14px var(--sans); color: var(--ink);
  background: transparent; border: 0; border-bottom: 1px solid var(--rule);
  padding: 7px 2px; width: 200px; outline: none;
}
.search:focus { border-color: var(--accent); }

.year { display: grid; grid-template-columns: 120px 1fr; gap: 24px; margin-bottom: 40px; }
.year-label { font-weight: 400; font-style: italic; font-size: 36px; line-height: 1; margin: 18px 0 0; color: var(--ink-3); position: sticky; top: 84px; align-self: start; }
.year ul { list-style: none; margin: 0; padding: 0; }
.row a { display: grid; grid-template-columns: 140px 1fr 120px; gap: 24px; align-items: start;
  padding: 20px 0; border-bottom: 1px solid var(--rule); text-decoration: none; }
.row time { font-size: 13px; color: var(--ink-3); padding-top: 5px; }
.row h4 { font-weight: 500; font-size: 20px; line-height: 1.3; margin: 0 0 6px; }
.row .dek { font-size: 15px; -webkit-line-clamp: 2; }
.row-img { aspect-ratio: 3 / 2; overflow: hidden; background: var(--paper-2); border-radius: 2px; }
.row-img img { width: 100%; height: 100%; object-fit: cover; }
.empty { color: var(--ink-3); font-style: italic; }

/* Footer */
.footer { background: var(--ink); color: var(--paper); padding: 88px 0 48px; margin-top: 64px; }
.footer h2 { font-weight: 400; font-size: clamp(36px, 6vw, 56px); margin: 0 0 8px; }
.footer p { color: color-mix(in srgb, var(--paper) 70%, transparent); margin: 0 0 28px; }
.email { font-size: clamp(20px, 3.5vw, 30px); font-style: italic; text-underline-offset: 6px; text-decoration-thickness: 1px; }
.email:hover { color: var(--accent); }
.footer .small { font: 13px var(--sans); margin: 72px 0 0; }

/* Credits page */
.credits { padding: 72px 24px 96px; }
.credits h1 { font-weight: 400; font-size: clamp(40px, 6vw, 64px); margin: 0 0 16px; }
.credits ul { list-style: none; margin: 48px 0 0; padding: 0; }
.credits li { display: grid; grid-template-columns: 120px 1fr; gap: 20px; align-items: center;
  padding: 16px 0; border-bottom: 1px solid var(--rule); }
.credits li img { aspect-ratio: 3 / 2; width: 100%; object-fit: cover; border-radius: 2px; }
.credits li p { margin: 0; font: 14px/1.5 var(--sans); color: var(--ink-2); }
.credits li .for { font: 500 17px/1.3 var(--serif); color: var(--ink); margin-bottom: 4px; }
.credits a { color: var(--accent); text-underline-offset: 3px; }

/* Responsive */
@media (max-width: 860px) {
  .about-grid, .features { grid-template-columns: 1fr; gap: 40px; }
  .feature:first-child { grid-row: auto; }
  .feature:first-child h3 { font-size: 28px; }
  .year { grid-template-columns: 1fr; gap: 0; }
  .year-label { position: static; margin: 0 0 4px; font-size: 28px; }
  /* Stack rows on small screens: full-width image, then date, title, dek */
  .row a { grid-template-columns: 1fr; gap: 8px; padding: 24px 0; }
  .row-img { order: -1; aspect-ratio: 16 / 9; margin-bottom: 6px; }
  .row time { padding: 0; }
  .search { margin-left: 0; width: 100%; margin-top: 8px; }
  .hero { grid-template-columns: 1fr; gap: 0; }
  .portrait { order: -1; width: 128px; aspect-ratio: 1; border-radius: 50%; margin-bottom: 32px; }
}
@media (max-width: 520px) {
  .wrap, .hero { padding-left: 16px; padding-right: 16px; }
  .hero { padding-top: 48px; padding-bottom: 56px; }
  .masthead nav { gap: 16px; }
  .row h4 { font-size: 19px; }
}
