/* =================================================================
   mdlp.ai — Premium AI Consultant Portfolio
   styles.css
   Theme: dark futuristic / space-tech with glowing neon accents
   ================================================================= */

/* ---------- Design tokens ---------- */
:root {
  --bg:            #05060f;   /* deep space base */
  --bg-2:          #0a0d1f;   /* slightly lighter panel base */
  --surface:       rgba(255, 255, 255, 0.04);
  --surface-brd:   rgba(255, 255, 255, 0.12);

  /* Light, airy text — high contrast over the dark/video background */
  --text:          #f6f7fb;   /* near-white headings/body */
  --text-dim:      #c3c9de;   /* soft, readable muted text */
  --text-faint:    #8b92ad;   /* subtle labels / placeholders */

  /* Accents — kept gentle and used sparingly for an elegant feel */
  --cyan:          #9fe9ff;
  --violet:        #b6a6ff;
  --accent:        #bfe7ff;   /* single soft accent for emphasis */
  --accent-grad:   linear-gradient(120deg, #9fe9ff 0%, #c7b8ff 100%);

  --glow-cyan:     rgba(56, 232, 255, 0.28);
  --glow-violet:   rgba(139, 92, 255, 0.28);

  /* Typography
     Primary = Inter (headings, body, stats, nav, buttons, labels)
     Accent  = Playfair Display Italic (rare emphasized title words only) */
  --font-primary: "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-accent:  "Playfair Display", Georgia, "Times New Roman", serif;
  /* Back-compat aliases used elsewhere in this file */
  --font-sans:     var(--font-primary);
  --font-serif:    var(--font-accent);

  /* Spacing / shape / motion */
  --radius:        16px;
  --radius-sm:     12px;
  --radius-pill:   999px;
  --maxw:          1180px;
  --ease:          cubic-bezier(0.22, 1, 0.36, 1);
  --transition:    0.35s var(--ease);
}

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

html {
  scroll-behavior: smooth;       /* smooth scrolling between sections */
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-weight: 400;
  line-height: 1.7;              /* airy body rhythm */
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Strong, modern sans-serif headings (Inter) with tight tracking */
h1, h2, h3 {
  font-family: var(--font-primary);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.035em;
}

/* -----------------------------------------------------------------
   Reusable typography classes
   ----------------------------------------------------------------- */
.font-primary { font-family: var(--font-primary); }
.font-accent  { font-family: var(--font-accent); }

/* Rare, intentional italic accent — Playfair Display Italic.
   Applied to <em> inside headings and to .italic-accent spans. */
.italic-accent,
h1 em, h2 em, h3 em {
  font-family: var(--font-accent);
  font-style: italic;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--accent);
}

.headline {
  font-family: var(--font-primary);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.02;
}

.eyebrow {
  font-family: var(--font-primary);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.body-copy {
  font-family: var(--font-primary);
  font-size: 0.95rem;
  line-height: 1.65;
  font-weight: 400;
  color: var(--text-dim);
}

.stat-number {
  font-family: var(--font-primary);
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--text);
}

.nav__logo { font-family: var(--font-primary); font-weight: 700; }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* Legacy hook: emphasized words now render as the italic accent */
.gradient-text {
  font-family: var(--font-accent);
  font-style: italic;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--accent);
}
.accent { color: var(--cyan); }

/* =================================================================
   Animated background
   ================================================================= */

/* Star-field canvas */
#starfield {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -3;
  display: block;
}

/* Fullscreen background video — drop your file at assets/background.mp4.
   Sits behind every other layer; the overlay keeps text readable. */
.bg-video {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -5;
  opacity: 1;            /* show the video at full strength */
  pointer-events: none;
}
/* Page-height wash over the video. The hero stays bright (~5% tint) so the
   footage reads clearly, then it gradients into the regular darker overlay
   for the rest of the page. Absolute (not fixed) so it scrolls with content. */
.bg-video-overlay {
  position: absolute;
  inset: 0;                 /* spans the full document height */
  z-index: -4;
  pointer-events: none;
  background: linear-gradient(180deg,
    rgba(5, 6, 15, 0.05) 0,
    rgba(5, 6, 15, 0.05) 80vh,
    rgba(5, 6, 15, 0.55) 120vh,
    rgba(5, 6, 15, 0.55) 100%);
}

/* =================================================================
   Intro overlay — typewriter headline over the video on first load
   ================================================================= */
