:root {
  color-scheme: dark;
  --black: #020405;
  --ink: #eef3f1;
  --muted: #aeb8b4;
  --cyan: #4ce6f2;
}

* { box-sizing: border-box; }

html { background: var(--black); }

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--black);
  color: var(--ink);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

button { font: inherit; }

.upper-rail { position: relative; }

.identity-band {
  position: relative;
  z-index: 20;
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 15px clamp(20px, 4vw, 64px);
  background: #020405;
  border-bottom: 1px solid rgba(238, 243, 241, 0.11);
}

.identity h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(22px, 2.2vw, 34px);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1;
}

.sidemark {
  position: relative;
  appearance: none;
  padding: 0;
  border: 0;
  color: rgba(238, 243, 241, 0.65);
  background: transparent;
  font: 600 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.26em;
  cursor: pointer;
}

#odehamik-contact {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 44px;
  min-height: 44px;
}

.sound-toggle {
  position: absolute;
  z-index: 22;
  top: 50%;
  right: calc(clamp(20px, 4vw, 64px) + 52px);
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(126, 226, 230, .18);
  border-radius: 50%;
  color: rgba(192, 239, 238, .62);
  background: rgba(5, 25, 28, .22);
  transform: translateY(-50%);
  cursor: pointer;
  transition: color 220ms ease, border-color 220ms ease, background 220ms ease, box-shadow 220ms ease;
}

.sound-toggle[hidden] { display: none; }
.sound-toggle:hover,
.sound-toggle:focus-visible,
.sound-toggle[aria-pressed="true"] {
  color: #c9fbfb;
  border-color: rgba(126, 226, 230, .55);
  background: rgba(7, 47, 51, .56);
  box-shadow: 0 0 19px rgba(49, 215, 222, .16), inset 0 0 12px rgba(49, 215, 222, .08);
}
.sound-toggle:focus-visible { outline: 1px solid rgba(154, 235, 238, .72); outline-offset: 4px; }
.sound-toggle:disabled { cursor: wait; opacity: .55; }

.sound-toggle__glyph {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
}

.sound-toggle__glyph i {
  display: block;
  width: 1px;
  height: 8px;
  background: currentColor;
  animation: sound-reed 1.6s ease-in-out infinite alternate;
}
.sound-toggle__glyph i:nth-child(2) { height: 15px; animation-delay: -1.05s; }
.sound-toggle__glyph i:nth-child(3) { height: 11px; animation-delay: -.48s; }
.sound-toggle[aria-pressed="false"] .sound-toggle__glyph i { animation-play-state: paused; }

.sidemark__label { writing-mode: vertical-rl; }
.sidemark:hover { color: rgba(222, 248, 249, .92); }
.sidemark:focus-visible { outline: none; }
.sidemark:focus-visible .sidemark__label { outline: 1px solid rgba(154, 235, 238, .72); outline-offset: 7px; }

.contact-panel {
  position: fixed;
  z-index: 50;
  inset: 0;
  display: grid;
  justify-items: end;
  background: rgba(0, 4, 5, .64);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 280ms ease, visibility 0s linear 420ms;
}

.contact-panel.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s;
}

.contact-panel__body {
  position: relative;
  width: min(390px, calc(100vw - 28px));
  min-height: 100%;
  overflow-y: auto;
  padding: clamp(82px, 15vh, 148px) clamp(28px, 5vw, 58px) 48px;
  border-left: 1px solid rgba(111, 224, 228, .2);
  background:
    linear-gradient(to bottom, rgba(12, 49, 52, .11), transparent 38%),
    rgba(1, 9, 11, .96);
  box-shadow: -24px 0 72px rgba(0, 0, 0, .48);
  transform: translate3d(100%, 0, 0);
  transition: transform 420ms cubic-bezier(.2, .8, .2, 1);
}

.contact-panel.is-open .contact-panel__body { transform: translate3d(0, 0, 0); }

.contact-panel__close {
  position: absolute;
  top: 22px;
  right: 22px;
  width: 44px;
  height: 44px;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-size: 28px;
  cursor: pointer;
}

.contact-panel__close:focus-visible,
#contact-email:focus-visible {
  outline: 1px solid rgba(137, 242, 242, .68);
  outline-offset: 5px;
}

.contact-panel__label {
  margin: 0 0 22px;
  color: #72bdc0;
  font: 600 10px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.contact-panel__invitation {
  margin: 0 0 34px;
  color: #e5efec;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(24px, 4vw, 38px);
  line-height: 1.18;
}

#contact-email {
  color: #86e7e9;
  font: 600 11px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .08em;
  text-underline-offset: 5px;
}

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

.diorama {
  --bg-x: 0px;
  --bg-y: 0px;
  --tree-x: 0px;
  --tree-y: 0px;
  --subject-x: 0px;
  --subject-y: 0px;
  --front-x: 0px;
  --front-y: 0px;
  --scroll: 0;
  position: relative;
  min-height: calc(100svh - 78px);
  overflow: hidden;
  isolation: isolate;
  background: #030607;
  perspective: 1200px;
  touch-action: pan-y;
}

