:root {
  --canvas: #ffffff;
  --surface: #f5f5f0;
  --ink: #141414;
  --ink-muted: #5c5c52;
  --accent: #1b6b3a;
  --accent-light: #e8f2ec;
  --rule: #e0e0d8;
  --body-font: 'Lora', Georgia, serif;
  --display-font: 'Space Grotesk', system-ui, sans-serif;
  --mono-font: 'Courier New', monospace;
  --col: 760px;
  --shell: 1080px;
  --radius: 4px;
}

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

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

body {
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--body-font);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

.shell {
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: 24px;
}

/* ── Masthead ─────────────────────────────────────────────── */

.masthead {
  padding: 20px 0;
  border-bottom: 2px solid var(--ink);
  margin-bottom: 0;
}

.masthead__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--display-font);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.wordmark__mark {
  width: 28px;
  height: 28px;
  background: var(--accent);
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  flex-shrink: 0;
}

.wordmark__name { letter-spacing: 0.04em; text-transform: uppercase; }

.site-nav {
  display: flex;
  gap: 32px;
  font-family: var(--display-font);
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

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

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

/* ── Hero (homepage only) ─────────────────────────────────── */

.hero {
  padding: 72px 0 56px;
}

.hero__eyebrow {
  display: block;
  font-family: var(--display-font);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
}

.hero__h1 {
  font-family: var(--display-font);
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  max-width: 22ch;
  margin-bottom: 20px;
}

.hero__dek {
  font-size: 1.1rem;
  color: var(--ink-muted);
  max-width: 58ch;
  line-height: 1.6;
}

/* ── Post plate ───────────────────────────────────────────── */

.post-plate {
  overflow: hidden;
  line-height: 0;
}

.post-plate img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  display: block;
}

/* ── Hero image ───────────────────────────────────────────── */

.hero__img {
  margin-top: 40px;
  line-height: 0;
}

.hero__img img {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  display: block;
}

/* ── Inline post (homepage) ───────────────────────────────── */

.post-inline {
  padding: 64px 0 0;
}

.post-inline + .post-inline {
  margin-top: 0;
}

.post-inline__meta {
  display: flex;
  align-items: center;
  gap: 20px;
  font-family: var(--display-font);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 14px;
}

.post-inline__num { color: var(--accent); }

.post-inline__title {
  font-family: var(--display-font);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.post-inline__title a {
  text-decoration: none;
  color: var(--ink);
}

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

.post-inline__dek {
  font-size: 1rem;
  color: var(--ink-muted);
  max-width: 64ch;
  margin-bottom: 32px;
}

.post-inline__plate-wrap {
  margin-bottom: 40px;
}

.post-separator {
  border: none;
  margin: 64px 0 0;
}

/* ── Prose ────────────────────────────────────────────────── */

.prose {
  max-width: var(--col);
}

.prose p {
  margin-bottom: 1.5em;
}

.prose h2 {
  font-family: var(--display-font);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 2.5em 0 0.75em;
  color: var(--ink);
}

.prose h3 {
  font-family: var(--display-font);
  font-size: 1.05rem;
  font-weight: 600;
  margin: 2em 0 0.5em;
}

.prose ul, .prose ol {
  margin: 0 0 1.5em 1.5em;
}

.prose li { margin-bottom: 0.4em; }

.prose a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

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

.prose code {
  font-family: var(--mono-font);
  font-size: 0.88em;
  background: var(--surface);
  padding: 1px 5px;
  border-radius: 2px;
}

.prose em { font-style: italic; }
.prose strong { font-weight: 700; }

/* ── Article page ─────────────────────────────────────────── */

.post-page { padding: 64px 0 80px; }

.post-page__head { margin-bottom: 0; }

.post-page__head .post-inline__meta { margin-bottom: 16px; }

.post-page__h1 {
  font-family: var(--display-font);
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}

.post-page__dek {
  font-size: 1.05rem;
  color: var(--ink-muted);
  max-width: 64ch;
  margin-bottom: 40px;
}

.post-page__plate { margin-bottom: 48px; }

.post-page__plate .post-plate img { height: 400px; border-radius: var(--radius); }

/* ── Articles index ───────────────────────────────────────── */

.page-head { padding: 64px 0 48px; }

.page-head__eyebrow {
  display: block;
  font-family: var(--display-font);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

.page-head__h1 {
  font-family: var(--display-font);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.page-head__dek {
  font-size: 1rem;
  color: var(--ink-muted);
  max-width: 58ch;
}

.cards-grid { padding: 56px 0 80px; }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 32px;
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
}

.card__plate .post-plate img { height: 180px; }

.card__body { padding: 24px; flex: 1; display: flex; flex-direction: column; }

.card__meta {
  display: flex;
  gap: 12px;
  font-family: var(--display-font);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 12px;
}

.card__num { color: var(--accent); }

.card__title {
  font-family: var(--display-font);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}

.card__title a {
  text-decoration: none;
  color: var(--ink);
}

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

.card__dek {
  font-size: 0.88rem;
  color: var(--ink-muted);
  line-height: 1.55;
  flex: 1;
}

/* ── Footer ───────────────────────────────────────────────── */

.site-footer {
  background: var(--ink);
  color: #fff;
  padding: 48px 0;
  margin-top: 80px;
}

.site-footer__row {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  justify-content: space-between;
  align-items: flex-start;
}

.site-footer__brand {
  font-family: var(--display-font);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  text-decoration: none;
}

.site-footer__nav {
  display: flex;
  gap: 28px;
  font-family: var(--display-font);
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.site-footer__nav a {
  color: rgba(255,255,255,0.6);
  text-decoration: none;
}

.site-footer__nav a:hover { color: #fff; }

.site-footer__copy {
  font-family: var(--display-font);
  font-size: 0.88rem;
  color: rgba(255,255,255,0.4);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  width: 100%;
  margin-top: 32px;
  padding-top: 24px;
}

/* ── 404 ──────────────────────────────────────────────────── */

.not-found {
  padding: 120px 0;
  text-align: center;
}

.not-found__code {
  font-family: var(--display-font);
  font-size: 6rem;
  font-weight: 700;
  color: var(--rule);
  line-height: 1;
  margin-bottom: 16px;
}

.not-found__msg {
  font-family: var(--display-font);
  font-size: 1.1rem;
  color: var(--ink-muted);
  margin-bottom: 24px;
}

.not-found a { color: var(--accent); text-decoration: underline; }

/* ── Responsive ───────────────────────────────────────────── */

@media (max-width: 640px) {
  .masthead__row { flex-wrap: wrap; }
  .site-nav { gap: 20px; font-size: 0.8rem; }
  .hero { padding: 48px 0 40px; }
  .post-inline { padding: 48px 0 0; }
  .site-footer__row { flex-direction: column; gap: 24px; }
  .cards { grid-template-columns: 1fr; }
}
