/* ═══════════════════════════════════════════════════════════════
   KENAN WAKED — AI Expert & Professional Programmer
   Design system: dark base + electric blue / violet / magenta / cyan
   ═══════════════════════════════════════════════════════════════ */

:root {
  /* Palette */
  --bg-0: #05060f;
  --bg-1: #0a0c1c;
  --bg-2: #101331;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-2: rgba(255, 255, 255, 0.07);
  --stroke: rgba(255, 255, 255, 0.09);
  --text-hi: #f4f6ff;
  --text-mid: #aeb4d8;
  --text-lo: #6b7199;

  --blue: #3b82f6;
  --electric: #4f7cff;
  --violet: #8b5cf6;
  --magenta: #ec4899;
  --cyan: #22d3ee;

  --grad-main: linear-gradient(100deg, #4f7cff 0%, #8b5cf6 35%, #ec4899 70%, #22d3ee 110%);

  /* Type */
  --font-display: "Sora", system-ui, sans-serif;
  --font-body: "Space Grotesk", system-ui, sans-serif;

  /* Rhythm */
  --section-pad: clamp(5rem, 12vh, 9rem);
  --container: 1200px;
  --radius: 18px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth; /* fallback when Lenis/JS unavailable */
}

html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  background: var(--bg-0);
  color: var(--text-hi);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Animated ambient gradient behind everything */
body::before {
  content: "";
  position: fixed;
  inset: -20%;
  z-index: -1;
  background:
    radial-gradient(40% 35% at 15% 20%, rgba(79, 124, 255, 0.13), transparent 70%),
    radial-gradient(35% 35% at 85% 15%, rgba(139, 92, 246, 0.12), transparent 70%),
    radial-gradient(40% 40% at 80% 85%, rgba(236, 72, 153, 0.10), transparent 70%),
    radial-gradient(35% 30% at 10% 80%, rgba(34, 211, 238, 0.09), transparent 70%);
  animation: meshDrift 26s ease-in-out infinite alternate;
  will-change: transform;
  pointer-events: none;
}
@keyframes meshDrift {
  0%   { transform: translate3d(-2%, -1%, 0) scale(1); }
  50%  { transform: translate3d(2%, 2%, 0) scale(1.06); }
  100% { transform: translate3d(-1%, 3%, 0) scale(1.02); }
}

::selection { background: rgba(139, 92, 246, 0.55); color: #fff; }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }

.container { width: min(var(--container), 92vw); margin-inline: auto; }

.grad-text {
  background: var(--grad-main);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gradShift 6s linear infinite;
}
@keyframes gradShift { to { background-position: 200% center; } }

/* ── Custom cursor ─────────────────────────────────────────── */
.cursor-dot, .cursor-ring {
  position: fixed;
  top: 0; left: 0;
  z-index: 9999;
  pointer-events: none;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  will-change: transform;
}
.cursor-dot {
  width: 8px; height: 8px;
  background: var(--cyan);
  box-shadow: 0 0 12px var(--cyan);
}
.cursor-ring {
  width: 38px; height: 38px;
  border: 1.5px solid rgba(139, 92, 246, 0.8);
  transition: width 0.25s var(--ease-out), height 0.25s var(--ease-out),
              border-color 0.25s, background-color 0.25s;
}
.cursor-ring.is-hover {
  width: 64px; height: 64px;
  border-color: rgba(34, 211, 238, 0.9);
  background: rgba(34, 211, 238, 0.08);
}
@media (hover: none), (pointer: coarse) {
  .cursor-dot, .cursor-ring { display: none; }
}
@media (hover: hover) and (pointer: fine) {
  body { cursor: none; }
  a, button, input, textarea, .skill-card, .project-card { cursor: none; }
}

/* ── Scroll progress ───────────────────────────────────────── */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 100%;
  background: var(--grad-main);
  transform-origin: 0 50%;
  transform: scaleX(0);
  z-index: 1001;
  pointer-events: none;
}

/* ── Preloader ─────────────────────────────────────────────── */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
}
.preloader__curtain {
  position: absolute;
  left: 0; width: 100%; height: 50.5%;
  background: var(--bg-0);
}
.preloader__curtain--top { top: 0; }
.preloader__curtain--bottom { bottom: 0; }
.preloader__inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.4rem;
}
.preloader__logo {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 9vw, 6rem);
  font-weight: 800;
  letter-spacing: 0.05em;
  display: flex;
  overflow: hidden;
}
.preloader__letter {
  display: inline-block;
  background: var(--grad-main);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  transform: translateY(110%);
}
.preloader__bar {
  width: min(260px, 60vw);
  height: 3px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.preloader__bar-fill {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: var(--grad-main);
}
.preloader__percent {
  font-size: 0.85rem;
  letter-spacing: 0.25em;
  color: var(--text-lo);
  font-variant-numeric: tabular-nums;
}
.preloader.is-done { pointer-events: none; }

/* ── Navbar ────────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.4rem clamp(1.2rem, 4vw, 3rem);
  transition: padding 0.45s var(--ease-out), background-color 0.45s, box-shadow 0.45s,
              backdrop-filter 0.45s, border-color 0.45s;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  padding-top: 0.7rem;
  padding-bottom: 0.7rem;
  background: rgba(6, 8, 20, 0.72);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border-color: var(--stroke);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
}
.nav__logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: 0.04em;
  display: flex;
  align-items: baseline;
}
.nav__logo-dot { color: var(--magenta); }
.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.4vw, 2.1rem);
  font-size: 0.95rem;
}
.nav__links a {
  position: relative;
  color: var(--text-mid);
  transition: color 0.25s;
  padding: 0.25rem 0;
}
.nav__links a:not(.nav__cta)::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 100%; height: 2px;
  border-radius: 2px;
  background: var(--grad-main);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.35s var(--ease-out);
}
.nav__links a:hover { color: var(--text-hi); }
.nav__links a:not(.nav__cta):hover::after { transform: scaleX(1); transform-origin: left; }
.nav__cta {
  color: var(--text-hi) !important;
  border: 1px solid rgba(139, 92, 246, 0.6);
  padding: 0.55rem 1.25rem !important;
  border-radius: 99px;
  transition: background-color 0.3s, box-shadow 0.3s, transform 0.3s;
}
.nav__cta:hover {
  background: rgba(139, 92, 246, 0.18);
  box-shadow: 0 0 24px rgba(139, 92, 246, 0.45);
  transform: translateY(-2px);
}
.nav__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 0.5rem;
  z-index: 1002;
}
.nav__burger span {
  width: 26px; height: 2px;
  background: var(--text-hi);
  border-radius: 2px;
  transition: transform 0.35s var(--ease-out), opacity 0.25s;
}
.nav__burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__burger.is-open span:nth-child(2) { opacity: 0; }
.nav__burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 820px) {
  .nav__burger { display: flex; }
  .nav__links {
    position: fixed;
    inset: 0;
    flex-direction: column;
    justify-content: center;
    gap: 2rem;
    font-size: 1.35rem;
    background: rgba(5, 6, 15, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s, visibility 0.4s;
  }
  .nav__links.is-open { opacity: 1; visibility: visible; }
}

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.95rem 2.1rem;
  border-radius: 99px;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.02em;
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s;
  will-change: transform;
}
.btn span { position: relative; z-index: 2; }
.btn--primary {
  background: var(--grad-main);
  background-size: 180% auto;
  color: #fff;
  box-shadow: 0 8px 30px rgba(139, 92, 246, 0.4);
}
.btn--primary:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 14px 44px rgba(236, 72, 153, 0.5);
  background-position: 100% center;
}
.btn--ghost {
  border: 1px solid var(--stroke);
  color: var(--text-hi);
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(6px);
}
.btn--ghost:hover {
  transform: translateY(-3px);
  border-color: rgba(34, 211, 238, 0.7);
  box-shadow: 0 0 30px rgba(34, 211, 238, 0.25);
}
/* JS-injected click ripple */
.btn .ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  transform: scale(0);
  animation: ripple 0.65s var(--ease-out) forwards;
  pointer-events: none;
  z-index: 1;
}
@keyframes ripple { to { transform: scale(4); opacity: 0; } }

