/* =====================================================================
   Amit Goti — Portfolio
   Design system + animations
   ===================================================================== */

:root {
  --bg: #06060a;
  --bg-soft: #0d0d16;
  --surface: rgba(255, 255, 255, 0.03);
  --surface-2: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.09);
  --text: #eef0f6;
  --muted: #9aa0b5;
  --faint: #6a7086;

  --violet: #8b5cf6;
  --cyan: #22d3ee;
  --pink: #f472b6;
  --indigo: #6366f1;
  --upwork: #14a800;
  --upwork-lite: #6fda44;

  --grad: linear-gradient(120deg, #22d3ee 0%, #8b5cf6 50%, #f472b6 100%);
  --grad-soft: linear-gradient(120deg, rgba(34,211,238,.15), rgba(139,92,246,.15));

  --radius: 18px;
  --radius-lg: 26px;
  --shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.8);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  --font-body: 'Space Grotesk', system-ui, sans-serif;
  --font-head: 'Sora', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --maxw: 1180px;
}

/* Light theme overrides */
body.light {
  --bg: #f4f5fb;
  --bg-soft: #ffffff;
  --surface: rgba(10, 12, 30, 0.03);
  --surface-2: rgba(10, 12, 30, 0.05);
  --border: rgba(10, 12, 30, 0.1);
  --text: #14162a;
  --muted: #545a72;
  --faint: #868ca4;
  --shadow: 0 30px 70px -35px rgba(60, 40, 120, 0.35);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background 0.5s var(--ease), color 0.5s var(--ease);
}
body.no-scroll { overflow: hidden; }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
::selection { background: var(--violet); color: #fff; }

.container { width: min(100% - 2.5rem, var(--maxw)); margin-inline: auto; }
.section { padding: clamp(4.5rem, 10vw, 8rem) 0; position: relative; }
.grad {
  background: var(--grad); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: linear-gradient(var(--violet), var(--cyan)); border-radius: 10px; }

/* =====================================================================
   PRELOADER
   ===================================================================== */
.preloader {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--bg);
  display: grid; place-items: center;
  transition: opacity 0.6s var(--ease), visibility 0.6s;
}
.preloader.done { opacity: 0; visibility: hidden; }
.preloader__inner { display: grid; justify-items: center; gap: 1.4rem; }
.preloader__logo { display: flex; gap: 0.1em; font-family: var(--font-head); font-weight: 800; font-size: clamp(3rem, 12vw, 6rem); }
.preloader__logo span {
  background: var(--grad); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  opacity: 0; transform: translateY(40px) rotateX(-90deg);
  animation: dropIn 0.7s var(--ease) forwards;
}
.preloader__logo span:nth-child(2) { animation-delay: 0.12s; }
@keyframes dropIn { to { opacity: 1; transform: translateY(0) rotateX(0); } }
.preloader__bar { width: 200px; height: 3px; background: var(--surface-2); border-radius: 3px; overflow: hidden; }
.preloader__bar span { display: block; height: 100%; width: 0%; background: var(--grad); border-radius: 3px; }
.preloader__pct { font-family: var(--font-mono); color: var(--muted); font-size: 0.85rem; letter-spacing: 0.1em; }

/* =====================================================================
   CUSTOM CURSOR
   ===================================================================== */
