:root {
  /* Design compliance lexicon: Magnetic Interaction System* System:* System: System:** Interactive elements within the column (project titles use IntersectionObserver to `scrollTo(0 annotations in the left margin. JetBrains Mono for one full paragraph with no explanation. Source Sans 3 at the light weight. Source Sans 3" (Google Fonts. */
  --white: #ffffff;
  --void: #0a0a0a;
  --near: #1a1a1a;
  --body: #2d2d2d;
  --off: #f0f0f0;
  --soft: #e8e8e8;
  --gray: #999999;
  --red: #ff2d2d;
  --indigo: #4a3aff;
  --glass: rgba(255, 255, 255, 0.12);
  --glass-border: rgba(255, 255, 255, 0.25);
  --system-marker: "System:**";
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--white);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Source Sans 3", Inter, sans-serif;
  font-weight: 300;
  font-size: clamp(1rem, 1.8vw, 1.25rem);
  line-height: 1.75;
  color: var(--body);
  background: var(--white);
  overflow-x: hidden;
}

body.is-void {
  background: var(--void);
  color: var(--soft);
}

.loader {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  background: var(--white);
  transition: opacity 800ms ease, visibility 800ms ease;
}

.loader span {
  font-family: "Instrument Serif", serif;
  font-size: clamp(8rem, 20vw, 16rem);
  color: var(--near);
  animation: spinGlyph 1200ms cubic-bezier(0.16, 1, 0.3, 1) infinite;
}

.loader.hide {
  opacity: 0;
  visibility: hidden;
}

.studio-mark {
  position: fixed;
  top: 2rem;
  left: 50%;
  z-index: 20;
  width: min(520px, calc(100vw - 3rem));
  transform: translateX(-50%);
  font-size: 0.875rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gray);
  cursor: pointer;
  transition: color 200ms ease;
}

.studio-mark:hover { color: var(--red); }

.dot-trail {
  position: fixed;
  left: clamp(1rem, 7vw, 5.5rem);
  top: 50%;
  z-index: 18;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  transform: translateY(-50%);
}

.dot {
  position: relative;
  width: 9px;
  height: 9px;
  border: 1px solid var(--gray);
  border-radius: 50%;
  background: transparent;
  transition: background 220ms ease, border-color 220ms ease;
}

.dot::after {
  content: attr(data-index);
  position: absolute;
  left: 1.5rem;
  top: -0.35rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--gray);
  opacity: 0;
  white-space: nowrap;
  transition: opacity 220ms ease, color 220ms ease;
}

.dot:hover::after, .dot.active::after { opacity: 1; }
.dot.active { background: var(--red); border-color: var(--red); }

.ambient {
  position: fixed;
  top: -20vh;
  bottom: -20vh;
  z-index: 0;
  width: 34vw;
  pointer-events: none;
  opacity: 1;
  background:
    repeating-radial-gradient(circle at var(--ripple-x, 50%) 50%, transparent 0 34px, rgba(26, 26, 26, 0.03) 35px 36px, transparent 37px 70px),
    repeating-linear-gradient(89.5deg, rgba(26, 26, 26, 0.04) 0 1px, transparent 1px 13px),
    repeating-linear-gradient(90deg, rgba(26, 26, 26, 0.035) 0 1px, transparent 1px 11px);
  transform: scale(var(--ripple-scale, 1));
  transition: transform 180ms linear;
}

.ambient-left { left: 0; --ripple-x: 100%; }
.ambient-right { right: 0; --ripple-x: 0%; }

.halftone {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: var(--halftone-opacity, 0);
  background-image: radial-gradient(circle, var(--void) 0 var(--dot-size, 2px), transparent calc(var(--dot-size, 2px) + 1px));
  background-size: 18px 18px;
  mix-blend-mode: difference;
}

.corridor {
  position: relative;
  z-index: 2;
  max-width: 520px;
  margin: 0 auto;
  border-left: 1px solid rgba(26, 26, 26, 0.18);
}

.opening {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8vh 0;
}

.hero-glyph, .rupture-mark {
  font-family: "Instrument Serif", serif;
  font-weight: 400;
  color: var(--near);
  letter-spacing: -0.06em;
}

.hero-glyph {
  font-size: clamp(8rem, 20vw, 16rem);
  line-height: 0.75;
  animation: breathe 8s ease-in-out infinite;
  opacity: 0;
  transform: translateY(20px);
}

.loaded .hero-glyph { opacity: 1; transform: translateY(0); transition: opacity 900ms ease 500ms, transform 900ms ease 500ms; }

.material-name {
  min-height: 1.5em;
  margin: 2.5rem 0 1rem;
  font-size: 0.875rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gray);
}

.material-name span {
  display: inline-block;
  opacity: 0;
  filter: blur(4px);
  transform: translateY(0.5rem);
  transition: opacity 420ms ease, filter 420ms ease, transform 420ms ease;
}