.intro {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  pointer-events: none;            /* purely decorative, never blocks */
  /* A whisper of vignette keeps the text readable while the video shows */
  background: radial-gradient(70% 70% at 50% 50%,
              rgba(5, 6, 15, 0.30), rgba(5, 6, 15, 0.55) 100%);
  opacity: 1;
  transition: opacity 0.9s var(--ease), visibility 0.9s var(--ease);
}
/* Faded out once the typewriter finishes */
.intro.is-hidden {
  opacity: 0;
  visibility: hidden;
}
.intro__text {
  font-family: var(--font-primary);
  font-weight: 400;
  font-size: clamp(2rem, 7vw, 4.8rem);
  line-height: 1.28;
  letter-spacing: 0.015em;
  color: var(--text);
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.45);
  max-width: 18ch;
}
.intro__text .italic-accent { font-weight: 500; letter-spacing: 0.01em; }
.intro__line { display: block; }
/* Blinking caret sits on whichever line is currently typing */
.intro__line.is-typing::after {
  content: "";
  display: inline-block;
  width: 2px;
  height: 1em;
  margin-left: 0.08em;
  vertical-align: -0.08em;
  background: var(--accent);
  animation: caret-blink 1s steps(1) infinite;
}
@keyframes caret-blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }

/* ---- Loading state: show only the video + intro, hide the rest ---- */
body.intro-loading { overflow: hidden; }
body.intro-loading .nav,
body.intro-loading main,
body.intro-loading .footer,
body.intro-loading .scroll-progress,
body.intro-loading #starfield,
body.intro-loading .aurora,
body.intro-loading .nebula,
body.intro-loading .shooting-star {
  opacity: 0;
  visibility: hidden;
}
/* ---- Smooth fade-in for the site once the intro completes ---- */
.nav, main, .footer, .scroll-progress,
#starfield, .aurora, .nebula, .shooting-star {
  transition: opacity 1s var(--ease), visibility 1s var(--ease);
}

@media (max-width: 600px) {
  .intro__text { font-size: clamp(1.8rem, 9vw, 2.6rem); max-width: 14ch; }
}
@media (prefers-reduced-motion: reduce) {
  .intro__line.is-typing::after { animation: none; }
  .nav, main, .footer, .scroll-progress,
  #starfield, .aurora, .nebula, .shooting-star { transition-duration: 0.3s; }
}

/* Drifting aurora gradient blobs behind everything */
.aurora {
  position: fixed;
  inset: -20%;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(40% 40% at 20% 25%, rgba(56,232,255,0.18), transparent 60%),
    radial-gradient(45% 45% at 80% 20%, rgba(139,92,255,0.20), transparent 60%),
    radial-gradient(40% 40% at 60% 85%, rgba(255,92,240,0.14), transparent 60%);
  filter: blur(20px);
  animation: auroraDrift 24s ease-in-out infinite alternate;
}
@keyframes auroraDrift {
  0%   { transform: translate3d(0,0,0) scale(1); }
  50%  { transform: translate3d(3%, -2%, 0) scale(1.08); }
  100% { transform: translate3d(-3%, 2%, 0) scale(1.04); }
}

/* subtle vignette so text stays readable */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(120% 80% at 50% 0%, transparent 40%, rgba(0,0,0,0.55) 100%);
}

/* Distant nebula glow + a faint planet for extra depth on the space theme */
.nebula {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  overflow: hidden;
}
.nebula__planet {
  position: absolute;
  top: 8%; left: -90px;
  width: 220px; height: 220px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 30%, #3a2b6b, #170f33 60%, #0a0820 100%);
  box-shadow:
    inset -22px -10px 50px rgba(0,0,0,0.7),
    0 0 80px 6px rgba(139,92,255,0.25);
  opacity: 0.55;
  animation: floaty 14s ease-in-out infinite;
}

/* Shooting stars streak across the sky on a loop */
.shooting-star {
  position: fixed;
  width: 2px; height: 2px;
  border-radius: 50%;
  background: #fff;
  z-index: -2;
  pointer-events: none;
  opacity: 0;
  box-shadow: 0 0 8px 1px rgba(255,255,255,0.9);
}
.shooting-star::after {
  content: "";
  position: absolute;
  top: 50%; right: 0;
  width: 160px; height: 1px;
  transform: translateY(-50%);
  background: linear-gradient(270deg, rgba(255,255,255,0.85), transparent);
}
.shooting-star--1 { top: 14%; left: 70%; animation: shoot 7s ease-in 2s infinite; }
.shooting-star--2 { top: 26%; left: 88%; animation: shoot 9s ease-in 5s infinite; }
.shooting-star--3 { top: 6%;  left: 55%; animation: shoot 11s ease-in 8s infinite; }
@keyframes shoot {
  0%   { transform: translate(0, 0) rotate(18deg); opacity: 0; }
  8%   { opacity: 1; }
  22%  { opacity: 1; }
  30%  { transform: translate(-520px, 180px) rotate(18deg); opacity: 0; }
  100% { opacity: 0; }
}