/* ── HERO ──────────────────────────────────────────────────── */
.hero {
  position: relative;
  width: 100vw;
  height: 100vh;          /* fallback */
  height: 100dvh;         /* mobile browser chrome safe */
  min-height: 560px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}
.hero__bg-wrap {
  position: absolute;
  inset: 0;
  will-change: transform;
}
/* shared by the still image and the generated video loop */
.hero__media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% 35%; /* subject right third; media is top-padded so his head clears the navbar */
}
.hero__video {
  opacity: 0;
  transition: opacity 1s ease 0.2s;
}
.hero__video.is-ready { opacity: 1; }
@media (max-width: 640px) {
  .hero__media { object-position: 66% center; } /* keep Kenan in frame on portrait crops */
}
/* pulsing aura behind/around the subject */
.hero__aura {
  position: absolute;
  inset: 0;
  background: radial-gradient(46% 60% at 50% 42%, rgba(139, 92, 246, 0.28), rgba(34, 211, 238, 0.08) 55%, transparent 75%);
  mix-blend-mode: screen;
  opacity: 0.55;
  animation: auraPulse 5.5s ease-in-out infinite;
  pointer-events: none;
  will-change: opacity, transform;
}
@keyframes auraPulse {
  0%, 100% { opacity: 0.45; transform: scale(1); }
  50%      { opacity: 0.85; transform: scale(1.05); }
}
.hero__overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(5, 6, 15, 0.96) 0%, rgba(5, 6, 15, 0.55) 32%, rgba(5, 6, 15, 0.18) 60%, rgba(5, 6, 15, 0.35) 100%),
    radial-gradient(120% 90% at 50% 30%, transparent 40%, rgba(5, 6, 15, 0.55) 100%);
  pointer-events: none;
}
.hero__particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  mix-blend-mode: screen;
}
.hero__content {
  position: relative;
  z-index: 3;
  width: min(var(--container), 92vw);
  margin-inline: auto;
  padding-bottom: clamp(6rem, 16vh, 9.5rem);
}
.hero__eyebrow {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  font-size: 0.95rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 1.1rem;
}
.js .hero__eyebrow { opacity: 0; /* animated in */ }
.hero__eyebrow-line {
  width: 46px; height: 1px;
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
}
.hero__name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.4rem, 6.5vw, 5.2rem);
  line-height: 1.02;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
}
.hero__name-row { display: block; }
.hero__name-row .char {
  display: inline-block;
  will-change: transform, opacity;
  text-shadow: 0 0 40px rgba(79, 124, 255, 0.35);
}
.hero__name-row--accent .char {
  background: var(--grad-main);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gradShift 7s linear infinite;
}
.hero__subtitle {
  margin-top: 1.3rem;
  font-size: clamp(1.05rem, 2.3vw, 1.5rem);
  color: var(--text-mid);
  letter-spacing: 0.06em;
  min-height: 1.7em;
  display: flex;
  align-items: center;
}
.hero__caret {
  display: inline-block;
  width: 2px;
  height: 1.15em;
  margin-left: 4px;
  background: var(--magenta);
  box-shadow: 0 0 10px var(--magenta);
  animation: caretBlink 0.9s steps(1) infinite;
}
@keyframes caretBlink { 50% { opacity: 0; } }
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2.2rem;
}
.js .hero__actions { opacity: 0; transform: translateY(24px); /* animated in */ }
.hero__scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 2rem;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  color: var(--text-mid);
  animation: hintBob 2.2s ease-in-out infinite;
}
@keyframes hintBob {
  0%, 100% { transform: translate(-50%, 0); }
  50%      { transform: translate(-50%, 9px); }
}
.hero__scroll-hint-label {
  font-size: 0.72rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
}
.hero__scroll-hint-mouse {
  width: 24px; height: 38px;
  border: 1.5px solid rgba(255, 255, 255, 0.45);
  border-radius: 14px;
  display: flex;
  justify-content: center;
  padding-top: 6px;
}
.hero__scroll-hint-wheel {
  width: 3px; height: 8px;
  border-radius: 3px;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
  animation: wheelDrop 1.6s ease-in-out infinite;
}
@keyframes wheelDrop {
  0%   { transform: translateY(0); opacity: 1; }
  70%  { transform: translateY(12px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}

/* ── Hero scrub-progress HUD ───────────────────────────────── */
.hero__progress {
  /* sits in the content flow, right under the action buttons */
  margin-top: 1.6rem;
  transform: translateY(12px);
  width: min(230px, 56vw);
  padding: 0.5rem 0.7rem 0.55rem;
  border-radius: 10px;
  background: rgba(8, 10, 24, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(16px) saturate(1.3);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s ease, transform 0.45s var(--ease-out);
}
.hero__progress.is-active { opacity: 1; transform: translateY(0); }
/* variant used inside pinned content sections (e.g. Services) */
.hero__progress--section { margin-top: 0.6rem; }
/* variant overlaid on a pinned section whose content shifts (e.g. Projects) */
.hero__progress--overlay {
  position: absolute;
  left: 50%;
  bottom: 1.6rem;
  margin-top: 0;
  transform: translate(-50%, 12px);
  z-index: 5;
}
.hero__progress--overlay.is-active { transform: translate(-50%, 0); }
@media (max-width: 820px) {
  .hero__progress--section { display: none; } /* mobile skips the pinned sequences */
}
.hero__progress-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 0.35rem;
}
.hero__progress-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.55rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-mid);
}
.hero__progress-pulse {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
  animation: statusPulse 1.6s ease-in-out infinite;
}
.hero__progress-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
  background: var(--grad-main);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero__progress-track {
  position: relative;
  height: 3px;
  border-radius: 99px;
  background:
    repeating-linear-gradient(to right, rgba(255,255,255,0.14) 0 1px, transparent 1px 10%),
    rgba(255, 255, 255, 0.07);
}
.hero__progress-fill {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--grad-main);
  background-size: 200% auto;
  animation: gradShift 4s linear infinite;
  transform: scaleX(0);
  transform-origin: left;
  box-shadow: 0 0 14px rgba(139, 92, 246, 0.75);
  will-change: transform;
}
.hero__progress-dot {
  position: absolute;
  left: 0%;
  top: 50%;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #fff;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 5px #fff, 0 0 14px var(--cyan), 0 0 24px rgba(34, 211, 238, 0.6);
  will-change: left;
}