.scene-layer {
  position: absolute;
  inset: -5%;
  background-position: 50% 28%;
  background-repeat: no-repeat;
  background-size: cover;
  backface-visibility: hidden;
  pointer-events: none;
}

.scene-layer--background {
  z-index: 1;
  background-image: url("./assets/odehamik-hero-environment-desktop-v2.png");
  transform: translate3d(var(--bg-x), calc(var(--bg-y) + var(--scroll) * -8px), 0) scale(1.05);
  filter: saturate(0.98) brightness(0.92);
}

.scene-layer--tree {
  z-index: 2;
  background-image: url("./assets/odehamik-hero-environment-desktop-v2.png");
  transform: translate3d(var(--tree-x), calc(var(--tree-y) + var(--scroll) * -12px), 0) scale(1.05);
  -webkit-mask-image: radial-gradient(ellipse 55% 104% at 86% 52%, #000 42%, rgba(0,0,0,.72) 68%, transparent 91%);
  mask-image: radial-gradient(ellipse 55% 104% at 86% 52%, #000 42%, rgba(0,0,0,.72) 68%, transparent 91%);
  filter: contrast(1.04) brightness(1.025);
}

.scene-layer--subject {
  z-index: 3;
  background-image: url("./assets/odehamik-hero-subject-desktop-exact-v2.png");
  transform: translate3d(var(--subject-x), calc(var(--subject-y) + var(--scroll) * -16px), 0) scale(1.05);
  filter: contrast(1.075) saturate(1.025) brightness(1.01) drop-shadow(-10px 18px 22px rgba(0, 0, 0, .22));
}

.scene-layer--foreground {
  z-index: 4;
  background-image: url("./assets/odehamik-hero-rebuild-v1.png");
  transform: translate3d(var(--front-x), calc(var(--front-y) + var(--scroll) * -24px), 0) scale(1.05);
  -webkit-mask-image: linear-gradient(to bottom, transparent 70%, rgba(0,0,0,.18) 78%, #000 94%);
  mask-image: linear-gradient(to bottom, transparent 70%, rgba(0,0,0,.18) 78%, #000 94%);
}

.fog {
  position: absolute;
  z-index: 4;
  width: 62%;
  height: 35%;
  left: -12%;
  bottom: 18%;
  pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(150, 183, 190, 0.13), transparent 67%);
  filter: blur(18px);
  animation: fog-drift 24s ease-in-out infinite alternate;
}

.fog--two {
  left: 34%;
  bottom: 8%;
  opacity: 0.55;
  animation-duration: 31s;
  animation-direction: alternate-reverse;
}

.blue-current {
  position: absolute;
  z-index: 5;
  inset: auto 0 0;
  height: 23%;
  pointer-events: none;
  opacity: calc(0.2 + var(--scroll) * 0.8);
  background:
    radial-gradient(circle at 13% 63%, rgba(76, 230, 242, .85) 0 1px, transparent 3px),
    radial-gradient(circle at 39% 78%, rgba(76, 230, 242, .85) 0 1px, transparent 4px),
    radial-gradient(circle at 70% 55%, rgba(76, 230, 242, .7) 0 1px, transparent 4px),
    radial-gradient(circle at 91% 72%, rgba(76, 230, 242, .8) 0 1px, transparent 3px),
    linear-gradient(to bottom, transparent, rgba(0, 99, 111, .12));
  filter: drop-shadow(0 0 8px rgba(76, 230, 242, .8));
}

.seam-veil {
  position: absolute;
  z-index: 6;
  inset: auto 0 0;
  height: 23%;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 52% 100%, rgba(20, 155, 169, .16), transparent 52%),
    linear-gradient(to bottom, transparent 0%, rgba(1, 10, 12, .24) 40%, rgba(1, 5, 6, .82) 100%);
}

.moon-crown {
  position: absolute;
  z-index: 8;
  top: calc(clamp(125px, 10.3vw, 148px) / -3);
  left: calc(22.1% + 38px);
  width: clamp(125px, 10.3vw, 148px);
  aspect-ratio: 1;
  transform: translateX(-50%);
  pointer-events: none;
}

.moon-crown__disc {
  display: block;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 17px rgba(217, 237, 245, .16));
  pointer-events: none;
  user-select: none;
}

.moon-door {
  position: absolute;
  inset: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  pointer-events: auto;
}

.moon-crown::before,
.moon-crown::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.moon-crown::before {
  inset: 7%;
  border: 1px solid rgba(231, 247, 252, .22);
  background: rgba(224, 242, 248, .025);
  box-shadow: 0 0 24px 7px rgba(217, 237, 245, .15), inset 0 0 16px rgba(235, 250, 255, .08);
  animation: moon-breathe 5.8s ease-in-out infinite;
  transition: opacity 300ms ease;
}

.moon-crown::after {
  inset: -5%;
  border: 1px solid rgba(217, 237, 245, .12);
  background: radial-gradient(circle at 50% 0, rgba(255,255,255,.95) 0 1.5px, rgba(186,236,246,.58) 2px, transparent 4px);
  opacity: .58;
  animation: moon-orbit 11s linear infinite;
}

.moon-crown:hover::before,
.moon-crown:focus-within::before,
.moon-crown:has(.moon-door[aria-expanded="true"])::before {
  opacity: 1;
  box-shadow: 0 0 34px 13px rgba(217, 237, 245, .28), inset 0 0 18px rgba(235, 250, 255, .13);
}

.moon-door:focus-visible { outline: 1px solid rgba(238, 243, 241, 0.7); outline-offset: 5px; }

.biography {
  position: absolute;
  z-index: 10;
  top: clamp(90px, 15vh, 170px);
  left: clamp(20px, 5vw, 74px);
  width: min(440px, calc(100% - 40px));
  padding: clamp(24px, 4vw, 46px);
  border: 1px solid rgba(222, 239, 240, 0.2);
  background: rgba(1, 7, 9, 0.78);
  backdrop-filter: blur(18px) saturate(0.8);
  transform: translate3d(-24px, 0, 0);
  opacity: 0;
  visibility: hidden;
  transition: opacity 450ms ease, transform 650ms cubic-bezier(.2,.8,.2,1), visibility 0s linear 650ms;
}

.biography.is-open {
  transform: translate3d(0, 0, 0);
  opacity: 1;
  visibility: visible;
  transition-delay: 0s;
}

.biography p {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(19px, 2vw, 28px);
  line-height: 1.42;
  text-wrap: balance;
}

.biography__close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 44px;
  height: 44px;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-size: 26px;
  cursor: pointer;
}

