/* ============================================================
   HIMAL PAUDEL — PORTFOLIO
   Dark neon glassmorphism theme · Cloudflare Pages ready
   ============================================================ */

/* ---------- Reset & tokens ---------- */
*,
*::before,
*::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg-deep: #050816;
  --bg-navy: #0F172A;
  --primary: #8B5CF6;
  --secondary: #3B82F6;
  --accent: #06B6D4;
  --text: #FFFFFF;
  --muted: #CBD5E1;
  --muted-2: #7C8BA5;

  --glass-bg: rgba(255, 255, 255, 0.04);
  --glass-brd: rgba(255, 255, 255, 0.09);
  --glass-blur: 20px;

  --grad: linear-gradient(135deg, var(--primary), var(--secondary) 55%, var(--accent));
  --shadow-lg: 0 24px 60px rgba(2, 6, 23, 0.55);
  --r-lg: 24px;
  --r-md: 16px;
  --nav-h: 76px;

  --font-head: "Sora", sans-serif;
  --font-body: "Inter", sans-serif;
  --font-mono: "JetBrains Mono", monospace;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

/* touch devices / small screens: heavy backdrop blur is a scroll-killer */
@media (pointer: coarse), (max-width: 768px) {
  :root { --glass-blur: 6px; }
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
}

body {
  font-family: var(--font-body);
  color: var(--muted);
  background:
    radial-gradient(1100px 700px at 85% -10%, rgba(59, 130, 246, 0.10), transparent 60%),
    radial-gradient(900px 600px at -15% 30%, rgba(139, 92, 246, 0.10), transparent 60%),
    linear-gradient(180deg, var(--bg-deep) 0%, #081020 40%, var(--bg-navy) 100%);
  background-attachment: fixed;
  overflow-x: hidden;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

body.loading { overflow: hidden; }

img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font-family: inherit; border: none; background: none; cursor: pointer; color: inherit; }
input, textarea { font-family: inherit; }

::selection { background: rgba(139, 92, 246, 0.45); color: #fff; }

::-webkit-scrollbar { width: 9px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--primary), var(--secondary));
  border-radius: 99px;
}

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

/* ---------- Utilities ---------- */
.container {
  width: min(1180px, 100% - clamp(40px, 8vw, 80px));
  margin-inline: auto;
}

.section { position: relative; z-index: 2; padding-block: clamp(84px, 12vh, 140px); }

.mono { font-family: var(--font-mono); letter-spacing: 0.02em; }

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-brd);
  border-radius: var(--r-lg);
  backdrop-filter: blur(var(--glass-blur)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(150%);
  box-shadow: var(--shadow-lg);
}

.card {
  position: relative;
  background: linear-gradient(160deg, rgba(255,255,255,0.055), rgba(255,255,255,0.02) 55%);
  border: 1px solid var(--glass-brd);
  border-radius: var(--r-lg);
  backdrop-filter: blur(var(--glass-blur)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(150%);
  box-shadow: var(--shadow-lg);
  transition: transform 0.35s var(--ease-out), border-color 0.35s ease, box-shadow 0.35s ease;
}

.card:hover {
  border-color: rgba(139, 92, 246, 0.45);
  box-shadow:
    0 24px 60px rgba(2, 6, 23, 0.55),
    0 0 42px rgba(139, 92, 246, 0.14),
    inset 0 0 0 1px rgba(139, 92, 246, 0.08);
}

/* Animated RGB gradient border on every card */
.card::before {
  content: '';
  position: absolute;
  inset: -1px;
  z-index: 2;
  border-radius: inherit;
  padding: 1.5px;
  background: linear-gradient(90deg, #ff004c, #ff8a00, #ffe600, #22ff66, #00e5ff, #2979ff, #c85eff, #ff004c);
  background-size: 600% 100%;
  animation: rgbFlow 5s linear infinite;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
          mask-composite: exclude;
  pointer-events: none;
}

@keyframes rgbFlow {
  to { background-position: 600% 0; }
}

/* project cards clip their corners (overflow:hidden) — keep the ring
   fully inside the box so all 4 sides stay visible */
.project-card::before { inset: 0; }

.rgb-text {
  font-weight: 700;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, #ff004c, #ff8a00, #ffe600, #22ff66, #00e5ff, #2979ff, #c85eff, #ff004c);
  background-size: 600% 100%;
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent !important;
  animation: rgbFlow 3.5s linear infinite;
}

/* Section headers */
.section-head { text-align: center; margin-bottom: clamp(48px, 7vw, 72px); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  color: var(--accent);
  margin-bottom: 14px;
}
.eyebrow::before,
.eyebrow::after {
  content: "";
  width: 34px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent));
}
.eyebrow::after { background: linear-gradient(90deg, var(--accent), transparent); }

.section-head h2 {
  font-family: var(--font-head);
  font-size: clamp(1.9rem, 4.6vw, 3rem);
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1.12;
}

.head-desc {
  max-width: 620px;
  margin: 16px auto 0;
  font-size: clamp(0.95rem, 1.6vw, 1.05rem);
}

/* ---------- Buttons ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 30px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  white-space: nowrap;
  transition: transform 0.25s var(--ease-out), box-shadow 0.3s ease, background 0.3s ease, border-color 0.3s ease;
  will-change: transform;
  overflow: hidden;
}

.btn-sm { padding: 10px 22px; font-size: 0.86rem; }
.btn-block { width: 100%; }

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  box-shadow: 0 10px 30px rgba(139, 92, 246, 0.38);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 44px rgba(139, 92, 246, 0.5), 0 0 0 1px rgba(139,92,246,.35);
}
.btn-primary::after {
  content: "";
  position: absolute; top: 0; left: -80%;
  width: 50%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,0.35), transparent);
  transform: skewX(-20deg);
  transition: left 0.6s ease;
}
.btn-primary:hover::after { left: 130%; }

.btn-outline {
  border: 1px solid rgba(139, 92, 246, 0.55);
  color: var(--text);
  background: rgba(139, 92, 246, 0.07);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.btn-outline:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  background: rgba(139, 92, 246, 0.16);
  box-shadow: 0 12px 34px rgba(139, 92, 246, 0.25);
}

.btn-ghost {
  border: 1px solid var(--glass-brd);
  background: rgba(255,255,255,0.04);
  color: var(--muted);
}
.btn-ghost:hover {
  color: #fff;
  border-color: rgba(255,255,255,0.28);
  background: rgba(255,255,255,0.08);
  transform: translateY(-2px);
}

.btn-glow { animation: pulseGlow 2.6s ease-in-out infinite; }

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 10px 30px rgba(139, 92, 246, 0.38); }
  50%      { box-shadow: 0 10px 42px rgba(139, 92, 246, 0.62); }
}

/* ---------- Preloader ---------- */
#preloader {
  position: fixed; inset: 0;
  z-index: 10000;
  display: grid; place-items: center;
  background:
    radial-gradient(700px 420px at 50% 38%, rgba(139, 92, 246, 0.12), transparent 70%),
    var(--bg-deep);
  transition: opacity 0.6s ease, visibility 0.6s ease;
  animation: preSafety 0s 3s forwards; /* JS-fail safety */
}
@keyframes preSafety { to { opacity: 0; visibility: hidden; } }
#preloader.done { opacity: 0; visibility: hidden; pointer-events: none; }

