/* =====================================================================
   Dinesh Timilsena — Portfolio
   Plain CSS. Sections are marked with banners for easy navigation.
   ===================================================================== */

/* ---------- 1. DESIGN TOKENS ---------- */
:root {
  /* Base */
  --bg-0: #020617;
  --bg-1: #061126;
  --bg-2: #08152d;
  --surface: rgba(13, 24, 52, 0.55);
  --surface-2: rgba(20, 34, 70, 0.6);
  --border: rgba(148, 163, 255, 0.12);
  --border-strong: rgba(148, 163, 255, 0.26);

  /* Text */
  --text: #e8edff;
  --text-dim: #a3aed0;
  --text-mute: #6b7799;

  /* Accents */
  --cyan: #22d3ee;
  --sky: #38bdf8;
  --blue: #3b82f6;
  --indigo: #818cf8;
  --violet: #8b5cf6;
  --purple: #a855f7;
  --magenta: #ec4899;
  --teal: #2dd4bf;

  --grad: linear-gradient(110deg, var(--cyan), var(--blue) 45%, var(--violet));
  --grad-warm: linear-gradient(110deg, var(--violet), var(--magenta));
  --grad-signature: linear-gradient(90deg, var(--cyan), var(--violet), var(--magenta));

  /* Type */
  --f-display: "Space Grotesk", system-ui, sans-serif;
  --f-body: "Inter", system-ui, -apple-system, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, monospace;
  --f-hand: "Caveat", cursive;

  /* Spacing & shape */
  --container: 1200px;
  --gutter: clamp(1.1rem, 4vw, 2rem);
  --section-y: clamp(5rem, 11vw, 8.5rem);
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;

  --ease: cubic-bezier(.2, .7, .2, 1);
  --shadow: 0 30px 60px -30px rgba(0, 0, 0, .7), 0 0 0 1px var(--border);
}

/* ---------- 2. RESET & BASE ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--f-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg-0);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
/* Subtle noise texture */
body::after {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none; z-index: 100;
  opacity: .035;
  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='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
h1, h2, h3, h4 { font-family: var(--f-display); line-height: 1.1; margin: 0; letter-spacing: -.02em; }
p { margin: 0; }
ul, ol { list-style: none; margin: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; }
img, svg { display: block; max-width: 100%; }
code { font-family: var(--f-mono); font-size: .9em; color: var(--cyan); }
dl, dd { margin: 0; }

.i { width: 1.1em; height: 1.1em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: -60px; left: 1rem; z-index: 300; padding: .6rem 1rem; background: var(--cyan); color: var(--bg-0); border-radius: 8px; font-weight: 600; transition: top .2s; }
.skip-link:focus { top: 1rem; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }

/* Placeholder marker — easy to spot and replace */
.ph {
  font-family: var(--f-mono);
  font-size: .82em;
  font-weight: 500;
  letter-spacing: 0;
  color: #fbbf24;
  background: rgba(251, 191, 36, .08);
  border: 1px dashed rgba(251, 191, 36, .4);
  border-radius: 6px;
  padding: .05em .4em;
  white-space: nowrap;
}

/* Gradient text */
.text-grad, .text-grad-cyan, .text-grad-violet, .text-grad-warm {
  background-clip: text; -webkit-background-clip: text; color: transparent;
}
.text-grad { background-image: var(--grad); }
.text-grad-cyan { background-image: linear-gradient(110deg, var(--cyan), var(--blue)); }
.text-grad-violet { background-image: linear-gradient(110deg, var(--violet), var(--magenta)); }
.text-grad-warm { background-image: var(--grad-warm); }

/* ---------- 3. AMBIENT BACKGROUND ---------- */
.bg { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden;
  background: radial-gradient(1200px 700px at 70% -10%, #0b1a44 0%, transparent 60%), linear-gradient(180deg, var(--bg-0), var(--bg-1) 50%, var(--bg-0)); }
.bg__grid { position: absolute; inset: 0;
  background-image: linear-gradient(rgba(148,163,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(148,163,255,.05) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 80%); }
.bg__glow { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .35; }
.bg__glow--a { width: 520px; height: 520px; background: var(--blue); top: -160px; right: -120px; animation: drift 22s ease-in-out infinite alternate; }
.bg__glow--b { width: 440px; height: 440px; background: var(--violet); top: 40%; left: -220px; opacity: .2; animation: drift 26s ease-in-out infinite alternate-reverse; }
@keyframes drift { to { transform: translate(60px, 80px) scale(1.1); } }

.cursor-glow { position: fixed; top: 0; left: 0; width: 420px; height: 420px; margin: -210px 0 0 -210px; border-radius: 50%;
  background: radial-gradient(circle, rgba(56,189,248,.09), transparent 65%); pointer-events: none; z-index: 0; opacity: 0; transition: opacity .4s; will-change: transform; }
.cursor-glow.is-on { opacity: 1; }

.scroll-progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 210; }
.scroll-progress span { display: block; height: 100%; width: 100%; background: var(--grad-signature); transform-origin: 0 50%; transform: scaleX(0); box-shadow: 0 0 10px rgba(34,211,238,.6); }

/* ---------- 4. BUTTONS, CHIPS, GLASS ---------- */
.btn {
  --pad-y: .78rem; --pad-x: 1.25rem;
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  padding: var(--pad-y) var(--pad-x); border-radius: 999px;
  font-family: var(--f-display); font-weight: 600; font-size: .95rem; letter-spacing: .005em; white-space: nowrap;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), background .3s, border-color .3s, color .3s;
}
.btn .i { transition: transform .3s var(--ease); }
.btn:hover .i:last-child { transform: translateX(3px); }
.btn--sm { --pad-y: .55rem; --pad-x: 1rem; font-size: .87rem; }
.btn--lg { --pad-y: .95rem; --pad-x: 1.55rem; font-size: 1rem; }
.btn--block { width: 100%; }
.btn--primary { color: #fff; background: linear-gradient(110deg, #0ea5e9, var(--blue) 45%, var(--violet)); box-shadow: 0 10px 30px -10px rgba(59,130,246,.65), inset 0 1px 0 rgba(255,255,255,.2); }
.btn--primary:hover { box-shadow: 0 14px 38px -10px rgba(139,92,246,.75), inset 0 1px 0 rgba(255,255,255,.25); }
.btn--ghost { color: var(--text); background: rgba(255,255,255,.03); border: 1px solid var(--border-strong); backdrop-filter: blur(8px); }
.btn--ghost:hover { border-color: rgba(34,211,238,.55); background: rgba(34,211,238,.07); }
.btn[data-magnetic] { will-change: transform; }

.tag, .chip-btn, .mini-tags li {
  display: inline-flex; align-items: center; gap: .4rem;
  border-radius: 999px; border: 1px solid var(--border); background: rgba(255,255,255,.03);
  font-size: .82rem; color: var(--text-dim); line-height: 1;
}
.tag { padding: .5rem .8rem; transition: border-color .25s, color .25s, transform .25s var(--ease); }
.tag:hover { color: var(--text); border-color: rgba(34,211,238,.45); transform: translateY(-2px); }

.chip-btn { padding: .55rem .95rem; transition: all .25s var(--ease); --accent: var(--cyan); }
.chip-btn::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); opacity: .7; }
.chip-btn[data-filter="all"]::before { background: var(--grad); }
.chip-btn:hover { color: var(--text); border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
.chip-btn.is-active { color: var(--text); background: color-mix(in srgb, var(--accent) 14%, transparent); border-color: color-mix(in srgb, var(--accent) 60%, transparent); }
.chip-btn--sm { padding: .45rem .8rem; font-size: .78rem; }

.mini-tags { display: flex; flex-wrap: wrap; gap: .4rem; }
.mini-tags li { padding: .32rem .62rem; font-size: .74rem; font-family: var(--f-mono); }
.mini-tags--lg li { padding: .5rem .8rem; font-size: .8rem; font-family: var(--f-body); --accent: var(--cyan); }
.mini-tags--lg li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

.glass {
  position: relative;
  background: linear-gradient(160deg, rgba(22,36,74,.55), rgba(8,18,42,.55));
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 20px 50px -30px rgba(0,0,0,.8), inset 0 1px 0 rgba(255,255,255,.04);
}

.pulse-dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: #34d399; flex-shrink: 0; }
.pulse-dot::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 1px solid #34d399; animation: ping 2s var(--ease) infinite; }
.pulse-dot--violet { background: var(--violet); }
.pulse-dot--violet::after { border-color: var(--violet); }
@keyframes ping { 0% { transform: scale(.6); opacity: 1; } 100% { transform: scale(1.8); opacity: 0; } }

/* Tooltip */
[data-tip] { position: relative; }
[data-tip]::after {
  content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translate(-50%, 4px);
  padding: .35rem .6rem; border-radius: 8px; background: #0d1838; border: 1px solid var(--border-strong);
  font-size: .72rem; color: var(--text); white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity .2s, transform .2s; z-index: 5;
}
[data-tip]:hover::after, [data-tip]:focus-visible::after { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 5. SECTION HEADINGS ---------- */
.section { position: relative; padding-block: var(--section-y); }
.section--tight { padding-block: calc(var(--section-y) * .6); }
/* Glowing divider */
.section::before { content: ""; position: absolute; top: 0; left: 50%; width: min(70%, 760px); height: 1px; transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, rgba(56,189,248,.35), rgba(139,92,246,.35), transparent); }
.section--tight::before, #metrics::before { display: none; }

.sec-head { max-width: 720px; margin-bottom: clamp(2.5rem, 5vw, 3.5rem); }
.sec-head--center { margin-inline: auto; text-align: center; }
.sec-head--split { max-width: none; display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem; flex-wrap: wrap; }
.sec-head--split .sec-sub { max-width: 420px; }
.eyebrow { display: inline-flex; align-items: center; gap: .75rem; margin-bottom: 1rem;
  font-family: var(--f-mono); font-size: .76rem; text-transform: uppercase; letter-spacing: .16em; color: var(--text-dim); }
.eyebrow__num { color: var(--cyan); padding-right: .75rem; border-right: 1px solid var(--border-strong); }
.sec-title { font-size: clamp(2rem, 4.6vw, 3.25rem); font-weight: 700; }
.sec-sub { margin-top: 1.1rem; color: var(--text-dim); font-size: clamp(1rem, 1.4vw, 1.08rem); }
.sec-sub--ph { margin-top: .75rem; }
.arrow-sep { font-style: normal; color: var(--text-mute); font-weight: 400; }

/* ---------- 6. NAVIGATION ---------- */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 200; transition: background .35s, border-color .35s, backdrop-filter .35s; border-bottom: 1px solid transparent; }
.nav.is-scrolled { background: rgba(4, 10, 28, .72); backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%); border-bottom-color: var(--border); }
.nav__inner { display: flex; align-items: center; gap: 1.5rem; height: 76px; }