/* ── Generic section chrome ────────────────────────────────── */
.section {
  position: relative;
  padding-block: var(--section-pad);
  overflow: clip;
}
.section__eyebrow {
  font-family: var(--font-body);
  color: var(--cyan);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 0.85rem;
  margin-bottom: 0.9rem;
}
.section__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.12;
  max-width: 22ch;
  margin-bottom: 1.2rem;
}
.section__lead {
  color: var(--text-mid);
  max-width: 56ch;
  margin-bottom: 3rem;
}
/* floating glow orbs per-section (parallaxed by JS) */
.section__bg-orb {
  position: absolute;
  width: clamp(320px, 42vw, 620px);
  aspect-ratio: 1;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.35;
  pointer-events: none;
  will-change: transform;
}
.section__bg-orb--violet  { background: #8b5cf6; top: -8%;  right: -12%; }
.section__bg-orb--cyan    { background: #0891b2; top: 10%;  left: -14%; }
.section__bg-orb--magenta { background: #db2777; bottom: -10%; right: -10%; }
.section__bg-orb--blue    { background: #2563eb; top: -6%;  left: -12%; }

/* ── About ─────────────────────────────────────────────────── */
.about__grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
}
/* text reads first (left), portrait sits on the right */
.about__text  { order: 1; }
.about__media { order: 2; position: relative; }
.about__media-frame {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--stroke);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
}
.about__media-frame img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center 18%;
  transition: transform 0.7s var(--ease-out);
}
.about__media-frame:hover img { transform: scale(1.05); }
.about__media-glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(139, 92, 246, 0.25), transparent 55%);
  mix-blend-mode: screen;
  pointer-events: none;
}
.about__badge {
  position: absolute;
  left: -1.2rem;   /* inner side, pointing toward the text column */
  bottom: 2rem;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.25rem;
  background: rgba(10, 12, 28, 0.85);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(139, 92, 246, 0.5);
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(139, 92, 246, 0.35);
  white-space: nowrap;
}
.about__badge-num {
  font-family: var(--font-display);
  font-size: 2rem;
  line-height: 1;
  font-weight: 800;
  background: var(--grad-main);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.about__badge-label {
  font-size: 0.72rem;
  line-height: 1.35;
  color: var(--text-mid);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-align: left;
}
.about__bio { color: var(--text-mid); margin-bottom: 1.1rem; max-width: 58ch; }
.about__stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 2.4rem;
}
.stat {
  padding: 1.3rem 1rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: 14px;
  text-align: center;
  transition: transform 0.35s var(--ease-out), border-color 0.35s, box-shadow 0.35s;
}
.stat:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 211, 238, 0.55);
  box-shadow: 0 14px 40px rgba(34, 211, 238, 0.18);
}
.stat__num, .stat__plus {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.2vw, 2.4rem);
  font-weight: 800;
  background: var(--grad-main);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat__label {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-lo);
}