/* ---------- Trailing starlet cursor ---------- */
/* Hide the system cursor on devices that support hover (desktop) so the
   custom glowing star + trailing starlets take over. */
@media (hover: hover) and (pointer: fine) {
  body { cursor: none; }
  a, button, input, textarea, label, .card, .cap { cursor: none; }
}
/* The main star that sits on the pointer */
.cursor-star {
  position: fixed;
  top: 0; left: 0;
  width: 16px; height: 16px;
  margin: -8px 0 0 -8px;
  z-index: 9999;
  pointer-events: none;
  color: var(--cyan);
  filter: drop-shadow(0 0 6px var(--cyan));
  transition: transform .12s ease-out;
}
/* Each trailing starlet left behind as the pointer moves */
.starlet {
  position: fixed;
  z-index: 9998;
  pointer-events: none;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 8px 1px currentColor;
  will-change: transform, opacity;
}

/* Scroll progress bar */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  z-index: 200;
  background: var(--accent-grad);
  box-shadow: 0 0 12px var(--glow-cyan);
}

/* =================================================================
   Navigation (sticky glassmorphism)
   ================================================================= */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  transition: background .4s var(--ease), backdrop-filter .4s var(--ease), border-color .4s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(8, 10, 24, 0.6);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--surface-brd);
}
.nav__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav__logo { font-size: 1.2rem; letter-spacing: -0.01em; }
.nav__links { display: flex; align-items: center; gap: 34px; }
.nav__links a {
  font-size: 0.84rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  color: var(--text-dim);
  position: relative;
  transition: color var(--transition);
}
/* Active link set by scroll-spy in JS */
.nav__links a.active:not(.nav__cta) { color: var(--text); }
.nav__links a:not(.nav__cta)::after {
  content: "";
  position: absolute;
  left: 0; bottom: -6px;
  height: 1px; width: 0;
  background: var(--accent);
  transition: width var(--transition);
}
.nav__links a:not(.nav__cta):hover { color: var(--text); }
.nav__links a:not(.nav__cta):hover::after,
.nav__links a.active:not(.nav__cta)::after { width: 100%; }

.nav__cta {
  padding: 9px 20px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--surface-brd);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text) !important;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: background var(--transition), border-color var(--transition);
}
.nav__cta:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.30);
}

/* Mobile toggle */
.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none; border: none; cursor: pointer;
  padding: 6px;
}
.nav__toggle span {
  width: 26px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .3s, opacity .3s;
}
.nav__toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle.open span:nth-child(2) { opacity: 0; }
.nav__toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* =================================================================
   Buttons
   ================================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 28px;
  border-radius: var(--radius-pill);
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.92rem;
  letter-spacing: 0.01em;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background var(--transition), border-color var(--transition),
    color var(--transition), transform var(--transition);
}
/* Soft, polished light button */
.btn--primary {
  background: rgba(255, 255, 255, 0.92);
  color: #0b0c16;
}
.btn--primary:hover {
  transform: translateY(-2px);
  background: #ffffff;
}
/* Quiet outlined button */
.btn--ghost {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--surface-brd);
  color: var(--text);
}
.btn--ghost:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.08);
}
.btn--full { width: 100%; justify-content: center; }
.btn__arrow { transition: transform var(--transition); }
.btn:hover .btn__arrow { transform: translateX(4px); }

/* =================================================================
   Section scaffolding + scroll reveal
   ================================================================= */
.section { padding: 120px 0; position: relative; }

