/* =========================================================
   ZAIN ASLAM — PERFORMANCE MARKETING PORTFOLIO
   Design system v2: editorial / tech-forward personal brand.
   Electric blue + turquoise accents. Light + dark themes via
   [data-theme]. Tokens first, components below.
   ========================================================= */

:root {
  color-scheme: light dark;

  --font-display: "Bricolage Grotesque", "Inter", sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --container: 1280px;
  --gutter: clamp(20px, 5vw, 64px);

  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-full: 999px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --dur: 0.3s;
  --nav-h: 76px;

  --gradient-brand: linear-gradient(120deg, var(--primary) 0%, var(--secondary) 100%);
}

/* ---------- Light theme (default) ---------- */
:root,
[data-theme="light"] {
  --bg: #F7F9FC;
  --bg-raised: #FDFEFF;
  --surface: #FFFFFF;
  --surface-2: #EFF3F9;
  --ink: #0A101F;
  --ink-soft: #3D4658;
  --muted: #6C7789;
  --border: #E4E9F1;
  --border-strong: #CBD5E3;

  --primary: #2E5CFF;
  --primary-ink: #1C3FCF;
  --primary-soft: #E9EFFF;
  --secondary: #0FB6C4;
  --secondary-soft: #E3FAFB;

  --glow-primary: rgba(46, 92, 255, 0.24);
  --glow-secondary: rgba(15, 182, 196, 0.22);

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 16px 40px -20px rgba(15, 23, 42, 0.22);
  --shadow-lg: 0 30px 70px -30px rgba(15, 23, 42, 0.28);
  --shadow-glow: 0 0 0 1px var(--border-strong), 0 20px 50px -24px var(--glow-primary);

  --surface-glass: rgba(255, 255, 255, 0.6);
  --surface-glass-strong: rgba(255, 255, 255, 0.86);

  --grid-line: rgba(10, 16, 31, 0.05);
  --noise-opacity: 0.025;
}

/* ---------- Dark theme ---------- */
[data-theme="dark"] {
  --bg: #070B14;
  --bg-raised: #0B1120;
  --surface: #10192B;
  --surface-2: #131F35;
  --ink: #F2F5FC;
  --ink-soft: #C4CCDD;
  --muted: #8792A6;
  --border: #202B41;
  --border-strong: #2E3B57;

  --primary: #6690FF;
  --primary-ink: #9FB6FF;
  --primary-soft: rgba(102, 144, 255, 0.14);
  --secondary: #2FE3DC;
  --secondary-soft: rgba(47, 227, 220, 0.12);

  --glow-primary: rgba(102, 144, 255, 0.35);
  --glow-secondary: rgba(47, 227, 220, 0.28);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 20px 50px -20px rgba(0, 0, 0, 0.55);
  --shadow-lg: 0 40px 90px -30px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 0 1px var(--border-strong), 0 20px 60px -20px var(--glow-primary);

  --surface-glass: rgba(16, 25, 43, 0.55);
  --surface-glass-strong: rgba(16, 25, 43, 0.82);

  --grid-line: rgba(255, 255, 255, 0.06);
  --noise-opacity: 0.05;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color 0.4s var(--ease), color 0.4s var(--ease);
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; background: none; border: none; color: inherit; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p { margin: 0; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
  position: relative;
}

section { position: relative; }

/* Theme-transition scope: keep it to visual props only (perf-safe) */
.navbar, .btn, .surface, .skill-row, .platform-card, .market-row, .timeline-item,
.proj-card, .review-card, .process-node, .cert-item, .edu-card, .contact-item,
.contact-form, input, textarea, .cs-block, .cs-metric-card, .footer, .stat-col {
  transition: background-color 0.35s var(--ease), border-color 0.35s var(--ease), color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--bg);
  padding: 12px 20px;
  z-index: 999;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }

  /* The brand-logo and client-review marquees are continuous conveyors, not
     entrance effects — the blanket `*` rule above crushed their duration to ~0
     and froze them. Restore them so they keep scrolling. (Site owner's explicit
     requirement: these marquees must never stop.) */
  .brand-track {
    animation-duration: var(--row-duration, 90s) !important;
  }
  .reviews-track {
    animation-duration: 150s !important;
  }
  .country-row {
    animation-duration: 60s !important;
  }
}

/* ---------- Typography ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.eyebrow-dot,
.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gradient-brand);
  display: inline-block;
  flex-shrink: 0;
}

.section-heading {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(28px, 3.4vw, 42px);
  letter-spacing: -0.02em;
  line-height: 1.08;
  color: var(--ink);
}

.section-sub {
  color: var(--muted);
  font-size: clamp(15px, 1.4vw, 17px);
  max-width: 560px;
  margin-top: 12px;
  line-height: 1.6;
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 52px;
}

.text-gradient {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.06s; }
.reveal-delay-2 { transition-delay: 0.12s; }
.reveal-delay-3 { transition-delay: 0.18s; }
.reveal-delay-4 { transition-delay: 0.24s; }

/* ---------- Background texture helpers ---------- */
.bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 40%, transparent 90%);
  pointer-events: none;
}
.bg-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  pointer-events: none;
  opacity: 0.55;
}
.bg-noise {
  position: absolute;
  inset: 0;
  opacity: var(--noise-opacity);
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 14px 24px;
  border-radius: var(--radius-sm);
  font-size: 14.5px;
  font-weight: 600;
  font-family: var(--font-body);
  border: 1px solid transparent;
  transition: transform 0.35s var(--ease), background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
  white-space: nowrap;
  will-change: transform;
}
.btn:active { transform: scale(0.97); }

/* =========================================================
   Button colour system — three tiers only. Sizing, padding,
   radius and typography all live on .btn and are untouched here.

     .btn-primary   DARK      (3-btn: 1st & 3rd · 2-btn: 1st · single CTA)
     .btn-gradient  GRADIENT  (3-btn: 2nd)
     .btn-light     LIGHT     (2-btn: 2nd)

   In dark mode the DARK tier becomes an elevated dark surface rather than
   near-black — a literally near-black button would vanish against the dark
   page — and the LIGHT tier becomes near-white, so all three tiers stay
   visually distinct in both themes.
   ========================================================= */

/* --- DARK --- */
.btn-primary {
  background: var(--ink);
  color: var(--bg);
  border-color: transparent;
  box-shadow: var(--shadow-sm);
}
[data-theme="dark"] .btn-primary {
  background: var(--surface-2);
  color: var(--ink);
  border-color: var(--border-strong);
}
.btn-primary:hover { box-shadow: 0 14px 32px -14px var(--glow-primary); transform: translateY(-2px); }
[data-theme="dark"] .btn-primary:hover { border-color: var(--primary); }

