/* ==========================================================================
   Shubham Giri: portfolio
   Dark, futuristic, restrained. One accent pair (sky + violet), lots of air.
   ========================================================================== */

:root {
  --bg: #05060a;
  --bg-2: #090b12;
  --surface: #0d1019;
  --surface-2: #121624;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #eef1f7;
  --muted: #8a92a8;
  --dim: #5b6276;
  --a1: #38bdf8;
  --a2: #a78bfa;
  --a3: #2dd4bf;
  --glow: rgba(56, 189, 248, 0.35);
  --grad: linear-gradient(100deg, var(--a1), var(--a2));
  --radius: 22px;
  --header-h: 76px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Space Grotesk", var(--font);
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --header-bg: rgba(5, 6, 10, .72);
  --menu-bg: rgba(5, 6, 10, .97);
  --glass: rgba(5, 6, 10, .5);
  --glass-2: rgba(9, 11, 18, .85);
  --tint: rgba(255, 255, 255, .05);
  --tint-strong: rgba(255, 255, 255, .35);
  --on-accent: #050812;
  --grain: .045;
  --aurora-blend: screen;
  --aurora-opacity: .55;
  --stroke: rgba(238, 241, 247, .55);
  color-scheme: dark;
}

/* Light theme ------------------------------------------------------------ */
[data-theme="light"] {
  --bg: #f6f7fb;
  --bg-2: #eef1f7;
  --surface: #ffffff;
  --surface-2: #f3f5fa;
  --line: rgba(15, 23, 42, 0.09);
  --line-strong: rgba(15, 23, 42, 0.18);
  --text: #0b1020;
  --muted: #4a5368;
  --dim: #7b8398;
  --a1: #0284c7;
  --a2: #7c3aed;
  --a3: #0d9488;
  --glow: rgba(2, 132, 199, 0.22);
  --header-bg: rgba(246, 247, 251, .8);
  --menu-bg: rgba(246, 247, 251, .98);
  --glass: rgba(255, 255, 255, .7);
  --glass-2: rgba(255, 255, 255, .92);
  --tint: rgba(15, 23, 42, .05);
  --tint-strong: rgba(15, 23, 42, .3);
  --on-accent: #ffffff;
  --grain: .025;
  --aurora-blend: multiply;
  --aurora-opacity: .32;
  --stroke: rgba(11, 16, 32, .5);
  color-scheme: light;
}

/* Base --------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: var(--header-h); -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font); font-size: 16px; line-height: 1.65;
  -webkit-font-smoothing: antialiased; overflow-x: hidden; overflow-x: clip;
}
body.menu-open { overflow: hidden; }
body::after { /* film grain */
  content: ""; position: fixed; inset: 0; z-index: 90; pointer-events: none; opacity: var(--grain);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
