:root {
  color-scheme: dark;
  --ink: #edf5f3;
  --muted: #91a3a2;
  --line: rgba(224, 247, 242, .15);
  --emerald: #53e8bd;
  --cyan: #67c8ff;
  --violet: #8272ff;
  --bg: #05090f;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }

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

body {
  min-width: 320px;
  min-height: 100svh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 54% 44%, rgba(32, 75, 76, .16), transparent 31rem),
    linear-gradient(145deg, #070d13, #030609 72%);
  color: var(--ink);
}

button, a { color: inherit; }
button { font: inherit; }

#orbit {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  touch-action: none;
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: .05;
  background-image: 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='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.6'/%3E%3C/svg%3E");
}

.topbar, main, footer { position: relative; z-index: 2; }

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 80px;
  padding: max(18px, env(safe-area-inset-top)) clamp(20px, 4vw, 64px) 16px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(to bottom, rgba(5, 9, 15, .78), rgba(5, 9, 15, .05));
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: max-content;
  color: var(--ink);
  font-size: .86rem;
  font-weight: 750;
  letter-spacing: .22em;
  text-decoration: none;
}

.brand-mark {
  width: 18px;
  height: 18px;
  border: 1px solid rgba(140, 255, 222, .72);
  border-radius: 50%;
  box-shadow: inset 5px 0 9px rgba(83, 232, 189, .28), 0 0 14px rgba(83, 232, 189, .22);
}

.nav { display: flex; gap: 4px; }

.nav-link, .icon-button, .close-game {
  border: 0;
  background: transparent;
  cursor: pointer;
}

.nav-link {
  padding: 10px 15px;
  border-radius: 999px;
  color: var(--muted);
  font-size: .9rem;
  transition: color .2s ease, background .2s ease;
}

.nav-link:hover, .nav-link:focus-visible, .nav-link.active {
  color: var(--ink);
  background: rgba(255, 255, 255, .06);
}

.icon-button {
  justify-self: end;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
}

.icon-button svg {
  width: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-button[aria-pressed="false"]::after {
  position: absolute;
  width: 24px;
  height: 1px;
  content: "";
  transform: rotate(-45deg);
  background: currentColor;
}

main { min-height: 100svh; }

.view {
  min-height: 100svh;
  padding: clamp(116px, 14vh, 160px) clamp(24px, 5vw, 80px) 94px;
}

#orbit-view {
  display: grid;
  grid-template-columns: minmax(250px, 1fr) minmax(340px, 1.25fr) minmax(230px, .8fr);
  align-items: center;
  gap: 24px;
}

.hero-copy { align-self: center; max-width: 640px; }

.eyebrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 0 0 28px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: .76rem;
  letter-spacing: .14em;
  text-transform: uppercase;
}

h1, h2 {
  margin: 0;
  font-size: clamp(3.4rem, 7.4vw, 8.4rem);
  font-weight: 400;
  letter-spacing: -.07em;
  line-height: .83;
}

h1 em, h2 em {
  color: transparent;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  letter-spacing: -.055em;
  -webkit-text-stroke: 1px rgba(209, 242, 235, .75);
}

.intro {
  max-width: 360px;
  margin: 32px 0 0;
  color: #b6c6c4;
  font-size: 1rem;
  line-height: 1.65;
}

.orbit-stage {
  position: relative;
  align-self: stretch;
  min-height: 420px;
  pointer-events: none;
}

.pulse-target {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(42vw, 490px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border: 0;
  border-radius: 50%;
  background: transparent;
  pointer-events: auto;
  cursor: crosshair;
}

.core-label {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  transform: translate(-50%, -50%);
  color: rgba(228, 247, 242, .72);
  font-size: .62rem;
  letter-spacing: .18em;
  pointer-events: none;
}

.core-label strong {
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 450;
  letter-spacing: .04em;
}

.hero-actions {
  align-self: end;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 22px;
  padding-bottom: 5vh;
}

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
  min-width: 180px;
  padding: 15px 18px 15px 21px;
  border: 1px solid rgba(187, 247, 229, .27);
  border-radius: 999px;
  background: rgba(239, 255, 251, .08);
  color: var(--ink);
  cursor: pointer;
  backdrop-filter: blur(14px);
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
}

