:root {
  --paper: #f3efe6;
  --ink: #1c1915;
  --muted: #5c574e;
  --accent: #3d5a54;
  --rule: #d4cfc3;
}

@font-face {
  font-family: "Source Serif 4";
  src: url("/assets/fonts/source-serif-4-latin-opsz-normal.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Source Serif 4";
  src: url("/assets/fonts/source-serif-4-latin-opsz-italic.woff2") format("woff2");
  font-weight: 200 900;
  font-style: italic;
  font-display: swap;
}

* { box-sizing: border-box; }

html {
  background: var(--paper);
  color: var(--ink);
  font-size: 19px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: "Source Serif 4", "Palatino Linotype", Palatino, "Book Antiqua", serif;
  font-weight: 450;
  line-height: 1.55;
  font-optical-sizing: auto;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover { text-decoration-thickness: 2px; }

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

.wrap {
  width: min(40rem, calc(100% - 2.5rem));
  margin: 0 auto;
  padding: 2.25rem 0 4.5rem;
}

header.site {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem 1.5rem;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 1rem;
  margin-bottom: 2.5rem;
}

header.site .brand {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-size: 1.15rem;
}

header.site .brand:hover { text-decoration: underline; text-decoration-thickness: 1px; }

nav.site {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.15rem;
  font-size: 0.95rem;
}

h1, h2, h3, h4 {
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  text-wrap: balance;
}

h1 { font-size: 2.15rem; margin: 0 0 0.8rem; }
h2 { font-size: 1.4rem; margin: 2.2rem 0 0.7rem; }
h3 { font-size: 1.15rem; margin: 1.6rem 0 0.5rem; }
h4 { font-size: 1.05rem; margin: 1.3rem 0 0.4rem; }

p { margin: 0 0 1rem; }

.lede {
  font-size: 1.22rem;
  line-height: 1.45;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.kicker {
  font-size: 0.95rem;
  color: var(--muted);
  margin: 0 0 0.35rem;
}

.meta {
  color: var(--muted);
  font-size: 0.95rem;
  margin: -0.3rem 0 1.4rem;
}

hr, .rule {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 2rem 0;
}

ul, ol { margin: 0 0 1rem 1.2rem; padding: 0; }
li { margin: 0 0 0.35rem; }

article p:last-child { margin-bottom: 0; }

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

.post-list li {
  margin: 0;
  padding: 1rem 0;
  border-top: 1px solid var(--rule);
}

.post-list li:last-child { border-bottom: 1px solid var(--rule); }

.post-list a.title {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.15rem;
}

.post-list a.title:hover { color: var(--accent); text-decoration: underline; }

.post-list .date {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 0.2rem;
}

.post-list .excerpt {
  margin: 0.35rem 0 0;
  color: var(--ink);
}

.team, .episodes, .challenges {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
}

.team li, .challenges li, .episodes li {
  margin: 0;
  padding: 0.85rem 0;
  border-top: 1px solid var(--rule);
}

.team li:last-child,
.challenges li:last-child,
.episodes li:last-child { border-bottom: 1px solid var(--rule); }

.role, .label {
  color: var(--muted);
  font-size: 0.95rem;
}

footer.site {
  border-top: 1px solid var(--rule);
  margin-top: 3rem;
  padding-top: 1rem;
  color: var(--muted);
  font-size: 0.95rem;
}

footer.site p { margin: 0 0 0.4rem; }

blockquote {
  margin: 1rem 0 1.2rem;
  padding: 0 0 0 1rem;
  border-left: 1px solid var(--rule);
}

code, pre {
  font-family: ui-monospace, "Cascadia Code", "SF Mono", Menlo, monospace;
  font-size: 0.88em;
}

figure { margin: 1rem 0 1.4rem; }
figcaption { color: var(--muted); font-size: 0.9rem; margin-top: 0.35rem; }

@media (max-width: 640px) {
  html { font-size: 18px; }
  h1 { font-size: 1.85rem; }
  .wrap { width: calc(100% - 2rem); padding-top: 1.5rem; }
}
