/* ==========================================================
   Leo Xandroveth portfolio
   Palette: void (space), ink/panel (surfaces), frost (text),
   ion (cyan, data), ember (orange, the rocket, used sparingly)
   Type: Syne (display) + Hanken Grotesk (body)
   ========================================================== */

:root {
  --void: #050814;
  --ink: #0a1020;
  --panel: #0f172c;
  --line: rgba(170, 195, 255, .14);
  --line2: rgba(170, 195, 255, .28);
  --frost: #e8eef8;
  --mute: #9aa6c2;
  --ion: #5ee0ff;
  --ember: #ff8a4c;

  --f-display: 'Syne', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --f-body: 'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

  --ease: cubic-bezier(.2, .8, .2, 1);
  --ease-io: cubic-bezier(.76, 0, .24, 1);

  --pad: clamp(20px, 5vw, 72px);
  --max: 1280px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--void);
  color: var(--frost);
  font-family: var(--f-body);
  font-size: clamp(1rem, .96rem + .2vw, 1.125rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, canvas, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p { margin: 0; }
::selection { background: var(--ion); color: var(--void); }

:focus-visible { outline: 2px solid var(--ion); outline-offset: 3px; border-radius: 4px; }

.skip {
  position: fixed; left: 12px; top: -60px; z-index: 200;
  background: var(--ion); color: var(--void); padding: 10px 16px; border-radius: 8px; font-weight: 600;
  transition: top .2s;
}
.skip:focus { top: 12px; }

.wrap { max-width: var(--max); margin: 0 auto; padding-inline: var(--pad); }
.sec { position: relative; padding-block: clamp(80px, 11vw, 150px); }

/* ---------- Layers ---------- */
#sky { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
main, .footer, .marquee { position: relative; z-index: 1; }

/* ---------- Intro ---------- */
.preloader { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; }
.pl-half {
  position: absolute; left: 0; right: 0; height: 50.5%; background: var(--void);
  transition: transform 1s var(--ease-io);
}
.pl-top { top: 0; } .pl-bot { bottom: 0; }
.pl-center { position: relative; z-index: 1; text-align: center; transition: opacity .35s, transform .6s var(--ease); }
.pl-count {
  font-family: var(--f-display); font-weight: 800; line-height: 1;
  font-size: clamp(4.5rem, 18vw, 12rem); font-variant-numeric: tabular-nums; letter-spacing: -.03em;
}
.pl-count small { font-size: .28em; color: var(--ember); margin-left: .1em; letter-spacing: 0; }
.pl-label { margin-top: 10px; color: var(--mute); letter-spacing: .06em; }
.preloader.done .pl-top { transform: translateY(-101%); }
.preloader.done .pl-bot { transform: translateY(101%); }
.preloader.done .pl-center { opacity: 0; transform: scale(.94); }
.preloader-off .preloader { display: none; }
.no-js .preloader { display: none; }

/* ---------- Cursor ---------- */
.cursor-glow, .cursor-ring { position: fixed; left: 0; top: 0; pointer-events: none; opacity: 0; transition: opacity .4s; }
.cursor-glow {
  width: 460px; height: 460px; margin: -230px 0 0 -230px; z-index: 2; border-radius: 50%;
  background: radial-gradient(circle, rgba(94, 224, 255, .09), transparent 62%);
}
.cursor-ring { width: 34px; height: 34px; margin: -17px 0 0 -17px; z-index: 150; }
.cursor-ring i { display: block; width: 100%; height: 100%; border: 1px solid var(--ion); border-radius: 50%; transition: transform .35s var(--ease), background .3s; }
.cursor-ring.hot i { transform: scale(1.9); background: rgba(94, 224, 255, .12); }
@media (hover: none), (pointer: coarse) { .cursor-glow, .cursor-ring { display: none; } }

/* ---------- Flight gauge ---------- */
.gauge {
  position: fixed; left: clamp(6px, 1.2vw, 20px); top: 96px; bottom: 96px; width: 2px;
  background: var(--line); border-radius: 2px; z-index: 40; --p: 0;
}
.gauge-fill { position: absolute; left: 0; top: 0; width: 100%; height: calc(var(--p) * 100%); background: var(--ember); border-radius: 2px; }
.gauge-mark {
  position: absolute; left: 50%; top: calc(var(--p) * 100%); width: 10px; height: 10px; margin: -5px 0 0 -5px;
  border-radius: 50%; background: var(--ember); box-shadow: 0 0 14px 2px rgba(255, 138, 76, .7);
}
.readout {
  position: fixed; left: clamp(22px, 2.6vw, 40px); bottom: 22px; z-index: 40;
  display: flex; gap: 18px; padding: 10px 16px; border-radius: 14px;
  background: rgba(10, 16, 32, .65); border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  font-variant-numeric: tabular-nums;
}
.readout div { display: grid; line-height: 1.15; }
.readout b { font-family: var(--f-display); font-size: 1.25rem; font-weight: 700; display: inline; }
.readout span { color: var(--mute); font-size: .8rem; margin-left: 4px; }
.readout small { color: var(--mute); font-size: .72rem; }
.readout.space #hudAlt { color: var(--ion); }
@media (max-width: 900px) { .readout { display: none; } }

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  display: flex; align-items: center; gap: 28px; padding: 14px var(--pad);
  transition: background .4s, transform .5s var(--ease), border-color .4s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(5, 8, 20, .62);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border-bottom-color: var(--line);
}
.nav.hide { transform: translateY(-100%); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--f-display); font-weight: 700; font-size: 1.05rem; margin-right: auto; }
.nav-links { display: flex; gap: clamp(14px, 2.4vw, 34px); }
.nav-links a { position: relative; padding: 6px 0; color: var(--mute); font-weight: 500; font-size: .95rem; transition: color .3s; }
.nav-links a::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--ion);
  transform: scaleX(0); transform-origin: left; transition: transform .5s var(--ease);
}
.nav-links a:hover, .nav-links a.active { color: var(--frost); }
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); }