.pre-inner { display: grid; justify-items: center; gap: 22px; }

.pre-photo {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(139, 92, 246, 0.6);
  animation: prePulse 1.5s ease-in-out infinite;
}
@keyframes prePulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 26px rgba(139, 92, 246, 0.35); }
  50%      { transform: scale(1.07); box-shadow: 0 0 48px rgba(139, 92, 246, 0.65); }
}
.pre-name {
  font-family: var(--font-head);
  font-size: clamp(1.7rem, 5vw, 2.4rem);
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #fff;
}

.pre-bar {
  width: min(240px, 60vw);
  height: 3px;
  border-radius: 99px;
  background: rgba(255,255,255,0.09);
  overflow: hidden;
}
.pre-bar i {
  display: block; height: 100%; width: 0%;
  border-radius: inherit;
  background: var(--grad);
  box-shadow: 0 0 18px rgba(139, 92, 246, 0.8);
  transition: width 0.12s linear;
}

.pre-count { font-family: var(--font-mono); font-size: 0.82rem; color: var(--muted-2); }

/* ---------- Ambient background ---------- */
#particles {
  position: fixed; inset: 0;
  z-index: 0;
  pointer-events: none;
}

.orbs { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.5;
  will-change: transform;
}
.orb-1 {
  width: 520px; height: 520px; top: -160px; left: -140px;
  background: radial-gradient(circle, rgba(139,92,246,0.32), transparent 65%);
  animation: drift1 22s ease-in-out infinite alternate;
}
.orb-2 {
  width: 460px; height: 460px; top: 32%; right: -180px;
  background: radial-gradient(circle, rgba(59,130,246,0.28), transparent 65%);
  animation: drift2 26s ease-in-out infinite alternate;
}
.orb-3 {
  width: 480px; height: 480px; bottom: -200px; left: 24%;
  background: radial-gradient(circle, rgba(6,182,212,0.22), transparent 65%);
  animation: drift3 30s ease-in-out infinite alternate;
}
@keyframes drift1 { to { transform: translate(90px, 70px) scale(1.15); } }
@keyframes drift2 { to { transform: translate(-80px, -60px) scale(0.92); } }
@keyframes drift3 { to { transform: translate(60px, -80px) scale(1.1); } }

.grain {
  position: fixed; inset: 0;
  z-index: 5;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
}

/* ---------- Cursor glow ---------- */
.cursor-glow {
  position: fixed;
  top: 0; left: 0;
  width: 420px; height: 420px;
  z-index: 60;
  pointer-events: none;
  border-radius: 50%;
  background: radial-gradient(circle,
    rgba(139, 92, 246, 0.17) 0%,
    rgba(59, 130, 246, 0.09) 38%,
    transparent 70%);
  mix-blend-mode: screen;
  opacity: 0;
  transition: opacity 0.5s ease;
  will-change: transform;
}
.cursor-glow.on { opacity: 1; }

@media (pointer: coarse) { .cursor-glow { display: none; } }

/* ---------- Skip link ---------- */
.skip-link {
  position: fixed;
  top: -60px; left: 16px;
  z-index: 999;
  padding: 10px 18px;
  background: var(--primary);
  color: #fff;
  border-radius: 10px;
  transition: top 0.3s ease;
}
.skip-link:focus { top: 12px; }

/* ---------- Navbar ---------- */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  transition: background 0.4s ease, border-color 0.4s ease, backdrop-filter 0.4s ease;
  border-bottom: 1px solid transparent;
}
.navbar.scrolled {
  background: rgba(5, 8, 22, 0.72);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom-color: rgba(255,255,255,0.06);
}

.nav-wrap {
  display: flex;
  align-items: center;
  gap: 28px;
  height: var(--nav-h);
}

.logo {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-head);
  font-size: 1.55rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.03em;
}
.logo span { color: var(--primary); }
.logo-img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(139, 92, 246, 0.55);
  box-shadow: 0 0 16px rgba(139, 92, 246, 0.4);
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s ease;
}
.logo:hover .logo-img {
  transform: scale(1.06);
  box-shadow: 0 0 22px rgba(139, 92, 246, 0.6);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(8px, 1.1vw, 14px);
  margin-left: auto;
}

.nav-links a:not(.btn) {
  position: relative;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--muted);
  padding: 9px 15px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  transition: color 0.3s ease;
}
.nav-links a:not(.btn)::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(90deg, #ff004c, #ff8a00, #ffe600, #22ff66, #00e5ff, #2979ff, #c85eff, #ff004c);
  background-size: 600% 100%;
  animation: rgbFlow 5s linear infinite;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
          mask-composite: exclude;
  pointer-events: none;
}
.nav-links a:not(.btn):hover,
.nav-links a.active { color: #fff; background: rgba(139, 92, 246, 0.12); }

.nav-cv {
  flex-shrink: 0;
  position: relative;
}
.nav-cv::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  padding: 2px;
  background: linear-gradient(90deg, #ff004c, #ff8a00, #ffe600, #22ff66, #00e5ff, #2979ff, #c85eff, #ff004c);
  background-size: 600% 100%;
  animation: rgbFlow 4s linear infinite;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
          mask-composite: exclude;
  pointer-events: none;
}
.nav-cta-mobile { display: none; }

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 7px;
  width: 44px; height: 44px;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid var(--glass-brd);
  background: rgba(255,255,255,0.04);
}
.hamburger span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: #fff;
  transition: transform 0.35s var(--ease-out), width 0.35s var(--ease-out);
}
.hamburger span:last-child { width: 65%; }
.hamburger.active span:first-child { transform: translateY(4.5px) rotate(45deg); }
.hamburger.active span:last-child { width: 100%; transform: translateY(-4.5px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: calc(var(--nav-h) + 30px);
  padding-bottom: 90px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: clamp(36px, 6vw, 80px);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
  border: 1px solid rgba(6, 182, 212, 0.35);
  background: rgba(6, 182, 212, 0.07);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  position: relative;
  isolation: isolate;
}
.hero-badge .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
  animation: blink 2s ease-in-out infinite;
}
@keyframes blink { 50% { opacity: 0.35; } }

