:root {
  --bg: #FDFCF8;
  --sand: #F4F1EA;
  --ink: #191816;
  --muted: #5A5750;
  --faint: #848076;
  --rule: #E4DFD3;
  --accent: #2D5A3D;
  --serif: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 36px;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--rule);
  background: var(--bg);
}

.header-inner {
  height: 70px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 14px;
  color: var(--muted);
}

.nav a:hover {
  color: var(--ink);
}

.nav-link-strong {
  color: var(--ink);
  font-weight: 500;
}

/* Hero */
.hero {
  padding: 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: stretch;
}

.hero-left {
  padding: 74px 0 78px;
}

h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(46px, 5.2vw, 66px);
  line-height: 1.05;
  letter-spacing: 0.012em;
  margin: 0 0 24px;
}

h1 em {
  font-style: italic;
  color: var(--accent);
  display: inline-block;
  transform: scaleX(1.05);
  transform-origin: 0% 80%;
  letter-spacing: 0.025em;
  padding-right: 0.08em;
}

.lead {
  font-size: 17.5px;
  line-height: 1.64;
  color: var(--muted);
  max-width: 500px;
  margin: 0 0 32px;
}

/* Hero Abstract Canvas (full section height, faded vertically & horizontally) */
.hero-visual {
  position: relative;
  min-height: 100%;
  overflow: hidden;
}

#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 18%, #000 82%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 18%, #000 82%, transparent 100%);
}

.hero-links {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.pill-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: background 0.15s ease;
}

.pill-btn:hover {
  background: var(--accent);
}

.text-link {
  font-size: 14.5px;
  color: var(--ink);
  border-bottom: 1px solid #C6C0B4;
  padding-bottom: 2px;
  transition: border-color 0.15s ease;
}

.text-link:hover {
  border-bottom-color: var(--ink);
}

.inline-link {
  color: var(--ink);
  border-bottom: 1px solid #C6C0B4;
}

.inline-link:hover {
  border-bottom-color: var(--ink);
}

/* Scientific Figure Band */
.figure-band {
  background: var(--sand);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 64px 0;
}

.fig-grid {
  display: grid;
  grid-template-columns: 1.18fr 0.82fr;
  gap: 44px;
  align-items: center;
}

.fig-box {
  margin: 0;
  background: #FFFFFF;
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 24px 26px 22px;
}

.fig-cap {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--faint);
  letter-spacing: 0.06em;
  margin-bottom: 16px;
}

.fig-svg {
  width: 100%;
  height: auto;
  display: block;
}

.svg-box-title {
  font-family: var(--sans);
  font-size: 13.5px;
  font-weight: 600;
  fill: #191816;
}

.svg-box-sub {
  font-family: var(--mono);
  font-size: 10.5px;
  fill: #646057;
}

.svg-title-green {
  fill: #234931;
}

.svg-sub-green {
  fill: #2D5A3D;
}

.svg-edge-lbl {
  font-family: var(--mono);
  font-size: 10px;
  fill: #6E6A61;
}

.svg-edge-green {
  fill: #2D5A3D;
  font-weight: 500;
}

.fig-copy h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 38px;
  line-height: 1.12;
  letter-spacing: 0.012em;
  margin: 0 0 18px;
}

.fig-copy p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.65;
}

.fig-copy p:last-child {
  margin-bottom: 0;
}

/* Editorial Sections */
.essay {
  padding: 76px 0;
  border-bottom: 1px solid var(--rule);
}

.essay-grid {
  display: grid;
  grid-template-columns: 185px 1fr;
  gap: 36px;
  align-items: start;
}

.essay-label {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--faint);
  padding-top: 13px;
}

.essay h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(34px, 3.6vw, 42px);
  line-height: 1.12;
  letter-spacing: 0.012em;
  margin: 0 0 16px;
}

.prose {
  margin: 0;
  color: var(--muted);
  max-width: 620px;
  font-size: 16px;
}

.cli-paper {
  margin: 28px 0 0;
  padding: 24px 26px;
  background: #1B1A18;
  color: #ECEAE4;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.72;
  overflow-x: auto;
}

.cli-paper .cm {
  color: #8E8A80;
}

/* Full-width 3-column pillars */
.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 40px;
}

.pillar {
  border-top: 1px solid var(--ink);
  padding-top: 18px;
}

.pillar h3 {
  font-family: var(--serif);
  font-size: 27px;
  font-weight: 400;
  letter-spacing: 0.012em;
  line-height: 1.18;
  margin: 0 0 10px;
}

.pillar p {
  margin: 0;
  font-size: 14.8px;
  line-height: 1.65;
  color: var(--muted);
}

/* Full-width 2-column packaging */
.split-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin-top: 40px;
}

.box-soft {
  background: var(--sand);
  border: 1px solid var(--rule);
  padding: 32px 34px;
  border-radius: 10px;
}

.box-soft h3 {
  font-family: var(--serif);
  font-size: 31px;
  font-weight: 400;
  letter-spacing: 0.012em;
  line-height: 1.15;
  margin: 0 0 6px;
}

.box-soft .meta {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--faint);
  margin-bottom: 22px;
  display: block;
}

.box-soft ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 14.8px;
}

.box-soft li {
  margin-bottom: 10px;
}

.box-soft li:last-child {
  margin-bottom: 0;
}

.box-dark {
  background: #191816;
  border-color: #191816;
  color: #FDFCF8;
}

.box-dark .meta {
  color: #A6A096;
}

.box-dark ul {
  color: #D8D3C9;
}

/* Closing / Early Access */
.closing {
  padding: 84px 0 88px;
  text-align: center;
}

.closing h2 {
  font-family: var(--serif);
  font-size: clamp(38px, 4.4vw, 48px);
  font-weight: 400;
  letter-spacing: 0.012em;
  line-height: 1.1;
  margin: 0 0 14px;
}

.closing p {
  color: var(--muted);
  max-width: 520px;
  margin: 0 auto 28px;
}

.mail-form {
  display: inline-flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.mail-form input {
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid #C8C2B4;
  background: #FFFFFF;
  font-family: var(--sans);
  font-size: 14.5px;
  color: var(--ink);
  width: 280px;
  outline: none;
}

.mail-form input:focus {
  border-color: var(--ink);
}

.form-status {
  margin: 14px auto 0 !important;
  font-size: 13px;
  color: var(--faint);
  min-height: 20px;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--rule);
  padding: 26px 0 36px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--faint);
}

.footer-right {
  display: flex;
  gap: 20px;
}

.footer-right a:hover {
  color: var(--ink);
}

@media (max-width: 900px) {
  .wrap {
    padding: 0 24px;
  }

  .hero-grid,
  .fig-grid,
  .essay-grid,
  .pillars,
  .split-two {
    grid-template-columns: 1fr;
  }

  .hero-left {
    padding: 56px 0 28px;
  }

  .hero-visual {
    min-height: 280px;
    margin-bottom: 32px;
  }

  .essay-label {
    padding-top: 0;
  }

  .nav {
    display: none;
  }
}
