/* ============================================================
   Aafafiatna — Portfolio
   Theme: clean dark "space-tech" with neon-green accents
   ============================================================ */

/* Animatable custom property for the reveal radius */
@property --size {
  syntax: "<length>";
  inherits: false;
  initial-value: 0px;
}

/* ---- JMH Typewriter (self-hosted), used site-wide ---- */
@font-face {
  font-family: "JMH Typewriter";
  src: url("assets/fonts/jmh-typewriter-regular.woff") format("woff");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "JMH Typewriter";
  src: url("assets/fonts/jmh-typewriter-bold.woff") format("woff");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "JMH Typewriter";
  src: url("assets/fonts/jmh-typewriter-black.woff") format("woff");
  font-weight: 800 900;
  font-display: swap;
}

:root {
  --bg: #070b0c;
  --bg-2: #0b1113;
  --surface: rgba(18, 26, 28, 0.6);
  --text: #eaf2ef;
  --text-dim: #9fb2ad;
  --text-faint: #6f827d;

  --accent: #34f08a;          /* neon green */
  --accent-2: #19c46a;
  --accent-soft: rgba(52, 240, 138, 0.16);
  --accent-glow: rgba(52, 240, 138, 0.55);

  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(52, 240, 138, 0.35);

  --radius: 16px;
  --maxw: 1200px;
  --nav-h: 76px;

  --font-display: "JMH Typewriter", "Courier New", ui-monospace, monospace;
  --font-body: "JMH Typewriter", "Courier New", ui-monospace, monospace;
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 24px); }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: min(1080px, calc(100% - 32px));   /* floating island — not full width */
  height: 62px;
  z-index: 100;
  display: flex;
  align-items: center;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(7, 11, 12, 0.7);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 12px 30px -18px rgba(0, 0, 0, 0.7);
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, top 0.3s ease;
}
.navbar.scrolled {
  top: 10px;
  background: rgba(7, 11, 12, 0.82);
  border-color: var(--border-strong);
  box-shadow: 0 16px 38px -16px rgba(0, 0, 0, 0.8);
}

.nav-inner {
  width: 100%;
  padding: 0 14px 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.18rem;
  letter-spacing: -0.02em;
}
.brand-mark {
  display: grid;
  place-items: center;
  color: var(--accent);
  filter: drop-shadow(0 0 8px var(--accent-glow));
}
.brand-accent { color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-links > a:not(.nav-cta) {
  position: relative;
  padding: 8px 14px;
  font-size: 0.94rem;
  font-weight: 500;
  color: var(--text-dim);
  border-radius: 8px;
  transition: color 0.2s ease, background 0.2s ease;
}
.nav-links > a:not(.nav-cta):hover { color: var(--text); }
.nav-links > a.active { color: var(--accent); }
.nav-links > a.active::after {
  content: "";
  position: absolute;
  left: 14px; right: 14px; bottom: 2px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  box-shadow: 0 0 8px var(--accent-glow);
}

.nav-cta {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 10px 20px;
  color: #06140d;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-radius: 10px;
  box-shadow: 0 6px 20px -6px var(--accent-glow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.nav-cta:hover { transform: translateY(-2px); box-shadow: 0 10px 26px -6px var(--accent-glow); }
.nav-cta--mobile { display: none; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px; height: 44px;
  background: none; border: none; cursor: pointer;
  padding: 10px;
}
.nav-toggle span {
  display: block; height: 2px; width: 100%;
  background: var(--text); border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: calc(var(--nav-h) + 40px) 24px 60px;
  overflow: hidden;
}

/* --- one continuous, page-wide deep-space background (fixed) --- */
.space-bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
/* Three.js particle-wave canvas — fills the fixed background */
#particleWave {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  display: block;
}

/* --- layout --- */
.hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 48px;
}

/* --- copy --- */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 15px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  margin-bottom: 26px;
}
.hero-badge-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 var(--accent-glow);
  animation: pulse 2s infinite;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.4rem, 5.2vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 22px;
}
.hero-title .grad {
  background: linear-gradient(120deg, var(--accent) 10%, #aeffce 60%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-title-sub {
  display: inline-block;
  margin-top: 8px;
  font-size: clamp(1.1rem, 2.4vw, 1.6rem);
  font-weight: 500;
  color: var(--text-dim);
  letter-spacing: -0.01em;
}

.hero-desc {
  max-width: 30rem;
  color: var(--text-dim);
  font-size: 1.05rem;
  margin-bottom: 34px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 44px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.98rem;
  padding: 14px 26px;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}
.btn-primary {
  color: #06140d;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 10px 28px -8px var(--accent-glow);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 16px 34px -8px var(--accent-glow); }
.btn-primary svg { transition: transform 0.2s ease; }
.btn-primary:hover svg { transform: translateX(4px); }
.btn-ghost {
  color: var(--text);
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
}
.btn-ghost:hover { border-color: var(--border-strong); background: var(--accent-soft); transform: translateY(-3px); }

.hero-stats { display: flex; align-items: center; gap: 26px; }
.stat { display: flex; flex-direction: column; }
.stat-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.7rem;
  color: var(--text);
  line-height: 1.1;
}
.stat-label { font-size: 0.82rem; color: var(--text-faint); }
.stat-divider { width: 1px; height: 38px; background: var(--border); }

/* ============================================================
   HERO VISUAL + CURSOR REVEAL
   ============================================================ */
.hero-visual {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-self: center;
}
.hero-visual-glow {
  position: absolute;
  inset: 6% 8% 0 8%;
  background: radial-gradient(closest-side, rgba(52,240,138,0.22), transparent 75%);
  filter: blur(30px);
  z-index: 0;
}

.hero-frame {
  position: relative;
  width: min(420px, 78vw);
  aspect-ratio: 392 / 636;            /* matches the robot image */
  z-index: 1;
  animation: floatY 6s ease-in-out infinite;
  touch-action: none;                 /* let touch-drag drive the reveal instead of scrolling */
  /* default lens position (before any pointer movement) */
  --mx: 50%;
  --my: 38%;
  --lens-opacity: 0;
}

.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  user-select: none;
  -webkit-user-drag: none;
}