.section__head { text-align: center; max-width: 720px; margin: 0 auto 64px; }
.section__eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.26em;
  font-size: 0.7rem;
  color: var(--text-faint);
  margin-bottom: 18px;
  font-weight: 500;
}
.section__title {
  font-size: clamp(2.1rem, 4.5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.035em;
  margin-bottom: 20px;
}
.section__sub { color: var(--text-dim); font-size: 1.05rem; font-weight: 400; }

/* Reveal-on-scroll: starts hidden, JS adds .in-view */
.reveal {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}
.reveal.in-view { opacity: 1; transform: none; }

/* Reusable glass surface */
.glass {
  background: var(--surface);
  border: 1px solid var(--surface-brd);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius);
}

/* =================================================================
   1. HERO
   ================================================================= */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 120px;
  overflow: hidden;
}
/* Centered hero — title leads, with generous breathing room below */
.hero__content {
  position: relative;
  z-index: 2;
  max-width: 880px;
  margin: 0 auto;
  text-align: center;
}

.hero__eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.26em;
  font-size: 0.72rem;
  color: var(--text-faint);
  margin-bottom: 30px;
  font-weight: 500;
}
.hero__title {
  font-size: clamp(2.8rem, 7vw, 5.4rem);
  font-weight: 400;            /* thin, elegant */
  line-height: 1.28;           /* taller, airier stacking */
  letter-spacing: 0.015em;     /* gently spaced */
  /* big gap before the paragraph + stats */
  margin-bottom: clamp(48px, 9vh, 104px);
  text-wrap: balance;
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.45);
}
.hero__title .italic-accent { font-weight: 500; letter-spacing: 0.01em; }
.hero__eyebrow, .hero__subtitle { text-shadow: 0 1px 20px rgba(0, 0, 0, 0.4); }
.hero__subtitle {
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
  font-weight: 300;
  line-height: 1.7;
  color: var(--text-dim);
  max-width: 540px;
  margin: 0 auto 40px;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  margin-bottom: 64px;
}

/* Floating stat cards */
.hero__stats { display: flex; flex-wrap: wrap; gap: 18px; justify-content: center; }
.stat-card {
  background: var(--surface);
  border: 1px solid var(--surface-brd);
  border-radius: var(--radius-sm);
  padding: 18px 24px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  min-width: 150px;
}
.stat-card__num {
  display: block;
  font-family: var(--font-primary);
  font-size: 2.1rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.04em;
}
.stat-card__label {
  font-size: 0.8rem;
  color: var(--text-faint);
  letter-spacing: 0.04em;
}

/* gentle floating motion for cards/orb */
.float { animation: floaty 6s ease-in-out infinite; }
.float--delay   { animation-delay: 1.2s; }
.float--delay-2 { animation-delay: 2.4s; }
@keyframes floaty {
  0%,100% { transform: translateY(0); }
  50%     { transform: translateY(-10px); }
}

