:root {
  /* IBM Plex Sans Condensed's technical editorial voice and only sparse Space Mono formula marks; IBM Plex Sans Condensed** for explanatory copy, Space Mono only for isotope marks. */
  --void-carbon: #050505;
  --graphite-sheen: #2B2D2F;
  --bone-ash: #E8E0D0;
  --diamond-cyan: #B7F7FF;
  --ember-isotope: #FF6A2A;
  --chlorophyll-trace: #6FAE4F;
  --pressure-violet: #5D3FD3;
  --carbon-paper-blue: #1E3A5F;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  color: var(--bone-ash);
  background:
    radial-gradient(circle at 18% 22%, rgba(183, 247, 255, 0.08), transparent 18rem),
    radial-gradient(circle at 86% 72%, rgba(93, 63, 211, 0.12), transparent 22rem),
    linear-gradient(120deg, #050505 0%, #050505 48%, #101112 100%);
  font-family: "IBM Plex Sans Condensed", "Inter", sans-serif;
  overflow-x: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

body::before {
  opacity: 0.42;
  mix-blend-mode: screen;
  background-image:
    repeating-linear-gradient(98deg, transparent 0 26px, rgba(232, 224, 208, 0.018) 27px 28px),
    repeating-linear-gradient(3deg, rgba(43, 45, 47, 0.35) 0 2px, transparent 2px 13px);
}

body::after {
  background:
    radial-gradient(circle at 50% 50%, transparent 0 48%, rgba(0, 0, 0, 0.58) 78%),
    linear-gradient(90deg, rgba(5, 5, 5, 0.82), transparent 18%, transparent 82%, rgba(5, 5, 5, 0.82));
}

.ash-field {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 2;
}

.ash {
  position: absolute;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: rgba(232, 224, 208, 0.58);
  box-shadow: 0 0 12px rgba(183, 247, 255, 0.32);
  animation: ashFall linear infinite;
}

.cursor-glint {
  position: fixed;
  left: 0;
  top: 0;
  width: 26rem;
  height: 26rem;
  border-radius: 50%;
  pointer-events: none;
  z-index: 3;
  opacity: 0;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(183, 247, 255, 0.11), rgba(255, 106, 42, 0.035) 28%, transparent 64%);
  mix-blend-mode: screen;
  transition: opacity 420ms ease;
}

.fixed-core {
  position: fixed;
  left: 18vw;
  top: 54vh;
  width: 21rem;
  height: 21rem;
  transform: translate(-50%, -50%);
  z-index: 4;
  pointer-events: none;
  transition: left 900ms cubic-bezier(.2,.8,.1,1), top 900ms cubic-bezier(.2,.8,.1,1), width 900ms, height 900ms, filter 900ms;
}

.orbital {
  position: absolute;
  inset: 8%;
  border: 1px solid rgba(183, 247, 255, 0.42);
  border-radius: 50%;
  opacity: 0;
  transform: scale(0.72) rotate(0deg);
  animation: ringArrival 2.4s ease forwards, orbitalDrift 18s linear infinite;
}

.orbital-a { animation-delay: .8s, 2.6s; }
.orbital-b { inset: 21%; border-color: rgba(93, 63, 211, 0.38); animation-delay: 1.05s, 2.4s; animation-duration: 2.4s, 13s; transform: scale(.72) rotate(64deg); }
.orbital-c { inset: -6%; border-color: rgba(255, 106, 42, 0.24); animation-delay: 1.3s, 2.5s; animation-duration: 2.4s, 23s; }

.nucleus {
  position: absolute;
  inset: 30%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 42% 35%, rgba(43, 45, 47, 0.95), transparent 30%),
    radial-gradient(circle at 62% 68%, rgba(255, 106, 42, 0.18), transparent 9%),
    radial-gradient(circle, #050505 0 45%, #151719 67%, #050505 100%);
  box-shadow:
    0 0 0 1px rgba(183, 247, 255, 0.5),
    inset 0 0 28px rgba(183, 247, 255, 0.11),
    inset 18px -18px 40px rgba(0, 0, 0, 0.9),
    0 0 80px rgba(183, 247, 255, 0.12);
  transform: scale(0.65);
  animation: nucleusWake 2s ease .55s forwards, nucleusPulse 5s ease-in-out 2.4s infinite;
}

.nucleus::before,
.nucleus::after,
.nucleus span {
  content: "";
  position: absolute;
  inset: 10%;
  border-radius: 50%;
  background: repeating-conic-gradient(from 24deg, transparent 0 14deg, rgba(232, 224, 208, 0.055) 15deg 16deg, transparent 17deg 34deg);
  mix-blend-mode: screen;
}

.nucleus::after {
  inset: -9%;
  background: conic-gradient(from 120deg, transparent, rgba(183, 247, 255, 0.5), transparent, rgba(255, 106, 42, 0.28), transparent);
  filter: blur(10px);
  opacity: .62;
}

.isotope-tabs {
  position: fixed;
  right: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: .55rem;
}

.isotope-tabs a {
  color: rgba(232, 224, 208, 0.62);
  text-decoration: none;
  font: 700 .65rem/1 "Space Mono", monospace;
  letter-spacing: .1em;
  padding: .55rem .42rem;
  border-left: 1px solid rgba(232, 224, 208, 0.18);
  background: linear-gradient(90deg, rgba(30, 58, 95, 0.45), transparent);
  transition: color 250ms ease, border-color 250ms ease, transform 250ms ease;
  writing-mode: vertical-rl;
}

.isotope-tabs a:hover,
.isotope-tabs a.active {
  color: var(--diamond-cyan);
  border-color: var(--ember-isotope);
  transform: translateX(-.25rem);
}

.descent-shell { position: relative; z-index: 5; }

.chapter {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  padding: clamp(2rem, 6vw, 7rem);
  isolation: isolate;
}

.chapter::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: radial-gradient(circle at var(--cx, 50%) var(--cy, 50%), rgba(183, 247, 255, 0.08), transparent 28rem);
}

