:root {
  --green: #66ffad;
  --green-soft: rgba(102, 255, 173, 0.18);
  --amber: #ffb02f;
  --red: #ff4d4d;
  --text: #edf5ef;
  --muted: #9bb1ae;
  --dark: #07090a;
  --panel-dark: #0d1011;
  --panel-light: #242b2e;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  min-height: 100%;
  margin: 0;
  background: var(--dark);
  color: var(--text);
  font-family: "Segoe UI", Arial, sans-serif;
}

body {
  overflow-x: hidden;
}

a,
button,
input,
textarea {
  font: inherit;
}

a {
  color: inherit;
}

button {
  border: 0;
}

/* =========================================================
   MAIN COCKPIT PAGE
   ========================================================= */

.cockpit-shell {
  --look-x: 0px;
  --look-y: 0px;
  min-height: 100svh;
  background: #030506;
}

.flight-deck {
  position: relative;
}

/* =========================================================
   COCKPIT BACKGROUND
   ========================================================= */

.cockpit-reveal {
  position: relative;
  display: grid;
  min-height: 100svh;
  padding: clamp(105px, 15vh, 165px) clamp(12px, 3vw, 34px)
    clamp(30px, 5vh, 64px);
  overflow: hidden;
  background:
    linear-gradient(
      180deg,
      rgba(4, 10, 12, 0.28) 0%,
      rgba(4, 10, 12, 0.08) 34%,
      rgba(4, 10, 12, 0.62) 100%
    ),
    radial-gradient(
      circle at 50% 52%,
      transparent 0 28%,
      rgba(2, 6, 7, 0.48) 84%
    ),
    url("assets/cockpit-integrated-bg.png") center / cover no-repeat;
  isolation: isolate;
  place-items: center;
}

.cockpit-reveal::before {
  position: absolute;
  inset: 0;
  z-index: 0;
  content: "";
  background:
    linear-gradient(
      180deg,
      rgba(0, 0, 0, 0.12),
      transparent 36%,
      rgba(0, 0, 0, 0.28)
    );
  pointer-events: none;
}

/* =========================================================
   WINDOW-ONLY EFFECTS
   Supports either:
   .window-effects > .effect-layer
   OR the older direct .effect-layer layout.
   ========================================================= */

.window-effects,
.cockpit-reveal > .effect-layer {
  --window-effect-width: clamp(320px, 66vw, 1040px);
  --window-effect-height: min(42vh, 380px);
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 1;
  width: var(--window-effect-width);
  height: var(--window-effect-height);
  overflow: hidden;
  pointer-events: none;
  transform: translateX(-50%);
  clip-path: polygon(
    9% 0%,
    91% 0%,
    97% 31%,
    94% 53%,
    84% 70%,
    68% 78%,
    32% 78%,
    16% 70%,
    6% 53%,
    3% 31%
  );
}

.window-effects .effect-layer {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
}

.effect-layer span {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* =========================================================
   AIRCRAFT / EFFECT OBJECTS
   ========================================================= */

.jet {
  width: 68px;
  height: 18px;
  background: linear-gradient(
    90deg,
    rgba(8, 12, 14, 0.3),
    rgba(233, 242, 238, 0.96),
    rgba(15, 20, 22, 0.45)
  );
  clip-path: polygon(0 48%, 37% 18%, 100% 48%, 39% 76%);
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.45));
}

.jet::after {
  position: absolute;
  top: -10px;
  left: 14px;
  width: 24px;
  height: 38px;
  background: rgba(218, 230, 226, 0.76);
  clip-path: polygon(0 0, 100% 50%, 0 100%);
  content: "";
}

/* Afterburner flame */

.jet::before {
  position: absolute;
  top: 4px;
  right: -42px;
  width: 44px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(
    90deg,
    rgba(255, 77, 77, 0),
    rgba(255, 77, 77, 0.58),
    rgba(255, 176, 47, 0.96),
    rgba(255, 255, 255, 0.98)
  );
  content: "";
  filter: blur(2px);
  opacity: 0;
}

.jet-one {
  top: 34%;
  left: -14%;
}

.jet-two {
  top: 31%;
  right: -16%;
  transform: scaleX(-1);
}

.contrail {
  width: 34vw;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.88),
    transparent
  );
  filter: blur(0.3px);
}

.trail-one {
  top: 42%;
  left: -38%;
  transform: rotate(-12deg);
}

.trail-two {
  top: 39%;
  right: -38%;
  transform: rotate(14deg);
}

.burst {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background:
    radial-gradient(
      circle,
      #ffffff 0 12%,
      #ffd46b 13% 28%,
      rgba(255, 77, 77, 0.92) 29% 40%,
      transparent 42%
    ),
    conic-gradient(
      from 0deg,
      transparent 0 8%,
      rgba(255, 255, 255, 0.9) 9% 11%,
      transparent 12% 20%,
      rgba(255, 176, 47, 0.9) 21% 23%,
      transparent 24% 100%
    );
  box-shadow: 0 0 28px rgba(255, 176, 47, 0.85);
}

.burst-one {
  top: 34%;
  left: 29%;
}

.burst-two {
  top: 45%;
  left: 63%;
}

.burst-three {
  top: 27%;
  left: 48%;
}