/* --- Glowing animated orb --- */
.hero__orb {
  position: absolute;
  top: 50%; right: -6%;
  transform: translateY(-50%);
  width: 540px; height: 540px;
  z-index: 1;
  pointer-events: none;
  animation: floaty 9s ease-in-out infinite;
}
.orb__core {
  position: absolute;
  inset: 32%;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #aef4ff, var(--cyan) 35%, var(--violet) 75%, transparent 100%);
  box-shadow: 0 0 120px 30px var(--glow-violet), 0 0 60px 10px var(--glow-cyan);
  filter: blur(2px);
  animation: pulse 5s ease-in-out infinite;
}
@keyframes pulse {
  0%,100% { transform: scale(1);   opacity: .95; }
  50%     { transform: scale(1.08); opacity: 1; }
}
.orb__ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.10);
}
.orb__ring--1 { inset: 4%;  border-color: rgba(56,232,255,0.28); animation: spin 18s linear infinite; }
.orb__ring--2 { inset: 16%; border-color: rgba(139,92,255,0.28); animation: spin 26s linear infinite reverse; }
.orb__ring--3 { inset: 26%; border-color: rgba(255,92,240,0.22); animation: spin 34s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* scroll cue */
.hero__scroll {
  position: absolute;
  bottom: 30px; left: 50%;
  transform: translateX(-50%);
  width: 26px; height: 42px;
  border: 2px solid var(--surface-brd);
  border-radius: 16px;
  display: flex;
  justify-content: center;
  z-index: 2;
}
.hero__scroll-dot {
  width: 4px; height: 8px;
  margin-top: 7px;
  border-radius: 4px;
  background: var(--cyan);
  animation: scrollDot 1.8s ease-in-out infinite;
}
@keyframes scrollDot {
  0%   { transform: translateY(0);    opacity: 1; }
  70%  { transform: translateY(14px); opacity: 0; }
  100% { opacity: 0; }
}

/* =================================================================
   2. ABOUT
   ================================================================= */
.about__grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 60px;
  align-items: center;
}
.about__visual { perspective: 1000px; }
.about__panel {
  position: relative;
  padding: 34px;
  font-family: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, monospace;
  overflow: hidden;
  transform: rotateY(8deg) rotateX(4deg);
  transition: transform .5s var(--ease);
}
.about__panel:hover { transform: rotateY(0) rotateX(0); }
.about__panel-glow {
  position: absolute;
  top: -40%; left: -20%;
  width: 80%; height: 180%;
  background: radial-gradient(circle, var(--glow-violet), transparent 70%);
  filter: blur(30px);
  animation: floaty 7s ease-in-out infinite;
}
.about__code-line {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  color: var(--text-dim);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  font-size: 0.95rem;
}
.dot { width: 9px; height: 9px; border-radius: 50%; box-shadow: 0 0 10px currentColor; }
.dot--g { background: #46f1b0; color: #46f1b0; }
.dot--b { background: var(--cyan); color: var(--cyan); }
.dot--p { background: var(--violet); color: var(--violet); }
.about__signature {
  position: relative;
  margin-top: 22px;
  color: var(--text-faint);
  font-size: 0.9rem;
}

.about__text .section__title { font-size: clamp(1.9rem, 3.4vw, 2.7rem); margin: 14px 0 22px; }
.about__lead { font-size: 1.2rem; font-weight: 400; color: var(--text); margin-bottom: 18px; line-height: 1.7; }
.about__body { color: var(--text-dim); font-weight: 400; margin-bottom: 28px; }
.about__pills { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; }
.about__pills li {
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--surface-brd);
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.82rem;
  letter-spacing: 0.01em;
  color: var(--text-dim);
  transition: border-color var(--transition), color var(--transition), transform var(--transition);
}
.about__pills li:hover { border-color: rgba(255,255,255,0.3); color: var(--text); transform: translateY(-2px); }

/* =================================================================
   3. SERVICES — card grid
   ================================================================= */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 22px;
}
.card {
  position: relative;
  padding: 32px 28px;
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  border: 1px solid var(--surface-brd);
  overflow: hidden;
  transition: transform .4s var(--ease), border-color .4s, box-shadow .4s;
  cursor: default;
}
/* animated glowing top border on hover */
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: var(--accent-grad);
  -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 .4s;
}
.card:hover, .card:focus-visible {
  transform: translateY(-6px);
  border-color: transparent;
  box-shadow: 0 24px 60px rgba(0,0,0,0.45);
  outline: none;
}
.card:hover::before, .card:focus-visible::before { opacity: 0.6; }
.card__icon {
  font-size: 1.35rem;
  color: var(--accent);
  width: 52px; height: 52px;
  display: grid; place-items: center;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--surface-brd);
  margin-bottom: 22px;
  transition: transform .4s var(--ease), border-color var(--transition);
}
.card:hover .card__icon { transform: translateY(-2px); border-color: rgba(255,255,255,0.28); }
.card__title { font-size: 1.35rem; font-weight: 700; letter-spacing: -0.025em; margin-bottom: 12px; }
.card__desc { color: var(--text-dim); font-size: 0.95rem; font-weight: 400; line-height: 1.65; }

/* =================================================================
   4. CAPABILITIES
   ================================================================= */
.caps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.cap {
  position: relative;
  padding: 34px 28px;
  border-radius: var(--radius);
  background: var(--bg-2);
  border: 1px solid var(--surface-brd);
  overflow: hidden;
  transition: transform .4s var(--ease), box-shadow .4s, border-color .4s;
}
.cap--wide { grid-column: span 3; }
.cap:hover, .cap:focus-visible {
  transform: translateY(-6px);
  border-color: var(--cyan);
  box-shadow: 0 0 40px var(--glow-cyan);
  outline: none;
}
.cap__index {
  font-family: var(--font-primary);
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--text-faint);
  display: block;
  margin-bottom: 14px;
}
.cap__title { font-size: 1.4rem; font-weight: 700; letter-spacing: -0.025em; margin-bottom: 12px; }
.cap__desc { color: var(--text-dim); font-size: 0.95rem; font-weight: 400; line-height: 1.65; }
/* sweeping light beam across the card on hover */
.cap__beam {
  position: absolute;
  top: 0; left: -60%;
  width: 50%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(56,232,255,0.10), transparent);
  transform: skewX(-18deg);
  transition: left .7s var(--ease);
}
.cap:hover .cap__beam { left: 120%; }

