:root {
  --bg: #04050d;
  --bg-2: #080a1a;
  --panel: rgba(14, 18, 40, .55);
  --line: rgba(160, 180, 255, .14);
  --line-2: rgba(160, 180, 255, .28);
  --text: #e8ecff;
  --dim: #8a93b8;
  --cyan: #5ef2ff;
  --violet: #9b7bff;
  --amber: #ffb86b;
  --ok: #6dffb0;
  --radius: 18px;
  --pad: clamp(1rem, 5vw, 4rem);
  --display: 'Space Grotesk', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: hidden; overflow-x: clip; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--display);
  line-height: 1.6;
  overflow-x: hidden;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
body.loading { overflow: hidden; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: var(--violet); color: #fff; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }

.mono { font-family: var(--mono); letter-spacing: .02em; }
.dim { color: var(--dim); }
.small { font-size: .8rem; }
.ok { color: var(--ok); }

/* ---------- background layers ---------- */
#stars { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -3; }
.nebula { position: fixed; inset: 0; z-index: -2; pointer-events: none; overflow: hidden; }
.nebula span {
  position: absolute; border-radius: 50%; filter: blur(90px); opacity: .35;
  animation: drift 26s ease-in-out infinite alternate;
}
.nebula span:nth-child(1) { width: 50vw; height: 50vw; left: -10vw; top: -10vw; background: radial-gradient(circle, var(--violet), transparent 65%); }
.nebula span:nth-child(2) { width: 45vw; height: 45vw; right: -12vw; top: 30vh; background: radial-gradient(circle, #1f6bff, transparent 65%); animation-delay: -8s; }
.nebula span:nth-child(3) { width: 40vw; height: 40vw; left: 25vw; bottom: -20vw; background: radial-gradient(circle, #ff5ea8, transparent 65%); opacity: .18; animation-delay: -16s; }
@keyframes drift { to { transform: translate(6vw, -4vh) scale(1.15); } }

.grain {
  position: fixed; inset: -50%; z-index: 90; pointer-events: none; opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1s steps(4) infinite;
}
@keyframes grain { 25% { transform: translate(-3%, 2%); } 50% { transform: translate(2%, -3%); } 75% { transform: translate(-2%, -1%); } }

.progress {
  position: fixed; top: 0; left: 0; height: 2px; width: 100%; z-index: 100;
  background: linear-gradient(90deg, var(--cyan), var(--violet));
  transform-origin: 0 50%; transform: scaleX(0);
}

/* ---------- cursor ---------- */
.cursor { display: none; }
@media (hover: hover) and (pointer: fine) {
  body, a, button { cursor: none; }
  .cursor {
    display: block; position: fixed; left: 0; top: 0; z-index: 200; pointer-events: none;
    width: 34px; height: 34px; margin: -17px 0 0 -17px;
    border: 1px solid rgba(94, 242, 255, .7); border-radius: 50%;
    background: radial-gradient(circle, var(--cyan) 0 1.5px, transparent 2px);
    transition: width .25s, height .25s, margin .25s, background .25s, border-color .25s;
  }
  .cursor::before, .cursor::after {
    content: ''; position: absolute; left: 50%; top: 50%; transition: opacity .2s;
  }
  /* four ticks crossing the ring, gap in the middle */
  .cursor::before {
    width: 1px; height: 48px; transform: translate(-50%, -50%);
    background: linear-gradient(var(--cyan) 0 9px, transparent 9px 39px, var(--cyan) 39px);
  }
  .cursor::after {
    height: 1px; width: 48px; transform: translate(-50%, -50%);
    background: linear-gradient(90deg, var(--cyan) 0 9px, transparent 9px 39px, var(--cyan) 39px);
  }
  .cursor span {
    position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
    font: 600 .55rem var(--mono); letter-spacing: .1em; color: var(--bg); white-space: nowrap; opacity: 0;
  }
  .cursor.hover { width: 64px; height: 64px; margin: -32px 0 0 -32px; background: var(--cyan); border-color: var(--cyan); }
  .cursor.hover::before, .cursor.hover::after { opacity: 0; }
  .cursor.hover span { opacity: 1; }
  .cursor.hide { opacity: 0; }
}

/* ---------- loader ---------- */
.loader {
  position: fixed; inset: 0; z-index: 150; background: var(--bg);
  display: grid; place-content: center; justify-items: center; gap: .6rem; text-align: center;
  transition: opacity .7s ease, visibility .7s;
}
.loader.done { opacity: 0; visibility: hidden; }
.loader p { font-size: .8rem; text-transform: uppercase; letter-spacing: .25em; }
.loader b { color: var(--cyan); font-size: 1.6rem; display: inline-block; min-width: 2ch; }
.loader-ring {
  width: 88px; height: 88px; border-radius: 50%; border: 1px solid var(--line-2); position: relative; margin-bottom: 1rem;
  animation: spin 1.6s linear infinite;
}
.loader-ring span { position: absolute; width: 12px; height: 12px; top: -6px; left: 50%; margin-left: -6px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 18px var(--cyan); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 80;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem var(--pad);
  transition: transform .45s cubic-bezier(.2,.8,.2,1), background .3s, backdrop-filter .3s;
}
.nav.scrolled { background: rgba(4, 5, 13, .6); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.nav.hidden { transform: translateY(-110%); }
.brand { display: flex; align-items: center; gap: .6rem; font-weight: 600; font-size: 1.05rem; }
.brand-tag { font-style: normal; font-size: .62rem; font-weight: 500; color: var(--cyan); text-transform: uppercase; letter-spacing: .12em; border: 1px solid rgba(94,242,255,.35); border-radius: 999px; padding: .15rem .5rem; transition: opacity .25s; min-width: 7.2em; text-align: center; }
.brand-planet {
  width: 22px; height: 22px; border-radius: 50%; position: relative;
  background: radial-gradient(circle at 35% 35%, #fff, var(--cyan) 40%, #1f4bff);
}
.brand-planet::after {
  content: ''; position: absolute; inset: 7px -7px; border: 2px solid var(--violet); border-radius: 50%;
  transform: rotate(-20deg); border-top-color: transparent;
}
.nav-links { display: flex; align-items: center; gap: clamp(1rem, 2.4vw, 2rem); font-size: .92rem; }
.nav-links a { position: relative; color: var(--dim); transition: color .2s; }
.nav-links a:hover { color: var(--text); }
.nav-links a:not(.nav-cta)::after {
  content: ''; position: absolute; left: 0; bottom: -4px; height: 1px; width: 100%;
  background: var(--cyan); transform: scaleX(0); transform-origin: right; transition: transform .35s;
}
.nav-links a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav-cta { color: var(--text) !important; border: 1px solid var(--line-2); padding: .45rem 1rem; border-radius: 999px; transition: background .25s, color .25s !important; }
.nav-cta:hover { background: var(--cyan); color: var(--bg) !important; }
.burger { display: none; width: 40px; height: 40px; position: relative; z-index: 85; }
.burger span { position: absolute; left: 9px; right: 9px; height: 2px; background: var(--text); transition: transform .35s, top .35s; }
.burger span:first-child { top: 15px; }
.burger span:last-child { top: 23px; }
.burger[aria-expanded="true"] span:first-child { top: 19px; transform: rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { top: 19px; transform: rotate(-45deg); }

/* ---------- HUD ---------- */
.hud {
  position: fixed; right: 1.1rem; bottom: 1.4rem; z-index: 70; writing-mode: vertical-rl;
  font-size: .64rem; color: var(--dim); display: flex; gap: 1.2rem; text-transform: uppercase; letter-spacing: .12em;
}
.hud b { color: var(--cyan); font-weight: 500; }

/* ---------- hero ---------- */
.hero {
  min-height: 100svh; display: grid; grid-template-columns: 1.15fr 1fr; align-items: center; gap: 2rem;
  padding: 7rem var(--pad) 5rem; position: relative;
}
.chip {
  display: inline-flex; align-items: center; gap: .55rem; font-size: .75rem;
  border: 1px solid var(--line-2); border-radius: 999px; padding: .35rem .85rem; background: var(--panel);
  backdrop-filter: blur(8px);
}
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(109,255,176,.6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(109,255,176,0); } 100% { box-shadow: 0 0 0 0 rgba(109,255,176,0); } }
.hero-title {
  font-size: clamp(3.4rem, 10vw, 8.5rem); line-height: .92; letter-spacing: -.045em; font-weight: 700;
  margin: 1.4rem 0 1.2rem;
}
.hero-title .line { display: block; overflow: hidden; padding-bottom: .06em; }
.hero-title .line > span { display: inline-block; transform: translateY(110%); transition: transform 1.1s cubic-bezier(.16,1,.3,1); }
.hero-title .line:nth-child(2) > span { transition-delay: .12s; }
.hero-title em {
  font-style: normal; color: var(--cyan); text-shadow: 0 0 30px rgba(94,242,255,.6);
}
body.ready .hero-title .line > span { transform: none; }
.hero-title .line:first-child > span {
  background: linear-gradient(100deg, #fff 30%, #b9c3ff 60%, var(--violet));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-role { font-size: clamp(1rem, 2vw, 1.3rem); color: var(--cyan); min-height: 1.6em; }
.caret { animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.hero-sub { color: var(--dim); max-width: 34rem; margin: 1rem 0 2rem; font-size: clamp(1rem, 1.4vw, 1.12rem); }
.hero-ctas { display: flex; flex-wrap: wrap; gap: .8rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  padding: .9rem 1.5rem; border-radius: 999px; font-weight: 600; font-size: .95rem;
  transition: transform .2s, background .25s, color .25s, box-shadow .25s, border-color .25s;
  will-change: transform;
}
.btn:active { transform: scale(.95) !important; }
.btn-primary { background: var(--cyan); color: var(--bg); box-shadow: 0 0 0 0 rgba(94,242,255,.4); }
.btn-primary:hover { box-shadow: 0 0 36px rgba(94,242,255,.45); }
.btn-ghost { border: 1px solid var(--line-2); background: var(--panel); backdrop-filter: blur(8px); }
.btn-ghost:hover { border-color: var(--violet); background: rgba(155,123,255,.18); }

/* orbit */
.hero-orbit {
  position: relative; aspect-ratio: 1; width: min(100%, 520px); justify-self: center;
  display: grid; place-items: center; transition: transform .6s cubic-bezier(.2,.8,.2,1);
}
.ring { position: absolute; border-radius: 50%; border: 1px solid var(--line-2); inset: 0; animation: spin linear infinite; }
.ring.r1 { inset: 20%; animation-duration: 14s; }
.ring.r2 { inset: 8%; animation-duration: 26s; animation-direction: reverse; border-style: dashed; border-color: var(--line); }
.ring.r3 { inset: -2%; animation-duration: 44s; }
.moon { position: absolute; border-radius: 50%; top: 50%; }
.m1 { width: 14px; height: 14px; left: -7px; margin-top: -7px; background: radial-gradient(circle at 30% 30%, #fff, var(--amber)); box-shadow: 0 0 16px var(--amber); }
.m2 { width: 22px; height: 22px; right: -11px; margin-top: -11px; background: radial-gradient(circle at 30% 30%, #fff, var(--violet) 50%, #3a1f8f); box-shadow: 0 0 22px rgba(155,123,255,.7); }
.m3 { width: 8px; height: 8px; left: 50%; top: -4px; background: var(--cyan); box-shadow: 0 0 12px var(--cyan); }
.avatar-wrap {
  width: 52%; aspect-ratio: 1; border-radius: 50%; overflow: hidden; position: relative;
  box-shadow: 0 0 0 1px var(--line-2), 0 0 80px rgba(94,242,255,.25), 0 0 140px rgba(155,123,255,.25);
  transition: transform .4s cubic-bezier(.2,.8,.2,1);
}
.avatar-wrap::after {
  content: ''; position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle at 30% 25%, transparent 45%, rgba(4,5,13,.55));
}
.avatar-wrap:hover { transform: scale(1.05); }
.avatar-wrap img { width: 100%; height: 100%; object-fit: cover; }
.orbit-tag {
  position: absolute; font-size: .7rem; padding: .3rem .7rem; border-radius: 999px;
  background: var(--panel); border: 1px solid var(--line); backdrop-filter: blur(6px);
  animation: bob 6s ease-in-out infinite;
}
.t1 { top: 8%; right: 2%; }
.t2 { bottom: 14%; left: -2%; animation-delay: -2s; }
.t3 { bottom: 2%; right: 12%; animation-delay: -4s; }
@keyframes bob { 50% { transform: translateY(-10px); } }

.scroll-hint {
  position: absolute; bottom: 1.6rem; left: 50%; transform: translateX(-50%);
  font-size: .68rem; text-transform: uppercase; letter-spacing: .2em; color: var(--dim);
  display: flex; flex-direction: column; align-items: center; gap: .6rem;
}
.scroll-hint span { width: 1px; height: 36px; background: linear-gradient(var(--cyan), transparent); animation: drip 2s infinite; transform-origin: top; }
@keyframes drip { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* ---------- marquee ---------- */
.marquee { overflow: hidden; border-block: 1px solid var(--line); padding: 1.1rem 0; background: rgba(8,10,26,.5); }
.marquee-track { display: flex; gap: 2rem; width: max-content; font-size: clamp(1rem, 2.4vw, 1.6rem); text-transform: uppercase; }
.marquee-track span:nth-child(even) { color: var(--violet); }

/* ---------- sections ---------- */
.section { padding: clamp(5rem, 12vw, 9rem) var(--pad); position: relative; }
.sec-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 1rem 1.4rem; margin-bottom: clamp(2rem, 5vw, 3.5rem); }
.sec-num { color: var(--cyan); font-size: .85rem; }
.sec-head h2, .contact-title { font-size: clamp(2.2rem, 6vw, 4.6rem); letter-spacing: -.035em; line-height: 1; font-weight: 600; }
.split .w { display: inline-block; overflow: hidden; vertical-align: top; }
.split .w > span { display: inline-block; transform: translateY(105%); transition: transform .9s cubic-bezier(.16,1,.3,1); }
.split.in .w > span { transform: none; }

.reveal { opacity: 0; transform: translateY(30px); transition: opacity .9s ease, transform .9s cubic-bezier(.16,1,.3,1); }
.reveal.in { opacity: 1; transform: none; }

/* about */
.brief { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.brief-text { font-size: clamp(1.25rem, 2.6vw, 2rem); line-height: 1.4; letter-spacing: -.01em; }
.brief-text .bw { opacity: .15; transition: opacity .3s; }
.brief-text .bw.lit { opacity: 1; }
.brief-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem;
  backdrop-filter: blur(10px);
}
.brief-row { display: flex; justify-content: space-between; gap: 1rem; padding: .75rem 0; border-bottom: 1px dashed var(--line); font-size: .85rem; }
.brief-row:last-child { border: 0; }
.brief-row b { font-weight: 500; text-align: right; }

/* services */
.services { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; }
.svc {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 2rem 1.6rem;
  backdrop-filter: blur(10px); position: relative; overflow: hidden;
  transition: border-color .3s;
}
.svc::before {
  content: ''; position: absolute; inset: 0; opacity: 0; transition: opacity .4s;
  background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 50%), rgba(94,242,255,.12), transparent 60%);
}
.svc:hover { border-color: var(--line-2); }
.svc:hover::before { opacity: 1; }
.svc-icon { font-size: 2rem; color: var(--cyan); display: inline-block; transition: transform .6s cubic-bezier(.2,.8,.2,1); }
.svc:hover .svc-icon { transform: rotate(180deg) scale(1.1); }
.svc h3 { font-size: 1.4rem; margin: 1rem 0 .6rem; }
.svc p { color: var(--dim); margin-bottom: 1rem; }

/* missions */
.filters { display: flex; gap: .4rem; margin-left: auto; flex-wrap: wrap; }
.filters button { font-size: .75rem; padding: .4rem .85rem; border: 1px solid var(--line); border-radius: 999px; color: var(--dim); transition: all .25s; }
.filters button:hover { color: var(--text); border-color: var(--line-2); }
.filters button.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.missions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.mission {
  display: flex; flex-direction: column; gap: .8rem;
  background: linear-gradient(160deg, rgba(20,24,52,.7), rgba(8,10,26,.6));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem;
  backdrop-filter: blur(10px); position: relative; overflow: hidden;
  transition: border-color .3s, opacity .4s, transform .4s;
}
.mission::after {
  content: ''; position: absolute; width: 180px; height: 180px; border-radius: 50%; right: -70px; top: -70px;
  background: radial-gradient(circle, rgba(155,123,255,.35), transparent 70%); transition: transform .6s;
}
.mission:hover { border-color: rgba(94,242,255,.45); }
.mission:hover::after { transform: scale(1.6); }
.mission.out { display: none; }
.m-top { display: flex; justify-content: space-between; font-size: .72rem; color: var(--dim); }
.m-status { color: var(--amber); }
.m-status.live { color: var(--ok); }
.mission h3 { font-size: 1.35rem; letter-spacing: -.01em; }
.mission p { color: var(--dim); font-size: .95rem; flex: 1; }
.tags { display: flex; flex-wrap: wrap; gap: .4rem; }
.tags span { font-size: .68rem; padding: .25rem .6rem; border-radius: 999px; border: 1px solid var(--line); color: #b8c0e6; }
.m-links { display: flex; gap: 1rem; margin-top: .3rem; position: relative; z-index: 1; }
.m-links a { font-weight: 600; font-size: .9rem; color: var(--cyan); border-bottom: 1px solid transparent; transition: border-color .2s; }
.m-links a:hover { border-color: var(--cyan); }

/* timeline */
.timeline { list-style: none; position: relative; max-width: 820px; padding-left: 2.2rem; }
.timeline::before { content: ''; position: absolute; left: 6px; top: 0; bottom: 0; width: 1px; background: var(--line); }
.timeline::after {
  content: ''; position: absolute; left: 6px; top: 0; width: 1px; height: 100%;
  background: linear-gradient(var(--cyan), var(--violet)); transform-origin: top; transform: scaleY(var(--tl, 0));
  box-shadow: 0 0 10px var(--cyan);
}
.t-item { position: relative; padding-bottom: 2.6rem; }
.t-item::before {
  content: ''; position: absolute; left: calc(-2.2rem + 1px); top: .35rem; width: 11px; height: 11px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--cyan); box-shadow: 0 0 12px rgba(94,242,255,.6);
}
.t-date { font-size: .75rem; color: var(--cyan); }
.t-item h3 { font-size: clamp(1.1rem, 2vw, 1.35rem); margin: .3rem 0; font-weight: 600; }
.t-item p { color: var(--dim); max-width: 60ch; }

/* constellation */
.hint { margin: -1.8rem 0 1rem; }
.constellation { position: relative; min-height: 440px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(8,10,26,.35); overflow: hidden; }
#constCanvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.skill-list { list-style: none; position: relative; height: 440px; }
.skill-list li {
  position: absolute; transform: translate(-50%, -50%); font-family: var(--mono); font-size: .78rem; white-space: nowrap;
  padding: .3rem .7rem .3rem 1.1rem; border-radius: 999px; color: #c9d0f3; transition: color .25s, background .25s, transform .25s;
  cursor: default;
}
.skill-list li::before {
  content: ''; position: absolute; left: .3rem; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%;
  background: currentColor; box-shadow: 0 0 10px currentColor;
}
.skill-list li[data-g="web"] { color: var(--cyan); }
.skill-list li[data-g="lang"] { color: var(--amber); }
.skill-list li[data-g="tool"] { color: #9fd0ff; }
.skill-list li[data-g="sec"] { color: #ff8fc7; }
.skill-list li[data-g="cs"] { color: var(--violet); }
.skill-list li.hot { background: rgba(255,255,255,.08); transform: translate(-50%, -50%) scale(1.12); }
.skill-list li.dimmed { opacity: .3; }

/* arcade */
.arcade { display: grid; grid-template-columns: 1.7fr 1fr; gap: 1.2rem; align-items: stretch; }
.game-frame {
  position: relative; border: 1px solid var(--line-2); border-radius: var(--radius); overflow: hidden;
  background: #02030a; box-shadow: 0 0 60px rgba(94,242,255,.08), inset 0 0 80px rgba(155,123,255,.08);
}
.game-bar { display: flex; justify-content: space-between; padding: .7rem 1rem; font-size: .72rem; border-bottom: 1px solid var(--line); color: var(--dim); }
.game-bar b { color: var(--cyan); }
#game { display: block; width: 100%; height: auto; aspect-ratio: 720 / 440; touch-action: none; }
.game-overlay {
  position: absolute; inset: 2.4rem 0 0; display: grid; place-content: center; justify-items: center; gap: .9rem; text-align: center;
  background: rgba(2,3,10,.72); backdrop-filter: blur(3px); padding: 1rem; transition: opacity .3s;
}
.game-overlay.off { opacity: 0; pointer-events: none; }
.game-overlay h3 { font-size: clamp(1.6rem, 4vw, 2.4rem); letter-spacing: -.02em; }
.game-overlay p { color: var(--dim); line-height: 1.8; }
.gem { color: var(--amber); }
.invaders-card {
  display: flex; flex-direction: column; justify-content: center; gap: .9rem; padding: 2rem;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(170deg, rgba(109,255,176,.08), rgba(8,10,26,.7)); transition: border-color .3s;
}
.invaders-card:hover { border-color: var(--ok); }
.invader-art { fill: var(--ok); filter: drop-shadow(0 0 10px rgba(109,255,176,.6)); shape-rendering: crispEdges; animation: march 1.2s steps(1) infinite; }
.invader-art .fb { visibility: hidden; animation: flip 1.2s steps(1) infinite; }
.invader-art .fa { animation: flip 1.2s steps(1) infinite reverse; }
@keyframes march { 50% { transform: translateX(14px); } }
@keyframes flip { 50% { visibility: visible; } }
.invaders-card h3 { font-size: 1.8rem; }
.invaders-card p { color: var(--dim); }
.invaders-card .btn { align-self: flex-start; }

/* contact */
.contact { text-align: center; padding-bottom: 6rem; }
.contact-title { margin: 1rem 0 1.2rem; }
.swap {
  display: inline-block; color: var(--cyan); text-shadow: 0 0 28px rgba(94,242,255,.45);
  transition: transform .35s cubic-bezier(.2,.8,.2,1), opacity .35s, filter .35s;
}
.swap::after { content: "?"; color: var(--text); text-shadow: none; }
.swap.out { transform: translateY(-.35em) scale(.96); opacity: 0; filter: blur(6px); }
.swap.pre { transform: translateY(.35em) scale(.96); opacity: 0; filter: blur(6px); transition: none; }
.launch {
  background: linear-gradient(100deg, #fff 20%, #b9c3ff 55%, var(--violet));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.contact-sub { color: var(--dim); max-width: 34rem; margin: 0 auto 2.2rem; }
.contact-mail {
  display: inline-block; font-size: clamp(1.1rem, 3.6vw, 2.4rem); font-weight: 600;
  background: linear-gradient(90deg, var(--cyan), var(--violet), var(--cyan)); background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  border-bottom: 2px solid rgba(94,242,255,.3); padding-bottom: .2rem; transition: background-position .6s;
  word-break: break-all;
}
.contact-mail:hover { background-position: 100% 0; }
.socials { display: flex; justify-content: center; flex-wrap: wrap; gap: 1.5rem; margin-top: 2.2rem; font-size: .9rem; }
.socials a { color: var(--dim); transition: color .2s; }
.socials a:hover { color: var(--cyan); }

.footer {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: .8rem;
  padding: 1.6rem var(--pad) 3.6rem; border-top: 1px solid var(--line); font-size: .75rem; color: var(--dim);
}
.footer a:hover { color: var(--cyan); }

/* warp flash when jumping to arcade */
body.warp #stars { filter: brightness(1.6); }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .burger { display: block; }
  .nav-links {
    position: fixed; inset: 0; flex-direction: column; justify-content: center; gap: 1.6rem; font-size: 1.6rem;
    background: rgba(4,5,13,.96); backdrop-filter: blur(16px);
    clip-path: circle(0 at calc(100% - 2.6rem) 2.2rem); transition: clip-path .7s cubic-bezier(.7,0,.2,1);
  }
  .nav-links.open { clip-path: circle(150% at calc(100% - 2.6rem) 2.2rem); }
  .nav-links a { color: var(--text); }
  .hero { grid-template-columns: 1fr; text-align: left; padding-top: 6.5rem; }
  .hero-orbit { width: min(78vw, 420px); order: -1; }
  .brief, .arcade { grid-template-columns: 1fr; }
  .services, .missions { grid-template-columns: 1fr 1fr; }
  .filters { margin-left: 0; width: 100%; }
}
@media (max-width: 560px) {
  .services, .missions { grid-template-columns: 1fr; }
  .hero-title { font-size: clamp(2.9rem, 15vw, 4rem); }
  .orbit-tag.t3, .scroll-hint { display: none; }
  .hud { display: none; }
  .constellation, .skill-list { height: auto; min-height: 0; }
  #constCanvas { display: none; }
  .skill-list { display: flex; flex-wrap: wrap; gap: .4rem; padding: 1rem; }
  .skill-list li { position: static; transform: none; border: 1px solid var(--line); }
  .skill-list li.hot { transform: scale(1.05); }
  .hint { display: none; }
  .footer { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal, .split .w > span, .hero-title .line > span { opacity: 1; transform: none; }
  .brief-text .bw { opacity: 1; }
}