.hero-hello {
  margin-top: 26px;
  color: var(--accent);
  font-size: clamp(0.85rem, 1.5vw, 0.95rem);
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.hero-title {
  font-family: var(--font-head);
  font-size: clamp(2.7rem, 7.2vw, 4.9rem);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.03em;
  color: var(--text);
  text-wrap: balance;
  filter: drop-shadow(0 6px 30px rgba(139, 92, 246, 0.25));
}

.hero-sub {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-top: 14px;
  min-height: 1.6em;
  font-family: var(--font-head);
  font-size: clamp(1.15rem, 2.6vw, 1.65rem);
  font-weight: 600;
  color: var(--muted);
}
#typed { color: #fff; }

.caret {
  width: 3px;
  height: 1.15em;
  border-radius: 2px;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
  animation: caretBlink 0.9s steps(2) infinite;
}
@keyframes caretBlink { 50% { opacity: 0; } }

.hero-intro {
  max-width: 540px;
  margin-top: 22px;
  font-size: clamp(0.98rem, 1.7vw, 1.08rem);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 34px;
}

.socials {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 38px;
}

.social-btn {
  display: grid;
  place-items: center;
  width: 46px; height: 46px;
  border-radius: 14px;
  color: var(--muted);
  border: 1px solid var(--glass-brd);
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform 0.3s var(--ease-out), color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}
.social-btn:hover {
  transform: translateY(-4px) scale(1.05);
  color: #fff;
  border-color: rgba(139, 92, 246, 0.6);
  background: rgba(139, 92, 246, 0.14);
  box-shadow: 0 10px 28px rgba(139, 92, 246, 0.35);
}

/* Hero visual — portrait */
.hero-visual { display: grid; place-items: center; }

.portrait-wrap {
  position: relative;
  width: min(270px, 54vw);
  aspect-ratio: 1;
}

.portrait-halo {
  position: absolute;
  inset: -12%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 28%, rgba(139,92,246,0.35), transparent 55%),
    radial-gradient(circle at 70% 72%, rgba(59,130,246,0.3), transparent 55%),
    radial-gradient(circle at 50% 50%, rgba(6,182,212,0.16), transparent 60%);
  filter: blur(48px);
  animation: haloPulse 5.5s ease-in-out infinite;
}
@keyframes haloPulse {
  0%, 100% { transform: scale(1); opacity: 0.85; }
  50%      { transform: scale(1.08); opacity: 1; }
}

.portrait-ring,
.ring-2 {
  position: absolute;
  inset: -7px;
  border-radius: 50%;
  pointer-events: none;
}
.portrait-ring::before {
  content: "";
  position: absolute; inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg,
    transparent 0deg, transparent 250deg,
    rgba(139,92,246,0.9) 310deg,
    rgba(6,182,212,1) 340deg, transparent 360deg);
  mask: radial-gradient(farthest-side, transparent calc(100% - 4.5px), #000 calc(100% - 3.5px));
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4.5px), #000 calc(100% - 3.5px));
  animation: ringSpin 5s linear infinite;
  filter: drop-shadow(0 0 10px rgba(139,92,246,0.65));
}
.ring-2 { inset: -18px; }
.ring-2::before {
  content: "";
  position: absolute; inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 180deg,
    transparent 0deg, transparent 280deg,
    rgba(59,130,246,0.55) 330deg, transparent 360deg);
  mask: radial-gradient(farthest-side, transparent calc(100% - 2.5px), #000 calc(100% - 1.5px));
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2.5px), #000 calc(100% - 1.5px));
  animation: ringSpin 8s linear infinite reverse;
}
@keyframes ringSpin { to { transform: rotate(360deg); } }

.portrait {
  position: absolute; inset: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 30% 25%, rgba(139,92,246,0.22), transparent 52%),
    radial-gradient(circle at 75% 80%, rgba(59,130,246,0.2), transparent 55%),
    linear-gradient(160deg, #131c33, #0a1024);
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow:
    inset 0 2px 20px rgba(255,255,255,0.05),
    0 34px 80px rgba(2, 6, 23, 0.65);
}
.portrait img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.portrait-initials {
  font-family: var(--font-head);
  font-size: clamp(4.4rem, 11vw, 6.4rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  user-select: none;
}

.mini-chip {
  position: absolute;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  padding: 9px 15px;
  border-radius: 999px;
  font-size: 0.76rem;
  color: var(--muted);
  background: rgba(10, 16, 36, 0.72);
  border: 1px solid rgba(255,255,255,0.13);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 12px 30px rgba(2,6,23,0.5);
}
.chip-exp { top: 9%; left: -7%; animation: floatY 6s ease-in-out infinite; }
.chip-exp b { color: var(--accent); }
.chip-loc { bottom: 12%; right: -5%; gap: 7px; animation: floatY 7s ease-in-out 1s infinite; }
@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-11px); }
}

/* Floating tech chips */
.float-chip {
  position: absolute;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 56px; height: 56px;
  border-radius: 17px;
  background: rgba(10, 16, 36, 0.78);
  border: 1px solid rgba(255,255,255,0.12);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 16px 38px rgba(2,6,23,0.55);
  animation: chipFloat 5.6s ease-in-out infinite alternate;
}
.float-chip svg { filter: drop-shadow(0 0 9px currentColor); }
.f1 { top: -6px; right: 4%;  animation-delay: 0s; }
.f2 { top: 38%; right: -34px; animation-delay: .7s; }
.f3 { bottom: 6%; left: -26px; animation-delay: 1.4s; }
.f4 { bottom: 26%; left: -44px; animation-delay: 2.1s; }

