:root {
  --ink: #090c0a;
  --panel: #111612;
  --paper: #e6ebe3;
  --muted: #8a9689;
  --line: rgba(205, 225, 198, 0.17);
  --acid: #caff76;
  --mono: "DM Mono", "Courier New", monospace;
  --terminal: "Share Tech Mono", "Lucida Console", monospace;
  --sans: "Space Grotesk", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  width: 100%;
  min-width: 100%;
  min-height: 100%;
  margin: 0;
}

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

body {
  min-height: 100svh;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 43%, rgba(148, 186, 114, 0.075), transparent 42%),
    linear-gradient(180deg, #0c100d 0%, var(--ink) 100%);
  color: var(--paper);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

body.locked { cursor: crosshair; }

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

body::before {
  z-index: 0;
  opacity: 0.24;
  background-image:
    repeating-linear-gradient(0deg, transparent 0 3px, rgba(207, 235, 192, 0.022) 4px 5px),
    repeating-linear-gradient(90deg, transparent 0 95px, rgba(207, 235, 192, 0.02) 96px 97px);
}

body::after {
  z-index: 0;
  background: radial-gradient(ellipse at center, transparent 42%, rgba(0, 0, 0, 0.28) 100%);
}

::selection { background: var(--acid); color: #10150f; }

.access-gate {
  position: fixed;
  z-index: 50;
  inset: 0;
  display: grid;
  overflow: hidden;
  place-items: center;
  background:
    radial-gradient(circle at 50% 48%, rgba(91, 137, 75, 0.19), transparent 33%),
    radial-gradient(circle at 50% 50%, transparent 30%, rgba(0, 0, 0, 0.52) 100%),
    #07100b;
  color: #dce9d7;
  font-family: var(--terminal);
  opacity: 1;
  transition: opacity 750ms ease, visibility 750ms ease;
}

.access-gate[hidden] { display: none; }

.access-gate.is-leaving {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.access-gate::before,
.access-gate::after {
  position: absolute;
  z-index: 3;
  inset: 0;
  content: "";
  pointer-events: none;
}

.access-gate::before {
  opacity: 0.32;
  background: repeating-linear-gradient(
    0deg,
    rgba(255, 255, 255, 0.018) 0,
    rgba(255, 255, 255, 0.018) 1px,
    transparent 1px,
    transparent 4px
  );
  mix-blend-mode: screen;
}

.access-gate::after {
  background:
    linear-gradient(90deg, rgba(5, 12, 8, 0.75), transparent 14%, transparent 86%, rgba(5, 12, 8, 0.75)),
    linear-gradient(0deg, rgba(5, 12, 8, 0.62), transparent 18%, transparent 82%, rgba(5, 12, 8, 0.62));
}

.gate-grid {
  position: absolute;
  z-index: 1;
  inset: -72px;
  opacity: 0.28;
  background-image:
    linear-gradient(rgba(175, 223, 143, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(175, 223, 143, 0.09) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(circle at center, #000 0 28%, transparent 74%);
  animation: grid-drift 16s linear infinite;
}

.gate-grid::before,
.gate-grid::after {
  position: absolute;
  top: 50%;
  left: 50%;
  content: "";
  border: 1px solid rgba(202, 255, 118, 0.16);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.gate-grid::before { width: min(54vw, 660px); aspect-ratio: 1; }
.gate-grid::after { width: min(33vw, 410px); aspect-ratio: 1; }

.gate-scan {
  position: absolute;
  z-index: 2;
  right: 0;
  left: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 8%, rgba(202, 255, 118, 0.1), rgba(202, 255, 118, 0.62), rgba(202, 255, 118, 0.1), transparent 92%);
  box-shadow: 0 0 22px rgba(202, 255, 118, 0.18);
  animation: scan-pass 5.8s linear infinite;
}

.gate-hit {
  position: absolute;
  z-index: 10;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: transparent;
  cursor: crosshair;
}

.gate-hit::after {
  position: absolute;
  inset: 18px;
  content: "";
  border: 1px solid transparent;
  pointer-events: none;
  transition: border-color 180ms ease;
}

.gate-hit:focus-visible::after { border-color: rgba(202, 255, 118, 0.72); }

.gate-copy {
  position: relative;
  z-index: 5;
  width: min(860px, calc(100vw - 48px));
  pointer-events: none;
}

.gate-kicker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 2px 11px;
  border-top: 1px solid rgba(202, 255, 118, 0.32);
  border-bottom: 1px solid rgba(202, 255, 118, 0.12);
  color: rgba(190, 213, 182, 0.62);
  font-size: clamp(0.66rem, 0.82vw, 0.82rem);
  letter-spacing: 0.17em;
}

.gate-copy h1 {
  position: relative;
  margin: clamp(28px, 5vw, 58px) 0 clamp(26px, 4.5vw, 48px);
  font-family: var(--terminal);
  font-size: clamp(3.5rem, 8.2vw, 7.45rem);
  font-weight: 400;
  line-height: 0.78;
  letter-spacing: -0.055em;
  text-align: center;
  text-transform: uppercase;
}

.gate-copy h1 span,
.gate-copy h1 strong { display: block; }

.gate-copy h1 span {
  color: #dce6d8;
  text-shadow: 2px 0 rgba(156, 207, 135, 0.16), -2px 0 rgba(199, 238, 181, 0.08);
}

.gate-copy h1 strong {
  position: relative;
  margin-top: 0.28em;
  color: var(--acid);
  font-size: 0.84em;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-shadow: 0 0 24px rgba(202, 255, 118, 0.13);
}

.gate-copy h1 strong::before,
.gate-copy h1 strong::after {
  position: absolute;
  top: 50%;
  width: clamp(30px, 8vw, 94px);
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(202, 255, 118, 0.48));
}

.gate-copy h1 strong::before { left: 1%; }
.gate-copy h1 strong::after { right: 1%; transform: rotate(180deg); }

.gate-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: rgba(204, 222, 197, 0.64);
  font-size: clamp(0.72rem, 1vw, 0.92rem);
  letter-spacing: 0.19em;
}

.gate-status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--acid);
  box-shadow: 0 0 12px rgba(202, 255, 118, 0.72);
  animation: status-pulse 1.55s ease-in-out infinite;
}

.gate-status b {
  color: var(--acid);
  font-weight: 400;
  animation: cursor-blink 900ms steps(1, end) infinite;
}

.gate-readout {
  position: absolute;
  z-index: 5;
  bottom: clamp(22px, 4vw, 52px);
  color: rgba(164, 190, 154, 0.45);
  font-size: 0.66rem;
  letter-spacing: 0.15em;
  pointer-events: none;
}

.gate-readout--left { left: clamp(24px, 4vw, 64px); }
.gate-readout--right { right: clamp(24px, 4vw, 64px); }

.gate-corner {
  position: absolute;
  z-index: 5;
  width: 38px;
  height: 38px;
  border-color: rgba(202, 255, 118, 0.42);
  pointer-events: none;
}

.gate-corner--tl { top: 28px; left: 28px; border-top: 1px solid; border-left: 1px solid; }
.gate-corner--tr { top: 28px; right: 28px; border-top: 1px solid; border-right: 1px solid; }
.gate-corner--bl { bottom: 28px; left: 28px; border-bottom: 1px solid; border-left: 1px solid; }
.gate-corner--br { right: 28px; bottom: 28px; border-right: 1px solid; border-bottom: 1px solid; }

@keyframes grid-drift {
  to { transform: translate(64px, 64px); }
}

@keyframes scan-pass {
  from { top: -2%; }
  to { top: 102%; }
}

@keyframes status-pulse {
  50% { opacity: 0.34; transform: scale(0.72); }
}

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

.profile-stage {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(411.4px, 0.77fr);
  gap: clamp(24px, 4vw, 80px);
  width: min(100%, 1680px);
  min-height: 100svh;
  margin-inline: auto;
  padding: 84px clamp(24px, 5.3vw, 88px) 0;
  align-items: center;
  opacity: 1;
  transition: opacity 480ms ease 80ms;
}

body.locked .profile-stage { opacity: 0; pointer-events: none; }
.profile-stage:focus { outline: none; }

.song-signal {
  position: fixed;
  z-index: 0;
  bottom: max(54px, 7.5svh);
  left: max(34px, 4.5vw);
  width: min(660px, 47vw);
  height: 110px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 700ms ease 260ms;
}

body:not(.locked) .song-signal.is-ready { opacity: 0.82; }

.identity-card {
  --card-lift: 0px;
  position: relative;
  isolation: isolate;
  grid-column: 2;
  justify-self: end;
  container-type: inline-size;
  width: min(411.4px, 100%, calc((100svh - 84px) * 0.698734));
  aspect-ratio: 552 / 790;
  overflow: hidden;
  border: 1px solid rgba(208, 228, 201, 0.23);
  background: linear-gradient(145deg, rgba(25, 32, 26, 0.98), rgba(12, 16, 13, 0.985)), var(--panel);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.28);
  transform: translate3d(0, var(--card-lift), 0) rotate(1.8deg);
  transform-origin: 50% 50%;
  transition: transform 360ms cubic-bezier(0.2, 0.72, 0.2, 1);
  will-change: transform;
  backface-visibility: hidden;
}