.material-name span.visible { opacity: 1; filter: blur(0); transform: translateY(0); }

.scroll-line {
  width: 1px;
  height: 0;
  background: var(--near);
  transform-origin: top;
}

.loaded .scroll-line { height: 40vh; transition: height 1800ms cubic-bezier(0.16, 1, 0.3, 1) 900ms; }

.coordinate {
  position: relative;
  min-height: 145vh;
  padding: 22vh 0 18vh 2.4rem;
}

.coord-label {
  position: sticky;
  top: 7rem;
  left: 0;
  display: block;
  margin-left: -7.2rem;
  width: 5rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--gray);
}

.coordinate p {
  margin: 0 0 3rem;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 900ms ease, transform 900ms cubic-bezier(0.16, 1, 0.3, 1);
}

.coordinate.visible p { opacity: 1; transform: translateY(0); }
.coordinate.visible p:nth-of-type(2) { transition-delay: 160ms; }

.rupture-mark {
  margin-left: -0.18em;
  font-size: clamp(6rem, 18vw, 14rem);
  line-height: 0.8;
  opacity: 0.96;
}

.rupture-mark.lean { transform: rotate(-8deg) translateX(-0.25em); }
.rupture-mark.binary { font-style: italic; }

.rupture {
  min-height: 150vh;
  position: relative;
  margin-left: -2.4rem;
  padding: 20vh 0;
}

.rupture.void, .rupture.dark {
  color: var(--off);
}

.glass-card {
  position: sticky;
  top: 15vh;
  width: min(720px, calc(100vw - 2rem));
  padding: clamp(1.4rem, 4vw, 3rem);
  border: 1px solid var(--glass-border);
  background: var(--glass);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  box-shadow: 0 8px 32px rgba(74, 58, 255, 0.1);
  color: var(--off);
  opacity: 0;
  transition: opacity 800ms cubic-bezier(0.16, 1, 0.3, 1), transform 800ms cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity;
}

.rupture-left .glass-card { transform: translateX(-120%); margin-left: -200px; }
.rupture-right .glass-card { transform: translateX(120%); margin-left: 120px; }
.rupture.visible .glass-card { opacity: 1; transform: translateX(0); }

.glass-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(circle at 15% 20%, rgba(74, 58, 255, 0.35), transparent 34%), rgba(128, 128, 128, 0.18);
}

.card-kicker {
  display: block;
  margin-bottom: 2rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--gray);
}

.glass-card h2 {
  margin: 0 0 1.5rem;
  font-family: "Instrument Serif", serif;
  font-size: clamp(2.8rem, 8vw, 6rem);
  font-weight: 400;
  line-height: 0.88;
  letter-spacing: -0.06em;
  color: var(--white);
}

.glass-card p { margin: 0; color: var(--off); }

.shifted { transform: translateX(120px); }

.side-title {
  position: absolute;
  right: -10rem;
  top: 34vh;
  margin: 0;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.85rem;
  letter-spacing: 0.35em;
  color: var(--red);
  transform: rotate(90deg);
  transform-origin: center;
}

.upside-down { transform: rotate(180deg) !important; }
.coordinate.visible .upside-down { transform: rotate(180deg) translateY(0) !important; }

.mono-break {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.98rem;
  letter-spacing: 0.02em;
  color: var(--near);
}

.loop-clone {
  min-height: 110vh;
}

.cursor-trail span {
  position: fixed;
  z-index: 60;
  pointer-events: none;
  font-family: "Instrument Serif", serif;
  font-size: 10px;
  color: var(--red);
  opacity: 0.3;
  transform: translate(-50%, -50%);
  animation: trailFade 1500ms ease forwards;
}

.magnetic { will-change: transform; }

@keyframes breathe {
  0%, 100% { letter-spacing: -0.1em; transform: scale(1); }
  50% { letter-spacing: 0.1em; transform: scale(1.02); }
}

@keyframes spinGlyph {
  0% { transform: rotateY(0deg); }
  100% { transform: rotateY(360deg); }
}

@keyframes trailFade {
  0% { opacity: 0.3; filter: blur(0); }
  100% { opacity: 0; filter: blur(3px); transform: translate(-50%, -50%) scale(1.8); }
}

@media (max-width: 760px) {
  .corridor { max-width: calc(100vw - 4rem); }
  .studio-mark { left: 2rem; transform: none; width: auto; }
  .dot-trail { left: 0.75rem; }
  .coord-label { margin-left: -4.4rem; }
  .coordinate { padding-left: 1.4rem; }
  .shifted { transform: translateX(2rem); }
  .side-title { right: -6rem; }
  .rupture-left .glass-card, .rupture-right .glass-card { margin-left: 0; }
}
