:root {
  --bg: #f4ecdf;
  --bg-deep: #eadcc6;
  --paper: rgba(255, 252, 246, 0.82);
  --paper-strong: rgba(255, 248, 238, 0.95);
  --ink: #1f1a14;
  --muted: #64584a;
  --line: rgba(54, 42, 28, 0.12);
  --accent: #9a5f2e;
  --accent-deep: #6b3d1c;
  --accent-soft: rgba(154, 95, 46, 0.12);
  --sans: "IBM Plex Sans", "Avenir Next", "Segoe UI", sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", monospace;
  --shadow: 0 28px 80px rgba(50, 34, 16, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(154, 95, 46, 0.14), transparent 33%),
    radial-gradient(circle at 85% 18%, rgba(24, 63, 93, 0.12), transparent 27%),
    linear-gradient(180deg, var(--bg), #f8f3ea 34%, #f4efe7 100%);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.65;
}

a {
  color: var(--accent-deep);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.16em;
}

img {
  max-width: 100%;
  display: block;
}

.page-shell {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}

.ambient {
  position: fixed;
  width: 34rem;
  height: 34rem;
  border-radius: 999px;
  filter: blur(70px);
  opacity: 0.38;
  pointer-events: none;
}

.ambient-left {
  top: -8rem;
  left: -12rem;
  background: rgba(154, 95, 46, 0.24);
}

.ambient-right {
  top: 18rem;
  right: -10rem;
  background: rgba(24, 63, 93, 0.18);
}

.site-header,
.site-footer,
main {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.6rem 0 1.2rem;
}

.site-mark {
  display: inline-flex;
  flex-direction: column;
  gap: 0.15rem;
  text-decoration: none;
}

.site-mark__eyebrow {
  font-size: 0.76rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.site-mark__title {
  font-family: var(--serif);
  font-size: 1.3rem;
  color: var(--ink);
}

.site-nav {
  display: flex;
  gap: 1rem;
  font-size: 0.95rem;
}

.site-nav a {
  text-decoration: none;
}

main {
  padding-bottom: 4rem;
}

.hero,
.section,
.post-layout {
  background: var(--paper);
  border: 1px solid var(--line);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(18rem, 1fr);
  gap: 2rem;
  border-radius: 28px;
  padding: 2.6rem;
  margin-top: 1rem;
}

.hero__copy h1,
.section h1,
.section h2,
.post-header h1 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.03em;
  margin: 0;
}

.hero__copy h1 {
  font-size: clamp(2.8rem, 6vw, 5rem);
}

.lede {
  font-size: 1.08rem;
  color: var(--muted);
  max-width: 65ch;
}

.eyebrow {
  margin: 0 0 0.9rem;
  color: var(--accent-deep);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero__actions,
.link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.6rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.9rem;
  padding: 0 1rem;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--accent-deep);
  color: #fffaf2;
  font-weight: 600;
  text-decoration: none;
}

.button--ghost {
  background: var(--paper-strong);
  border-color: var(--line);
  color: var(--ink);
}

.hero__stats,
.provenance-grid {
  display: grid;
  gap: 0.9rem;
}

.stat,
.provenance-card {
  background: var(--paper-strong);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 1rem 1.05rem;
}

.stat strong,
.provenance-card strong {
  display: block;
  font-size: 1.4rem;
  margin-top: 0.25rem;
}

.stat__label,
.provenance-card__label {
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.section {
  border-radius: 24px;
  padding: 2rem;
  margin-top: 1.5rem;
}

.section--split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

.section__head {
  margin-bottom: 1.5rem;
}

.section__head h1,
.section__head h2 {
  font-size: clamp(2rem, 4vw, 3.3rem);
  margin-bottom: 0.8rem;
}

.card-grid,
.series-list {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.post-card,
.series-card,
.stack-item,
.callout,
.filters label {
  background: var(--paper-strong);
  border: 1px solid var(--line);
  border-radius: 20px;
}

.post-card,
.series-card,
.stack-item {
  padding: 1.2rem;
}

.post-card h3,
.series-card h3,
.stack-item h3 {
  font-family: var(--serif);
  font-size: 1.5rem;
  line-height: 1.08;
  margin: 0.4rem 0 0.8rem;
}

.post-card__meta,
.post-card__footer,
.stack-item__meta,
.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.post-card__footer {
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
}

.stack {
  display: grid;
  gap: 0.85rem;
}

.filters {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  margin-bottom: 1.5rem;
}

.filters label {
  display: grid;
  gap: 0.55rem;
  padding: 0.95rem;
}

.filters span {
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.filters input,
.filters select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fffdfa;
  color: var(--ink);
  padding: 0.8rem 0.9rem;
  font: inherit;
}

.post-layout {
  border-radius: 28px;
  padding: 2rem;
  margin-top: 1rem;
}

.post-header {
  margin-bottom: 1.6rem;
}

.post-header h1 {
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  margin-bottom: 0.8rem;
}

.series-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 1.5rem 0;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--accent-soft);
}

.series-nav a,
.series-nav span {
  text-align: center;
  color: var(--ink);
  text-decoration: none;
}

.callout {
  padding: 1rem 1.1rem;
  margin-bottom: 1.5rem;
}

.essay-body {
  max-width: 760px;
}

.essay-body h2,
.essay-body h3,
.essay-body h4 {
  font-family: var(--serif);
  line-height: 1.06;
  margin-top: 2.2rem;
  margin-bottom: 0.8rem;
}

.essay-body h2 {
  font-size: 2rem;
}

.essay-body h3 {
  font-size: 1.55rem;
}

.essay-body p,
.essay-body li,
.essay-body blockquote {
  font-size: 1.02rem;
}

.essay-body blockquote {
  margin: 1.5rem 0;
  padding-left: 1rem;
  border-left: 3px solid var(--accent);
  color: var(--muted);
}

.essay-body img {
  margin: 1.6rem auto;
  border-radius: 18px;
  border: 1px solid var(--line);
  box-shadow: 0 18px 60px rgba(31, 26, 20, 0.1);
}

.essay-body pre,
.essay-body code {
  font-family: var(--mono);
}

.site-footer {
  padding: 0 0 2.5rem;
  color: var(--muted);
}

.empty-state {
  color: var(--muted);
}

@media (max-width: 900px) {
  .hero,
  .section--split {
    grid-template-columns: 1fr;
  }

  .site-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .series-nav {
    grid-template-columns: 1fr;
  }
}