.cursor-dot, .cursor-ring { position: fixed; top: 0; left: 0; pointer-events: none; z-index: 9998; border-radius: 50%; mix-blend-mode: difference; }
.cursor-dot { width: 7px; height: 7px; background: #fff; transform: translate(-50%, -50%); }
.cursor-ring {
  width: 38px; height: 38px; border: 1.5px solid #fff; transform: translate(-50%, -50%);
  transition: width 0.25s var(--ease), height 0.25s var(--ease), background 0.25s var(--ease), opacity 0.25s;
}
.cursor-ring.hovering { width: 62px; height: 62px; background: rgba(255,255,255,0.12); border-color: transparent; }
body.cursor-hidden .cursor-dot, body.cursor-hidden .cursor-ring { opacity: 0; }
@media (hover: none), (pointer: coarse) { .cursor-dot, .cursor-ring { display: none; } }

/* =====================================================================
   SCROLL PROGRESS
   ===================================================================== */
.scroll-progress { position: fixed; top: 0; left: 0; height: 3px; width: 0%; background: var(--grad); z-index: 9997; box-shadow: 0 0 14px var(--violet); }

/* =====================================================================
   AMBIENT BACKGROUND
   ===================================================================== */
.bg-aurora { position: fixed; inset: 0; z-index: -2; overflow: hidden; }
.blob { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.5; will-change: transform; }
.blob--1 { width: 46vw; height: 46vw; background: #6d28d9; top: -12%; left: -8%; animation: float1 20s ease-in-out infinite; }
.blob--2 { width: 40vw; height: 40vw; background: #0891b2; bottom: -14%; right: -8%; animation: float2 24s ease-in-out infinite; }
.blob--3 { width: 34vw; height: 34vw; background: #db2777; top: 40%; left: 45%; opacity: 0.32; animation: float3 28s ease-in-out infinite; }
body.light .blob { opacity: 0.28; }
@keyframes float1 { 50% { transform: translate(12vw, 8vh) scale(1.15); } }
@keyframes float2 { 50% { transform: translate(-10vw, -6vh) scale(1.1); } }
@keyframes float3 { 50% { transform: translate(-8vw, 10vh) scale(0.9); } }

.grid-overlay {
  position: absolute; inset: 0;
  background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
  opacity: 0.5;
}
.noise {
  position: absolute; inset: 0; opacity: 0.04; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* =====================================================================
   NAVBAR
   ===================================================================== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem clamp(1rem, 4vw, 2.6rem);
  transition: padding 0.4s var(--ease), background 0.4s var(--ease), backdrop-filter 0.4s;
}
.nav.scrolled {
  padding-block: 0.7rem;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--border);
}
.nav__logo { display: flex; align-items: center; gap: 0.6rem; font-family: var(--font-head); font-weight: 800; }
.nav__logo-mark {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px;
  background: var(--grad); color: #fff; font-size: 0.95rem; letter-spacing: 0.02em;
  box-shadow: 0 8px 24px -8px var(--violet);
}
.nav__logo-text { font-size: 1.05rem; }

.nav__links { display: flex; gap: 0.4rem; }
.nav__link {
  position: relative; padding: 0.5rem 0.9rem; border-radius: 10px; color: var(--muted);
  font-size: 0.92rem; font-weight: 500; transition: color 0.3s;
}
.nav__link::after {
  content: ''; position: absolute; left: 0.9rem; right: 0.9rem; bottom: 0.35rem; height: 2px;
  background: var(--grad); transform: scaleX(0); transform-origin: left; transition: transform 0.35s var(--ease);
  border-radius: 2px;
}
.nav__link:hover, .nav__link.active { color: var(--text); }
.nav__link:hover::after, .nav__link.active::after { transform: scaleX(1); }

.nav__right { display: flex; align-items: center; gap: 0.7rem; }
.theme-toggle {
  width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); display: grid; place-items: center;
  transition: transform 0.3s, background 0.3s;
}
.theme-toggle:hover { transform: rotate(-20deg) scale(1.05); background: var(--surface-2); }

.nav__burger { display: none; flex-direction: column; gap: 5px; width: 42px; height: 42px; border: 1px solid var(--border); border-radius: 12px; align-items: center; justify-content: center; }
.nav__burger span { width: 20px; height: 2px; background: var(--text); border-radius: 2px; transition: 0.3s var(--ease); }
.nav__burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__burger.open span:nth-child(2) { opacity: 0; }
.nav__burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* =====================================================================
   BUTTONS
   ===================================================================== */
.btn {
  --pad: 0.85rem 1.6rem;
  position: relative; display: inline-flex; align-items: center; gap: 0.55rem;
  padding: var(--pad); border-radius: 999px; font-weight: 600; font-size: 0.95rem;
  overflow: hidden; transition: transform 0.3s var(--ease), box-shadow 0.3s; will-change: transform;
}
.btn--sm { padding: 0.55rem 1.1rem; font-size: 0.85rem; }
.btn--glow { color: #fff; background: var(--grad); background-size: 200% 200%; box-shadow: 0 12px 34px -12px var(--violet); animation: gradShift 6s ease infinite; }
.btn--glow::before {
  content: ''; position: absolute; inset: 0; background: linear-gradient(120deg, transparent, rgba(255,255,255,0.35), transparent);
  transform: translateX(-120%); transition: transform 0.6s var(--ease);
}
.btn--glow:hover::before { transform: translateX(120%); }
.btn--glow:hover { transform: translateY(-3px); box-shadow: 0 18px 44px -12px var(--violet); }
@keyframes gradShift { 50% { background-position: 100% 50%; } }

.btn--ghost { color: var(--text); border: 1px solid var(--border); background: var(--surface); }
.btn--ghost:hover { border-color: transparent; background: var(--surface-2); transform: translateY(-3px); box-shadow: var(--shadow); }

/* =====================================================================
   SECTION HEADERS
   ===================================================================== */
.section__head { text-align: center; margin-bottom: 3.5rem; display: grid; gap: 0.6rem; justify-items: center; }
.section__eyebrow { font-family: var(--font-mono); font-size: 0.82rem; letter-spacing: 0.15em; color: var(--cyan); text-transform: uppercase; }
.section__title { font-family: var(--font-head); font-weight: 800; font-size: clamp(1.9rem, 5vw, 3.2rem); line-height: 1.1; letter-spacing: -0.02em; }

/* =====================================================================
   HERO
   ===================================================================== */
.hero { position: relative; min-height: 100svh; display: grid; place-items: center; padding: 6rem 0 5.5rem; overflow: hidden; }
.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.hero__inner { position: relative; z-index: 2; text-align: center; display: grid; justify-items: center; gap: 1.35rem; }

.hero__badge {
  display: inline-flex; align-items: center; gap: 0.55rem; padding: 0.5rem 1.1rem; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); backdrop-filter: blur(8px);
  font-size: 0.85rem; color: var(--muted);
}
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 0 rgba(34,197,94,0.6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(34,197,94,0); } 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); } }