/* --- GRADIENT --- */
.btn-gradient {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: #FFFFFF;
  border-color: transparent;
  box-shadow: 0 8px 22px -12px var(--glow-primary);
}
.btn-gradient:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px -14px var(--glow-primary);
  filter: saturate(1.08);
}
[data-theme="dark"] .btn-gradient { color: #050810; }

/* --- LIGHT ---
   .btn-secondary / .btn-ghost are kept as aliases so any button that still
   uses them renders in-system rather than falling back to a stray colour. */
.btn-light,
.btn-secondary,
.btn-ghost {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}
[data-theme="dark"] .btn-light,
[data-theme="dark"] .btn-secondary,
[data-theme="dark"] .btn-ghost {
  background: var(--ink);
  color: var(--bg);
  border-color: transparent;
}
.btn-light:hover,
.btn-secondary:hover,
.btn-ghost:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
[data-theme="dark"] .btn-light:hover,
[data-theme="dark"] .btn-secondary:hover,
[data-theme="dark"] .btn-ghost:hover { color: var(--primary-ink); }

.btn-sm { padding: 10px 18px; font-size: 13px; }

.btn-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-soft);
  padding-bottom: 2px;
  border-bottom: 1px solid var(--border-strong);
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease), gap 0.25s var(--ease);
  flex-shrink: 0;
  white-space: nowrap;
}
.btn-link:hover { color: var(--primary); border-color: var(--primary); gap: 9px; }

.btn svg { width: 16px; height: 16px; transition: transform 0.3s var(--ease); flex-shrink: 0; }
.btn:hover svg.arrow { transform: translateX(3px); }
.btn:hover svg.down { transform: translateY(2px); }

/* ---------- Theme toggle ---------- */
.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  position: relative;
  flex-shrink: 0;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease), transform 0.25s var(--ease);
}
.theme-toggle:hover { border-color: var(--primary); transform: translateY(-2px); }
.theme-toggle svg { width: 18px; height: 18px; position: absolute; transition: opacity 0.3s var(--ease), transform 0.4s var(--ease); }
.theme-toggle .icon-sun { opacity: 0; transform: rotate(-60deg) scale(0.5); }
.theme-toggle .icon-moon { opacity: 1; transform: rotate(0) scale(1); }
[data-theme="dark"] .theme-toggle .icon-sun { opacity: 1; transform: rotate(0) scale(1); }
[data-theme="dark"] .theme-toggle .icon-moon { opacity: 0; transform: rotate(60deg) scale(0.5); }

/* ---------- Navbar ---------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  padding: 16px var(--gutter) 0;
  transition: padding 0.35s var(--ease);
}
.navbar.scrolled { padding-top: 10px; }

.navbar-inner {
  position: relative;
  max-width: var(--container);
  margin: 0 auto;
  /* 3 columns keep the centre nav optically centred regardless of how wide
     the brand or the action cluster get. */
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 6px;
  height: 66px;
  padding: 0 12px 0 24px;
  border-radius: var(--radius-full);
  background: var(--surface-glass);
  backdrop-filter: blur(22px) saturate(1.8);
  -webkit-backdrop-filter: blur(22px) saturate(1.8);
  border: 1px solid var(--border);
  box-shadow: 0 10px 30px -22px rgba(10, 16, 31, 0.25);
  transition: background-color 0.35s var(--ease), border-color 0.35s var(--ease), box-shadow 0.35s var(--ease), height 0.3s var(--ease);
}
.navbar.scrolled .navbar-inner {
  height: 60px;
  background: var(--surface-glass-strong);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}
[data-theme="dark"] .navbar-inner { box-shadow: 0 10px 30px -20px rgba(0, 0, 0, 0.5), 0 0 40px -30px var(--glow-primary); }
[data-theme="dark"] .navbar.scrolled .navbar-inner { box-shadow: 0 20px 45px -20px rgba(0, 0, 0, 0.6), 0 0 50px -28px var(--glow-primary); }

.brand {
  grid-column: 1;
  justify-self: start;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16.5px;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 9px;
  flex-shrink: 0;
}
.brand-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gradient-brand); box-shadow: 0 0 12px var(--glow-primary); }


.nav-links {
  grid-column: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
}
.nav-links a {
  padding: 8px 15px;
  border-radius: var(--radius-full);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.25s var(--ease), background-color 0.25s var(--ease);
  position: relative;
}
.nav-links a:hover { color: var(--ink); background: var(--surface-2); }
.nav-links a.active { color: var(--ink); }
.nav-links a.active::after {
  content: "";
  position: absolute;
  bottom: 2px;
  left: 15px;
  right: 15px;
  height: 2px;
  border-radius: 2px;
  background: var(--gradient-brand);
  box-shadow: 0 0 8px var(--glow-primary);
}

.navbar-actions {
  grid-column: 3;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}
.nav-divider {
  width: 1px;
  height: 22px;
  background: var(--border-strong);
  flex-shrink: 0;
  margin: 0 2px;
}
.nav-icon-link {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-strong);
  color: var(--ink);
  transition: background 0.25s var(--ease), transform 0.25s var(--ease), border-color 0.25s var(--ease);
  flex-shrink: 0;
}
.nav-icon-link:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-2px); }
.nav-icon-link svg { width: 17px; height: 17px; }

.hamburger {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  flex-shrink: 0;
}
.hamburger span {
  width: 17px;
  height: 2px;
  background: var(--ink);
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}
.hamburger.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.mobile-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  background: var(--surface-glass-strong);
  backdrop-filter: blur(20px) saturate(1.6);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  z-index: 99;
  padding: 18px 22px 22px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  transform: translateY(-8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
  overflow-y: auto;
  max-height: min(70vh, 560px);
  box-shadow: var(--shadow-lg);
}
.mobile-menu.open { opacity: 1; transform: translateY(0); pointer-events: auto; }
.mobile-menu a {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  padding: 12px 4px;
  border-bottom: 1px solid var(--border);
}
.mobile-menu-actions { margin-top: 18px; display: flex; flex-direction: column; gap: 12px; }
.mobile-menu-actions .btn { width: 100%; }
.mobile-menu-utility { display: flex; gap: 10px; margin-top: 18px; }

/* ---------- Hero ---------- */
.hero {
  padding: clamp(48px, 8vw, 96px) 0 clamp(64px, 9vw, 112px);
  overflow: hidden;
  position: relative;
}
.hero-bg { position: absolute; inset: 0; overflow: hidden; z-index: 0; }
.hero-bg .bg-glow-1 { width: 46vw; height: 46vw; max-width: 620px; max-height: 620px; top: -16%; right: -10%; background: radial-gradient(circle, var(--glow-primary), transparent 70%); }
.hero-bg .bg-glow-2 { width: 34vw; height: 34vw; max-width: 460px; max-height: 460px; bottom: -14%; left: -8%; background: radial-gradient(circle, var(--glow-secondary), transparent 70%); }

.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(40px, 6vw, 96px); align-items: center; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 18px 9px 14px;
  border-radius: var(--radius-full);
  background: var(--surface-glass-strong);
  backdrop-filter: blur(12px) saturate(1.4);
  -webkit-backdrop-filter: blur(12px) saturate(1.4);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--ink-soft);
}
.hero-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gradient-brand);
  box-shadow: 0 0 8px var(--glow-primary);
  flex-shrink: 0;
}

.hero-copy h1,
.hero-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(38px, 5vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin: 22px 0 20px;
}
.hero-desc {
  font-size: clamp(15.5px, 1.4vw, 18px);
  color: var(--muted);
  max-width: 520px;
  line-height: 1.65;
  margin-bottom: 36px;
}
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 32px; }
.hero-social { display: flex; align-items: center; gap: 12px; }
.hero-social .label { font-family: var(--font-mono); font-size: 12px; color: var(--muted); margin-right: 4px; text-transform: uppercase; letter-spacing: 0.05em; }