@media (hover: hover) and (pointer: fine) {
  .identity-card:hover { --card-lift: -8px; }
}

.identity-card::before, .identity-card::after {
  position: absolute;
  content: "";
  pointer-events: none;
}

.identity-card::before {
  z-index: 2;
  inset: 2.2cqw;
  border: 1px solid rgba(211, 231, 203, 0.075);
}

.identity-card::after {
  z-index: -1;
  inset: 0;
  opacity: 0.22;
  background-image: repeating-linear-gradient(0deg, transparent 0 3px, rgba(206, 232, 195, 0.024) 4px 5px);
}

.identity-top, .identity-name, .identity-divider, .identity-row, .identity-bottom {
  position: absolute;
  z-index: 3;
  right: 6.5cqw;
  left: 6.5cqw;
}

.identity-top {
  top: 8.25cqw;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #9aa698;
  font: 500 2.18cqw/1.2 var(--mono);
  letter-spacing: 0.075em;
}

.identity-top strong { color: var(--acid); font-weight: 500; }

.identity-symbol {
  position: absolute;
  z-index: 1;
  top: 16.7cqw;
  left: 50%;
  display: grid;
  width: 72cqw;
  height: 61cqw;
  place-items: center;
  overflow: hidden;
  transform: translateX(-50%);
}