.moon {
  top: 16%;
  right: 13%;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: radial-gradient(
    circle at 35% 35%,
    #ffffff,
    #d8dee5 54%,
    #9ba8b6 100%
  );
  box-shadow: 0 0 32px rgba(215, 230, 255, 0.72);
}

.stars {
  inset: 0;
  background-image:
    radial-gradient(
      circle,
      rgba(255, 255, 255, 0.92) 0 1px,
      transparent 1.5px
    ),
    radial-gradient(
      circle,
      rgba(180, 218, 255, 0.8) 0 1px,
      transparent 1.5px
    );
  background-position: 14vw 12vh, 8vw 18vh;
  background-size: 120px 92px, 170px 130px;
}

/* =========================================================
   EFFECT BUTTON ANIMATIONS
   ========================================================= */

.effect-dogfight .jet-one {
  animation: jetSlashOne 3.6s ease-in-out both;
}

.effect-dogfight .jet-two {
  animation: jetSlashTwo 3.6s 0.18s ease-in-out both;
}

.effect-dogfight .trail-one {
  animation: trailSlashOne 3.6s ease-out both;
}

.effect-dogfight .trail-two {
  animation: trailSlashTwo 3.6s 0.18s ease-out both;
}

.effect-fireworks .burst-one {
  animation: burstPop 1.8s ease-out both;
}

.effect-fireworks .burst-two {
  animation: burstPop 1.8s 0.32s ease-out both;
}

.effect-fireworks .burst-three {
  animation: burstPop 1.8s 0.62s ease-out both;
}

/* Afterburner aircraft stay high in the windshield. */

.effect-afterburner .jet-one {
  animation: afterburnerPass 3.1s ease-in both;
}

.effect-afterburner .jet-one::before {
  animation: afterburnerFlame 3.1s ease-in both;
}

.effect-afterburner .trail-one {
  animation: afterburnerTrail 3.1s ease-in both;
}

.effect-afterburner .jet-two {
  animation: afterburnerPassTwo 3.1s 0.5s ease-in both;
}

.effect-afterburner .jet-two::before {
  animation: afterburnerFlame 3.1s 0.5s ease-in both;
}

.effect-afterburner .trail-two {
  animation: afterburnerTrailTwo 3.1s 0.5s ease-in both;
}

.effect-flyby .jet-one {
  animation: flyby 2.2s ease-in both;
}

.effect-flyby .trail-one {
  animation: flybyTrail 2.2s ease-in both;
}

/* =========================================================
   COCKPIT CONSOLE
   ========================================================= */

.cockpit {
  position: relative;
  z-index: 2;
  width: min(860px, 66vw);
  margin: 0 auto;
  padding: clamp(8px, 1.1vw, 14px);
  border-radius: 18px 18px 0 0;
  background:
    linear-gradient(
      180deg,
      rgba(70, 80, 82, 0.72),
      rgba(12, 15, 16, 0.96) 19%
    ),
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.03) 0 1px,
      transparent 1px 84px
    );
  box-shadow:
    0 -12px 42px rgba(0, 0, 0, 0.62),
    inset 0 2px 0 rgba(255, 255, 255, 0.12);
  transform: translateY(clamp(170px, 20vh, 210px));
}