.f1 svg { color: #61DAFB; }
.f2 svg { color: #83CD29; }
.f3 svg { color: #47A248; }
.f4 svg { color: #38BDF8; }

@keyframes chipFloat {
  from { transform: translateY(-9px) rotate(-2deg); }
  to   { transform: translateY(9px) rotate(2deg); }
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 30px; left: 50%;
  transform: translateX(-50%);
  display: grid;
  justify-items: center;
  gap: 9px;
  opacity: 0.75;
  transition: opacity 0.3s ease;
}
.scroll-indicator:hover { opacity: 1; }

.mouse {
  width: 25px; height: 40px;
  border: 2px solid rgba(203, 213, 225, 0.55);
  border-radius: 999px;
  display: flex;
  justify-content: center;
  padding-top: 7px;
}
.wheel {
  width: 3px; height: 8px;
  border-radius: 3px;
  background: var(--accent);
  animation: wheelScroll 1.7s ease-in-out infinite;
}
@keyframes wheelScroll {
  0%   { transform: translateY(0); opacity: 1; }
  70%  { transform: translateY(11px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}
.scroll-hint { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.3em; color: var(--muted-2); }

/* ---------- Stats ---------- */
.stats { position: relative; z-index: 2; padding-bottom: 10px; }

.stats-strip {
  display: flex;
  justify-content: center;
  overflow: hidden;
}

.stat-item {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: clamp(26px, 4vw, 42px) clamp(30px, 6vw, 90px);
  text-align: center;
}
.stat-item + .stat-item::before {
  content: "";
  position: absolute;
  left: 0; top: 22%;
  height: 56%; width: 1px;
  background: linear-gradient(180deg, transparent, rgba(139,92,246,0.4), transparent);
}

.stat-num {
  font-family: var(--font-head);
  font-size: clamp(1.9rem, 4vw, 2.9rem);
  font-weight: 800;
  line-height: 1;
  filter: drop-shadow(0 0 18px rgba(139,92,246,0.45));
}
.stat-label { font-size: clamp(0.76rem, 1.4vw, 0.88rem); color: var(--muted-2); }

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(28px, 4vw, 54px);
  align-items: start;
}

.personal-card { padding: clamp(26px, 3vw, 36px); }

.personal-head {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--glass-brd);
}
.avatar-mini {
  display: grid;
  place-items: center;
  width: 58px; height: 58px;
  border-radius: 18px;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.25rem;
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid rgba(139, 92, 246, 0.35);
}
.avatar-photo {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(139, 92, 246, 0.55);
  box-shadow: 0 0 16px rgba(139, 92, 246, 0.35);
}
.personal-head h3 { font-family: var(--font-head); color: #fff; font-size: 1.12rem; }
.role-line { font-size: 0.74rem; color: var(--accent); margin-top: 3px; }

.badge-open {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.72rem;
  color: #34D399;
  padding: 6px 12px;
  border-radius: 99px;
  border: 1px solid rgba(52, 211, 153, 0.35);
  background: rgba(52, 211, 153, 0.08);
  white-space: nowrap;
}
.badge-open i {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #34D399;
  box-shadow: 0 0 10px #34D399;
  animation: blink 2s ease-in-out infinite;
}

.details-list { display: grid; gap: 0; margin-top: 8px; }
.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 13px 2px;
  border-bottom: 1px dashed rgba(255,255,255,0.07);
  transition: padding-left 0.3s var(--ease-out);
}
.detail-row:last-child { border-bottom: none; }
.detail-row:hover { padding-left: 8px; }
.detail-row dt {
  font-size: 0.8rem;
  color: var(--muted-2);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  flex-shrink: 0;
}
.detail-row dd { font-size: 0.92rem; color: #E2E8F0; text-align: right; }
.detail-row dd a { border-bottom: 1px dotted rgba(139,92,246,.6); transition: color .3s; }
.detail-row dd a:hover { color: var(--accent); }
.detail-row .ok { color: #34D399; font-weight: 600; }

.about-bio p { font-size: clamp(0.98rem, 1.7vw, 1.06rem); }
.about-bio p + p { margin-top: 18px; }
.about-bio strong { color: #fff; font-weight: 600; }

.highlight-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 26px 0 30px;
}
.highlight-chips li {
  padding: 8px 16px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
  border-radius: 999px;
  border: 1px solid var(--glass-brd);
  background: var(--glass-bg);
  transition: transform 0.25s var(--ease-out), border-color 0.25s ease, color 0.25s ease;
  position: relative;
  isolation: isolate;
}
.highlight-chips li:hover {
  transform: translateY(-3px);
  border-color: rgba(139,92,246,.55);
  color: #fff;
}

/* ---------- RGB animated border ring ---------- */
@keyframes rgbFlow {
  0% { background-position: 0% 50%; }
  100% { background-position: 300% 50%; }
}
.rgb-btn,
.highlight-chips li,
.hero-badge,
.hamburger {
  position: relative;
  isolation: isolate;
}
.rgb-btn::before,
.highlight-chips li::before,
.hero-badge::before,
.hamburger::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  padding: 2px;
  background: linear-gradient(90deg, #8B5CF6, #06B6D4, #EC4899, #F59E0B, #8B5CF6);
  background-size: 300% 100%;
  animation: rgbFlow 3s linear infinite;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  .rgb-btn::before,
  .highlight-chips li::before,
  .hero-badge::before,
  .hamburger::before { animation: none; }
}

/* ---------- Skills ---------- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: clamp(20px, 2.6vw, 30px);
}

.skill-cat { padding: clamp(24px, 2.6vw, 32px); will-change: transform; }

.cat-icon {
  display: grid;
  place-items: center;
  width: 50px; height: 50px;
  border-radius: 15px;
  color: var(--accent);
  margin-bottom: 18px;
  background: linear-gradient(135deg, rgba(139,92,246,0.16), rgba(6,182,212,0.12));
  border: 1px solid rgba(139, 92, 246, 0.3);
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s ease;
}
.skill-cat:hover .cat-icon {
  transform: rotate(-6deg) scale(1.08);
  box-shadow: 0 0 26px rgba(139, 92, 246, 0.4);
}

.skill-cat h3 {
  font-family: var(--font-head);
  font-size: 1.08rem;
  color: #fff;
  margin-bottom: 22px;
}

.skill + .skill { margin-top: 17px; }

.skill-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 0.86rem;
  color: var(--muted);
}
.skill-pct { font-size: 0.74rem; color: var(--accent); }

.bar {
  height: 7px;
  border-radius: 99px;
  background: rgba(255,255,255,0.07);
  overflow: hidden;
}
.bar i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: var(--grad);
  box-shadow: 0 0 14px rgba(139, 92, 246, 0.55);
  transition: width 1.3s var(--ease-out);
  position: relative;
}
.bar i::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,0.45) 50%, transparent 70%);
  background-size: 200% 100%;
  animation: barShimmer 2.4s linear infinite;
  opacity: 0.6;
}
@keyframes barShimmer {
  from { background-position: 200% 0; }
  to   { background-position: -60% 0; }
}

/* ---------- Projects ---------- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: clamp(22px, 3vw, 34px);
}

.project-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  will-change: transform;
}
.project-card:hover { transform: translateY(-8px); }

.project-preview {
  position: relative;
  aspect-ratio: 16 / 10.5;
  padding: clamp(20px, 3vw, 30px);
  display: grid;
  place-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--glass-brd);
}
.pv-blue .pv-tv-logo { width: clamp(120px, 42%, 185px); }

/* Tall panel for phone-screenshot preview — shows the FULL image, large */
.project-preview.pv-shot { aspect-ratio: auto; }
.project-preview.pv-shot .project-shot {
  width: auto;
  height: clamp(340px, 42vw, 440px);
  margin-inline: auto;
}
.pv-purple {
  background:
    radial-gradient(420px 240px at 20% -20%, rgba(139,92,246,0.28), transparent 60%),
    radial-gradient(380px 260px at 110% 120%, rgba(59,130,246,0.18), transparent 60%),
    linear-gradient(160deg, #0b1024, #0d1230);
}
.pv-blue {
  background:
    radial-gradient(420px 240px at 85% -25%, rgba(6,182,212,0.26), transparent 60%),
    radial-gradient(400px 280px at -10% 120%, rgba(59,130,246,0.2), transparent 60%),
    linear-gradient(160deg, #081124, #0a1430);
}
.pf-cyan {
  background:
    radial-gradient(430px 250px at 15% 115%, rgba(6,182,212,0.24), transparent 60%),
    radial-gradient(400px 240px at 105% -10%, rgba(139,92,246,0.22), transparent 60%),
    linear-gradient(160deg, #090e22, #0c1229);
}

/* sheen sweep on preview */
.project-preview::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,0.07) 50%, transparent 65%);
  background-size: 250% 100%;
  animation: pvSheen 5s ease-in-out infinite;
  pointer-events: none;
}
@keyframes pvSheen {
  0%, 55% { background-position: 130% 0; }
  85%, 100% { background-position: -80% 0; }
}

/* Downloader mockup */
.pv-phone {
  width: min(230px, 74%);
  border-radius: 18px;
  padding: 14px 14px 16px;
  background: rgba(7, 11, 26, 0.85);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 24px 50px rgba(2,6,23,0.6);
  position: relative;
  z-index: 1;
}
.pv-notch {
  width: 54px; height: 5px;
  margin: 0 auto 12px;
  border-radius: 99px;
  background: rgba(255,255,255,0.14);
}
.pv-urlbar {
  font-size: 0.56rem;
  color: var(--muted-2);
  text-align: center;
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.07);
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.pv-thumb {
  height: 74px;
  margin-top: 10px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 30% 30%, rgba(139,92,246,0.4), transparent 60%),
    linear-gradient(135deg, #171f42, #101736);
  border: 1px solid rgba(255,255,255,0.09);
}
.pv-playtri {
  width: 0; height: 0;
  border-left: 13px solid rgba(255,255,255,0.92);
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  filter: drop-shadow(0 0 12px rgba(139,92,246,0.9));
  margin-left: 3px;
}
.pv-titlebar { margin-top: 11px; display: grid; gap: 6px; }
.pv-titlebar i {
  height: 6px;
  border-radius: 99px;
  background: rgba(255,255,255,0.1);
}
.pv-titlebar i:first-child { width: 82%; }
.pv-progress {
  height: 6px;
  margin-top: 11px;
  border-radius: 99px;
  background: rgba(255,255,255,0.08);
  overflow: hidden;
}
.pv-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  box-shadow: 0 0 12px rgba(139,92,246,0.8);
  animation: dlProgress 2.6s ease-in-out infinite alternate;
}
@keyframes dlProgress { from { width: 18%; } to { width: 88%; } }

.pv-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
}
.pv-meta b { font-weight: 500; font-size: 0.55rem; color: var(--accent); }
.pv-meta em { font-style: normal; font-size: 0.55rem; color: var(--muted-2); }

/* TV mockup */
.pv-player {
  width: min(300px, 86%);
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  position: relative;
  background:
    radial-gradient(circle at 50% 45%, rgba(59,130,246,0.28), transparent 62%),
    linear-gradient(150deg, #0e1730, #0a1126);
  border: 1px solid rgba(255,255,255,0.13);
  box-shadow: 0 26px 54px rgba(2,6,23,0.6);
  z-index: 1;
}
.pv-live {
  position: absolute;
  top: 9px; left: 9px;
  font-size: 0.52rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: #fff;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(239, 68, 68, 0.92);
  animation: livePulse 1.6s ease-in-out infinite;
}
@keyframes livePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0.55); }
  50%      { box-shadow: 0 0 0 7px rgba(239,68,68,0); }
}
.pv-scoreboard {
  position: absolute;
  top: 9px; right: 9px;
  display: flex;
  gap: 7px;
  align-items: center;
  font-size: 0.53rem;
  color: #E2E8F0;
  background: rgba(5, 9, 22, 0.75);
  border: 1px solid rgba(255,255,255,0.1);
  padding: 4px 9px;
  border-radius: 7px;
}
.pv-scoreboard span { color: var(--accent); font-weight: 700; }

.pv-centerplay {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 46px; height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow: 0 0 34px rgba(139,92,246,0.65);
  animation: playPulse 2.2s ease-in-out infinite;
}
.pv-centerplay::after {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-38%, -50%);
  width: 0; height: 0;
  border-left: 13px solid #fff;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
}
@keyframes playPulse {
  0%, 100% { transform: translate(-50%,-50%) scale(1); }
  50%      { transform: translate(-50%,-50%) scale(1.09); }
}

.pv-seek {
  position: absolute;
  left: 12px; right: 12px; bottom: 24px;
  height: 4px;
  border-radius: 99px;
  background: rgba(255,255,255,0.14);
}
.pv-seek span {
  display: block;
  width: 62%; height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--secondary));
  box-shadow: 0 0 10px rgba(6,182,212,0.8);
}
.pv-controls {
  position: absolute;
  left: 12px; bottom: 8px;
  display: flex;
  gap: 7px;
  align-items: center;
}
.pv-controls i {
  width: 12px; height: 12px;
  border-radius: 4px;
  background: rgba(255,255,255,0.22);
}
.pv-controls u {
  width: 44px; height: 12px;
  border-radius: 99px;
  background: rgba(255,255,255,0.12);
}