.burger { display: none; width: 44px; height: 44px; position: relative; border-radius: 50%; border: 1px solid var(--line2); }
.burger span { position: absolute; left: 13px; right: 13px; height: 2px; background: var(--frost); transition: transform .4s var(--ease), top .4s var(--ease); }
.burger span:nth-child(1) { top: 18px; } .burger span:nth-child(2) { top: 24px; }
.menu-open .burger span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.menu-open .burger span:nth-child(2) { top: 21px; transform: rotate(-45deg); }

.menu {
  position: fixed; inset: 0; z-index: 55; background: var(--void); display: grid; place-items: center;
  clip-path: circle(0% at calc(100% - 44px) 36px); transition: clip-path .7s var(--ease-io); visibility: hidden;
}
.menu-open .menu { clip-path: circle(150% at calc(100% - 44px) 36px); visibility: visible; }
.menu nav { display: grid; gap: 6px; text-align: center; }
.menu a { font-family: var(--f-display); font-weight: 700; font-size: clamp(2rem, 9vw, 3.4rem); padding: 6px 0; }
.menu a:hover { color: var(--ion); }

@media (max-width: 860px) {
  .nav-links, .nav-cta { display: none; }
  .burger { display: block; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 26px; border-radius: 999px; font-weight: 600; font-size: .98rem;
  border: 1px solid transparent; transition: transform .3s var(--ease), background .3s, color .3s, border-color .3s, box-shadow .3s;
  will-change: transform;
}
.btn-primary { background: var(--frost); color: var(--void); }
.btn-primary:hover { background: var(--ion); box-shadow: 0 10px 40px -8px rgba(94, 224, 255, .55); }
.btn-ghost { border-color: var(--line2); color: var(--frost); }
.btn-ghost:hover { border-color: var(--ion); color: var(--ion); }
.btn-small { padding: 9px 18px; font-size: .9rem; }

.text-link {
  position: relative; display: inline-block; font-weight: 600; color: var(--ion); padding-bottom: 2px;
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat; transition: background-size .5s var(--ease);
}
.text-link:hover { background-size: 0 1px; background-position: 100% 100%; }

/* ---------- Reveal system ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: var(--d, 0s); }
.js [data-reveal].in { opacity: 1; transform: none; }
.hero [data-reveal] { transform: none; }
.js .hero [data-reveal] { transform: translateY(18px); }
.js .loaded .hero [data-reveal], .js.loaded .hero [data-reveal] { opacity: 1; transform: none; }

.w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .14em; margin-bottom: -.14em; }
.wi { display: inline-block; transform: translateY(108%); transition: transform 1s var(--ease); transition-delay: calc(var(--i) * 55ms); }
[data-split].in .wi { transform: none; }

/* ---------- Headings ---------- */
.h2 {
  font-family: var(--f-display); font-weight: 700; letter-spacing: -.025em; line-height: 1.04;
  font-size: clamp(2.1rem, 5.2vw, 4.4rem); max-width: 17ch; text-wrap: balance;
}

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: center; padding: 120px 0 80px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); gap: clamp(24px, 4vw, 64px); align-items: center; width: 100%; }
.hero-kicker { color: var(--ion); font-weight: 600; margin-bottom: 18px; }
.hero-name {
  font-family: var(--f-display); font-weight: 800; letter-spacing: -.035em; line-height: .96;
  font-size: clamp(2.5rem, 6.7vw, 6.4rem);
}
.hero-name .line { display: block; overflow: hidden; padding-bottom: .1em; margin-bottom: -.1em; white-space: nowrap; }
.hero-name .line:last-child { color: transparent; -webkit-text-stroke: 1.5px var(--frost); }
.hero-name .ch { display: inline-block; }
.js .hero-name .ch { transform: translateY(112%) rotate(6deg); transition: transform 1.1s var(--ease); transition-delay: calc(var(--i) * 45ms + 250ms); }
.js.loaded .hero-name .ch { transform: none; }
.hero-role { margin-top: 28px; font-family: var(--f-display); font-weight: 600; font-size: clamp(1.2rem, 2.4vw, 1.9rem); }
.typed { color: var(--ion); }
.caret { display: inline-block; width: 2px; height: 1em; margin-left: 4px; background: var(--ember); vertical-align: -.12em; animation: blink 1s steps(1) infinite; }
.hero-lede { margin-top: 20px; max-width: 52ch; color: var(--mute); }
.hero-cta { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 14px; }