.glareshield {
  display: grid;
  height: 34px;
  margin: -7px auto 10px;
  border-radius: 14px 14px 5px 5px;
  background: linear-gradient(180deg, #333a3b, #0c0f10);
  box-shadow: inset 0 -10px 18px rgba(0, 0, 0, 0.6);
  place-items: center;
}

.status-strip {
  display: flex;
  gap: 8px;
  color: #c7d1cc;
  font: 700 0.75rem "Consolas", monospace;
  align-items: center;
}

.lamp {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  box-shadow: 0 0 12px currentColor;
}

.lamp.red {
  color: var(--red);
  background: var(--red);
}

.lamp.green {
  color: var(--green);
  background: var(--green);
}

.lamp.amber {
  color: var(--amber);
  background: var(--amber);
}

.console-grid {
  display: grid;
  grid-template-columns:
    minmax(86px, 0.7fr)
    minmax(150px, 1.2fr)
    minmax(112px, 0.78fr)
    minmax(150px, 1.2fr)
    minmax(86px, 0.7fr);
  gap: clamp(6px, 0.8vw, 10px);
  align-items: stretch;
}

.side-panel,
.center-stack,
.mfd {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(145deg, #242b2e, #0d1011);
  box-shadow:
    inset 0 0 22px rgba(0, 0, 0, 0.55),
    0 12px 24px rgba(0, 0, 0, 0.36);
}

.side-panel {
  display: grid;
  gap: 6px;
  padding: 8px;
  border-radius: 7px;
}

.hard-button {
  display: grid;
  min-height: 40px;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 5px;
  background: linear-gradient(180deg, #30393c, #14191b);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 5px 0 #050707;
  color: #dfe7e4;
  font-size: 0.72rem;
  text-decoration: none;
  align-content: center;
}
.hard-button span {
  color: var(--amber);
  font: 800 0.64rem "Consolas", monospace;
}

.hard-button:hover,
.hard-button:focus-visible {
  border-color: var(--amber);
  outline: none;
  color: #ffffff;
  transform: translateY(2px);
}

/* =========================================================
   STATIC NAME DISPLAY
   ========================================================= */

.ufc {
  display: flex;
  flex-direction: column;
  min-height: 56px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 5px;
  background: linear-gradient(180deg, #9cffc3, #45ad75);
  box-shadow:
    inset 0 0 16px rgba(255, 255, 255, 0.4),
    0 0 22px rgba(102, 255, 173, 0.18);
  color: #101410;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.ufc-code {
  display: block;
  width: 100%;
  margin: 0;
  font: 900 1.25rem "Consolas", monospace;
  line-height: 1;
  text-align: center;
}

.ufc-label {
  display: block;
  width: 100%;
  margin: 0;
  font: 800 0.52rem "Consolas", monospace;
  line-height: 1.05;
  text-align: center;
}

.center-stack {
  display: grid;
  gap: 7px;
  padding: 7px;
  border-radius: 7px;
}

.throttle-bank {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.throttle-bank span {
  height: 58px;
  border-radius: 12px 12px 4px 4px;
  background: linear-gradient(90deg, #161b1d, #586166 48%, #171b1c);
  box-shadow:
    inset 0 12px 16px rgba(255, 255, 255, 0.08),
    inset 0 -12px 20px rgba(0, 0, 0, 0.65);
}
.switch-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
}

.switch-row a,
.switch-row button {
  display: grid;
  width: 100%;
  min-width: 0;
  min-height: 38px;
  padding: 4px 2px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 4px;
  background: #0e1112;
  color: var(--amber);
  cursor: pointer;
  font: 900 0.56rem "Consolas", monospace;
  line-height: 0.9;
  text-decoration: none;
  place-items: center;
}

.switch-row button[data-effect] {
  writing-mode: vertical-rl;
  text-orientation: upright;
}

/* =========================================================
   RIGHT-SIDE SWITCHES
   ========================================================= */

.jet-switch {
  position: relative;
  display: grid;
  min-height: 44px;
  padding: 7px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 5px;
  background:
    linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.05) 1px,
      transparent 1px
    )
    0 0 / 12px 100%,
    linear-gradient(180deg, #242b2c, #101314);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 -12px 18px rgba(0, 0, 0, 0.22),
    0 5px 0 #050707;
  color: rgba(223, 231, 228, 0.78);
  align-content: center;
}

.jet-switch span {
  font: 800 0.6rem "Consolas", monospace;
}

.jet-switch i {
  position: absolute;
  top: 50%;
  right: 8px;
  width: 24px;
  height: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: #080a0b;
  transform: translateY(-50%);
}

.jet-switch i::after {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 10px rgba(255, 195, 77, 0.58);
  content: "";
}

.jet-switch.is-armed i::after {
  left: 15px;
  background: var(--red);
  box-shadow: 0 0 10px rgba(255, 77, 77, 0.7);
}

/* =========================================================
   MFD SCREENS
   ========================================================= */

.mfd {
  position: relative;
  display: block;
  min-height: 160px;
  padding: 10px;
  border-radius: 7px;
  color: var(--green);
  cursor: pointer;
  text-align: left;
}


.mfd::before {
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(102, 255, 173, 0.42);
  border-radius: 5px;
  background:
    linear-gradient(
      rgba(102, 255, 173, 0.08) 50%,
      rgba(102, 255, 173, 0.02) 50%
    )
    0 0 / 100% 6px,
    radial-gradient(
      circle at center,
      rgba(102, 255, 173, 0.12),
      rgba(3, 12, 9, 0.96) 60%
    );
  box-shadow:
    inset 0 0 30px rgba(102, 255, 173, 0.18),
    0 0 16px rgba(102, 255, 173, 0.1);
  content: "";
}

.mfd > * {
  position: relative;
  z-index: 1;
}

.screen-title,
.screen-caption {
  position: absolute;
  right: 0;
  left: 0;
  display: block;
  font: 800 0.64rem "Consolas", monospace;
  text-align: center;
}

.screen-title {
  top: 18px;
}

.screen-caption {
  bottom: 12px;
}

.radar {
  position: absolute;
  inset: 44px 30px 36px;
  overflow: hidden;
  border: 1px solid rgba(102, 255, 173, 0.75);
  border-radius: 50%;
}

.radar::before,
.radar::after {
  position: absolute;
  inset: 20%;
  border: 1px solid rgba(102, 255, 173, 0.32);
  border-radius: 50%;
  content: "";
}

.radar::after {
  inset: 39%;
}

.sweep {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 50%;
  height: 2px;
  background: linear-gradient(
    90deg,
    rgba(102, 255, 173, 0.9),
    transparent
  );
  transform-origin: left center;
  animation: sweep 2.8s linear infinite;
}

.blip {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 12px var(--green);
}

.b1 {
  top: 31%;
  left: 62%;
}

.b2 {
  top: 57%;
  left: 34%;
}

.b3 {
  top: 72%;
  left: 47%;
}

.telemetry {
  position: absolute;
  top: 54px;
  right: 28px;
  left: 28px;
  display: grid;
  gap: 7px;
  font: 700 0.64rem "Consolas", monospace;
  text-align: left;
}

.telemetry i {
  height: 10px;
  border: 1px solid rgba(102, 255, 173, 0.5);
  background: linear-gradient(
    90deg,
    rgba(102, 255, 173, 0.7) var(--w),
    transparent var(--w)
  );
}

/* =========================================================
   LOWER COCKPIT PANEL
   ========================================================= */

.lower-console {
  display: grid;
  grid-template-columns: 56px 1fr 56px;
  gap: 10px;
  align-items: center;
  margin-top: 8px;
}

.analog {
  position: relative;
  display: grid;
  aspect-ratio: 1;
  border: 5px solid #252c2f;
  border-radius: 50%;
  background: radial-gradient(circle, #182020, #030505 72%);
  color: var(--green);
  font: 800 0.66rem "Consolas", monospace;
  place-items: center;
}

.needle {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 38%;
  height: 2px;
  background: var(--red);
  transform: rotate(-35deg);
  transform-origin: left center;
}

.analog.alt .needle {
  transform: rotate(28deg);
}

.nameplate {
  min-height: 48px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  background: linear-gradient(180deg, #1d2426, #0b0d0e);
  text-align: center;
}

.nameplate p,
.nameplate strong {
  display: block;
  margin: 0;
  font-family: "Consolas", monospace;
}

.nameplate p {
  color: var(--amber);
  font-size: 0.7rem;
  font-weight: 900;
}

.nameplate strong {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.64rem;
}

/* =========================================================
   MINI GAMES
   ========================================================= */

.game-overlay {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  padding: clamp(14px, 4vw, 40px);
  background: rgba(1, 5, 7, 0.82);
  backdrop-filter: blur(10px);
  place-items: center;
}

.game-overlay[aria-hidden="true"] {
  display: none;
}

.game-panel {
  width: min(760px, 96vw);
  overflow: hidden;
  border: 1px solid rgba(102, 255, 173, 0.36);
  border-radius: 8px;
  background:
    linear-gradient(
      180deg,
      rgba(19, 33, 35, 0.96),
      rgba(4, 8, 9, 0.98)
    ),
    repeating-linear-gradient(
      90deg,
      rgba(102, 255, 173, 0.035) 0 1px,
      transparent 1px 42px
    );
  box-shadow:
    0 28px 70px rgba(0, 0, 0, 0.62),
    inset 0 0 34px rgba(102, 255, 173, 0.12);
}

.game-header,
.game-stats,
.game-controls {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.game-header {
  padding: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.game-kicker {
  margin: 0 0 4px;
  color: var(--amber);
  font: 900 0.72rem "Consolas", monospace;
}

.game-header h2 {
  margin: 0;
  color: var(--green);
  font: 900 clamp(1.3rem, 4vw, 2rem) "Consolas", monospace;
}

.game-close,
.game-controls button {
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid rgba(255, 176, 47, 0.48);
  border-radius: 5px;
  background: rgba(255, 176, 47, 0.1);
  color: var(--amber);
  cursor: pointer;
  font: 900 0.78rem "Consolas", monospace;
}

.game-stats {
  padding: 12px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: #d9e6e1;
  font: 800 0.82rem "Consolas", monospace;
}

.game-stats b,
.game-stats span:last-child {
  color: var(--green);
}

.game-stage {
  padding: 18px;
}

.game-sky {
  position: relative;
  height: clamp(260px, 46vh, 420px);
  overflow: hidden;
  border: 1px solid rgba(102, 255, 173, 0.2);
  border-radius: 6px;
  background:
    radial-gradient(
      circle at 50% 18%,
      rgba(102, 255, 173, 0.18),
      transparent 28%
    ),
    linear-gradient(180deg, #17394c 0%, #0b1820 52%, #060909 100%);
}

.game-horizon {
  position: absolute;
  top: 38%;
  left: 0;
  width: 100%;
  height: 2px;
  background: rgba(102, 255, 173, 0.55);
  box-shadow: 0 0 18px rgba(102, 255, 173, 0.45);
}

.game-runway {
  position: absolute;
  bottom: -18%;
  left: 50%;
  width: 44%;
  height: 60%;
  background:
    linear-gradient(
      90deg,
      transparent 0 45%,
      rgba(255, 255, 255, 0.86) 46% 54%,
      transparent 55%
    ),
    repeating-linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.62) 0 16px,
      transparent 16px 34px
    ),
    linear-gradient(180deg, rgba(40, 54, 55, 0.3), rgba(20, 23, 23, 0.92));
  clip-path: polygon(44% 0, 56% 0, 100% 100%, 0 100%);
  transform: translateX(-50%);
}

.game-player {
  position: absolute;
  bottom: 10%;
  left: 50%;
  width: 64px;
  height: 22px;
  background: linear-gradient(90deg, #171d1e, #f2fbf7 45%, #202728);
  clip-path: polygon(0 52%, 40% 18%, 100% 52%, 40% 84%);
  filter: drop-shadow(0 0 12px rgba(102, 255, 173, 0.55));
  transform: translateX(-50%);
  transition: left 160ms ease-out;
}

.game-shooter .game-player,
.game-shooter .game-horizon,
.game-shooter .game-runway {
  display: none;
}

.game-dot {
  position: absolute;
  width: var(--size);
  height: var(--size);
  border: 2px solid rgba(255, 176, 47, 0.88);
  border-radius: 50%;
  background:
    radial-gradient(
      circle,
      #ffffff 0 13%,
      var(--red) 14% 32%,
      var(--amber) 33% 51%,
      transparent 52%
    ),
    rgba(255, 176, 47, 0.1);
  box-shadow: 0 0 18px rgba(255, 176, 47, 0.8);
  cursor: crosshair;
  transform: translate(-50%, -50%) scale(0.4);
  animation: targetPop 1.15s ease-out both;
}

.game-dot.is-hit {
  pointer-events: none;
  animation: targetHit 120ms ease-out both;
}

.game-evade .game-sky {
  background:
    linear-gradient(
      rgba(102, 255, 173, 0.08) 50%,
      rgba(102, 255, 173, 0.02) 50%
    )
    0 0 / 100% 8px,
    radial-gradient(
      circle at 50% 20%,
      rgba(102, 255, 173, 0.12),
      transparent 28%
    ),
    linear-gradient(180deg, #0a1724 0%, #081017 52%, #030506 100%);
}

.game-evade .game-horizon,
.game-evade .game-runway {
  display: none;
}

.game-evade .game-player {
  bottom: 8%;
  width: 74px;
  height: 26px;
}

.enemy-shot {
  position: absolute;
  top: -34px;
  width: 10px;
  height: 34px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), var(--red));
  box-shadow: 0 0 18px rgba(255, 77, 77, 0.85);
  transform: translateX(-50%);
  animation: incomingShot 1.28s linear both;
}

.is-playing.game-shooter .game-sky {
  animation: targetScan 2s linear infinite;
}

.is-playing.game-evade .game-sky {
  animation: dangerPulse 1.4s ease-in-out infinite;
}

.game-controls {
  padding: 0 18px 18px;
}

.game-controls button {
  flex: 1;
}

.game-shooter .game-controls button[data-game-move] {
  display: none;
}

/* =========================================================
   INNER PAGES
   ========================================================= */

.page-header {
  display: flex;
  min-height: 72px;
  padding: 0 clamp(18px, 5vw, 64px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(90deg, #111719, #222a2d);
  color: var(--amber);
  font: 900 0.85rem "Consolas", monospace;
  align-items: center;
  justify-content: space-between;
}

.back {
  padding: 10px 13px;
  border: 1px solid rgba(255, 176, 47, 0.45);
  border-radius: 4px;
  text-decoration: none;
}

.back:hover,
.back:focus-visible {
  border-color: var(--amber);
  outline: none;
  background: rgba(255, 176, 47, 0.08);
}

.mission-page {
  min-height: calc(100vh - 72px);
  padding: clamp(28px, 6vw, 76px);
  background:
    linear-gradient(
      rgba(7, 9, 10, 0.84),
      rgba(7, 9, 10, 0.95)
    ),
    url("assets/canopy-flight.png") center / cover fixed;
}

.dossier {
  max-width: 920px;
}

.eyebrow {
  color: var(--green);
  font: 900 0.82rem "Consolas", monospace;
}

h1 {
  max-width: 980px;
  margin: 0;
  font-size: clamp(2.2rem, 6vw, 5.9rem);
  line-height: 0.95;
}

h2,
h3,
p {
  margin-top: 0;
}

.lead {
  max-width: 680px;
  color: #c9d6d2;
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.6;
}

.data-grid,
.project-list,
.timeline,
.comms-form {
  max-width: 1100px;
  margin: 38px 0 0;
}

.data-grid,
.project-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.data-grid article,
.project-list article,
.timeline li,
.comms-form {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(13, 18, 19, 0.84);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 18px 32px rgba(0, 0, 0, 0.35);
}

.data-grid article,
.project-list article {
  padding: 22px;
}

.data-grid span,
.project-list span {
  color: var(--amber);
  font: 900 0.78rem "Consolas", monospace;
}

.data-grid strong {
  display: block;
  margin-top: 12px;
  font-size: 1.2rem;
}

.project-list h2 {
  margin: 12px 0;
}

.tech {
  color: #d8e4df;
  font: 800 0.78rem "Consolas", monospace;
}

.project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.project-actions a,
.email-link {
  display: inline-flex;
  min-height: 40px;
  padding: 10px 12px;
  border: 1px solid rgba(102, 255, 173, 0.45);
  border-radius: 5px;
  background: rgba(102, 255, 173, 0.08);
  color: var(--green);
  font-weight: 900;
  text-decoration: none;
  align-items: center;
  justify-content: center;
}

.project-actions a:hover,
.project-actions a:focus-visible,
.email-link:hover,
.email-link:focus-visible {
  border-color: var(--green);
  outline: none;
  background: rgba(102, 255, 173, 0.16);
}

.timeline {
  padding: 0;
  list-style: none;
}

.timeline li {
  position: relative;
  margin: 0 0 14px;
  padding: 22px 22px 22px 72px;
}

.timeline li::before {
  position: absolute;
  top: 24px;
  left: 22px;
  color: var(--amber);
  content: counter(list-item, decimal-leading-zero);
  font: 900 1rem "Consolas", monospace;
}

.comms-form {
  display: grid;
  gap: 16px;
  padding: 22px;
}

.comms-form label {
  display: grid;
  gap: 7px;
  color: var(--amber);
  font-weight: 800;
}

.comms-form input,
.comms-form textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 5px;
  background: rgba(2, 4, 5, 0.72);
  color: var(--text);
}

.comms-form input:focus,
.comms-form textarea:focus {
  border-color: var(--green);
  outline: 2px solid rgba(102, 255, 173, 0.18);
}

.comms-form textarea {
  min-height: 140px;
  resize: vertical;
}

.comms-form button {
  min-height: 48px;
  border-radius: 5px;
  background: var(--amber);
  color: #12100b;
  cursor: pointer;
  font-weight: 900;
}

/* =========================================================
   ABOUT PAGE / PHOTO
   ========================================================= */

.profile-brief {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 430px;
  grid-template-areas: "copy photo";
  gap: clamp(34px, 6vw, 82px);
  max-width: 1180px;
  align-items: center;
}

.profile-copy {
  grid-area: copy;
  max-width: 700px;
}

.profile-copy h1 {
  margin-bottom: 12px;
}

.profile-role {
  margin: 0 0 22px;
  color: var(--amber);
  font: 900 clamp(0.72rem, 1.4vw, 0.95rem) "Consolas", monospace;
  line-height: 1.5;
}

.profile-copy > p:not(.eyebrow):not(.profile-role) {
  color: #d2ded9;
  line-height: 1.7;
}

.profile-photo-frame {
  grid-area: photo;
  display: flex;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  justify-content: center;
  align-items: center;
}

.profile-photo-frame::before,
.profile-photo-frame::after {
  display: none;
}

/* True circle: same fixed width and height. */

.profile-photo-circle {
  width: 430px;
  height: 430px;
  flex: 0 0 430px;
  overflow: hidden;
  border: 5px solid rgba(102, 255, 173, 0.72);
  border-radius: 50%;
  background: #07100d;
  box-shadow:
    0 0 34px rgba(102, 255, 173, 0.22),
    0 22px 42px rgba(0, 0, 0, 0.45);
}

/* This zoom removes the dark lower area from the source image. */

.profile-photo-circle img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center 16%;
  transform: scale(1.22);
}

/* =========================================================
   ABOUT PAGE / STRENGTHS
   ========================================================= */

.strengths-section,
.skills-section {
  max-width: 1100px;
  margin-top: 56px;
}

.skills-heading {
  max-width: 720px;
}

.skills-heading h2 {
  margin: 8px 0 12px;
  font-size: clamp(1.8rem, 4vw, 3rem);
}

.skills-heading p:not(.eyebrow) {
  margin-bottom: 0;
  color: #c9d6d2;
  line-height: 1.6;
}

.strength-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 26px;
}

.strength-grid article {
  min-height: 220px;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: linear-gradient(
    145deg,
    rgba(24, 33, 34, 0.92),
    rgba(7, 10, 11, 0.92)
  );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 18px 32px rgba(0, 0, 0, 0.3);
}

.strength-grid article > span {
  color: var(--amber);
  font: 900 0.78rem "Consolas", monospace;
}

.strength-grid h3 {
  margin: 16px 0 10px;
  color: var(--text);
  font-size: 1.05rem;
}

.strength-grid p {
  margin: 0;
  color: #c9d6d2;
  line-height: 1.6;
}

/* =========================================================
   SKILLS BARS
   ========================================================= */

.skills-panel {
  display: grid;
  gap: 22px;
  margin-top: 26px;
  padding: clamp(20px, 4vw, 34px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(13, 18, 19, 0.84);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 18px 32px rgba(0, 0, 0, 0.35);
}

.skill {
  display: grid;
  gap: 8px;
}

.skill-title {
  display: flex;
  color: var(--text);
  font: 900 0.82rem "Consolas", monospace;
  letter-spacing: 0.06em;
  justify-content: space-between;
}

.skill-title span:last-child {
  color: var(--amber);
}

.progress {
  position: relative;
  height: 15px;
  overflow: hidden;
  border: 1px solid rgba(102, 255, 173, 0.34);
  border-radius: 3px;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.05) 0 12px,
      transparent 12px 16px
    ),
    rgba(2, 8, 7, 0.75);
  box-shadow: inset 0 0 16px rgba(0, 0, 0, 0.58);
}

.progress-bar {
  height: 100%;
  background: linear-gradient(
    90deg,
    rgba(102, 255, 173, 0.72),
    var(--green)
  );
  box-shadow: 0 0 14px rgba(102, 255, 173, 0.58);
}

.progress-bar.html {
  width: 90%;
}

.progress-bar.css {
  width: 80%;
}

.progress-bar.javascript {
  width: 10%;
}

.progress-bar.python {
  width: 5%;
}

/* =========================================================
   ANIMATIONS
   ========================================================= */

@keyframes sweep {
  to {
    transform: rotate(360deg);
  }
}

@keyframes jetSlashOne {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0) rotate(-12deg) scale(0.74);
  }

  16% {
    opacity: 1;
  }

  72% {
    opacity: 1;
    transform: translate3d(70vw, 4vh, 0) rotate(-5deg) scale(1);
  }

  100% {
    opacity: 0;
    transform: translate3d(112vw, -2vh, 0) rotate(2deg) scale(0.9);
  }
}

@keyframes jetSlashTwo {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0) rotate(12deg) scaleX(-1) scale(0.74);
  }

  16% {
    opacity: 1;
  }

  72% {
    opacity: 1;
    transform: translate3d(-72vw, -4vh, 0) rotate(5deg) scaleX(-1) scale(1);
  }

  100% {
    opacity: 0;
    transform: translate3d(-114vw, -8vh, 0) rotate(-2deg) scaleX(-1) scale(0.9);
  }
}

@keyframes trailSlashOne {
  0% {
    opacity: 0;
    transform: translateX(0) rotate(-12deg);
  }

  18% {
    opacity: 0.8;
  }

  100% {
    opacity: 0;
    transform: translateX(118vw) rotate(-12deg);
  }
}

@keyframes trailSlashTwo {
  0% {
    opacity: 0;
    transform: translateX(0) rotate(14deg);
  }

  18% {
    opacity: 0.8;
  }

  100% {
    opacity: 0;
    transform: translateX(-118vw) rotate(14deg);
  }
}

@keyframes burstPop {
  0% {
    opacity: 0;
    transform: scale(0.1) rotate(0deg);
  }

  18% {
    opacity: 1;
    transform: scale(1.7) rotate(65deg);
  }

  100% {
    opacity: 0;
    transform: scale(3.5) rotate(160deg);
  }
}

@keyframes afterburnerPass {
  0% {
    opacity: 0;
    transform: translate3d(-14vw, -2vh, 0) scale(0.55);
  }

  12% {
    opacity: 1;
  }

  68% {
    opacity: 1;
    transform: translate3d(58vw, -8vh, 0) scale(1.14);
  }

  100% {
    opacity: 0;
    transform: translate3d(104vw, -12vh, 0) scale(0.72);
  }
}

@keyframes afterburnerPassTwo {
  0% {
    opacity: 0;
    transform: translate3d(14vw, -6vh, 0) scaleX(-1) scale(0.48);
  }

  12% {
    opacity: 1;
  }

  68% {
    opacity: 1;
    transform: translate3d(-58vw, -12vh, 0) scaleX(-1) scale(1.05);
  }

  100% {
    opacity: 0;
    transform: translate3d(-106vw, -16vh, 0) scaleX(-1) scale(0.7);
  }
}

@keyframes afterburnerFlame {
  0%,
  100% {
    opacity: 0;
    transform: scaleX(0.35);
  }

  12%,
  72% {
    opacity: 1;
    transform: scaleX(1);
  }

  42% {
    opacity: 1;
    transform: scaleX(1.45);
  }
}

@keyframes afterburnerTrail {
  0% {
    opacity: 0;
    transform: translateX(-16vw) rotate(-12deg) scaleX(0.3);
  }

  15% {
    opacity: 0.9;
  }

  100% {
    opacity: 0;
    transform: translateX(112vw) rotate(-12deg) scaleX(1.2);
  }
}

@keyframes afterburnerTrailTwo {
  0% {
    opacity: 0;
    transform: translateX(16vw) rotate(14deg) scaleX(0.3);
  }

  15% {
    opacity: 0.9;
  }

  100% {
    opacity: 0;
    transform: translateX(-112vw) rotate(14deg) scaleX(1.2);
  }
}

@keyframes flyby {
  0% {
    opacity: 0;
    transform: translate3d(-12vw, 2vh, 0) scale(0.45);
  }

  20% {
    opacity: 1;
  }

  70% {
    opacity: 1;
    transform: translate3d(72vw, -5vh, 0) scale(1.38);
  }

  100% {
    opacity: 0;
    transform: translate3d(112vw, -9vh, 0) scale(0.75);
  }
}

@keyframes flybyTrail {
  0% {
    opacity: 0;
    transform: translateX(-18vw) rotate(-12deg) scaleX(0.3);
  }

  18% {
    opacity: 0.9;
  }

  100% {
    opacity: 0;
    transform: translateX(118vw) rotate(-12deg) scaleX(1.25);
  }
}

@keyframes targetPop {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.35);
  }

  20% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.08);
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8);
  }
}

