:root {
  color-scheme: dark;
  --mx: 50vw;
  --my: 50vh;
  --acid: #7cff8a;
  --acid-soft: rgba(124, 255, 138, 0.62);
  --amber: #ffd36a;
  --red: #ff315d;
  --cyan: #67eaff;
  --ink: #050805;
  --glass: rgba(4, 11, 6, 0.56);
  --line: rgba(124, 255, 138, 0.28);
  --text: #efffed;
}

* {
  box-sizing: border-box;
}

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

body {
  overflow: hidden;
  background: var(--ink);
  color: var(--text);
  font-family: "Oxanium", "Courier New", ui-monospace, SFMono-Regular, Consolas, monospace;
  user-select: none;
}

button,
a {
  font: inherit;
}

#gl-scene {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: block;
  transform: scale(1.018);
  filter: blur(1.15px) saturate(1.2) contrast(1.08);
  image-rendering: pixelated;
}

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

.crt {
  z-index: 4;
  background:
    linear-gradient(rgba(255, 255, 255, 0) 50%, rgba(0, 0, 0, 0.27) 50%),
    linear-gradient(90deg, rgba(255, 48, 72, 0.08), rgba(64, 255, 120, 0.035), rgba(70, 170, 255, 0.08));
  background-size: 100% 3px, 4px 100%;
  mix-blend-mode: screen;
  opacity: 0.74;
}

.crt::before,
.crt::after {
  content: "";
  position: absolute;
  inset: -12%;
  pointer-events: none;
}

.crt::before {
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 220 220' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.78' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 190px 190px;
  opacity: 0.11;
  mix-blend-mode: screen;
  animation: grain 520ms steps(2, end) infinite;
}

.crt::after {
  background:
    radial-gradient(circle at var(--mx) var(--my), rgba(124, 255, 138, 0.14), transparent 18rem),
    radial-gradient(circle at 50% 45%, rgba(103, 234, 255, 0.08), transparent 34rem);
  filter: blur(22px);
  opacity: 0.9;
}

body::before {
  content: "";
  z-index: 2;
  background:
    radial-gradient(circle at var(--mx) var(--my), rgba(124, 255, 138, 0.18), transparent 10rem),
    linear-gradient(90deg, transparent 0 9%, rgba(124, 255, 138, 0.13) 9.15% 9.3%, transparent 9.45% 90.5%, rgba(124, 255, 138, 0.1) 90.65% 90.8%, transparent 91%),
    linear-gradient(rgba(124, 255, 138, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124, 255, 138, 0.035) 1px, transparent 1px);
  background-size: auto, auto, 42px 42px, 42px 42px;
  mask-image: radial-gradient(circle at center, black 0 58%, transparent 91%);
}

body::after {
  content: "";
  z-index: 3;
  background:
    radial-gradient(ellipse at center, transparent 34%, rgba(0, 0, 0, 0.72) 100%),
    linear-gradient(105deg, transparent 0 42%, rgba(124, 255, 138, 0.08) 42.2% 42.7%, transparent 43% 57%, rgba(255, 49, 93, 0.07) 57.2% 57.7%, transparent 58%);
}

.stage {
  position: relative;
  z-index: 5;
  min-height: 100vh;
  width: min(100%, 860px);
  margin: 0 auto;
  padding: clamp(24px, 6vh, 58px) 18px 20px;
  display: grid;
  grid-template-rows: auto auto auto;
  align-content: center;
  align-items: center;
  gap: 28px;
  perspective: 1100px;
}

.identity {
  display: grid;
  justify-items: center;
  gap: 10px;
  text-align: center;
  transform-style: preserve-3d;
}