/* Robot stays fully visible as the base layer */
.hero-img--robot {
  filter: drop-shadow(0 24px 50px rgba(0,0,0,0.55));
}

/* Real photo only shows inside the moving circular mask */
.hero-img--real {
  --size: 0px;
  -webkit-mask-image: radial-gradient(circle var(--size) at var(--mx) var(--my),
                       #000 58%, rgba(0,0,0,0.35) 80%, transparent 100%);
          mask-image: radial-gradient(circle var(--size) at var(--mx) var(--my),
                       #000 58%, rgba(0,0,0,0.35) 80%, transparent 100%);
  -webkit-mask-repeat: no-repeat;
          mask-repeat: no-repeat;
  transition: --size 0.35s ease;
  filter: drop-shadow(0 24px 50px rgba(0,0,0,0.45));
}

/* HUD scanner ring traces the reveal */
.hero-lens {
  position: absolute;
  left: var(--mx);
  top: var(--my);
  width: calc(var(--size) * 1.9);
  height: calc(var(--size) * 1.9);
  transform: translate(-50%, -50%);
  border: 1.5px solid var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 26px var(--accent-glow), inset 0 0 22px rgba(52,240,138,0.25);
  opacity: var(--lens-opacity);
  transition: --size 0.35s ease, opacity 0.3s ease;
  pointer-events: none;
}
.hero-lens::before {
  content: "";
  position: absolute;
  inset: -7px;
  border-radius: 50%;
  border: 1px dashed rgba(52,240,138,0.45);
  animation: spin 8s linear infinite;
}

.hero-hint {
  position: relative;
  z-index: 2;
  margin-top: 18px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-faint);
  transition: opacity 0.3s ease;
}
.hero-hint svg { color: var(--accent); }
.hero-frame.is-active ~ .hero-hint { opacity: 0; }

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 var(--accent-glow); }
  70%  { box-shadow: 0 0 0 8px rgba(52,240,138,0); }
  100% { box-shadow: 0 0 0 0 rgba(52,240,138,0); }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-26px); }
}
@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-14px); }
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  /* On mobile the hero stacks taller than the viewport; a sticky hero would
     pin at the top and hide the copy below the image. Use normal flow so the
     h1 / buttons / stats scroll into view. */
  .hero {
    position: relative;
    min-height: auto;
    padding-top: calc(var(--nav-h) + 28px);
    padding-bottom: 64px;
  }
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }
  .hero-badge { margin-inline: auto; }
  .hero-desc { margin-inline: auto; }
  .hero-actions, .hero-stats { justify-content: center; }
  .hero-copy { order: 2; }
  .hero-visual { order: 1; }
  .hero-frame { width: min(340px, 70vw); }

  .nav-cta--desktop { display: none; }
  .nav-toggle { display: flex; }

  .nav-links {
    position: fixed;
    inset: var(--nav-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 18px 24px 24px;
    background: rgba(7, 11, 12, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    transform: translateY(-130%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links > a:not(.nav-cta) { padding: 14px 16px; font-size: 1.02rem; }
  .nav-links > a.active::after { display: none; }
  .nav-cta--mobile { display: block; text-align: center; margin-top: 8px; }
}

@media (max-width: 480px) {
  .hero-stats { gap: 16px; }
  .stat-num { font-size: 1.4rem; }
  .nav-inner { padding: 0 18px; }
}

/* ============================================================
   ABOUT ME — hero-style bg, big glass title, glass card w/ shine
   ============================================================ */
.am-section {
  position: relative;
  z-index: 1;                 /* above the fixed page background; transparent bg */
  padding: 0 24px clamp(80px, 12vh, 140px);
  /* no top padding & no overflow clip — the title lifts up onto the boundary */
}
.am-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
}

/* big transparent "ABOUT ME" — straddles the hero↔about boundary as the divider */
.am-titlewrap {
  width: 100vw;
  margin-left: calc(50% - 50vw);                    /* full-bleed, edge-to-edge band */
  margin-top: clamp(-90px, -6.5vw, -48px);          /* straddle the hero↔about boundary */
  margin-bottom: clamp(40px, 7vh, 72px);
  padding: clamp(16px, 3.4vh, 40px) 24px;
  display: flex;
  justify-content: center;                          /* text centered in the glass frame */
  background: rgba(255, 255, 255, 0.08);            /* frosted glass — only on the FRAME */
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
/* "ABOUT ME" letters are KNOCKED OUT of the glass: they reveal the page
   background behind (truly transparent, not a grey fill) + a light that RUNS
   across them. */
.am-bigtitle {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.4rem, 11vw, 8.5rem);
  line-height: 1;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
  color: transparent;
  -webkit-text-fill-color: transparent;
  background-image:
    linear-gradient(100deg, rgba(255,255,255,0) 41%, rgba(255,255,255,0.9) 50%, rgba(255,255,255,0) 59%),
    radial-gradient(1200px 800px at 78% 22%, rgba(52,240,138,0.32), transparent 58%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  background-attachment: scroll, fixed, fixed;      /* fixed layers align with the page bg → see-through */
  background-size: 260% 100%, 100vw 100vh, 100vw 100vh;
  background-position: 160% 0, center, center;
  background-repeat: no-repeat;
  -webkit-background-clip: text;
  background-clip: text;
  animation: amRun 5s linear infinite;
}
@keyframes amRun {
  from { background-position: 160% 0, center, center; }
  to   { background-position: -100% 0, center, center; }
}

/* about body: card (left) + social logos (right) */
.am-body {
  display: flex;
  align-items: flex-start;
  gap: clamp(20px, 4vw, 56px);
}
/* explanation card — glass, materialises like a hologram */
.am-card {
  flex: 1 1 540px;
  max-width: 600px;
  padding: 32px clamp(24px, 3vw, 38px) 34px;
  border-radius: 20px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.025));
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 24px 60px -28px rgba(0, 0, 0, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}
/* hologram materialise reveal (triggered when scrolled into view) */
.am-card[data-holo] { opacity: 0; }
.am-card[data-holo].is-in { animation: holoReveal 1.2s ease-out forwards; }
@keyframes holoReveal {
  0%   { opacity: 0; transform: translateY(16px) scale(.985); filter: brightness(1.9) saturate(.4); clip-path: inset(46% 0 46% 0); }
  18%  { opacity: .55; clip-path: inset(0 0 62% 0); }
  30%  { opacity: .2; }                         /* flicker */
  44%  { opacity: .9; clip-path: inset(0); filter: brightness(1.35); }
  56%  { opacity: .4; }                         /* flicker */
  72%  { opacity: 1; filter: brightness(1.1); }
  84%  { opacity: .7; }                         /* flicker */
  100% { opacity: 1; transform: none; filter: none; clip-path: inset(0); }
}
.am-kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
  text-shadow: 0 0 12px var(--accent-glow);
  margin-bottom: 18px;
}
.am-kicker-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 var(--accent-glow);
  animation: pulse 2s infinite;
}
.am-text {
  color: var(--text-dim);
  font-size: clamp(0.84rem, 1.15vw, 0.98rem);
  line-height: 1.8;
  margin-bottom: 14px;
}
.am-text:last-child { margin-bottom: 0; }

