/* ============================================================
   MISSION CONTROL  —  portfolio theme
   Edit the colors below to re-skin the whole site at once.
   ============================================================ */

:root {
  /* --- Colors (change these to re-theme everything) --- */
  --bg:        #0a0e16;   /* deep cockpit navy            */
  --bg-2:      #0d1422;   /* slightly lighter background  */
  --panel:     #111a2b;   /* card / panel surface         */
  --panel-2:   #16223a;   /* hover / raised surface       */
  --line:      #243349;   /* borders & hairlines          */
  --text:      #cdd9e8;   /* main body text               */
  --muted:     #7e90ab;   /* dim / secondary text         */
  --amber:     #ffb347;   /* primary accent (warm)        */
  --amber-2:   #ffd27a;   /* lighter amber                */
  --cyan:      #54d6ee;   /* secondary accent (cool)      */
  --cyan-2:    #9bedff;   /* lighter cyan                 */
  --green:     #6fdb8f;   /* "online" / ok                */
  --red:       #ff6b6b;   /* warning                      */

  /* --- Fonts --- */
  --mono: 'Share Tech Mono', 'Courier New', monospace;
  --display: 'Orbitron', 'Share Tech Mono', monospace;
  --body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  /* --- Layout --- */
  --maxw: 1140px;
  --radius: 10px;
  --glow-amber: 0 0 18px rgba(255, 179, 71, 0.35);
  --glow-cyan:  0 0 18px rgba(84, 214, 238, 0.30);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  font-family: var(--body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: var(--cyan); text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 0.4em; }
section { position: relative; }

/* ---------- Animated background ---------- */
/* A faint grid + a starfield canvas (drawn by js) sit behind everything. */
#stars {
  position: fixed; inset: 0; z-index: -2; display: block;
  background:
    radial-gradient(1200px 700px at 80% -10%, rgba(84,214,238,0.08), transparent 60%),
    radial-gradient(1000px 600px at 0% 110%, rgba(255,179,71,0.07), transparent 55%),
    var(--bg);
}
.grid-overlay {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(rgba(84,214,238,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(84,214,238,0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at 50% 30%, #000 30%, transparent 85%);
}

/* ---------- Utility ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
.mono { font-family: var(--mono); }
.accent { color: var(--amber); }
.cyan { color: var(--cyan); }
.tag {
  display: inline-block; font-family: var(--mono); font-size: 12px;
  letter-spacing: 2px; text-transform: uppercase; color: var(--cyan);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 4px 12px; background: rgba(84,214,238,0.06);
}

/* Section heading with a HUD label */
.section-head { margin-bottom: 34px; }
.section-head .label {
  font-family: var(--mono); color: var(--amber); letter-spacing: 4px;
  font-size: 13px; text-transform: uppercase; display: block; margin-bottom: 8px;
}
.section-head h2 {
  font-family: var(--display); font-size: clamp(26px, 4vw, 40px);
  letter-spacing: 2px; color: #fff; font-weight: 700;
}
.section-head p { color: var(--muted); max-width: 620px; margin: 6px 0 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 14px; letter-spacing: 2px;
  text-transform: uppercase; cursor: pointer;
  padding: 13px 26px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--panel); color: var(--text);
  transition: transform .15s ease, border-color .2s, box-shadow .2s, background .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: linear-gradient(135deg, var(--amber), #ff9a2e);
  color: #1a1206; border-color: transparent; font-weight: bold;
  box-shadow: var(--glow-amber);
}
.btn-primary:hover { box-shadow: 0 0 26px rgba(255,179,71,0.55); }
.btn-ghost { color: var(--cyan); border-color: var(--cyan); background: transparent; }
.btn-ghost:hover { background: rgba(84,214,238,0.08); box-shadow: var(--glow-cyan); }

/* ============================================================
   NAVBAR
   ============================================================ */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(10px);
  background: rgba(10,14,22,0.72);
  border-bottom: 1px solid var(--line);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 12px; font-family: var(--mono); }
.brand .dot {
  width: 10px; height: 10px; border-radius: 50%; background: var(--green);
  box-shadow: 0 0 10px var(--green); animation: pulse 2s infinite;
}
.brand .callsign { font-size: 17px; letter-spacing: 3px; color: #fff; }
.brand .callsign b { color: var(--amber); }
.nav-links { display: flex; align-items: center; gap: 6px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  font-family: var(--mono); font-size: 13px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--muted); padding: 8px 14px; border-radius: 6px; transition: color .2s, background .2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--amber); background: rgba(255,179,71,0.08); }
.nav-toggle {
  display: none; background: none; border: 1px solid var(--line); border-radius: 6px;
  width: 42px; height: 38px; cursor: pointer; flex-direction: column; gap: 5px;
  align-items: center; justify-content: center;
}
.nav-toggle span { width: 20px; height: 2px; background: var(--text); display: block; transition: .25s; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   HERO
   ============================================================ */
.hero { padding: clamp(60px, 12vw, 130px) 0 90px; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 40px; align-items: center; }
.hero-status {
  font-family: var(--mono); font-size: 13px; letter-spacing: 3px; color: var(--green);
  text-transform: uppercase; display: inline-flex; align-items: center; gap: 8px; margin-bottom: 18px;
}
.hero-status::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); }
.hero h1 {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(42px, 8vw, 84px); letter-spacing: 2px; color: #fff; margin: 0;
  text-shadow: 0 0 40px rgba(255,179,71,0.25);
}
.hero h1 .grad {
  background: linear-gradient(120deg, var(--amber), var(--cyan));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero .tagline {
  font-family: var(--mono); font-size: clamp(15px, 2.4vw, 20px); color: var(--cyan-2);
  margin: 14px 0 4px; min-height: 1.6em; letter-spacing: 1px;
}
.hero .tagline .cursor { color: var(--amber); animation: blink 1s steps(1) infinite; }
.hero .lede { color: var(--muted); font-size: 17px; max-width: 520px; margin: 16px 0 28px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }

/* Radar dial on the right of the hero */
.radar {
  position: relative; width: 100%; max-width: 320px; aspect-ratio: 1; margin: 0 auto;
  border-radius: 50%; border: 1px solid var(--line);
  background:
    radial-gradient(circle, rgba(84,214,238,0.06) 0 30%, transparent 31%),
    radial-gradient(circle, transparent 58%, rgba(84,214,238,0.05) 59%),
    var(--panel);
  box-shadow: inset 0 0 60px rgba(0,0,0,0.6), var(--glow-cyan);
}
.radar::before, .radar::after {
  content: ''; position: absolute; background: rgba(84,214,238,0.18);
}
.radar::before { left: 50%; top: 8%; bottom: 8%; width: 1px; transform: translateX(-0.5px); }
.radar::after { top: 50%; left: 8%; right: 8%; height: 1px; transform: translateY(-0.5px); }
.radar .ring { position: absolute; border: 1px solid rgba(84,214,238,0.12); border-radius: 50%; }
.radar .ring.r1 { inset: 16%; } .radar .ring.r2 { inset: 32%; }
.radar .sweep {
  position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(111,219,143,0.45), transparent 45%);
  -webkit-mask: radial-gradient(circle, transparent 0, #000 0);
  animation: sweep 4s linear infinite;
}
.radar .blip {
  position: absolute; width: 9px; height: 9px; border-radius: 50%;
  background: var(--amber); box-shadow: 0 0 10px var(--amber); animation: blip 4s ease-in-out infinite;
}
.radar .blip.b1 { top: 30%; left: 62%; animation-delay: .4s; }
.radar .blip.b2 { top: 64%; left: 38%; animation-delay: 1.7s; }
.radar .blip.b3 { top: 50%; left: 70%; animation-delay: 2.9s; }

/* ---------- Stats strip ---------- */
.stats { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--bg-2); }
.stats .wrap { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; }
.stat { padding: 26px 14px; text-align: center; border-left: 1px solid var(--line); }
.stat:first-child { border-left: none; }
.stat .num { font-family: var(--display); font-size: clamp(24px, 4vw, 36px); color: var(--amber); font-weight: 700; }
.stat .lbl { font-family: var(--mono); font-size: 12px; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); }