.eyebrow,
.telemetry {
  margin: 0;
  color: rgba(124, 255, 138, 0.7);
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.kinetic-title {
  margin: 0;
  display: flex;
  justify-content: center;
  gap: clamp(0px, 0.18vw, 2px);
  text-transform: uppercase;
  font-family: "Rubik Dirt", "Tektur", "Oxanium", Impact, "Arial Black", monospace;
  font-size: clamp(62px, 15vw, 148px);
  line-height: 0.88;
  letter-spacing: 0;
  font-weight: 400;
  isolation: isolate;
  filter: drop-shadow(0 0 14px rgba(124, 255, 138, 0.24));
}

.kinetic-title span {
  --tx: 0px;
  --ty: 0px;
  --jx: 0px;
  --jy: 0px;
  --rot: 0deg;
  --jrot: 0deg;
  --glow: 0.28;
  position: relative;
  display: inline-block;
  color: transparent;
  background:
    url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.2' numOctaves='5' seed='7'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.82'/%3E%3C/svg%3E"),
    radial-gradient(circle at 45% 28%, rgba(232, 255, 225, 0.92), rgba(124, 255, 138, 0.72) 28%, rgba(18, 96, 34, 0.72) 56%, rgba(2, 10, 4, 0.62) 82%),
    linear-gradient(180deg, rgba(185, 255, 171, 0.95), rgba(80, 204, 82, 0.8) 40%, rgba(7, 42, 13, 0.86) 74%, rgba(83, 217, 119, 0.42));
  background-blend-mode: multiply, hard-light, normal;
  background-size: 110px 110px, 100% 100%, 100% 100%;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-stroke: 1px rgba(170, 255, 154, 0.95);
  text-shadow:
    calc((var(--tx) + var(--jx)) * -0.08) 0 rgba(255, 49, 93, 0.28),
    calc((var(--tx) + var(--jx)) * 0.08) 0 rgba(103, 234, 255, 0.34),
    0 0 calc(14px + var(--glow) * 22px) rgba(124, 255, 138, var(--glow));
  transform:
    translate3d(calc(var(--tx) + var(--jx)), calc(var(--ty) + var(--jy)), 0)
    rotate(calc(var(--rot) + var(--jrot)))
    scale(calc(1 + var(--glow) * 0.045));
  transition:
    transform 70ms linear,
    text-shadow 120ms linear,
    opacity 90ms linear;
  will-change: transform;
}

.kinetic-title span::before,
.kinetic-title span::after {
  content: attr(data-char);
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-clip: text;
  -webkit-background-clip: text;
}

.kinetic-title span::before {
  z-index: -1;
  color: rgba(2, 7, 3, 0.92);
  -webkit-text-stroke: 4px rgba(2, 8, 3, 0.78);
  filter: none;
  text-shadow:
    0 0 18px rgba(124, 255, 138, 0.52),
    0 0 36px rgba(124, 255, 138, 0.22);
}

.kinetic-title span::after {
  z-index: 1;
  color: transparent;
  background:
    repeating-linear-gradient(180deg, rgba(239, 255, 237, 0.56) 0 1px, transparent 1px 8px),
    linear-gradient(90deg, rgba(255, 49, 93, 0.14), transparent 18%, transparent 82%, rgba(103, 234, 255, 0.22));
  opacity: calc(0.11 + var(--glow) * 0.14);
  mix-blend-mode: screen;
  transform: translate3d(calc(var(--jx) * -0.45), calc(var(--jy) * 0.35), 0);
  clip-path: polygon(0 8%, 100% 0, 100% 22%, 0 30%, 0 44%, 100% 38%, 100% 54%, 0 62%, 0 78%, 100% 72%, 100% 92%, 0 100%);
}

.alias {
  margin: 0;
  color: rgba(239, 255, 237, 0.64);
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.links {
  width: min(100%, 560px);
  justify-self: center;
  display: grid;
  gap: 34px;
  margin-top: 0;
  transform: rotateX(4deg);
  transform-style: preserve-3d;
}

.link-card {
  position: relative;
  min-height: 66px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 10px 14px;
  display: grid;
  grid-template-columns: 58px 1fr;
  align-items: center;
  gap: 13px;
  overflow: hidden;
  cursor: pointer;
  color: var(--text);
  text-decoration: none;
  text-align: left;
  background:
    linear-gradient(90deg, rgba(124, 255, 138, 0.13), transparent 28%),
    linear-gradient(110deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.015)),
    var(--glass);
  box-shadow:
    0 14px 48px rgba(0, 0, 0, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
  clip-path: none;
  backdrop-filter: blur(13px) saturate(1.4);
  transform: translateZ(0);
  transition:
    transform 220ms ease,
    border-color 260ms ease,
    box-shadow 260ms ease,
    background 260ms ease;
}

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

.link-card::before {
  inset: 0;
  z-index: 0;
  opacity: 0;
  background:
    radial-gradient(circle at var(--mx) var(--my), rgba(239, 255, 237, 0.2), transparent 9rem),
    repeating-linear-gradient(90deg, transparent 0 12px, rgba(124, 255, 138, 0.09) 13px 14px);
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px));
  transition: opacity 260ms ease;
}