/* Portfolio mockup */
.pv-browser {
  width: min(290px, 84%);
  border-radius: 13px;
  overflow: hidden;
  background: rgba(7, 11, 26, 0.85);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 24px 50px rgba(2,6,23,0.6);
  position: relative;
  z-index: 1;
}
.pv-chrome {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
}
.pv-chrome i {
  width: 9px; height: 9px;
  border-radius: 50%;
}
.pv-chrome i:nth-child(1) { background: #F87171; }
.pv-chrome i:nth-child(2) { background: #FBBF24; }
.pv-chrome i:nth-child(3) { background: #34D399; }
.pv-chrome span {
  margin-left: auto;
  font-size: 0.54rem;
  color: var(--muted-2);
  padding: 3px 10px;
  border-radius: 99px;
  background: rgba(255,255,255,0.06);
}
.pv-hero-mini {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 14px 12px;
}
.ph-lines { display: grid; gap: 7px; flex: 1; }
.ph-lines b {
  display: block;
  height: 10px;
  width: 78%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
}
.ph-lines i {
  height: 6px;
  border-radius: 99px;
  background: rgba(255,255,255,0.1);
}
.ph-avatar {
  width: 46px; height: 46px;
  border-radius: 50%;
  flex-shrink: 0;
  background:
    radial-gradient(circle at 32% 28%, rgba(139,92,246,0.55), transparent 58%),
    linear-gradient(140deg, #18204a, #10173a);
  border: 1px solid rgba(255,255,255,0.16);
}
.pv-cards-mini {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
  padding: 4px 14px 16px;
}
.pv-cards-mini i {
  height: 40px;
  border-radius: 8px;
  background: linear-gradient(150deg, rgba(255,255,255,0.07), rgba(255,255,255,0.02));
  border: 1px solid rgba(255,255,255,0.07);
}

/* Project body */
.project-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: clamp(22px, 2.6vw, 30px);
}
.project-body h3 {
  font-family: var(--font-head);
  font-size: 1.28rem;
  color: #fff;
  letter-spacing: -0.01em;
}
.project-body p {
  margin-top: 10px;
  font-size: 0.92rem;
  flex: 1;
}

.tech-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}
.tech-badges li {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--accent);
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid rgba(6, 182, 212, 0.3);
  background: rgba(6, 182, 212, 0.07);
  transition: transform .25s var(--ease-out), background .25s ease;
}
.tech-badges li:hover { transform: translateY(-2px); background: rgba(6,182,212,.16); }

.project-tagline {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--accent);
  letter-spacing: 0.08em;
  margin-top: 4px;
}

