/* ══════════════════════════════════════════════
   DIXIT PUJARA — 3D PORTFOLIO
   Light / dark themes · Three.js hero · 3D tilt cards
══════════════════════════════════════════════ */

/* ── Tokens ── */
:root {
  --bg: #F5F8FC;
  --bg-2: #EBF1FA;
  --surface: #FFFFFF;
  --surface-2: #EEF3FB;
  --glass: rgba(255, 255, 255, .7);
  --text: #121C2E;
  --text-muted: #4F5B73;
  --text-light: #8490A8;
  --border: rgba(18, 28, 46, .08);
  --border-strong: rgba(18, 28, 46, .14);
  --accent: #0A6CF5;
  --accent-2: #0038D6;
  --accent-3: #00A6FF;
  --accent-soft: rgba(10, 108, 245, .10);
  --navy: #121C2E;
  --green: #10B981;
  --wa: #25D366;
  --shadow-sm: 0 1px 2px rgba(18, 28, 46, .05), 0 2px 8px rgba(18, 28, 46, .04);
  --shadow-md: 0 10px 30px -12px rgba(0, 56, 214, .18), 0 2px 6px rgba(18, 28, 46, .04);
  --shadow-lg: 0 30px 60px -20px rgba(0, 56, 214, .28), 0 8px 20px -8px rgba(18, 28, 46, .10);
  --grad: linear-gradient(120deg, #0038D6 0%, #0A6CF5 50%, #00A6FF 100%);
  --logo-chip: transparent;
  --logo-d: #121C2E;
  --card-glass: rgba(255, 255, 255, .66);
  --card-edge: rgba(255, 255, 255, .9);
  --blob-alpha: 20%;
  --dot: rgba(18, 28, 46, .07);
  --radius: 18px;
  --radius-sm: 12px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --ease: cubic-bezier(.22, 1, .36, 1);
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #070B14;
  --bg-2: #0A101D;
  --surface: #0E1626;
  --surface-2: #142036;
  --glass: rgba(14, 22, 38, .62);
  --text: #E8EEF9;
  --text-muted: #9DAAC4;
  --text-light: #66738F;
  --border: rgba(255, 255, 255, .07);
  --border-strong: rgba(255, 255, 255, .14);
  --accent: #3D8BFF;
  --accent-2: #2563EB;
  --accent-3: #38BDF8;
  --accent-soft: rgba(61, 139, 255, .13);
  --navy: #121C2E;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-md: 0 14px 34px -14px rgba(0, 0, 0, .7);
  --shadow-lg: 0 34px 70px -24px rgba(0, 0, 0, .85), 0 0 0 1px rgba(255, 255, 255, .04);
  --grad: linear-gradient(120deg, #2563EB 0%, #3D8BFF 50%, #38BDF8 100%);
  --logo-chip: rgba(255, 255, 255, .92);
  --logo-d: #FFFFFF;
  --card-glass: rgba(14, 22, 38, .62);
  --card-edge: rgba(255, 255, 255, .05);
  --blob-alpha: 24%;
  --dot: rgba(255, 255, 255, .06);
  color-scheme: dark;
}

/* ── Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color .4s var(--ease), color .4s var(--ease);
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
ul { list-style: none; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.gradient-text {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 24px; border-radius: 999px;
  font-weight: 600; font-size: 15px; line-height: 1;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), background-color .3s, color .3s, border-color .3s;
  will-change: transform;
}
.btn-primary {
  background: var(--grad); color: #fff;
  box-shadow: 0 10px 24px -10px var(--accent), inset 0 1px 0 rgba(255,255,255,.25);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 18px 34px -12px var(--accent), inset 0 1px 0 rgba(255,255,255,.25); }
.btn-secondary { background: var(--glass); color: var(--text); border: 1px solid var(--border-strong); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.btn-secondary:hover { transform: translateY(-3px); border-color: var(--accent); color: var(--accent); }
.btn-full { width: 100%; }
.btn-sm { padding: 10px 18px; font-size: 13px; }
.btn-white { background: #fff; color: #111; }
.btn-white:hover { transform: translateY(-2px); }

/* ── Floating WhatsApp ── */
.whatsapp-float {
  position: fixed; right: 22px; bottom: 22px; z-index: 90;
  width: 58px; height: 58px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--wa); color: #fff; font-size: 28px;
  box-shadow: 0 12px 28px -8px rgba(37, 211, 102, .6);
  transition: transform .35s var(--ease);
}
.whatsapp-float:hover { transform: scale(1.08) rotate(-6deg); }
.whatsapp-tooltip {
  position: absolute; right: 70px; white-space: nowrap;
  background: var(--surface); color: var(--text); border: 1px solid var(--border);
  font-size: 13px; font-weight: 600; padding: 8px 12px; border-radius: 10px;
  box-shadow: var(--shadow-md);
  opacity: 0; transform: translateX(8px); pointer-events: none;
  transition: opacity .25s, transform .25s var(--ease);
}
.whatsapp-float:hover .whatsapp-tooltip { opacity: 1; transform: none; }

/* ── Navbar ── */
.navbar {
  position: fixed; inset: 0 0 auto 0; z-index: 80;
  padding: 16px 0;
  transition: padding .35s var(--ease), background-color .35s, box-shadow .35s, border-color .35s;
  border-bottom: 1px solid transparent;
}
.navbar.scrolled {
  padding: 10px 0;
  background: var(--glass);
  backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-sm);
}
.nav-container { max-width: 1200px; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.nav-links { display: flex; gap: 4px; }
.nav-link {
  display: block; padding: 8px 14px; border-radius: 999px;
  font-size: 14px; font-weight: 500; color: var(--text-muted);
  transition: color .25s, background-color .25s;
}
.nav-link:hover { color: var(--text); }
.nav-link.active { color: var(--accent); background: var(--accent-soft); }
.nav-right { display: flex; align-items: center; gap: 10px; }
.nav-cta {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: 999px;
  background: var(--text); color: var(--bg);
  font-size: 14px; font-weight: 600;
  transition: transform .3s var(--ease);
}
.nav-cta:hover { transform: translateY(-2px); }
.theme-toggle {
  position: relative; width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--border-strong); background: var(--glass);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  overflow: hidden; color: var(--text);
  transition: transform .4s var(--ease), border-color .3s;
}
.theme-toggle:hover { border-color: var(--accent); transform: rotate(-15deg); }
.theme-toggle i { position: absolute; inset: 0; display: grid; place-items: center; font-size: 16px; transition: transform .5s var(--ease), opacity .3s; }
.theme-toggle .fa-sun { transform: translateY(120%) rotate(90deg); opacity: 0; }
:root[data-theme="dark"] .theme-toggle .fa-moon { transform: translateY(-120%) rotate(-90deg); opacity: 0; }
:root[data-theme="dark"] .theme-toggle .fa-sun { transform: none; opacity: 1; color: #FBBF24; }
.nav-hamburger { display: none; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--border-strong); position: relative; }
.nav-hamburger span { position: absolute; left: 12px; right: 12px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .35s var(--ease), opacity .2s; }
.nav-hamburger span:nth-child(1) { top: 14px; }
.nav-hamburger span:nth-child(2) { top: 20px; }
.nav-hamburger span:nth-child(3) { top: 26px; }
.nav-hamburger.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ══════════════ HERO ══════════════ */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center;
  padding: 116px 0 96px;
  overflow: hidden; isolation: isolate;
  background:
    radial-gradient(50% 60% at 78% 40%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 70%),
    radial-gradient(40% 50% at 8% 10%, color-mix(in srgb, var(--accent-3) 10%, transparent), transparent 70%),
    var(--bg);
}
.hero::before {                      /* faint grid, fades out at the edges */
  content: ''; position: absolute; inset: 0; z-index: -2; pointer-events: none;
  background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 75% 65% at 50% 35%, #000 25%, transparent 80%);
  mask-image: radial-gradient(ellipse 75% 65% at 50% 35%, #000 25%, transparent 80%);
}
/* Three.js particle wave: lower part of the hero */
.hero-canvas { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 100%; z-index: -1; display: block; pointer-events: none; }
.hero-spot {
  position: absolute; z-index: -1; pointer-events: none;
  width: 560px; height: 560px; left: 0; top: 0; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 14%, transparent), transparent 65%);
  transform: translate3d(var(--sx, 60vw), var(--sy, 40vh), 0) translate(-50%, -50%);
  opacity: 0; transition: opacity .6s;
}
.hero.pointer-active .hero-spot { opacity: 1; }