/* ── Skills ────────────────────────────────────────────────── */
.skills__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
}
.skill-card {
  --tint: var(--violet);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  padding: 1.6rem 1rem 1.3rem;
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  transition: transform 0.35s var(--ease-out), border-color 0.35s, box-shadow 0.35s, background-color 0.35s;
  will-change: transform;
}
.skill-card:hover {
  transform: translateY(-8px) scale(1.03);
  border-color: color-mix(in srgb, var(--tint) 65%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--tint) 35%, transparent),
              0 16px 44px color-mix(in srgb, var(--tint) 28%, transparent);
  background: var(--surface-2);
}
.skill-card__icon {
  width: 52px; height: 52px;
  object-fit: contain;
  filter: drop-shadow(0 0 14px color-mix(in srgb, var(--tint) 55%, transparent));
  transition: transform 0.35s var(--ease-out);
}
.skill-card:hover .skill-card__icon { transform: scale(1.16) rotate(-4deg); }
.skill-card__abbr {
  width: 52px; height: 52px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--tint);
  border: 1.5px solid color-mix(in srgb, var(--tint) 60%, transparent);
  text-shadow: 0 0 16px color-mix(in srgb, var(--tint) 80%, transparent);
}
.skill-card__name { font-size: 0.92rem; color: var(--text-mid); }

/* ── Services ──────────────────────────────────────────────── */
.services__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
  perspective: 1200px;
}
.service-card {
  position: relative;
  padding: 1.5rem 1.3rem;
  background: linear-gradient(160deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  overflow: hidden;
  transform-style: preserve-3d;
  transition: border-color 0.35s, box-shadow 0.35s;
  will-change: transform;
}
.service-card::before { /* gradient sheen following border */
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: var(--grad-main);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}
.service-card:hover::before { opacity: 1; }
.service-card:hover { box-shadow: 0 24px 60px rgba(79, 124, 255, 0.22); }
.service-card__icon {
  width: 44px; height: 44px;
  display: grid;
  place-items: center;
  margin-bottom: 1rem;
  border-radius: 12px;
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.08);
  border: 1px solid rgba(34, 211, 238, 0.3);
  box-shadow: 0 0 24px rgba(34, 211, 238, 0.18) inset;
  transform: translateZ(40px);
}
.service-card__icon svg { width: 23px; height: 23px; }
.service-card__title {
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  transform: translateZ(30px);
}
.service-card__desc {
  color: var(--text-mid);
  font-size: 0.82rem;
  line-height: 1.55;
  transform: translateZ(20px);
}
.service-card__num {
  position: absolute;
  top: 0.9rem;
  right: 1.05rem;
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.06);
  transform: translateZ(10px);
}