::selection { background: var(--a1); color: #001018; }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p, figure, dl, dd { margin: 0; }
h1, h2, h3 { font-family: var(--display); letter-spacing: -0.03em; line-height: 1.05; font-weight: 600; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
strong { color: var(--text); font-weight: 600; }
em { font-style: normal; }
:focus-visible { outline: 2px solid var(--a1); outline-offset: 4px; border-radius: 8px; }

.icon { width: 20px; height: 20px; flex-shrink: 0; }
.mono { font-family: var(--mono); font-size: 12.5px; letter-spacing: .02em; text-transform: uppercase; }
.wrap { width: min(1240px, 100% - 48px); margin-inline: auto; }

.skip-link { position: fixed; left: 16px; top: -60px; z-index: 200; background: var(--a1); color: #001018; padding: 10px 16px; border-radius: 10px; font-weight: 600; }
.skip-link:focus { top: 16px; }

/* Preloader ------------------------------------------------------------ */
.preloader {
  position: fixed; inset: 0; z-index: 150; background: var(--bg);
  display: none; flex-direction: column; align-items: center; justify-content: center; gap: 28px;
}
.js.motion .preloader { display: flex; }
.preloader-inner { display: flex; align-items: center; gap: 20px; font-family: var(--display); }
.preloader-mark { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; border: 1px solid var(--line-strong); font-size: 15px; font-weight: 700; letter-spacing: .06em; color: var(--muted); }
.preloader-count { font-variant-numeric: tabular-nums; min-width: 3.2ch; font-size: clamp(48px, 8vw, 96px); font-weight: 600; letter-spacing: -0.04em; line-height: 1; }
.preloader-bar { width: min(280px, 60vw); height: 1px; background: var(--line); overflow: hidden; }
.preloader-bar span { display: block; height: 100%; width: 100%; background: var(--grad); transform-origin: left; transform: scaleX(0); }

/* Cursor ---------------------------------------------------------------- */
.cursor-dot, .cursor-ring { position: fixed; top: 0; left: 0; z-index: 140; pointer-events: none; border-radius: 50%; display: none; }
.has-cursor .cursor-dot, .has-cursor .cursor-ring { display: block; opacity: 0; }
.has-cursor.cursor-on .cursor-dot, .has-cursor.cursor-on .cursor-ring { opacity: 1; }
.cursor-dot { width: 6px; height: 6px; margin: -3px 0 0 -3px; background: var(--text); }
.cursor-ring {
  width: 38px; height: 38px; margin: -19px 0 0 -19px; border: 1px solid var(--line-strong);
  transition: width .35s var(--ease), height .35s var(--ease), margin .35s var(--ease), background .35s, border-color .35s;
}
.cursor-ring.is-hover { width: 64px; height: 64px; margin: -32px 0 0 -32px; background: rgba(56, 189, 248, .08); border-color: rgba(56, 189, 248, .5); }
.has-cursor, .has-cursor a, .has-cursor button { cursor: none; }
@media (hover: none), (pointer: coarse) {
  .cursor-dot, .cursor-ring { display: none !important; }
}

/* Header ------------------------------------------------------------- */
.site-header { position: fixed; inset: 0 0 auto; z-index: 100; height: var(--header-h); transition: transform .5s var(--ease), background .4s, border-color .4s; border-bottom: 1px solid transparent; }
.site-header.scrolled { background: var(--header-bg); backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%); border-bottom-color: var(--line); }
.site-header.hidden { transform: translateY(-100%); }
.nav { height: 100%; width: min(1320px, 100% - 48px); margin: 0 auto; display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; margin-right: auto; }
.brand-mark {
  width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px;
  font-family: var(--display); font-weight: 700; font-size: 14px; letter-spacing: .04em;
  border: 1px solid var(--line-strong); background: linear-gradient(140deg, rgba(56,189,248,.18), rgba(167,139,250,.18));
}
.brand-text { display: flex; flex-direction: column; font-family: var(--display); font-weight: 600; line-height: 1.15; }
.brand-text small { font-family: var(--mono); font-size: 10.5px; color: var(--muted); font-weight: 400; letter-spacing: .06em; text-transform: uppercase; }
.nav-links { display: flex; gap: 4px; }
.nav-links a { display: flex; align-items: baseline; gap: 6px; padding: 8px 14px; border-radius: 999px; font-size: 14.5px; color: var(--muted); transition: color .3s, background .3s; }
.nav-links a span { font-family: var(--mono); font-size: 10.5px; color: var(--dim); }
.nav-links a:hover, .nav-links a.active { color: var(--text); background: var(--tint); }
.nav-links a.active span { color: var(--a1); }
.nav-cta {
  padding: 10px 18px; border-radius: 999px; font-size: 14px; font-weight: 600; background: var(--text); color: var(--bg);
  transition: background .3s, color .3s;
}
.nav-cta:hover { background: var(--a1); }
.nav-menu-cta { display: none; }
.nav-toggle { display: none; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); position: relative; }
.nav-toggle span { position: absolute; left: 12px; right: 12px; height: 1.5px; background: var(--text); transition: transform .35s var(--ease), top .35s var(--ease); }
.nav-toggle span:first-child { top: 17px; }
.nav-toggle span:last-child { top: 25px; }
.nav-toggle[aria-expanded="true"] span:first-child { top: 21px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { top: 21px; transform: rotate(-45deg); }

/* Buttons ------------------------------------------------------------ */
.btn {
  position: relative; display: inline-flex; align-items: center; gap: 10px; padding: 16px 26px;
  border-radius: 999px; font-weight: 600; font-size: 15px; overflow: hidden; isolation: isolate;
  transition: color .4s var(--ease), border-color .4s;
}
.btn .icon { width: 18px; height: 18px; transition: transform .4s var(--ease); }
.btn:hover .icon { transform: translateX(4px); }
.btn-primary { background: var(--text); color: var(--bg); }
.btn-primary::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--grad);
  transform: translateY(101%); transition: transform .5s var(--ease);
}
.btn-primary:hover::before { transform: none; }
.btn-primary:hover { color: var(--on-accent); }
.btn-ghost { border: 1px solid var(--line-strong); }
.btn-ghost::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--tint);
  transform: scale(0); border-radius: inherit; transition: transform .5s var(--ease);
}
.btn-ghost:hover::before { transform: scale(1); }
.btn-ghost:hover { border-color: var(--tint-strong); }

/* Hero ---------------------------------------------------------------- */
.hero { position: relative; min-height: 100svh; display: flex; align-items: stretch; overflow: hidden; overflow: clip; isolation: isolate; }
.hero-particles { position: absolute; inset: 0; z-index: -1; }
.hero-particles canvas { position: absolute !important; }
.aurora { position: absolute; inset: 0; z-index: -3; filter: blur(80px); opacity: var(--aurora-opacity); pointer-events: none; }
.aurora span { position: absolute; border-radius: 50%; mix-blend-mode: var(--aurora-blend); }
.aurora span:nth-child(1) { width: 46vw; height: 46vw; left: -8vw; top: -12vw; background: radial-gradient(circle, rgba(56,189,248,.55), transparent 65%); animation: drift1 22s ease-in-out infinite alternate; }
.aurora span:nth-child(2) { width: 40vw; height: 40vw; right: -10vw; top: 10vh; background: radial-gradient(circle, rgba(167,139,250,.5), transparent 65%); animation: drift2 26s ease-in-out infinite alternate; }
.aurora span:nth-child(3) { width: 34vw; height: 34vw; left: 30vw; bottom: -18vw; background: radial-gradient(circle, rgba(45,212,191,.35), transparent 65%); animation: drift3 30s ease-in-out infinite alternate; }
@keyframes drift1 { to { transform: translate(14vw, 10vh) scale(1.15); } }
@keyframes drift2 { to { transform: translate(-12vw, 12vh) scale(.9); } }
@keyframes drift3 { to { transform: translate(-10vw, -14vh) scale(1.2); } }
.hero-spot {
  position: absolute; inset: 0; z-index: -2; pointer-events: none;
  background: radial-gradient(520px circle at var(--mx, 70%) var(--my, 40%), rgba(56,189,248,.13), transparent 60%);
}
.hero-grid-bg {
  position: absolute; inset: 0; z-index: -4; pointer-events: none; opacity: .35;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, #000 20%, transparent 75%);
}
.hero-inner {
  width: min(1240px, 100% - 48px); margin: 0 auto; padding: calc(var(--header-h) + 6vh) 0 28px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 40px; pointer-events: none;
}
.hero-grid { flex: 1; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 48px; align-items: center; }
.hero-copy { display: flex; flex-direction: column; align-items: flex-start; }
.hero-inner a, .hero-inner button { pointer-events: auto; }
.hero-tag { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); align-self: flex-start; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--glass); backdrop-filter: blur(8px); }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--a3); box-shadow: 0 0 0 0 rgba(45,212,191,.6); animation: live 2.2s infinite; }
@keyframes live { 70% { box-shadow: 0 0 0 9px rgba(45,212,191,0); } 100% { box-shadow: 0 0 0 0 rgba(45,212,191,0); } }

