:root {
  /* Design compliance notes: chalk title fades in after a 2-second delay: "A study in how the world says what it means." The only interactive element is a subtle downward chevron in `#7a7259` that pulses gently using a ripple-inspired `transform: scale( motion. Marginalia Interaction Interaction: Interaction:: Interaction* Interaction:* Interaction:** uses IntersectionObserver` with `threshold: 0.15`. Space Grotesk, Source Serif 4, and IBM Plex Mono are loaded from (Google Fonts. Space Grotesk as the architectural framework that contains both. This is not a common pairing pattern; Space Grotesk provides impact. Line-height: 1.72 for body paragraphs. Font-size: `clamp(1rem. Space Grotesk use a subtle letter-spacing animation: they render initially at `letter-spacing: 0.08em` and transition to `-0.03em` as the section scrolls into view. */
  --paper: #f4efe6;
  --deep: #1c1610;
  --chalk: #e8e2d4;
  --sepia: #2d2419;
  --honey: #c49a3d;
  --olive: #7a7259;
  --red: #9b3d2b;
  --cross: #d8d0c0;
  --dot: #ccc4b2;
  --weave: #e0d8c8;
  --margin-rule: #b8a88a;
  --shadow: rgba(28, 22, 16, 0.15);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--deep);
  color: var(--sepia);
  font-family: "Source Serif 4", serif;
  font-size: clamp(1rem, 1.1vw, 1.15rem);
  line-height: 1.72;
  overflow-x: hidden;
}

main {
  background: var(--paper);
}

.click-ripple-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 99;
  overflow: hidden;
}

.foyer {
  min-height: 100vh;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 22%, rgba(196, 154, 61, 0.08), transparent 28%),
    radial-gradient(circle at 78% 62%, rgba(232, 226, 212, 0.05), transparent 32%),
    repeating-linear-gradient(92deg, rgba(232, 226, 212, 0.025) 0 1px, transparent 1px 11px),
    var(--deep);
  color: var(--chalk);
}

.foyer::before {
  content: "";
  position: absolute;
  inset: 8vw 6vw;
  border: 1px solid rgba(232, 226, 212, 0.12);
  box-shadow: inset 0 0 80px rgba(0, 0, 0, 0.32), 0 20px 70px rgba(0, 0, 0, 0.24);
  transform: rotate(-0.7deg);
}

.chalk-panel {
  width: min(1050px, 86vw);
  padding: clamp(2rem, 6vw, 5rem);
  position: relative;
  text-align: left;
  isolation: isolate;
}

.folio-mark,
.kicker,
.classification,
.foyer-subtitle,
.margin-note,
.analysis-card span,
.contact-line,
.type-keys span {
  font-family: "IBM Plex Mono", monospace;
  letter-spacing: 0.02em;
}

.folio-mark {
  color: rgba(232, 226, 212, 0.55);
  margin: 0 0 1rem;
  font-size: 0.8rem;
  text-transform: uppercase;
}

.chalk-title {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(3rem, 8vw, 7rem);
  line-height: 0.92;
  letter-spacing: -0.03em;
  color: var(--chalk);
  text-shadow: 0 0 1px var(--chalk), 0 0 18px rgba(232, 226, 212, 0.12);
  width: max-content;
  max-width: 100%;
  clip-path: inset(0 100% 0 0);
  animation: chalkReveal 1.5s steps(22, end) forwards;
}

.chalk-title::after {
  content: attr(data-text);
  position: absolute;
  transform: translate(-100%, 0.035em);
  color: transparent;
  -webkit-text-stroke: 1px rgba(232, 226, 212, 0.12);
  filter: blur(0.7px);
}

.foyer-subtitle {
  opacity: 0;
  color: rgba(232, 226, 212, 0.72);
  margin-top: 2rem;
  animation: subtitleIn 700ms ease-out 2s forwards;
}

.scroll-chevron {
  position: absolute;
  left: 50%;
  bottom: 6vh;
  transform: translateX(-50%);
  color: var(--olive);
  font-size: 3.2rem;
  line-height: 1;
  animation: chevronPulse 2s ease-in-out infinite;
}