.primary-button:hover, .primary-button:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(83, 232, 189, .55);
  background: rgba(83, 232, 189, .14);
}

.primary-button svg {
  width: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
}

.hero-actions p {
  margin: 0;
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.6;
}

.coordinate {
  position: absolute;
  left: clamp(24px, 5vw, 80px);
  bottom: 32px;
  display: flex;
  gap: 22px;
  color: rgba(204, 224, 220, .46);
  font-size: .66rem;
  letter-spacing: .12em;
}

footer {
  position: fixed;
  right: clamp(24px, 5vw, 80px);
  bottom: 30px;
  z-index: 3;
  display: flex;
  gap: 28px;
  color: rgba(204, 224, 220, .42);
  font-size: .64rem;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.secondary-view {
  background: linear-gradient(180deg, rgba(5, 9, 15, .86), rgba(5, 9, 15, .6));
}

.section-heading { max-width: 940px; }
.section-heading h2 { font-size: clamp(3.7rem, 8vw, 8rem); }

.archive-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: clamp(52px, 9vh, 110px);
}

.project-card {
  padding: 12px 12px 22px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .025);
  backdrop-filter: blur(16px);
}

.project-card p {
  margin: 17px 6px 9px;
  color: var(--muted);
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.project-card h3 {
  max-width: 270px;
  margin: 0 6px;
  font-size: 1.05rem;
  font-weight: 420;
  line-height: 1.45;
}

.project-visual {
  position: relative;
  min-height: 230px;
  overflow: hidden;
  background: #091015;
}

.project-visual::before, .project-visual::after, .project-visual span {
  position: absolute;
  content: "";
  border-radius: 50%;
  filter: blur(1px);
}

.card-lumen .project-visual::before {
  width: 190px; height: 190px; left: 50%; top: 50%; transform: translate(-50%, -50%);
  background: radial-gradient(circle at 35% 30%, #bbfff0, #2cc29b 18%, #0d5145 42%, transparent 70%);
  box-shadow: 0 0 55px rgba(83, 232, 189, .34);
}
.card-lumen .project-visual::after {
  inset: 19% 8%; border: 1px solid rgba(194, 255, 240, .24); transform: rotate(-18deg);
}
.card-tidal .project-visual::before {
  width: 240px; height: 240px; right: -50px; top: -70px;
  background: radial-gradient(circle at 38% 62%, #b6d9ff, #4f65e7 25%, #151940 55%, transparent 72%);
}
.card-tidal .project-visual::after {
  width: 210px; height: 45px; left: 30px; bottom: 42px;
  border: 1px solid rgba(135, 151, 255, .38); transform: rotate(12deg);
}
.card-parallax .project-visual::before {
  width: 9px; height: 9px; left: 50%; top: 50%; background: #fff;
  box-shadow: 0 0 35px 10px #7f72ff, 72px -52px 30px 2px #47c7d2, -66px 45px 40px 6px #2537a4;
}
.card-parallax .project-visual::after {
  inset: 18%; border: 1px solid rgba(162, 151, 255, .32); box-shadow: 0 0 0 28px rgba(96, 92, 205, .04);
}

.about-layout {
  display: grid;
  grid-template-columns: 1.4fr .6fr;
  align-items: end;
  gap: clamp(40px, 9vw, 160px);
  min-height: calc(100svh - 240px);
}

.about-copy { padding-bottom: 5vh; }
.about-copy > p { color: #c0cecc; font-size: clamp(1.15rem, 2vw, 1.7rem); line-height: 1.5; }
.about-copy dl { margin: 50px 0 0; }
.about-copy dl div { display: grid; grid-template-columns: 90px 1fr; padding: 14px 0; border-top: 1px solid var(--line); }
.about-copy dt { color: var(--muted); }
.about-copy dd { margin: 0; }

.game {
  position: fixed;
  inset: 0;
  z-index: 30;
  overflow: hidden;
  background: rgba(3, 7, 12, .7);
  backdrop-filter: blur(6px);
}

.game[hidden] { display: none; }

.game-hud {
  position: absolute;
  z-index: 4;
  top: max(24px, env(safe-area-inset-top));
  left: clamp(20px, 4vw, 56px);
  right: clamp(20px, 4vw, 56px);
  display: flex;
  align-items: flex-start;
  gap: 36px;
}

.game-hud div { display: grid; gap: 4px; }
.game-hud span { color: var(--muted); font-size: .67rem; letter-spacing: .14em; text-transform: uppercase; }
.game-hud strong { font-size: 1.8rem; font-weight: 350; }
.close-game { margin-left: auto; padding: 10px 0 10px 20px; color: var(--muted); }

.game-message {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 5;
  width: min(90vw, 520px);
  transform: translate(-50%, -50%);
  text-align: center;
}

.game-message > p:first-child { color: var(--emerald); font-size: .72rem; letter-spacing: .16em; }
.game-message h2 { margin: 18px 0 25px; font-size: clamp(3rem, 7vw, 6rem); line-height: .9; }
.game-message > p:not(:first-child) { max-width: 360px; margin: 0 auto 32px; color: var(--muted); line-height: 1.6; }
.game-message .primary-button { margin: auto; }

.fragment {
  position: absolute;
  z-index: 3;
  display: none;
  width: 70px;
  height: 70px;
  border: 0;
  border-radius: 50%;
  background: radial-gradient(circle, white 0 6%, #8dffe0 8%, rgba(83, 232, 189, .38) 25%, transparent 68%);
  filter: drop-shadow(0 0 16px rgba(83, 232, 189, .9));
  cursor: crosshair;
  animation: fragment-in .35s ease-out;
}

.fragment::before, .fragment::after {
  position: absolute;
  top: 50%; left: 50%;
  content: "";
  border: 1px solid rgba(172, 255, 232, .58);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.fragment::before { width: 36px; height: 36px; }
.fragment::after { width: 54px; height: 54px; opacity: .45; }

@keyframes fragment-in {
  from { opacity: 0; transform: scale(.2); }
  to { opacity: 1; transform: scale(1); }
}

@media (max-width: 900px) {
  .topbar { grid-template-columns: 1fr auto; }
  .nav {
    position: fixed;
    left: 50%;
    bottom: max(18px, env(safe-area-inset-bottom));
    z-index: 20;
    transform: translateX(-50%);
    padding: 5px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(7, 12, 18, .78);
    backdrop-filter: blur(18px);
  }
  #orbit-view {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(300px, 48vh) auto;
    align-items: start;
    padding-top: 112px;
  }
  .hero-copy { z-index: 2; }
  h1 { font-size: clamp(3.8rem, 17vw, 6.5rem); }
  .intro { margin-top: 20px; }
  .orbit-stage { min-height: 300px; margin: -58px -24px -40px; }
  .pulse-target { width: min(88vw, 440px); }
  .hero-actions { z-index: 2; flex-direction: row; align-items: center; padding-bottom: 52px; }
  .coordinate, footer { display: none; }
  .archive-grid { grid-template-columns: 1fr; }
  .project-visual { min-height: 260px; }
  .about-layout { grid-template-columns: 1fr; align-items: start; }
}

@media (max-width: 560px) {
  .topbar { min-height: 70px; padding-inline: 18px; }
  .brand { font-size: .78rem; }
  .icon-button { width: 38px; height: 38px; }
  .view { padding-inline: 20px; }
  #orbit-view { padding-top: 105px; grid-template-rows: auto minmax(270px, 42vh) auto; }
  .eyebrow { margin-bottom: 20px; }
  h1 { font-size: clamp(3.35rem, 17vw, 5.2rem); }
  .intro { max-width: 280px; font-size: .94rem; }
  .orbit-stage { margin-top: -42px; }
  .hero-actions { flex-direction: column; align-items: flex-start; gap: 12px; }
  .hero-actions p { display: none; }
  .primary-button { min-width: 168px; }
  .section-heading h2 { font-size: clamp(3.2rem, 15vw, 5rem); }
  .secondary-view { padding-bottom: 120px; }
  .game-hud { gap: 22px; }
  .game-hud strong { font-size: 1.45rem; }
  .game-message h2 { font-size: 3.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