.hero-name { font-size: clamp(2.6rem, 5.4vw, 4.75rem); line-height: 1.02; letter-spacing: -0.045em; font-weight: 700; margin: 26px 0 22px; }
.hero-name .line { display: block; overflow: hidden; padding-bottom: .08em; }
.hero-name .split { display: inline-block; }
.hero-name .char { display: inline-block; will-change: transform; }
.hero-name .accent { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-name .name-dot { display: inline-block; color: var(--a1); }

.hero-role { width: 100%; font-family: var(--display); font-size: clamp(1.25rem, 2vw, 1.7rem); line-height: 1.2; letter-spacing: -0.02em; color: var(--muted); }
.role-rotator { position: relative; display: block; height: 1.25em; overflow: hidden; color: var(--text); }
.role { position: absolute; left: 0; top: 0; white-space: nowrap; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; opacity: 0; }
.role.is-active { opacity: 1; }
.no-motion .role:not(.is-active) { display: none; }
.hero-intro { color: var(--muted); max-width: 520px; margin-top: 18px; font-size: 1.04rem; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-meta { display: flex; justify-content: space-between; align-items: center; gap: 16px; color: var(--dim); border-top: 1px solid var(--line); padding-top: 18px; }
.scroll-cue { display: inline-flex; align-items: center; gap: 12px; color: var(--muted); }
.scroll-line { position: relative; width: 48px; height: 1px; background: var(--line-strong); overflow: hidden; }
.scroll-line::after { content: ""; position: absolute; inset: 0; background: var(--a1); animation: scan 2.2s var(--ease) infinite; }
@keyframes scan { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

/* 3D tech core */
.core { position: relative; justify-self: center; width: min(440px, 100%); aspect-ratio: 1; perspective: 900px; pointer-events: none; }
.core-ring { position: absolute; border-radius: 50%; border: 1px dashed var(--line); }
.core-ring--outer { inset: 2%; animation: orbit 60s linear infinite; }
.core-ring--inner { inset: 12%; border-style: solid; border-color: rgba(56,189,248,.08); animation: orbit 40s linear infinite reverse; }
.core-scene { position: absolute; inset: 20%; transform-style: preserve-3d; }
.core-sphere { position: absolute; inset: 0; transform-style: preserve-3d; animation: spin 26s linear infinite; }
.core-sphere i { position: absolute; inset: 0; border-radius: 50%; border: 1px solid rgba(56,189,248,.42); }
.core-sphere i:nth-child(1) { transform: rotateY(0deg); }
.core-sphere i:nth-child(2) { transform: rotateY(30deg); border-color: rgba(120,160,255,.4); }
.core-sphere i:nth-child(3) { transform: rotateY(60deg); border-color: rgba(167,139,250,.4); }
.core-sphere i:nth-child(4) { transform: rotateY(90deg); border-color: rgba(167,139,250,.42); }
.core-sphere i:nth-child(5) { transform: rotateY(120deg); border-color: rgba(120,160,255,.4); }
.core-sphere i:nth-child(6) { transform: rotateX(90deg); border-color: rgba(45,212,191,.48); }
@keyframes spin { from { transform: rotateX(-18deg) rotateY(0); } to { transform: rotateX(-18deg) rotateY(360deg); } }
@keyframes orbit { to { transform: rotate(360deg); } }
.core-glow { position: absolute; inset: 28%; border-radius: 50%; background: radial-gradient(circle, rgba(56,189,248,.5), rgba(167,139,250,.22) 45%, transparent 70%); filter: blur(18px); animation: breathe 5s ease-in-out infinite; }
.core-avatar {
  position: absolute; inset: 21%; border-radius: 50%; padding: 3px; background: var(--grad);
  box-shadow: 0 0 0 8px color-mix(in srgb, var(--bg) 70%, transparent), 0 30px 80px -20px var(--glow);
}
.core-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; object-position: center 35%; border: 3px solid var(--bg); }
.no-motion .core-scene { opacity: .25; }
@keyframes breathe { 50% { transform: scale(1.15); opacity: .75; } }
/* Tags sit at four fixed points around the globe and only bob gently, so they never collide. */
.core-tag {
  position: absolute; white-space: nowrap; font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .06em;
  padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--glass-2); color: var(--text);
  box-shadow: 0 8px 24px -12px rgba(0,0,0,.45); animation: bob 6s ease-in-out infinite;
}
.core-tag::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 8px; vertical-align: 1px; background: var(--a1); }
.core-tag--1 { top: 10%; left: 6%; }
.core-tag--2 { top: 22%; right: 0; animation-delay: -1.5s; }
.core-tag--2::before { background: var(--a2); }
.core-tag--3 { bottom: 20%; left: 0; animation-delay: -3s; }
.core-tag--3::before { background: var(--a3); }
.core-tag--4 { bottom: 9%; right: 12%; animation-delay: -4.5s; }
@keyframes bob { 50% { transform: translateY(-8px); } }