.project-title-row {
  display: flex;
  align-items: center;
  gap: 13px;
}
.project-mini-logo {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 8px 20px rgba(2, 6, 23, 0.5);
}
.project-titles { min-width: 0; }
.project-titles p {
  margin-top: 2px;
  flex: none;
}
/* emoji badge used when a project has no logo image yet */
.project-mini-icon {
  display: grid;
  place-items: center;
  font-size: 26px;
  background: linear-gradient(135deg, #0ea5e9, #8b5cf6);
}
/* placeholder panel until a real screenshot is added */
.pv-soon {
  aspect-ratio: auto;
  height: clamp(340px, 42vw, 440px);
}
.pv-placeholder {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 12px;
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  border: 1px dashed rgba(255, 255, 255, 0.2);
  border-radius: 18px;
  padding: 28px;
}
.pv-ph-emoji {
  font-size: 46px;
  filter: drop-shadow(0 8px 22px rgba(139, 92, 246, 0.5));
}
/* non-clickable "Release Soon" pill */
.btn-soon {
  pointer-events: none;
  cursor: default;
}

.project-features {
  margin-top: 14px;
  display: grid;
  gap: 8px;
}
.project-features li {
  font-size: 0.87rem;
  line-height: 1.45;
  color: var(--muted);
  padding-left: 1.5em;
  text-indent: -1.5em;
}
.project-features b { color: #E2E8F0; font-weight: 600; }

.project-shot {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: clamp(12px, 2vw, 20px);
}

.pv-tv-logo {
  position: relative;
  z-index: 1;
  width: clamp(120px, 42%, 185px);
  border-radius: 26px;
  object-fit: contain;
  animation: floatY 5.5s ease-in-out infinite alternate;
  filter: drop-shadow(0 18px 34px rgba(2, 6, 23, 0.55));
}

.project-links {
  display: flex;
  gap: 12px;
  margin-top: 22px;
}

/* ---------- Experience ---------- */
.timeline {
  position: relative;
  max-width: 800px;
  margin-inline: auto;
  padding-left: 34px;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 8px; top: 6px; bottom: 6px;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--primary), var(--secondary) 55%, var(--accent));
  opacity: 0.5;
}

.tl-item { position: relative; }
.tl-item + .tl-item { margin-top: 26px; }

.tl-dot {
  position: absolute;
  left: -33px; top: 30px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--bg-deep);
  border: 3px solid var(--primary);
  box-shadow: 0 0 0 4px rgba(139,92,246,0.18), 0 0 18px rgba(139,92,246,0.6);
}

.tl-card { padding: clamp(22px, 3vw, 30px); }

.tl-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 14px;
}
.tl-head h3 {
  font-family: var(--font-head);
  font-size: 1.05rem;
  color: #fff;
}
.tl-period {
  font-size: 0.72rem;
  color: var(--accent);
  padding: 4px 12px;
  border-radius: 99px;
  border: 1px solid rgba(6,182,212,.3);
  background: rgba(6,182,212,.07);
  white-space: nowrap;
}