.symbol-grid {
  position: absolute;
  z-index: 0;
  inset: 2cqw 2cqw 0;
  opacity: 0.62;
  background-image:
    linear-gradient(to right, rgba(202, 255, 124, 0.1) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(202, 255, 124, 0.1) 1px, transparent 1px);
  background-size: 6.05cqw 6.05cqw;
  mask-image: radial-gradient(circle at center, #000 18%, transparent 68%);
}

.identity-symbol > span {
  position: relative;
  z-index: 2;
  margin-top: 0;
  margin-left: -4.2cqw;
  color: var(--acid);
  font: 700 60cqw/0.78 var(--sans);
  letter-spacing: -0.12em;
  text-shadow: 4.3cqw 5.1cqw 0 rgba(203, 252, 120, 0.065);
  transform: translateY(-2.2cqw);
}

.symbol-ring {
  position: absolute;
  z-index: 1;
  width: 53cqw;
  height: 53cqw;
  border: 1px solid rgba(203, 252, 120, 0.23);
  border-radius: 50%;
  box-shadow: inset 0 0 12cqw rgba(203, 252, 120, 0.025);
}

.symbol-ring::before, .symbol-ring::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 68cqw;
  height: 1px;
  content: "";
  background: rgba(202, 255, 124, 0.15);
  transform: translate(-50%, -50%) rotate(31deg);
}