.hero-visual { display: grid; place-items: center; }
.orbit { position: relative; width: min(100%, 500px); aspect-ratio: 1; }
.ring { position: absolute; border-radius: 50%; border: 1px solid var(--line2); }
.ring.r1 { inset: 2%; animation: spin 46s linear infinite; }
.ring.r2 { inset: 9%; border-style: dashed; border-color: var(--line); animation: spin 70s linear infinite reverse; }
.ring.r3 { inset: -7%; border-color: var(--line); animation: spin 110s linear infinite; }
.ring::after { content: ''; position: absolute; top: -4px; left: 50%; width: 8px; height: 8px; margin-left: -4px; border-radius: 50%; background: var(--ion); box-shadow: 0 0 14px 2px var(--ion); }
.ring.r2::after { top: auto; bottom: -4px; background: var(--ember); box-shadow: 0 0 14px 2px var(--ember); }
.ring.r3::after { left: 14%; top: 14%; width: 5px; height: 5px; background: var(--frost); box-shadow: 0 0 10px var(--frost); }

.portrait {
  position: absolute; left: 11%; right: 11%; top: -5%; bottom: -5%;
  overflow: hidden; background: transparent;
  -webkit-mask-image: radial-gradient(ellipse 78% 74% at 50% 40%, #000 52%, transparent 100%);
  mask-image: radial-gradient(ellipse 78% 74% at 50% 40%, #000 52%, transparent 100%);
  transition: transform .45s var(--ease); will-change: transform; transform-style: preserve-3d;
}
.portrait img {
  width: 100%; height: 100%; object-fit: cover; object-position: 50% 12%;
  filter: grayscale(1) brightness(.74) contrast(1.22);
  transform: scale(1.03); transition: transform 1.4s var(--ease), filter .8s;
}
.portrait::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to top, rgba(5, 8, 20, .92) 0%, rgba(5, 8, 20, 0) 46%),
              linear-gradient(to right, rgba(5, 8, 20, .55), rgba(5, 8, 20, 0) 32%, rgba(5, 8, 20, 0) 68%, rgba(5, 8, 20, .55));
  mix-blend-mode: normal;
}
.portrait:hover img { transform: scale(1.07); filter: grayscale(1) brightness(.86) contrast(1.2); }