/* ── Projects ──────────────────────────────────────────────── */
/* filter tabs */
.projects__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.8rem;
}
.pfilter {
  padding: 0.5rem 1.15rem;
  border-radius: 99px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--text-mid);
  border: 1px solid var(--stroke);
  background: var(--surface);
  transition: color 0.3s, border-color 0.3s, background-color 0.3s, transform 0.3s var(--ease-out), box-shadow 0.3s;
}
.pfilter:hover { color: var(--text-hi); transform: translateY(-2px); border-color: rgba(34, 211, 238, 0.5); }
.pfilter.is-active {
  color: #fff;
  background: var(--grad-main);
  border-color: transparent;
  box-shadow: 0 8px 26px rgba(139, 92, 246, 0.4);
}

.projects__grid {
  display: grid;
  /* ~30% tighter than the original 340px floor */
  grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr));
  gap: 1.2rem;
  margin-top: 1.8rem;
  perspective: 1400px;
}
.project-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--stroke);
  background: linear-gradient(165deg, rgba(255,255,255,0.055), rgba(255,255,255,0.015));
  isolation: isolate;
  transform-style: preserve-3d;
  will-change: clip-path, transform;
  transition: box-shadow 0.4s;
}
/* clip-path reveal state — animated by JS */
.js .project-card { clip-path: inset(0 0 100% 0); }
/* animated gradient border sheen on hover */
.project-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: var(--grad-main);
  background-size: 200% auto;
  animation: gradShift 4s linear infinite;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
  z-index: 3;
}
.project-card:hover::before { opacity: 1; }
.project-card:hover {
  box-shadow: 0 30px 70px rgba(79, 124, 255, 0.28), 0 10px 30px rgba(236, 72, 153, 0.18);
}
.project-card__media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  transform: translateZ(30px);
}
.project-card__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease-out), filter 0.5s;
}
.project-card:hover .project-card__media img {
  transform: scale(1.08);
  filter: saturate(1.25) brightness(1.06);
}
/* cursor-following light sweep (JS sets --gx/--gy) */
.project-card__glare {
  position: absolute;
  inset: 0;
  background: radial-gradient(360px circle at var(--gx, 50%) var(--gy, 50%), rgba(255, 255, 255, 0.22), transparent 55%);
  opacity: 0;
  transition: opacity 0.35s;
  pointer-events: none;
  z-index: 2;
}
.project-card:hover .project-card__glare { opacity: 1; }
/* tags — always visible over the image */
.project-card__tags {
  position: absolute;
  top: 0.7rem;
  left: 0.7rem;
  right: 0.7rem;
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  z-index: 2;
}
.project-card__tags span {
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.26rem 0.6rem;
  border-radius: 99px;
  color: var(--cyan);
  border: 1px solid rgba(34, 211, 238, 0.45);
  background: rgba(5, 6, 15, 0.65);
  backdrop-filter: blur(6px);
}
/* body — everything permanently visible */
.project-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1rem 1.05rem 1.15rem;
  transform: translateZ(20px);
}
.project-card__title {
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}
.project-card__desc {
  color: var(--text-mid);
  font-size: 0.84rem;
  line-height: 1.55;
  margin-bottom: 0.95rem;
}
.project-card__actions {
  display: flex;
  gap: 0.55rem;
  margin-top: auto;
}
.pbtn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.48rem 0.95rem;
  border-radius: 99px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s, border-color 0.3s, color 0.3s;
}
.pbtn svg { width: 14px; height: 14px; }
.pbtn--primary {
  background: var(--grad-main);
  background-size: 180% auto;
  color: #fff;
  box-shadow: 0 6px 18px rgba(139, 92, 246, 0.35);
}
.pbtn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(236, 72, 153, 0.45);
  background-position: 100% center;
}
.pbtn--ghost {
  border: 1px solid var(--stroke);
  color: var(--text-mid);
  background: rgba(255, 255, 255, 0.03);
}
.pbtn--ghost:hover {
  transform: translateY(-2px);
  color: var(--cyan);
  border-color: rgba(34, 211, 238, 0.6);
  box-shadow: 0 0 18px rgba(34, 211, 238, 0.25);
}
.pbtn--ghost:hover svg { transform: translate(2px, -2px); }
.pbtn--ghost svg { transition: transform 0.3s; }