@keyframes targetHit {
  to {
    opacity: 0;
    transform: translate(-50%, -50%) scale(2.2);
  }
}

@keyframes incomingShot {
  to {
    top: 110%;
  }
}

@keyframes targetScan {
  50% {
    filter: brightness(1.25);
  }
}

@keyframes dangerPulse {
  50% {
    filter: brightness(1.24) saturate(1.35);
  }
}

/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 860px) {
  .cockpit-reveal {
    min-height: auto;
    padding: 56svh 12px 24px;
    background-position: center top;
    background-size: auto 70svh;
    place-items: start center;
  }

  .cockpit {
    width: min(100%, 720px);
    border-radius: 18px 18px 0 0;
    transform: none;
  }

  .console-grid {
    grid-template-columns: 1fr 1fr;
  }

  .left-panel,
  .right-panel {
    grid-column: span 1;
  }

  .mfd,
  .center-stack {
    grid-column: span 2;
  }

  .mfd {
    min-height: 220px;
  }

  .profile-brief {
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 32px;
  }

  .profile-photo-circle {
    width: 340px;
    height: 340px;
    flex-basis: 340px;
  }

  .strength-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .window-effects,
  .cockpit-reveal > .effect-layer {
    --window-effect-width: clamp(420px, 72vw, 700px);
    --window-effect-height: 40vh;
  }
}
@media (max-width: 1100px) {
  .cockpit {
    width: min(760px, 64vw);
    bottom: clamp(22px, 5vh, 56px);
    transform: translateX(-50%) scale(0.9);
  }
}