/* Marquee ------------------------------------------------------------ */
.marquee { border-block: 1px solid var(--line); padding: 22px 0; overflow: hidden; background: var(--bg-2); }
.marquee-track { display: flex; gap: 32px; width: max-content; animation: marquee 40s linear infinite; font-family: var(--display); font-size: clamp(1.2rem, 2.4vw, 1.9rem); font-weight: 500; letter-spacing: -0.02em; color: var(--muted); }
.marquee-track b { color: var(--a1); font-weight: 400; font-size: .7em; align-self: center; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Sections ----------------------------------------------------------- */
.section { position: relative; padding: clamp(72px, 9vw, 128px) 0; }
.section-head { display: flex; flex-direction: column; gap: 20px; margin-bottom: clamp(40px, 5vw, 64px); }
.eyebrow { display: inline-flex; align-items: center; gap: 12px; color: var(--muted); }
.eyebrow span { color: var(--a1); }
.eyebrow::after { content: ""; width: 48px; height: 1px; background: var(--line-strong); order: 2; }
.eyebrow span { order: 0; }
.title { font-size: clamp(2.3rem, 5vw, 4.4rem); letter-spacing: -0.04em; line-height: 1; }
.title--sm { font-size: clamp(2rem, 3.8vw, 3.2rem); }
.title em, .contact-title em { color: transparent; -webkit-text-stroke: 1px var(--stroke); }

/* About */
.statement {
  font-family: var(--display); font-size: clamp(1.55rem, 3.2vw, 2.8rem); line-height: 1.15; letter-spacing: -0.035em;
  max-width: 1100px; margin: 24px 0 clamp(48px, 6vw, 80px); font-weight: 500;
}
.about-grid { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: clamp(40px, 6vw, 96px); align-items: start; }
.profile-card { position: sticky; top: calc(var(--header-h) + 32px); display: flex; flex-direction: column; gap: 18px; }
.profile-avatar { position: relative; width: 100%; max-width: 260px; aspect-ratio: 1; border-radius: 50%; padding: 4px; background: var(--grad); box-shadow: 0 20px 50px -28px var(--glow); }
.profile-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; object-position: center 35%; border: 4px solid var(--bg); }
.profile-card figcaption { display: flex; flex-direction: column; gap: 4px; }
.profile-name { font-family: var(--display); font-size: 1.5rem; letter-spacing: -0.02em; line-height: 1.2; }
.profile-handle { color: var(--muted); font-size: 13px; text-transform: none; }
.profile-role { color: var(--muted); font-size: .95rem; margin-top: 8px; }
.profile-loc { color: var(--dim); font-size: 11.5px; margin-top: 4px; }
.about-text p { color: var(--muted); font-size: 1.06rem; margin-bottom: 20px; max-width: 620px; }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; margin-top: 36px; border-top: 1px solid var(--line); }
.stat { padding: 28px 0 26px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column-reverse; gap: 10px; }
.stat:nth-child(odd) { padding-right: 24px; border-right: 1px solid var(--line); }
.stat:nth-child(even) { padding-left: 28px; }
.stat dd { font-family: var(--display); font-size: clamp(2.6rem, 5vw, 3.8rem); font-weight: 600; letter-spacing: -0.05em; line-height: 1; background: linear-gradient(180deg, var(--text), rgba(238,241,247,.5)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat dt { color: var(--muted); font-size: 14px; line-height: 1.45; }

/* Spotlight cards (shared) */
[data-spotlight] { position: relative; isolation: isolate; }
[data-spotlight]::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: -1; pointer-events: none; opacity: 0; transition: opacity .4s;
  background: radial-gradient(420px circle at var(--x, 50%) var(--y, 50%), rgba(56,189,248,.12), transparent 45%);
}
[data-spotlight]::after { /* glowing border that follows the cursor */
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none; opacity: 0; transition: opacity .4s;
  background: radial-gradient(260px circle at var(--x, 50%) var(--y, 50%), rgba(56,189,248,.9), rgba(167,139,250,.6) 40%, transparent 70%);
  -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);
}
[data-spotlight]:hover::before, [data-spotlight]:hover::after { opacity: 1; }

/* Expertise bento */
.bento { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; display: flex; flex-direction: column; }
.tile--lg {
  grid-column: span 2; grid-row: span 2; display: grid; grid-template-columns: minmax(0, 1fr) minmax(190px, .8fr); column-gap: 32px;
  grid-template-areas: "icon life" "title life" "text life"; align-content: start; background: radial-gradient(120% 80% at 100% 0%, rgba(56,189,248,.09), transparent 60%), var(--surface); }