/* ── Project details modal ─────────────────────────────────── */
.pmodal {
  position: fixed;
  inset: 0;
  z-index: 1500;
  display: grid;
  place-items: center;
  padding: 1.2rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s, visibility 0.35s;
}
.pmodal.is-open { opacity: 1; visibility: visible; }
.pmodal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 4, 10, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.pmodal__panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  width: min(880px, 100%);
  max-height: min(86vh, 640px);
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(139, 92, 246, 0.4);
  background: #0a0c1e;
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.7), 0 0 60px rgba(139, 92, 246, 0.25);
  transform: translateY(26px) scale(0.96);
  transition: transform 0.4s var(--ease-out);
}
.pmodal.is-open .pmodal__panel { transform: translateY(0) scale(1); }
.pmodal__close {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  z-index: 3;
  width: 38px; height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--text-hi);
  background: rgba(5, 6, 15, 0.6);
  border: 1px solid var(--stroke);
  backdrop-filter: blur(8px);
  transition: transform 0.3s var(--ease-out), border-color 0.3s, color 0.3s;
}
.pmodal__close:hover { transform: rotate(90deg) scale(1.08); color: var(--magenta); border-color: rgba(236, 72, 153, 0.6); }
.pmodal__close svg { width: 18px; height: 18px; }
.pmodal__media { position: relative; min-height: 260px; }
.pmodal__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.pmodal__content {
  padding: 2rem 1.8rem;
  overflow-y: auto;
  scrollbar-width: thin;
}
.pmodal__tags { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-bottom: 0.9rem; }
.pmodal__tags span {
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.28rem 0.65rem;
  border-radius: 99px;
  color: var(--cyan);
  border: 1px solid rgba(34, 211, 238, 0.45);
  background: rgba(34, 211, 238, 0.08);
}
.pmodal__title {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 800;
  margin-bottom: 0.6rem;
}
.pmodal__desc { color: var(--text-mid); font-size: 0.97rem; margin-bottom: 1.3rem; }
.pmodal__meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem 1.2rem;
  margin-bottom: 1.6rem;
}
.pmodal__meta dt {
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-lo);
  margin-bottom: 0.2rem;
}
.pmodal__meta dd { font-size: 0.9rem; color: var(--text-hi); }
.pmodal__actions .btn { width: 100%; }
@media (max-width: 720px) {
  .pmodal__panel { grid-template-columns: 1fr; max-height: 90vh; overflow-y: auto; }
  .pmodal__media { min-height: 180px; aspect-ratio: 16/9; }
  .pmodal__content { padding: 1.4rem 1.2rem; }
  .pmodal__meta { grid-template-columns: 1fr; }
}

/* ── Experience / Timeline ─────────────────────────────────── */
.timeline {
  position: relative;
  margin-top: 3rem;
  padding-left: clamp(2.2rem, 6vw, 3.4rem);
}
.timeline__line {
  position: absolute;
  left: 10px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  overflow: hidden;
}
.timeline__line-fill {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--grad-main);
  transform-origin: top;
  box-shadow: 0 0 14px rgba(139, 92, 246, 0.8);
}
.js .timeline__line-fill { transform: scaleY(0); /* drawn in by scroll */ }
.timeline__item {
  position: relative;
  padding-bottom: 2.6rem;
}
.timeline__item:last-child { padding-bottom: 0; }
.timeline__dot {
  position: absolute;
  left: calc(-1 * clamp(2.2rem, 6vw, 3.4rem) + 4px);
  top: 8px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--bg-0);
  border: 2.5px solid var(--cyan);
  box-shadow: 0 0 0 5px rgba(34, 211, 238, 0.15), 0 0 18px rgba(34, 211, 238, 0.7);
}
.timeline__card {
  padding: 1.6rem 1.8rem;
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  transition: transform 0.35s var(--ease-out), border-color 0.35s, box-shadow 0.35s;
}
.timeline__card:hover {
  transform: translateX(8px);
  border-color: rgba(139, 92, 246, 0.5);
  box-shadow: 0 14px 44px rgba(139, 92, 246, 0.18);
}
.timeline__date {
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--magenta);
}
.timeline__role {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  margin-top: 0.4rem;
}
.timeline__org {
  display: block;
  color: var(--cyan);
  font-size: 0.92rem;
  margin: 0.2rem 0 0.7rem;
}
.timeline__desc { color: var(--text-mid); font-size: 0.97rem; }
.timeline__cta { margin-top: 1.1rem; padding: 0.7rem 1.6rem; font-size: 0.9rem; }

/* ── Testimonials ──────────────────────────────────────────── */
.tslider { position: relative; overflow: hidden; border-radius: var(--radius); }
.tslider__track {
  display: flex;
  will-change: transform;
}
.tcard {
  flex: 0 0 100%;
  padding: 2.6rem clamp(1.4rem, 5vw, 3.4rem) 2.2rem;
  background: linear-gradient(160deg, rgba(255,255,255,0.055), rgba(255,255,255,0.02));
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  margin-right: 1.5rem;
}
.tcard__quote {
  width: 38px; height: 38px;
  color: var(--violet);
  filter: drop-shadow(0 0 12px rgba(139, 92, 246, 0.7));
  margin-bottom: 1.1rem;
}
.tcard blockquote {
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  line-height: 1.6;
  color: var(--text-hi);
  margin-bottom: 1.6rem;
}
.tcard figcaption {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}
.tcard__avatar {
  width: 48px; height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-weight: 700;
  font-size: 0.95rem;
  color: #fff;
  background: color-mix(in srgb, var(--av) 80%, #000);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--av) 60%, transparent), 0 0 20px color-mix(in srgb, var(--av) 50%, transparent);
}
.tcard figcaption strong { display: block; font-size: 1rem; }
.tcard figcaption span:not(.tcard__avatar) { color: var(--text-lo); font-size: 0.85rem; }
.tslider__nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  margin-top: 1.6rem;
}
.tslider__arrow {
  width: 44px; height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--stroke);
  color: var(--text-mid);
  transition: transform 0.3s var(--ease-out), border-color 0.3s, color 0.3s, box-shadow 0.3s;
}
.tslider__arrow:hover {
  transform: scale(1.12);
  color: var(--cyan);
  border-color: rgba(34, 211, 238, 0.6);
  box-shadow: 0 0 20px rgba(34, 211, 238, 0.3);
}
.tslider__arrow svg { width: 20px; height: 20px; }
.tslider__dots { display: flex; gap: 0.55rem; }
.tslider__dots button {
  width: 9px; height: 9px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.18);
  transition: width 0.35s var(--ease-out), background-color 0.35s;
}
.tslider__dots button.is-active {
  width: 26px;
  background: var(--grad-main);
}