@media (max-width: 768px) {
  .cockpit {
    width: 92vw;
    bottom: 14px;
    transform: translateX(-50%) scale(0.94);
  }

  .console-grid {
    grid-template-columns:
      minmax(64px, 0.72fr)
      minmax(110px, 1fr)
      minmax(84px, 0.72fr)
      minmax(110px, 1fr)
      minmax(64px, 0.72fr);
    gap: 5px;
  }

  .mfd {
    min-height: 135px;
  }

  .throttle-bank span {
    height: 48px;
  }
}

/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 620px) {
  .cockpit-reveal {
  position: relative;
  display: grid;
  min-height: 100svh;
  padding: clamp(20px, 4vh, 40px) clamp(12px, 2vw, 24px);
  overflow: hidden;
  background:
    linear-gradient(
      180deg,
      rgba(4, 10, 12, 0.28) 0%,
      rgba(4, 10, 12, 0.08) 34%,
      rgba(4, 10, 12, 0.62) 100%
    ),
    radial-gradient(
      circle at 50% 52%,
      transparent 0 28%,
      rgba(2, 6, 7, 0.48) 84%
    ),
    url("assets/cockpit-integrated-bg.png") center / cover no-repeat;
  isolation: isolate;
  place-items: center;
}

  .cockpit {
  position: absolute;
  left: 50%;
  bottom: clamp(34px, 7vh, 82px);
  z-index: 2;
  width: min(760px, 47vw);
  padding: clamp(8px, 1vw, 12px);
  border-radius: 18px 18px 0 0;
  background:
    linear-gradient(
      180deg,
      rgba(70, 80, 82, 0.72),
      rgba(12, 15, 16, 0.96) 19%
    ),
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.03) 0 1px,
      transparent 1px 84px
    );
  box-shadow:
    0 -12px 42px rgba(0, 0, 0, 0.62),
    inset 0 2px 0 rgba(255, 255, 255, 0.12);
  transform: translateX(-50%) scale(0.88);
  transform-origin: center bottom;
}

  .console-grid {
  display: grid;
  grid-template-columns:
    minmax(72px, 0.72fr)
    minmax(130px, 1.15fr)
    minmax(96px, 0.78fr)
    minmax(130px, 1.15fr)
    minmax(72px, 0.72fr);
  gap: 6px;
  align-items: stretch;
}

  .left-panel,
  .right-panel,
  .mfd,
  .center-stack {
    grid-column: auto;
  }

  .side-panel {
  display: grid;
  gap: 5px;
  padding: 7px;
  border-radius: 7px;
}

  .mfd {
    min-height: 210px;
  }

  .lower-console {
    grid-template-columns: 54px 1fr 54px;
    gap: 7px;
  }

  .nameplate p {
    font-size: 0.64rem;
  }

  .nameplate strong {
    font-size: 0.58rem;
  }

  .status-strip {
    gap: 5px;
    font-size: 0.57rem;
  }

  .window-effects,
  .cockpit-reveal > .effect-layer {
    --window-effect-width: clamp(260px, 78vw, 350px);
    --window-effect-height: 38vh;
  }

  .profile-brief {
    grid-template-columns: 1fr;
    grid-template-areas:
      "photo"
      "copy";
    gap: 30px;
  }

  .profile-photo-frame {
    margin: 0 auto;
  }

  .profile-photo-circle {
    width: 300px;
    height: 300px;
    flex-basis: 300px;
  }

  .profile-copy,
  .profile-role {
    text-align: center;
  }

  .strength-grid {
    grid-template-columns: 1fr;
  }

  .strength-grid article {
    min-height: auto;
  }

  .project-actions a,
  .email-link {
    width: 100%;
  }

  .page-header {
    padding: 0 14px;
  }

  .mission-page {
    padding: 28px 18px;
    background-attachment: scroll;
  }

  .skill-title {
    font-size: 0.72rem;
  }
}

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