.tile--lg .tile-icon { grid-area: icon; }
.tile--lg h3 { grid-area: title; font-size: clamp(1.6rem, 2.6vw, 2.2rem); }
.tile--lg > p { grid-area: text; }
.tile--lg p { font-size: 1.05rem; max-width: 460px; }
.lifecycle { grid-area: life; list-style: none; position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 10px; padding-left: 0; }
.lifecycle::before { content: ""; position: absolute; left: 15px; top: 18px; bottom: 18px; width: 1px; background: linear-gradient(var(--a1), var(--a2)); opacity: .5; }
.lifecycle li { position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 14px 10px 0; font-size: .95rem; color: var(--text); }
.lifecycle li span { position: relative; z-index: 1; display: grid; place-items: center; width: 31px; height: 31px; flex-shrink: 0; border-radius: 50%; font-size: 10.5px; color: var(--a1); background: var(--bg-2); border: 1px solid var(--line-strong); }
.tile--wide { grid-column: 1 / -1; min-height: 0; display: grid; grid-template-columns: auto 1fr; column-gap: 28px; align-items: center; }
.tile--wide .tile-icon { grid-row: span 2; margin: 0; }
.tile--wide h3 { margin: 0 0 6px; }
.tile-icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; border: 1px solid var(--line-strong); color: var(--a1); margin-bottom: 22px; background: rgba(56,189,248,.06); }
.tile-icon .icon { width: 24px; height: 24px; }
.tile h3 { font-size: 1.3rem; margin: 0 0 10px; }
.tile p { color: var(--muted); font-size: .98rem; }

/* Journey timeline */
.timeline { position: relative; padding-left: 0; }
.timeline-rail { position: absolute; left: 260px; top: 0; bottom: 0; width: 1px; background: var(--line); }
.timeline-progress { position: absolute; inset: 0; background: linear-gradient(var(--a1), var(--a2)); transform-origin: top; box-shadow: 0 0 12px var(--glow); }
.tl-item { position: relative; display: grid; grid-template-columns: 260px 1fr; padding-bottom: 40px; }
.tl-item::before { content: ""; position: absolute; left: 255px; top: 10px; width: 11px; height: 11px; border-radius: 50%; background: var(--bg); border: 1.5px solid var(--a1); box-shadow: 0 0 0 5px var(--bg), 0 0 18px var(--glow); }
.tl-date { color: var(--muted); padding-right: 40px; padding-top: 6px; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.chip-live { color: var(--a3); border: 1px solid rgba(45,212,191,.4); border-radius: 999px; padding: 3px 10px; font-size: 11px; }
.tl-card { margin-left: 48px; padding: 30px 32px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); transition: border-color .4s, transform .5s var(--ease); }
.tl-card:hover { border-color: var(--line-strong); transform: translateX(6px); }
.tl-card h3 { font-size: clamp(1.4rem, 2.2vw, 1.8rem); }
.tl-org { color: var(--a1); font-weight: 500; margin: 6px 0 16px; font-size: .97rem; }
.tl-card > p:not(.tl-org) { color: var(--muted); }
.tl-card ul { display: grid; gap: 10px; margin-top: 4px; }
.tl-card li { position: relative; padding-left: 22px; color: var(--muted); font-size: .98rem; }
.tl-card li::before { content: ""; position: absolute; left: 0; top: .72em; width: 10px; height: 1px; background: var(--a1); }

.awards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 40px; }
.award { padding: 30px; border-radius: var(--radius); border: 1px solid var(--line); background: linear-gradient(160deg, rgba(167,139,250,.08), transparent 60%), var(--surface); }
.award .icon { color: var(--a2); width: 26px; height: 26px; }
.award-year { display: block; font-family: var(--display); font-size: clamp(3rem, 5.5vw, 4.4rem); font-weight: 600; letter-spacing: -0.05em; line-height: 1; margin: 26px 0 10px; }
.award p { color: var(--muted); line-height: 1.4; }