.tl-points { display: grid; gap: 9px; }
.tl-points li {
  position: relative;
  padding-left: 20px;
  font-size: 0.92rem;
}
.tl-points li::before {
  content: "▹";
  position: absolute;
  left: 0;
  color: var(--primary);
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(26px, 4vw, 48px);
  align-items: start;
}

.contact-info { display: grid; gap: 16px; }

.info-card {
  display: flex;
  align-items: center;
  gap: 17px;
  padding: 19px 22px;
}
.info-icon {
  display: grid;
  place-items: center;
  width: 47px; height: 47px;
  flex-shrink: 0;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, rgba(139,92,246,0.9), rgba(59,130,246,0.9));
  box-shadow: 0 8px 24px rgba(139, 92, 246, 0.4);
  transition: transform 0.3s var(--ease-out);
}
.info-card:hover .info-icon { transform: scale(1.1) rotate(-5deg); }
.info-card b {
  display: block;
  font-size: 0.78rem;
  color: var(--muted-2);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.info-card em {
  font-style: normal;
  font-weight: 600;
  color: #E2E8F0;
  font-size: 0.95rem;
}
.contact-socials { margin-top: 8px; }

/* Form */
.contact-form { padding: clamp(26px, 3vw, 36px); }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted-2);
  margin-bottom: 8px;
}
.field input,
.field textarea {
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  color: #fff;
  font-size: 0.94rem;
  background: rgba(255,255,255,0.045);
  border: 1px solid var(--glass-brd);
  transition: border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
  resize: vertical;
}
.field input::placeholder,
.field textarea::placeholder { color: rgba(203, 213, 225, 0.38); }
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: rgba(139, 92, 246, 0.06);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.18);
}
.field input.invalid,
.field textarea.invalid {
  border-color: rgba(248, 113, 113, 0.7);
  box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.12);
}

#cf-submit { margin-top: 6px; }
#cf-submit.sending { opacity: 0.75; pointer-events: none; }

.form-success {
  display: none;
  margin-top: 16px;
  padding: 13px 16px;
  border-radius: 12px;
  font-size: 0.88rem;
  color: #34D399;
  border: 1px solid rgba(52, 211, 153, 0.35);
  background: rgba(52, 211, 153, 0.08);
  text-align: center;
}
.form-success.show { display: block; animation: successIn 0.45s var(--ease-out); }
@keyframes successIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

/* Map */
.map-wrap {
  position: relative;
  margin-top: clamp(30px, 4vw, 48px);
  overflow: hidden;
  padding: 8px;
}
#map {
  height: 340px;
  border-radius: calc(var(--r-lg) - 10px);
  filter: saturate(0.85) brightness(0.95);
  z-index: 1;
}
.map-overlay {
  position: absolute; inset: 8px;
  border-radius: calc(var(--r-lg) - 10px);
  pointer-events: none;
  box-shadow: inset 0 0 70px rgba(5, 8, 22, 0.75);
}
.map-overlay::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 2px;
  background: linear-gradient(90deg, #ff004c, #ff8a00, #ffe600, #22ff66, #00e5ff, #2979ff, #c85eff, #ff004c);
  background-size: 600% 100%;
  animation: rgbFlow 5s linear infinite;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
          mask-composite: exclude;
  pointer-events: none;
}

.map-pin { background: none; border: none; }
.pin-core {
  display: block;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--primary);
  border: 3px solid #fff;
  box-shadow: 0 0 16px rgba(139,92,246,0.9);
  position: relative;
}
.pin-core::after {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 2px solid rgba(139,92,246,0.7);
  animation: pinRadar 1.8s ease-out infinite;
}
@keyframes pinRadar {
  from { transform: scale(0.5); opacity: 1; }
  to   { transform: scale(1.5); opacity: 0; }
}

.leaflet-popup-content-wrapper {
  background: #0B1124 !important;
  color: #E2E8F0 !important;
  border: 1px solid rgba(139,92,246,.4);
  border-radius: 12px !important;
  box-shadow: 0 16px 40px rgba(2,6,23,.6) !important;
}
.leaflet-popup-tip { background: #0B1124 !important; }
.leaflet-container a.leaflet-popup-close-button { color: var(--muted-2) !important; }
.leaflet-control-attribution {
  background: rgba(5, 8, 22, 0.7) !important;
  color: var(--muted-2) !important;
  font-size: 9px !important;
}
.leaflet-control-attribution a { color: var(--accent) !important; }
.leaflet-bar a {
  background: #0B1124 !important;
  color: #E2E8F0 !important;
  border-color: rgba(255,255,255,.1) !important;
}

/* ---------- Footer ---------- */
.footer {
  position: relative;
  z-index: 2;
  margin-top: 40px;
  border-top: 1px solid rgba(255,255,255,0.06);
  background: rgba(3, 6, 18, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  align-items: start;
  gap: clamp(20px, 3vw, 36px);
  padding-block: clamp(36px, 5vw, 52px) 28px;
}
/* links column has no heading — pad to align with siblings' content */
@media (min-width: 521px) {
  .f-links { padding-top: 26px; }
}
.f-brand p { margin-top: 0; max-width: 280px; font-size: 0.9rem; }

.footer h4 {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted-2);
  margin-bottom: 12px;
}
.f-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.f-links a,
.say-mail,
.loc-box {
  position: relative;
  display: block;
  font-size: 0.88rem;
  color: var(--muted);
  padding: 7px 13px;
  margin-bottom: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  transition: color 0.3s ease, transform 0.3s var(--ease-out);
}
.say-mail { margin-bottom: 8px; }
/* location pill hugs its text instead of stretching full-width */
.loc-box {
  display: inline-block;
  width: fit-content;
}
/* footer quick links laid out horizontally */
.f-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.f-links a::before,
.say-mail::before,
.loc-box::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(90deg, #ff004c, #ff8a00, #ffe600, #22ff66, #00e5ff, #2979ff, #c85eff, #ff004c);
  background-size: 600% 100%;
  animation: rgbFlow 5s linear infinite;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
          mask-composite: exclude;
  pointer-events: none;
}
.f-say p {
  display: block;
  font-size: 0.92rem;
  color: var(--muted);
}
.f-social-icons svg { display: block; }
.f-links a:hover, .f-say .say-mail:hover {
  color: var(--accent);
  transform: translateX(4px);
}

.f-social-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}
.f-social-icons a {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding-block: 0;
  border-radius: 50%;
  color: var(--muted);
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.04);
  position: relative;
}
.f-social-icons a::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1.2px;
  background: linear-gradient(90deg, #ff004c, #ff8a00, #ffe600, #22ff66, #00e5ff, #2979ff, #c85eff, #ff004c);
  background-size: 600% 100%;
  animation: rgbFlow 4s linear infinite;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
          mask-composite: exclude;
  pointer-events: none;
}
.f-social-icons a:hover {
  transform: translateY(-4px);
}
.f-social-icons a.fb:hover { box-shadow: 0 10px 26px rgba(24, 119, 242, 0.35); }
.f-social-icons a.ig:hover { box-shadow: 0 10px 26px rgba(216, 0, 185, 0.32); }
.f-social-icons a.ml:hover { box-shadow: 0 10px 26px rgba(229, 46, 113, 0.35); }