.hero__title { font-family: var(--font-head); font-weight: 800; font-size: clamp(2.6rem, 8vw, 5.5rem); line-height: 1.02; letter-spacing: -0.03em; }
.hero__grad { background: var(--grad); background-size: 200% auto; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: gradShift 5s ease infinite; }
.reveal-line { display: block; overflow: hidden; }
.reveal-line > span { display: block; transform: translateY(110%); animation: lineUp 0.9s var(--ease) forwards; }
.reveal-line:nth-child(2) > span { animation-delay: 0.15s; }
@keyframes lineUp { to { transform: translateY(0); } }

.hero__tagline { max-width: 620px; color: var(--muted); font-size: clamp(1rem, 2vw, 1.18rem); }
.hero__tagline em { color: var(--text); font-style: normal; background: var(--grad-soft); padding: 0 0.3em; border-radius: 6px; }

.hero__cta { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; }
.hero__socials { display: flex; gap: 0.8rem; margin-top: 0.4rem; }
.hero__socials a {
  width: 46px; height: 46px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface);
  display: grid; place-items: center; color: var(--muted); font-size: 1.05rem;
  transition: transform 0.3s var(--ease), color 0.3s, border-color 0.3s, background 0.3s;
}
.hero__socials a:hover { transform: translateY(-5px); color: #fff; border-color: transparent; background: var(--grad); box-shadow: 0 12px 26px -10px var(--violet); }

/* floating orbs */
.hero__orbs { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.orb {
  position: absolute; width: 62px; height: 62px; border-radius: 20px; display: grid; place-items: center;
  font-size: 1.4rem; color: #fff; background: var(--surface); border: 1px solid var(--border);
  backdrop-filter: blur(6px); box-shadow: var(--shadow);
}
.orb--flutter { top: 22%; left: 12%; color: var(--cyan); animation: bob 6s ease-in-out infinite; }
.orb--fire { top: 30%; right: 13%; color: #fb923c; animation: bob 7s ease-in-out infinite 0.5s; }
.orb--code { bottom: 26%; left: 16%; color: var(--violet); animation: bob 8s ease-in-out infinite 1s; }
.orb--android { bottom: 30%; right: 15%; color: #a3e635; animation: bob 6.5s ease-in-out infinite 0.8s; }
@keyframes bob { 50% { transform: translateY(-22px) rotate(6deg); } }
@media (max-width: 900px) { .hero__orbs { display: none; } }

.hero__scroll { position: absolute; bottom: 1.4rem; left: 50%; transform: translateX(-50%); z-index: 2; display: grid; justify-items: center; gap: 0.4rem; color: var(--faint); font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; }
.mouse { width: 24px; height: 38px; border: 2px solid var(--faint); border-radius: 14px; display: grid; justify-items: center; padding-top: 6px; }
.mouse span { width: 4px; height: 8px; border-radius: 4px; background: var(--cyan); animation: scrollDot 1.6s infinite; }
@keyframes scrollDot { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 80% { opacity: 0; transform: translateY(12px); } }
/* hide the scroll cue when the hero is short (zoom / small laptops) so it can't overlap content */
@media (max-height: 860px) { .hero__scroll { display: none; } }

/* =====================================================================
   MARQUEE
   ===================================================================== */
.marquee { overflow: hidden; border-block: 1px solid var(--border); padding: 1.1rem 0; background: var(--surface); }
.marquee__track { display: flex; align-items: center; gap: 2.4rem; white-space: nowrap; width: max-content; animation: scrollX 26s linear infinite; }
.marquee__track span { font-family: var(--font-head); font-weight: 800; font-size: clamp(1.3rem, 3.5vw, 2.2rem); color: var(--text); opacity: 0.85; }
.marquee__track i { color: var(--violet); font-style: normal; }
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes scrollX { to { transform: translateX(-50%); } }

/* =====================================================================
   STATS / UPWORK
   ===================================================================== */
.stats-wrap { padding-block: clamp(3rem, 7vw, 5.5rem); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; }
.stat { text-align: center; padding: 1.6rem 1rem; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); transition: transform 0.4s var(--ease), border-color 0.4s; }
.stat:hover { transform: translateY(-6px); border-color: color-mix(in srgb, var(--violet) 50%, transparent); }
.stat__num { font-family: var(--font-head); font-weight: 800; font-size: clamp(2.2rem, 5vw, 3.4rem); background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; line-height: 1; }
.stat__label { color: var(--muted); font-size: 0.9rem; margin-top: 0.5rem; }
@media (max-width: 640px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* Upwork verification bar */
.upwork-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  padding: 1rem 1.5rem; margin-bottom: 1.6rem; border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--upwork-lite) 45%, transparent);
  background: linear-gradient(90deg, color-mix(in srgb, var(--upwork) 20%, transparent), color-mix(in srgb, var(--upwork) 4%, transparent));
  transition: transform 0.3s var(--ease), border-color 0.3s, box-shadow 0.3s;
}
.upwork-bar:hover { transform: translateY(-2px); border-color: var(--upwork-lite); box-shadow: 0 16px 40px -18px var(--upwork); }
.upwork-bar__left { display: inline-flex; align-items: center; gap: 0.8rem; color: var(--muted); font-size: 0.98rem; }
.upwork-bar__left i { font-size: 1.5rem; color: var(--upwork-lite); flex-shrink: 0; }
.upwork-bar__left b { color: var(--text); font-weight: 700; }
.upwork-bar__cta { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 700; color: var(--upwork-lite); white-space: nowrap; }
.upwork-bar__cta i { transition: transform 0.3s var(--ease); }
.upwork-bar:hover .upwork-bar__cta i { transform: translate(3px, -3px); }
@media (max-width: 620px) { .upwork-bar { justify-content: center; text-align: center; } }

/* Hero trust chips */
.hero__trust { display: flex; gap: 0.6rem; flex-wrap: wrap; justify-content: center; }
.trust {
  display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.45rem 0.95rem; border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--upwork-lite) 38%, transparent);
  background: color-mix(in srgb, var(--upwork) 12%, transparent);
  color: var(--text); font-size: 0.82rem; font-weight: 600;
}
.trust i { color: var(--upwork-lite); }