/* Work */
.projects { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; perspective: 1400px; }
.project {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 34px; background: var(--surface);
  display: flex; flex-direction: column; transform-style: preserve-3d; will-change: transform; min-height: 300px;
}
.project > * { transform: translateZ(24px); }
.project-top { display: flex; justify-content: space-between; color: var(--dim); margin-bottom: auto; }
.project-top span:first-child { color: var(--a1); }
.project h3 { font-size: clamp(1.4rem, 2.2vw, 1.8rem); margin: 36px 0 12px; }
.project p { color: var(--muted); max-width: 560px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.tags li { padding: 6px 12px; border-radius: 999px; background: var(--tint); border: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.project--feature { grid-column: 1 / -1; min-height: 340px; background: radial-gradient(90% 120% at 100% 100%, rgba(167,139,250,.1), transparent 55%), var(--surface); }
.project--feature h3 { font-size: clamp(1.8rem, 3.4vw, 2.8rem); }
.project-visual { position: absolute; right: 40px; bottom: 40px; display: flex; align-items: center; gap: 0; }
.pv-node { font-family: var(--mono); font-size: 11px; text-transform: uppercase; padding: 10px 14px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--bg-2); }
.pv-link { position: relative; width: 120px; height: 1px; background: var(--line-strong); overflow: hidden; }
.pv-link::after { content: ""; position: absolute; top: 0; left: 0; width: 40%; height: 100%; background: linear-gradient(90deg, transparent, var(--a1), transparent); animation: packet 1.8s linear infinite; }
@keyframes packet { from { transform: translateX(-100%); } to { transform: translateX(260%); } }

/* Toolkit */
.stack { border-top: 1px solid var(--line); }
.stack-row { display: grid; grid-template-columns: 240px 1fr; gap: 24px; padding: 24px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.stack-row h3 { font-size: 1.3rem; font-family: var(--display); font-weight: 600; color: var(--text); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { padding: 8px 15px; border-radius: 999px; border: 1px solid var(--line); font-size: 14px; color: var(--muted); transition: color .3s, border-color .3s, background .3s, box-shadow .3s; }
.chips li:hover { color: var(--text); border-color: rgba(56,189,248,.5); background: rgba(56,189,248,.06); box-shadow: 0 0 20px rgba(56,189,248,.15); }
.learning { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; margin-top: 64px; }
.learning h3 { color: var(--a1); font-weight: 400; font-size: 12px; margin-bottom: 18px; letter-spacing: .04em; }
.learning li { color: var(--muted); padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .96rem; }

/* Logos */
.logos { display: grid; gap: 36px; margin-bottom: 64px; }
.logo-group h3 { color: var(--a1); font-weight: 400; font-size: 12px; margin-bottom: 18px; letter-spacing: .04em; }
.logo-grid { --cols: var(--n, 8); display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: 12px; }
@media (max-width: 1100px) { .logo-grid[style*="--n:8"] { --cols: 4; } .logo-grid[style*="--n:6"] { --cols: 3; } }
.logo {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  padding: 26px 12px 20px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface);
  transition: transform .5s var(--ease), border-color .4s, box-shadow .4s;
}
.logo img { width: 44px; height: 44px; object-fit: contain; filter: grayscale(.15); transition: filter .4s, transform .5s var(--ease); }
.logo span { font-size: 13px; color: var(--muted); font-weight: 500; transition: color .3s; }
.logo:hover { transform: translateY(-6px); border-color: var(--line-strong); box-shadow: 0 18px 40px -20px var(--glow); }
.logo:hover img { filter: none; transform: scale(1.12); }
.logo:hover span { color: var(--text); }

/* Moments: a swipeable strip by default; JS upgrades it to a pinned horizontal scroll on desktop. */
.moments { position: relative; padding: clamp(72px, 9vw, 128px) 0; background: var(--bg-2); border-block: 1px solid var(--line); }
.moments-inner { display: flex; flex-direction: column; gap: 40px; }
.moments-head { display: flex; flex-direction: column; gap: 18px; }
.moments-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.moment {
  position: relative; display: block; width: 100%; aspect-ratio: 4 / 3; border-radius: 18px; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); text-align: left;
  transition: transform .5s var(--ease), box-shadow .5s var(--ease), border-color .3s;
}
.moment img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; transition: transform .9s var(--ease); }
.moment::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(5,6,10,.7)); opacity: .85; transition: opacity .4s; pointer-events: none; }
.moment span { position: absolute; z-index: 1; left: 14px; right: 14px; bottom: 12px; font-size: 11px; line-height: 1.4; color: #f3f5fa; text-shadow: 0 1px 8px rgba(0,0,0,.5); }
.moment:hover, .moment:focus-visible { transform: translateY(-4px); border-color: var(--line-strong); box-shadow: 0 22px 44px -26px rgba(0,0,0,.55); }
.moment:hover img, .moment:focus-visible img { transform: scale(1.05); }
@media (max-width: 900px) { .moments-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } }
@media (max-width: 420px) { .moments-grid { gap: 10px; } .moment { border-radius: 14px; } .moment span { left: 10px; right: 10px; bottom: 9px; font-size: 10px; } }