.depths {
  position: relative;
  z-index: 2;
  height: 180svh;
  margin-top: -12svh;
  background: #010506;
}

.seam-bridge {
  position: relative;
  z-index: 7;
  height: 24svh;
  margin-top: -12svh;
  margin-bottom: -12svh;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 46%, rgba(17, 151, 166, .15), transparent 50%),
    linear-gradient(to bottom, transparent 0%, rgba(1, 8, 10, .52) 28%, rgba(1, 5, 6, .9) 50%, rgba(1, 8, 10, .58) 72%, transparent 100%);
}

.hero { position: relative; z-index: 21; }

.depths__stage {
  --water-x: 0px;
  --water-y: 0px;
  --root-x: 0px;
  --root-y: 0px;
  --wisp-x: 0px;
  --wisp-y: 0px;
  --wisp-opacity: .25;
  position: sticky;
  top: 0;
  height: 100svh;
  overflow: hidden;
  isolation: isolate;
  background: #010506;
}

.depths__stage::before {
  content: "";
  position: absolute;
  z-index: 5;
  inset: 0 0 auto;
  height: 16%;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(1, 5, 6, .8), rgba(1, 10, 12, .16) 55%, transparent);
}

.depth-layer {
  position: absolute;
  inset: -5%;
  background-image: url("./assets/odehamik-drowned-roots-desktop-v1.png");
  background-position: 50% 50%;
  background-repeat: no-repeat;
  background-size: cover;
  pointer-events: none;
  backface-visibility: hidden;
}

.depth-layer--waterline {
  z-index: 1;
  transform: translate3d(var(--water-x), var(--water-y), -12px) scale(1.055);
  filter: brightness(.82) saturate(.92);
}