/* --- glass shine sweep --- */
.glass-shine { position: relative; overflow: hidden; }
.glass-shine::after {
  content: "";
  position: absolute;
  top: -25%;
  left: -75%;
  width: 55%;
  height: 150%;
  background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, 0.22) 50%, transparent 80%);
  transform: skewX(-18deg);
  pointer-events: none;
  animation: glassShine 5s ease-in-out infinite;
}
@keyframes glassShine {
  0%   { left: -75%; }
  55%, 100% { left: 150%; }
}

/* ============================================================
   SOCIAL LOGOS — physics: fall, stack at the bottom, drag & re-drop
   ============================================================ */
.am-social {
  position: relative;
  flex: 0 0 clamp(320px, 42vw, 540px);     /* much wider play area */
  align-self: stretch;
  min-height: 400px;
  overflow: hidden;                        /* the "box" stones fall into */
}
.social-orb {
  position: absolute;
  left: 0;
  top: 0;
  width: clamp(66px, 7vw, 96px);           /* bigger — like falling stones */
  aspect-ratio: 1;
  cursor: grab;
  opacity: 0;                              /* JS reveals once positioned */
  touch-action: none;                      /* drag instead of scroll on touch */
  will-change: transform;
  -webkit-tap-highlight-color: transparent;
}
.social-orb.grabbing { cursor: grabbing; }
.so-inner {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: 24px;
  color: #fff;
  box-shadow: 0 14px 30px -8px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transition: box-shadow 0.25s ease, filter 0.25s ease;
}
.so-inner svg { width: 52%; height: 52%; }
.social-orb:hover .so-inner { filter: brightness(1.12); box-shadow: 0 18px 36px -8px rgba(0, 0, 0, 0.7), 0 0 0 2px rgba(255, 255, 255, 0.35), 0 0 28px -2px var(--glow, rgba(255,255,255,0.5)); }