/* Hero visual: large circular personal-brand photo with floating expertise cards */
.hero-visual { position: relative; display: flex; justify-content: center; z-index: 1; }
.hero-circle-frame {
  position: relative;
  width: min(100%, 420px);
  aspect-ratio: 1 / 1;
}
.hero-orb-glow {
  position: absolute;
  inset: -16%;
  border-radius: 50%;
  background: radial-gradient(circle, var(--glow-primary), transparent 68%);
  filter: blur(4px);
  z-index: 0;
  opacity: 0.9;
}
.hero-circle-ring {
  position: absolute;
  inset: -20px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  z-index: 1;
}
.hero-circle-ring::before {
  content: "";
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  border: 1px dashed var(--border);
  opacity: 0.6;
}
.hero-photo-circle {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  padding: 4px;
  background: linear-gradient(160deg, var(--primary), var(--secondary));
  box-shadow: var(--shadow-lg);
}
.hero-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  border-radius: 50%;
  background: var(--surface-2);
  display: block;
}

.hero-float {
  position: absolute;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: var(--surface-glass-strong);
  backdrop-filter: blur(14px) saturate(1.5);
  -webkit-backdrop-filter: blur(14px) saturate(1.5);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 15px 10px 10px;
  box-shadow: var(--shadow-md);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  animation: heroFloat 5.5s ease-in-out infinite;
}
.hero-float-icon {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.hero-float-icon svg { width: 13px; height: 13px; }
.hero-float-1 { top: 2%; left: -9%; animation-delay: 0s; }
.hero-float-2 { top: 44%; right: -12%; animation-delay: 1.6s; }
.hero-float-3 { bottom: 4%; left: -5%; animation-delay: 3.2s; }

@keyframes heroFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-9px); }
}

/* ---------- Social icon buttons ---------- */
.social-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), transform 0.25s var(--ease), border-color 0.25s var(--ease);
  background: var(--surface);
}
.social-icon:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-3px); box-shadow: 0 10px 24px -12px var(--glow-primary); }
.social-icon svg { width: 17px; height: 17px; }

/* ---------- Generic section spacing ---------- */
.section { padding: clamp(52px, 7vw, 100px) 0; }
.section-tint { background: var(--surface-2); }
.section-tint .container { padding-top: clamp(48px, 6vw, 80px); padding-bottom: clamp(48px, 6vw, 80px); }

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 0.62fr 1.38fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
/* The About artwork is a square (1:1) image with transparent corners and its
   own built-in framing. Container is square with object-fit: contain so the
   complete image shows — never cropped or stretched. The previous surface
   fill, border and gradient overlay are intentionally gone: they showed
   through the transparent corners and tinted the artwork, which would have
   meant displaying it as something other than supplied. Position, width and
   alignment are unchanged. */
.about-photo {
  position: relative;
  width: 100%;
  aspect-ratio: 1/1;
  background: transparent;
  border: none;
}
.about-photo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.about-copy p { color: var(--muted); font-size: clamp(15.5px, 1.3vw, 17px); line-height: 1.75; margin-bottom: 16px; }
.about-copy p:last-child { margin-bottom: 0; }
.about-copy strong { color: var(--ink); font-weight: 600; }
.about-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* ---------- Stats ---------- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.stat-col {
  padding: 32px 24px;
  border-left: 1px solid var(--border);
  border-top: 1px solid var(--border);
  text-align: left;
}
.stat-col:nth-child(3n+1) { border-left: none; }
.stat-col:nth-child(-n+3) { border-top: none; }
.stat-value {
  font-family: var(--font-mono);
  font-size: clamp(32px, 3.6vw, 46px);
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.stat-value .suffix { color: var(--primary); }
.stat-label { margin-top: 8px; color: var(--muted); font-size: 13.5px; font-weight: 500; }

/* ---------- Services ("What I Do" card grid) ----------
   Accent palette for this section: blue -> purple -> cyan, kept as local
   tokens so it doesn't leak into the site-wide colour system. */
.capabilities-grid {
  --svc-blue: #2E5CFF;
  --svc-purple: #7C5CFF;
  --svc-cyan: #0FB6C4;

  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  align-items: stretch;
}

.service-card {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 24px 22px;
  box-shadow: 0 6px 20px -14px rgba(15, 23, 42, 0.18);
  transition: all 0.3s ease;
}
/* Soft gradient glow behind the card, revealed on hover. */
.service-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--svc-blue), var(--svc-purple) 55%, var(--svc-cyan));
  opacity: 0;
  z-index: -1;
  filter: blur(14px);
  transition: opacity 0.3s ease;
}
.service-card:hover {
  transform: translateY(-5px);
  border-color: color-mix(in srgb, var(--svc-purple) 34%, var(--border));
  box-shadow: 0 18px 38px -20px rgba(46, 92, 255, 0.32);
}
.service-card:hover::before { opacity: 0.16; }

.service-icon {
  width: 46px; height: 46px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 13px;
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--svc-blue) 12%, var(--surface)),
    color-mix(in srgb, var(--svc-cyan) 12%, var(--surface)));
  border: 1px solid color-mix(in srgb, var(--svc-purple) 16%, var(--border));
  color: var(--svc-blue);
  overflow: hidden;
  transition: all 0.3s ease;
}
.service-icon svg { width: 21px; height: 21px; }
.service-card:hover .service-icon {
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--svc-blue) 22%, var(--surface)),
    color-mix(in srgb, var(--svc-cyan) 22%, var(--surface)));
  border-color: color-mix(in srgb, var(--svc-purple) 30%, var(--border));
  transform: scale(1.06);
}

/* Real brand marks: neutral container so brand colours stay true. */
.service-card.has-logo .service-icon {
  background: var(--surface);
  border-color: var(--border);
  padding: 7px;
}
.service-card.has-logo:hover .service-icon {
  background: var(--surface-2);
  border-color: color-mix(in srgb, var(--svc-purple) 24%, var(--border));
}
.service-icon img {
  width: 100%; height: 100%;
  object-fit: contain;      /* never distort a logo */
  border-radius: 5px;
  display: block;
}

.service-body { min-width: 0; }
.service-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
  margin-bottom: 6px;
}
.service-desc {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0;
}

[data-theme="dark"] .service-card {
  box-shadow: 0 6px 20px -14px rgba(0, 0, 0, 0.6);
}
[data-theme="dark"] .service-card:hover {
  box-shadow: 0 18px 38px -20px rgba(102, 144, 255, 0.34);
}
[data-theme="dark"] .service-icon { color: var(--primary); }

@media (max-width: 1024px) {
  .capabilities-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .capabilities-grid { grid-template-columns: 1fr; gap: 16px; }
}