.depth-layer--roots {
  z-index: 2;
  transform: translate3d(var(--root-x), var(--root-y), 44px) scale(1.09);
  -webkit-mask-image:
    linear-gradient(to bottom, transparent 0%, #000 12%, #000 100%),
    radial-gradient(ellipse 46% 82% at 50% 54%, transparent 22%, #000 64%);
  -webkit-mask-composite: source-in;
  mask-image: radial-gradient(ellipse 46% 82% at 50% 54%, transparent 22%, #000 64%);
}

.depth-silt {
  position: absolute;
  z-index: 3;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 30% 32%, rgba(185, 221, 219, .16) 0 1px, transparent 2px),
    radial-gradient(circle at 63% 58%, rgba(185, 221, 219, .12) 0 1px, transparent 2px),
    radial-gradient(circle at 77% 24%, rgba(185, 221, 219, .12) 0 1px, transparent 2px),
    linear-gradient(to bottom, rgba(0, 23, 28, .05), rgba(0, 4, 6, .52));
  background-size: 170px 190px, 230px 210px, 280px 250px, auto;
  opacity: .5;
}

.wisp-field {
  position: absolute;
  z-index: 4;
  inset: 0;
  pointer-events: none;
  opacity: var(--wisp-opacity);
  transform: translate3d(var(--wisp-x), var(--wisp-y), 0);
}

.wisp {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #bffaff;
  box-shadow:
    0 0 7px 2px rgba(76, 230, 242, .9),
    0 0 24px 8px rgba(23, 178, 198, .34);
  animation: wisp-drift var(--duration) ease-in-out var(--delay) infinite alternate;
}

.wisp::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -22px;
  width: 1px;
  height: 24px;
  background: linear-gradient(to top, rgba(76, 230, 242, .7), transparent);
  filter: blur(.4px);
  transform: rotate(14deg);
  transform-origin: bottom;
}

.lower-world {
  position: relative;
  z-index: 4;
  height: 460svh;
  display: flex;
  flex-direction: column;
  margin-top: -18svh;
  background: #010506;
}

.lower-world__stage {
  --lower-progress: 0;
  --constellation-opacity: 1;
  --machine-opacity: 0;
  --machine-scale: 1;
  --machine-y: 18%;
  position: sticky;
  flex: 0 0 100svh;
  top: 0;
  height: 100svh;
  overflow: hidden;
  isolation: isolate;
  background-color: #010506;
  background-image: url("./assets/odehamik-root-fed-terminal-desktop-v1.png");
  background-position: 50% 50%;
  background-repeat: no-repeat;
  background-size: cover;
}

.lakebed-credit {
  position: relative;
  z-index: 9;
  width: min(900px, calc(100% - 40px));
  margin: auto 0 0 auto;
  padding: 26px clamp(20px, 4vw, 64px) 30px;
  color: rgba(166, 202, 201, .76);
  background: linear-gradient(to bottom, transparent, rgba(1, 5, 6, .9) 42%);
  font: 500 clamp(10px, .85vw, 12px)/1.6 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .055em;
  text-align: right;
}

.lower-world__stage::before,
.lower-world__stage::after {
  content: "";
  position: absolute;
  z-index: 7;
  inset: 0;
  pointer-events: none;
}

.lower-world__stage::before {
  background: linear-gradient(to bottom, rgba(1, 5, 6, .94), transparent 13%, transparent 86%, rgba(1, 5, 6, .55));
}

.lower-world__stage::after {
  opacity: .23;
  background: radial-gradient(ellipse at 50% 54%, transparent 34%, rgba(0, 3, 4, .72) 100%);
}

.lower-world__environment {
  position: absolute;
  z-index: 1;
  inset: 0;
  pointer-events: none;
  background-image: url("./assets/odehamik-root-fed-terminal-desktop-v1.png");
  background-position: 50% 50%;
  background-repeat: no-repeat;
  background-size: cover;
  transform: translate3d(0, var(--machine-y), 0) scale(var(--machine-scale));
  transform-origin: 50% 84%;
  will-change: transform;
}

.lower-world__silt {
  position: absolute;
  z-index: 2;
  inset: 0;
  pointer-events: none;
  opacity: .42;
  background:
    radial-gradient(circle at 18% 22%, rgba(164, 222, 224, .18) 0 1px, transparent 1.7px),
    radial-gradient(circle at 72% 38%, rgba(164, 222, 224, .12) 0 1px, transparent 1.8px),
    radial-gradient(circle at 44% 71%, rgba(164, 222, 224, .11) 0 1px, transparent 1.8px);
  background-size: 210px 240px, 270px 220px, 310px 290px;
  animation: silt-rise 34s linear infinite;
}

.constellations {
  position: absolute;
  z-index: 5;
  inset: 7% 7% 21%;
  opacity: var(--constellation-opacity);
  transition: opacity 200ms linear;
  pointer-events: none;
}

.constellation {
  position: absolute;
  z-index: 1;
  left: var(--x);
  top: var(--y);
  width: 94px;
  height: 94px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #dffcff;
  background: radial-gradient(circle, rgba(132, 247, 255, .11) 0 9%, rgba(24, 186, 203, .05) 31%, transparent 68%);
  transform: translate(-50%, -50%);
  cursor: pointer;
  pointer-events: auto;
  filter: brightness(.94);
  transition: opacity 420ms ease, filter 360ms ease, background 360ms ease, box-shadow 360ms ease;
  animation: orb-wander var(--wander-duration, 18s) cubic-bezier(.42,.08,.58,.92) var(--wander-delay, 0s) infinite;
}

.constellation i {
  position: absolute;
  display: block;
  left: 50%;
  top: 50%;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 37% 31%, #f4ffff 0 8%, #a7f8ff 17%, #3bd8e8 39%, #087c91 68%, rgba(0, 40, 52, .2) 100%);
  box-shadow:
    inset -5px -7px 11px rgba(0, 20, 33, .72),
    inset 4px 4px 8px rgba(226, 255, 255, .45),
    0 0 13px 4px rgba(91, 238, 248, .92),
    0 0 42px 17px rgba(16, 167, 190, .38);
  transform: translate(-50%, -50%);
  animation: constellation-pulse 3.8s ease-in-out infinite;
}

.constellation i::before {
  content: "";
  position: absolute;
  inset: -18px;
  border: 1px solid rgba(114, 237, 246, .12);
  border-radius: 50%;
  box-shadow: inset 0 0 18px rgba(75, 226, 239, .12), 0 0 24px rgba(20, 173, 195, .1);
}

.constellation i::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 5px;
  width: 7px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .92);
  filter: blur(.4px);
  transform: rotate(-28deg);
}

.constellation span {
  position: absolute;
  left: 50%;
  top: 98px;
  width: max-content;
  max-width: 210px;
  padding: 7px 9px;
  border: 1px solid rgba(116, 228, 231, .2);
  color: #e9fbf8;
  background: rgba(1, 10, 12, .78);
  font: 600 10px/1.25 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .08em;
  text-transform: uppercase;
  opacity: 0;
  transform: translate(-50%, -8px);
  transition: opacity 180ms ease, transform 260ms ease;
  pointer-events: none;
}