.symbol-ring::after { transform: translate(-50%, -50%) rotate(-58deg); }

.identity-name { top: 79.5cqw; }

.identity-name span {
  display: block;
  margin-bottom: 2.2cqw;
  color: var(--muted);
  font: 500 2.2cqw/1 var(--mono);
  letter-spacing: 0.12em;
}

.identity-name strong {
  display: block;
  color: var(--paper);
  font-size: 5.35cqw;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.05em;
}

.identity-divider { top: 96.25cqw; height: 1px; background: var(--line); }

.identity-row {
  display: flex;
  min-height: 6cqw;
  align-items: center;
  justify-content: space-between;
  gap: 3cqw;
}

.identity-row--building { top: 101.15cqw; }
.identity-row--interests { top: 109.5cqw; }
.identity-row--approach { top: 117.9cqw; }

.identity-row span {
  flex: 0 0 auto;
  color: var(--muted);
  font: 500 2.15cqw/1 var(--mono);
  letter-spacing: 0.08em;
}

.identity-row strong {
  color: var(--paper);
  font-size: 3.15cqw;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.025em;
  text-align: right;
  white-space: nowrap;
}

.identity-bottom {
  top: 129.35cqw;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 4.7cqw;
  border-top: 1px solid var(--line);
  color: #95a292;
  font: 500 2.1cqw/1 var(--mono);
  letter-spacing: 0.035em;
}

.signal { display: flex; align-items: center; gap: 2.4cqw; }

.signal i {
  width: 1.35cqw;
  height: 1.35cqw;
  border-radius: 50%;
  background: var(--acid);
  box-shadow: 0 0 1.7cqw rgba(202, 255, 118, 0.38);
}

.soundcloud-engine {
  position: fixed;
  z-index: -1;
  top: 0;
  left: -10000px;
  width: 166px;
  height: 166px;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

.audio-control {
  position: fixed;
  z-index: 12;
  top: 24px;
  left: 24px;
  display: flex;
  width: max-content;
  height: 58px;
  align-items: center;
  overflow: hidden;
  border: 1px solid rgba(202, 255, 118, 0.14);
  border-radius: 12px;
  background: rgba(10, 16, 12, 0.82);
  box-shadow: 0 12px 38px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(14px);
  opacity: 1;
  transform: translateY(0);
  transition: opacity 300ms ease 180ms, transform 300ms cubic-bezier(0.2, 0.72, 0.2, 1) 180ms;
}

body.locked .audio-control {
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
}

.volume-toggle {
  display: grid;
  flex: 0 0 58px;
  width: 58px;
  height: 58px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--paper);
  cursor: pointer;
  place-items: center;
}

.volume-toggle svg {
  display: block;
  width: 28px;
  height: 28px;
  overflow: visible;
  fill: currentColor;
}

.speaker-wave,
.speaker-mute {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  transition: opacity 160ms ease;
}

.speaker-mute { opacity: 0; }
.audio-control.is-muted .speaker-wave { opacity: 0; }
.audio-control.is-muted .speaker-mute { opacity: 1; }

.volume-toggle:hover,
.volume-toggle:focus-visible { color: var(--acid); }

.volume-toggle:focus-visible {
  outline: 1px solid rgba(202, 255, 118, 0.7);
  outline-offset: -5px;
}

.volume-rail {
  display: flex;
  width: 0;
  height: 100%;
  align-items: center;
  padding-right: 0;
  filter: blur(3px);
  opacity: 0;
  transform: translateX(-8px) scaleX(0.88);
  transform-origin: left center;
  transition:
    width 260ms cubic-bezier(0.4, 0, 0.2, 1),
    padding-right 260ms cubic-bezier(0.4, 0, 0.2, 1),
    opacity 170ms ease,
    transform 260ms cubic-bezier(0.4, 0, 0.2, 1),
    filter 180ms ease;
  will-change: width, opacity, transform, filter;
}

.audio-control.is-expanded .volume-rail {
  width: 122px;
  padding-right: 14px;
  filter: blur(0);
  opacity: 1;
  transform: translateX(0) scaleX(1);
}

