:root {
  color-scheme: dark;
  --bg: #050506;
  --text: #f0f0ec;
  --muted: #98989a;
  --soft: #d8d8d4;
  --line: rgba(255, 255, 255, .16);
  --paper: #d8d8d4;
  --paper-muted: rgba(7, 7, 8, .62);
  --ink: #080809;
  --cyan: #10c6d8;
  --red: #e43724;
  --violet: #31115a;
  --pad: clamp(1.15rem, 3vw, 2.75rem);
  --header: 72px;
}

* { box-sizing: border-box; }

html {
  min-width: 320px;
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
img { display: block; width: 100%; max-width: 100%; height: auto; }
figure { margin: 0; }
button { font: inherit; }

.skip-link {
  position: fixed;
  z-index: 100;
  top: .75rem;
  left: .75rem;
  padding: .7rem 1rem;
  background: #fff;
  color: #000;
  transform: translateY(-180%);
}

.skip-link:focus { transform: translateY(0); }

.site-header {
  position: sticky;
  z-index: 30;
  top: 0;
  display: flex;
  min-height: var(--header);
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 var(--pad);
  border-bottom: 1px solid var(--line);
  background: rgba(5, 5, 6, .88);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.brand { display: inline-flex; align-items: center; }
.brand-mark { display: block; width: 56px; height: 56px; flex: 0 0 auto; }

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(1.25rem, 3vw, 2.75rem);
  color: var(--muted);
  font-size: .86rem;
}

.site-nav a { transition: color .25s ease; }
.site-nav a:hover,
.site-nav a:focus-visible,
.site-nav a[aria-current="page"] { color: var(--text); }

.menu-toggle {
  display: none;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.project-hero {
  display: grid;
  min-height: calc(88svh - var(--header));
  align-content: space-between;
  padding: clamp(3.5rem, 7vw, 6.5rem) var(--pad) clamp(2.5rem, 5vw, 4.5rem);
}

.project-index,
.section-label,
.image-caption,
.meta-list dt,
.credits dt {
  margin: 0;
  color: var(--muted);
  font-size: .72rem;
  line-height: 1.45;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.project-title {
  margin: clamp(5rem, 10vw, 9rem) 0 0;
  font-size: clamp(5rem, 13.2vw, 13rem);
  font-weight: 500;
  line-height: .78;
  letter-spacing: -.075em;
}

.project-title span { display: block; }

.project-title .title-secondary {
  margin: 1.1rem 0 0 27%;
  color: var(--soft);
  font-size: .36em;
  line-height: .96;
  letter-spacing: -.055em;
}

.hero-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  margin-top: clamp(5rem, 10vw, 9rem);
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.5;
}

.hero-meta span:nth-child(2) { text-align: center; }
.hero-meta span:last-child { text-align: right; }

.hero-frame {
  padding: clamp(1.5rem, 3vw, 3rem) var(--pad) clamp(3rem, 7vw, 7rem);
  background: #000;
}

.hero-frame img { width: min(100%, 100rem); margin-inline: auto; }

.overview {
  display: grid;
  grid-template-columns: minmax(13rem, .72fr) minmax(0, 1.28fr);
  gap: clamp(4rem, 11vw, 13rem);
  padding: clamp(7rem, 12vw, 13rem) var(--pad);
  border-bottom: 1px solid var(--line);
}

.meta-list {
  display: grid;
  align-content: start;
  gap: 1.7rem;
  margin: 0;
}

.meta-list div { padding-top: .85rem; border-top: 1px solid var(--line); }

.meta-list dd {
  margin: .42rem 0 0;
  color: var(--soft);
  font-size: .88rem;
  line-height: 1.5;
}

.overview-copy > p {
  max-width: 23ch;
  margin: 0;
  color: var(--soft);
  font-size: clamp(2rem, 4.4vw, 5rem);
  line-height: .99;
  letter-spacing: -.052em;
}

.overview-detail {
  display: grid;
  max-width: 58rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem clamp(1.5rem, 3vw, 3.5rem);
  margin-top: 3.5rem;
}

.overview-detail p,
.section-copy p,
.result-copy p {
  margin: 0;
  color: var(--muted);
  font-size: clamp(.98rem, 1.25vw, 1.14rem);
  line-height: 1.55;
  letter-spacing: -.015em;
}

.phase {
  padding: clamp(8rem, 14vw, 15rem) var(--pad);
  border-bottom: 1px solid var(--line);
}

.phase-head {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(18rem, .8fr);
  gap: clamp(3rem, 9vw, 10rem);
  align-items: end;
  margin-bottom: clamp(5rem, 9vw, 9rem);
}

.phase-head h2,
.result-section h2,
.credits-section h2 {
  max-width: 12ch;
  margin: .8rem 0 0;
  font-size: clamp(3rem, 6.8vw, 7.2rem);
  font-weight: 500;
  line-height: .9;
  letter-spacing: -.06em;
}

.section-copy,
.result-copy {
  display: grid;
  gap: 1.15rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.image-caption {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-top: .72rem;
}

.foundation-section {
  background: var(--paper);
  color: var(--ink);
}

.foundation-section .section-label,
.foundation-section .image-caption,
.foundation-section .section-copy p { color: var(--paper-muted); }

.foundation-section .section-copy,
.foundation-section .image-caption { border-color: rgba(0, 0, 0, .22); }

.book-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(2rem, 4vw, 5rem);
  align-items: start;
}

.book-pair figure:last-child { margin-top: clamp(7rem, 11vw, 12rem); }

.vertical-studies,
.axis-studies {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(4rem, 9vw, 10rem) clamp(1rem, 2vw, 2rem);
  align-items: start;
  margin-top: clamp(11rem, 19vw, 21rem);
}

.vertical-studies figure:first-child { grid-column: 2 / span 5; }
.vertical-studies figure:last-child { grid-column: 8 / span 4; margin-top: clamp(7rem, 12vw, 13rem); }
.axis-studies figure:first-child { grid-column: 1 / span 4; }
.axis-studies figure:last-child { grid-column: 7 / span 4; margin-top: clamp(8rem, 14vw, 15rem); }

.balance-study {
  width: min(86%, 92rem);
  margin: clamp(12rem, 21vw, 23rem) auto 0;
}

.light-section { background: #030304; }

.ripple-board {
  width: min(88%, 96rem);
  margin: 0 auto clamp(11rem, 19vw, 21rem);
}

.emergence-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(4rem, 9vw, 10rem) clamp(1rem, 2vw, 2rem);
  align-items: start;
}

.emergence-grid figure:first-child { grid-column: 1 / span 7; }
.emergence-grid figure:last-child { grid-column: 8 / -1; margin-top: clamp(8rem, 14vw, 15rem); }

.surface-pair,
.rhythm-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(2rem, 4vw, 5rem);
  align-items: start;
  margin-top: clamp(12rem, 21vw, 23rem);
}

.surface-pair figure:last-child,
.rhythm-pair figure:last-child { margin-top: clamp(7rem, 12vw, 13rem); }

.convergence-study {
  width: min(56%, 52rem);
  margin: clamp(12rem, 21vw, 23rem) auto 0;
}

.fold-study {
  width: min(82%, 88rem);
  margin: clamp(12rem, 21vw, 23rem) auto 0;
}

.chromatic-section {
  background: #0a0611;
  background-image: linear-gradient(135deg, rgba(26, 8, 50, .46), transparent 48%, rgba(112, 14, 17, .16));
}

.motion-lead {
  width: min(88%, 96rem);
  margin: 0 0 clamp(11rem, 19vw, 21rem) auto;
}

.motion-sequence {
  width: min(74%, 80rem);
  margin: 0 auto clamp(12rem, 21vw, 23rem);
}

.motion-pair,
.motion-final {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(4rem, 9vw, 10rem) clamp(1rem, 2vw, 2rem);
  align-items: start;
}

.motion-pair figure:first-child,
.motion-final figure:first-child { grid-column: 1 / span 7; }
.motion-pair figure:last-child,
.motion-final figure:last-child { grid-column: 7 / -1; margin-top: clamp(8rem, 14vw, 15rem); }

.interference-study {
  width: min(90%, 98rem);
  margin: clamp(12rem, 21vw, 23rem) auto;
}

.convergent-motion {
  width: min(72%, 78rem);
  margin: clamp(12rem, 21vw, 23rem) 0 0 auto;
}

.typography-section { background: #020203; }

.type-lead {
  width: min(90%, 98rem);
  margin: 0 auto clamp(12rem, 21vw, 23rem);
}

.type-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(8rem, 14vw, 15rem) clamp(1.5rem, 3vw, 3.5rem);
  align-items: start;
}

.type-grid figure:nth-child(even) { margin-top: clamp(5rem, 9vw, 10rem); }

.type-closing {
  width: min(82%, 88rem);
  margin: clamp(13rem, 23vw, 25rem) 0 clamp(13rem, 23vw, 25rem) auto;
}

.title-final { width: min(76%, 80rem); margin: 0 auto; }

.result-section,
.credits-section {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(18rem, .9fr);
  gap: clamp(3rem, 9vw, 10rem);
  padding: clamp(8rem, 14vw, 15rem) var(--pad);
}

.result-section {
  position: relative;
  overflow: hidden;
  background: #141020;
  color: var(--text);
}

.result-section::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: .42rem;
  background: linear-gradient(180deg, var(--cyan), #231cbf 36%, #df174e 68%, #f06a16);
  content: "";
}

.result-section .section-label,
.result-copy p { color: rgba(240, 240, 236, .68); }
.result-copy { border-color: rgba(255, 255, 255, .2); }

.credits-section { border-bottom: 1px solid var(--line); }

.credits {
  display: grid;
  align-content: start;
  gap: 0;
  margin: 0;
}

.credits div {
  display: grid;
  grid-template-columns: 8rem minmax(0, 1fr);
  gap: 1rem;
  padding: 1rem 0;
  border-top: 1px solid var(--line);
}

.credits dd {
  margin: 0;
  color: var(--soft);
  font-size: .95rem;
  line-height: 1.5;
}

.project-return {
  display: flex;
  min-height: 44svh;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  padding: clamp(3rem, 7vw, 7rem) var(--pad);
  border-bottom: 1px solid var(--line);
}

.project-return span {
  color: var(--muted);
  font-size: .76rem;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.project-return strong {
  font-size: clamp(3rem, 9vw, 9rem);
  font-weight: 500;
  line-height: .88;
  letter-spacing: -.065em;
  transition: color .25s ease;
}

.project-return:hover strong,
.project-return:focus-visible strong { color: var(--cyan); }

.site-footer {
  display: flex;
  min-height: 190px;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  padding: 3rem var(--pad);
  color: var(--muted);
  font-size: .72rem;
  line-height: 1.5;
}

.site-footer span:last-child { max-width: 38rem; text-align: right; }

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .8s ease, transform .8s cubic-bezier(.22, 1, .36, 1);
}

.reveal.is-visible { opacity: 1; transform: none; }

@media (max-width: 760px) {
  .site-header { min-height: 64px; }
  .brand-mark { width: 48px; height: 48px; }
  .menu-toggle { display: block; }

  .site-nav {
    position: fixed;
    inset: 64px 0 auto;
    display: none;
    min-height: calc(100svh - 64px);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 2rem var(--pad);
    background: rgba(5, 5, 6, .98);
  }

  .site-nav.is-open { display: flex; }

  .site-nav a {
    width: 100%;
    padding: 1rem 0;
    border-bottom: 1px solid var(--line);
    font-size: 1.15rem;
  }

  .project-hero { min-height: calc(78svh - 64px); }

  .project-title {
    margin-top: 4rem;
    font-size: clamp(4.8rem, 25vw, 7rem);
    line-height: .82;
  }

  .project-title .title-secondary {
    max-width: 10ch;
    margin: 1.3rem 0 0;
    font-size: .42em;
  }

  .hero-meta { grid-template-columns: 1fr; gap: .45rem; margin-top: 4rem; }
  .hero-meta span:nth-child(2),
  .hero-meta span:last-child { text-align: left; }

  .overview,
  .phase-head,
  .result-section,
  .credits-section { grid-template-columns: 1fr; }

  .overview { gap: 4rem; }
  .overview-detail { grid-template-columns: 1fr; }

  .phase-head h2,
  .result-section h2,
  .credits-section h2 { font-size: clamp(3rem, 15vw, 5rem); }

  .book-pair,
  .vertical-studies,
  .axis-studies,
  .emergence-grid,
  .surface-pair,
  .rhythm-pair,
  .motion-pair,
  .motion-final,
  .type-grid {
    width: 100%;
    grid-template-columns: 1fr;
    gap: 5rem;
    margin-inline: 0;
  }

  .book-pair figure:last-child,
  .vertical-studies figure:first-child,
  .vertical-studies figure:last-child,
  .axis-studies figure:first-child,
  .axis-studies figure:last-child,
  .emergence-grid figure:first-child,
  .emergence-grid figure:last-child,
  .surface-pair figure:last-child,
  .rhythm-pair figure:last-child,
  .motion-pair figure:first-child,
  .motion-pair figure:last-child,
  .motion-final figure:first-child,
  .motion-final figure:last-child,
  .type-grid figure:nth-child(even) {
    grid-column: auto;
    margin-top: 0;
  }

  .vertical-studies,
  .axis-studies,
  .surface-pair,
  .rhythm-pair,
  .motion-final { margin-top: 8rem; }

  .balance-study,
  .ripple-board,
  .convergence-study,
  .fold-study,
  .motion-lead,
  .motion-sequence,
  .interference-study,
  .convergent-motion,
  .type-lead,
  .type-closing,
  .title-final {
    width: 100%;
    margin-inline: 0;
  }

  .convergence-study { margin-top: 8rem; }

  .site-footer { min-height: 150px; flex-direction: column; align-items: flex-start; }
  .site-footer span:last-child { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