.chip {
  position: absolute; z-index: 3; padding: 8px 15px; border-radius: 999px; font-size: .84rem; font-weight: 500; white-space: nowrap;
  background: rgba(15, 23, 44, .72); border: 1px solid var(--line2);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); animation: float 7s ease-in-out infinite;
}
.chip::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--ion); margin-right: 8px; }
.c1 { left: -6%; top: 20%; } .c1::before { background: var(--ember); }
.c2 { right: -8%; top: 46%; animation-delay: -2.4s; }
.c3 { left: 2%; bottom: 8%; animation-delay: -4.6s; }

.scroll-cue { position: absolute; left: 50%; bottom: 26px; width: 26px; height: 42px; margin-left: -13px; border: 1px solid var(--line2); border-radius: 14px; }
.scroll-cue span { position: absolute; left: 50%; top: 8px; width: 3px; height: 8px; margin-left: -1.5px; border-radius: 2px; background: var(--ember); animation: cue 1.8s var(--ease) infinite; }

@media (max-width: 900px) {
  .hero { padding-top: 104px; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { order: -1; }
  .orbit { width: min(78%, 380px); }
  .c1 { left: -10%; } .c2 { right: -10%; }
  .scroll-cue { display: none; }
}
@media (max-width: 460px) {
  .hero-name { font-size: clamp(2.2rem, 12.4vw, 3rem); }
  .chip { font-size: .74rem; padding: 6px 11px; }
}

/* ---------- Marquee ---------- */
.marquee { overflow: hidden; border-block: 1px solid var(--line); padding: 22px 0; background: rgba(5, 8, 20, .55); }
.marquee-track { display: flex; width: max-content; animation: marq 44s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-group { display: flex; align-items: center; gap: 40px; padding-right: 40px; }
.marquee .t { font-family: var(--f-display); font-weight: 700; font-size: clamp(1.4rem, 3vw, 2.4rem); white-space: nowrap; color: var(--frost); }
.marquee .t.o { color: transparent; -webkit-text-stroke: 1px var(--line2); }
.mdot { width: 9px; height: 9px; border-radius: 50%; background: var(--ember); flex: none; }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.about-head { position: sticky; top: 120px; }
.about-body { display: grid; gap: 22px; color: var(--mute); }
.about-body .lead { font-size: clamp(1.2rem, 2vw, 1.55rem); line-height: 1.45; color: var(--frost); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 18px; border-top: 1px solid var(--line); }
.stat { padding: 22px 16px 0 0; display: grid; gap: 4px; align-content: start; }
.stat + .stat { padding-left: 18px; border-left: 1px solid var(--line); }
.stat b { font-family: var(--f-display); font-size: clamp(2.2rem, 4.4vw, 3.6rem); line-height: 1; color: var(--frost); font-variant-numeric: tabular-nums; }
.stat span { font-size: .88rem; line-height: 1.4; }
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-head { position: static; }
}
@media (max-width: 520px) { .stats { grid-template-columns: 1fr; } .stat + .stat { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); margin-top: 18px; } }