/* brand colours */
.so-ig .so-inner { background: linear-gradient(45deg, #feda75, #fa7e1e 26%, #d62976 52%, #962fbf 76%, #4f5bd5); --glow: rgba(214,41,118,0.7); }
.so-li .so-inner { background: #0a66c2; --glow: rgba(10,102,194,0.8); }
.so-fb .so-inner { background: #1877f2; --glow: rgba(24,119,242,0.8); }
.so-gh .so-inner { background: #1b1f24; --glow: rgba(160,170,180,0.6); }

/* big two-line "Social Media" label centred in the social area, waving like a flag */
.sm-label {
  position: absolute;
  top: 44%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 0;                       /* behind the falling orbs */
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.04em;
  pointer-events: none;
  user-select: none;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 4.6vw, 3.4rem);
  line-height: 1;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(234, 242, 239, 0.92);
  text-shadow: 0 0 22px rgba(52, 240, 138, 0.4), 0 3px 10px rgba(0, 0, 0, 0.55);
}
.sm-line { display: flex; }
.sm-line > span {
  display: inline-block;
  transform-origin: bottom center;
  animation: flagWave 2.1s ease-in-out infinite;
  animation-delay: calc(var(--i) * 0.1s);
}
@keyframes flagWave {
  0%, 100% { transform: translateY(0) skewX(0deg) rotate(0deg); }
  50%      { transform: translateY(-0.18em) skewX(-6deg) rotate(-3deg); }
}

/* scroll-reveal entrance */
[data-reveal] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}
[data-reveal].is-in { opacity: 1; transform: none; }

@media (max-width: 900px) {
  .am-body { flex-direction: column; }
  .am-card { flex: none; width: 100%; max-width: 560px; }
  .am-social { flex: none; width: 100%; min-height: 260px; }
}

/* ============================================================
   SKILLS — full-width logo marquee, looping right → left
   ============================================================ */
.skills-section {
  position: relative;
  z-index: 1;
  padding: clamp(56px, 9vh, 110px) 0;       /* full-bleed: no horizontal padding */
  overflow: hidden;
}
.skills-head { text-align: center; margin-bottom: clamp(34px, 5vh, 56px); padding: 0 24px; }
.skills-eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-display);
  font-size: 0.82rem; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--accent); text-shadow: 0 0 12px var(--accent-glow);
}
.skills-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 3.2rem);
  letter-spacing: -0.02em;
  color: var(--text);
  margin-top: 8px;
}

