/* ---------- Tokens ---------- */
:root {
  --bg: #e9e6df;
  --text: #1c1c1c;
  --muted: #77736b;
  --border: #d3cec4;
  --ink: #1c1c1c;
  --paper: #ffffff;
  --max: 76rem;
  --font: "Figtree", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
img { display: block; width: 100%; height: 100%; object-fit: cover; }

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.label {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* ---------- Top bar ---------- */
.topbar { border-bottom: 1px solid var(--border); }
.topbar .container {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding-top: 1.1rem;
  padding-bottom: 1.1rem;
}
.topbar .est { color: var(--muted); }
.wordmark {
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-transform: lowercase;
}
.topbar .btn { justify-self: end; }

.btn {
  display: inline-block;
  border: 1px solid var(--ink);
  padding: 0.55rem 1rem;
  font-size: 0.8rem;
  font-weight: 500;
  text-align: center;
  transition: background 0.15s, color 0.15s;
}
.btn:hover { background: var(--ink); color: var(--bg); }
.btn.solid { background: var(--ink); color: var(--bg); }
.btn.solid:hover { background: transparent; color: var(--ink); }
.btn.light { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.btn.light:hover { background: transparent; color: var(--paper); }

/* ---------- Main nav ---------- */
.mainnav { border-bottom: 1px solid var(--border); }
.mainnav ul {
  list-style: none;
  margin: 0;
  padding: 0.85rem 0;
  display: flex;
  justify-content: center;
  gap: 2.5rem;
}
.mainnav a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
}
.mainnav a::before {
  content: "";
  width: 7px;
  height: 7px;
  border: 1px solid currentColor;
}
.mainnav a:hover,
.mainnav a[aria-current="page"] { color: var(--text); }
.mainnav a[aria-current="page"]::before { background: currentColor; }

/* ---------- Masthead ---------- */
.masthead { border-bottom: 1px solid var(--border); }
.masthead h1 {
  margin: 0;
  padding: 0.6rem 0 0.2rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  column-gap: 1.5rem;
  font-size: clamp(2.6rem, 9.2vw, 7.5rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}

/* ---------- Shared post bits ---------- */
.thumb {
  display: block;
  overflow: hidden;
  background: var(--border);
  aspect-ratio: 16 / 9;
}
.thumb img { transition: transform 0.5s ease; }
a:hover .thumb img, .thumb:hover img { transform: scale(1.03); }

.ph { width: 100%; height: 100%; }

.meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.tag {
  background: var(--ink);
  color: var(--bg);
  padding: 0.25rem 0.5rem;
  line-height: 1;
}

.post-title { font-weight: 500; letter-spacing: -0.01em; line-height: 1.3; margin: 0; }
a:hover .post-title { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }

/* ---------- Hero grid ---------- */
.hero {
  display: grid;
  gap: 1.75rem;
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--border);
}
.hero.cols-3 { grid-template-columns: 1fr 2fr 1fr; }
.hero.cols-2 { grid-template-columns: 2fr 1fr; }
.hero.cols-1 { grid-template-columns: minmax(0, 46rem); justify-content: center; }

.hero-side { display: flex; flex-direction: column; gap: 1.75rem; }

.card-sm .post-title { font-size: 1.05rem; margin: 0.85rem 0 0.6rem; }

.card-feature { text-align: center; }
.card-feature .thumb { aspect-ratio: 3 / 2; }
.card-feature .meta { justify-content: center; margin-top: 1.1rem; }
.card-feature .post-title { font-size: clamp(1.35rem, 2.2vw, 1.75rem); margin: 0.75rem auto 0; max-width: 32rem; }

/* ---------- Strip ---------- */
.strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--border);
}
.strip:empty { display: none; }
.strip-item {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 0.9rem;
  align-items: start;
  padding: 1.1rem 1.25rem;
  border-right: 1px solid var(--border);
}
.strip-item:first-child { padding-left: 0; }
.strip-item:last-child { border-right: 0; }
.strip-item .thumb { aspect-ratio: 1; }
.strip-item .post-title { font-size: 0.88rem; margin-bottom: 0.5rem; }

/* ---------- Lower section ---------- */
.lower {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 19rem;
  gap: 4rem;
  padding: 2.5rem 0 4rem;
}

.section-label { color: var(--muted); margin: 0 0 1.25rem; }

.story {
  text-align: center;
  padding-bottom: 2.25rem;
  margin-bottom: 2.25rem;
  border-bottom: 1px solid var(--border);
}
.story:last-child { border-bottom: 0; margin-bottom: 0; }
.story .thumb { aspect-ratio: 5 / 3; }
.story .post-title { font-size: clamp(1.25rem, 2vw, 1.6rem); margin: 1.5rem auto 0.6rem; max-width: 36rem; }
.story p { color: var(--muted); font-size: 0.9rem; margin: 0 auto 1rem; max-width: 34rem; }
.story .meta { justify-content: center; }

/* ---------- Sidebar ---------- */
.sidebar { display: flex; flex-direction: column; gap: 2rem; }

.author-card {
  border: 1px solid var(--border);
  padding: 0.75rem 0.75rem 1.25rem;
  text-align: center;
}
.author-card .thumb { aspect-ratio: 16 / 9; }
.author-card h3 { font-size: 1.3rem; font-weight: 500; margin: 1rem 0 0.15rem; }
.author-card .role { font-size: 0.75rem; margin: 0 0 0.6rem; }
.author-card p { color: var(--muted); font-size: 0.78rem; margin: 0 0.5rem 1.1rem; }
.author-card .btn { display: block; margin-top: 0.6rem; }