/* =================================================================
   5. WHY
   ================================================================= */
.why__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}
.why__item {
  padding: 30px 26px;
  transition: transform .4s var(--ease), box-shadow .4s, border-color .4s;
}
.why__item:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 255, 255, 0.28);
}
.why__item h3 {
  font-size: 1.45rem;
  font-weight: 500;
  margin-bottom: 12px;
  color: var(--text);
}
.why__item p { color: var(--text-dim); font-size: 0.95rem; font-weight: 400; line-height: 1.65; }

/* =================================================================
   6. CONTACT
   ================================================================= */
.contact__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
/* Centered contact layout (form removed) */
.contact__center { max-width: 720px; margin: 0 auto; text-align: center; }
.contact__center .contact__meta { display: flex; flex-direction: column; align-items: center; }
.contact__center .btn { margin-top: 28px; }
.contact__intro .section__title { font-size: clamp(2rem, 4vw, 3rem); margin: 14px 0 20px; }
.contact__lead { color: var(--text-dim); font-size: 1.1rem; font-weight: 400; margin-bottom: 30px; line-height: 1.7; }
.contact__meta { color: var(--text-faint); font-size: 0.92rem; }
.contact__email {
  display: inline-block;
  font-family: var(--font-primary);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 8px;
  transition: color var(--transition);
}
.contact__email:hover { color: var(--accent); }

/* form */
.contact__form { padding: 36px; display: flex; flex-direction: column; gap: 22px; }
.field { position: relative; }
.field input, .field textarea {
  width: 100%;
  padding: 18px 16px 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--surface-brd);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 0.98rem;
  font-weight: 400;
  resize: vertical;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}
.field textarea { min-height: 110px; }
.field input:focus, .field textarea:focus {
  outline: none;
  background: rgba(255,255,255,0.06);
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.06);
}
/* floating labels */
.field label {
  position: absolute;
  left: 16px; top: 17px;
  color: var(--text-faint);
  font-size: 0.98rem;
  font-weight: 400;
  pointer-events: none;
  transition: transform .2s var(--ease), color .2s, font-size .2s;
}
.field input:focus + label,
.field input:not(:placeholder-shown) + label,
.field textarea:focus + label,
.field textarea:not(:placeholder-shown) + label {
  transform: translateY(-13px);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  color: var(--text-dim);
}
.form__status { font-size: 0.92rem; min-height: 1.2em; }
.form__status.error   { color: #ff9aa2; }
.form__status.success { color: #8fe3b6; }

/* =================================================================
   Footer
   ================================================================= */
.footer { padding: 50px 0; border-top: 1px solid var(--surface-brd); }
.footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
}
.footer__inner p { color: var(--text-faint); font-size: 0.88rem; font-weight: 400; }
.footer__top { color: var(--text-dim); font-size: 0.88rem; transition: color var(--transition); }
.footer__top:hover { color: var(--text); }

/* =================================================================
   Responsive
   ================================================================= */
@media (max-width: 900px) {
  .about__grid, .contact__grid { grid-template-columns: 1fr; }
  .about__visual { order: 2; }
  .about__panel { transform: none; }
  .caps { grid-template-columns: 1fr 1fr; }
  .cap--wide { grid-column: span 2; }
  .hero__orb { opacity: 0.55; right: -30%; width: 420px; height: 420px; }
}

@media (max-width: 720px) {
  .section { padding: 90px 0; }

  /* slide-in mobile menu */
  .nav__toggle { display: flex; }
  .nav__links {
    position: fixed;
    inset: 0 0 0 30%;
    flex-direction: column;
    justify-content: center;
    gap: 28px;
    padding: 40px;
    background: rgba(8,10,24,0.92);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-left: 1px solid var(--surface-brd);
    transform: translateX(100%);
    transition: transform .4s var(--ease);
  }
  .nav__links.open { transform: translateX(0); }
  .nav__links a { font-size: 1.2rem; }

  .caps { grid-template-columns: 1fr; }
  .cap--wide { grid-column: span 1; }
  .hero__orb { display: none; }
  .hero__stats { gap: 12px; }
  .stat-card { flex: 1 1 100%; }
}

/* Respect users who prefer 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;
  }
  .reveal { opacity: 1; transform: none; }
}