/* ---------- Markets: 3 centered region boxes, single row ---------- */
/* Very light tinted band so the cards lift off the page without going heavy. */
.markets-section {
  background: var(--markets-bg, #F4F7FC);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
[data-theme="dark"] .markets-section { --markets-bg: var(--bg-raised); }
.markets-head { align-items: center; text-align: center; }
.markets-head .section-sub { margin-left: auto; margin-right: auto; }

.markets-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  max-width: 1000px;
  margin: 0 auto;
  align-items: stretch; /* equal heights regardless of country count */
}
.market-box {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 26px;
  box-shadow: 0 10px 30px -18px rgba(15, 23, 42, 0.16);
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.market-box:hover {
  transform: translateY(-5px);
  border-color: var(--primary);
  box-shadow: 0 22px 44px -22px var(--glow-primary), 0 10px 30px -18px rgba(15, 23, 42, 0.18);
}

/* Middle card: soft, restrained brand gradient.
   Plain-rgba declarations first as a fallback for browsers without color-mix();
   the color-mix versions below override them where supported so the tint
   tracks the theme tokens. */
.market-box.is-accent {
  background: linear-gradient(155deg, rgba(46, 92, 255, 0.07) 0%, rgba(15, 182, 196, 0.06) 100%), var(--surface);
  border-color: rgba(46, 92, 255, 0.18);
}
@supports (background: color-mix(in srgb, red 10%, blue)) {
  .market-box.is-accent {
    background:
      linear-gradient(155deg,
        color-mix(in srgb, var(--primary) 9%, var(--surface)) 0%,
        color-mix(in srgb, var(--secondary) 7%, var(--surface)) 100%);
    border-color: color-mix(in srgb, var(--primary) 22%, var(--border));
  }
}

.market-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.market-region-name {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.market-count {
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  white-space: nowrap;
}

.market-country-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.market-country {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
}
.market-country:last-child { border-bottom: none; }
.market-country-name {
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-soft);
}
.market-country.is-strong .market-country-name { color: var(--ink); font-weight: 600; }

.market-badge {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 9px;
  border-radius: var(--radius-full);
  background: var(--primary-soft);
  color: var(--primary-ink);
  border: 1px solid rgba(46, 92, 255, 0.2);
  white-space: nowrap;
}
[data-theme="dark"] .market-badge { color: var(--primary); }

@media (max-width: 900px) {
  .markets-row { grid-template-columns: 1fr; max-width: 440px; gap: 18px; }
}
@media (max-width: 480px) {
  .market-box { padding: 24px 20px; }
  .market-badge { font-size: 9px; padding: 3px 7px; }
}

/* ---------- Experience: single straight horizontal timeline ---------- */
.journey-road {
  position: relative;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
}
.journey-stops {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
  padding-top: 26px;
  min-width: 960px;
}
.journey-stops::before {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  top: 5px;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 2px;
  opacity: 0.7;
}
.journey-stop {
  position: relative;
  display: flex;
  justify-content: center;
}
.journey-stop::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--bg);
  border: 3px solid var(--secondary);
  z-index: 1;
}

/* Career cards — light by default; only the current role goes dark. */
.journey-stop-card {
  position: relative;
  width: 100%;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 14px 16px;
  box-shadow: 0 6px 18px -14px rgba(15, 23, 42, 0.2);
  transition: all 0.3s ease;
}
.journey-stop-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: 0 16px 32px -18px rgba(46, 92, 255, 0.3);
}

/* Company logo tile — painted with the logo's own background so the mark
   blends in rather than sitting on a mismatched swatch. Same size on
   every card. */
.journey-logo {
  display: block;
  width: 46px;
  height: 46px;
  margin: 0 auto 12px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--logo-bg, #FFFFFF);
  border: 1px solid var(--border);
  box-shadow: 0 2px 8px -4px rgba(15, 23, 42, 0.25);
  transition: all 0.3s ease;
}
.journey-logo.is-dark { border-color: rgba(255, 255, 255, 0.16); }
.journey-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;   /* never distort a company mark */
  display: block;
}
.journey-stop-card:hover .journey-logo { transform: scale(1.05); }

.journey-stop-company { font-family: var(--font-display); font-size: 15.5px; font-weight: 600; color: var(--ink); line-height: 1.3; }
.journey-stop-tenure { font-family: var(--font-mono); color: var(--muted); font-size: 11.5px; margin-top: 8px; }

/* --- Current role: dark card with a subtle blue/purple/cyan gradient edge --- */
.journey-stop-card.current {
  --jc-blue: #2E5CFF;
  --jc-purple: #7C5CFF;
  --jc-cyan: #0FB6C4;
  background: #0C1322;
  border-color: transparent;
  box-shadow: 0 14px 34px -18px rgba(12, 19, 34, 0.7);
}
/* Gradient border drawn as a ring behind the card face. */
.journey-stop-card.current::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, var(--jc-blue), var(--jc-purple) 50%, var(--jc-cyan));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: 0.75;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.journey-stop-card.current:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 42px -18px rgba(46, 92, 255, 0.5);
}
.journey-stop-card.current:hover::before { opacity: 1; }
.journey-stop-card.current .journey-stop-company { color: #FFFFFF; }
.journey-stop-card.current .journey-stop-tenure { color: rgba(255, 255, 255, 0.6); }
[data-theme="dark"] .journey-stop-card.current { background: #070C17; }

.current-badge {
  display: block;
  margin: 6px auto 0;
  width: fit-content;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--primary-soft);
  color: var(--primary-ink);
  padding: 3px 9px;
  border-radius: var(--radius-full);
}
[data-theme="dark"] .current-badge { color: var(--primary); }
/* Badge on the dark current card uses the site gradient. */
.journey-stop-card.current .current-badge {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: #06101F;
  font-weight: 600;
}

/* ---------- Selected Work / Project cards (editorial) ---------- */
.work-head-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 44px;
}

/* 24-column track. Cards span 8 columns (=3 per row) on desktop and 6 (=4 per
   row) on wide screens, so the grid stays balanced without oversized cards. */
.project-grid {
  display: grid;
  grid-template-columns: repeat(24, 1fr);
  gap: 26px 24px;
  align-items: stretch;
}
/* 3 per row at every desktop width — larger, more substantial cards. */
.project-grid > .proj-card { grid-column: span 8; }
.project-grid.preview > .proj-card { grid-column: span 8; }  /* homepage: 3 up */

/* Premium card: gradient hairline border drawn as a masked ring, soft layered
   shadow, and a faint gradient wash over the surface. Kept restrained. */
.proj-card {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  color: inherit;
  background:
    linear-gradient(160deg, rgba(46, 92, 255, 0.04), rgba(15, 182, 196, 0.03)),
    var(--surface);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  padding: 0;
  margin: 0;
  font: inherit;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 10px 28px -20px rgba(15, 23, 42, 0.28);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.proj-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(150deg,
    color-mix(in srgb, var(--primary) 34%, transparent),
    color-mix(in srgb, var(--border) 90%, transparent) 45%,
    color-mix(in srgb, var(--secondary) 30%, transparent));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: 0.7;
  transition: opacity 0.3s var(--ease);
  pointer-events: none;
  z-index: 1;
}
/* Fallback for browsers without mask-composite: a plain subtle border. */
@supports not ((mask-composite: exclude) or (-webkit-mask-composite: xor)) {
  .proj-card { border-color: var(--border); }
  .proj-card::after { display: none; }
}
.proj-card:hover {
  transform: translateY(-4px);
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.05),
    0 22px 44px -22px var(--glow-primary);
}
.proj-card:hover::after { opacity: 1; }
[data-theme="dark"] .proj-card {
  box-shadow: 0 1px 2px rgba(0,0,0,0.3), 0 10px 28px -20px rgba(0, 0, 0, 0.7);
}