.marquee {
  width: 100%;
  overflow: hidden;
  /* fade the left/right edges so logos appear/disappear smoothly */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
.marquee-track {
  display: flex;
  width: max-content;
  list-style: none;
  animation: marqueeMove 30s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marqueeMove {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }     /* one full (duplicated) set → seamless loop */
}
/* second row loops the opposite way (left → right); no separator between rows */
.marquee + .marquee { margin-top: clamp(26px, 4.5vh, 50px); }
.marquee--rev .marquee-track { animation-direction: reverse; }
.skill {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  margin-right: clamp(46px, 6vw, 96px);     /* spacing (margin, not gap, keeps loop seamless) */
}
.skill img {
  height: clamp(54px, 6.5vw, 84px);         /* slightly larger logos, no background */
  width: auto;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.5));
  transition: transform 0.25s ease;
  pointer-events: none;
  -webkit-user-drag: none;
}
.skill:hover img { transform: translateY(-6px) scale(1.06); }
.skill span {
  font-family: var(--font-display);
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  color: var(--text-dim);
  white-space: nowrap;
}

/* ============================================================
   CONTACT — big see-through title centered below Skills; a glass
   form overlaps only the bottom of the title; the planets artwork
   occludes the form; the spaceship's nose overlaps the form bottom.
   ============================================================ */
.contact-section {
  position: relative;
  z-index: 1;                       /* transparent over the fixed space bg */
  padding: clamp(2px, 0.6vh, 12px) 24px 0;   /* nearly zero — Portfolio content almost touches CONTACT */
  overflow: hidden;
  text-align: center;
}

/* dedicated space backdrop — behind form/planets/ship; top fades to merge with page bg */
.ct-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: url("assets/contact-bg.jpg?v=23");
  background-size: cover;
  background-position: center top;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.35) 10%, #000 28%, #000 100%);
          mask-image: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.35) 10%, #000 28%, #000 100%);
}
/* soft gradient blur over the top edge so the image dissolves into the page bg */
.ct-bg::after {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 38%;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 35%, transparent 100%);
          mask-image: linear-gradient(180deg, #000 0%, #000 35%, transparent 100%);
  pointer-events: none;
}

/* big knockout "CONTACT" — centered, nearly edge-to-edge; letters reveal the bg */
.ct-bigtitle {
  position: relative;
  z-index: 1;
  margin: 0 auto;
  width: 100%;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3rem, 19vw, 17rem);
  line-height: 0.9;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
  color: transparent;
  -webkit-text-fill-color: transparent;
  background-image:
    linear-gradient(100deg, rgba(255,255,255,0) 42%, rgba(255,255,255,0.9) 50%, rgba(255,255,255,0) 58%),
    radial-gradient(1200px 800px at 50% 35%, rgba(52,240,138,0.30), transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  background-attachment: scroll, fixed, fixed;
  background-size: 260% 100%, 100vw 100vh, 100vw 100vh;
  background-position: 160% 0, center, center;
  background-repeat: no-repeat;
  -webkit-background-clip: text;
  background-clip: text;
  animation: amRun 6s linear infinite;
}

/* form pulled up so it overlaps ONLY the bottom of the title */
.ct-formwrap {
  position: relative;
  z-index: 2;
  width: min(760px, 100%);
  margin: clamp(-58px, -4.6vw, -30px) auto 0;
  text-align: left;
}
.ct-form {
  position: relative;
  z-index: 1;
  padding: clamp(24px, 3vw, 40px);
  border-radius: 22px;
  background: linear-gradient(160deg, rgba(255,255,255,0.09), rgba(255,255,255,0.03));
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255,255,255,0.16);
  box-shadow: 0 30px 70px -30px rgba(0,0,0,0.8), inset 0 1px 0 rgba(255,255,255,0.16);
}
.ct-form .am-kicker { margin-bottom: 18px; }

/* multi-field grid → wider & taller form */
.ct-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 16px;
}
.ct-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ct-field--full { grid-column: 1 / -1; }
.ct-field > span {
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.ct-form input,
.ct-form textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text);
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 12px;
  padding: 12px 14px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.ct-form textarea { min-height: 130px; line-height: 1.6; resize: vertical; }
