:root {
  color-scheme: light;
  --paper: #f4f1ea;
  --ink: #20251f;
  --muted: #62655d;
  --accent: #a43d27;
  --line: #d9d5ca;
}

* { box-sizing: border-box; }

body {
  min-height: 100vh;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.page {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  width: min(100% - 48px, 1120px);
  margin-inline: auto;
}

header, footer { display: flex; align-items: center; justify-content: space-between; }
header { min-height: 88px; border-bottom: 1px solid var(--line); font-size: 14px; }
.wordmark { color: var(--ink); font-size: 19px; font-weight: 750; letter-spacing: -.06em; text-decoration: none; }
.wordmark span, h1 span { color: var(--accent); }
.edition { color: var(--muted); }

main { flex: 1; padding: 72px 0 96px; }
.home { display: grid; align-content: center; justify-items: start; padding: 100px 0 120px; }
.eyebrow { display: flex; align-items: center; gap: 10px; margin: 0 0 28px; color: var(--muted); font-size: 12px; font-weight: 650; letter-spacing: .13em; text-transform: uppercase; }
.eyebrow::before { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); content: ""; }
h1 { max-width: 850px; margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(44px, 9vw, 88px); font-weight: 500; letter-spacing: -.06em; line-height: 1.02; }
.intro { max-width: 490px; margin: 32px 0 0; color: #55584f; font-size: clamp(17px, 2vw, 20px); line-height: 1.65; }
footer { min-height: 76px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }

.article-page { width: min(100%, 720px); margin-inline: auto; padding-block: clamp(40px, 8vw, 72px) 96px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(18px, 1.1vw + 15px, 20px); line-height: 1.8; }
.article-page h1 { margin: 10px 0 18px; font-size: clamp(38px, 8vw, 64px); line-height: 1.08; }
.meta, .summary, .tags { color: var(--muted); font-family: system-ui, sans-serif; font-size: 15px; line-height: 1.6; }
.meta { margin: 0; }
.summary { margin: 0 0 20px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; list-style: none; }
.tags li { border: 1px solid var(--line); border-radius: 99px; padding: 2px 10px; }
.prose { max-width: 68ch; overflow-wrap: break-word; }
.prose > * { margin-block: 1.15em; }
.prose h2, .prose h3 { margin-top: 2em; line-height: 1.25; }
.prose h2 { font-size: 1.65em; }
.prose h3 { font-size: 1.3em; }
.prose a { color: var(--accent); text-underline-offset: .18em; text-decoration-thickness: .06em; }
.prose img { display: block; max-width: 100%; height: auto; margin-inline: auto; }
.prose pre { overflow-x: auto; max-width: 100%; padding: 16px; background: #e9e5dc; font: .82em/1.6 ui-monospace, SFMono-Regular, Consolas, monospace; }
.prose :not(pre) > code { padding: .12em .32em; background: #e9e5dc; font-size: .88em; }
.prose blockquote { margin-inline: 0; padding-left: 20px; border-left: 3px solid var(--accent); color: var(--muted); }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: .35em; }
.prose table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; font-size: .88em; }
.prose th, .prose td { padding: .45em .7em; border: 1px solid var(--line); text-align: left; }
.prose hr { border: 0; border-top: 1px solid var(--line); }

.not-found { display: grid; align-content: center; justify-items: start; padding: 90px 0 120px; }
.not-found .intro { margin: 24px 0; }
.home-link { color: var(--ink); text-underline-offset: 4px; }
.home-link:hover { color: var(--accent); }

@media (max-width: 600px) {
  .page { width: min(100% - 36px, 1120px); }
  header { min-height: 72px; }
  .home { padding: 80px 0 96px; }
  .article-page { padding-block: 40px 72px; font-size: 18px; line-height: 1.75; }
  .prose pre { padding: 12px; }
  .not-found { padding: 72px 0 96px; }
  footer { gap: 16px; }
}

/* Django blog: nav + feed (#3, #4) */
.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  align-items: center;
  justify-content: flex-end;
}

.site-nav a {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .02em;
  text-decoration: none;
}

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

.home-feed,
.category-page {
  flex: 1;
  padding: 48px 0 96px;
}

.home-hero {
  margin-bottom: 56px;
}

.home-hero h1 {
  max-width: 850px;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(40px, 8vw, 72px);
  font-weight: 500;
  letter-spacing: -.06em;
  line-height: 1.05;
}

.section-head {
  margin-bottom: 40px;
}

.section-head h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(36px, 7vw, 56px);
  font-weight: 500;
  letter-spacing: -.05em;
  line-height: 1.08;
}

.feed { width: min(100%, 720px); }

.post-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.post-card {
  padding: 28px 0;
  border-top: 1px solid var(--line);
}

.post-card:last-child {
  border-bottom: 1px solid var(--line);
}

.post-card .meta {
  margin: 0 0 10px;
}

.post-card .meta a {
  color: var(--muted);
  text-decoration: none;
}

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

.post-card__title {
  margin: 0 0 10px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(24px, 4vw, 32px);
  font-weight: 500;
  letter-spacing: -.03em;
  line-height: 1.2;
}

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

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

.post-card .summary {
  margin: 0;
  max-width: 58ch;
}

.empty-state {
  margin: 0;
  padding: 28px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 17px;
  line-height: 1.6;
}

.empty-state a {
  color: var(--accent);
  text-underline-offset: .18em;
}

.article-page .meta a {
  color: var(--muted);
  text-decoration: none;
}

.article-page .meta a:hover {
  color: var(--accent);
}

@media (max-width: 600px) {
  header {
    flex-wrap: wrap;
    gap: 12px 16px;
    padding-block: 16px;
    align-items: flex-start;
  }

  .site-nav {
    width: 100%;
    justify-content: flex-start;
  }

  .home-feed,
  .category-page {
    padding: 36px 0 72px;
  }

  .home-hero {
    margin-bottom: 40px;
  }

  .post-card {
    padding: 22px 0;
  }
}