.f-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  padding-block: 20px;
  border-top: 1px solid rgba(255,255,255,0.06);
  font-size: 0.82rem;
  color: var(--muted-2);
  text-align: center;
}

/* ---------- Fullscreen image viewer ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  overflow: auto;
  padding: 30px 16px 46px;
  background: rgba(3, 6, 18, 0.92);
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.lightbox.open {
  opacity: 1;
  visibility: visible;
}
.lb-img {
  max-width: min(94vw, 560px);
  max-height: 84vh;
  margin: auto;
  border-radius: 16px;
  box-shadow: 0 40px 90px rgba(2, 4, 14, 0.8), 0 0 0 1px rgba(255,255,255,0.08);
}
.lightbox.open .lb-img { animation: lbPop 0.3s var(--ease-out); }
@keyframes lbPop {
  from { transform: scale(0.96); opacity: 0.4; }
}
.lightbox.zoomed .lb-img {
  border-radius: 10px;
  cursor: zoom-out;
}
.lb-close {
  position: fixed;
  top: 14px;
  right: 20px;
  z-index: 2;
  width: 44px;
  height: 44px;
  font-size: 26px;
  line-height: 1;
  color: #fff;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.09);
  transition: background 0.25s ease, transform 0.25s ease;
}
.lb-close:hover { background: rgba(239, 68, 68, 0.75); transform: rotate(90deg); }
.lb-hint {
  position: fixed;
  bottom: 14px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: var(--muted-2);
  pointer-events: none;
}

/* project screenshots invite the click */
.project-shot { cursor: zoom-in; }

/* ---------- Back to top ---------- */
#toTop {
  position: fixed;
  right: 26px; bottom: 26px;
  z-index: 80;
  display: grid;
  place-items: center;
  width: 48px; height: 48px;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow: 0 12px 32px rgba(139, 92, 246, 0.45);
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: opacity 0.35s ease, visibility 0.35s ease, transform 0.35s var(--ease-out);
}
#toTop.show { opacity: 1; visibility: visible; transform: none; }
#toTop:hover { transform: translateY(-3px); }

/* ---------- Reveal-on-scroll (JS-gated) ---------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.55s var(--ease-out),
    transform 0.55s var(--ease-out);
  transition-delay: calc(var(--d, 0s) * 0.6);
  will-change: opacity, transform;
}
.js [data-reveal].in-view {
  opacity: 1;
  transform: none;
}
/* lighter motion on touch devices — kills the "slow text" feel on fast scroll */
@media (pointer: coarse), (max-width: 768px) {
  .js [data-reveal] {
    transform: translateY(16px);
    transition-duration: 0.38s, 0.38s;
    transition-delay: 0s;
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; gap: 60px; }
  .hero { text-align: center; padding-bottom: 120px; }
  .hero-copy > * { margin-inline: auto; }
  .hero-intro { max-width: 620px; }
  .hero-cta, .socials { justify-content: center; }
  .hero-visual { order: -1; }
  .portrait-wrap { width: min(230px, 52vw); }
  .float-chip { width: 46px; height: 46px; }
  .f2 { right: -12px; }
  .f4 { left: -18px; }
  .about-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  :root { --nav-h: 68px; }

  .hamburger { display: flex; }

  /* swap header corners on mobile: hamburger left, logo right */
  .nav-wrap {
    flex-direction: row-reverse;
    justify-content: space-between;
  }

  .nav-cv { display: none; }
  .nav-cta-mobile { display: block; margin-top: 8px; }

  .nav-links {
    position: fixed;
    top: calc(var(--nav-h) + 10px);
    left: 16px;
    right: 16px;
    z-index: 99;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 18px;
    border-radius: 20px;
    background: rgba(7, 11, 28, 0.92);
    backdrop-filter: blur(22px) saturate(160%);
    -webkit-backdrop-filter: blur(22px) saturate(160%);
    border: 1px solid rgba(255,255,255,0.09);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-14px) scale(0.98);
    transition: opacity 0.35s ease, visibility 0.35s ease, transform 0.35s var(--ease-out);
  }
  .nav-links.open {
    opacity: 1;
    visibility: visible;
    transform: none;
  }
  .nav-links a:not(.btn) {
    display: block;
    padding: 13px 14px;
    font-size: 1rem;
    border-radius: 12px;
    background: rgba(255,255,255,0.03);
  }
  .nav-links a:not(.btn):hover,
  .nav-links a.active { background: rgba(139, 92, 246, 0.14); }
  .nav-cta-mobile .btn { width: 100%; }

  .form-row { grid-template-columns: 1fr; }
  #map { height: 280px; }
}

@media (max-width: 520px) {
  .portrait-wrap { width: min(170px, 46vw); }
  .stat-num { font-size: 1.65rem; }
  .hero-title { font-size: clamp(2.2rem, 11vw, 3rem); }
  .project-links { flex-direction: column; }
  .project-links .btn { justify-content: center; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .tl-head h3 { font-size: 0.98rem; }
  #toTop { right: 16px; bottom: 16px; }
  .scroll-indicator { display: none; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .js [data-reveal],
  .js [data-reveal].in-view {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .cursor-glow, .grain { display: none; }
}