.ct-form input::placeholder,
.ct-form textarea::placeholder { color: rgba(159,178,173,0.65); }
.ct-form input:focus,
.ct-form textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(52,240,138,0.18);
  background: rgba(255,255,255,0.07);
}
.ct-actions { display: flex; gap: 14px; margin-top: 20px; }
.ct-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.01em;
  padding: 14px 16px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.25s ease, filter 0.2s ease;
}
.ct-btn svg { width: 18px; height: 18px; flex: none; }
.ct-btn--mail { background: var(--accent); color: #052b18; box-shadow: 0 12px 28px -10px var(--accent-glow); }
.ct-btn--wa   { background: #25d366; color: #04200f; box-shadow: 0 12px 28px -10px rgba(37,211,102,0.6); }
.ct-btn:hover { transform: translateY(-2px); filter: brightness(1.06); }
.ct-btn:active { transform: translateY(0); }

/* planets artwork — overlaps/occludes the form per the image's own layout */
.ct-planets {
  position: absolute;
  z-index: 2;                       /* above .ct-form */
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 144%;
  max-width: none;
  pointer-events: none;             /* clicks pass through to the form */
  user-select: none;
  -webkit-user-drag: none;
  filter: drop-shadow(0 22px 44px rgba(0,0,0,0.5));
  animation: ctFloat 16s ease-in-out infinite;
  transition: opacity 0.35s ease;
}
@keyframes ctFloat {
  0%, 100% { transform: translate(-50%, -50%); }
  50%      { transform: translate(-50%, calc(-50% - 12px)); }
}

/* spaceship artwork — nose overlaps the bottom of the form */
.ct-ship {
  position: relative;
  z-index: 3;                       /* in front of the form's bottom edge */
  display: block;
  width: min(1180px, 116%);
  max-width: none;
  margin: clamp(-130px, -11vw, -60px) auto 0;   /* tuck up under the form bottom */
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  filter: drop-shadow(0 30px 60px rgba(0,0,0,0.55));
  transition: opacity 0.35s ease;
}

/* while the form is being filled: lift the form to the very front; planets & ship
   sit BEHIND the form but stay fully opaque and IN FRONT of .ct-bg (not transparent) */
.contact-section.is-filling .ct-formwrap { z-index: 20; }
.contact-section.is-filling .ct-planets { z-index: 0; }

@media (max-width: 720px) {
  .ct-grid { grid-template-columns: 1fr; }
  .ct-actions { flex-direction: column; }
  .ct-planets { width: 168%; }
  .ct-ship { width: 150%; }
}

/* copyright — lives inside the contact section, no background, merges with the space bg */
.ct-copyright {
  position: relative;
  z-index: 4;                       /* above .ct-bg / planets, readable */
  margin: clamp(20px, 4vh, 44px) 0 0;
  padding-bottom: 22px;
  text-align: left;
  font-family: var(--font-display);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  color: var(--text-dim);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6);   /* keep it legible over bright stars */
}

/* ============================================================
   PORTFOLIO — 3D cylindrical carousel.  Cards orbit the central
   rocket in a true CSS perspective cylinder. JS sets each card's
   rotateY + translateZ, and interleaves z-index around the rocket
   (z-index 50). Auto-orbit + scroll-driven + drag-to-spin.
   ============================================================ */
.portfolio-section {
  position: relative;
  z-index: 1;
  padding: clamp(50px, 9vh, 120px) 24px 0;
  overflow: hidden;
  text-align: center;
}
/* big knockout "PORTOFOLIO" (same see-through technique as the contact title) */
.pf-bigtitle {
  position: relative;
  z-index: 1;
  margin: 0 auto;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 13vw, 11rem);   /* big, fits the 10-letter word */
  line-height: 0.9;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
  color: transparent;
  -webkit-text-fill-color: transparent;
  background-image:
    linear-gradient(100deg, rgba(255,255,255,0) 42%, rgba(255,255,255,0.9) 50%, rgba(255,255,255,0) 58%),
    radial-gradient(1200px 800px at 50% 40%, rgba(52,240,138,0.30), transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  background-attachment: scroll, fixed, fixed;
  background-size: 260% 100%, 100vw 100vh, 100vw 100vh;
  background-position: 160% 0, center, center;
  background-repeat: no-repeat;
  -webkit-background-clip: text;
  background-clip: text;
  animation: amRun 6s linear infinite;
}

/* stage: the 3D perspective viewport for the carousel */
.pf-stage {
  position: relative;
  min-height: clamp(620px, 96vh, 1000px);
  margin-top: clamp(-10px, -1vw, -4px);
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1200px;
  perspective-origin: 50% 50%;
  cursor: grab;
  touch-action: pan-y;         /* allow vertical scroll, capture horizontal for drag */
  user-select: none;
  -webkit-user-select: none;
}
.pf-stage.is-dragging { cursor: grabbing; }

/* orbit container — JS rotates this around Y axis */
.pf-orbit {
  position: absolute;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  will-change: transform;
  pointer-events: none;        /* clicks go through to individual cards */
}

/* each card face on the cylinder — JS sets the static rotateY + translateZ;
   the parent .pf-orbit rotation spins them all together */
.pf-card {
  position: absolute;
  top: 50%;
  left: 50%;
  width: clamp(180px, 20vw, 280px);
  margin: 0;
  padding: 10px;
  border-radius: 18px;
  overflow: visible;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.04));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow:
    0 24px 54px -14px rgba(0, 0, 0, 0.82),
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 0 24px -6px rgba(52, 240, 138, 0.12);
  transform-style: preserve-3d;
  will-change: transform, opacity;
  pointer-events: auto;
  cursor: pointer;
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}
/* glass shine sweep across the card */
.pf-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 18px;
  background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, 0.10) 50%, transparent 62%);
  pointer-events: none;
  z-index: 2;
}
/* subtle glow on hover */
.pf-card:hover {
  border-color: rgba(52, 240, 138, 0.35);
  box-shadow:
    0 28px 60px -14px rgba(0, 0, 0, 0.85),
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 0 32px -4px rgba(52, 240, 138, 0.22);
}
.pf-card img {
  width: 100%;
  aspect-ratio: 520 / 347;
  object-fit: cover;
  display: block;
  border-radius: 10px;
  box-shadow: 0 4px 16px -4px rgba(0, 0, 0, 0.5);
  pointer-events: none;
  -webkit-user-drag: none;
}
/* card label bar at the bottom of the glass frame */
.pf-card figcaption {
  margin-top: 8px;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* central rocket — inside the orbit at Z=0; CSS 3D handles depth sorting
   with cards at translateZ(RADIUS). JS counter-rotates it so it always
   faces the viewer while the orbit spins. */
.pf-rocket-wrap {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transform-style: preserve-3d;          /* participate in 3D depth sorting */
  pointer-events: none;
  will-change: transform;
}
.pf-rocket {
  height: clamp(560px, 88vh, 1000px);    /* large & prominent inside the orbit ring */
  width: auto;
  filter: drop-shadow(0 30px 52px rgba(255, 150, 40, 0.32)) drop-shadow(0 12px 24px rgba(0, 0, 0, 0.55));
  animation: pfBob 3.6s ease-in-out infinite;
}
@keyframes pfBob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-9px); }
}