.constellation:hover span,
.constellation:focus-visible span,
.constellation[aria-pressed="true"] span {
  opacity: 1;
  transform: translate(-50%, 0);
}

.constellation:hover i,
.constellation:focus-visible i,
.constellation[aria-pressed="true"] i {
  box-shadow: 0 0 12px 5px rgba(184, 251, 255, 1), 0 0 48px 18px rgba(20, 174, 195, .64);
}

.constellation:hover,
.constellation:focus-visible,
.constellation[data-state="active"] {
  z-index: 4;
  filter: brightness(1.22);
  background: radial-gradient(circle, rgba(191, 251, 255, .2) 0 10%, rgba(24, 186, 203, .08) 31%, transparent 68%);
  box-shadow: 0 0 0 1px rgba(147, 247, 255, .16), inset 0 0 22px rgba(86, 231, 239, .07);
}

.constellation[data-state="quiet"] { opacity: .34; filter: brightness(.7); }
.constellation[data-state="quiet"]:hover,
.constellation[data-state="quiet"]:focus-visible { opacity: .86; filter: brightness(1.1); }

.constellation:focus-visible,
.writing-node:focus-visible {
  outline: 1px solid rgba(210, 251, 255, .92);
  outline-offset: 5px;
}

.terminal-screen:focus-visible {
  outline: 1px solid rgba(137, 242, 242, .46);
  outline-offset: -8px;
}

.writing-nodes {
  position: absolute;
  z-index: 2;
  inset: 0;
  pointer-events: none;
}

.writing-node {
  --node-size: 12px;
  position: absolute;
  left: var(--node-x);
  top: var(--node-y);
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #dffcff;
  background: transparent;
  transform: translate(-50%, -50%) scale(.2);
  opacity: 0;
  cursor: pointer;
  pointer-events: auto;
  animation: node-arrive 520ms cubic-bezier(.2,.8,.2,1) forwards;
  animation-delay: var(--node-delay);
}

.writing-node::before {
  content: "";
  position: absolute;
  left: calc(50% - var(--node-size) / 2);
  top: calc(50% - var(--node-size) / 2);
  width: var(--node-size);
  height: var(--node-size);
  border-radius: 50%;
  background: #bffaff;
  box-shadow: 0 0 9px 2px rgba(76, 230, 242, .9), 0 0 30px 9px rgba(20, 174, 195, .32);
  animation: node-glimmer 3.4s ease-in-out infinite alternate;
  animation-delay: var(--node-delay);
}

.writing-node::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--line-length);
  height: 1px;
  background: linear-gradient(to right, rgba(76, 230, 242, .7), transparent);
  transform: rotate(var(--line-angle));
  transform-origin: left;
  pointer-events: none;
}

.writing-node span {
  position: absolute;
  left: 50%;
  bottom: 42px;
  width: min(240px, 46vw);
  padding: 8px 10px;
  border: 1px solid rgba(116, 228, 231, .18);
  color: #e9fbf8;
  background: rgba(1, 10, 12, .9);
  font: 500 11px/1.35 ui-monospace, SFMono-Regular, Menlo, monospace;
  opacity: 0;
  transform: translate(-50%, 6px);
  transition: opacity 170ms ease, transform 220ms ease;
  pointer-events: none;
}

.writing-node:hover span,
.writing-node:focus-visible span { opacity: 1; transform: translate(-50%, 0); }
.writing-node[data-weight="satellite"] { --node-size: 8px; opacity: .74; }

.return-to-machine {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 1%;
  min-width: 44px;
  min-height: 44px;
  padding: 10px 15px;
  border: 1px solid rgba(116, 228, 231, .32);
  border-radius: 999px;
  color: #c9fbfb;
  background: rgba(1, 18, 21, .82);
  box-shadow: 0 0 20px rgba(31, 212, 221, .2), inset 0 0 14px rgba(31, 212, 221, .08);
  font: 700 10px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .1em;
  transform: translateX(-50%);
  cursor: pointer;
  pointer-events: auto;
}

.return-to-machine[hidden] { display: none; }
.return-to-machine:hover,
.return-to-machine:focus-visible {
  color: #f1ffff;
  border-color: rgba(178, 249, 249, .72);
  box-shadow: 0 0 28px rgba(31, 212, 221, .35), inset 0 0 16px rgba(31, 212, 221, .14);
}

.machine {
  position: absolute;
  z-index: 6;
  inset: 0;
  opacity: var(--machine-opacity);
  transform: translate3d(0, var(--machine-y), 0) scale(var(--machine-scale));
  transform-origin: 50% 84%;
  pointer-events: none;
  transition: opacity 260ms linear;
}

.terminal-screen {
  --screen-color: rgba(1, 20, 22, .66);
  --border-color: rgba(62, 126, 126, .08);
  position: absolute;
  left: 41.7%;
  top: 52.7%;
  width: 16.1%;
  height: 18.8%;
  padding: clamp(7px, 1vw, 17px);
  overflow: hidden auto;
  border: clamp(3px, .5vw, 9px) solid var(--border-color);
  border-radius: 8% / 10%;
  color: #71f1ee;
  background:
    repeating-linear-gradient(to bottom, transparent 0 2px, rgba(79, 242, 235, .045) 3px),
    var(--screen-color);
  box-shadow: inset 0 0 25px rgba(5, 205, 197, .1), 0 0 14px rgba(21, 225, 217, .08);
  font: 500 clamp(6px, .72vw, 12px)/1.23 ui-monospace, SFMono-Regular, Menlo, monospace;
  text-shadow: 0 0 7px rgba(68, 247, 240, .62);
  pointer-events: auto;
  cursor: text;
  scrollbar-width: none;
}