/* Fixed 16:9 media box — matches the source assets exactly, so every
   thumbnail is the same size with no cropping or distortion. */
.proj-media {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.proj-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s var(--ease);
}
.proj-glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, var(--glow-primary), transparent 55%);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
  pointer-events: none;
}
.proj-card:hover .proj-media img { transform: scale(1.04); }
.proj-card:hover .proj-glow { opacity: 1; }

.proj-body {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 22px 22px 24px;
  flex-grow: 1;
}
.proj-title {
  display: block;
  font-family: var(--font-display);
  font-size: 17.5px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.35;
}
.proj-desc {
  display: block;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}
.proj-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  padding-top: 6px;
}
/* Compact gradient-tinted tags. */
.proj-skill {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--primary) 12%, var(--surface)),
    color-mix(in srgb, var(--secondary) 12%, var(--surface)));
  color: var(--primary-ink);
  border: 1px solid color-mix(in srgb, var(--primary) 20%, transparent);
  white-space: nowrap;
}
[data-theme="dark"] .proj-skill { color: var(--primary); }

/* ---------- Industries & Countries (compact tile collections) ---------- */
.chip-section { padding-top: clamp(32px, 4vw, 52px); padding-bottom: clamp(32px, 4vw, 52px); }
.chip-head { margin-bottom: 28px; }

.industry-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.industry-tile {
  display: inline-flex;
  align-items: center;
  padding: 9px 16px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-soft);
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--primary) 7%, var(--surface)),
    color-mix(in srgb, var(--secondary) 6%, var(--surface)));
  border: 1px solid color-mix(in srgb, var(--primary) 14%, var(--border));
  box-shadow: 0 2px 8px -6px rgba(15, 23, 42, 0.25);
  transition: all 0.3s ease;
}
.industry-tile:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--primary) 32%, var(--border));
  color: var(--ink);
}

/* Square flag tiles in one continuously scrolling row. */
.countries-marquee-wrap {
  overflow: hidden;
  padding: 4px 0 8px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
}
/* Spacing via per-tile margin, not flex `gap`: with `gap`, -50% falls half a
   gap short of one full copy and the loop visibly jumps. */
.country-row {
  display: flex;
  width: max-content;
  animation: marqueeForward 60s linear infinite;
  will-change: transform;
}
.country-tile {
  flex: 0 0 auto;
  width: 104px;
  margin-right: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  aspect-ratio: 1 / 1;
  padding: 12px 8px;
  border-radius: 14px;
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--primary) 7%, var(--surface)),
    color-mix(in srgb, var(--secondary) 6%, var(--surface)));
  border: 1px solid color-mix(in srgb, var(--primary) 14%, var(--border));
  box-shadow: 0 2px 10px -7px rgba(15, 23, 42, 0.28);
  transition: all 0.3s ease;
}
.country-tile:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--primary) 32%, var(--border));
  box-shadow: 0 12px 24px -16px var(--glow-primary);
}
.country-flag {
  width: 38px;
  height: 26px;
  border-radius: 5px;
  overflow: hidden;
  display: block;
  flex-shrink: 0;
  border: 1px solid var(--border);
  box-shadow: 0 1px 4px -2px rgba(15, 23, 42, 0.3);
}
.country-flag img,
.country-flag svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.country-name {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-soft);
  text-align: center;
  line-height: 1.25;
}

@media (max-width: 560px) {
  /* Stays a moving row on small screens rather than becoming a tall grid. */
  .country-tile { width: 88px; margin-right: 10px; }
  .country-flag { width: 32px; height: 22px; }
  .country-name { font-size: 10.5px; }
  .industry-tile { font-size: 12px; padding: 8px 13px; }
}

.work-cta-row { display: flex; justify-content: center; margin-top: 56px; }

/* ---------- Client Reviews (alternating dark/light marquee) ---------- */
.reviews-head { align-items: center; text-align: center; }
.reviews-head .section-sub { margin-left: auto; margin-right: auto; }

.reviews-marquee-wrap {
  overflow: hidden;
  padding: 6px 0 10px;
  /* Fade the edges so cards enter/leave rather than being hard-clipped. */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
}
/* Spacing lives on the card (margin), not flex `gap`: with `gap`, a track of
   2N items has 2N-1 gaps, so -50% falls half a gap short of one full copy and
   the loop visibly jumps. Uniform margin makes each card's period exactly
   width + margin, so -50% lands perfectly. */
.reviews-track {
  display: flex;
  align-items: stretch;      /* equal card heights across the row */
  width: max-content;
  /* ~16px/sec — deliberately slow, matching the brand-logo marquee's pace. */
  animation: marqueeForward 150s linear infinite;
  will-change: transform;
}