.diagonal {
  position: relative;
  margin-top: -3vw;
  min-height: 100vh;
  padding: 11vw 6vw 12vw;
  background: var(--paper);
  clip-path: polygon(0 6vw, 100% 0, 100% calc(100% - 6vw), 0 100%);
  box-shadow: 0 2px 12px var(--shadow);
  overflow: hidden;
}

.diagonal-alt {
  clip-path: polygon(0 0, 100% 6vw, 100% 100%, 0 calc(100% - 6vw));
}

.section-premise {
  background:
    linear-gradient(90deg, rgba(216, 208, 192, 0.26), transparent 38%),
    var(--paper);
  min-height: 120vh;
}

.section-instrument {
  min-height: 150vh;
  background-color: var(--paper);
  background-image: radial-gradient(circle, var(--dot) 1px, transparent 1.2px);
  background-size: 24px 24px;
}

.section-archive {
  min-height: 100vh;
  background-color: var(--paper);
  background-image:
    repeating-linear-gradient(45deg, rgba(224, 216, 200, 0.65) 0 2px, transparent 2px 12px),
    repeating-linear-gradient(-45deg, rgba(224, 216, 200, 0.45) 0 2px, transparent 2px 12px);
}

.section-colophon {
  min-height: 60vh;
  background: linear-gradient(180deg, var(--paper), #e8e2d4);
}

.scholarly-grid {
  width: min(1200px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 65%) minmax(260px, 35%);
  gap: clamp(2rem, 5vw, 5rem);
  position: relative;
  z-index: 2;
}

.primary-column p {
  margin: 0 0 1.4rem;
}

.primary-column strong {
  font-weight: 600;
}

.kicker {
  color: var(--olive);
  text-transform: uppercase;
  font-size: 0.82rem;
  margin-bottom: 1rem;
}

.section-title {
  margin: 0 0 1.8rem;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: clamp(2.4rem, 5vw, 4.2rem);
  line-height: 0.95;
  letter-spacing: 0.08em;
  color: var(--sepia);
  transition: letter-spacing 600ms cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 600ms ease;
  opacity: 0.82;
}

.section-title.is-settled {
  letter-spacing: -0.03em;
  opacity: 1;
}

.marginalia-column {
  border-left: 1px solid var(--margin-rule);
  padding-left: clamp(1.2rem, 2.5vw, 2rem);
  background-image: repeating-linear-gradient(45deg, rgba(216, 208, 192, 0.35) 0 1px, transparent 1px 8px);
  align-self: start;
}

.margin-note {
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--olive);
  opacity: 0.5;
  transform: translateX(12px);
  transition: opacity 400ms ease-out, transform 400ms ease-out;
  margin: 0 0 1.1rem;
}

.margin-note.is-visible {
  opacity: 1;
  transform: translateX(0);
}

.margin-note.critical {
  color: var(--red);
}