/* ---- Lightbox overlay ---- */
.pf-lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.pf-lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}
.pf-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.pf-lightbox-content {
  position: relative;
  z-index: 1;
  max-width: min(860px, 88vw);
  max-height: 80vh;
  padding: 16px;
  border-radius: 22px;
  background: linear-gradient(160deg, rgba(255,255,255,0.10), rgba(255,255,255,0.03));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.18);
  box-shadow: 0 40px 80px -20px rgba(0,0,0,0.8), 0 0 40px -8px rgba(52,240,138,0.15);
  transform: scale(0.85);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.pf-lightbox.is-open .pf-lightbox-content { transform: scale(1); }
.pf-lightbox-content img {
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
  border-radius: 12px;
  display: block;
}
.pf-lightbox-caption {
  margin-top: 12px;
  text-align: center;
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--text-dim);
}
.pf-lightbox-close {
  position: absolute;
  top: clamp(16px, 3vh, 30px);
  right: clamp(16px, 3vw, 30px);
  z-index: 2;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 14px;
  color: var(--text);
  cursor: pointer;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background 0.2s ease, transform 0.2s ease;
}
.pf-lightbox-close:hover {
  background: rgba(52,240,138,0.18);
  transform: scale(1.08);
}

@media (max-width: 720px) {
  .pf-card { width: clamp(130px, 38vw, 200px); }
  .pf-rocket { height: clamp(400px, 68vh, 660px); }
  .pf-stage { min-height: clamp(500px, 80vh, 760px); }
}

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