.chapter::after {
  content: "";
  position: absolute;
  inset: 8% -10%;
  z-index: -1;
  background-image:
    linear-gradient(30deg, transparent 0 47%, rgba(232, 224, 208, 0.04) 48% 49%, transparent 50%),
    linear-gradient(150deg, transparent 0 47%, rgba(183, 247, 255, 0.03) 48% 49%, transparent 50%);
  background-size: 118px 68px;
  opacity: .36;
  mask-image: radial-gradient(circle at 50% 50%, #000, transparent 72%);
}

.chapter-mark,
.vertical-label,
.specimen-tag,
.gauge-stamp,
.formula-cluster,
.cycle-line {
  font-family: "Space Mono", monospace;
  text-transform: uppercase;
  letter-spacing: .14em;
}

.chapter-mark {
  position: absolute;
  top: 2rem;
  left: clamp(1.25rem, 5vw, 5rem);
  color: rgba(183, 247, 255, 0.62);
  font-size: .72rem;
  border-top: 1px solid rgba(183, 247, 255, 0.28);
  padding-top: .55rem;
}

.wordmark {
  margin: 0;
  position: absolute;
  left: 13vw;
  bottom: 16vh;
  max-width: 78vw;
  font-family: "Bodoni Moda", serif;
  font-size: clamp(4.1rem, 13.6vw, 13.8rem);
  font-weight: 600;
  letter-spacing: -.075em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(232, 224, 208, 0.52);
  background: linear-gradient(95deg, rgba(232,224,208,.08), var(--bone-ash) 38%, rgba(30,58,95,.76) 56%, rgba(232,224,208,.86));
  -webkit-background-clip: text;
  background-clip: text;
  opacity: 0;
  filter: blur(8px);
  transform: translateY(1rem) skewX(-4deg);
  animation: carbonRub 2.4s ease 1.2s forwards;
}

.opening-note {
  position: absolute;
  right: 11vw;
  top: 23vh;
  width: min(30rem, 48vw);
  margin: 0;
  color: rgba(232, 224, 208, 0.74);
  font-size: clamp(1.25rem, 2vw, 2rem);
  line-height: 1.18;
  font-weight: 300;
}

.carbon-paper {
  position: absolute;
  inset: 20% 5% 10% 10%;
  opacity: .28;
  background:
    linear-gradient(104deg, transparent 0 14%, rgba(30, 58, 95, .65) 16% 17%, transparent 19% 100%),
    radial-gradient(ellipse at 45% 75%, rgba(30, 58, 95, .8), transparent 42%);
  filter: blur(.4px);
  transform: rotate(-5deg);
}

.soot-thumbprint {
  position: absolute;
  right: 13vw;
  bottom: 14vh;
  width: 13rem;
  height: 18rem;
  opacity: .36;
  border-radius: 48%;
  background: repeating-radial-gradient(ellipse at 50% 50%, rgba(232,224,208,.1) 0 1px, transparent 2px 8px);
  filter: blur(.2px);
  transform: rotate(18deg);
}

.tag-one { left: 11vw; top: 16vh; }
.tag-two { right: 10vw; bottom: 18vh; }
.specimen-tag {
  position: absolute;
  color: rgba(232, 224, 208, .7);
  border: 1px solid rgba(232, 224, 208, .18);
  padding: .65rem .85rem;
  font-size: .66rem;
  background: rgba(5, 5, 5, .5);
  transform: rotate(-3deg);
}

.orbit-copy {
  position: absolute;
  width: min(34rem, 47vw);
}

.orbit-copy h2,
.final-inscription h2 {
  margin: 0 0 1.1rem;
  font-family: "Bodoni Moda", serif;
  font-size: clamp(3.2rem, 8vw, 8.8rem);
  font-weight: 600;
  line-height: .82;
  letter-spacing: -.055em;
  color: var(--bone-ash);
  text-shadow: 0 0 38px rgba(183, 247, 255, .09);
}

.orbit-copy p,
.final-inscription p {
  margin: 0;
  color: rgba(232, 224, 208, .74);
  font-size: clamp(1.15rem, 1.6vw, 1.55rem);
  line-height: 1.28;
  font-weight: 300;
}

.left-shell { left: 9vw; top: 28vh; }
.right-shell { right: 9vw; top: 26vh; }
.lower-shell { left: 12vw; bottom: 11vh; }
.upper-shell { left: 16vw; top: 14vh; }

.poetic-note {
  position: absolute;
  margin: 0;
  width: min(25rem, 38vw);
  color: rgba(232, 224, 208, .65);
  font: italic clamp(1.15rem, 2vw, 2rem)/1.12 "Cormorant Garamond", serif;
}

.chapter-graphite .poetic-note { right: 13vw; bottom: 17vh; }
.chapter-bonding .poetic-note { left: 12vw; bottom: 13vh; }
.chapter-diamond .poetic-note { right: 11vw; top: 20vh; }
.chapter-graphene .poetic-note { right: 12vw; top: 28vh; }

.graphite-sheets {
  position: absolute;
  inset: 13vh 0 auto 17vw;
  width: 92vw;
  height: 62vh;
  transform: rotate(-13deg);
}

.sheet {
  position: absolute;
  width: 75vw;
  height: 18vh;
  left: 8vw;
  background:
    linear-gradient(90deg, rgba(5,5,5,.1), rgba(232,224,208,.08), rgba(5,5,5,.06)),
    repeating-linear-gradient(0deg, #111315 0 1px, #2B2D2F 2px 4px, #070707 5px 7px);
  border: 1px solid rgba(232, 224, 208, .11);
  box-shadow: 0 18px 55px rgba(0, 0, 0, .58), inset 0 0 50px rgba(183, 247, 255, .025);
  clip-path: polygon(4% 0, 100% 12%, 94% 100%, 0 86%);
  transition: transform 500ms ease, filter 500ms ease;
}

.sheet::after {
  content: attr(data-writing);
  position: absolute;
  right: 8%;
  bottom: 20%;
  color: rgba(183, 247, 255, 0);
  font: 700 .72rem "Space Mono", monospace;
  letter-spacing: .18em;
  transition: color 350ms ease, text-shadow 350ms ease;
}

.sheet:hover { filter: brightness(1.26); transform: translateX(2rem) translateY(-.55rem); }
.sheet:hover::after { color: rgba(183, 247, 255, .72); text-shadow: 0 0 18px rgba(183, 247, 255, .45); }
.sheet-1 { top: 0; }
.sheet-2 { top: 19vh; left: 3vw; }
.sheet-3 { top: 38vh; left: 12vw; }

.vertical-label {
  position: absolute;
  right: 6vw;
  bottom: 11vh;
  writing-mode: vertical-rl;
  color: rgba(232, 224, 208, .52);
  font-size: .67rem;
}

.bond-lattice {
  position: absolute;
  inset: 10vh 9vw 6vh 2vw;
  width: 86vw;
  height: 78vh;
  opacity: .74;
}

.bond-lattice path {
  fill: none;
  stroke: rgba(183, 247, 255, .58);
  stroke-width: 2;
  stroke-dasharray: 900;
  stroke-dashoffset: 900;
  filter: drop-shadow(0 0 12px rgba(183,247,255,.32));
  animation: drawBond 3.4s ease both;
}

.bond-lattice circle {
  fill: var(--pressure-violet);
  filter: drop-shadow(0 0 14px rgba(93,63,211,.8));
  transition: fill 300ms ease, transform 300ms ease;
}

.bond-lattice circle:hover { fill: var(--ember-isotope); transform: scale(1.8); }

.formula-cluster {
  position: absolute;
  left: 10vw;
  top: 18vh;
  color: rgba(255, 106, 42, .7);
  font-size: clamp(.85rem, 1.3vw, 1.1rem);
  line-height: 1.75;
}

.chapter-diamond {
  background:
    radial-gradient(circle at 72% 22%, rgba(183,247,255,.12), transparent 20rem),
    radial-gradient(circle at 37% 80%, rgba(93,63,211,.18), transparent 22rem);
}

.facet {
  position: absolute;
  background: linear-gradient(130deg, rgba(183,247,255,.02), rgba(183,247,255,.32), rgba(93,63,211,.08), transparent 62%);
  clip-path: polygon(50% 0, 100% 38%, 72% 100%, 16% 86%, 0 24%);
  border: 1px solid rgba(183, 247, 255, .16);
  mix-blend-mode: screen;
  filter: blur(.1px) drop-shadow(0 0 40px rgba(183,247,255,.16));
  animation: facetCut 6s ease-in-out infinite;
}

.facet-a { width: 34vw; height: 52vh; right: 12vw; top: 12vh; }
.facet-b { width: 28vw; height: 44vh; left: 43vw; top: 31vh; animation-delay: -1.5s; }
.facet-c { width: 18vw; height: 34vh; left: 8vw; top: 12vh; animation-delay: -3s; }

.pressure-arc {
  position: absolute;
  right: 8vw;
  bottom: 9vh;
  width: 24rem;
  height: 24rem;
  border-radius: 50%;
  border: 1px solid rgba(232, 224, 208, .14);
  border-top-color: var(--ember-isotope);
  border-right-color: var(--diamond-cyan);
  transform: rotate(-22deg);
}

.pressure-arc::before {
  content: "";
  position: absolute;
  inset: 18%;
  border-radius: 50%;
  border: 1px dashed rgba(232, 224, 208, .2);
}

.gauge-stamp {
  position: absolute;
  right: 15vw;
  bottom: 20vh;
  color: rgba(255, 106, 42, .75);
  font-size: .72rem;
}

.graphene-bridge {
  position: absolute;
  left: -8vw;
  top: 38vh;
  width: 116vw;
  height: 26vh;
  transform: skewY(-7deg);
  background-image:
    linear-gradient(30deg, rgba(183,247,255,.36) 1px, transparent 1px),
    linear-gradient(150deg, rgba(183,247,255,.36) 1px, transparent 1px),
    linear-gradient(90deg, rgba(183,247,255,.18) 1px, transparent 1px);
  background-size: 70px 40px;
  mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
  opacity: .58;
  filter: drop-shadow(0 0 22px rgba(183,247,255,.25));
  animation: bridgeFlex 5.8s ease-in-out infinite;
}

.graphene-bridge span {
  position: absolute;
  top: 44%;
  width: .65rem;
  height: .65rem;
  border-radius: 50%;
  background: var(--diamond-cyan);
  box-shadow: 0 0 22px var(--diamond-cyan);
}

.graphene-bridge span:nth-child(1) { left: 12%; }
.graphene-bridge span:nth-child(2) { left: 31%; background: var(--pressure-violet); }
.graphene-bridge span:nth-child(3) { left: 52%; }
.graphene-bridge span:nth-child(4) { left: 70%; background: var(--ember-isotope); }
.graphene-bridge span:nth-child(5) { left: 88%; }

.chapter-breath {
  display: grid;
  place-items: center;
  text-align: center;
}

.breath-rings {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: -1;
}

.breath-rings i {
  position: absolute;
  width: 34vmin;
  height: 34vmin;
  border: 1px solid rgba(111, 174, 79, .25);
  border-radius: 50%;
  box-shadow: 0 0 80px rgba(111,174,79,.08);
  animation: breathExpand 5s ease-in-out infinite;
}

.breath-rings i:nth-child(2) { animation-delay: 1.2s; border-color: rgba(183,247,255,.22); }
.breath-rings i:nth-child(3) { animation-delay: 2.4s; border-color: rgba(255,106,42,.18); }

.final-inscription {
  width: min(56rem, 78vw);
  transform: translateY(2rem);
}

.cycle-line {
  position: absolute;
  bottom: 11vh;
  color: rgba(183, 247, 255, .72);
  font-size: .72rem;
}

.chapter-soot { --cx: 20%; --cy: 56%; }
.chapter-graphite { --cx: 72%; --cy: 42%; }
.chapter-bonding { --cx: 50%; --cy: 52%; }
.chapter-diamond { --cx: 76%; --cy: 28%; }
.chapter-graphene { --cx: 24%; --cy: 46%; }
.chapter-breath { --cx: 50%; --cy: 50%; }

@keyframes ashFall {
  from { transform: translate3d(0, -8vh, 0) rotate(0deg); opacity: 0; }
  10% { opacity: .85; }
  80% { opacity: .55; }
  to { transform: translate3d(var(--drift, 4rem), 112vh, 0) rotate(260deg); opacity: 0; }
}

@keyframes ringArrival {
  to { opacity: 1; transform: scale(1) rotate(42deg); }
}

@keyframes orbitalDrift {
  to { rotate: 360deg; }
}

@keyframes nucleusWake {
  to { transform: scale(1); }
}

@keyframes nucleusPulse {
  0%, 100% { filter: brightness(1); transform: scale(1); }
  50% { filter: brightness(1.22); transform: scale(.92); }
}

@keyframes carbonRub {
  0% { opacity: 0; filter: blur(9px); clip-path: inset(0 100% 0 0); }
  45% { opacity: .62; filter: blur(3px); }
  100% { opacity: 1; filter: blur(0); transform: translateY(0) skewX(0); clip-path: inset(0 0 0 0); }
}

@keyframes drawBond {
  to { stroke-dashoffset: 0; }
}

@keyframes facetCut {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(-3deg); opacity: .62; }
  50% { transform: translate3d(1rem, -.7rem, 0) rotate(4deg); opacity: 1; }
}

@keyframes bridgeFlex {
  0%, 100% { transform: skewY(-7deg) translateY(0); }
  50% { transform: skewY(-4deg) translateY(-1.4rem); }
}

@keyframes breathExpand {
  0% { transform: scale(.55); opacity: 0; }
  32% { opacity: .75; }
  100% { transform: scale(2.2); opacity: 0; }
}

@media (max-width: 760px) {
  .isotope-tabs { right: .2rem; gap: .22rem; }
  .fixed-core { width: 14rem; height: 14rem; left: 28vw; }
  .chapter { padding: 5rem 1.25rem 4rem; }
  .wordmark { left: 1rem; bottom: 21vh; font-size: clamp(3.4rem, 18vw, 6rem); }
  .opening-note, .orbit-copy, .poetic-note { position: relative; left: auto; right: auto; top: auto; bottom: auto; width: calc(100vw - 4rem); margin-top: 32vh; }
  .poetic-note { margin-top: 2rem; }
  .graphite-sheets { left: -38vw; width: 140vw; opacity: .72; }
  .bond-lattice { inset: 16vh -22vw auto -12vw; width: 128vw; height: 55vh; }
  .facet-a { width: 72vw; right: -10vw; }
  .facet-b { width: 56vw; left: 18vw; }
  .pressure-arc { width: 16rem; height: 16rem; }
}