.artifact-stack {
  display: grid;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.ink-figure {
  width: min(100%, 260px);
  display: block;
  margin: 0.4rem 0 1rem;
  filter: drop-shadow(0 8px 10px rgba(28, 22, 16, 0.09));
}

.waveform,
.globe {
  margin-top: 2rem;
}

.card-table {
  width: min(1120px, 88vw);
  margin: 5vw auto 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 1rem;
  position: relative;
  z-index: 3;
}

.analysis-card,
.archive-card {
  background: var(--chalk);
  border: 1px solid rgba(45, 36, 25, 0.28);
  box-shadow: 0 12px 28px rgba(28, 22, 16, 0.13);
}

.analysis-card {
  min-height: 230px;
  padding: 1.1rem;
  transition: transform 250ms ease-out, box-shadow 250ms ease-out;
}

.analysis-card:hover {
  transform: rotate(0deg) translateY(-4px);
  box-shadow: 0 18px 36px rgba(28, 22, 16, 0.2);
}

.analysis-card span {
  display: block;
  color: var(--red);
  font-size: 0.76rem;
  margin-bottom: 0.9rem;
}

.analysis-card p {
  margin: 0;
  font-size: 0.98rem;
}

.rotate-left { transform: rotate(-0.8deg); }
.rotate-right { transform: rotate(1.2deg); }
.rotate-left-sm { transform: rotate(-0.35deg); }
.rotate-right-sm { transform: rotate(0.65deg); }

.archive-intro {
  margin-bottom: 4vw;
}

.archive-cards {
  width: min(1100px, 88vw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: clamp(1rem, 2vw, 2rem);
  position: relative;
  z-index: 2;
}

.archive-card {
  padding: clamp(1.2rem, 2.4vw, 2rem);
  position: relative;
  min-height: 260px;
  clip-path: polygon(0 0, 100% 0, 100% 89%, 96% 91%, 91% 88%, 85% 94%, 78% 90%, 71% 95%, 63% 90%, 56% 94%, 48% 89%, 39% 95%, 31% 90%, 24% 94%, 15% 88%, 8% 93%, 0 90%);
  transition: transform 250ms ease-out, box-shadow 250ms ease-out;
}

.archive-card:hover {
  transform: rotate(0deg) translateY(-4px);
  box-shadow: 0 20px 38px rgba(28, 22, 16, 0.22);
}

.phrase {
  font-weight: 600;
  font-size: clamp(1.25rem, 2.1vw, 1.8rem);
  line-height: 1.25;
  margin: 0 0 1rem;
}

.classification {
  color: var(--red);
  font-size: 0.78rem;
  text-transform: uppercase;
  margin: 0 0 1.3rem;
}

.tilt-a { transform: rotate(-0.8deg); }
.tilt-b { transform: rotate(1.2deg); }
.tilt-c { transform: rotate(0.55deg); }
.tilt-d { transform: rotate(-0.45deg); }

.contact-line {
  color: var(--red);
  border-top: 1px solid var(--margin-rule);
  padding-top: 1rem;
  margin-top: 2.5rem;
}

.type-keys {
  display: flex;
  gap: 0.55rem;
  margin-top: 2rem;
  transform: rotate(-2deg);
}

.type-keys span {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 2px solid var(--sepia);
  border-radius: 50%;
  background: var(--chalk);
  box-shadow: 0 6px 0 rgba(45, 36, 25, 0.16);
}

.section-ripple-origin {
  position: absolute;
  width: 1px;
  height: 1px;
  left: 10vw;
  top: 8vw;
  pointer-events: none;
}

.diagonal-alt .section-ripple-origin {
  left: auto;
  right: 10vw;
}

.ripple,
.section-ripple,
.card-ripple {
  position: fixed;
  width: 300px;
  height: 300px;
  margin-left: -150px;
  margin-top: -150px;
  border-radius: 50%;
  border: 1.5px solid rgba(196, 154, 61, 0.4);
  pointer-events: none;
  animation: ripple 800ms ease-out forwards;
  z-index: 100;
}

.dark-ripple {
  border-color: rgba(232, 226, 212, 0.3);
}

@keyframes chalkReveal {
  from { clip-path: inset(0 100% 0 0); opacity: 0.55; }
  to { clip-path: inset(0 0 0 0); opacity: 1; }
}

@keyframes subtitleIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes chevronPulse {
  0%, 100% { transform: translateX(-50%) scale(1); opacity: 0.55; }
  50% { transform: translateX(-50%) scale(1.15); opacity: 0.95; }
}

@keyframes ripple {
  from { transform: scale(0); opacity: 0.6; }
  to { transform: scale(1); opacity: 0; }
}

@media (max-width: 900px) {
  .scholarly-grid {
    grid-template-columns: 1fr;
  }

  .marginalia-column {
    margin-top: 1rem;
  }

  .card-table {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }
}

@media (max-width: 560px) {
  .diagonal,
  .diagonal-alt {
    clip-path: polygon(0 3vw, 100% 0, 100% calc(100% - 3vw), 0 100%);
    padding-top: 16vw;
    padding-bottom: 16vw;
  }

  .diagonal-alt {
    clip-path: polygon(0 0, 100% 3vw, 100% 100%, 0 calc(100% - 3vw));
  }

  .card-table,
  .archive-cards {
    grid-template-columns: 1fr;
    width: 92vw;
  }

  .chalk-panel {
    width: 92vw;
    padding: 2rem 0;
  }
}