.terminal-screen::-webkit-scrollbar { display: none; }

.terminal-screen pre {
  margin: 0;
  white-space: pre-wrap;
  font: inherit;
}

.terminal-prompt { display: flex; gap: .4em; white-space: pre-wrap; }
.terminal-prompt b { font-weight: 400; animation: cursor-blink 900ms steps(1) infinite; }

.machine-key {
  position: absolute;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  opacity: .14;
  pointer-events: auto;
  cursor: pointer;
}

.machine-key::after {
  content: attr(data-key-label);
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 1px solid rgba(86, 236, 235, .38);
  color: rgba(150, 255, 252, .78);
  background: rgba(12, 176, 182, .08);
  box-shadow: 0 0 10px rgba(35, 221, 221, .22), inset 0 0 8px rgba(35, 221, 221, .08);
  font: 700 clamp(5px, .5vw, 8px)/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.machine-key:hover,
.machine-key:focus-visible { opacity: .72; }

.machine-key:focus-visible {
  outline: 1px solid rgba(137, 242, 242, .58);
  outline-offset: -6px;
}

.machine-key--q { left: 36.7%; top: 80.8%; width: 3.2%; height: 5%; }
.machine-key--return { left: 56.1%; top: 83.1%; width: 4.4%; height: 5.4%; }

.machine-power {
  position: absolute;
  left: 55.6%;
  top: 74.8%;
  width: 4.8%;
  height: 5.2%;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  pointer-events: auto;
  cursor: pointer;
}

.machine-power::before,
.machine-power::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.machine-power::before {
  width: clamp(5px, .7vw, 11px);
  aspect-ratio: 1;
  background: #a8fbff;
  box-shadow: 0 0 8px 3px rgba(76,230,242,.88), 0 0 24px 9px rgba(21,188,204,.42);
  animation: power-breathe 3.4s ease-in-out infinite;
}

.machine-power::after {
  width: clamp(18px, 2.4vw, 34px);
  aspect-ratio: 1;
  border: 1px solid rgba(121,242,247,.11);
  opacity: 0;
  transition: opacity 180ms ease;
}

.machine-power:hover::after,
.machine-power:focus-visible::after { opacity: 1; }

.machine-power:focus-visible {
  outline: none;
}

.machine-power:disabled { cursor: wait; }
.machine.is-powering-down .terminal-screen { animation: crt-collapse 470ms cubic-bezier(.7,0,.9,.4) forwards; overflow: hidden; }
.machine.is-powered-off .terminal-screen { opacity: 0; transform: scale3d(.34,.005,1); }
.machine.is-powering-up .terminal-screen { animation: crt-wake 500ms cubic-bezier(.15,.7,.2,1) both; }
.machine.is-powering-down .machine-power::before { animation: power-flicker 470ms steps(2,end) forwards; }
.machine.is-powered-off .machine-power::before { opacity: .06; box-shadow: none; animation: none; }
.machine.is-powered-off .machine-power::after {
  width: clamp(10px, 1.25vw, 18px);
  border: 1px solid rgba(34, 67, 68, .42);
  background: rgba(1, 11, 13, .96);
  box-shadow: 0 0 13px 6px rgba(1, 7, 9, .92);
  opacity: 1;
}

.reader {
  width: min(880px, calc(100vw - 28px));
  max-height: min(88svh, 980px);
  padding: 0;
  border: 1px solid rgba(118, 228, 229, .25);
  color: #eaf4f1;
  background: rgba(1, 8, 10, .94);
  box-shadow: 0 28px 90px rgba(0, 0, 0, .72), 0 0 46px rgba(35, 185, 196, .08);
  backdrop-filter: blur(22px);
}

.reader::backdrop { background: rgba(0, 4, 5, .78); backdrop-filter: blur(5px); }

.reader__paper {
  position: relative;
  max-height: inherit;
  padding: clamp(28px, 5vw, 62px);
  overflow: auto;
}

.reader__close {
  position: sticky;
  z-index: 3;
  float: right;
  top: 0;
  width: 44px;
  height: 44px;
  margin: -12px -12px 0 18px;
  border: 1px solid rgba(152, 226, 224, .16);
  color: #b6ccc7;
  background: rgba(1, 8, 10, .86);
  font-size: 28px;
  cursor: pointer;
}

.reader__meta {
  margin: 0 0 15px;
  color: #6bbec0;
  font: 600 10px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.reader h2 {
  margin: 0 0 32px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(30px, 5vw, 62px);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -.035em;
}

.reader__body {
  color: #dce8e4;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(17px, 1.65vw, 21px);
  line-height: 1.72;
}

.reader__body h2,
.reader__body h3 { margin: 1.8em 0 .65em; font-size: 1.35em; line-height: 1.2; }
.reader__body p { margin: 0 0 1.25em; }
.reader__body strong { color: #f0f8f5; }
.reader__body a, .reader__external { color: #74e4e8; }

.related-signals {
  position: relative;
  margin: 52px 0 6px;
  padding: 24px 0 2px;
  border-top: 1px solid rgba(116, 228, 232, .2);
}

.related-signals::before {
  content: "";
  position: absolute;
  top: -3px;
  left: 0;
  width: 72px;
  height: 5px;
  background: radial-gradient(circle, rgba(164, 250, 248, .95) 0 2px, rgba(69, 204, 210, .35) 3px, transparent 5px);
  filter: drop-shadow(0 0 8px rgba(66, 221, 229, .8));
}

.related-signals__heading {
  margin: 0 0 13px !important;
  color: #6bbec0;
  font: 700 10px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .18em;
}

.related-signals__list { display: grid; gap: 10px; }

.reader__body .related-signal {
  display: grid;
  grid-template-columns: minmax(62px, auto) 1fr auto;
  gap: 14px;
  align-items: center;
  min-height: 58px;
  padding: 10px 15px;
  border: 1px solid rgba(116, 228, 232, .2);
  color: #dffbfa;
  background: linear-gradient(105deg, rgba(8, 47, 51, .62), rgba(3, 19, 23, .42));
  box-shadow: inset 0 0 22px rgba(57, 195, 202, .045), 0 8px 26px rgba(0, 0, 0, .16);
  text-decoration: none;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.reader__body .related-signal:hover,
.reader__body .related-signal:focus-visible {
  border-color: rgba(159, 246, 246, .72);
  background: linear-gradient(105deg, rgba(10, 69, 74, .78), rgba(4, 29, 34, .58));
  transform: translateX(3px);
}

.related-signal__action {
  color: #75e8ea;
  font: 800 10px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .13em;
}

.related-signal__label { font-size: .86em; line-height: 1.35; }
.related-signal__arrow { color: #8ff3f2; font: 400 20px/1 Georgia, serif; }

.reader--publication { width: min(1120px, calc(100vw - 24px)); }
.reader--publication .reader__paper { height: min(90svh, 900px); display: flex; flex-direction: column; }
.reader--publication h2 { margin-bottom: 12px; font-size: clamp(24px, 3.6vw, 48px); }
.reader__external { width: max-content; margin: 0 0 18px; font: 600 11px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; }
.reader__return {
  width: max-content;
  min-width: 44px;
  min-height: 44px;
  margin: 0 0 18px;
  padding: 9px 13px;
  border: 1px solid rgba(116, 228, 231, .28);
  color: #a9eff0;
  background: rgba(8, 39, 43, .52);
  font: 700 10px/1.3 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .1em;
  cursor: pointer;
}
.reader__return:hover,
.reader__return:focus-visible { color: #efffff; border-color: rgba(178, 249, 249, .7); }
#publication-frame { width: 100%; flex: 1; min-height: 55svh; border: 1px solid rgba(116, 228, 231, .15); background: #071012; }

@keyframes orb-wander {
  0%, 100% { transform: translate3d(-50%, -50%, 0); }
  22% { transform: translate3d(calc(-50% + var(--wander-x1)), calc(-50% + var(--wander-y1)), 0); }
  49% { transform: translate3d(calc(-50% + var(--wander-x2)), calc(-50% + var(--wander-y2)), 0); }
  73% { transform: translate3d(calc(-50% + var(--wander-x3)), calc(-50% + var(--wander-y3)), 0); }
  89% { transform: translate3d(calc(-50% + var(--wander-x4)), calc(-50% + var(--wander-y4)), 0); }
}

@keyframes constellation-pulse {
  0%, 100% { opacity: .78; filter: brightness(.9); }
  48% { opacity: 1; filter: brightness(1.28); }
}

@keyframes node-glimmer {
  from { filter: brightness(.82); }
  to { filter: brightness(1.3); }
}

@keyframes node-arrive {
  to { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

@keyframes silt-rise {
  to { background-position: 17px -220px, -28px -180px, 12px -250px; }
}

@keyframes cursor-blink { 50% { opacity: 0; } }

@keyframes moon-breathe {
  0%, 100% { opacity: .5; transform: scale(.94); }
  50% { opacity: .88; transform: scale(1.045); }
}

@keyframes moon-orbit { to { transform: rotate(1turn); } }

@keyframes power-breathe {
  0%, 100% { opacity: .68; transform: translate(-50%, -50%) scale(.82); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.08); }
}

@keyframes power-flicker {
  0% { opacity: 1; }
  28% { opacity: .16; }
  45% { opacity: .88; }
  72% { opacity: .08; }
  100% { opacity: .04; }
}

@keyframes crt-collapse {
  0% { opacity: 1; transform: scale3d(1,1,1); }
  62% { opacity: 1; transform: scale3d(1.025,.018,1); }
  100% { opacity: 0; transform: scale3d(.34,.005,1); }
}

@keyframes crt-wake {
  0% { opacity: 0; transform: scale3d(.34,.005,1); }
  42% { opacity: 1; transform: scale3d(1.025,.018,1); }
  100% { opacity: 1; transform: scale3d(1,1,1); }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@keyframes fog-drift {
  from { transform: translate3d(-2%, 0, 0) scale(1); opacity: .35; }
  to { transform: translate3d(8%, -5%, 0) scale(1.12); opacity: .62; }
}

@keyframes wisp-drift {
  from { transform: translate3d(-7px, -10px, 0) scale(.72); opacity: .42; }
  48% { opacity: 1; }
  to { transform: translate3d(11px, 18px, 0) scale(1.15); opacity: .58; }
}

@keyframes sound-reed {
  from { transform: scaleY(.45); opacity: .48; }
  to { transform: scaleY(1); opacity: 1; }
}

@media (max-width: 1100px) {
  :root {
    --moon-crown-center-x: 20%;
    --moon-crown-size: 156px;
  }
  .identity h1 {
    position: absolute;
    top: 50%;
    left: calc(var(--moon-crown-center-x) + (var(--moon-crown-size) / 2) + 47px + 16px);
    transform: translateY(-50%);
  }
}

@media (min-width: 761px) and (max-width: 1100px) {
  .moon-crown {
    top: calc(var(--moon-crown-size) / -3);
    left: var(--moon-crown-center-x);
    width: var(--moon-crown-size);
  }
}

@media (max-width: 760px) {
  :root {
    --moon-crown-center-x: 20.5%;
    --moon-crown-size: clamp(44px, 31.2vw, 125px);
  }
  .identity-band {
    min-height: 72px;
  }
  #odehamik-contact { justify-content: center; margin-right: -20px; }
  .sound-toggle {
    top: calc(100% + 12px);
    right: 20px;
    background: rgba(2, 18, 21, .78);
    transform: none;
  }
  .hero, .diorama { min-height: calc(100svh - 72px); }
  .scene-layer {
    background-position: 50% 50%;
  }
  .scene-layer--background,
  .scene-layer--tree { background-image: url("./assets/odehamik-hero-environment-mobile-v2.png"); }
  .scene-layer--subject { background-image: url("./assets/odehamik-hero-subject-mobile-exact-v2.png"); }
  .scene-layer--foreground { background-image: url("./assets/odehamik-hero-rebuild-mobile-v1.png"); }
  .moon-crown {
    top: calc(var(--moon-crown-size) / -3);
    left: var(--moon-crown-center-x);
    width: var(--moon-crown-size);
  }
  .biography { top: auto; bottom: 52px; }
  .depths { height: 190svh; margin-top: -8svh; }
  .depth-layer {
    background-image: url("./assets/odehamik-drowned-roots-mobile-v1.png");
    background-position: 50% 50%;
  }
  .depth-layer--roots { transform: translate3d(0, var(--root-y), 30px) scale(1.06); }
  .lower-world { height: 520svh; margin-top: -10svh; }
  .lower-world__stage { background-image: url("./assets/odehamik-root-fed-terminal-mobile-v1.png"); }
  .lower-world__environment {
    inset: 0;
    background-image: url("./assets/odehamik-root-fed-terminal-mobile-v1.png");
    background-position: 50% 50%;
    transform: translate3d(0, var(--machine-y), 0) scale(var(--machine-scale));
  }
  .constellations { inset: 5% 5% 25%; }
  .constellation { width: 78px; height: 78px; }
  .constellation i { left: 50%; top: 50%; width: 25px; height: 25px; }
  .constellation span { top: 84px; max-width: 150px; font-size: 8px; }
  .writing-node span { width: min(200px, 68vw); font-size: 10px; }
  .terminal-screen {
    left: 37.3%;
    top: 65.1%;
    width: 25.6%;
    height: 12.8%;
    padding: 8px;
    border-width: 4px;
    font-size: clamp(5px, 1.45vw, 8px);
  }
  .machine-key--q { left: 34%; top: 80.3%; width: 7%; height: 4%; }
  .machine-key--return { left: 59%; top: 81.4%; width: 8%; height: 4.6%; }
  .machine-power { left: 57.8%; top: 74.5%; width: 8%; height: 5.3%; }
  .reader__paper { padding: 28px 22px 42px; }
}

@media (max-width: 380px) {
  .identity h1 { right: 42px; }
}

@media (prefers-reduced-motion: reduce) {
  .scene-layer { transform: scale(1.05); }
  .fog { animation: none; }
  .depth-layer { transform: scale(1.04); }
  .wisp { animation: none; }
  .biography { transition-duration: 0.01ms; }
  .contact-panel, .contact-panel__body { transition: none; }
  .lower-world__environment, .machine { transition: none; }
  .lower-world__silt, .constellation, .constellation i, .writing-node::before, .terminal-prompt b { animation: none; }
  .moon-crown::before, .moon-crown::after, .machine-power::before { animation: none; }
  .sound-toggle, .sound-toggle__glyph i { transition: none; animation: none; }
  .machine.is-powering-down .terminal-screen,
  .machine.is-powering-up .terminal-screen { animation-duration: .01ms; }
  .writing-node { animation-duration: .01ms; }
}
