:root {
  --ink: #171612;
  --muted: #69665f;
  --paper: #f5f1e8;
  --paper-deep: #ece5d8;
  --card: #fbf8f1;
  --line: #d8d0c1;
  --amber: #b65f1e;
  --amber-dark: #884414;
  --blue: #2e5871;
  --night: #11100e;
  --night-soft: #1a1916;
  --white: #fffdf8;
  --sans: "Manrope", system-ui, sans-serif;
  --serif: "Source Serif 4", Georgia, serif;
  --mono: "DM Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); text-underline-offset: .2em; }
a:hover { text-decoration-color: currentColor; }
.shell { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.narrow { max-width: 850px; }
.skip-link { position: fixed; left: 16px; top: -80px; z-index: 10; background: var(--white); color: var(--ink); padding: 12px 16px; }
.skip-link:focus { top: 16px; }

.site-header {
  position: relative;
  z-index: 3;
  border-bottom: 1px solid rgba(23,22,18,.15);
  background: rgba(245,241,232,.9);
  backdrop-filter: blur(14px);
}
.nav-wrap { min-height: 74px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-weight: 800; text-decoration: none; letter-spacing: -.02em; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; color: var(--paper); background: var(--ink); font-family: var(--mono); font-size: 12px; letter-spacing: -.08em; }
nav { display: flex; align-items: center; gap: clamp(18px, 3vw, 34px); }
nav a { color: #3f3c36; font-size: 14px; font-weight: 600; text-decoration: none; }
nav a:hover { color: var(--amber); }

.hero { position: relative; overflow: hidden; padding: clamp(84px, 11vw, 150px) 0 clamp(80px, 10vw, 130px); }
.hero::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(circle at 85% 10%, rgba(182,95,30,.13), transparent 25%),
    linear-gradient(rgba(23,22,18,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23,22,18,.035) 1px, transparent 1px);
  background-size: auto, 48px 48px, 48px 48px;
  mask-image: linear-gradient(to bottom, black, transparent 88%);
}
.hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(320px, .55fr); gap: clamp(54px, 8vw, 110px); align-items: end; }
.eyebrow { margin: 0 0 22px; display: flex; align-items: center; gap: 11px; color: var(--amber-dark); font: 500 12px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.eyebrow span { width: 30px; height: 1px; background: currentColor; }
h1, h2, h3 { text-wrap: balance; }
.hero h1 { max-width: 820px; margin: 0; font-size: clamp(46px, 6.5vw, 88px); line-height: .99; letter-spacing: -.065em; }
.hero-copy { max-width: 760px; margin: 34px 0 0; color: #4e4b44; font: 400 clamp(18px, 2vw, 22px)/1.65 var(--serif); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 49px; padding: 0 20px; border: 1px solid var(--ink); font-size: 14px; font-weight: 700; text-decoration: none; transition: transform .18s ease, background .18s ease, color .18s ease; }
.button:hover { transform: translateY(-2px); }
.primary { color: var(--paper); background: var(--ink); }
.primary:hover { background: var(--amber-dark); border-color: var(--amber-dark); }
.secondary { background: rgba(255,255,255,.28); }
.secondary:hover { color: var(--paper); background: var(--ink); }
.signal-card { position: relative; padding: 30px; color: var(--paper); background: var(--night); box-shadow: 14px 14px 0 var(--paper-deep); }
.signal-card::before { content: ""; position: absolute; width: 76px; height: 4px; top: 0; left: 30px; background: var(--amber); }
.signal-label { color: #c3baac; font: 500 11px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.signal-title { margin: 30px 0 14px; color: var(--white); font: 700 25px/1.2 var(--serif); }
.signal-card > p:last-of-type { color: #cfc8bb; font: 400 15px/1.7 var(--serif); }
.signal-meta { margin-top: 28px; padding-top: 20px; border-top: 1px solid #37342e; display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; font: 500 11px/1.4 var(--mono); }
.signal-meta span { display: flex; align-items: center; gap: 8px; color: #a9c0ab; }
.signal-meta i { width: 7px; height: 7px; border-radius: 50%; background: #79b47f; box-shadow: 0 0 0 4px rgba(121,180,127,.12); }
.signal-meta a { color: #d6a172; }

.section { padding-block: clamp(76px, 9vw, 120px); }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 28px; margin-bottom: 45px; }
.section-heading h2, .project-band h2 { margin: 0; font-size: clamp(34px, 4vw, 54px); line-height: 1.05; letter-spacing: -.045em; }
.text-link, .card-link { color: var(--amber-dark); font-size: 13px; font-weight: 800; text-decoration: none; }
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.post-card { min-height: 310px; padding: 28px; border: 1px solid var(--line); background: var(--card); display: flex; flex-direction: column; transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.post-card:hover { transform: translateY(-4px); border-color: #bcae9a; box-shadow: 0 18px 35px rgba(55,45,32,.08); }
.post-meta { display: flex; flex-wrap: wrap; gap: 8px 15px; color: var(--muted); font: 400 11px/1.4 var(--mono); text-transform: uppercase; letter-spacing: .04em; }
.post-card h3 { margin: 35px 0 14px; font: 700 26px/1.15 var(--serif); letter-spacing: -.025em; }
.post-card h3 a, .post-list h2 a { text-decoration: none; }
.post-card p { margin: 0 0 28px; color: #5c5850; font: 400 15px/1.65 var(--serif); }
.post-card .card-link { margin-top: auto; }

.project-band { padding-block: clamp(76px, 9vw, 112px); color: var(--paper); background: var(--blue); }
.project-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 80px; align-items: center; }
.eyebrow.light { color: #d8b28d; }
.project-band h2 { color: var(--white); }
.project-band p:not(.eyebrow) { max-width: 660px; margin: 24px 0 0; color: #d7e0e5; font: 400 19px/1.7 var(--serif); }
.project-points { display: grid; gap: 14px; }
.project-points > span { padding-bottom: 14px; border-bottom: 1px solid rgba(255,255,255,.2); font: 500 13px/1.4 var(--mono); }
.project-button { margin-top: 16px; color: var(--blue); background: var(--white); border-color: var(--white); }

.page-hero { padding: clamp(72px, 9vw, 120px) 0 60px; border-bottom: 1px solid var(--line); }
.page-hero h1 { max-width: 790px; margin: 0; font-size: clamp(42px, 6vw, 74px); line-height: 1.02; letter-spacing: -.055em; }
.page-hero > div > p:last-child:not(.eyebrow) { margin: 26px 0 0; color: var(--muted); font: 400 19px/1.7 var(--serif); }
.post-list { display: grid; gap: 0; }
.post-list article { padding: 42px 0; border-bottom: 1px solid var(--line); }
.post-list h2 { margin: 16px 0 10px; font: 700 34px/1.15 var(--serif); letter-spacing: -.025em; }
.post-list p { max-width: 680px; color: var(--muted); font: 400 17px/1.65 var(--serif); }

.article-header { padding: clamp(68px, 9vw, 120px) 0 58px; border-bottom: 1px solid var(--line); }
.article-shell { max-width: 900px; }
.back-link { display: inline-block; margin-bottom: 50px; color: var(--muted); font: 500 12px/1.4 var(--mono); text-decoration: none; }
.article-meta { display: flex; gap: 20px; color: var(--amber-dark); font: 500 11px/1.4 var(--mono); letter-spacing: .05em; text-transform: uppercase; }
.article-header h1 { max-width: 880px; margin: 20px 0 26px; font-size: clamp(45px, 6.5vw, 80px); line-height: 1; letter-spacing: -.058em; }
.article-dek { max-width: 760px; margin: 0; color: #565148; font: 400 clamp(19px, 2vw, 23px)/1.55 var(--serif); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.tags a { padding: 6px 9px; border: 1px solid var(--line); color: var(--muted); font: 400 10px/1 var(--mono); text-decoration: none; text-transform: uppercase; }
.article-layout { max-width: 1050px; display: grid; grid-template-columns: 100px minmax(0, 760px); gap: 50px; padding-block: clamp(60px, 8vw, 100px); }
.article-rail { display: flex; justify-content: end; }
.article-rail span { width: 1px; height: 100%; background: linear-gradient(var(--amber), var(--line) 18%, transparent 88%); }
.prose { min-width: 0; font: 400 19px/1.78 var(--serif); }
.prose > :first-child { margin-top: 0; }
.prose h2 { margin: 2.3em 0 .7em; font: 700 clamp(30px, 4vw, 42px)/1.12 var(--sans); letter-spacing: -.04em; }
.prose h3 { margin: 2em 0 .6em; font: 700 25px/1.2 var(--sans); letter-spacing: -.025em; }
.prose p { margin: 1.25em 0; }
.prose blockquote { margin: 2em 0; padding: 5px 0 5px 28px; border-left: 3px solid var(--amber); color: #49453e; font-size: 1.13em; }
.prose strong { color: #0e0d0b; }
.prose a { color: var(--blue); font-weight: 600; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li { margin: .55em 0; padding-left: .2em; }
.prose table { display: block; width: 100%; margin: 2.2em 0; overflow-x: auto; border-collapse: collapse; font: 500 14px/1.5 var(--sans); }
.prose th, .prose td { min-width: 120px; padding: 13px 15px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.prose th { color: var(--white); background: var(--night); }
.prose tr:nth-child(even) td { background: rgba(255,255,255,.36); }
.prose code { padding: .12em .34em; color: #8d3e0e; background: #e9dfcf; border-radius: 2px; font: .82em/1.4 var(--mono); }
.prose pre { margin: 2.2em 0; padding: 24px; overflow-x: auto; color: #eee9df; background: var(--night); border-left: 4px solid var(--amber); font: 13px/1.65 var(--mono); }
.prose pre code { padding: 0; color: inherit; background: none; font: inherit; }
.article-footer { margin-bottom: clamp(76px, 10vw, 130px); padding: 42px; border: 1px solid var(--line); background: var(--card); }
.article-footer h2 { margin: 0; font-size: clamp(30px, 4vw, 44px); letter-spacing: -.04em; }
.article-footer > p:not(.eyebrow) { max-width: 640px; color: var(--muted); font: 400 17px/1.65 var(--serif); }
.article-footer .button { margin-top: 10px; }
.intro-prose { margin-bottom: 50px; }

.site-footer { padding: 60px 0 30px; color: #c8c1b5; background: var(--night); }
.footer-grid { display: flex; justify-content: space-between; align-items: start; gap: 40px; }
.footer-title { margin: 0 0 8px; color: var(--white); font-size: 18px; font-weight: 800; }
.footer-grid p:not(.footer-title) { margin: 0; font: 400 15px/1.6 var(--serif); }
.footer-links { display: flex; gap: 24px; }
.footer-links a { color: var(--white); font-size: 13px; font-weight: 700; text-decoration: none; }
.footer-note { display: flex; justify-content: space-between; gap: 20px; margin-top: 45px; padding-top: 22px; border-top: 1px solid #34312b; color: #827d74; font: 400 10px/1.4 var(--mono); text-transform: uppercase; letter-spacing: .05em; }
.not-found { min-height: 66vh; padding-block: 110px; }
.not-found h1 { margin: 0; font-size: clamp(42px, 6vw, 70px); letter-spacing: -.05em; }
.not-found > p:not(.eyebrow) { margin: 22px 0 30px; color: var(--muted); font: 400 19px/1.6 var(--serif); }

@media (max-width: 900px) {
  .hero-grid, .project-grid { grid-template-columns: 1fr; }
  .signal-card { max-width: 560px; }
  .post-grid { grid-template-columns: 1fr; }
  .post-card { min-height: 0; }
  .article-layout { grid-template-columns: 1fr; }
  .article-rail { display: none; }
}
@media (max-width: 640px) {
  .shell { width: min(100% - 28px, 1180px); }
  .nav-wrap { min-height: 66px; }
  .brand > span:last-child { display: none; }
  nav { gap: 16px; }
  nav a { font-size: 12px; }
  nav a:last-child { display: none; }
  .hero { padding-top: 68px; }
  .hero h1 { font-size: clamp(42px, 13vw, 62px); }
  .signal-card { padding: 25px; box-shadow: 8px 8px 0 var(--paper-deep); }
  .section-heading { align-items: start; flex-direction: column; }
  .footer-grid, .footer-note { flex-direction: column; }
  .article-header h1 { font-size: clamp(42px, 13vw, 64px); }
  .article-footer { padding: 28px; }
  .prose { font-size: 18px; }
  .prose pre { margin-inline: -14px; padding: 20px 14px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