.link-card::after {
  top: 0;
  bottom: 0;
  left: -24%;
  width: 18%;
  background: linear-gradient(90deg, transparent, rgba(124, 255, 138, 0.42), transparent);
  transform: skewX(-22deg);
  z-index: 1;
}

.link-card > span:last-child {
  min-width: 0;
}

.link-card:hover,
.link-card:focus-visible {
  outline: none;
  border-color: rgba(239, 255, 237, 0.66);
  transform: translate3d(0, -2px, 0);
  background:
    linear-gradient(90deg, rgba(124, 255, 138, 0.18), transparent 34%),
    linear-gradient(110deg, rgba(255, 255, 255, 0.105), rgba(255, 255, 255, 0.02)),
    rgba(8, 18, 10, 0.72);
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.48),
    0 0 30px rgba(124, 255, 138, 0.16);
}

.link-card:hover::before,
.link-card:focus-visible::before {
  opacity: 1;
}

.link-card:hover::after,
.link-card:focus-visible::after {
  animation: sweep 650ms ease both;
}

.link-card > * {
  position: relative;
  z-index: 2;
}

.link-icon {
  width: 46px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 1px solid rgba(124, 255, 138, 0.42);
  color: var(--acid);
  background: rgba(0, 0, 0, 0.38);
  box-shadow:
    inset 0 0 18px rgba(124, 255, 138, 0.08),
    0 0 16px rgba(124, 255, 138, 0.12);
  transition:
    color 220ms ease,
    border-color 220ms ease,
    box-shadow 220ms ease,
    transform 220ms ease;
}

.link-icon svg {
  width: 24px;
  height: 24px;
  display: block;
  fill: currentColor;
  filter: drop-shadow(0 0 8px rgba(124, 255, 138, 0.5));
}

.link-icon img {
  width: 26px;
  height: 26px;
  display: block;
  object-fit: contain;
  filter:
    drop-shadow(0 0 8px rgba(124, 255, 138, 0.55))
    saturate(1.1);
}

.link-card:hover .link-icon,
.link-card:focus-visible .link-icon {
  color: #efffed;
  border-color: rgba(239, 255, 237, 0.76);
  box-shadow:
    inset 0 0 22px rgba(124, 255, 138, 0.18),
    0 0 24px rgba(124, 255, 138, 0.34);
  transform: scale(1.05);
}

.link-card strong,
.link-card small {
  display: block;
}

.link-card strong {
  font-size: 18px;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.link-card small {
  margin-top: 5px;
  color: rgba(239, 255, 237, 0.62);
  font-size: 13px;
}

.telemetry {
  width: min(100%, 560px);
  justify-self: center;
  display: grid;
  place-items: center;
  border-top: 1px solid rgba(124, 255, 138, 0.22);
  padding-top: 12px;
  color: rgba(239, 255, 237, 0.58);
  letter-spacing: 0.12em;
}

.no-webgl #gl-scene {
  display: none;
}

.no-webgl {
  background:
    radial-gradient(circle at 50% 20%, rgba(124, 255, 138, 0.16), transparent 32rem),
    #050805;
}

@keyframes drift {
  0%,
  100% {
    transform: translateY(0) rotate(-1deg);
  }
  50% {
    transform: translateY(-10px) rotate(1deg);
  }
}

@keyframes spin {
  to {
    transform: rotate(1turn);
  }
}

@keyframes sweep {
  to {
    left: 112%;
  }
}

@keyframes grain {
  0% {
    transform: translate3d(-2%, -1%, 0);
  }
  25% {
    transform: translate3d(1%, -3%, 0);
  }
  50% {
    transform: translate3d(3%, 2%, 0);
  }
  75% {
    transform: translate3d(-1%, 3%, 0);
  }
  100% {
    transform: translate3d(2%, 1%, 0);
  }
}

@media (max-width: 560px) {
  body {
    overflow: auto;
  }

  .stage {
    min-height: 100svh;
    align-items: end;
    gap: 16px;
    padding-top: 26px;
  }

  .kinetic-title {
    font-size: clamp(48px, 16vw, 72px);
  }

  .links {
    transform: none;
  }

  .link-card {
    min-height: 62px;
    grid-template-columns: 50px 1fr;
  }

  .telemetry {
    font-size: 10px;
    letter-spacing: 0.08em;
  }
}