/* ---------- Rows (focus + credentials) ---------- */
.rows { margin-top: clamp(36px, 5vw, 64px); border-top: 1px solid var(--line); }
.row {
  position: relative; display: grid; grid-template-columns: 1fr 1.1fr; gap: 12px 32px; align-items: baseline;
  padding: clamp(24px, 3.4vw, 40px) 0; border-bottom: 1px solid var(--line);
}
.row::before { content: ''; position: absolute; left: 0; bottom: -1px; height: 1px; width: 0; background: var(--ion); transition: width .9s var(--ease); }
.row:hover::before { width: 100%; }
.row h3 { font-family: var(--f-display); font-weight: 700; font-size: clamp(1.6rem, 3.6vw, 3rem); line-height: 1.1; letter-spacing: -.02em; transition: transform .6s var(--ease), color .3s; }
.row:hover h3 { transform: translateX(14px); color: var(--ion); }
.row p { color: var(--mute); max-width: 56ch; }
.row p strong { color: var(--frost); font-weight: 600; }
@media (max-width: 760px) { .row { grid-template-columns: 1fr; } }

/* ---------- Projects (stacking panels) ---------- */
.stack { margin-top: clamp(36px, 5vw, 64px); display: grid; gap: 28px; }
.panel {
  position: sticky; top: calc(88px + var(--i) * 20px);
  display: grid; grid-template-columns: 1fr 1.1fr; min-height: min(70vh, 520px);
  border: 1px solid var(--line2); border-radius: 28px; overflow: hidden;
  background: rgba(10, 16, 32, .94); box-shadow: 0 30px 80px -40px rgba(0, 0, 0, .9);
}
.panel-text { padding: clamp(24px, 4vw, 52px); display: flex; flex-direction: column; justify-content: center; gap: 18px; }
.panel-text h3 { font-family: var(--f-display); font-weight: 700; font-size: clamp(1.7rem, 3.4vw, 2.8rem); line-height: 1.08; letter-spacing: -.02em; }
.panel-text p { color: var(--mute); max-width: 42ch; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags li { padding: 5px 13px; border: 1px solid var(--line2); border-radius: 999px; font-size: .84rem; color: var(--frost); }
.viz { position: relative; background: var(--ink); border-left: 1px solid var(--line); min-height: 260px; }
.viz canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
@media (max-width: 860px) {
  .panel { position: relative; top: 0; grid-template-columns: 1fr; min-height: 0; }
  .viz { border-left: 0; border-top: 1px solid var(--line); height: 280px; min-height: 0; }
}

/* ---------- GitHub ---------- */
.gh-head { display: grid; gap: 18px; }
.gh-sub { color: var(--mute); max-width: 60ch; }
.gh-bar { margin-top: 36px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-btn {
  padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line2); font-size: .88rem; font-weight: 500; color: var(--mute);
  transition: color .3s, border-color .3s, background .3s;
}
.chip-btn:hover { color: var(--frost); border-color: var(--frost); }
.chip-btn[aria-pressed="true"] { background: var(--frost); color: var(--void); border-color: var(--frost); }
.gh-status { color: var(--mute); font-size: .88rem; }
.gh-grid { margin-top: 24px; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 16px; }
.gh-card {
  position: relative; display: flex; flex-direction: column; gap: 12px; min-height: 190px; padding: 22px;
  border: 1px solid var(--line); border-radius: 16px; background: rgba(15, 23, 44, .6); overflow: hidden;
  transition: transform .5s var(--ease), border-color .3s; --mx: 50%; --my: 50%;
}
.gh-card::before {
  content: ''; position: absolute; inset: 0; opacity: 0; transition: opacity .4s; pointer-events: none;
  background: radial-gradient(360px circle at var(--mx) var(--my), rgba(94, 224, 255, .14), transparent 62%);
}
a.gh-card:hover { transform: translateY(-4px); border-color: var(--line2); }
a.gh-card:hover::before { opacity: 1; }
.gh-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.gh-top h3 { font-family: var(--f-display); font-weight: 700; font-size: 1.2rem; line-height: 1.2; overflow-wrap: anywhere; }
.badge-new { flex: none; padding: 2px 10px; border-radius: 999px; background: var(--ember); color: var(--void); font-size: .75rem; font-weight: 700; }
.gh-card p { color: var(--mute); font-size: .95rem; line-height: 1.5; flex: 1; }
.gh-topics { display: flex; flex-wrap: wrap; gap: 6px; }
.gh-topics li { font-size: .75rem; color: var(--ion); border: 1px solid rgba(94, 224, 255, .3); border-radius: 999px; padding: 1px 9px; }
.gh-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .82rem; color: var(--mute); }
.gh-meta .lang { display: inline-flex; align-items: center; gap: 6px; color: var(--frost); }
.gh-meta .lang i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.gh-msg { grid-column: 1 / -1; padding: 28px; border: 1px dashed var(--line2); border-radius: 16px; color: var(--mute); }
.gh-more { margin-top: 32px; }
.skel { background: linear-gradient(100deg, rgba(15, 23, 44, .6) 30%, rgba(40, 56, 98, .5) 50%, rgba(15, 23, 44, .6) 70%); background-size: 220% 100%; animation: shimmer 1.6s linear infinite; }