/* ============================================================
   GAMES
   ============================================================ */
.games { padding: 84px 0; }
.game-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }

.game-card {
  position: relative; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--panel); overflow: hidden; display: flex; flex-direction: column;
  transition: transform .2s ease, border-color .2s, box-shadow .2s;
}
.game-card:hover { transform: translateY(-5px); border-color: var(--amber); box-shadow: 0 14px 40px rgba(0,0,0,0.5); }

/* Featured card spans 2 columns on wide screens */
.game-card.featured { grid-column: span 2; }
@media (max-width: 720px) { .game-card.featured { grid-column: span 1; } }

.game-thumb {
  position: relative; aspect-ratio: 16 / 9; overflow: hidden;
  background: linear-gradient(160deg, #1b2942, #0c1322);
  display: flex; align-items: center; justify-content: center;
}
.game-card.featured .game-thumb { aspect-ratio: 16 / 7; }
/* Decorative thumb art for B17 (no image file needed) */
.thumb-b17 {
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 70% 30%, rgba(255,179,71,0.25), transparent 45%),
    linear-gradient(180deg, #2a4a6e 0%, #16263d 55%, #0c1626 100%);
}
.thumb-b17 .horizon { position: absolute; left: 0; right: 0; top: 55%; height: 1px; background: rgba(155,237,255,0.4); box-shadow: 0 0 20px rgba(155,237,255,0.3); }
.thumb-b17 .sun { position: absolute; top: 22%; right: 18%; width: 60px; height: 60px; border-radius: 50%; background: radial-gradient(circle, #ffe9a8, #ffb347 60%, transparent 72%); filter: blur(1px); }
.thumb-b17 .plane { position: absolute; top: 40%; left: 50%; transform: translate(-50%,-50%); font-family: var(--mono); font-size: 40px; color: #d7e6f5; text-shadow: 0 2px 8px #000; letter-spacing: -4px; }

/* Apollo 13 thumbnail — Earth crescent over space + tiny capsule */
.thumb-apollo {
  position: absolute; inset: 0; overflow: hidden;
  background:
    radial-gradient(1px 1px at 12% 22%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 28% 75%, #cfd9ea 50%, transparent 51%),
    radial-gradient(1px 1px at 45% 18%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 62% 60%, #e8efff 50%, transparent 51%),
    radial-gradient(1px 1px at 80% 30%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 88% 78%, #cfd9ea 50%, transparent 51%),
    radial-gradient(2px 2px at 18% 52%, #fff 50%, transparent 51%),
    radial-gradient(2px 2px at 72% 14%, #fff 50%, transparent 51%),
    radial-gradient(circle at 50% 50%, #0a1a30 0%, #02060f 70%);
}
.thumb-apollo .earth {
  position: absolute; left: -18%; bottom: -55%;
  width: 130%; aspect-ratio: 1; border-radius: 50%;
  background:
    radial-gradient(circle at 70% 35%, #6fa9ff 0%, #2e6fc8 28%, #0e2a55 55%, #061224 80%),
    #061224;
  box-shadow: inset -40px -10px 80px rgba(0,0,0,0.85),
              inset 30px 20px 60px rgba(150, 200, 255, 0.15);
}
.thumb-apollo .terminator {
  position: absolute; left: -18%; bottom: -55%;
  width: 130%; aspect-ratio: 1; border-radius: 50%;
  background: linear-gradient(95deg, rgba(0,0,0,0.9) 35%, transparent 55%);
  mix-blend-mode: multiply;
}
.thumb-apollo .capsule {
  position: absolute; top: 24%; right: 22%;
  font-size: 28px; color: #e8d8a0; text-shadow: 0 0 8px #ffb347, 0 2px 6px #000;
}
.thumb-apollo .capsule::after {
  content: ''; position: absolute; top: 50%; left: 100%; width: 60px; height: 1px;
  background: linear-gradient(to right, rgba(255,179,71,0.6), transparent);
  transform: translateY(-50%);
}

/* Atlantis (shuttle) thumbnail — launch tower, exhaust plume, shuttle rising */
.thumb-shuttle {
  position: absolute; inset: 0; overflow: hidden;
  background:
    radial-gradient(1px 1px at 18% 18%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 38% 8%,  #cfd9ea 50%, transparent 51%),
    radial-gradient(1px 1px at 68% 22%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 84% 12%, #e8efff 50%, transparent 51%),
    radial-gradient(2px 2px at 26% 32%, #fff 50%, transparent 51%),
    linear-gradient(180deg, #04102a 0%, #082555 55%, #1a4a8a 88%, #2a6cb0 100%);
}
/* horizon glow */
.thumb-shuttle::before {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 35%;
  background: radial-gradient(ellipse at 50% 100%, rgba(120,180,255,0.5), transparent 70%);
  pointer-events: none;
}
/* launch tower (left side) */
.thumb-shuttle .tower {
  position: absolute; left: 18%; bottom: 0; width: 14px; height: 60%;
  background: linear-gradient(180deg, #5a6878 0%, #2a3340 100%);
  box-shadow: 6px 0 0 -2px #3a4658, -2px 0 8px rgba(0,0,0,0.6);
}
.thumb-shuttle .tower::before, .thumb-shuttle .tower::after {
  content: ''; position: absolute; left: -8px; width: 30px; height: 2px; background: #4a5868;
}
.thumb-shuttle .tower::before { top: 22%; }
.thumb-shuttle .tower::after { top: 55%; }
/* exhaust plume column */
.thumb-shuttle .plume {
  position: absolute; left: 50%; bottom: -4%; transform: translateX(-50%);
  width: 28px; height: 70%;
  background: linear-gradient(180deg,
    rgba(255,235,180,0) 0%,
    rgba(255,220,140,0.85) 25%,
    rgba(255,140,40,0.95) 55%,
    rgba(255,80,20,0.9) 80%,
    rgba(255,200,80,0.8) 100%);
  filter: blur(2px);
  border-radius: 50% 50% 14px 14px / 30% 30% 14px 14px;
}
.thumb-shuttle .plume::after {
  content: ''; position: absolute; left: 50%; bottom: -10%; transform: translateX(-50%);
  width: 90px; height: 40px; border-radius: 50%;
  background: radial-gradient(ellipse, rgba(255,180,80,0.55), transparent 70%);
  filter: blur(4px);
}
/* shuttle silhouette at top of plume */
.thumb-shuttle .shuttle {
  position: absolute; left: 50%; transform: translateX(-50%);
  top: 18%; font-size: 30px; color: #e8eef8;
  text-shadow: 0 0 14px rgba(255,255,255,0.6), 0 2px 6px #000;
  letter-spacing: -2px; line-height: 1;
}
.thumb-placeholder {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background:
    repeating-linear-gradient(45deg, rgba(255,255,255,0.02) 0 12px, transparent 12px 24px),
    linear-gradient(160deg, #182338, #0c1322);
  font-family: var(--mono); color: var(--muted); letter-spacing: 3px;
}
.game-status {
  position: absolute; top: 12px; left: 12px; font-family: var(--mono); font-size: 11px;
  letter-spacing: 2px; text-transform: uppercase; padding: 4px 10px; border-radius: 5px;
  background: rgba(0,0,0,0.55); border: 1px solid var(--line);
}
.game-status.live { color: var(--green); border-color: rgba(111,219,143,0.5); }
.game-status.soon { color: var(--amber); border-color: rgba(255,179,71,0.5); }

.game-body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.game-body h3 { font-family: var(--display); font-size: 21px; color: #fff; letter-spacing: 1px; }
.game-body .meta { font-family: var(--mono); font-size: 12px; color: var(--cyan); letter-spacing: 1px; }
.game-body p { color: var(--muted); margin: 0; font-size: 15px; }
.game-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 2px; }
.game-tags span { font-family: var(--mono); font-size: 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 5px; padding: 3px 9px; }
.game-actions { margin-top: auto; padding-top: 12px; display: flex; gap: 10px; }

/* ============================================================
   ABOUT
   ============================================================ */
.about { padding: 84px 0; background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.about .wrap { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 46px; align-items: center; }
.about-card {
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel);
  padding: 26px; position: relative;
}
.about-card .avatar {
  width: 100%; aspect-ratio: 1; border-radius: var(--radius); margin-bottom: 18px;
  background:
    radial-gradient(circle at 50% 38%, rgba(255,179,71,0.25), transparent 55%),
    linear-gradient(160deg, #1c2c46, #0e1626);
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--display); font-size: 60px; color: var(--amber); font-weight: 800;
}
.about-card .id-line { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 12px; color: var(--muted); padding: 6px 0; border-top: 1px dashed var(--line); }
.about-card .id-line b { color: var(--text); }
.about-text h2 { font-family: var(--display); font-size: clamp(26px, 4vw, 38px); color: #fff; letter-spacing: 1px; }
.about-text p { color: var(--text); font-size: 16px; }
.about-text p + p { color: var(--muted); }

.skills { margin-top: 22px; }
.skills h4 { font-family: var(--mono); color: var(--amber); letter-spacing: 3px; font-size: 13px; text-transform: uppercase; margin: 0 0 12px; }
.skill-tags { display: flex; flex-wrap: wrap; gap: 9px; }
.skill-tags span {
  font-family: var(--mono); font-size: 13px; color: var(--cyan); letter-spacing: 1px;
  border: 1px solid var(--line); border-radius: 6px; padding: 6px 13px; background: rgba(84,214,238,0.05);
  transition: border-color .2s, color .2s;
}
.skill-tags span:hover { border-color: var(--cyan); color: var(--cyan-2); }

/* ============================================================
   CONTACT
   ============================================================ */
.contact { padding: 84px 0 90px; text-align: center; }
.contact .section-head { display: inline-block; }
.contact-grid { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; margin-top: 14px; }
.contact-card {
  display: flex; align-items: center; gap: 14px; text-align: left;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel);
  padding: 18px 22px; min-width: 240px; transition: transform .2s, border-color .2s, box-shadow .2s;
}
.contact-card:hover { transform: translateY(-3px); border-color: var(--cyan); box-shadow: var(--glow-cyan); }
.contact-card .ic { font-size: 22px; }
.contact-card .k { font-family: var(--mono); font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); }
.contact-card .v { color: var(--text); font-size: 15px; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer { border-top: 1px solid var(--line); background: var(--bg-2); padding: 30px 0; }
.footer .wrap { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.footer .mono { color: var(--muted); font-size: 13px; letter-spacing: 1px; }
.footer a { color: var(--muted); }
.footer a:hover { color: var(--amber); }

/* ============================================================
   SCROLL REVEAL  (js toggles .in)
   ============================================================ */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }
@keyframes blink { 0%,49% { opacity: 1; } 50%,100% { opacity: 0; } }
@keyframes sweep { to { transform: rotate(360deg); } }
@keyframes blip { 0%,100% { opacity: 0; transform: scale(0.6); } 10%,30% { opacity: 1; transform: scale(1); } 60% { opacity: 0; } }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .radar { display: none; }
  .about .wrap { grid-template-columns: 1fr; }
  .stats .wrap { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: none; }

  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; align-items: stretch;
    background: rgba(10,14,22,0.97); border-bottom: 1px solid var(--line);
    padding: 10px 16px; gap: 4px; max-height: 0; overflow: hidden; transition: max-height .3s ease, padding .3s;
  }
  .nav-links.open { max-height: 360px; padding: 12px 16px; }
  .nav-links a { padding: 12px 10px; }
}
@media (max-width: 480px) {
  .stats .wrap { grid-template-columns: 1fr 1fr; }
  .hero-cta .btn { flex: 1; justify-content: center; }
}

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
