/* =========================================================================
   Avik's Space Station — avik.dxinsightshub.com
   One stylesheet for the whole subdomain. Space theme: deep-void gradient,
   canvas starfield behind everything, aurora nebulas, glass cards.
   ========================================================================= */

:root {
  --void-1: #05060E;
  --void-2: #0B1024;
  --ink: #EAF0FF;
  --ink-dim: #93A0BE;
  --cyan: #5EE8FF;
  --violet: #8B6CFF;
  --pink: #FF6CB5;
  --amber: #FFC14D;
  --card-bg: rgba(18, 24, 48, 0.55);
  --card-line: rgba(140, 170, 255, 0.16);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: linear-gradient(180deg, var(--void-1) 0%, var(--void-2) 60%, #0A0A18 100%);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Starfield canvas + nebulas sit behind all content */
#stars { position: fixed; inset: 0; z-index: 0; }
.nebula {
  position: fixed; z-index: 0; border-radius: 50%;
  filter: blur(90px); opacity: 0.5; pointer-events: none;
}
.nebula-1 {
  width: 55vw; height: 55vw; top: -20vw; right: -18vw;
  background: radial-gradient(circle, rgba(139,108,255,0.35), transparent 65%);
}
.nebula-2 {
  width: 45vw; height: 45vw; bottom: -15vw; left: -12vw;
  background: radial-gradient(circle, rgba(94,232,255,0.22), transparent 65%);
}

header, main, footer { position: relative; z-index: 1; }

/* ------------------------------------------------------------- top bar */

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px clamp(18px, 5vw, 64px);
}
.logo {
  font-weight: 800; letter-spacing: 0.18em; font-size: 18px;
  color: var(--ink); text-decoration: none;
}
.logo span { color: var(--cyan); }
.topbar nav { display: flex; gap: 26px; }
.topbar nav a {
  color: var(--ink-dim); text-decoration: none; font-size: 14px;
  letter-spacing: 0.08em; text-transform: uppercase;
  transition: color 0.2s;
}
.topbar nav a:hover { color: var(--cyan); }

/* --------------------------------------------------------------- hero */

.hero {
  display: grid; grid-template-columns: 1.15fr 0.85fr; align-items: center;
  gap: 30px;
  padding: clamp(30px, 7vh, 90px) clamp(18px, 5vw, 64px);
  max-width: 1200px; margin: 0 auto;
}
.hero-kicker {
  font-size: 12px; letter-spacing: 0.34em; color: var(--amber);
  margin-bottom: 14px;
}
.hero h1 {
  font-size: clamp(40px, 7.5vw, 82px);
  line-height: 1.02; font-weight: 800; letter-spacing: -0.01em;
}
.grad {
  background: linear-gradient(92deg, var(--cyan) 0%, var(--violet) 55%, var(--pink) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub {
  margin: 18px 0 28px; max-width: 46ch;
  color: var(--ink-dim); font-size: clamp(15px, 1.8vw, 18px); line-height: 1.6;
}
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }

.btn-glow, .btn-line {
  display: inline-block; text-decoration: none; font-weight: 600;
  font-size: 15px; padding: 13px 22px; border-radius: 999px;
  transition: transform 0.2s, box-shadow 0.2s;
}
.btn-glow {
  color: #041018;
  background: linear-gradient(92deg, var(--cyan), var(--violet));
  box-shadow: 0 0 24px rgba(94, 232, 255, 0.35);
}
.btn-glow:hover { transform: translateY(-2px); box-shadow: 0 0 36px rgba(94, 232, 255, 0.55); }
.btn-line {
  color: var(--ink); border: 1px solid var(--card-line);
  background: rgba(255, 255, 255, 0.03);
}
.btn-line:hover { transform: translateY(-2px); border-color: var(--cyan); }

/* hero art: CSS planet + drifting rocket */
.hero-art { position: relative; height: clamp(220px, 32vw, 380px); }
.planet {
  position: absolute; top: 50%; left: 50%;
  width: clamp(150px, 22vw, 250px); height: clamp(150px, 22vw, 250px);
  transform: translate(-50%, -50%);
}
.planet-body {
  position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #B7A0FF 0%, #6B4CE0 42%, #241A55 100%);
  box-shadow: 0 0 60px rgba(139, 108, 255, 0.45), inset -18px -14px 40px rgba(0,0,0,0.5);
}
.planet-ring {
  position: absolute; top: 50%; left: 50%;
  width: 165%; height: 42%;
  transform: translate(-50%, -50%) rotate(-16deg);
  border-radius: 50%;
  border: 3px solid rgba(94, 232, 255, 0.55);
  border-top-color: rgba(94, 232, 255, 0.12);
  box-shadow: 0 0 24px rgba(94, 232, 255, 0.25);
}
.moon {
  position: absolute; width: 26px; height: 26px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #FFE9C2, #C99B4E 70%);
  top: -6%; right: 4%;
  animation: moon-orbit 14s linear infinite;
  transform-origin: -180% 380%;
}
@keyframes moon-orbit { to { transform: rotate(360deg); } }
.rocket {
  position: absolute; font-size: clamp(30px, 4vw, 46px);
  bottom: 4%; left: 6%;
  animation: rocket-drift 7s ease-in-out infinite;
}
@keyframes rocket-drift {
  0%, 100% { transform: translate(0, 0) rotate(-8deg); }
  50%      { transform: translate(14px, -22px) rotate(6deg); }
}

/* ------------------------------------------------------------- sections */

.section {
  max-width: 1200px; margin: 0 auto;
  padding: clamp(30px, 6vh, 70px) clamp(18px, 5vw, 64px);
}
.section h2 {
  font-size: clamp(26px, 4vw, 40px); font-weight: 800; letter-spacing: -0.01em;
}
.sec-num {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.55em; vertical-align: 0.5em; margin-right: 10px;
  color: var(--cyan); letter-spacing: 0.2em;
}
.sec-sub { color: var(--ink-dim); margin: 8px 0 28px; }

.grid {
  display: grid; gap: 22px;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
}

/* --------------------------------------------------------------- cards */

.card {
  display: flex; flex-direction: column;
  background: var(--card-bg);
  border: 1px solid var(--card-line);
  border-radius: 18px;
  overflow: hidden;
  text-decoration: none; color: inherit;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}
a.card:hover {
  transform: translateY(-6px);
  border-color: rgba(94, 232, 255, 0.5);
  box-shadow: 0 14px 44px rgba(94, 232, 255, 0.14);
}
.card-feature { grid-row: span 1; }

.card-scene {
  position: relative; height: 150px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}

/* Bounce Arena mini-scene: two paddles + rallying ball */
.scene-pong { background: linear-gradient(135deg, #0A0A18, #14102E); }
.pong-paddle {
  position: absolute; width: 8px; height: 46px; border-radius: 4px;
}
.pp-left  { left: 14%; background: #00F0FF; box-shadow: 0 0 14px #00F0FF; animation: pp-l 2.4s ease-in-out infinite; }
.pp-right { right: 14%; background: #FF2E88; box-shadow: 0 0 14px #FF2E88; animation: pp-r 2.4s ease-in-out infinite; }
.pong-ball {
  position: absolute; width: 12px; height: 12px; border-radius: 50%;
  background: #FFB800; box-shadow: 0 0 16px #FFB800;
  animation: pb 2.4s linear infinite;
}
@keyframes pp-l { 0%,100% { transform: translateY(-18px); } 50% { transform: translateY(20px); } }
@keyframes pp-r { 0%,100% { transform: translateY(16px); }  50% { transform: translateY(-20px); } }
@keyframes pb {
  0%   { transform: translate(-90px, -16px); }
  25%  { transform: translate(0px, 14px); }
  50%  { transform: translate(90px, 18px); }
  75%  { transform: translate(0px, -12px); }
  100% { transform: translate(-90px, -16px); }
}

/* empty slot */
.scene-slot { background: rgba(255, 255, 255, 0.02); }
.scene-slot span {
  font-size: 40px; color: var(--ink-dim); opacity: 0.7;
  border: 2px dashed var(--card-line); border-radius: 16px;
  width: 76px; height: 76px; display: flex; align-items: center; justify-content: center;
}
.card-slot { border-style: dashed; }

.card-body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-body h3 { font-size: 20px; }
.card-body p { color: var(--ink-dim); font-size: 14px; line-height: 1.55; flex: 1; }

.tag {
  align-self: flex-start;
  font-size: 10px; letter-spacing: 0.22em; font-weight: 700;
  padding: 4px 10px; border-radius: 999px;
  color: var(--cyan); border: 1px solid rgba(94, 232, 255, 0.4);
}
.tag-new { color: #041018; background: var(--amber); border-color: var(--amber); }
.tag-dim { color: var(--ink-dim); border-color: var(--card-line); }

.card-go { color: var(--cyan); font-size: 14px; font-weight: 600; margin-top: 6px; }

/* -------------------------------------------------------- lab page bits */

.lab-note {
  max-width: 640px; margin: 0 auto 26px;
  background: var(--card-bg); border: 1px solid var(--card-line);
  border-radius: 18px; padding: 26px 28px;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.lab-note h3 { margin-bottom: 8px; }
.lab-note p { color: var(--ink-dim); font-size: 14px; line-height: 1.6; }
.back-link { color: var(--cyan); text-decoration: none; font-size: 14px; }
.back-link:hover { text-decoration: underline; }

/* --------------------------------------------------------------- footer */

.foot {
  text-align: center; padding: 40px 18px 30px;
  color: var(--ink-dim); font-size: 14px;
}
.foot b { color: var(--ink); }

/* ------------------------------------------------------------ responsive */

@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; text-align: center; }
  .hero-sub { margin-inline: auto; }
  .hero-cta { justify-content: center; }
  .hero-art { order: -1; height: 200px; }
  .topbar nav { gap: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .moon, .rocket, .pong-paddle, .pong-ball { animation: none; }
  .card, .btn-glow, .btn-line { transition: none; }
}