/* Upwork button */
.btn--upwork { color: #fff; background: var(--upwork); box-shadow: 0 12px 30px -12px var(--upwork); }
.btn--upwork:hover { background: #128f00; transform: translateY(-3px); box-shadow: 0 18px 42px -12px var(--upwork); }

/* =====================================================================
   ABOUT
   ===================================================================== */
.about__grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
@media (max-width: 900px) { .about__grid { grid-template-columns: 1fr; } }

.about__card { position: relative; padding: 2rem; border-radius: var(--radius-lg); border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.about__card::before { content: ''; position: absolute; inset: -1px; background: var(--grad); opacity: 0.14; z-index: -1; }
.about__avatar { position: relative; width: 130px; height: 130px; margin: 0 auto 1.6rem; display: grid; place-items: center; border-radius: 50%; background: var(--grad); font-family: var(--font-head); font-weight: 800; font-size: 3rem; color: #fff; }
.about__ring { position: absolute; inset: -12px; border-radius: 50%; border: 2px dashed color-mix(in srgb, var(--cyan) 60%, transparent); animation: spin 14s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.about__code { font-family: var(--font-mono); font-size: 0.82rem; line-height: 1.9; color: var(--muted); background: rgba(0,0,0,0.25); border: 1px solid var(--border); border-radius: 14px; padding: 1.1rem 1.3rem; display: grid; }
body.light .about__code { background: rgba(10,12,30,0.04); }
.c-key { color: #c084fc; } .c-var { color: #67e8f9; } .c-str { color: #86efac; } .c-num { color: #fca5a5; }

.about__content > p { color: var(--muted); margin-top: 1rem; max-width: 60ch; }
.about__content strong { color: var(--text); }
.about__content em { color: var(--cyan); font-style: italic; }
.section__eyebrow { display: inline-block; }
.about__content .section__title { text-align: left; margin: 0.5rem 0 0; }

.about__info { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem 1.4rem; margin: 1.8rem 0; }
.about__info div { display: grid; padding: 0.7rem 0.9rem; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); }
.about__info span { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--faint); }
.about__info b { font-size: 0.92rem; }
@media (max-width: 480px) { .about__info { grid-template-columns: 1fr; } }
.about__actions { display: flex; gap: 1rem; flex-wrap: wrap; }

/* =====================================================================
   SERVICES
   ===================================================================== */
.services__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
@media (max-width: 820px) { .services__grid { grid-template-columns: 1fr; } }
.service {
  position: relative; padding: 2.2rem 1.8rem; border-radius: var(--radius-lg); border: 1px solid var(--border);
  background: var(--surface); overflow: hidden; transition: transform 0.4s var(--ease), border-color 0.4s;
}
.service::after { content: ''; position: absolute; inset: 0; background: var(--grad-soft); opacity: 0; transition: opacity 0.4s; z-index: -1; }
.service:hover::after { opacity: 1; }
.service:hover { border-color: color-mix(in srgb, var(--violet) 45%, transparent); }
.service__icon { width: 62px; height: 62px; border-radius: 18px; display: grid; place-items: center; font-size: 1.6rem; color: #fff; background: var(--grad); margin-bottom: 1.3rem; box-shadow: 0 12px 30px -12px var(--violet); }
.service h3 { font-family: var(--font-head); font-size: 1.25rem; margin-bottom: 0.6rem; }
.service p { color: var(--muted); font-size: 0.95rem; }
.service__num { position: absolute; top: 1.2rem; right: 1.4rem; font-family: var(--font-head); font-weight: 800; font-size: 2.6rem; color: var(--surface-2); -webkit-text-stroke: 1px var(--border); }

/* =====================================================================
   SKILLS
   ===================================================================== */
.skills__wrap { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
@media (max-width: 820px) { .skills__wrap { grid-template-columns: 1fr; } }
.skillbar { margin-bottom: 1.4rem; }
.skillbar__top { display: flex; justify-content: space-between; margin-bottom: 0.5rem; font-weight: 600; font-size: 0.95rem; }
.skillbar__top b { color: var(--cyan); font-family: var(--font-mono); }
.skillbar__track { height: 9px; border-radius: 9px; background: var(--surface-2); overflow: hidden; }
.skillbar__track i { display: block; height: 100%; width: 0; border-radius: 9px; background: var(--grad); transition: width 1.3s var(--ease); position: relative; }
.skillbar.in-view .skillbar__track i { width: var(--w); }

.skills__chips { display: flex; flex-wrap: wrap; gap: 0.7rem; align-content: center; }
.chip {
  display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.6rem 1.05rem; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); font-size: 0.9rem; font-weight: 500;
  transition: transform 0.3s var(--ease), color 0.3s, border-color 0.3s, background 0.3s;
}
.chip i { color: var(--cyan); }
.chip:hover { transform: translateY(-4px) scale(1.05); border-color: transparent; background: var(--grad); color: #fff; box-shadow: 0 10px 24px -10px var(--violet); }
.chip:hover i { color: #fff; }

/* =====================================================================
   TIMELINE
   ===================================================================== */
.timeline { position: relative; max-width: 760px; margin-inline: auto; padding-left: 2.2rem; }
.timeline::before { content: ''; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: linear-gradient(var(--cyan), var(--violet), var(--pink)); border-radius: 2px; }
.timeline__item { position: relative; padding: 0 0 2.4rem 1.4rem; }
.timeline__item:last-child { padding-bottom: 0; }
.timeline__dot { position: absolute; left: -2.2rem; top: 4px; width: 16px; height: 16px; border-radius: 50%; background: var(--bg); border: 3px solid var(--cyan); box-shadow: 0 0 0 4px color-mix(in srgb, var(--cyan) 20%, transparent); }
.timeline__dot--edu { border-color: var(--pink); box-shadow: 0 0 0 4px color-mix(in srgb, var(--pink) 20%, transparent); }
.timeline__date { font-family: var(--font-mono); font-size: 0.78rem; color: var(--cyan); letter-spacing: 0.05em; }
.timeline__item h3 { font-family: var(--font-head); font-size: 1.2rem; margin: 0.3rem 0 0.1rem; }
.timeline__org { color: var(--violet); font-weight: 600; font-size: 0.9rem; }
.timeline__item p { color: var(--muted); font-size: 0.94rem; margin-top: 0.5rem; }

/* =====================================================================
   PROJECTS
   ===================================================================== */
/* Top-level Flutter / FlutterFlow tabs */
.worktabs { display: flex; gap: 0.4rem; justify-content: center; width: max-content; max-width: 100%; margin: 0 auto 1.5rem; padding: 0.4rem; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); flex-wrap: wrap; }
.worktab { display: inline-flex; align-items: center; gap: 0.55rem; padding: 0.7rem 1.6rem; border-radius: 999px; color: var(--muted); font-weight: 600; font-size: 0.98rem; transition: color 0.3s, background 0.3s, box-shadow 0.3s; }
.worktab i { font-size: 0.95rem; }
.worktab__count { font-size: 0.7rem; font-family: var(--font-mono); padding: 0.12rem 0.5rem; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.worktab.is-active { color: #fff; background: var(--grad); box-shadow: 0 10px 26px -12px var(--violet); }
.worktab.is-active .worktab__count { background: rgba(0,0,0,0.28); color: #fff; }
.worktab:not(.is-active):hover { color: var(--text); background: var(--surface-2); }

.filters { display: flex; gap: 0.6rem; justify-content: center; margin-bottom: 2.6rem; flex-wrap: wrap; }
.filters.hidden { display: none; }
.filter { padding: 0.55rem 1.3rem; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); font-weight: 500; font-size: 0.9rem; transition: 0.3s var(--ease); }
.filter.is-active, .filter:hover { color: #fff; border-color: transparent; background: var(--grad); box-shadow: 0 10px 24px -12px var(--violet); }

.projects__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
@media (max-width: 900px) { .projects__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .projects__grid { grid-template-columns: 1fr; } }

.project {
  position: relative; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border);
  background: var(--surface); min-height: 280px; display: flex; flex-direction: column;
  transition: transform 0.45s var(--ease), border-color 0.45s, opacity 0.4s;
  transform-style: preserve-3d;
}
.project.hide { display: none; }
.project { cursor: pointer; }
.project:hover { border-color: color-mix(in srgb, var(--accent, var(--violet)) 55%, transparent); transform: translateY(-6px); box-shadow: 0 26px 50px -28px color-mix(in srgb, var(--accent, var(--violet)) 70%, #000); }
.project__thumb { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #0d0d16; }
.project__thumb img { width: 100%; height: 100%; object-fit: cover; object-position: center; transition: transform 0.6s var(--ease); }
.project:hover .project__thumb img { transform: scale(1.06); }
.project__badge { position: absolute; top: 0.85rem; left: 0.85rem; z-index: 3; font-size: 0.68rem; font-weight: 600; letter-spacing: 0.04em; padding: 0.3rem 0.7rem; border-radius: 999px; color: #fff; background: color-mix(in srgb, var(--accent, var(--violet)) 88%, transparent); backdrop-filter: blur(4px); box-shadow: 0 6px 16px -6px #000; }
.project__overlay { position: absolute; inset: 0; z-index: 2; display: flex; align-items: flex-end; padding: 1rem; background: linear-gradient(to top, rgba(0,0,0,0.72), transparent 60%); opacity: 0; transition: opacity 0.4s var(--ease); }
.project:hover .project__overlay { opacity: 1; }
.project__view { display: inline-flex; align-items: center; gap: 0.5rem; color: #fff; font-weight: 600; font-size: 0.9rem; transform: translateY(8px); transition: transform 0.4s var(--ease); }
.project:hover .project__view { transform: translateY(0); }
.project__view i { transition: transform 0.3s var(--ease); }
.project:hover .project__view i { transform: translateX(4px); }
.project__body { padding: 1.1rem 1.3rem 1.35rem; display: flex; flex-direction: column; gap: 0.4rem; flex: 1; }
.project__tag { font-family: var(--font-mono); font-size: 0.72rem; color: var(--accent, var(--cyan)); text-transform: uppercase; letter-spacing: 0.08em; }
.project__body h3 { font-family: var(--font-head); font-size: 1.12rem; }
.project__body p { color: var(--muted); font-size: 0.88rem; flex: 1; line-height: 1.5; }
.project__stack { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-top: 0.5rem; }
.project__stack span { font-size: 0.7rem; padding: 0.25rem 0.6rem; border-radius: 6px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }
.project__stack span.more { color: var(--accent, var(--cyan)); border-color: color-mix(in srgb, var(--accent, var(--violet)) 40%, transparent); }

.section__sub { color: var(--muted); max-width: 52ch; margin-top: 0.4rem; font-size: 0.98rem; }

/* ---------- PROJECT DETAIL MODAL ---------- */
.modal { position: fixed; inset: 0; z-index: 1000; display: none; }
.modal.open { display: block; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(3, 3, 8, 0.72); backdrop-filter: blur(8px); animation: fade 0.3s var(--ease); }
@keyframes fade { from { opacity: 0; } }
.modal__panel {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0.96);
  width: min(100% - 2rem, 1080px); max-height: 90vh; border-radius: var(--radius-lg);
  background: var(--bg-soft); border: 1px solid var(--border); box-shadow: 0 40px 120px -30px #000;
  opacity: 0; transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
  display: grid; grid-template-columns: 1.05fr 0.95fr; overflow: hidden;
}
.modal.open .modal__panel { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.modal__panel ::-webkit-scrollbar { width: 8px; }
.modal__close { position: absolute; top: 1rem; right: 1rem; z-index: 6; width: 42px; height: 42px; border-radius: 12px; background: rgba(0,0,0,0.45); backdrop-filter: blur(6px); color: #fff; display: grid; place-items: center; font-size: 1.1rem; transition: 0.3s var(--ease); }
.modal__close:hover { background: var(--accent, var(--violet)); transform: rotate(90deg); }

.modal__gallery { background: #08080e; border-right: 1px solid var(--border); display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.modal__stage { position: relative; flex: 1; min-height: 0; display: grid; place-items: center; overflow: hidden; padding: 0.9rem; }
.modal__stage img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; border-radius: 8px; animation: fade 0.3s var(--ease); }
.modal__nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 4; width: 46px; height: 46px; border-radius: 50%; background: rgba(0,0,0,0.5); backdrop-filter: blur(6px); color: #fff; display: grid; place-items: center; font-size: 1rem; transition: 0.3s var(--ease); }
.modal__nav:hover { background: var(--accent, var(--violet)); }
.modal__nav--prev { left: 1rem; } .modal__nav--next { right: 1rem; }
.modal__counter { position: absolute; bottom: 0.9rem; right: 1rem; z-index: 4; font-family: var(--font-mono); font-size: 0.75rem; color: #fff; background: rgba(0,0,0,0.5); padding: 0.2rem 0.6rem; border-radius: 999px; }
.modal__thumbs { display: flex; gap: 0.6rem; padding: 0.9rem; overflow-x: auto; border-top: 1px solid var(--border); flex-shrink: 0; }
.modal__thumbs img { width: 82px; aspect-ratio: 4/3; object-fit: cover; border-radius: 10px; border: 2px solid transparent; opacity: 0.55; cursor: pointer; transition: 0.3s var(--ease); flex-shrink: 0; }
.modal__thumbs img:hover { opacity: 0.9; }
.modal__thumbs img.active { opacity: 1; border-color: var(--accent, var(--violet)); }

.modal__body { padding: 2.4rem 1.9rem 2rem; overflow-y: auto; min-height: 0; }
.modal__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 0.5rem; }
.modal__tag { font-family: var(--font-mono); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent, var(--cyan)); }
.modal__platform { font-size: 0.8rem; color: var(--muted); display: inline-flex; align-items: center; gap: 0.4rem; }
.modal__title { font-family: var(--font-head); font-weight: 800; font-size: clamp(1.5rem, 4vw, 2.2rem); line-height: 1.1; }
.modal__desc { color: var(--muted); margin-top: 0.8rem; line-height: 1.7; }
.modal__section { margin-top: 1.5rem; }
.modal__section h4 { font-size: 0.95rem; display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.8rem; }
.modal__section h4 i { color: var(--accent, var(--cyan)); }
.modal__tech { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.modal__tech span { font-size: 0.82rem; padding: 0.45rem 0.9rem; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); color: var(--text); }
.modal__actions { display: flex; gap: 0.9rem; flex-wrap: wrap; margin-top: 1.8rem; }
.modal__actions .btn--glow { background: var(--accent, var(--violet)); }
.modal__actions .btn.is-disabled { pointer-events: none; opacity: 0.55; filter: grayscale(0.3); }

/* stack gallery over details on narrow screens */
@media (max-width: 860px) {
  .modal__panel { grid-template-columns: 1fr; grid-template-rows: auto 1fr; overflow-y: auto; }
  .modal__gallery { border-right: none; border-bottom: 1px solid var(--border); }
  .modal__stage { min-height: 46vw; max-height: 52vh; }
  .modal__body { overflow: visible; padding: 1.5rem 1.4rem 1.8rem; }
}
@media (max-width: 480px) { .modal__actions .btn { flex: 1; justify-content: center; } }

/* =====================================================================
   TESTIMONIALS
   ===================================================================== */
.testimonials__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; align-items: stretch; }
@media (max-width: 900px) { .testimonials__grid { grid-template-columns: 1fr; max-width: 640px; margin-inline: auto; } }

.testimonial {
  position: relative; display: flex; flex-direction: column; padding: 2rem 1.8rem;
  border-radius: var(--radius-lg); border: 1px solid var(--border); background: var(--surface); overflow: hidden;
  transition: transform 0.4s var(--ease), border-color 0.4s, box-shadow 0.4s;
}
.testimonial::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--accent, var(--violet)); opacity: 0.85; }
.testimonial:hover { transform: translateY(-6px); border-color: color-mix(in srgb, var(--accent, var(--violet)) 45%, transparent); box-shadow: 0 26px 50px -28px color-mix(in srgb, var(--accent, var(--violet)) 65%, #000); }
.testimonial__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.5rem; }
.testimonial__mark { font-size: 1.8rem; color: color-mix(in srgb, var(--accent, var(--violet)) 55%, transparent); }
.testimonial__source { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.76rem; font-weight: 700; color: #fff; background: var(--upwork); padding: 0.32rem 0.75rem; border-radius: 999px; transition: background 0.3s, transform 0.3s; }
.testimonial__source:hover { background: #128f00; transform: translateY(-2px); }
.testimonial__stars { display: flex; gap: 0.15rem; color: #fbbf24; font-size: 0.85rem; margin-bottom: 0.85rem; }
.testimonial__text { color: var(--muted); font-size: 0.95rem; line-height: 1.75; flex: 1; }
.testimonial__author { display: flex; align-items: center; gap: 0.85rem; margin-top: 1.4rem; padding-top: 1.2rem; border-top: 1px solid var(--border); }
.testimonial__avatar { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-head); font-weight: 800; font-size: 1.1rem; color: #fff; background: linear-gradient(135deg, var(--accent, var(--violet)), color-mix(in srgb, var(--accent, var(--violet)) 35%, #000)); flex-shrink: 0; }
.testimonial__meta { display: grid; gap: 0.15rem; }
.testimonial__meta b { font-size: 0.95rem; }
.testimonial__meta span { font-size: 0.78rem; color: var(--muted); display: inline-flex; align-items: center; gap: 0.35rem; }
.testimonial__meta span i { color: var(--upwork-lite); }

/* =====================================================================
   CONTACT
   ===================================================================== */
.contact__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); }
@media (max-width: 820px) { .contact__grid { grid-template-columns: 1fr; } }
.contact__info .section__title { text-align: left; }
.contact__info > p { color: var(--muted); margin-top: 1rem; max-width: 44ch; }
.contact__list { list-style: none; margin: 1.8rem 0; display: grid; gap: 0.9rem; }
.contact__list li { display: flex; align-items: center; gap: 0.9rem; padding: 0.85rem 1rem; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); transition: transform 0.3s var(--ease), border-color 0.3s; }
.contact__list li:hover { transform: translateX(6px); border-color: color-mix(in srgb, var(--cyan) 45%, transparent); }
.contact__list i { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--grad); color: #fff; flex-shrink: 0; }
.contact__socials { display: flex; gap: 0.7rem; }
.contact__socials a { width: 46px; height: 46px; border-radius: 13px; border: 1px solid var(--border); background: var(--surface); display: grid; place-items: center; color: var(--muted); transition: 0.3s var(--ease); }
.contact__socials a:hover { transform: translateY(-4px); color: #fff; background: var(--grad); border-color: transparent; }

.contact__form { padding: 2rem; border-radius: var(--radius-lg); border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow); }
.field { position: relative; margin-bottom: 1.3rem; }
.field input, .field textarea {
  width: 100%; padding: 1.1rem 1rem 0.5rem; border-radius: 12px; border: 1px solid var(--border);
  background: var(--bg-soft); color: var(--text); font-family: inherit; font-size: 0.95rem; resize: vertical;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.field textarea { padding-top: 1.4rem; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 3px color-mix(in srgb, var(--violet) 22%, transparent); }
.field label { position: absolute; left: 1rem; top: 0.9rem; color: var(--faint); font-size: 0.95rem; pointer-events: none; transition: 0.25s var(--ease); }
.field input:focus + label, .field input:not(:placeholder-shown) + label,
.field textarea:focus + label, .field textarea:not(:placeholder-shown) + label {
  top: 0.35rem; font-size: 0.7rem; color: var(--cyan); letter-spacing: 0.03em;
}
.field.invalid input, .field.invalid textarea { border-color: #f43f5e; box-shadow: 0 0 0 3px rgba(244,63,94,0.18); }
.contact__note { margin-top: 0.9rem; font-size: 0.88rem; min-height: 1.2em; }
.contact__note.ok { color: #4ade80; }
.contact__note.err { color: #f87171; }

/* =====================================================================
   FOOTER
   ===================================================================== */
.footer { border-top: 1px solid var(--border); padding: 2.2rem 0; background: var(--surface); }
.footer__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.footer__logo { font-family: var(--font-head); font-weight: 800; font-size: 1.2rem; }
.footer__logo span { background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.footer p { color: var(--muted); font-size: 0.9rem; }
.footer p i { color: var(--pink); }
.footer__top { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); display: grid; place-items: center; transition: 0.3s var(--ease); }
.footer__top:hover { background: var(--grad); color: #fff; border-color: transparent; transform: translateY(-4px); }

/* =====================================================================
   SCROLL REVEAL
   ===================================================================== */
.reveal { opacity: 0; transform: translateY(34px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.reveal.in-view { opacity: 1; transform: translateY(0); }

/* =====================================================================
   MOBILE NAV
   ===================================================================== */
@media (max-width: 940px) {
  .nav__burger { display: flex; }
  .nav__links {
    position: fixed; inset: 0 0 0 auto; width: min(78vw, 340px); flex-direction: column; justify-content: center; gap: 0.8rem;
    padding: 2rem; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(20px);
    border-left: 1px solid var(--border); transform: translateX(100%); transition: transform 0.45s var(--ease); z-index: 90;
  }
  .nav__links.open { transform: translateX(0); }
  .nav__link { font-size: 1.15rem; }
  .nav .btn--sm { display: none; }
}

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