/* ── AI Playground ─────────────────────────────────────────── */
.playground__grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 1.6rem;
  align-items: stretch;
}
.playground__canvas-wrap {
  position: relative;
  border-radius: var(--radius);
  border: 1px solid var(--stroke);
  background: radial-gradient(80% 80% at 50% 40%, rgba(16, 19, 49, 0.9), rgba(5, 6, 15, 0.95));
  overflow: hidden;
  min-height: 420px;
}
#neuralCanvas { width: 100%; height: 100%; display: block; }
.playground__canvas-hint {
  position: absolute;
  bottom: 0.9rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-lo);
  pointer-events: none;
}
.chatdemo {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  border: 1px solid var(--stroke);
  background: rgba(10, 12, 28, 0.7);
  backdrop-filter: blur(10px);
  overflow: hidden;
  min-height: 420px;
}
.chatdemo__head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 1rem 1.3rem;
  font-family: var(--font-display);
  font-weight: 600;
  border-bottom: 1px solid var(--stroke);
}
.chatdemo__head em { color: var(--text-lo); font-weight: 400; font-style: normal; font-size: 0.85rem; }
.chatdemo__status {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 10px #34d399;
  animation: statusPulse 2s ease-in-out infinite;
}
@keyframes statusPulse { 50% { opacity: 0.45; } }
.chatdemo__log {
  flex: 1;
  padding: 1.2rem 1.3rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(139, 92, 246, 0.4) transparent;
}
.chatmsg {
  max-width: 88%;
  padding: 0.7rem 1rem;
  border-radius: 14px;
  font-size: 0.93rem;
  line-height: 1.5;
  animation: msgIn 0.4s var(--ease-out);
}
@keyframes msgIn {
  from { opacity: 0; transform: translateY(12px) scale(0.97); }
  to   { opacity: 1; transform: none; }
}
.chatmsg--ai {
  align-self: flex-start;
  background: rgba(139, 92, 246, 0.14);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-bottom-left-radius: 4px;
}
.chatmsg--user {
  align-self: flex-end;
  background: rgba(34, 211, 238, 0.12);
  border: 1px solid rgba(34, 211, 238, 0.3);
  border-bottom-right-radius: 4px;
}
.chatmsg--typing span {
  display: inline-block;
  width: 6px; height: 6px;
  margin-right: 3px;
  border-radius: 50%;
  background: var(--text-mid);
  animation: typingDot 1.1s infinite;
}
.chatmsg--typing span:nth-child(2) { animation-delay: 0.18s; }
.chatmsg--typing span:nth-child(3) { animation-delay: 0.36s; }
@keyframes typingDot { 40% { transform: translateY(-5px); opacity: 1; } 80% { opacity: 0.4; } }
.chatdemo__form {
  display: flex;
  gap: 0.6rem;
  padding: 0.9rem 1rem;
  border-top: 1px solid var(--stroke);
}
.chatdemo__form input {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--stroke);
  border-radius: 99px;
  padding: 0.65rem 1.1rem;
  color: var(--text-hi);
  font: inherit;
  font-size: 0.93rem;
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.chatdemo__form input:focus {
  border-color: rgba(34, 211, 238, 0.6);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.12);
}
.chatdemo__form button {
  width: 44px; height: 44px;
  flex: 0 0 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--grad-main);
  color: #fff;
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s;
}
.chatdemo__form button:hover { transform: scale(1.1) rotate(12deg); box-shadow: 0 0 22px rgba(236, 72, 153, 0.5); }
.chatdemo__form button svg { width: 19px; height: 19px; }