.hero-container {
  width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px;
  display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: 48px; align-items: center;
}
.hero-content { position: relative; z-index: 2; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 16px 8px 12px; border-radius: 999px;
  background: var(--glass); border: 1px solid var(--border-strong);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  font-size: 13px; font-weight: 600; color: var(--text-muted);
  margin-bottom: 28px;
}
.badge-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(16,185,129,.6); animation: pulse 2s infinite; flex-shrink: 0; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(16,185,129,.55); } 70% { box-shadow: 0 0 0 10px rgba(16,185,129,0); } 100% { box-shadow: 0 0 0 0 rgba(16,185,129,0); } }
.hero-title {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(46px, 6.4vw, 92px); line-height: .96; letter-spacing: -.04em;
  margin-bottom: 22px;
}
.hero-hi { display: block; font-size: .5em; letter-spacing: -.02em; color: var(--text-muted); font-weight: 600; margin-bottom: .18em; }
.hero-title .gradient-text { display: inline-block; padding-bottom: .06em; }
.hero-role {
  display: block;
  font-family: var(--mono); font-size: clamp(14px, 1.35vw, 16px); font-weight: 500; color: var(--text);
  margin-bottom: 18px;
}
.hero-role::before { content: ''; display: inline-block; vertical-align: middle; width: 28px; height: 2px; margin: -3px 10px 0 0; border-radius: 2px; background: var(--grad); }
.hero-role span { color: var(--accent); }
.hero-subtitle { font-size: clamp(16px, 1.25vw, 18px); color: var(--text-muted); max-width: 540px; margin-bottom: 34px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 38px; }
.hero-stats {
  display: inline-flex; align-items: center; gap: 22px; flex-wrap: wrap;
  padding: 16px 24px; border-radius: var(--radius);
  background: var(--glass); border: 1px solid var(--border);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow-sm);
  margin-bottom: 26px;
}
.stat-item { display: flex; flex-direction: column; }
.stat-num { font-family: var(--display); font-weight: 700; font-size: 26px; line-height: 1.1; letter-spacing: -.02em; color: var(--text); }
.stat-item:not(:last-child) .stat-num { background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stat-label { font-size: 12px; color: var(--text-light); font-weight: 500; text-transform: uppercase; letter-spacing: .06em; }
.stat-div { width: 1px; height: 34px; background: var(--border-strong); }
.hero-socials { display: flex; gap: 10px; }
.social-link {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  border: 1px solid var(--border); background: var(--glass); color: var(--text-muted);
  transition: transform .3s var(--ease), color .25s, border-color .25s, background-color .25s;
}
.social-link:hover { transform: translateY(-3px); color: #fff; border-color: transparent; background: var(--accent); }

/* ── 3D photo stage ── */
.hero-visual { position: relative; display: flex; justify-content: center; align-items: center; min-height: 560px; }
.hero-stage {
  --rx: 0deg; --ry: 0deg;
  position: relative;
  width: min(400px, 32vw); aspect-ratio: 800 / 1066;   /* same shape as the cutout photo */
  perspective: 1400px;
  transform-style: preserve-3d;
}
.hero-stage > * { position: absolute; }
.hero-card, .orbit-badge, .stage-glow, .stage-orbits { transform-style: preserve-3d; }
.stage-glow {                  /* large soft logo-blue orb behind everything */
  left: 50%; top: 52%; width: 175%; aspect-ratio: 1; border-radius: 50%; z-index: -2;
  background:
    radial-gradient(closest-side, color-mix(in srgb, #00A6FF 34%, transparent), transparent 62%),
    radial-gradient(closest-side, color-mix(in srgb, #0038D6 30%, transparent) 30%, transparent 100%);
  filter: blur(14px);
  transform: translate(-50%, -50%) rotateX(var(--rx)) rotateY(var(--ry)) translateZ(-160px);
}
:root[data-theme="dark"] .stage-glow {
  background:
    radial-gradient(closest-side, color-mix(in srgb, #38BDF8 30%, transparent), transparent 60%),
    radial-gradient(closest-side, color-mix(in srgb, #2563EB 42%, transparent) 30%, transparent 100%);
}
/* three thin rings, each turning at its own speed, with a small dot riding each one */
.stage-orbits {
  inset: 0; z-index: -1;
  transform: rotateX(var(--rx)) rotateY(var(--ry)) translateZ(-90px);
}
.orbit {
  position: absolute; left: 50%; top: 44%; border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--accent) 26%, transparent);
  transform: translate(-50%, -50%);
  animation: orbitSpin var(--spd, 30s) linear infinite;
}
.orbit i {
  position: absolute; left: 50%; top: -5px; width: 9px; height: 9px; margin-left: -4.5px; border-radius: 50%;
  background: var(--accent-3); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent-3) 20%, transparent), 0 0 16px var(--accent-3);
}
.o1 { width: 118%; aspect-ratio: 1; --spd: 26s; }
.o2 { width: 148%; aspect-ratio: 1; --spd: 42s; animation-direction: reverse; border-style: dashed; border-color: color-mix(in srgb, var(--accent) 20%, transparent); }
.o3 { width: 178%; aspect-ratio: 1; --spd: 60s; border-color: color-mix(in srgb, var(--accent) 12%, transparent); }
.o2 i { background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 20%, transparent), 0 0 16px var(--accent); }
.o3 i { width: 6px; height: 6px; margin-left: -3px; top: -3.5px; }
@keyframes orbitSpin { to { transform: translate(-50%, -50%) rotate(360deg); } }

/* faint WordPress code floating at depth */
.code-chip {
  z-index: -1; white-space: nowrap;
  padding: 8px 12px; border-radius: 10px;
  font-family: var(--mono); font-size: 11.5px; color: var(--text-muted);
  background: color-mix(in srgb, var(--surface) 55%, transparent);
  border: 1px solid var(--border);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  opacity: .8;
  transform: rotateX(var(--rx)) rotateY(var(--ry)) translateZ(-60px);
}
.code-chip .k { color: var(--accent); }
.code-chip .s { color: #0EA5E9; }
.code-chip .f { color: var(--text); }
.cc-1 { left: -24%; top: 16%; }
.cc-2 { right: -22%; bottom: -13%; }

/* Card: blue panel in the lower 70%; the cutout photo fills the whole stage,
   so the head and shoulders rise above the panel's top edge */
.hero-card {
  --card-top: 30%;
  inset: 0; margin: 0;
  transform: rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform .5s var(--ease);
}
.hero-stage.tracking .hero-card, .hero-stage.tracking .orbit-badge, .hero-stage.tracking .stage-glow { transition: transform .12s linear; }
.card-bg {
  position: absolute; left: 0; right: 0; bottom: 0; top: var(--card-top);
  border-radius: 28px; overflow: hidden;
  background:
    radial-gradient(70% 45% at 50% 0%, rgba(255, 255, 255, .42), transparent 72%),
    radial-gradient(85% 60% at 0% 10%, #00B4FF, transparent 62%),
    radial-gradient(90% 70% at 100% 100%, #00155C, transparent 65%),
    linear-gradient(165deg, #0A7BFF 0%, #0A5CE8 40%, #0038D6 70%, #002A9E 100%);
  box-shadow:
    0 50px 90px -40px color-mix(in srgb, var(--accent-2) 75%, transparent),
    0 20px 40px -20px rgba(18, 28, 46, .35),
    inset 0 1px 0 rgba(255, 255, 255, .35);
}
.card-bg::before {            /* fine grain so the blue feels printed, not flat */
  content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .55 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  mix-blend-mode: overlay; opacity: .35;
}
.card-bg { border: 1px solid rgba(255, 255, 255, .28); }
.card-arcs {                  /* concentric light rings behind the head */
  position: absolute; inset: -40% -20% 0; pointer-events: none;
  background: repeating-radial-gradient(circle at 50% 18%, rgba(255, 255, 255, .13) 0 1px, transparent 1.5px 34px);
  -webkit-mask-image: radial-gradient(circle at 50% 18%, #000 20%, transparent 62%);
  mask-image: radial-gradient(circle at 50% 18%, #000 20%, transparent 62%);
}
.card-beam {                  /* slow diagonal light sweep */
  position: absolute; top: -20%; bottom: -20%; width: 45%; left: -60%; z-index: 1; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .16) 45%, rgba(255, 255, 255, .28) 50%, rgba(255, 255, 255, .16) 55%, transparent);
  transform: skewX(-18deg);
  animation: beam 7s var(--ease) infinite 2s;
}
@keyframes beam { 0% { left: -60%; } 45%, 100% { left: 130%; } }
.card-bg::after {             /* bottom shade so the name tag reads */
  content: ''; position: absolute; inset: 55% 0 0;
  background: linear-gradient(transparent, rgba(0, 20, 70, .55));
}
.card-mark {                  /* large logo watermark behind the photo, in white */
  position: absolute; right: -8%; bottom: 18%; width: 78%; height: auto;
  filter: brightness(0) invert(1); opacity: .1;
}
.card-person {
  position: absolute; inset: 0; z-index: 2; display: block;
  transform: translateZ(40px) scale(.972);   /* sits in front of the panel; scale undoes the perspective growth */
  transform-origin: 50% 100%;
}
.card-person img {
  display: block; width: 100%; height: 100%; object-fit: contain; object-position: 50% 100%;
  clip-path: inset(0 0 0 0 round 0 0 28px 28px);   /* round the bottom to match the panel */
  filter: drop-shadow(0 18px 26px rgba(0, 24, 90, .35));
}
.card-shine {
  position: absolute; left: 0; right: 0; bottom: 0; top: var(--card-top); z-index: 3; pointer-events: none;
  border-radius: 28px;
  background: radial-gradient(circle at var(--gx, 30%) var(--gy, 20%), rgba(255,255,255,.3), transparent 45%);
  mix-blend-mode: soft-light;
}
.card-tag {
  left: 16px; right: 16px; bottom: 16px; position: absolute; z-index: 4;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border-radius: 16px;
  background: rgba(255, 255, 255, .16); color: #fff;
  border: 1px solid rgba(255, 255, 255, .26);
  backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4);
  transform: translateZ(60px);
}
.card-tag span:last-child { display: flex; flex-direction: column; line-height: 1.25; }
.card-tag strong { font-family: var(--display); font-size: 16px; }
.card-tag em { font-style: normal; font-size: 12.5px; opacity: .85; }
.card-chip {
  position: absolute; z-index: 1; top: calc(var(--card-top) + 16px); left: 16px;
  padding: 8px 12px; border-radius: 12px;
  background: rgba(255, 255, 255, .95); color: var(--accent-2); font-size: 12px; font-weight: 600;
  box-shadow: 0 10px 20px -8px rgba(0, 24, 90, .5);
  transform: translateZ(20px);
}
.card-chip b { font-family: var(--display); font-size: 16px; margin-right: 2px; }

/* Floating tech badges at different depths (negative Z = behind the card) */
.orbit-badge {
  --z: 90px; --bob: 0s;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 14px; border-radius: 14px;
  background: var(--card-glass); color: var(--text);
  border: 1px solid var(--card-edge);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 16px 30px -14px color-mix(in srgb, var(--accent-2) 60%, transparent);
  font-size: 13px; font-weight: 600; white-space: nowrap;
  transform: rotateX(var(--rx)) rotateY(var(--ry)) translateZ(var(--z));
}
.orbit-badge i { font-size: 18px; color: var(--accent); }
.orbit-badge > * { animation: bob 5s ease-in-out var(--bob) infinite; }
@keyframes bob { 50% { transform: translateY(-7px); } }
.ob-back { opacity: .75; }
.ob-1 { --z: -90px;  --bob: -1s;  left: -16%; top: 6%;  padding: 12px; }
.ob-2 { --z: -110px; --bob: -3s;  right: -12%; top: -6%; padding: 12px; }
.ob-3 { --z: 110px;  --bob: -2s;  left: -26%; top: 56%; }
.ob-4 { --z: 140px;  --bob: -4s;  right: -24%; top: 26%; }
.ob-5 { --z: 80px;   --bob: -.5s; right: -10%; bottom: 20%; padding: 12px; }
.ob-5 i { font-size: 22px; }
.ob-6 { --z: 120px;  --bob: -2.5s; left: -22%; bottom: -5%; }

.hero-scroll-hint {
  position: absolute; left: 50%; bottom: 24px; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-light);
  z-index: 2;
}
.scroll-arrow { width: 22px; height: 34px; border: 1.5px solid var(--border-strong); border-radius: 12px; position: relative; }
.scroll-arrow::after { content: ''; position: absolute; left: 50%; top: 7px; width: 3px; height: 7px; margin-left: -1.5px; border-radius: 2px; background: var(--accent); animation: scrolldot 1.8s var(--ease) infinite; }
@keyframes scrolldot { 0% { transform: translateY(0); opacity: 1; } 80% { transform: translateY(12px); opacity: 0; } 100% { opacity: 0; } }

/* Touch screens: slow automatic sway instead of cursor tilt */
@property --rx { syntax: '<angle>'; inherits: true; initial-value: 0deg; }
@property --ry { syntax: '<angle>'; inherits: true; initial-value: 0deg; }
@media (hover: none) {
  .hero-stage { animation: sway 9s ease-in-out infinite; }
}
@keyframes sway {
  0%, 100% { --rx: 4deg; --ry: -10deg; }
  50%      { --rx: -3deg; --ry: 10deg; }
}

/* Entrance (held while the loader is showing) */
.js.loading .hero-content > *, .js.loading .hero-visual { animation-play-state: paused; }
.js .hero-content > * { opacity: 0; transform: translateY(24px); animation: heroIn .9s var(--ease) forwards; }
.js .hero-content > *:nth-child(2) { animation-delay: .08s; }
.js .hero-content > *:nth-child(3) { animation-delay: .16s; }
.js .hero-content > *:nth-child(4) { animation-delay: .24s; }
.js .hero-content > *:nth-child(5) { animation-delay: .32s; }
.js .hero-content > *:nth-child(6) { animation-delay: .40s; }
.js .hero-content > *:nth-child(7) { animation-delay: .48s; }
.js .hero-visual { opacity: 0; animation: stageIn 1.2s .2s var(--ease) forwards; }
@keyframes heroIn { to { opacity: 1; transform: none; } }
@keyframes stageIn { from { opacity: 0; transform: perspective(1400px) rotateY(-18deg) translateX(40px); } to { opacity: 1; transform: none; } }

/* ══════════════ SECTIONS ══════════════ */
.section { position: relative; padding: 110px 0; }
.section:nth-of-type(even) { background: var(--bg-2); }
.section-label {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 13px; font-weight: 500; color: var(--accent);
  margin-bottom: 14px;
}
.section-label::before { content: ''; width: 28px; height: 1.5px; background: currentColor; }
.section .container > .section-label { display: flex; justify-content: center; }
.about .container > .section-label { justify-content: flex-start; }
.section-title {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(32px, 4.2vw, 52px); line-height: 1.08; letter-spacing: -.03em;
  margin-bottom: 16px;
}
.section-title.centered, .section-sub.centered { text-align: center; }
.section-sub { color: var(--text-muted); font-size: 17px; max-width: 640px; margin: 0 auto 56px; }

/* 3D perspective reveal */
.js [data-scroll] {
  opacity: 0;
  transform: perspective(1000px) translate3d(0, 48px, -60px) rotateX(14deg);
  transition: opacity .9s var(--ease), transform .9s var(--ease), box-shadow .45s var(--ease), border-color .35s, background-color .4s;
}
.js [data-scroll].visible { opacity: 1; transform: none; }

/* 3D tilt surfaces */
.tilt { transform-style: preserve-3d; will-change: transform; }
.tilt-glare {
  position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 5;
  background: radial-gradient(circle at var(--gx, 50%) var(--gy, 50%), rgba(255,255,255,.28), transparent 55%);
  opacity: 0; transition: opacity .4s;
  mix-blend-mode: soft-light;
}
.tilt.tilting .tilt-glare { opacity: 1; }
.card-surface, .logo-card, .highlight-item, .info-card, .skill-category, .timeline-card,
.project-card, .cert-card, .service-card, .contact-card, .photo-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: box-shadow .45s var(--ease), border-color .35s, background-color .4s;
}
.tilt.tilting { box-shadow: var(--shadow-lg); border-color: var(--border-strong); }
.lift { transform: translateZ(40px); }

/* ── Tech logos ── */
.tech-logos-section { padding: 90px 0; }
.tech-logos-section .section-sub { margin-bottom: 44px; }
.logo-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.logo-card { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 28px 12px; text-align: center; }
.logo-card img, .logo-fa {
  width: 60px; height: 60px; padding: 12px; border-radius: 16px;
  background: var(--logo-chip); object-fit: contain;
  transform: translateZ(36px);
}
.logo-fa { display: grid; place-items: center; font-size: 30px; color: var(--accent); background: var(--accent-soft); }
.logo-card span { font-size: 14px; font-weight: 600; transform: translateZ(20px); }

/* ── About ── */
.about-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 56px; align-items: start; }
.about-lead { font-size: 19px; color: var(--text); margin: 8px 0 18px; }
.about-body { color: var(--text-muted); margin-bottom: 16px; }
.about-body strong { color: var(--text); }
.about-highlights { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 34px; }
.highlight-item { display: flex; gap: 14px; padding: 20px; }
.highlight-icon {
  flex-shrink: 0; width: 44px; height: 44px; border-radius: 12px;
  display: grid; place-items: center; font-size: 19px; color: #fff; background: var(--grad);
  transform: translateZ(30px);
}
.highlight-item strong { display: block; font-size: 15px; margin-bottom: 4px; }
.highlight-item p { font-size: 14px; color: var(--text-muted); line-height: 1.55; }
.about-sidebar { display: flex; flex-direction: column; gap: 18px; position: sticky; top: 100px; }
.photo-card { overflow: hidden; aspect-ratio: 1 / 1; padding: 0; background: var(--grad); }
.photo-card img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.04); }
.photo-fallback { display: none; position: absolute; inset: 0; place-items: center; font-size: 90px; color: rgba(255,255,255,.7); }
.photo-card.no-photo img { display: none; }
.photo-card.no-photo .photo-fallback { display: grid; }
.photo-tag {
  position: absolute; left: 14px; bottom: 14px; z-index: 3;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 999px; font-size: 13px; font-weight: 600;
  background: rgba(10, 12, 22, .6); color: #fff;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transform: translateZ(50px);
}
.info-card { padding: 24px; }
.info-card h3 { font-family: var(--display); font-size: 18px; display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.info-card h3 i { color: var(--accent); }
.info-list li { display: flex; align-items: center; gap: 12px; padding: 9px 0; font-size: 14px; color: var(--text-muted); border-bottom: 1px dashed var(--border); }
.info-list li:last-child { border-bottom: 0; }
.info-list i { width: 16px; text-align: center; color: var(--accent); }
.info-list .check-green { color: var(--green); }
.specialty-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.specialty-tags span, .tl-tags span, .project-tags span {
  font-size: 12px; font-weight: 500; padding: 5px 11px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent);
}

/* ── Skills ── */
.skills-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.skill-category { padding: 28px; }
.skill-cat-header { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.skill-cat-icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; color: #fff; font-size: 21px; transform: translateZ(34px); box-shadow: 0 10px 20px -8px rgba(0,0,0,.3); }
.skill-cat-header h3 { font-family: var(--display); font-size: 20px; }
.skill-items { display: flex; flex-direction: column; gap: 16px; }
.skill-info { display: flex; justify-content: space-between; font-size: 14px; font-weight: 500; margin-bottom: 7px; }
.skill-info span:last-child { font-family: var(--mono); color: var(--text-light); font-size: 13px; }
.skill-bar { height: 7px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.skill-fill { height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--c), color-mix(in srgb, var(--c) 55%, #fff)); transition: width 1.4s var(--ease); }
.skill-fill.animated { width: var(--w); }
.tech-badges-wrap { margin-top: 60px; text-align: center; }
.tech-badges-title { font-family: var(--display); font-size: 22px; margin-bottom: 22px; }
.tech-badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.tech-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px; border-radius: 12px; font-size: 14px; font-weight: 500;
  background: var(--surface); border: 1px solid var(--border);
  transition: transform .35s var(--ease), border-color .3s, color .3s;
}
.tech-badge i { color: var(--accent); }
.tech-badge:hover { transform: translateY(-4px) rotateX(12deg); border-color: var(--accent); }

/* ── Experience timeline ── */
.timeline { position: relative; max-width: 920px; margin: 0 auto; padding-left: 70px; }
.timeline::before { content: ''; position: absolute; left: 25px; top: 10px; bottom: 10px; width: 2px; background: linear-gradient(var(--accent), var(--accent-2), var(--accent-3)); opacity: .5; border-radius: 2px; }
.timeline-item { position: relative; margin-bottom: 26px; }
.js .timeline-item {
  opacity: 0; transform: perspective(1200px) translate3d(40px, 0, -80px) rotateY(-10deg);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
}
.js .timeline-item.visible { opacity: 1; transform: none; }
.timeline-dot {
  position: absolute; left: -70px; top: 22px;
  width: 52px; height: 52px; border-radius: 16px;
  display: grid; place-items: center;
  font-family: var(--mono); font-size: 14px; font-weight: 600; color: #fff;
  background: var(--grad); box-shadow: 0 10px 22px -8px var(--accent);
  border: 4px solid var(--bg);
}
.section:nth-of-type(even) .timeline-dot { border-color: var(--bg-2); }
.timeline-card { padding: 26px 28px; }
.timeline-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 14px; flex-wrap: wrap; }
.tl-role { font-family: var(--display); font-size: 20px; line-height: 1.25; }
.tl-company { font-size: 14px; color: var(--text-muted); margin-top: 4px; }
.tl-company i { color: var(--accent); margin-right: 4px; }
.tl-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.tl-period { font-family: var(--mono); font-size: 12.5px; color: var(--text-muted); padding: 5px 11px; border-radius: 999px; background: var(--surface-2); white-space: nowrap; }
.tl-current { font-size: 12px; font-weight: 600; color: var(--green); background: rgba(16,185,129,.12); border: 1px solid rgba(16,185,129,.3); padding: 3px 10px; border-radius: 999px; }
.tl-points { margin-bottom: 16px; }
.tl-points li { position: relative; padding-left: 20px; font-size: 14.5px; color: var(--text-muted); margin-bottom: 8px; }
.tl-points li::before { content: ''; position: absolute; left: 2px; top: 10px; width: 7px; height: 7px; border-radius: 2px; background: var(--accent); transform: rotate(45deg); }
.tl-points strong { color: var(--text); }
.tl-tags { display: flex; flex-wrap: wrap; gap: 7px; }

/* ── Projects ── */
.projects-filter { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin: -24px 0 40px; }
.filter-btn {
  padding: 10px 20px; border-radius: 999px; font-size: 14px; font-weight: 600;
  border: 1px solid var(--border-strong); color: var(--text-muted); background: var(--surface);
  transition: all .3s var(--ease);
}
.filter-btn:hover { color: var(--text); border-color: var(--accent); }
.filter-btn.active { background: var(--grad); color: #fff; border-color: transparent; }
.projects-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.project-card { display: flex; flex-direction: column; }
.project-card.hidden { display: none; }
.project-card:not(.hidden) { animation: cardIn .6s var(--ease) both; }
@keyframes cardIn { from { opacity: 0; transform: perspective(900px) rotateX(18deg) translateY(30px); } }
.project-thumb { position: relative; height: 180px; border-radius: var(--radius) var(--radius) 0 0; overflow: hidden; display: grid; place-items: center; transform-style: preserve-3d; }
.project-thumb::before {
  content: ''; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.12) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.12) 1px, transparent 1px);
  background-size: 26px 26px;
  transform: perspective(300px) rotateX(55deg) translateY(30%) scale(2);
  transform-origin: bottom;
}
.project-thumb-inner { position: relative; text-align: center; color: #fff; transform: translateZ(40px); }
.pt-icon { font-size: 44px; margin-bottom: 8px; filter: drop-shadow(0 10px 16px rgba(0,0,0,.25)); }
.pt-label { font-family: var(--mono); font-size: 12px; opacity: .9; }
.project-thumb-overlay { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(10,12,22,.45); opacity: 0; transition: opacity .35s; }
.project-card:hover .project-thumb-overlay, .project-card:focus-within .project-thumb-overlay { opacity: 1; }
.project-body { padding: 22px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.project-meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.project-type { font-family: var(--mono); font-size: 12px; color: var(--accent); }
.proj-ext { color: var(--text-light); transition: color .25s; }
.proj-ext:hover { color: var(--accent); }
.project-body h3 { font-family: var(--display); font-size: 21px; line-height: 1.25; margin-bottom: 10px; }
.project-body > p { font-size: 14.5px; color: var(--text-muted); margin-bottom: 14px; }
.project-features { margin-bottom: 16px; }
.project-features li { font-size: 13.5px; color: var(--text-muted); display: flex; gap: 8px; align-items: baseline; margin-bottom: 5px; }
.project-features i { color: var(--green); font-size: 12px; }
.project-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.project-actions { display: flex; gap: 8px; margin-top: auto; }
.project-visit-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 14px; border-radius: 10px; font-size: 13px; font-weight: 600;
  background: var(--surface-2); border: 1px solid var(--border);
  transition: all .3s var(--ease);
}
.project-visit-btn:hover { background: var(--accent); color: #fff; border-color: var(--accent); transform: translateY(-2px); }

/* ── Certifications ── */
.cert-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.cert-card { padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.cert-badge { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; font-size: 24px; color: #fff; background: linear-gradient(135deg, #1F1E2E, #3B3A55); box-shadow: 0 12px 22px -10px rgba(0,0,0,.4); transform: translateZ(40px); }
.cert-card:first-child .cert-badge { background: var(--grad); }
.cert-info h3 { font-family: var(--display); font-size: 17px; line-height: 1.3; margin-bottom: 6px; }
.cert-issuer { font-size: 13.5px; color: var(--text-muted); margin-bottom: 8px; }
.cert-issuer i { color: var(--accent); margin-right: 4px; }
.cert-date { display: inline-block; font-family: var(--mono); font-size: 12px; color: var(--accent); background: var(--accent-soft); padding: 3px 9px; border-radius: 999px; margin-bottom: 8px; }
.cert-cta { text-align: center; margin-top: 44px; }

/* ── Services ── */
.services-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.service-card { padding: 28px 24px; }
.service-icon { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; color: #fff; font-size: 22px; margin-bottom: 20px; transform: translateZ(44px); box-shadow: 0 14px 24px -10px rgba(0,0,0,.35); }
.service-card h3 { font-family: var(--display); font-size: 19px; margin-bottom: 10px; transform: translateZ(20px); }
.service-card > p { font-size: 14px; color: var(--text-muted); margin-bottom: 16px; }
.service-list li { position: relative; padding-left: 20px; font-size: 13.5px; color: var(--text-muted); margin-bottom: 6px; }
.service-list li::before { content: '→'; position: absolute; left: 0; color: var(--accent); }

/* ── Contact ── */
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.contact-card { display: flex; align-items: center; gap: 16px; padding: 22px; min-width: 0; }
.cc-icon { flex-shrink: 0; width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center; color: #fff; font-size: 21px; transform: translateZ(36px); }
.cc-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cc-label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--text-light); }
.cc-value { font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.cc-value:hover { color: var(--accent); }
.cc-hint { font-size: 12.5px; color: var(--text-muted); }
.cc-btn { flex-shrink: 0; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-size: 14px; background: var(--accent-soft); color: var(--accent); transition: transform .3s var(--ease); }
.contact-card:hover .cc-btn { transform: translateX(3px); }
.cc-btn-green { background: rgba(37,211,102,.12); color: #16A34A; }
.cc-btn-blue { background: rgba(10,102,194,.12); color: #0A66C2; }
.cc-btn-dark { background: var(--surface-2); color: var(--text); }
.cc-btn-sky { background: rgba(14,165,233,.12); color: #0EA5E9; }
.cc-btn-amber { background: rgba(245,158,11,.14); color: #D97706; }
.availability-banner {
  margin-top: 36px; padding: 26px 30px; border-radius: var(--radius);
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  position: relative; overflow: hidden;
}
.availability-banner::before { content: ''; position: absolute; inset: 0; background: var(--grad); opacity: .07; pointer-events: none; }
.avail-left { position: relative; display: flex; align-items: center; gap: 16px; }
.avail-pulse { width: 14px; height: 14px; border-radius: 50%; background: var(--green); animation: pulse 2s infinite; flex-shrink: 0; }
.avail-left strong { display: block; font-family: var(--display); font-size: 18px; }
.avail-left span { font-size: 14px; color: var(--text-muted); }

/* ── Footer ── */
.footer { padding: 80px 0 30px; border-top: 1px solid var(--border); background: var(--bg); }
.footer-content { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; margin-bottom: 50px; }
.footer-logo { display: inline-block; margin-bottom: 14px; }
.footer-tagline { color: var(--text-muted); font-size: 14px; margin-bottom: 20px; }
.footer-socials { display: flex; gap: 10px; }
.footer-socials a { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; border: 1px solid var(--border); color: var(--text-muted); transition: all .3s var(--ease); }
.footer-socials a:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-3px); }
.footer-col h4 { font-family: var(--display); font-size: 16px; margin-bottom: 16px; }
.footer-links li { margin-bottom: 10px; font-size: 14px; color: var(--text-muted); }
.footer-links a, .footer-links span { display: inline-flex; align-items: center; gap: 8px; transition: color .25s; word-break: break-word; }
.footer-links a:hover { color: var(--accent); }
.footer-links i { color: var(--accent); width: 16px; }
.footer-resume-btn { margin-top: 6px; padding: 9px 16px; border-radius: 999px; background: var(--accent-soft); color: var(--accent) !important; font-weight: 600; }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 26px; border-top: 1px solid var(--border); font-size: 13px; color: var(--text-light); }
.back-to-top { width: 42px; height: 42px; flex-shrink: 0; border-radius: 50%; display: grid; place-items: center; background: var(--grad); color: #fff; transition: transform .3s var(--ease); }
.back-to-top:hover { transform: translateY(-4px); }

/* ── Custom cursor (fine pointers only, added by JS) ── */
.cursor-ring {
  position: fixed; left: 0; top: 0; z-index: 200; pointer-events: none;
  width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%;
  border: 1.5px solid var(--accent);
  transition: width .3s var(--ease), height .3s var(--ease), margin .3s var(--ease), background-color .3s, opacity .3s;
  opacity: 0;
}
.cursor-ring.on { opacity: .7; }
.cursor-ring.hover { width: 56px; height: 56px; margin: -28px 0 0 -28px; background: var(--accent-soft); }

/* ══════════════ BRAND LOGO ══════════════ */
.brand-logo { display: block; height: 36px; width: auto; overflow: visible; }
.brand-d { fill: var(--logo-d); transition: fill .4s var(--ease); }
.nav-logo { display: inline-flex; align-items: center; transition: transform .35s var(--ease); }
.nav-logo:hover { transform: translateY(-1px) scale(1.04); }
.footer-logo .brand-logo { height: 44px; }

/* ── Loading screen ── */
.page-loader { display: none; }
.js .page-loader {
  position: fixed; inset: 0; z-index: 300;
  display: grid; place-items: center; align-content: center; gap: 26px;
  background: var(--bg);
  transition: opacity .6s var(--ease), visibility .6s;
  animation: loaderFailsafe .5s 4s forwards;   /* never block the page, even if JS breaks */
}
.page-loader.done { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-logo { height: 84px; }
.loader-logo .brand-d { animation: loaderD .9s var(--ease) both; }
.loader-logo .brand-p { animation: loaderP .9s .15s var(--ease) both; }
.loader-bar { width: 140px; height: 3px; border-radius: 3px; background: var(--border-strong); overflow: hidden; }
.loader-bar span { display: block; height: 100%; width: 40%; border-radius: inherit; background: var(--grad); animation: loaderBar 1.1s var(--ease) infinite; }
@keyframes loaderD { from { opacity: 0; transform: translateX(-40px); } }
@keyframes loaderP { from { opacity: 0; transform: translate(60px, 30px); } }
@keyframes loaderBar { from { transform: translateX(-110%); } to { transform: translateX(260%); } }
@keyframes loaderFailsafe { to { opacity: 0; visibility: hidden; } }


/* ══════════════ PREMIUM GLASS BOXES ══════════════ */
/* Each box gets its own --c1/--c2 (set in main.js from its icon colours) */
.logo-card, .highlight-item, .info-card, .skill-category, .timeline-card,
.project-card, .cert-card, .service-card, .contact-card {
  --c1: var(--accent);
  --c2: var(--accent-3);
  background:
    radial-gradient(120% 90% at 100% 0%, color-mix(in srgb, var(--c1) 16%, transparent), transparent 55%),
    radial-gradient(100% 80% at 0% 100%, color-mix(in srgb, var(--c2) 11%, transparent), transparent 60%),
    var(--card-glass);
  border: 1px solid var(--card-edge);
  /* no backdrop-filter: the section behind is already soft colour, and blur on
     dozens of tilting cards costs too much on low-end phones */
  box-shadow:
    0 18px 34px -22px color-mix(in srgb, var(--c1) 55%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, .35);
}
/* thin glowing gradient edge */
.logo-card::before, .highlight-item::before, .info-card::before, .skill-category::before, .timeline-card::before,
.project-card::before, .cert-card::before, .service-card::before, .contact-card::before {
  content: '';
  position: absolute; inset: -1px; z-index: 4;
  border-radius: inherit; padding: 1px;
  background: linear-gradient(135deg, var(--c1), color-mix(in srgb, var(--c1) 20%, transparent) 35%, transparent 55%, color-mix(in srgb, var(--c2) 30%, transparent) 75%, var(--c2));
  -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 exclude, linear-gradient(#000 0 0);
  opacity: .75;
  pointer-events: none;
  transition: opacity .4s var(--ease);
}
.logo-card:hover::before, .highlight-item:hover::before, .info-card:hover::before, .skill-category:hover::before, .timeline-card:hover::before,
.project-card:hover::before, .cert-card:hover::before, .service-card:hover::before, .contact-card:hover::before { opacity: 1; }
.logo-card:hover, .highlight-item:hover, .info-card:hover, .skill-category:hover, .timeline-card:hover,
.project-card:hover, .cert-card:hover, .service-card:hover, .contact-card:hover,
.tilt.tilting {
  box-shadow:
    0 34px 70px -30px color-mix(in srgb, var(--c1, var(--accent)) 75%, transparent),
    0 0 0 1px color-mix(in srgb, var(--c1, var(--accent)) 12%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, .4);
}
:root[data-theme="dark"] :is(.logo-card, .highlight-item, .info-card, .skill-category, .timeline-card, .project-card, .cert-card, .service-card, .contact-card) {
  box-shadow:
    0 18px 36px -22px color-mix(in srgb, var(--c1) 65%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, .06);
}
/* accents inside the box follow its colours */
.highlight-icon { background: linear-gradient(135deg, var(--c1), var(--c2)); box-shadow: 0 10px 20px -8px var(--c1); }
.cert-badge { background: linear-gradient(135deg, var(--c1), var(--c2)); box-shadow: 0 12px 22px -10px var(--c1); }
.cert-date { color: var(--c1); background: color-mix(in srgb, var(--c1) 12%, transparent); }
.info-card h3 i, .info-list i:not(.check-green) { color: var(--c1); }
.logo-fa { color: var(--c1); background: color-mix(in srgb, var(--c1) 14%, transparent); }
.service-list li::before { color: var(--c1); }
.project-type { color: var(--c1); }
.project-card .project-tags span, .timeline-card .tl-tags span, .specialty-tags span {
  color: var(--c1); background: color-mix(in srgb, var(--c1) 11%, transparent);
}
.tl-points li::before { background: var(--c1); }
.skill-bar { background: color-mix(in srgb, var(--c1) 10%, var(--surface-2)); }

/* ── Section depth: colour clouds + dot grid, different per section ── */
.section { isolation: isolate; overflow: clip; --b1: var(--accent); --b2: var(--accent-3); }
.section::before, .section::after {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  transform: translateZ(0); /* own layer: painted once, not on every card animation frame */
}
.section::before {
  background:
    radial-gradient(38% 45% at 8% 18%, color-mix(in srgb, var(--b1) var(--blob-alpha), transparent), transparent 70%),
    radial-gradient(34% 42% at 94% 62%, color-mix(in srgb, var(--b2) var(--blob-alpha), transparent), transparent 70%),
    radial-gradient(28% 30% at 55% 105%, color-mix(in srgb, var(--b1) calc(var(--blob-alpha) * .6), transparent), transparent 70%);
}
.section::after {
  background-image: radial-gradient(var(--dot) 1.2px, transparent 1.3px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 20%, transparent 75%);
}
/* all sections use the logo blues, in different pairings */
#tech           { --b1: #0A6CF5; --b2: #00A6FF; }
#about          { --b1: #0038D6; --b2: #38BDF8; }
#skills         { --b1: #00A6FF; --b2: #0038D6; }
#experience     { --b1: #0A6CF5; --b2: #1E3A8A; }
#projects       { --b1: #38BDF8; --b2: #0A6CF5; }
#certifications { --b1: #0038D6; --b2: #00A6FF; }
#services       { --b1: #1D4ED8; --b2: #38BDF8; }
#contact        { --b1: #0A6CF5; --b2: #0038D6; }

/* Brand-blue icons everywhere (overrides the old per-icon inline colours) */
.service-icon, .skill-cat-icon, .cc-icon, .project-thumb, .timeline-dot {
  background: linear-gradient(135deg, var(--c2, var(--accent-2)), var(--c1, var(--accent))) !important;
}
.cc-btn { background: color-mix(in srgb, var(--c1, var(--accent)) 12%, transparent) !important; color: var(--c1, var(--accent)) !important; }
.skill-fill { background: linear-gradient(90deg, var(--c2, var(--accent-2)), var(--c1, var(--accent))) !important; }
.tl-current[style] { color: var(--accent) !important; background: var(--accent-soft) !important; border-color: color-mix(in srgb, var(--accent) 30%, transparent) !important; }

/* ══════════════ RESPONSIVE ══════════════ */
@media (max-width: 1320px) {
  .ob-4 { right: -12%; }
}
@media (max-width: 1199px) {
  .code-chip { display: none; }
}
@media (max-width: 1100px) {
  .services-grid, .cert-grid { grid-template-columns: repeat(2, 1fr); }
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .logo-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-content { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 960px) {
  .nav-links {
    position: fixed; top: 70px; left: 16px; right: 16px;
    flex-direction: column; gap: 2px; padding: 12px;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    opacity: 0; visibility: hidden; transform: perspective(800px) rotateX(-18deg) translateY(-10px); transform-origin: top;
    transition: all .35s var(--ease);
  }
  .nav-links.open { opacity: 1; visibility: visible; transform: none; }
  .nav-link { padding: 12px 16px; font-size: 15px; }
  .nav-hamburger { display: block; }
  .hero { padding-top: 96px; align-items: flex-start; }
  .hero-container { grid-template-columns: 1fr; gap: 28px; }
  /* photo first on phones and tablets */
  .hero-visual { order: -1; min-height: 0; padding: 26px 0 44px; }
  .hero-stage { width: min(360px, 62vw); }
  .ob-back, .code-chip { display: none; }
  .ob-3 { left: -30%; } .ob-4 { right: -30%; } .ob-6 { left: -22%; bottom: -13%; }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .about-sidebar { position: static; }
  .photo-card { max-width: 420px; }
  .contact-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .container, .nav-container, .hero-container { padding: 0 16px; }
  .section { padding: 80px 0; }
  .nav-cta { display: none; }
  .hero-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 20px; padding: 16px 18px; width: 100%; }
  .stat-div { display: none; }
  .stat-num { font-size: 22px; }
  .hero-actions .btn { flex: 1 1 auto; }
  .hero-scroll-hint { display: none; }
  .hero-stage { width: min(300px, 72vw); }
  .orbit-badge span { display: none; }
  .o3 { display: none; }
  .orbit-badge { padding: 10px; }
  .ob-3 { left: -6%; } .ob-4 { right: 1%; top: 22%; } .ob-6 { left: -4%; bottom: -11%; } .ob-5 { right: 0; bottom: 34%; }
  .orbit-badge { --z: 50px !important; }
  .about-highlights, .skills-grid, .projects-grid, .services-grid, .cert-grid, .contact-grid { grid-template-columns: 1fr; }
  .logo-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .skill-category, .timeline-card { padding: 22px 18px; }
  .timeline { padding-left: 0; }
  .timeline::before { display: none; }
  .timeline-dot { position: static; margin-bottom: -26px; margin-left: 18px; position: relative; z-index: 2; width: 46px; height: 46px; font-size: 13px; }
  .timeline-card { padding-top: 36px; }
  .tl-right { align-items: flex-start; }
  .footer-content { grid-template-columns: 1fr; gap: 30px; }
  .footer-bottom { flex-direction: row; }
  .whatsapp-float { width: 52px; height: 52px; font-size: 25px; right: 16px; bottom: 16px; }
  .whatsapp-tooltip { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .page-loader { display: none; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .js [data-scroll], .js .timeline-item { opacity: 1; transform: none; }
}