.lightbox { border: 0; padding: 0; background: transparent; max-width: min(1100px, 92vw); max-height: 92vh; overflow: visible; color: #eef1f7; }
.lightbox::backdrop { background: rgba(3,4,8,.9); backdrop-filter: blur(6px); }
.lightbox img { max-height: 82vh; width: auto; margin: 0 auto; border-radius: 16px; }
.lightbox-caption { text-align: center; margin-top: 14px; color: #a3abbf; }
.lightbox-close { position: absolute; top: -48px; right: 0; width: 40px; height: 40px; font-size: 30px; line-height: 1; color: #eef1f7; }

/* Contact */
.contact { overflow: hidden; text-align: center; padding-bottom: clamp(100px, 12vw, 160px); }
.contact .eyebrow { justify-content: center; }
.contact-glow { position: absolute; left: 50%; top: 60%; width: 80vw; height: 60vw; max-width: 1100px; max-height: 700px; transform: translate(-50%, -50%); background: radial-gradient(closest-side, rgba(56,189,248,.18), rgba(167,139,250,.08) 50%, transparent); filter: blur(40px); pointer-events: none; z-index: -1; }
.contact-title { font-size: clamp(2.8rem, 8vw, 7.2rem); letter-spacing: -0.05em; line-height: .95; margin-top: 28px; }
.contact-sub { color: var(--muted); max-width: 560px; margin: 28px auto 0; font-size: 1.08rem; }
.mail-cta {
  display: inline-flex; align-items: center; gap: 18px; margin-top: 48px; padding: 14px 14px 14px 30px;
  border-radius: 999px; border: 1px solid var(--line-strong); background: rgba(13,16,25,.75); backdrop-filter: blur(10px);
  transition: border-color .4s, box-shadow .4s;
}
.mail-cta:hover { border-color: rgba(56,189,248,.6); box-shadow: 0 0 60px -10px var(--glow); }
.mail-cta-label { font-family: var(--mono); font-size: 12px; text-transform: uppercase; color: var(--a1); }
.mail-cta-addr { font-family: var(--display); font-size: clamp(1rem, 2.2vw, 1.5rem); font-weight: 500; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.mail-cta-icon { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--text); color: var(--bg); flex-shrink: 0; transition: transform .5s var(--ease), background .3s; }
.mail-cta:hover .mail-cta-icon { transform: rotate(45deg); background: var(--a1); }
.socials { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 28px; }
.socials a { display: inline-flex; align-items: center; gap: 10px; padding: 12px 20px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); font-weight: 500; font-size: 15px; transition: color .3s, border-color .3s; }
.socials a:hover { color: var(--text); border-color: var(--line-strong); }
.socials .icon { width: 18px; height: 18px; }

.site-footer { border-top: 1px solid var(--line); padding: 28px 0; color: var(--dim); }
.footer-inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.to-top:hover { color: var(--text); }

/* Responsive ------------------------------------------------------------ */
@media (max-width: 1080px) {
  .nav-links a span { display: none; }
  .bento { grid-template-columns: repeat(2, 1fr); }
  .tile--lg { grid-row: auto; }
  .timeline-rail { left: 180px; }
  .tl-item { grid-template-columns: 180px 1fr; }
  .tl-item::before { left: 175px; }
}

@media (max-width: 900px) {
  :root { --header-h: 68px; }
  .nav-toggle { display: block; }
  .nav-cta { display: none; }
  .nav-links {
    position: fixed; inset: var(--header-h) 0 0 0; flex-direction: column; gap: 0; padding: 16px 24px 32px;
    background: var(--menu-bg); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
    opacity: 0; visibility: hidden; transform: translateY(-12px); transition: opacity .35s var(--ease), transform .45s var(--ease), visibility .35s;
    overflow-y: auto;
  }
  .nav-links.open { opacity: 1; visibility: visible; transform: none; }
  .nav-links a { font-family: var(--display); font-size: 30px; letter-spacing: -0.03em; padding: 14px 0; border-radius: 0; border-bottom: 1px solid var(--line); color: var(--text); }
  .nav-links a span { display: inline; font-size: 12px; }
  .nav-links a:hover, .nav-links a.active { background: none; }
  .nav-menu-cta { display: block; margin-top: 28px; }
  .nav-links .nav-menu-cta a { font-family: var(--font); font-size: 16px; letter-spacing: 0; padding: 16px 26px; border: 0; border-radius: 999px; color: var(--bg); justify-content: center; width: 100%; }
  .hero-grid { grid-template-columns: 1fr; }
  .core { order: -1; justify-self: start; width: 132px; margin: -8px 0 -6px -10px; }
  .core-ring--outer { inset: 0; }
  .core-avatar { inset: 16%; box-shadow: 0 0 0 5px color-mix(in srgb, var(--bg) 70%, transparent), 0 16px 40px -16px var(--glow); }
  .hero-grid { gap: 20px; align-content: center; }
  .core-tag { display: none; }
  .about-grid { grid-template-columns: 1fr; }
  .profile-card { position: static; flex-direction: row; align-items: center; gap: 20px; }
  .profile-avatar { width: 120px; flex-shrink: 0; }
  .learning { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 720px) {
  .wrap, .nav, .hero-inner { width: calc(100% - 32px); }
  .brand-text small { display: none; }
  .hero-inner { padding-top: calc(var(--header-h) + 28px); }
  .hero-name { font-size: clamp(2.4rem, 11vw, 3.2rem); margin: 22px 0 18px; }
  .hero-meta { flex-wrap: wrap; }
  .hero-meta > span:last-child { display: none; }
  .core { width: 112px; }
  .tag-org { display: none; }
  .tile--wide { display: flex; }
  .bento { grid-template-columns: 1fr; }
  .tile--lg, .tile--wide { grid-column: auto; }
  .tile { padding: 24px; }
  .tile--lg { display: flex; }
  .lifecycle { margin-top: 20px; }
  .timeline-rail { left: 5px; }
  .tl-item { grid-template-columns: 1fr; padding-left: 30px; padding-bottom: 36px; }
  .tl-item::before { left: 0; top: 6px; }
  .tl-date { flex-direction: row; align-items: center; padding: 0 0 12px; }
  .tl-card { margin-left: 0; padding: 22px; }
  .awards { grid-template-columns: 1fr; }
  .projects { grid-template-columns: 1fr; }
  .project { padding: 26px; min-height: 0; }
  .project--feature { min-height: 0; }
  .project h3 { margin-top: 32px; }
  .project-visual { position: static; margin-top: 28px; }
  .pv-link { width: 60px; }
  .stack-row { grid-template-columns: 1fr; gap: 14px; }
  .hero-meta { justify-content: space-between; }
  .stats { grid-template-columns: 1fr; }
  .logo-grid { gap: 8px; }
  .logo { padding: 16px 4px 12px; gap: 10px; }
  .logo span { font-size: 11px; text-align: center; }
  .logo img { width: 32px; height: 32px; }
  .stat:nth-child(odd), .stat:nth-child(even) { padding: 22px 0; border-right: 0; }
  .mail-cta { flex-direction: column; gap: 10px; padding: 24px; border-radius: 24px; width: 100%; }
  .footer-inner { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
  .preloader, .hero-particles { display: none !important; }
}
.no-motion .preloader { display: none !important; }
.nav-links .nav-menu-cta a span { font-family: inherit; font-size: inherit; color: inherit; }
/* Avoid a lone card on the last row of the project grid. */
.project--wide { grid-column: 1 / -1; min-height: 0; }
.project[hidden] { display: none; }

/* Lightbox arrows */
.lightbox-nav { position: fixed; top: 50%; width: 48px; height: 48px; margin-top: -24px; border-radius: 50%; display: grid; place-items: center; font-size: 30px; line-height: 1; color: #eef1f7; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); transition: background .3s; }
.lightbox-nav:hover { background: rgba(255,255,255,.16); }
.lightbox-prev { left: max(12px, 2vw); }
.lightbox-next { right: max(12px, 2vw); }

/* Theme toggle */
.theme-toggle { position: relative; width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line); display: grid; place-items: center; color: var(--muted); transition: color .3s, border-color .3s, background .3s; }
.theme-toggle:hover { color: var(--text); border-color: var(--line-strong); background: var(--tint); }
.theme-toggle .icon { width: 19px; height: 19px; grid-area: 1 / 1; transition: transform .5s var(--ease), opacity .3s; }
.theme-toggle .icon-moon { opacity: 0; transform: rotate(-60deg) scale(.6); }
[data-theme="light"] .theme-toggle .icon-sun { opacity: 0; transform: rotate(60deg) scale(.6); }
[data-theme="light"] .theme-toggle .icon-moon { opacity: 1; transform: none; }
@media (max-width: 900px) { .nav { gap: 10px; } .theme-toggle { width: 44px; height: 44px; } }

/* Light theme fine-tuning */
[data-theme="light"] .hero-name .accent { filter: saturate(1.1); }
[data-theme="light"] .core-sphere i { border-color: rgba(2,132,199,.45); }
[data-theme="light"] .core-sphere i:nth-child(3), [data-theme="light"] .core-sphere i:nth-child(4) { border-color: rgba(124,58,237,.4); }
[data-theme="light"] .core-sphere i:nth-child(6) { border-color: rgba(13,148,136,.5); }
[data-theme="light"] .core-glow { opacity: .55; }
[data-theme="light"] .logo { background: var(--surface); }
[data-theme="light"] .logo img[src$="bash.svg"] { filter: invert(.9); }
[data-theme="light"] .logo img[src$="kalilinux.svg"] { filter: brightness(.55) saturate(1.6); }
[data-theme="light"] .tile, [data-theme="light"] .project, [data-theme="light"] .tl-card, [data-theme="light"] .logo { box-shadow: 0 1px 2px rgba(15,23,42,.04), 0 12px 32px -24px rgba(15,23,42,.25); }
[data-theme="light"] ::selection { color: #fff; }

/* Salesforce domain accents */
.tile--sf { background: radial-gradient(120% 80% at 100% 0%, rgba(167,139,250,.11), transparent 60%), var(--surface); }
.tile--sf .tile-icon { color: var(--a2); background: rgba(167,139,250,.08); }
.tile--sf .lifecycle::before { background: linear-gradient(var(--a2), var(--a1)); }
.tile--sf .lifecycle li span { color: var(--a2); }
.project--sf { background: radial-gradient(90% 120% at 100% 100%, rgba(56,189,248,.1), transparent 55%), var(--surface); }
.project-top span:first-child { letter-spacing: .06em; }
.project[data-domain="salesforce"] .project-top span:first-child { color: var(--a2); }

/* Work filters (only when the site script is running) */
.work-filters { display: none; flex-wrap: wrap; gap: 8px; margin: -16px 0 28px; }
.js-ready .work-filters { display: flex; }
.chip-btn { padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); font-size: 14px; transition: color .3s, border-color .3s, background .3s; }
.chip-btn:hover { color: var(--text); border-color: var(--line-strong); }
.chip-btn.is-active { color: var(--bg); background: var(--text); border-color: var(--text); }

/* Expertise: two equal domain tiles side by side */
@media (min-width: 1081px) {
  .tile--lg { grid-template-columns: minmax(0, 1fr); grid-template-areas: "icon" "title" "text" "life"; row-gap: 0; }
  .tile--lg .lifecycle { margin-top: 24px; }
}
@media (max-width: 720px) { .projects { grid-template-columns: minmax(0, 1fr); } .project-visual { max-width: 100%; } .pv-link { width: auto; flex: 1 1 16px; max-width: 60px; } .pv-node { padding: 9px 11px; } }
.logo span { text-align: center; line-height: 1.3; }

/* Scroll progress */
.scroll-progress { position: fixed; inset: 0 0 auto; height: 2px; z-index: 120; pointer-events: none; }
.scroll-progress span { display: block; height: 100%; background: var(--grad); transform-origin: left; transform: scaleX(0); }

/* Off the clock */
.offclock { margin: 4px 0 28px; }
.offclock > p { color: var(--dim); font-size: 11.5px; margin-bottom: 12px; }
.offclock ul { display: flex; flex-wrap: wrap; gap: 8px; }
.offclock li { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); font-size: .92rem; transition: color .3s, border-color .3s, background .3s, transform .4s var(--ease); }
.offclock li .icon { width: 17px; height: 17px; color: var(--a1); transition: transform .4s var(--ease); }
.offclock li:hover { color: var(--text); border-color: var(--line-strong); background: var(--tint); transform: translateY(-2px); }
.offclock li:hover .icon { transform: rotate(-8deg) scale(1.1); }