#volume-slider {
  width: 108px;
  height: 24px;
  margin: 0;
  padding: 0;
  appearance: none;
  background: transparent;
  cursor: pointer;
}

#volume-slider::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--acid) 0 var(--volume-fill, 50%), rgba(230, 235, 227, 0.22) var(--volume-fill, 50%) 100%);
}

#volume-slider::-webkit-slider-thumb {
  width: 14px;
  height: 14px;
  margin-top: -5px;
  border: 2px solid #10150f;
  border-radius: 50%;
  appearance: none;
  background: var(--acid);
  box-shadow: 0 0 0 1px rgba(202, 255, 118, 0.25);
}

#volume-slider::-moz-range-track {
  height: 4px;
  border-radius: 999px;
  background: rgba(230, 235, 227, 0.22);
}

#volume-slider::-moz-range-progress {
  height: 4px;
  border-radius: 999px;
  background: var(--acid);
}

#volume-slider::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border: 2px solid #10150f;
  border-radius: 50%;
  background: var(--acid);
}

@media (max-width: 1100px) {
  .profile-stage {
    grid-template-columns: minmax(0, 1fr) 341px;
  }

  .identity-card {
    width: min(341px, 100%, calc((100svh - 84px) * 0.698734));
  }
}

@media (max-width: 800px) {
  .profile-stage {
    --stage-top: clamp(24px, 6svh, 56px);
    --stage-bottom: var(--stage-top);
    grid-template-columns: 1fr;
    gap: 0;
    padding: var(--stage-top) 22px var(--stage-bottom);
  }

  .identity-card {
    grid-column: 1;
    justify-self: center;
    width: min(430px, 100%, calc((100svh - var(--stage-top) - var(--stage-bottom)) * 0.698734));
  }

  .song-signal {
    right: 18px;
    bottom: 20px;
    left: 18px;
    width: auto;
    height: 76px;
  }

  body:not(.locked) .song-signal.is-ready { opacity: 0.48; }

}

@media (max-width: 600px) {
  .identity-card {
    width: min(360px, 100%, calc((100svh - var(--stage-top) - var(--stage-bottom)) * 0.698734));
  }

  .gate-copy { width: min(100% - 40px, 540px); }

  .gate-kicker {
    justify-content: center;
    font-size: 0.6rem;
    text-align: center;
  }

  .gate-kicker span:last-child { display: none; }

  .gate-copy h1 {
    margin-block: 28px;
    font-size: clamp(3rem, 14vw, 5.2rem);
    line-height: 0.84;
  }

  .gate-copy h1 strong::before,
  .gate-copy h1 strong::after { display: none; }

  .gate-readout--right { display: none; }

  .gate-corner { width: 24px; height: 24px; }
  .gate-corner--tl { top: 16px; left: 16px; }
  .gate-corner--tr { top: 16px; right: 16px; }
  .gate-corner--bl { bottom: 16px; left: 16px; }
  .gate-corner--br { right: 16px; bottom: 16px; }
  .gate-readout--left { bottom: 19px; left: 52px; }
}

@media (max-height: 620px) and (min-width: 801px) {
  .gate-copy h1 { margin-block: 24px; }
  .gate-copy h1 { font-size: clamp(3.5rem, 11vh, 5.6rem); }
  .gate-readout { bottom: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .access-gate,
  .profile-stage,
  .audio-control,
  .volume-rail,
  .identity-card,
  .song-signal { transition: none; }

  .gate-grid,
  .gate-scan,
  .gate-status i,
  .gate-status b { animation: none; }

  .identity-card:hover { --card-lift: 0px; }
  .song-signal { display: none; }
}

@media (forced-colors: active) {
  .gate-hit:focus-visible::after { border-color: CanvasText; }
  .gate-status i,
  .signal i { forced-color-adjust: none; }
}

@supports (padding: max(0px)) {
  .audio-control {
    top: max(24px, env(safe-area-inset-top));
    left: max(24px, env(safe-area-inset-left));
  }
}