/* =========================================================
   RESPONSIVE HOME COCKPIT POSITION
   Keeps the background and interactive console aligned
   across desktop and laptop screen sizes.
   ========================================================= */

/* Desktop and laptop */
@media (min-width: 761px) {
  .cockpit-shell {
    display: grid;
    min-height: 100svh;
    background: #030506;
    place-items: center;
  }

  /*
    This creates one consistent 16:9 cockpit stage.
    The background and interactive display now scale together
    instead of moving based on each device's screen height.
  */
  .cockpit-reveal {
    display: block !important;
    width: min(100vw, 177.777svh);
    min-height: 0 !important;
    padding: 0 !important;
    aspect-ratio: 16 / 9;
    overflow: hidden !important;

    background-position: center center !important;
    background-size: cover !important;
  }

  /*
    These percentages are tied to the cockpit stage itself,
    not the browser height. This keeps the display inside
    the center instrument panel on Windows and MacBook screens.
  */
  .cockpit-reveal .cockpit {
    position: absolute !important;
    top: 43.5% !important;
    left: 50% !important;
    bottom: auto !important;
    z-index: 5 !important;

    width: 72.5% !important;
    margin: 0 !important;
    padding: 8px !important;

    transform: translateX(-50%) !important;
    transform-origin: top center !important;
  }
}

/* Tablet and phone */
@media (max-width: 760px) {
  .cockpit-shell {
    display: block;
  }

  .cockpit-reveal {
    display: grid !important;
    width: 100%;
    min-height: auto !important;
    padding: 56svh 12px 24px !important;
    aspect-ratio: auto;

    background-position: center top !important;
    background-size: auto 70svh !important;
    place-items: start center !important;
  }

  .cockpit-reveal .cockpit {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    bottom: auto !important;

    width: min(100%, 720px) !important;
    margin: 0 auto !important;

    transform: none !important;
  }
}