.dark-box {
  background: var(--ink);
  color: var(--paper);
  padding: 1.25rem;
}
.dark-box .label { opacity: 0.7; }
.dark-box h3 { font-size: 1.45rem; font-weight: 500; line-height: 1.25; margin: 0.6rem 0 1.25rem; }
.dark-box .btn { display: block; }

.recent { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1rem; }
.recent a { display: grid; grid-template-columns: 64px 1fr; gap: 0.9rem; align-items: start; }
.recent .thumb { aspect-ratio: 4 / 3; }
.recent .post-title { font-size: 0.9rem; margin-bottom: 0.3rem; }

/* ---------- Article + About ---------- */
.article { max-width: 46rem; margin: 0 auto; padding: 3rem 0 4rem; }
.article-head { text-align: center; margin-bottom: 2rem; }
.article-head .meta { justify-content: center; }
.article-head h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 1rem 0 0;
}
.article-head .dek { color: var(--muted); font-size: 1.1rem; margin: 1rem auto 0; max-width: 34rem; }
.article .thumb { aspect-ratio: 3 / 2; margin-bottom: 2.5rem; }

.prose { font-size: 1.1rem; line-height: 1.75; max-width: 38rem; margin: 0 auto; }
.prose h2 { font-size: 1.5rem; font-weight: 500; letter-spacing: -0.01em; line-height: 1.3; margin: 2.5rem 0 0.75rem; }
.prose a { text-decoration: underline; text-underline-offset: 3px; }
.prose blockquote {
  margin: 2rem 0;
  padding: 1.5rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  font-size: 1.4rem;
  line-height: 1.4;
  text-align: center;
}
.prose img { height: auto; margin: 2rem 0; }

.back-link { display: block; text-align: center; margin-top: 3rem; }

.about-photo { width: 9rem; height: 9rem; margin: 0 auto 1.5rem; aspect-ratio: 1; border-radius: 50%; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); color: var(--muted); }
.site-footer .container {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}
.site-footer nav { display: flex; gap: 1.5rem; }
.site-footer a:hover { color: var(--text); }

main { flex: 1; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero.cols-3 { grid-template-columns: 1fr 1fr; }
  .hero.cols-3 .card-feature { grid-column: 1 / -1; order: -1; }
  .strip { grid-template-columns: 1fr 1fr; }
  .strip-item:nth-child(2n) { border-right: 0; }
  .strip-item:nth-child(2n + 1) { padding-left: 0; }
  .strip-item:nth-child(-n + 2) { border-bottom: 1px solid var(--border); }
  .lower { grid-template-columns: 1fr; gap: 3rem; }
}

@media (max-width: 600px) {
  .container { padding: 0 1rem; }
  .topbar .est { display: none; }
  .topbar .container { grid-template-columns: 1fr auto; }
  .wordmark { justify-self: start; }
  .mainnav ul { gap: 1.5rem; }
  .hero.cols-3, .hero.cols-2 { grid-template-columns: 1fr; }
  .strip { grid-template-columns: 1fr; }
  .strip-item { padding-left: 0; border-right: 0; border-bottom: 1px solid var(--border); }
  .strip-item:last-child { border-bottom: 0; }
}

/* Block-level cards and placeholders */
.ph, .card-sm, .card-feature, .story { display: block; }
.prose .signoff { font-size: 1.35rem; font-weight: 500; margin-top: 2rem; }

/* Newsletter-style sections */
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 2.75rem 0; }
.prose .section-kicker { display: block; color: var(--muted); margin-bottom: 0.6rem; }
.prose h2 { margin-top: 2.75rem; }
.prose hr + h2 { margin-top: 0; }
.prose p > strong:first-child { font-weight: 600; }
.round p { padding-bottom: 1.25rem; border-bottom: 1px solid var(--border); }
.round p:last-child { border-bottom: 0; padding-bottom: 0; }
.round strong { display: block; margin-bottom: 0.25rem; }
.calendar { padding-left: 1.1rem; }
.calendar li { margin-bottom: 0.6rem; }

/* ---------- Newsletter signup ---------- */
.subscribe {
  background: var(--ink);
  color: var(--paper);
  padding: 1.25rem;
  scroll-margin-top: 1.5rem;
}
.subscribe > .label { opacity: 0.7; }
.subscribe h3 { font-size: 1.45rem; font-weight: 500; line-height: 1.25; margin: 0.6rem 0 1.25rem; }
.subscribe-form > .label { display: block; opacity: 0.6; margin-bottom: 0.25rem; }
.subscribe-row { display: flex; flex-direction: column; gap: 0.9rem; }
.subscribe input {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.45);
  color: var(--paper);
  font: inherit;
  font-size: 0.95rem;
  padding: 0.5rem 0;
  border-radius: 0;
}
.subscribe input::placeholder { color: rgba(255, 255, 255, 0.55); }
.subscribe input:focus { outline: none; border-bottom-color: var(--paper); }
.subscribe button { font: inherit; font-size: 0.85rem; font-weight: 500; cursor: pointer; width: 100%; }
.subscribe button:disabled { opacity: 0.6; cursor: default; }
.form-note { font-size: 0.85rem; margin: 0.75rem 0 0; min-height: 1.2em; opacity: 0.85; }
.form-note:empty { display: none; }

.subscribe.wide { max-width: 38rem; margin: 3.5rem auto 0; padding: 2rem; }
.subscribe.wide h3 { font-size: 1.7rem; }
@media (min-width: 601px) {
  .subscribe.wide .subscribe-row { flex-direction: row; align-items: end; gap: 1rem; }
  .subscribe.wide button { width: auto; padding-left: 1.75rem; padding-right: 1.75rem; }
}