.review-card {
  flex: 0 0 auto;
  width: 380px;
  min-height: 300px;
  margin-right: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  border-radius: var(--radius-lg);
  padding: 30px;
  border: 1px solid transparent;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

/* Light cards (2, 4, 6) */
.review-card.is-light {
  background: var(--surface);
  border-color: var(--border);
  box-shadow: 0 12px 32px -20px rgba(15, 23, 42, 0.22);
}
.review-card.is-light .review-quote-text { color: var(--ink-soft); }
.review-card.is-light .review-name { color: var(--ink); }
.review-card.is-light .review-country { color: var(--muted); }
.review-card.is-light .review-person { border-top-color: var(--border); }

/* Dark cards (1, 3, 5) */
.review-card.is-dark {
  background: var(--review-dark-bg, #0E1526);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 16px 40px -22px rgba(5, 10, 25, 0.55);
}
[data-theme="dark"] .review-card.is-dark { --review-dark-bg: #060B16; }
.review-card.is-dark .review-quote-text { color: rgba(255, 255, 255, 0.78); }
.review-card.is-dark .review-name { color: #FFFFFF; }
.review-card.is-dark .review-country { color: rgba(255, 255, 255, 0.55); }
.review-card.is-dark .review-person { border-top-color: rgba(255, 255, 255, 0.12); }

.review-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 24px 48px -22px var(--glow-primary);
}

/* Premium gold — warm and restrained, not neon. Same on light and dark cards. */
.review-stars { display: flex; gap: 4px; color: #D4A63C; }
.review-card.is-dark .review-stars { color: #E8BE5A; } /* lifted slightly for contrast on dark */
.review-stars svg { width: 15px; height: 15px; }

.review-quote-text {
  font-size: 14.5px;
  line-height: 1.75;
  flex-grow: 1;
  margin: 0;
}

/* Row now holds the name/country block on the left and the flag on the right.
   The inner .review-identity keeps the original vertical name-over-country
   stacking and spacing untouched. */
.review-person {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 18px;
  border-top: 1px solid transparent;
  margin-top: auto;
}
.review-identity {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.review-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15.5px;
}
.review-country {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Small rounded-square flag chip — identical size/position on every card. */
.review-flag {
  flex-shrink: 0;
  width: 38px;
  height: 28px;
  border-radius: 7px;
  overflow: hidden;
  display: block;
  border: 1px solid var(--border);
  box-shadow: 0 2px 8px -4px rgba(15, 23, 42, 0.3);
}
.review-card.is-dark .review-flag { border-color: rgba(255, 255, 255, 0.18); }
.review-flag img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (max-width: 768px) {
  .review-card { width: 300px; min-height: 290px; padding: 24px; margin-right: 16px; }
  .review-quote-text { font-size: 14px; }
}
@media (max-width: 420px) {
  .review-card { width: 270px; padding: 22px; margin-right: 14px; }
}

.reviews-empty {
  text-align: center;
  max-width: var(--container);
  margin: 0 auto;
  padding: 72px var(--gutter);
  color: var(--muted);
  position: relative;
}
.reviews-empty::before {
  content: "\201C";
  font-family: var(--font-display);
  font-size: 90px;
  color: var(--primary);
  opacity: 0.15;
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  line-height: 1;
}
.reviews-empty strong { display: block; color: var(--ink); font-size: 18px; margin-bottom: 8px; font-family: var(--font-display); position: relative; }
.reviews-empty span { position: relative; }

@media (max-width: 560px) {
  .review-card { padding: 22px; }
}

/* ---------- Brands marquee (3 rows of logo tiles) ---------- */
.brands-marquee-wrap {
  overflow: hidden;
  padding: 4px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
}
.brands-marquee { display: flex; flex-direction: column; gap: 16px; }

.brand-row { overflow: hidden; }
.brand-track {
  display: flex;
  width: max-content;
  animation: marqueeForward var(--row-duration, 90s) linear infinite;
  will-change: transform;
}
.brand-row[data-dir="reverse"] .brand-track { animation-name: marqueeReverse; }
/* Deliberately NO hover-pause here — the logo conveyor must never stop. */

/* Track holds 2 identical copies, so -50% lands copy 2 exactly where copy 1
   started — a seamless, jump-free loop. */
@keyframes marqueeForward {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@keyframes marqueeReverse {
  from { transform: translateX(-50%); }
  to   { transform: translateX(0); }
}

.brand-tile {
  flex: 0 0 auto;
  width: 156px;
  height: 96px;
  margin-right: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  border-radius: var(--radius-md);
  background: var(--brand-bg, var(--surface));
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.brand-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
/* Logos whose artwork is light-on-dark: soften the border so the dark tile
   doesn't get a bright outline in light mode. */
.brand-tile.is-dark { border-color: rgba(255, 255, 255, 0.12); }
/* width/height 100% (rather than max-*) lets small source logos scale UP to
   fill the box, so every logo reads at a consistent, larger size.
   object-fit: contain still preserves aspect ratio — never stretched. */
.brand-tile img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

@media (max-width: 860px) {
  .brand-tile { width: 132px; height: 84px; padding: 9px; margin-right: 13px; }
  .brands-marquee { gap: 13px; }
}
@media (max-width: 560px) {
  .brand-tile { width: 112px; height: 72px; padding: 8px; margin-right: 11px; }
  .brands-marquee { gap: 11px; }
}

/* ---------- Process (horizontal progression) ---------- */
.process-line {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
  position: relative;
}
.process-line::before {
  content: "";
  position: absolute;
  top: 22px;
  left: 5%;
  right: 5%;
  height: 1px;
  background: var(--border);
  z-index: 0;
}
.process-item { position: relative; z-index: 1; }
/* Numbered step circles.
   Light mode: the digit is painted with the brand gradient using a two-layer
   background — the gradient clipped to the text, plus a solid surface fill
   clipped to the padding box for the circle itself.
   Dark mode: the gradient is dropped in favour of a solid near-white digit,
   which reads far more strongly against the dark page. */
.process-node-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px; height: 48px;
  border-radius: 50%;
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 20px;
  box-shadow: 0 6px 18px -10px rgba(15, 23, 42, 0.2);
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease), transform 0.3s var(--ease);

  /* Safe default: solid dark digit on a surface circle. */
  background: var(--surface);
  color: var(--ink);
}

/* Gradient digit only where the two-layer text clip is actually supported —
   without this guard an unsupporting browser would paint a transparent
   text-fill with no gradient behind it, leaving the numbers invisible. */
@supports (background-clip: text, padding-box) or (-webkit-background-clip: text, padding-box) {
  .process-node-num {
    background:
      linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%) text,
      var(--surface) padding-box;
    -webkit-background-clip: text, padding-box;
    background-clip: text, padding-box;
    -webkit-text-fill-color: transparent;
    color: transparent;
  }
}

[data-theme="dark"] .process-node-num {
  background: var(--surface-2) padding-box;
  -webkit-background-clip: padding-box;
  background-clip: padding-box;
  -webkit-text-fill-color: var(--ink);
  color: var(--ink);
  border-color: var(--border-strong);
  box-shadow: 0 6px 18px -10px rgba(0, 0, 0, 0.6);
}

.process-item:hover .process-node-num {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -10px var(--glow-primary);
}
.process-title { font-family: var(--font-display); font-size: 17px; font-weight: 600; margin-bottom: 8px; color: var(--ink); }
.process-desc { color: var(--muted); font-size: 13.5px; line-height: 1.55; }

/* ---------- Why work with me ---------- */
.why-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}
.why-copy p { color: var(--muted); font-size: 17px; line-height: 1.7; }
.why-flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.why-flow-step {
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 12px 18px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
}
.why-flow-arrow { color: var(--primary); font-size: 18px; }

/* ---------- Certifications & Education ---------- */
.cert-edu-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(24px, 4vw, 48px);
}
.cert-list { display: flex; flex-direction: column; }
.cert-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 4px;
  border-bottom: 1px solid var(--border);
}
.cert-item:first-child { padding-top: 0; }
.cert-icon {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary-ink);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
[data-theme="dark"] .cert-icon { color: var(--primary); }
.cert-icon svg { width: 17px; height: 17px; }
.cert-title { font-weight: 600; font-size: 15px; color: var(--ink); }
.cert-issuer { color: var(--muted); font-size: 13px; margin-top: 2px; }

.edu-card {
  background: var(--ink);
  color: var(--bg);
  border-radius: var(--radius-md);
  padding: 30px 28px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  position: relative;
  overflow: hidden;
}
.edu-card::after {
  content: "";
  position: absolute;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--glow-primary), transparent 70%);
  top: -60px; right: -60px;
  opacity: 0.8;
}
.edu-card .eyebrow { color: var(--secondary); position: relative; }
.edu-degree { font-family: var(--font-display); font-size: 19px; font-weight: 600; position: relative; }
.edu-institution { color: rgba(247, 249, 252, 0.6); font-size: 14px; position: relative; }