/* ---------- Contact ---------- */
.contact-grid { margin-top: clamp(36px, 5vw, 64px); display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(32px, 6vw, 88px); align-items: start; }
.mail {
  display: inline-block; font-family: var(--f-display); font-weight: 700; letter-spacing: -.02em; line-height: 1.1; overflow-wrap: anywhere;
  font-size: clamp(1.15rem, 4.2vw, 3.2rem);
  background: linear-gradient(var(--ion), var(--ion)) 0 100% / 0 2px no-repeat; transition: background-size .6s var(--ease), color .3s;
}
.mail:hover { background-size: 100% 2px; color: var(--ion); }
.copy-row { margin-top: 14px; }
.socials { margin-top: 40px; border-top: 1px solid var(--line); }
.socials a { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); transition: padding .5s var(--ease), color .3s; }
.socials span { font-family: var(--f-display); font-weight: 700; font-size: 1.3rem; }
.socials em { font-style: normal; color: var(--mute); font-size: .92rem; transition: color .3s; }
.socials a:hover { padding-left: 14px; color: var(--ion); }
.socials a:hover em { color: var(--frost); }

.form { display: grid; gap: 18px; padding: clamp(22px, 3vw, 36px); border: 1px solid var(--line2); border-radius: 24px; background: rgba(10, 16, 32, .8); }
.form label { display: grid; gap: 8px; font-weight: 500; font-size: .95rem; }
.form input, .form textarea {
  width: 100%; padding: 13px 15px; border-radius: 10px; border: 1px solid var(--line2); background: var(--void); color: var(--frost);
  font: inherit; transition: border-color .3s, box-shadow .3s; resize: vertical;
}
.form input:focus, .form textarea:focus { outline: none; border-color: var(--ion); box-shadow: 0 0 0 3px rgba(94, 224, 255, .2); }
.form input.bad, .form textarea.bad { border-color: var(--ember); }
.form-note { color: var(--mute); font-size: .88rem; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 30px 0 90px; color: var(--mute); background: rgba(5, 8, 20, .7); }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; font-size: .92rem; }

/* ---------- Keyframes ---------- */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes marq { to { transform: translateX(-50%); } }
@keyframes cue { 0% { transform: translateY(0); opacity: 1; } 70%, 100% { transform: translateY(16px); opacity: 0; } }
@keyframes shimmer { to { background-position: -220% 0; } }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0s !important; }
  .js [data-reveal], .wi, .js .hero-name .ch { opacity: 1 !important; transform: none !important; }
  .panel { position: relative; top: 0; }
  .marquee-track { animation: none; }
}


/* ---------- Atmosphere: deep-space vignette and fine film grain ---------- */
body::before {
  content: ''; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 90% 60% at 80% -10%, rgba(24, 40, 96, .55), transparent 62%),
    radial-gradient(ellipse 70% 50% at 0% 100%, rgba(10, 22, 58, .6), transparent 65%),
    radial-gradient(ellipse 120% 100% at 50% 50%, transparent 55%, rgba(0, 0, 0, .55) 100%);
}
body::after {
  content: ''; position: fixed; inset: 0; z-index: 3; pointer-events: none; opacity: .07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
