:root {
  --cream: #fff7f0;
  --cream-deep: #f7ebe0;
  --burgundy: #801c31;
  --burgundy-dark: #5e1424;
  --ink: #0b0f0e;
  --body: #1f1d1c;
  --muted: #6b625d;
  --rule: #eadccf;
  --yellow: #ffb200;
  --serif: "Average", Georgia, "Times New Roman", serif;
  --sans: "Alan Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: #fff;
  color: var(--body);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.7;
  letter-spacing: 0.2px;
}

a { color: var(--burgundy); }
a:hover { color: var(--burgundy-dark); }

img { max-width: 100%; height: auto; }

/* Header and footer */

.site-header, .site-footer { background: var(--cream); }

.site-header .inner, .site-footer .inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-header .logo img { display: block; height: 52px; width: auto; }

.site-header nav { display: flex; gap: 22px; align-items: center; font-size: 16px; }
.site-header nav a { color: var(--ink); text-decoration: none; }
.site-header nav a:hover { color: var(--burgundy); }

.button {
  display: inline-block;
  border: 1.5px solid var(--burgundy);
  border-radius: 4px;
  padding: 9px 18px;
  color: var(--burgundy) !important;
  text-decoration: none;
  font-weight: 600;
  line-height: 1.3;
}
.button:hover { background: var(--burgundy); color: #fff !important; }
.button.solid { background: var(--burgundy); color: #fff !important; }
.button.solid:hover { background: var(--burgundy-dark); border-color: var(--burgundy-dark); }

.site-footer { margin-top: 96px; font-size: 15px; color: var(--muted); }
.site-footer .inner { padding-top: 28px; padding-bottom: 28px; }
.site-footer a { color: var(--ink); }

/* Post page */

.post { max-width: 720px; margin: 0 auto; padding: 48px 24px 0; }

.kicker {
  margin: 0 0 18px;
  font-size: 14px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}
.kicker a { text-decoration: none; }
.kicker a:hover { text-decoration: underline; }

.post h1, .index h1 {
  font-family: var(--serif);
  font-weight: 400;
  color: var(--ink);
  font-size: clamp(32px, 5vw, 46px);
  line-height: 1.18;
  letter-spacing: 0;
  margin: 0 0 18px;
}

.byline { color: var(--muted); font-size: 15px; margin: 0 0 36px; }
.byline .sep { margin: 0 8px; }

.prose > *:first-child { margin-top: 0; }

.prose p, .prose ul, .prose ol, .prose blockquote, .prose figure, .prose .table-wrap { margin: 0 0 1.3em; }

.prose h2, .prose h3, .prose h4 {
  color: var(--ink);
  font-weight: 600;
  line-height: 1.3;
  margin: 2em 0 0.7em;
}
.prose h2 { font-size: 25px; }
.prose h3 { font-size: 21px; }
.prose h4 { font-size: 18px; }
.prose h2 strong, .prose h3 strong, .prose h4 strong { font-weight: inherit; }

.prose ul, .prose ol { padding-left: 1.4em; }
.prose li { margin: 0.35em 0; }
.prose li > ul, .prose li > ol { margin: 0.35em 0 0.5em; }
.prose ol ol { list-style: lower-alpha; }

.prose figure { margin-left: 0; margin-right: 0; }
.prose figure img { display: block; width: 100%; border-radius: 4px; }
.prose figcaption { color: var(--muted); font-size: 14px; text-align: center; margin-top: 10px; }

.prose blockquote {
  margin-left: 0;
  margin-right: 0;
  padding: 16px 22px;
  background: var(--cream);
  border-left: 3px solid var(--burgundy);
  border-radius: 0 4px 4px 0;
}
.prose blockquote > *:last-child { margin-bottom: 0; }

.prose hr { border: 0; border-top: 1px solid var(--rule); margin: 2.4em 0; }

.prose .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.55; }
.prose td { border: 1px solid var(--rule); padding: 10px 12px; vertical-align: top; }
.prose tr:first-child td { background: var(--cream); font-weight: 600; color: var(--ink); }
.prose td p { margin: 0 0 0.6em; }
.prose td p:last-child { margin-bottom: 0; }

.prose .cta { margin: 1.8em 0; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 40px 0 0; padding: 0; list-style: none; }
.tags li { font-size: 13px; padding: 4px 12px; border: 1px solid var(--rule); border-radius: 999px; color: var(--muted); }

.archive-note {
  margin: 32px 0 0;
  padding: 16px 20px;
  background: var(--cream);
  border-radius: 4px;
  font-size: 15px;
  color: var(--muted);
}
.archive-note p { margin: 0; }

.more { margin-top: 64px; padding-top: 32px; border-top: 1px solid var(--rule); }
.more h2 { font-family: var(--serif); font-weight: 400; font-size: 26px; color: var(--ink); margin: 0 0 20px; }

/* Index page */

.index { max-width: 1120px; margin: 0 auto; padding: 56px 24px 0; }
.index .lede { font-size: 19px; color: var(--muted); max-width: 640px; margin: 0 0 44px; }

.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 32px; }
.more .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }

.card a { text-decoration: none; color: inherit; display: block; }
.card .thumb { aspect-ratio: 940 / 612; overflow: hidden; border-radius: 4px; background: var(--cream-deep); margin-bottom: 14px; }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.3s ease; }
.card a:hover .thumb img { transform: scale(1.03); }
.card h3 { font-family: var(--serif); font-weight: 400; color: var(--ink); font-size: 23px; line-height: 1.25; margin: 0 0 8px; }
.card a:hover h3 { color: var(--burgundy); }
.card .meta { color: var(--muted); font-size: 14px; margin: 0 0 8px; }
.card .excerpt { font-size: 15px; line-height: 1.6; margin: 0; color: var(--body); }
.more .card h3 { font-size: 19px; }

/* 404 */

.notfound { max-width: 720px; margin: 0 auto; padding: 72px 24px 0; }
.notfound h1 { font-family: var(--serif); font-weight: 400; font-size: 40px; color: var(--ink); margin: 0 0 16px; }

@media (max-width: 900px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .site-header .inner { padding: 14px 16px; }
  .site-header .logo img { height: 40px; }
  .site-header nav { gap: 14px; font-size: 15px; }
  .site-header nav .home-link { display: none; }
  .post, .index, .notfound { padding-left: 16px; padding-right: 16px; }
  .post { padding-top: 32px; }
  .cards, .more .cards { grid-template-columns: 1fr; }
  .prose h2 { font-size: 22px; }
  .site-footer .inner { flex-direction: column; align-items: flex-start; gap: 8px; padding: 22px 16px; }
}