/* ---------- Final CTA ---------- */
.cta-band {
  background: var(--ink);
  border-radius: var(--radius-lg);
  padding: clamp(48px, 7vw, 92px) clamp(28px, 6vw, 80px);
  text-align: center;
  color: var(--bg);
  position: relative;
  overflow: hidden;
}
.cta-band .bg-glow-1 { width: 50%; height: 140%; top: -20%; left: -10%; background: radial-gradient(circle, var(--glow-primary), transparent 65%); }
.cta-band .bg-glow-2 { width: 40%; height: 120%; bottom: -20%; right: -8%; background: radial-gradient(circle, var(--glow-secondary), transparent 65%); }
.cta-band > * { position: relative; z-index: 1; }
.cta-band h2 {
  font-family: var(--font-display);
  font-size: clamp(30px, 4vw, 48px);
  font-weight: 600;
  letter-spacing: -0.02em;
}
.cta-band p { margin-top: 14px; font-size: clamp(15px, 1.4vw, 18px); color: rgba(247, 249, 252, 0.72); max-width: 520px; margin-left: auto; margin-right: auto; }
.cta-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 32px; }
/* The CTA band's own background is the dark ink colour, so the DARK tier would
   be invisible on it. Inside the band the dark tier inverts to a light face
   while the gradient tier is unchanged — the 1st/3rd vs 2nd rhythm is
   preserved, just flipped for legibility against the dark panel. */
.cta-band .btn-primary {
  background: var(--bg);
  color: var(--ink);
  border-color: transparent;
  box-shadow: none;
}
.cta-band .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px -14px rgba(0, 0, 0, 0.45);
  color: var(--primary-ink);
}
.cta-band .btn-gradient { box-shadow: 0 10px 26px -12px rgba(0, 0, 0, 0.5); }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(32px, 5vw, 64px);
}
.contact-list { display: flex; flex-direction: column; }
.contact-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 4px;
  border-bottom: 1px solid var(--border);
  transition: gap 0.3s var(--ease);
}
.contact-item:first-child { padding-top: 0; }
.contact-item:hover { gap: 20px; }
.contact-item:hover .contact-value { color: var(--primary); }
.contact-icon {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: var(--primary);
}
.contact-icon svg { width: 18px; height: 18px; }
.contact-label { font-family: var(--font-mono); font-size: 11.5px; color: var(--muted); font-weight: 500; text-transform: uppercase; letter-spacing: 0.04em; }
.contact-value { font-weight: 600; font-size: 15px; word-break: break-word; color: var(--ink); transition: color 0.25s var(--ease); }

.contact-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 3vw, 34px);
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: var(--shadow-sm);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-field { display: flex; flex-direction: column; gap: 8px; }
.form-field label { font-family: var(--font-mono); font-size: 11.5px; font-weight: 500; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.form-field input,
.form-field textarea {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  font-family: inherit;
  font-size: 14.5px;
  background: var(--bg);
  color: var(--ink);
  resize: vertical;
}
.form-field input:focus,
.form-field textarea:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px var(--primary-soft); }
.form-note { font-size: 12.5px; color: var(--muted); }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border); padding: 56px 0 28px; }
.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
}
.footer-brand .brand { margin-bottom: 12px; }
.footer-brand p { color: var(--muted); font-size: 14px; max-width: 320px; }
.footer-col-title { font-family: var(--font-mono); font-size: 11.5px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 16px; }
.footer-links { display: flex; flex-direction: column; gap: 12px; }
.footer-links a { font-size: 14.5px; color: var(--ink-soft); transition: color 0.25s var(--ease); }
.footer-links a:hover { color: var(--primary); }
.footer-social { display: flex; gap: 10px; margin-top: 4px; }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: var(--muted);
}

/* ---------- Floating WhatsApp ---------- */
.whatsapp-float {
  position: fixed;
  bottom: 26px;
  right: 26px;
  z-index: 90;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25D366;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 14px 30px -12px rgba(37, 211, 102, 0.55);
  transition: transform 0.3s var(--ease);
}
.whatsapp-float:hover { transform: scale(1.08); }
.whatsapp-float svg { width: 26px; height: 26px; fill: #fff; }
.whatsapp-tooltip {
  position: absolute;
  right: 66px;
  top: 50%;
  transform: translateY(-50%) translateX(8px);
  background: var(--ink);
  color: var(--bg);
  padding: 8px 14px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
}
.whatsapp-float:hover .whatsapp-tooltip { opacity: 1; transform: translateY(-50%) translateX(0); }

/* ---------- Cursor glow (desktop only, decorative) ---------- */
.cursor-glow {
  position: fixed;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--glow-primary), transparent 70%);
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.4s var(--ease);
  transform: translate(-50%, -50%);
  mix-blend-mode: var(--cursor-blend, normal);
  will-change: transform;
}
[data-theme="dark"] .cursor-glow { --cursor-blend: screen; }
.cursor-glow.active { opacity: 0.7; }

/* =========================================================
   PROJECTS PAGE
   ========================================================= */
.projects-hero { padding: clamp(36px, 6vw, 64px) 0 40px; position: relative; }
.projects-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(34px, 4.4vw, 54px);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-top: 14px;
}
.projects-hero p { color: var(--muted); font-size: 16px; margin-top: 14px; max-width: 560px; }

.filters-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  padding: 24px 0 40px;
  position: sticky;
  top: var(--nav-h);
  background: var(--bg);
  z-index: 10;
}
.filter-chip {
  padding: 9px 17px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  transition: all 0.25s var(--ease);
}
.filter-chip:hover { border-color: var(--primary); color: var(--primary); }
.filter-chip.active { background: var(--ink); border-color: var(--ink); color: var(--bg); }
[data-theme="dark"] .filter-chip.active { background: var(--gradient-brand); color: #050810; }

.project-grid.full-grid { padding-bottom: 80px; }

/* Portfolio grid gets a wider track and tighter gutters than the default
   container so the three cards per row are substantially larger. */
.projects-wide {
  max-width: 1580px;
  padding-left: clamp(16px, 2vw, 36px);
  padding-right: clamp(16px, 2vw, 36px);
}
.projects-wide .project-grid { gap: 30px 28px; }
@media (min-width: 1025px) {
  .projects-wide .proj-title { font-size: 19px; }
  .projects-wide .proj-desc { font-size: 14.5px; }
  .projects-wide .proj-body { padding: 24px 24px 26px; }
}

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 20px;
  color: var(--muted);
}

/* =========================================================
   CASE STUDY PAGE
   ========================================================= */
.cs-hero { padding: clamp(32px, 5vw, 56px) 0 40px; }
.cs-breadcrumb { display: flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 12.5px; color: var(--muted); margin-bottom: 22px; }
.cs-breadcrumb a { color: var(--muted); transition: color 0.25s var(--ease); }
.cs-breadcrumb a:hover { color: var(--primary); }

.cs-title { font-family: var(--font-display); font-size: clamp(30px, 4.2vw, 50px); font-weight: 600; letter-spacing: -0.02em; margin: 16px 0 20px; }
.cs-meta-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 8px; }
.cs-meta-chip {
  padding: 8px 16px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.cs-objective { color: var(--muted); font-size: 16px; max-width: 640px; margin-top: 18px; line-height: 1.7; }

.cs-main-image {
  margin: 40px 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface-2);
  cursor: zoom-in;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.cs-main-image:hover { border-color: var(--primary); box-shadow: var(--shadow-md); }
.cs-main-image img { width: 100%; height: auto; display: block; }

.cs-content-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  margin-bottom: 56px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.cs-block { background: var(--surface); padding: 30px; }
.cs-block-title { font-family: var(--font-mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--primary); margin-bottom: 14px; }
.cs-block p { color: var(--ink-soft); font-size: 15px; line-height: 1.7; }

.cs-work-list { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 56px; }
.cs-work-chip {
  padding: 10px 18px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-strong);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
}