.brand { display: inline-flex; align-items: center; gap: .75rem; }
.brand__mark { position: relative; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px;
  font-family: var(--f-display); font-weight: 700; font-size: 1rem; letter-spacing: -.02em; background: var(--bg-1); }
.brand__mark::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px; background: var(--grad);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.brand__text { display: flex; flex-direction: column; line-height: 1.2; }
.brand__name { font-family: var(--f-display); font-weight: 600; font-size: .98rem; }
.brand__role { font-size: .72rem; color: var(--text-mute); }

.nav__links { display: flex; align-items: center; gap: .25rem; margin-left: auto; }
.nav__link { position: relative; padding: .5rem .8rem; font-size: .9rem; color: var(--text-dim); border-radius: 999px; transition: color .25s; }
.nav__link::after { content: ""; position: absolute; left: 50%; bottom: 2px; width: 4px; height: 4px; border-radius: 50%; background: var(--cyan);
  transform: translateX(-50%) scale(0); transition: transform .3s var(--ease); box-shadow: 0 0 8px var(--cyan); }
.nav__link:hover { color: var(--text); }
.nav__link.is-active { color: var(--text); }
.nav__link.is-active::after { transform: translateX(-50%) scale(1); }
.nav__cta-mobile { display: none; }
.nav__toggle { display: none; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--border-strong); position: relative; margin-left: auto; }
.nav__toggle span { position: absolute; left: 12px; right: 12px; height: 1.5px; background: var(--text); border-radius: 2px; transition: transform .3s var(--ease), opacity .2s; }
.nav__toggle span:nth-child(1) { top: 15px; } .nav__toggle span:nth-child(2) { top: 21px; } .nav__toggle span:nth-child(3) { top: 27px; }
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- 7. HERO ---------- */
.hero { position: relative; padding-top: clamp(7.5rem, 14vw, 9.5rem); padding-bottom: 3rem; }
.hero__grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.status-badge { display: inline-flex; align-items: center; gap: .65rem; padding: .45rem .9rem .45rem .75rem; border-radius: 999px;
  border: 1px solid rgba(52,211,153,.3); background: rgba(52,211,153,.07);
  font-family: var(--f-mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: #a7f3d0; }
.hero__title { margin-top: 1.5rem; font-size: clamp(2.6rem, 6.2vw, 4.7rem); font-weight: 700; letter-spacing: -.035em; }
.hero__name { display: inline-block; background: linear-gradient(180deg, #fff, #c7d2fe); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero__roles { margin-top: .6rem; font-family: var(--f-display); font-weight: 600; font-size: clamp(1.45rem, 3.2vw, 2.35rem); letter-spacing: -.02em; line-height: 1.25; }
.hero__amp { color: var(--text-mute); font-weight: 400; margin-inline: .2em; }
.hero__lead { margin-top: 1.4rem; max-width: 560px; color: var(--text-dim); font-size: clamp(1.02rem, 1.5vw, 1.15rem); }
.hero__actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }
.hero__tags { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 2rem; max-width: 560px; }

/* Portrait */
.hero__visual { position: relative; display: flex; justify-content: center; perspective: 1200px; }
.portrait { position: relative; width: min(100%, 400px); aspect-ratio: 4 / 5; border-radius: 32px; transform-style: preserve-3d; transition: transform .5s var(--ease); }
@property --angle { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
.portrait__ring { position: absolute; inset: -2px; border-radius: 34px; padding: 2px;
  background: conic-gradient(from var(--angle), var(--cyan), var(--blue), var(--violet), var(--magenta), var(--cyan));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  animation: spin-angle 8s linear infinite; }
.portrait::before { content: ""; position: absolute; inset: 8%; border-radius: 40px; background: conic-gradient(from 180deg, var(--cyan), var(--violet), var(--magenta), var(--cyan)); filter: blur(60px); opacity: .35; transform: translateZ(-60px); }
@keyframes spin-angle { to { --angle: 360deg; } }
.portrait__inner { position: absolute; inset: 0; border-radius: 32px; overflow: hidden; background: var(--bg-1); box-shadow: 0 40px 80px -30px rgba(0,0,0,.8); }
.portrait__scene { position: absolute; inset: 0; width: 100%; height: 100%; }
.portrait__scene .stars circle { animation: twinkle 4s ease-in-out infinite; }
.portrait__scene .stars circle:nth-child(2n) { animation-delay: 1.5s; }
.portrait__scene .stars circle:nth-child(3n) { animation-delay: 2.7s; }
@keyframes twinkle { 50% { opacity: .2; } }
.portrait__photo { position: absolute; inset: 0; }
.portrait__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }

.float-tag { position: absolute; display: inline-flex; align-items: center; gap: .4rem; padding: .45rem .75rem; border-radius: 999px;
  font-family: var(--f-mono); font-size: .74rem; color: var(--text); background: rgba(8,18,42,.78); border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  backdrop-filter: blur(10px); box-shadow: 0 10px 30px -10px color-mix(in srgb, var(--accent) 60%, transparent);
  transform: translateZ(50px); animation: bob 6s ease-in-out infinite; }
.float-tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.float-tag--1 { top: 9%; left: -9%; }
.float-tag--2 { top: 28%; right: -10%; animation-delay: -1.5s; }
.float-tag--3 { bottom: 30%; left: -11%; animation-delay: -3s; }
.float-tag--4 { top: 55%; right: -8%; animation-delay: -4.5s; }
@keyframes bob { 50% { translate: 0 -8px; } }

.portrait__status { position: absolute; left: 50%; bottom: -18px; transform: translateX(-50%) translateZ(70px);
  display: inline-flex; align-items: center; gap: .6rem; padding: .65rem 1rem; border-radius: 14px; white-space: nowrap;
  background: rgba(8,18,42,.85); border: 1px solid var(--border-strong); backdrop-filter: blur(12px); font-size: .82rem; font-weight: 500; box-shadow: var(--shadow); }

.particle { position: absolute; width: 4px; height: 4px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 10px var(--cyan); animation: float-p 9s ease-in-out infinite; }
.particle--1 { top: 4%; right: 12%; }
.particle--2 { bottom: 18%; right: -4%; background: var(--violet); box-shadow: 0 0 10px var(--violet); animation-delay: -3s; }
.particle--3 { top: 42%; left: -4%; background: var(--magenta); box-shadow: 0 0 10px var(--magenta); animation-delay: -5s; }
.particle--4 { bottom: -6%; left: 18%; animation-delay: -7s; }
@keyframes float-p { 50% { transform: translate(10px, -18px); opacity: .4; } }

.annotation { position: absolute; top: -48px; left: 2%; z-index: 3; font-family: var(--f-hand); font-size: 1.6rem; color: #c4b5fd; transform: rotate(-8deg); display: flex; align-items: flex-end; gap: .2rem; }
.annotation__arrow { width: 70px; height: 36px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; margin-bottom: -18px; }

/* Signature flow line */
.flowline { position: relative; margin-top: clamp(3.5rem, 7vw, 5rem); padding: 1.4rem 0 .4rem; }
.flowline__svg { position: absolute; left: 0; right: 0; top: 0; width: 100%; height: 60px; overflow: visible; }
.flowline__base { fill: none; stroke: url(#flowGrad); stroke-width: 1; opacity: .35; vector-effect: non-scaling-stroke; }
.flowline__pulse { fill: none; stroke: url(#flowGrad); stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 40 1100; animation: flow 6s linear infinite; vector-effect: non-scaling-stroke; filter: drop-shadow(0 0 6px rgba(139,92,246,.8)); }
.flowline__pulse--b { animation-delay: -3s; }
@keyframes flow { from { stroke-dashoffset: 1140; } to { stroke-dashoffset: 0; } }
.flowline__nodes { position: relative; display: flex; justify-content: space-between; }
.flowline__nodes li { display: flex; flex-direction: column; align-items: center; gap: .6rem; font-family: var(--f-mono); font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: var(--text-dim); }
.flowline__dot { width: 12px; height: 12px; border-radius: 50%; background: var(--bg-0); border: 2px solid var(--accent); box-shadow: 0 0 14px var(--accent); }

/* ---------- 8. ABOUT ---------- */
.about { display: grid; grid-template-columns: 1fr 320px; gap: 3rem; align-items: start; }
.about .sec-head { margin-bottom: 0; }
.explore { padding: 1.5rem; margin-top: 2.6rem; }
.explore__title { display: flex; align-items: center; gap: .7rem; font-family: var(--f-mono); font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 1rem; }
.explore__list li { position: relative; padding: .6rem 0 .6rem 1.4rem; border-top: 1px solid var(--border); font-weight: 500; font-size: .95rem; }
.explore__list li::before { content: "→"; position: absolute; left: 0; color: var(--violet); transition: transform .25s var(--ease); }
.explore__list li:hover::before { transform: translateX(3px); }

.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; margin-top: 3.5rem; perspective: 1000px; }
.pillar { padding: 1.8rem; overflow: hidden; transition: transform .4s var(--ease), border-color .3s; transform-style: preserve-3d; }
.pillar::before { content: ""; position: absolute; top: -40%; right: -30%; width: 70%; aspect-ratio: 1; border-radius: 50%; background: var(--accent); filter: blur(70px); opacity: .12; transition: opacity .4s; }
.pillar:hover { border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.pillar:hover::before { opacity: .25; }
.pillar__icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; font-size: 1.3rem; color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); }
.pillar__kicker { display: block; margin-top: 1.4rem; font-family: var(--f-mono); font-size: .7rem; letter-spacing: .18em; text-transform: uppercase; color: var(--accent); }
.pillar h3 { margin-top: .4rem; font-size: 1.3rem; }
.pillar p { margin-top: .7rem; color: var(--text-dim); font-size: .95rem; }

/* ---------- 9. TECH CONSTELLATION ---------- */
.stack-filter { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin-bottom: 2.5rem; }
.constellation { position: relative; display: grid; grid-template-columns: 1fr 260px 1fr; grid-template-rows: repeat(3, auto); gap: 1.4rem 4rem; }
.constellation__lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.constellation__lines line { stroke: var(--accent); stroke-opacity: .25; stroke-width: 1.2; stroke-dasharray: 4 6; vector-effect: non-scaling-stroke; animation: dash 18s linear infinite; transition: stroke-opacity .3s, stroke-width .3s; }
.constellation__lines line.is-on { stroke-opacity: .9; stroke-width: 2; filter: drop-shadow(0 0 4px var(--accent)); }
.constellation__lines line.is-dim { stroke-opacity: .07; }
@keyframes dash { to { stroke-dashoffset: -200; } }

.domain { padding: 1.25rem 1.3rem; transition: transform .35s var(--ease), border-color .3s, opacity .3s, box-shadow .3s; outline-offset: 4px; }
.domain--prog { grid-column: 1; grid-row: 1; } .domain--data { grid-column: 1; grid-row: 2; } .domain--viz { grid-column: 1; grid-row: 3; }
.domain--ml { grid-column: 3; grid-row: 1; } .domain--ai { grid-column: 3; grid-row: 2; } .domain--ops { grid-column: 3; grid-row: 3; }
.domain__title { display: flex; align-items: center; gap: .6rem; font-size: 1rem; font-weight: 600; margin-bottom: .9rem; }
.domain__title .i { color: var(--accent); font-size: 1.1rem; }
.domain__techs { display: flex; flex-wrap: wrap; gap: .45rem; }
.tech { padding: .42rem .7rem; border-radius: 9px; font-size: .82rem; color: var(--text-dim); background: rgba(255,255,255,.03); border: 1px solid var(--border); transition: all .25s var(--ease); cursor: default; }
.tech:hover { color: var(--text); border-color: color-mix(in srgb, var(--accent) 55%, transparent); background: color-mix(in srgb, var(--accent) 10%, transparent); transform: translateY(-2px); }
.domain.is-on { border-color: color-mix(in srgb, var(--accent) 55%, transparent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 20%, transparent), 0 20px 50px -20px color-mix(in srgb, var(--accent) 50%, transparent); transform: translateY(-3px); }
.domain.is-on .tech { color: var(--text); border-color: color-mix(in srgb, var(--accent) 30%, transparent); }
.domain.is-dim { opacity: .38; }

.core { grid-column: 2; grid-row: 1 / span 3; align-self: center; display: flex; flex-direction: column; align-items: center; text-align: center; }
.core__orb { position: relative; display: grid; place-items: center; width: 150px; height: 150px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #1d2c63, #071233 70%); box-shadow: 0 0 60px -10px rgba(59,130,246,.6), inset 0 0 30px rgba(139,92,246,.3); }
.core__mark { font-family: var(--f-display); font-size: 2.2rem; font-weight: 700; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.core__ring { position: absolute; border-radius: 50%; border: 1px solid rgba(148,163,255,.2); }
.core__ring--1 { inset: -14px; border-top-color: var(--cyan); animation: spin 10s linear infinite; }
.core__ring--2 { inset: -30px; border-style: dashed; border-color: rgba(139,92,246,.25); animation: spin 30s linear infinite reverse; }
@keyframes spin { to { transform: rotate(360deg); } }
.core__label { margin-top: 2.6rem; font-family: var(--f-display); font-weight: 600; font-size: 1.05rem; transition: color .3s; }
.core__meta { margin-top: .25rem; font-family: var(--f-mono); font-size: .75rem; color: var(--text-mute); }

/* ---------- 10. LLM VISUALIZATION ---------- */
.llm { padding: clamp(1.25rem, 3vw, 2rem); overflow: hidden; }
.llm__progress { position: absolute; top: 0; left: 0; right: 0; height: 2px; background: rgba(148,163,255,.08); }
.llm__progress span { display: block; height: 100%; width: 0; background: var(--grad-warm); transition: width .5s var(--ease); box-shadow: 0 0 10px var(--violet); }
.llm__top { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; justify-content: space-between; }
.llm__form { flex: 1 1 420px; display: flex; align-items: center; gap: .6rem; padding: .4rem .4rem .4rem 1rem; border-radius: 999px; background: rgba(2,6,23,.6); border: 1px solid var(--border-strong); transition: border-color .25s, box-shadow .25s; }
.llm__form:focus-within { border-color: rgba(139,92,246,.6); box-shadow: 0 0 0 4px rgba(139,92,246,.12); }
.llm__caret { font-family: var(--f-mono); color: var(--violet); font-size: .9rem; }
.llm__form input { flex: 1; min-width: 0; background: none; border: 0; outline: none; color: var(--text); font: 500 1rem var(--f-body); padding: .5rem 0; }
.llm__presets { display: flex; flex-wrap: wrap; gap: .4rem; }
.llm__presets .chip-btn { --accent: var(--violet); }
.llm__status { display: flex; align-items: center; gap: .6rem; margin: 1.3rem 0 1rem; font-family: var(--f-mono); font-size: .76rem; color: var(--text-dim); }

.llm__flow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; counter-reset: s; }
.stage { position: relative; display: flex; flex-direction: column; min-height: 210px; padding: 1rem; border-radius: var(--r-md);
  background: rgba(2,6,23,.45); border: 1px solid var(--border); transition: border-color .4s, box-shadow .4s, opacity .4s, transform .4s var(--ease); opacity: .55; }
.stage--wide { grid-column: span 2; }
.stage.is-active { opacity: 1; border-color: rgba(139,92,246,.7); box-shadow: 0 0 0 1px rgba(139,92,246,.25), 0 20px 40px -20px rgba(139,92,246,.6); transform: translateY(-3px); }
.stage.is-done { opacity: 1; border-color: rgba(148,163,255,.2); }
.stage__head { display: flex; align-items: center; gap: .6rem; }
.stage__n { font-family: var(--f-mono); font-size: .7rem; color: var(--violet); padding: .2rem .45rem; border-radius: 6px; background: rgba(139,92,246,.12); }
.stage h3 { font-size: .95rem; font-weight: 600; }
.stage__body { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: .9rem 0; min-height: 110px; }
.stage__note { font-size: .76rem; color: var(--text-mute); }
.stage:not(:last-child)::after { content: "→"; position: absolute; right: -.95rem; top: 50%; transform: translateY(-50%); font-size: .85rem; color: var(--text-mute); z-index: 1; }
.stage:nth-child(4)::after { content: "↓"; right: 50%; top: auto; bottom: -1.15rem; transform: none; }

.q-bubble { padding: .75rem .9rem; border-radius: 14px 14px 14px 4px; background: rgba(139,92,246,.14); border: 1px solid rgba(139,92,246,.35); font-weight: 500; font-size: .92rem; }
.tokens { display: flex; flex-wrap: wrap; gap: .35rem; }
.token { padding: .3rem .5rem; border-radius: 7px; font-family: var(--f-mono); font-size: .74rem; border: 1px solid; animation: pop .4s var(--ease) both; }
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(.9); } }
.emb { display: flex; flex-direction: column; gap: .45rem; }
.emb__row { display: grid; grid-template-columns: 62px 1fr; align-items: center; gap: .5rem; animation: pop .4s var(--ease) both; }
.emb__tok { font-family: var(--f-mono); font-size: .68rem; color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.emb__bars { display: flex; align-items: center; gap: 2px; height: 22px; }
.emb__bars i { flex: 1; border-radius: 2px; }
.emb__vec { font-family: var(--f-mono); font-size: .66rem; color: var(--cyan); margin-top: .3rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.space svg { width: 100%; height: auto; overflow: visible; }
.space text { font-family: var(--f-mono); font-size: 7px; fill: var(--text-dim); }
.attn { display: grid; gap: 2px; width: min(100%, 132px); margin-inline: auto; }
.attn i { aspect-ratio: 1; border-radius: 2px; background: var(--violet); animation: pop .3s var(--ease) both; }
.attn__meta { margin-top: .5rem; font-family: var(--f-mono); font-size: .66rem; color: var(--text-mute); }
.pred { display: flex; flex-direction: column; gap: .45rem; }
.pred__row { display: grid; grid-template-columns: 72px 1fr 34px; align-items: center; gap: .5rem; font-family: var(--f-mono); font-size: .72rem; }
.pred__bar { height: 8px; border-radius: 4px; background: rgba(148,163,255,.1); overflow: hidden; }
.pred__bar span { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--grad-warm); transition: width .8s var(--ease); }
.pred__row:first-child .pred__tok { color: var(--magenta); }
.pred__pct { color: var(--text-mute); text-align: right; }
.resp { padding: .9rem 1rem; border-radius: 14px 14px 4px 14px; background: linear-gradient(135deg, rgba(34,211,238,.08), rgba(139,92,246,.1)); border: 1px solid rgba(34,211,238,.25); font-size: .93rem; min-height: 4.5em; }
.resp__cursor { display: inline-block; width: 7px; height: 1em; margin-left: 2px; vertical-align: -2px; background: var(--cyan); animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.stage__empty { font-family: var(--f-mono); font-size: .74rem; color: var(--text-mute); }
.llm__disclaimer { margin-top: 1.25rem; font-size: .76rem; color: var(--text-mute); text-align: center; }

/* ---------- 11. DATA PIPELINE ---------- */
.pipe { padding: clamp(1.25rem, 3vw, 2.25rem); }
.pipe__track { position: relative; }
.pipe__line { position: absolute; left: 6%; right: 6%; top: 34px; height: 2px; background: linear-gradient(90deg, var(--cyan), var(--blue), var(--violet), var(--magenta)); opacity: .3; border-radius: 2px; }
.pipe__line span { position: absolute; inset: -1px 0; background: repeating-linear-gradient(90deg, transparent 0 40px, rgba(255,255,255,.95) 40px 46px, transparent 46px 120px); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); animation: packets 3s linear infinite; filter: drop-shadow(0 0 4px #fff); }
@keyframes packets { to { background-position: 120px 0; } }
.pipe__nodes { position: relative; display: grid; grid-template-columns: repeat(8, 1fr); gap: .5rem; }
.pipe-node { width: 100%; display: flex; flex-direction: column; align-items: center; gap: .55rem; padding: 0 .2rem .6rem; text-align: center; border-radius: 14px; transition: transform .3s var(--ease); }
.pipe-node__icon { position: relative; display: grid; place-items: center; width: 68px; height: 68px; border-radius: 20px; font-size: 1.45rem; color: var(--accent);
  background: linear-gradient(160deg, #0f1d42, #071230); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); transition: all .35s var(--ease); }
.pipe-node__label { font-family: var(--f-display); font-weight: 600; font-size: .86rem; line-height: 1.2; }
.pipe-node__tool { font-family: var(--f-mono); font-size: .66rem; color: var(--text-mute); }
.pipe-node:hover { transform: translateY(-4px); }
.pipe-node:hover .pipe-node__icon, .pipe-node.is-active .pipe-node__icon { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 12%, transparent), 0 12px 30px -8px color-mix(in srgb, var(--accent) 70%, transparent); color: #fff; background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 40%, #0f1d42), #071230); }
.pipe-node.is-active .pipe-node__tool { color: var(--accent); }
.pipe__detail { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.25rem 2rem; margin-top: 1.8rem; padding: 1.4rem 1.6rem; border-radius: var(--r-md); background: rgba(2,6,23,.5); border: 1px solid var(--border); }
.pipe__detail-main { flex: 1 1 360px; }
.pipe__step { font-family: var(--f-mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--cyan); }
.pipe__detail h3 { margin-top: .35rem; font-size: 1.3rem; }
.pipe__detail p:last-child { margin-top: .4rem; color: var(--text-dim); font-size: .95rem; }
.pipe__tools { display: flex; flex-wrap: wrap; gap: .45rem; }
.pipe__tools li { padding: .4rem .7rem; border-radius: 8px; font-family: var(--f-mono); font-size: .76rem; background: rgba(34,211,238,.07); border: 1px solid rgba(34,211,238,.25); color: #a5f3fc; animation: pop .35s var(--ease) both; }
.pipe__chain { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin-top: 1.25rem; font-size: .8rem; }
.pipe__chain-label { font-family: var(--f-mono); font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--text-mute); }
.pipe__chain code { color: var(--text-dim); }
.pipe__chain i { font-style: normal; color: var(--violet); }

/* ---------- 12. PROJECTS ---------- */
.projects { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.project { display: flex; flex-direction: column; overflow: hidden; cursor: pointer; transition: transform .4s var(--ease), border-color .3s, box-shadow .4s; }
.project::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; background: linear-gradient(140deg, var(--accent), transparent 40%, transparent 60%, var(--accent-2));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: 0; transition: opacity .4s; pointer-events: none; }
.project:hover { transform: translateY(-6px); box-shadow: 0 30px 60px -30px color-mix(in srgb, var(--accent) 55%, transparent); }
.project:hover::before { opacity: 1; }
.project__visual { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-bottom: 1px solid var(--border);
  background: radial-gradient(120% 90% at 0% 0%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 60%), radial-gradient(90% 90% at 100% 100%, color-mix(in srgb, var(--accent-2) 18%, transparent), transparent 60%), #050d24; }
.project__visual::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(148,163,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(148,163,255,.05) 1px, transparent 1px); background-size: 22px 22px; }
.project__visual svg { position: relative; z-index: 1; width: 100%; height: 100%; transition: transform .6s var(--ease); }
.project:hover .project__visual svg { transform: scale(1.04); }
.project__body { display: flex; flex-direction: column; flex: 1; padding: 1.5rem; }
.project__cat { font-family: var(--f-mono); font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
.project__title { margin-top: .5rem; font-size: 1.3rem; }
.project__desc { margin-top: .6rem; color: var(--text-dim); font-size: .93rem; }
.project__meta { display: grid; gap: .6rem; margin-top: 1.1rem; padding: .9rem 1rem; border-radius: 12px; background: rgba(2,6,23,.4); border: 1px solid var(--border); }
.project__meta dt { font-family: var(--f-mono); font-size: .64rem; letter-spacing: .14em; text-transform: uppercase; color: var(--text-mute); }
.project__meta dd { font-size: .86rem; color: var(--text); }
.project__stack { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: 1rem; }
.project__stack li { padding: .28rem .55rem; border-radius: 6px; font-family: var(--f-mono); font-size: .7rem; color: var(--text-dim); background: color-mix(in srgb, var(--accent) 8%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent); }
.project__actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: auto; padding-top: 1.3rem; }

.project--wide { grid-column: span 2; flex-direction: row; }
.project--wide .project__visual { flex: 0 0 46%; aspect-ratio: auto; border-bottom: 0; border-right: 1px solid var(--border); }
.project--full { grid-column: 1 / -1; flex-direction: row-reverse; }
.project--full .project__visual { flex: 0 0 52%; aspect-ratio: auto; min-height: 260px; border-bottom: 0; border-left: 1px solid var(--border); }
.project--full .project__meta { grid-template-columns: 1fr 1fr; }

/* project visual animations */
.pv-float { animation: bob 6s ease-in-out infinite; }
.pv-dash { stroke-dasharray: 6 10; animation: dash 6s linear infinite; }
.pv-draw { stroke-dasharray: 320; animation: draw 4s var(--ease) infinite alternate; }
@keyframes draw { from { stroke-dashoffset: 320; } to { stroke-dashoffset: 0; } }
.pv-bars rect { transform-box: fill-box; transform-origin: bottom; animation: grow 3.5s var(--ease) infinite alternate; }
.pv-bars rect:nth-child(2n) { animation-delay: -1.2s; }
.pv-bars rect:nth-child(3n) { animation-delay: -2.1s; }
@keyframes grow { from { transform: scaleY(.55); } }
.pv-spin { transform-origin: 160px 90px; animation: spin 6s linear infinite; }

/* ---------- 13. MODAL ---------- */
.modal { width: min(920px, calc(100% - 2rem)); max-height: calc(100dvh - 3rem); padding: 0; border: 0; border-radius: var(--r-lg); background: transparent; color: var(--text); overflow: visible; }
.modal::backdrop { background: rgba(2,6,23,.75); backdrop-filter: blur(6px); }
.modal[open] { animation: modal-in .45s var(--ease); }
@keyframes modal-in { from { opacity: 0; transform: translateY(20px) scale(.98); } }
.modal__inner { position: relative; max-height: calc(100dvh - 3rem); overflow-y: auto; border-radius: var(--r-lg); background: linear-gradient(170deg, #0c1838, #050c22); border: 1px solid var(--border-strong); box-shadow: 0 40px 100px -20px rgba(0,0,0,.9); }
.modal__close { position: sticky; top: 1rem; float: right; margin: 1rem 1rem 0 0; z-index: 3; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: rgba(255,255,255,.06); border: 1px solid var(--border-strong); transition: background .2s, transform .3s var(--ease); }
.modal__close:hover { background: rgba(255,255,255,.12); transform: rotate(90deg); }
.m-hero { padding: 2rem clamp(1.25rem, 4vw, 2.5rem) 1.5rem; background: radial-gradient(80% 140% at 0% 0%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 60%); border-bottom: 1px solid var(--border); }
.m-hero h2 { margin-top: .5rem; font-size: clamp(1.6rem, 3.5vw, 2.2rem); }
.m-hero p.m-lead { margin-top: .8rem; color: var(--text-dim); max-width: 640px; }
.m-body { padding: 1.75rem clamp(1.25rem, 4vw, 2.5rem) 2.25rem; display: grid; gap: 1.75rem; }
.m-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.m-block { padding: 1.1rem 1.2rem; border-radius: var(--r-md); background: rgba(255,255,255,.025); border: 1px solid var(--border); }
.m-block h3, .m-label { font-family: var(--f-mono); font-size: .7rem; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); margin-bottom: .5rem; }
.m-block p, .m-block li { color: var(--text-dim); font-size: .93rem; }
.m-list li { position: relative; padding-left: 1.1rem; margin-top: .3rem; }
.m-list li::before { content: "›"; position: absolute; left: 0; color: var(--accent); }
.m-block .project__stack { margin-top: .2rem; }
.arch { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; padding: 1.25rem; border-radius: var(--r-md); background: rgba(2,6,23,.6); border: 1px solid var(--border);
  background-image: linear-gradient(rgba(148,163,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(148,163,255,.04) 1px, transparent 1px); background-size: 20px 20px; }
.arch__node { padding: .55rem .8rem; border-radius: 10px; font-family: var(--f-mono); font-size: .76rem; background: #0b1636; border: 1px solid color-mix(in srgb, var(--c) 50%, transparent); color: var(--text); box-shadow: 0 0 18px -6px var(--c); animation: pop .4s var(--ease) both; }
.arch__arrow { position: relative; width: 26px; height: 2px; background: rgba(148,163,255,.2); overflow: hidden; }
.arch__arrow::after { content: ""; position: absolute; top: 0; left: -10px; width: 10px; height: 100%; background: var(--cyan); animation: travel 1.6s linear infinite; }
@keyframes travel { to { left: 100%; } }
.m-actions { display: flex; flex-wrap: wrap; gap: .6rem; }

/* ---------- 14. TIMELINE ---------- */
.timeline { position: relative; display: grid; grid-template-columns: repeat(5, 1fr); gap: 1rem; padding-top: 2.5rem; }
.timeline::before { content: ""; position: absolute; top: 9px; left: 10%; right: 10%; height: 2px; background: rgba(148,163,255,.12); }
.timeline::after { content: ""; position: absolute; top: 9px; left: 10%; height: 2px; width: calc(80% * var(--progress, 0)); background: linear-gradient(90deg, var(--cyan), var(--violet), var(--magenta)); box-shadow: 0 0 10px rgba(139,92,246,.6); transition: width .2s linear; }
.milestone { position: relative; display: flex; flex-direction: column; align-items: center; }
.milestone__dot { position: absolute; top: -2.5rem; width: 20px; height: 20px; border-radius: 50%; background: var(--bg-0); border: 2px solid var(--accent); z-index: 1; box-shadow: 0 0 0 5px rgba(2,6,23,1); }
.milestone__dot::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--accent); transform: scale(0); transition: transform .5s var(--ease) .2s; box-shadow: 0 0 12px var(--accent); }
.milestone.is-in .milestone__dot::after { transform: scale(1); }
.milestone--now .milestone__dot::before { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 1px solid var(--accent); animation: ping 2s var(--ease) infinite; }
.milestone__card { width: 100%; padding: 1.25rem; border-radius: var(--r-md); transition: transform .35s var(--ease), border-color .3s; }
.milestone__card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.milestone__year { font-family: var(--f-mono); font-size: .76rem; color: var(--accent); }
.milestone h3 { display: flex; align-items: center; gap: .5rem; margin-top: .5rem; font-size: 1.1rem; }
.milestone h3 .i { color: var(--accent); }
.milestone p { margin-top: .5rem; font-size: .88rem; color: var(--text-dim); }
.milestone__ach { font-size: .82rem !important; }
.milestone .mini-tags { margin-top: .85rem; }

/* ---------- 15. EDUCATION ---------- */
.edu { display: grid; grid-template-columns: 1.1fr 1fr; gap: 1.25rem; }
.edu__main { display: flex; gap: 1.25rem; padding: 1.75rem; }
.edu__icon, .cert__icon { display: grid; place-items: center; flex-shrink: 0; width: 52px; height: 52px; border-radius: 14px; font-size: 1.4rem; color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); }
.edu__period { font-family: var(--f-mono); font-size: .76rem; color: var(--text-mute); }
.edu__main h3 { margin-top: .6rem; font-size: 1.35rem; }
.edu__school { margin-top: .5rem; color: var(--text-dim); }
.edu__course { margin-top: 1rem; font-size: .9rem; color: var(--text-dim); }
.certs { display: grid; gap: .9rem; }
.cert { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.1rem; border-radius: var(--r-md); transition: border-color .3s, transform .3s var(--ease); }
.cert:hover { border-color: color-mix(in srgb, var(--accent) 45%, transparent); transform: translateX(4px); }
.cert__icon { width: 42px; height: 42px; font-size: 1.15rem; border-radius: 12px; }
.cert > div { flex: 1; min-width: 0; }
.cert h3 { font-size: 1rem; }
.cert p { margin-top: .3rem; font-size: .82rem; color: var(--text-mute); }
.cert__link { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; color: var(--text-dim); border: 1px solid var(--border); transition: color .2s, border-color .2s; }
.cert__link:hover { color: var(--text); border-color: var(--accent); }

/* ---------- 16. GITHUB ---------- */
.gh { display: grid; grid-template-columns: 300px 1fr; gap: 1.25rem; align-items: start; }
.gh__profile { padding: 1.75rem; text-align: center; position: sticky; top: 100px; }
.gh__avatar { display: grid; place-items: center; width: 96px; height: 96px; margin: 0 auto; border-radius: 50%; font-family: var(--f-display); font-weight: 700; font-size: 1.8rem; overflow: hidden;
  background: radial-gradient(circle at 30% 30%, #1d2c63, #071233); box-shadow: 0 0 0 3px var(--bg-1), 0 0 0 5px rgba(139,92,246,.5), 0 0 40px -6px rgba(59,130,246,.6); }
.gh__avatar img { width: 100%; height: 100%; object-fit: cover; }
.gh__name { margin-top: 1.1rem; font-size: 1.2rem; }
.gh__handle { margin-top: .3rem; font-family: var(--f-mono); font-size: .82rem; color: var(--text-mute); }
.gh__bio { margin-top: .8rem; font-size: .88rem; color: var(--text-dim); }
.gh__stats { display: grid; grid-template-columns: repeat(3, 1fr); margin: 1.4rem 0; padding: .9rem 0; border-block: 1px solid var(--border); }
.gh__stats dt { font-size: .7rem; color: var(--text-mute); }
.gh__stats dd { font-family: var(--f-display); font-weight: 600; font-size: 1.2rem; }
.gh__main { display: grid; gap: 1.25rem; min-width: 0; }
.gh__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.gh__panel { padding: 1.4rem; border-radius: var(--r-md); min-width: 0; }
.gh__panel-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.gh__panel-head h3 { font-size: 1rem; }
.gh__note { font-family: var(--f-mono); font-size: .7rem; color: var(--text-mute); }
.contrib { display: grid; grid-template-rows: repeat(7, 1fr); grid-auto-flow: column; grid-auto-columns: 1fr; gap: 3px; overflow: hidden; position: relative; }
.contrib i { aspect-ratio: 1; border-radius: 2px; background: rgba(148,163,255,.07); }
.contrib.is-empty i { animation: shimmer 3s ease-in-out infinite; animation-delay: calc(var(--d) * 25ms); }
@keyframes shimmer { 50% { background: rgba(148,163,255,.14); } }
.contrib img { grid-row: 1 / -1; grid-column: 1 / -1; width: 100%; }
.contrib__legend { display: flex; align-items: center; justify-content: flex-end; gap: 3px; margin-top: .8rem; font-size: .7rem; color: var(--text-mute); }
.contrib__legend i { width: 10px; height: 10px; border-radius: 2px; background: rgba(34,211,238,.1); }
.contrib__legend i:nth-child(2) { background: rgba(34,211,238,.3); } .contrib__legend i:nth-child(3) { background: rgba(59,130,246,.55); } .contrib__legend i:nth-child(4) { background: rgba(139,92,246,.75); } .contrib__legend i:nth-child(5) { background: var(--violet); }
.langbar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; gap: 2px; margin-bottom: 1rem; }
.langbar span { width: var(--w); background: var(--c); transition: width .8s var(--ease); }
.langs { display: flex; flex-wrap: wrap; gap: .5rem 1rem; }
.langs li { display: flex; align-items: center; gap: .45rem; font-size: .84rem; color: var(--text-dim); }
.langs li::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.langs b { font-weight: 500; color: var(--text-mute); font-family: var(--f-mono); font-size: .74rem; }
.repos { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.repo { display: flex; gap: .9rem; padding: 1.1rem 1.2rem; border-radius: var(--r-md); transition: border-color .3s, transform .3s var(--ease); }
.repo:hover { border-color: rgba(139,92,246,.45); transform: translateY(-3px); }
.repo > .i { color: var(--text-mute); margin-top: .2rem; }
.repo > div { min-width: 0; }
.repo h4 { font-size: .95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.repo h4 a:hover { color: var(--cyan); }
.repo p { margin-top: .3rem; font-size: .84rem; color: var(--text-dim); }
.repo__lang { display: inline-flex; align-items: center; gap: .35rem; margin-top: .6rem; font-size: .74rem; color: var(--text-mute); }
.repo__lang::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c); }

/* ---------- 17. SKILLS MATRIX ---------- */
.legend { display: flex; justify-content: center; gap: 1.5rem; margin-top: 1.5rem; font-size: .82rem; color: var(--text-dim); }
.legend li { display: flex; align-items: center; gap: .5rem; }
.lvl { display: inline-flex; gap: 3px; --accent: var(--cyan); }
.lvl i { width: 7px; height: 7px; border-radius: 50%; border: 1px solid color-mix(in srgb, var(--accent) 70%, transparent); }
.lvl--3 i, .lvl--2 i:nth-child(-n+2), .lvl--1 i:first-child { background: var(--accent); box-shadow: 0 0 6px var(--accent); }
.matrix { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1rem; }
.mcol { padding: 1.4rem 1.2rem; border-radius: var(--r-md); transition: transform .35s var(--ease), border-color .3s; }
.mcol:hover { transform: translateY(-5px); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.mcol__head { display: flex; flex-direction: column; align-items: center; gap: .8rem; padding-bottom: 1.2rem; margin-bottom: .6rem; border-bottom: 1px solid var(--border); }
.mcol__ring { position: relative; display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; font-size: 1.4rem; color: var(--accent);
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%); }
.mcol__ring::before { content: ""; position: absolute; inset: 0; border-radius: 50%; padding: 2px; background: conic-gradient(var(--accent) calc(var(--fill, 0) * 1turn), rgba(148,163,255,.12) 0);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
@property --fill { syntax: "<number>"; initial-value: 0; inherits: true; }
.mcol__ring { transition: --fill 1.4s var(--ease) .2s; }
.mcol.is-in .mcol__ring { --fill: var(--target, .6); }
.mcol h3 { font-size: .9rem; letter-spacing: .2em; text-transform: uppercase; font-family: var(--f-mono); font-weight: 500; }
.skills li { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .6rem 0; font-size: .86rem; color: var(--text-dim); border-bottom: 1px dashed rgba(148,163,255,.08); }
.skills li:last-child { border-bottom: 0; }
.skills li::after { content: ""; flex-shrink: 0; width: 31px; height: 7px;
  background: radial-gradient(circle 3.5px at 3.5px 50%, var(--d1) 98%, transparent) 0 0 / 12px 7px no-repeat,
              radial-gradient(circle 3.5px at 3.5px 50%, var(--d2) 98%, transparent) 12px 0 / 12px 7px no-repeat,
              radial-gradient(circle 3.5px at 3.5px 50%, var(--d3) 98%, transparent) 24px 0 / 12px 7px no-repeat; }
.skills li { --off: rgba(148,163,255,.18); --d1: var(--off); --d2: var(--off); --d3: var(--off); }
.skills li[data-level="1"] { --d1: var(--accent); }
.skills li[data-level="2"] { --d1: var(--accent); --d2: var(--accent); }
.skills li[data-level="3"] { --d1: var(--accent); --d2: var(--accent); --d3: var(--accent); color: var(--text); }

/* ---------- 18. METRICS ---------- */
.metrics { display: grid; grid-template-columns: repeat(5, 1fr); padding: 0; overflow: hidden; }
.metric { position: relative; display: flex; flex-direction: column; align-items: center; gap: .4rem; padding: 2rem 1rem; text-align: center; }
.metric + .metric::before { content: ""; position: absolute; left: 0; top: 25%; bottom: 25%; width: 1px; background: var(--border); }
.metric::after { content: ""; position: absolute; left: 30%; right: 30%; bottom: 0; height: 2px; background: var(--accent); opacity: .6; border-radius: 2px; box-shadow: 0 0 12px var(--accent); }
.metric__value { font-family: var(--f-display); font-weight: 700; font-size: clamp(1.8rem, 3.5vw, 2.6rem); line-height: 1; min-height: 1em; display: flex; align-items: center; }
.metric__value .ph { font-size: .5em; }
.metric__label { font-size: .82rem; color: var(--text-dim); }

/* ---------- 19. VIDEO ---------- */
.video { position: relative; aspect-ratio: 21 / 9; border-radius: 28px; overflow: hidden; border: 1px solid var(--border-strong); box-shadow: 0 50px 100px -40px rgba(59,130,246,.45); isolation: isolate; }
.video::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.06) 45%, transparent 60%); background-size: 250% 100%; animation: sheen 7s ease-in-out infinite; }
@keyframes sheen { 0% { background-position: 130% 0; } 60%, 100% { background-position: -30% 0; } }
.video__poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.aurora { animation: aurora 12s ease-in-out infinite alternate; transform-origin: center; }
@keyframes aurora { to { transform: translateX(-60px) scaleY(1.2); opacity: .7; } }
.video__shade { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(2,6,23,.85), transparent 55%); }
.video__play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: grid; place-items: center; width: 92px; height: 92px; border-radius: 50%; font-size: 1.8rem; color: #fff;
  background: linear-gradient(135deg, rgba(59,130,246,.9), rgba(139,92,246,.9)); box-shadow: 0 20px 50px -10px rgba(139,92,246,.8), inset 0 1px 0 rgba(255,255,255,.3); transition: transform .35s var(--ease); }
.video__play .i { margin-left: 4px; width: 1.4em; height: 1.4em; }
.video__play:hover { transform: translate(-50%, -50%) scale(1.08); }
.video__play-ring { position: absolute; inset: -10px; border-radius: 50%; border: 1px solid rgba(255,255,255,.35); animation: ping 2.4s var(--ease) infinite; }
.video__meta { position: absolute; left: clamp(1rem, 3vw, 2rem); right: clamp(1rem, 3vw, 2rem); bottom: clamp(1rem, 3vw, 1.75rem); display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.video__chip { display: inline-flex; align-items: center; gap: .4rem; padding: .4rem .75rem; border-radius: 999px; background: rgba(2,6,23,.6); border: 1px solid var(--border-strong); font-family: var(--f-mono); font-size: .76rem; backdrop-filter: blur(8px); }
.video__caption { font-family: var(--f-display); font-weight: 500; color: var(--text-dim); }
.video video, .video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; z-index: 2; object-fit: contain; }

/* ---------- 20. CONTACT ---------- */
.contact { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(2rem, 5vw, 4rem); padding: clamp(1.75rem, 5vw, 3.5rem); overflow: hidden; border-radius: 32px; }
.contact::before { content: ""; position: absolute; width: 480px; height: 480px; left: -160px; bottom: -220px; border-radius: 50%; background: var(--violet); filter: blur(120px); opacity: .25; pointer-events: none; }
.contact::after { content: ""; position: absolute; width: 380px; height: 380px; right: -120px; top: -180px; border-radius: 50%; background: var(--cyan); filter: blur(120px); opacity: .14; pointer-events: none; }
.contact__copy, .form { position: relative; z-index: 1; }
.contact .sec-title { font-size: clamp(2rem, 4.4vw, 3.1rem); }
.contact__links { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 2rem; }
.contact__sig { margin-top: 2.5rem; font-family: var(--f-mono); font-size: .74rem; letter-spacing: .2em; text-transform: uppercase; color: var(--text-mute); }
.contact__sig i { font-style: normal; color: var(--violet); }
.form { display: grid; gap: 1rem; align-content: start; }
.field label { display: block; margin-bottom: .45rem; font-size: .84rem; font-weight: 500; color: var(--text-dim); }
.field input, .field textarea { width: 100%; padding: .85rem 1rem; border-radius: 12px; background: rgba(2,6,23,.55); border: 1px solid var(--border-strong); color: var(--text); font: inherit; font-size: .95rem; resize: vertical; transition: border-color .25s, box-shadow .25s; }
.field input::placeholder, .field textarea::placeholder { color: var(--text-mute); }
.field input:focus, .field textarea:focus { outline: none; border-color: rgba(34,211,238,.6); box-shadow: 0 0 0 4px rgba(34,211,238,.1); }
.field.has-error input, .field.has-error textarea { border-color: rgba(244,63,94,.7); }
.field__err { min-height: 1.1em; margin-top: .3rem; font-size: .78rem; color: #fb7185; }
.form__ok { min-height: 1.2em; font-size: .88rem; color: #6ee7b7; text-align: center; }

/* ---------- 21. FOOTER ---------- */
.footer { position: relative; padding: 3rem 0 2.25rem; border-top: 1px solid var(--border); background: linear-gradient(180deg, transparent, rgba(2,6,23,.8)); }
.footer::before { content: ""; position: absolute; top: -1px; left: 50%; width: 40%; height: 1px; transform: translateX(-50%); background: var(--grad-signature); opacity: .7; }
.footer__top { display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.footer__sig { display: flex; align-items: center; gap: .6rem; font-family: var(--f-mono); font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; color: var(--text-dim); }
.footer__sig li { display: flex; align-items: center; gap: .45rem; }
.footer__sig li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.footer__sig li + li { padding-left: .6rem; }
.footer__links { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; }
.footer__links a { display: inline-flex; align-items: center; gap: .45rem; font-size: .88rem; color: var(--text-dim); transition: color .2s; }
.footer__links a:hover { color: var(--text); }
.footer__copy { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--border); font-size: .82rem; color: var(--text-mute); text-align: center; }

/* ---------- 22. TOAST ---------- */
.toast { position: fixed; left: 50%; bottom: 1.5rem; z-index: 400; max-width: calc(100% - 2rem); padding: .8rem 1.1rem; border-radius: 12px; background: #0d1838; border: 1px solid var(--border-strong); box-shadow: var(--shadow);
  font-size: .86rem; transform: translate(-50%, 140%); opacity: 0; transition: transform .4s var(--ease), opacity .4s; pointer-events: none; }
.toast.is-on { transform: translate(-50%, 0); opacity: 1; }
.toast code { color: #fbbf24; }

/* ---------- 23. REVEAL ON SCROLL ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: var(--delay, 0s); }
.reveal.is-in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- 24. RESPONSIVE ---------- */
@media (max-width: 1100px) {
  .nav__links { gap: 0; }
  .nav__link { padding: .5rem .6rem; }
  .matrix { grid-template-columns: repeat(3, 1fr); }
  .llm__flow { grid-template-columns: repeat(2, 1fr); }
  .stage--wide { grid-column: span 2; }
  .stage::after { display: none; }
  .pipe__nodes { grid-template-columns: repeat(4, 1fr); row-gap: 1.5rem; }
  .pipe__line { display: none; }
}

@media (max-width: 960px) {
  /* Mobile navigation */
  .nav__toggle { display: block; }
  .nav__cta { display: none; }
  .nav__links { position: fixed; inset: 76px 0 auto 0; flex-direction: column; align-items: stretch; gap: .25rem; padding: 1rem var(--gutter) 1.5rem;
    background: rgba(4,10,28,.96); backdrop-filter: blur(16px); border-bottom: 1px solid var(--border);
    transform: translateY(-12px); opacity: 0; visibility: hidden; transition: all .3s var(--ease); }
  .nav__links.is-open { transform: none; opacity: 1; visibility: visible; }
  .nav__link { padding: .85rem 1rem; font-size: 1rem; border-radius: 12px; }
  .nav__link.is-active { background: rgba(34,211,238,.07); }
  .nav__link::after { left: auto; right: 1rem; top: 50%; bottom: auto; transform: translateY(-50%) scale(0); }
  .nav__link.is-active::after { transform: translateY(-50%) scale(1); }
  .nav__cta-mobile { display: inline-flex; margin-top: .75rem; }

  .hero__grid { grid-template-columns: 1fr; }
  .hero__visual { order: -1; margin-bottom: 1rem; }
  .portrait { width: min(78%, 340px); }
  .annotation { left: 0; top: -40px; font-size: 1.35rem; }
  .hero__visual { margin-top: 2.5rem; }

  .about { grid-template-columns: 1fr; gap: 0; }
  .pillars { grid-template-columns: 1fr; }

  .constellation { grid-template-columns: 1fr 1fr; gap: 1rem; }
  .constellation__lines { display: none; }
  .core { grid-column: 1 / -1; grid-row: 1; flex-direction: row; gap: 1.4rem; justify-content: center; text-align: left; margin-bottom: 1rem; }
  .core__orb { width: 84px; height: 84px; }
  .core__mark { font-size: 1.4rem; }
  .core__ring--2 { inset: -20px; }
  .core__label { margin-top: 0; }
  .domain--prog, .domain--data, .domain--viz, .domain--ml, .domain--ai, .domain--ops { grid-column: auto; grid-row: auto; }

  .projects { grid-template-columns: 1fr 1fr; }
  .project--wide, .project--full { grid-column: 1 / -1; }

  .timeline { grid-template-columns: 1fr; padding-top: 0; padding-left: 2.5rem; gap: 1.25rem; }
  .timeline::before, .timeline::after { top: 0; bottom: 0; left: 9px; right: auto; width: 2px; height: auto; }
  .timeline::after { height: calc(100% * var(--progress, 0)); bottom: auto; width: 2px; }
  .milestone { align-items: stretch; }
  .milestone__dot { top: 1.3rem; left: -2.5rem; }

  .edu { grid-template-columns: 1fr; }
  .gh { grid-template-columns: 1fr; }
  .gh__profile { position: static; }
  .metrics { grid-template-columns: repeat(3, 1fr); }
  .metric:nth-child(4)::before { display: none; }
  .contact { grid-template-columns: 1fr; }
  .video { aspect-ratio: 16 / 9; }
}

@media (max-width: 680px) {
  .float-tag--1 { left: -4%; } .float-tag--3 { left: -6%; }
  .float-tag--2 { right: -6%; } .float-tag--4 { right: -4%; }
  .flowline__nodes li { font-size: .62rem; letter-spacing: .12em; }

  .constellation { grid-template-columns: 1fr; }
  .core { flex-direction: column; text-align: center; gap: .5rem; }
  .core__label { margin-top: 1.6rem; }

  .llm__flow { grid-template-columns: 1fr; }
  .stage--wide { grid-column: auto; }
  .stage { min-height: 0; }
  .llm__form { flex-basis: 100%; }
  .llm__form .btn { padding-inline: .8rem; }

  .pipe__nodes { grid-template-columns: repeat(2, 1fr); }
  .pipe__detail { padding: 1.1rem; }

  .projects { grid-template-columns: 1fr; }
  .project--wide, .project--full { flex-direction: column; }
  .project--wide .project__visual, .project--full .project__visual { flex: none; aspect-ratio: 16 / 9; min-height: 0; border: 0; border-bottom: 1px solid var(--border); }
  .project--full .project__meta { grid-template-columns: 1fr; }

  .m-grid { grid-template-columns: 1fr; }
  .gh__row, .repos { grid-template-columns: 1fr; }
  .matrix { grid-template-columns: 1fr 1fr; }
  .metrics { grid-template-columns: 1fr 1fr; }
  .metric:nth-child(odd)::before { display: none; }
  .metric:nth-child(4)::before { display: block; }
  .metric:last-child { grid-column: 1 / -1; }
  .video { aspect-ratio: 4 / 3; border-radius: 20px; }
  .video__play { width: 72px; height: 72px; }
  .video__caption { font-size: .85rem; }
  .footer__top { flex-direction: column; text-align: center; }
  .footer__links { justify-content: center; }
  .legend { gap: 1rem; flex-wrap: wrap; }
}

@media (max-width: 420px) {
  .brand__role { display: none; }
  .hero__actions .btn { width: 100%; }
  .matrix { grid-template-columns: 1fr; }
}

/* ---------- 25. REDUCED MOTION ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1; transform: none; }
  .cursor-glow { display: none; }
}