/* ── Contact ───────────────────────────────────────────────── */
.contact__grid {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 6fr);
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: start;
}
.contact__channels {
  margin: 2rem 0 1.6rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.9rem;
}
.contact__channel--wa:hover { color: #25d366; }
.contact__channel--wa:hover svg { color: #25d366; }
.contact__channel {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--text-mid);
  font-size: 1.05rem;
  transition: color 0.3s;
}
.contact__channel:hover { color: var(--cyan); }
.contact__channel svg { width: 22px; height: 22px; color: var(--cyan); }
.contact__socials { display: flex; gap: 0.9rem; }
.social {
  width: 48px; height: 48px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  border: 1px solid var(--stroke);
  color: var(--text-mid);
  background: var(--surface);
  transition: transform 0.3s var(--ease-out), color 0.3s, border-color 0.3s, box-shadow 0.3s;
}
.social svg { width: 21px; height: 21px; }
.social:hover {
  color: #fff;
  border-color: rgba(236, 72, 153, 0.6);
  box-shadow: 0 10px 30px rgba(236, 72, 153, 0.3);
  animation: socialBounce 0.5s var(--ease-out);
}
@keyframes socialBounce {
  0%   { transform: translateY(0); }
  40%  { transform: translateY(-10px) scale(1.08); }
  70%  { transform: translateY(2px); }
  100% { transform: translateY(-4px); }
}
.cform {
  padding: 2.2rem 2rem;
  background: linear-gradient(160deg, rgba(255,255,255,0.05), rgba(255,255,255,0.015));
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  backdrop-filter: blur(8px);
}
.cform__field { position: relative; margin-bottom: 1.5rem; }
.cform__field input,
.cform__field textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--stroke);
  border-radius: 12px;
  padding: 1.05rem 1.1rem;
  color: var(--text-hi);
  font: inherit;
  font-size: 0.98rem;
  outline: none;
  resize: vertical;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.cform__field input:focus,
.cform__field textarea:focus {
  border-color: rgba(139, 92, 246, 0.65);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.14);
}
.cform__field label {
  position: absolute;
  left: 1.05rem;
  top: 1.05rem;
  color: var(--text-lo);
  font-size: 0.97rem;
  pointer-events: none;
  transition: transform 0.28s var(--ease-out), font-size 0.28s, color 0.28s, background-color 0.28s;
  padding: 0 0.35rem;
  border-radius: 4px;
}
/* float when focused OR filled (placeholder=" " trick) */
.cform__field input:focus + label,
.cform__field input:not(:placeholder-shown) + label,
.cform__field textarea:focus + label,
.cform__field textarea:not(:placeholder-shown) + label {
  transform: translateY(-1.72rem);
  font-size: 0.76rem;
  color: var(--cyan);
  background: #0a0c1e;
}
.cform__submit { width: 100%; }
.cform__submit.is-sent { background: linear-gradient(100deg, #10b981, #22d3ee); }
.cform__note {
  margin-top: 0.9rem;
  text-align: center;
  font-size: 0.9rem;
  color: #34d399;
  min-height: 1.4em;
}

/* ── Footer ────────────────────────────────────────────────── */
.footer { position: relative; padding: 2.6rem 0 2.2rem; }
.footer__divider {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 1px;
  background: var(--grad-main);
  background-size: 200% auto;
  animation: gradShift 5s linear infinite;
  opacity: 0.7;
}
.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.4rem;
  flex-wrap: wrap;
}
.footer__brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.4rem;
}
.footer__brand span { color: var(--magenta); }
.footer__copy { color: var(--text-lo); font-size: 0.88rem; max-width: 60ch; }
.footer__top {
  width: 48px; height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--stroke);
  color: var(--text-mid);
  transition: transform 0.3s var(--ease-out), color 0.3s, border-color 0.3s, box-shadow 0.3s;
}
.footer__top:hover {
  transform: translateY(-5px);
  color: var(--cyan);
  border-color: rgba(34, 211, 238, 0.6);
  box-shadow: 0 0 24px rgba(34, 211, 238, 0.35);
}
.footer__top svg { width: 20px; height: 20px; }

/* ── Reveal initial states (JS animates to visible; if JS fails,
     the .no-js fallback below keeps everything visible) ──── */
.js [data-reveal] { opacity: 0; will-change: transform, opacity; }
.js [data-reveal="up"]    { transform: translateY(60px); }
.js [data-reveal="left"]  { transform: translateX(-70px); }
.js [data-reveal="right"] { transform: translateX(70px); }
.js [data-reveal="scale"] { transform: scale(0.7); }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 1020px) {
  .about__grid { grid-template-columns: 1fr; }
  .about__media { max-width: 440px; }
  .playground__grid { grid-template-columns: 1fr; }
  .contact__grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  :root { --section-pad: 4.2rem; }
  .about__stats { grid-template-columns: repeat(2, 1fr); }
  .about__badge { left: 0.6rem; bottom: 1rem; padding: 0.7rem 1rem; }
  .about__badge-num { font-size: 1.5rem; }
  .hero__content { padding-bottom: 7rem; }
  .hero__scroll-hint { bottom: 1.4rem; }
  .projects__grid { grid-template-columns: 1fr; }
  .tcard { padding: 1.8rem 1.4rem; }
  .cform { padding: 1.6rem 1.2rem; }
}

/* ── Reduced motion ────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .js [data-reveal], .js .hero__eyebrow, .js .hero__actions { opacity: 1; transform: none; }
  .js .project-card { clip-path: none; }
  .js .timeline__line-fill { transform: none; }
}