.cs-results-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 56px;
}
.cs-metric-card { padding: 28px 20px; border-left: 1px solid var(--border); }
.cs-metric-card:first-child { border-left: none; }
.cs-metric-value { font-family: var(--font-mono); font-size: clamp(28px, 3vw, 38px); font-weight: 500; color: var(--ink); }
[data-theme="dark"] .cs-metric-value,
.cs-metric-value { background: var(--gradient-brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cs-metric-label { font-size: 12.5px; color: var(--muted); margin-top: 8px; font-weight: 500; }

.cs-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 64px;
}
.cs-gallery-item {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  cursor: zoom-in;
  aspect-ratio: 4/3;
  background: var(--surface-2);
  transition: border-color 0.3s var(--ease);
}
.cs-gallery-item:hover { border-color: var(--primary); }
.cs-gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease); }
.cs-gallery-item:hover img { transform: scale(1.06); }

.cs-nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 40px 0 20px;
  border-top: 1px solid var(--border);
}
.cs-nav-link {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.cs-nav-link:hover { border-color: var(--primary); transform: translateY(-2px); }
.cs-nav-link.next { text-align: right; align-items: flex-end; }
.cs-nav-label { font-family: var(--font-mono); font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 500; }
.cs-nav-title { font-family: var(--font-display); font-weight: 600; font-size: 15px; color: var(--ink); }
.cs-nav-back {
  width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid var(--border-strong);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.25s var(--ease), transform 0.25s var(--ease), border-color 0.25s var(--ease);
}
.cs-nav-back:hover { border-color: var(--primary); color: var(--primary); transform: scale(1.06); }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(4, 6, 12, 0.94);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease);
}
.lightbox.open { opacity: 1; pointer-events: auto; }
.lightbox-img-wrap { max-width: 88vw; max-height: 82vh; }
.lightbox img { max-width: 88vw; max-height: 82vh; object-fit: contain; border-radius: 8px; }
.lightbox-close, .lightbox-prev, .lightbox-next {
  position: absolute;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.25s var(--ease), border-color 0.25s var(--ease);
}
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover { background: rgba(255,255,255,0.18); border-color: var(--secondary); }
.lightbox-close { top: 24px; right: 24px; }
.lightbox-prev { left: 24px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 24px; top: 50%; transform: translateY(-50%); }
.lightbox-counter {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 12.5px;
  background: rgba(255,255,255,0.08);
  padding: 6px 14px;
  border-radius: var(--radius-full);
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1160px) {
  .platforms-grid { grid-template-columns: repeat(3, 1fr); }
  .cs-results-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-circle-frame { width: min(100%, 320px); margin: 0 auto; }
  .hero-float { font-size: 11px; padding: 8px 13px 8px 8px; }
  .about-grid { grid-template-columns: 1fr; }
  .about-photo { width: 220px; aspect-ratio: 1/1; margin: 0 auto; }
  .skills-list { grid-template-columns: 1fr; grid-auto-flow: row; grid-template-rows: none; }
  .markets-globe-deco { display: none; }
  .market-row { grid-template-columns: 1fr; gap: 12px; }
  .process-line { grid-template-columns: repeat(3, 1fr); row-gap: 32px; }
  .process-line::before { display: none; }
  .why-grid { grid-template-columns: 1fr; }
  .cert-edu-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  /* Tablet: 2 per row.
     The 24-column desktop track is abandoned here rather than re-spanned. Its
     23 column gaps are fixed-width, so the track has a minimum width of
     23 x gap regardless of how far a card spans — at a 28px gap that is 644px,
     wider than any tablet or phone viewport, which forced cards outside their
     container. A real 2-column track has a single gap, so cards size to the
     space actually available. */
  .project-grid { grid-template-columns: repeat(2, 1fr); }
  .project-grid > .proj-card,
  .project-grid.preview > .proj-card { grid-column: auto; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .cs-content-grid { grid-template-columns: 1fr; }
  .cs-gallery { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  /* Collapse to: brand ......... [theme] [hamburger] */
  .navbar-inner { grid-template-columns: 1fr auto; padding-right: 10px; }
  .nav-links { display: none; }
  .navbar-actions { grid-column: 2; }
  .navbar-actions .nav-icon-link,
  .navbar-actions .btn-primary,
  .nav-divider { display: none; }
  .hamburger { display: flex; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-col:nth-child(n) { border-left: 1px solid var(--border); border-top: 1px solid var(--border); }
  .stat-col:nth-child(2n+1) { border-left: none; }
  .stat-col:nth-child(-n+2) { border-top: none; }
  .platforms-grid { grid-template-columns: repeat(2, 1fr); }
  /* Mobile: one card per row, sized to the viewport rather than to a shrunken
     desktop track. A single column has no column gap at all, so the card width
     is exactly the container width minus its side padding. */
  .project-grid { grid-template-columns: 1fr; gap: 18px; }
  .project-grid > .proj-card,
  .project-grid.preview > .proj-card { grid-column: auto; }
  /* Beats the wider desktop gap set on .projects-wide .project-grid. */
  .projects-wide .project-grid { gap: 18px; }
  .process-line { grid-template-columns: repeat(2, 1fr); }
  .form-row { grid-template-columns: 1fr; }
  .cs-results-grid { grid-template-columns: repeat(2, 1fr); }
  .cs-metric-card:nth-child(2n+1) { border-left: none; }
  .cs-gallery { grid-template-columns: 1fr; }
  .cs-nav { grid-template-columns: 1fr; text-align: center; }
  .cs-nav-link.next { text-align: center; align-items: center; }
  .cs-nav-back { margin: 0 auto; }
  .work-head-row { flex-direction: column; align-items: flex-start; }
  .cursor-glow { display: none; }
}

@media (max-width: 560px) {
  :root { --nav-h: 68px; }
  .hero-circle-frame { width: min(100%, 250px); }
  .hero-float { font-size: 10.5px; padding: 7px 11px 7px 7px; gap: 7px; }
  .hero-float-icon { width: 20px; height: 20px; }
  .hero-float-1 { left: -2%; }
  .hero-float-2 { right: -2%; }
  .hero-float-3 { left: 0; }
  .timeline-item { grid-template-columns: 20px 1fr; }
  .timeline-tenure { grid-column: 1 / -1; order: 3; padding-top: 2px; }
  .timeline-marker { grid-row: 1; }
  .platforms-grid { grid-template-columns: repeat(2, 1fr); }
  .process-line { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; gap: 28px; }
  .cs-results-grid { grid-template-columns: 1fr 1fr; }
  .cs-meta-row { gap: 8px; }
  .filters-bar { position: static; }
  .whatsapp-float { bottom: 18px; right: 18px; width: 52px; height: 52px; }
  .whatsapp-tooltip { display: none; }
}
