/* ============================================================
   DARK GLOSSY PORTFOLIO — Modern Vine-Connected Theme
   Premium dark UI · Neon accents · Animated text · Vine stem
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;700&display=swap');

/* ============ DESIGN TOKENS ============ */
:root {
  /* Deep dark palette */
  --bg0: #030308;
  --bg1: #07070f;
  --bg2: #0c0c1a;

  /* Text */
  --text: #f0f2ff;
  --text-dim: rgba(240, 242, 255, 0.6);
  --muted-color: rgba(240, 242, 255, 0.45);

  /* Neon accents */
  --accent-violet: #8b5cf6;
  --accent-cyan: #06d6a0;
  --accent-rose: #f472b6;
  --accent-blue: #3b82f6;
  --accent-amber: #f59e0b;

  /* Reusable gradients */
  --grad-neon: linear-gradient(135deg, var(--accent-violet), var(--accent-cyan));
  --grad-neon-hot: linear-gradient(135deg, var(--accent-rose), var(--accent-violet));
  --grad-neon-cool: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  --grad-rainbow: linear-gradient(90deg, var(--accent-violet), var(--accent-cyan), var(--accent-rose), var(--accent-amber), var(--accent-violet));

  /* Glass surfaces */
  --glass-bg: rgba(255, 255, 255, 0.035);
  --glass-bg-hover: rgba(255, 255, 255, 0.065);
  --glass-stroke: rgba(255, 255, 255, 0.07);
  --glass-stroke-hover: rgba(255, 255, 255, 0.15);
  --glass-blur: 24px;

  /* Glossy sheen (top highlight) */
  --gloss-sheen: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.10) 0%,
    rgba(255, 255, 255, 0.02) 25%,
    rgba(255, 255, 255, 0) 50%
  );

  /* Shadows */
  --shadow-sm: 0 4px 20px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 8px 40px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.65);
  --shadow-glow-v: 0 0 40px rgba(139, 92, 246, 0.12);
  --shadow-glow-c: 0 0 40px rgba(6, 214, 160, 0.10);

  /* Geometry */
  --radius: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;
  --container: 1140px;

  /* Vine / stem */
  --vine-color: rgba(139, 92, 246, 0.35);
  --vine-glow: rgba(139, 92, 246, 0.25);
  --leaf-size: 14px;

  /* Focus */
  --focus-ring: 0 0 0 3px rgba(139, 92, 246, 0.4);

  /* Scroll-reactive background colors (Premium Black & Lightblue) */
  --bg-dyn-1: rgba(0, 150, 255, 0.16);
  --bg-dyn-2: rgba(0, 100, 255, 0.10);
  --bg-dyn-3: rgba(50, 130, 255, 0.08);
  --bg-dyn-4: rgba(0, 0, 0, 0.05);
}

/* ============ RESET ============ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; height: 100%; }

body {
  margin: 0;
  font-family: 'Outfit', system-ui, -apple-system, sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 900px at 8% 5%, var(--bg-dyn-1), transparent 65%),
    radial-gradient(1000px 800px at 92% 15%, var(--bg-dyn-2), transparent 60%),
    radial-gradient(1100px 900px at 50% 90%, var(--bg-dyn-3), transparent 65%),
    linear-gradient(180deg, #020205 0%, #050512 45%, #08081a 100%);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background 700ms ease;
}

/* Scroll snap */
body { scroll-snap-type: y mandatory; overflow-y: auto; }
section { scroll-snap-align: start; scroll-snap-stop: always; }

a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }

/* ============ ATMOSPHERIC BACKGROUND ============ */

body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none; z-index: -2;
  background:
    radial-gradient(ellipse 900px 700px at 12% 8%, var(--bg-dyn-1), transparent 60%),
    radial-gradient(ellipse 700px 500px at 88% 12%, var(--bg-dyn-2), transparent 55%),
    radial-gradient(ellipse 900px 700px at 50% 92%, var(--bg-dyn-3), transparent 60%),
    radial-gradient(ellipse 500px 350px at 30% 55%, var(--bg-dyn-4), transparent 50%);
  transition: background 700ms ease, opacity 600ms ease;
}

/* Noise */
body::after {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none; z-index: -1;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 200px;
}

/* ============ UTILITIES ============ */

.container {
  width: min(var(--container), calc(100% - 2rem));
  margin-inline: auto;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: -999px; top: 0;
  padding: .75rem 1rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-stroke);
  border-radius: 12px;
  z-index: 999;
}
.skip-link:focus { left: 1rem; top: 1rem; outline: none; box-shadow: var(--focus-ring); }

.pad { padding: 1.5rem; }
.pad-sm { padding: 1rem; }
.mt  { margin-top: 1rem; }
.mt-xl { margin-top: 3.5rem; }
.mb-sm { margin-bottom: .75rem; }
.muted { color: var(--text-dim); }
.small { font-size: .875rem; }

/* ============ ANIMATED ORB BACKGROUND ============ */

.bg { position: fixed; inset: 0; pointer-events: none; z-index: -1; }

.orb {
  position: absolute; border-radius: 50%;
  filter: blur(90px); opacity: .45;
  will-change: transform;
}

.orb-1 {
  width: 520px; height: 520px;
  left: -120px; top: -140px;
  background: radial-gradient(circle, rgba(139,92,246,.35), transparent 70%);
  animation: orbFloat1 14s ease-in-out infinite;
}
.orb-2 {
  width: 460px; height: 460px;
  right: -110px; top: -90px;
  background: radial-gradient(circle, rgba(6,214,160,.22), transparent 70%);
  animation: orbFloat2 18s ease-in-out infinite;
}
.orb-3 {
  width: 550px; height: 550px;
  left: 28%; bottom: -220px;
  background: radial-gradient(circle, rgba(244,114,182,.18), transparent 70%);
  animation: orbFloat3 16s ease-in-out infinite;
}

/* Grid overlay */
.grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 64px 64px;
  opacity: .4;
  mask-image: radial-gradient(ellipse 80% 50% at 50% 30%, black, transparent);
  -webkit-mask-image: radial-gradient(ellipse 80% 50% at 50% 30%, black, transparent);
  animation: gridPan 50s linear infinite;
}

/* =============================================================
   VINE / STEM CONNECTOR — Leaves connected through stem
   ============================================================= */

/* The main vertical vine stem */
main#main {
  position: relative;
}

main#main::before {
  content: "";
  position: fixed;
  top: 70px;
  bottom: 30px;
  left: max(1.5rem, calc((100vw - var(--container)) / 2 - 32px));
  width: 2px;
  background: linear-gradient(
    180deg,
    transparent 0%,
    var(--vine-color) 5%,
    rgba(6,214,160,.25) 25%,
    var(--vine-color) 50%,
    rgba(244,114,182,.2) 75%,
    rgba(6,214,160,.2) 90%,
    transparent 100%
  );
  pointer-events: none;
  z-index: 2;
  animation: vineGlow 4s ease-in-out infinite;
}

/* Flowing light particle on the stem */
main#main::after {
  content: "";
  position: fixed;
  left: max(1.5rem, calc((100vw - var(--container)) / 2 - 32px));
  top: 70px;
  width: 2px;
  height: 60px;
  background: linear-gradient(180deg, transparent, var(--accent-cyan), transparent);
  pointer-events: none;
  z-index: 3;
  animation: vineParticle 5s ease-in-out infinite;
  filter: blur(1px);
  opacity: .8;
}

/* Leaf node at each section — the "leaf" connecting to the vine */
section {
  position: relative;
}

/* Leaf circle */
section::before {
  content: "";
  position: absolute;
  left: -32px;
  top: 2.5rem;
  width: var(--leaf-size);
  height: var(--leaf-size);
  border-radius: 50%;
  background: var(--grad-neon);
  box-shadow:
    0 0 12px rgba(139,92,246,.5),
    0 0 4px rgba(6,214,160,.4),
    inset 0 1px 2px rgba(255,255,255,.3);
  z-index: 3;
  animation: leafPulse 3s ease-in-out infinite;
  transition: transform .3s ease, box-shadow .3s ease;
}

/* Leaf branch — small line connecting node to section */
section::after {
  content: "";
  position: absolute;
  left: -20px;
  top: calc(2.5rem + 6px);
  width: 28px;
  height: 2px;
  background: linear-gradient(90deg, var(--vine-color), rgba(139,92,246,.08));
  z-index: 2;
  border-radius: 2px;
  transition: width .3s ease, opacity .3s ease;
  opacity: .7;
}

section > * {
  position: relative;
  z-index: 4;
}

/* Leaf grows on hover */
section:hover::before {
  transform: scale(1.3);
  box-shadow:
    0 0 20px rgba(139,92,246,.6),
    0 0 8px rgba(6,214,160,.5),
    inset 0 1px 2px rgba(255,255,255,.3);
}
section:hover::after {
  width: 38px;
  opacity: 1;
}

/* Hide vine on mobile */
@media (max-width: 900px) {
  main#main::before,
  main#main::after { display: none; }
  section::before,
  section::after   { display: none; }
}

/* ============ GLASS CARD SYSTEM ============ */

.glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-stroke);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  position: relative;
  overflow: hidden;
}

/* Glossy sheen overlay */
.glass::before {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: var(--gloss-sheen);
  z-index: 1;
}

/* Animated border glow on hover */
.glass::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  pointer-events: none;
  z-index: -1;
  background: conic-gradient(from 0deg, var(--accent-violet), var(--accent-cyan), var(--accent-rose), var(--accent-violet));
  opacity: 0;
  transition: opacity .4s ease;
  filter: blur(3px);
  animation: borderSpin 6s linear infinite;
}

/* Shared transitions */
.glass, .chip, .tag, .btn, .project,
.cert, .contact-item, .stat,
.upload__drop, .icon-btn {
  transition:
    transform .3s cubic-bezier(.34,1.56,.64,1),
    background .25s ease,
    box-shadow .3s ease,
    border-color .25s ease;
  transform: translateZ(0);
}

/* Glass hover */
.glass:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg), var(--shadow-glow-v);
  border-color: var(--glass-stroke-hover);
  background: var(--glass-bg-hover);
}
.glass:hover::after { opacity: .12; }

@media (hover: none) {
  .glass:hover, .btn:hover, .chip:hover, .tag:hover,
  .icon-btn:hover, .contact-item:hover, .cert:hover,
  .upload__drop:hover {
    transform: none;
    box-shadow: var(--shadow-md);
  }
  .glass:hover::after { opacity: 0; }
}

/* ============ HEADER / NAV ============ */

.header {
  position: sticky; top: 0; z-index: 30;
  padding: .75rem 0;
  background: linear-gradient(180deg, rgba(3,3,8,.88) 0%, rgba(3,3,8,.4) 70%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.nav {
  display: flex; align-items: center;
  justify-content: space-between; gap: 1rem;
}

.brand {
  display: flex; align-items: center; gap: .6rem;
  padding: .5rem .85rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--glass-stroke);
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
}
.brand__dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--grad-neon);
  box-shadow: 0 0 12px rgba(139,92,246,.5), 0 0 4px rgba(6,214,160,.4);
  animation: dotPulse 2.5s ease-in-out infinite;
}
.brand--mini { padding: 0; border: none; background: transparent; }
.brand--mini .brand__dot { width: 9px; height: 9px; }
.brand__text { font-weight: 700; letter-spacing: .02em; font-size: .95rem; }

.nav__toggle {
  display: none; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  border-radius: 12px;
  border: 1px solid var(--glass-stroke);
  background: var(--glass-bg);
  cursor: pointer;
}
.nav__bar {
  display: block; width: 18px; height: 2px;
  background: var(--text);
  border-radius: 2px; margin: 3px 0;
  transition: transform .3s ease, opacity .3s ease;
}

.nav__links {
  display: flex; align-items: center; gap: .25rem;
  padding: .4rem .5rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--glass-stroke);
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
}
.nav__links a {
  font-weight: 500; font-size: .88rem;
  color: var(--text-dim);
  padding: .4rem .65rem;
  border-radius: 10px;
  transition: background .25s, color .25s, box-shadow .25s;
  position: relative;
}
.nav__links a:hover {
  color: var(--text);
  background: rgba(255,255,255,.05);
}
.nav__links a.is-active {
  color: var(--text);
  background: rgba(139,92,246,.12);
  box-shadow: 0 0 16px rgba(139,92,246,.08);
}

.nav__toggle:focus-visible,
.btn:focus-visible,
.chip:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

/* ============ HERO ============ */

.hero {
  min-height: calc(100vh - 70px);
  display: grid;
  place-items: center;
  padding: 2rem 0;
}

.hero__content {
  padding: 3rem 2.5rem;
  width: min(900px, 100%);
  text-align: center;
  overflow: visible;
}
.hero__content::after { display: none; }

/* ---- Animated hero title ---- */
.hero__title {
  margin: .8rem 0 .7rem;
  font-size: clamp(2.4rem, 5.5vw, 4.2rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -.04em;
}

/* Each letter wrapper for animation */
.hero__title .letter {
  display: inline-block;
  opacity: 0;
  transform: translateY(30px) rotateX(40deg);
  animation: letterReveal .6s cubic-bezier(.23,1,.32,1) forwards;
}

/* Gradient text with shimmer */
.text-grad {
  position: relative;
  /* Fallback: works when text is NOT split into .letter spans */
  background: var(--grad-rainbow);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: rainbowShimmer 6s linear infinite;
}

/* When JS splits into .letter spans (inline-block), 
   background-clip:text on parent breaks. 
   So each letter gets its own gradient. */
.text-grad .letter {
  background: var(--grad-rainbow);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: letterReveal .6s cubic-bezier(.23,1,.32,1) forwards,
             rainbowShimmer 6s linear infinite;
}

/* Glowing underline for name */
.text-grad::after {
  content: "";
  position: absolute;
  bottom: -4px; left: 0; right: 0;
  height: 3px;
  border-radius: 3px;
  background: var(--grad-neon);
  box-shadow: 0 0 14px rgba(139,92,246,.5);
  animation: underlineGlow 2s ease-in-out infinite alternate;
}

.hero__subtitle {
  margin: 0;
  color: var(--text-dim);
  font-size: 1.05rem;
  line-height: 1.75;
  max-width: 630px;
  margin-inline: auto;
  font-weight: 300;
}

/* Subtitle word-by-word fade */
.hero__subtitle .word {
  display: inline-block;
  opacity: 0;
  transform: translateY(8px);
  animation: wordFade .5s ease forwards;
}

/* Welcome typing */
.welcome {
  margin: .75rem 0 0;
  color: var(--text-dim);
  font-weight: 600;
  letter-spacing: .08em;
  font-size: .85rem;
  text-transform: uppercase;
}
.welcome__prefix { color: var(--text-dim); }
.welcome__type {
  display: inline-block; position: relative;
  color: var(--accent-cyan);
  clip-path: inset(0 100% 0 0);
  animation: welcomeReveal 2.1s ease forwards;
}
.welcome__type::after {
  content: "";
  position: absolute; right: -3px; top: 0;
  width: 2px; height: 100%;
  background: var(--accent-cyan);
  box-shadow: 0 0 8px var(--accent-cyan);
  animation: caretBlink .65s step-end infinite, caretFade 2.15s ease forwards;
}

/* Pill */
.pill {
  display: inline-flex; align-items: center;
  gap: .55rem; padding: .5rem 1rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(139,92,246,.18);
  background: rgba(139,92,246,.05);
  color: var(--text-dim);
  font-weight: 500; font-size: .85rem;
  letter-spacing: .02em;
}
.pill__spark {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent-cyan);
  box-shadow: 0 0 10px rgba(6,214,160,.6), 0 0 4px rgba(6,214,160,.9);
  animation: sparkPulse 2s ease-in-out infinite;
}

/* CTA */
.hero__cta {
  display: flex; gap: .85rem; flex-wrap: wrap;
  margin-top: 1.75rem; justify-content: center;
}

/* ============ BUTTONS ============ */

.btn {
  display: inline-flex; align-items: center;
  justify-content: center; gap: .55rem;
  height: 46px; padding: 0 1.35rem;
  border-radius: var(--radius);
  border: 1px solid var(--glass-stroke);
  background: var(--glass-bg);
  color: var(--text);
  font-weight: 600; font-size: .9rem;
  cursor: pointer;
  position: relative; overflow: hidden;
  letter-spacing: .01em;
}
/* Sweep shine */
.btn::before {
  content: "";
  position: absolute; top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.07), transparent);
  transition: left .5s ease;
}
.btn:hover::before { left: 100%; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 4px 20px rgba(0,0,0,.3); }

.btn--primary {
  border: none;
  background: var(--grad-neon);
  color: #030308;
  font-weight: 700;
  box-shadow: 0 4px 24px rgba(139,92,246,.3), 0 2px 8px rgba(6,214,160,.2);
}
.btn--primary:hover {
  box-shadow: 0 6px 32px rgba(139,92,246,.45), 0 4px 14px rgba(6,214,160,.3);
  filter: brightness(1.1);
}

.btn--ghost {
  background: transparent;
  border: 1px solid rgba(255,255,255,.1);
}
.btn--ghost:hover {
  background: rgba(255,255,255,.05);
  border-color: rgba(255,255,255,.18);
}

/* ============ SECTIONS ============ */

.section {
  min-height: calc(100vh - 70px);
  padding: 3.5rem 0 2rem;
  display: flex; flex-direction: column;
  justify-content: flex-start;
  position: relative;
}

.section__header { margin-bottom: 1.75rem; }

.section__title {
  margin: 0;
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -.03em;
  position: relative;
  display: inline-block;
}

/* Animated gradient underline */
.section__title::after {
  content: "";
  position: absolute;
  bottom: -8px; left: 0;
  width: 55px; height: 3px;
  border-radius: 3px;
  background: var(--grad-neon);
  background-size: 200% 100%;
  box-shadow: 0 0 12px rgba(139,92,246,.4);
  animation: lineShimmer 3s ease-in-out infinite;
}

/* Animated letters in section titles */
.section__title .letter {
  display: inline-block;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .4s ease, transform .4s cubic-bezier(.23,1,.32,1);
}
.section__title .letter.visible {
  opacity: 1;
  transform: translateY(0);
}

.section__subtitle {
  margin: .6rem 0 0;
  color: var(--text-dim);
  line-height: 1.65;
  font-weight: 300;
}

/* ============ GRIDS ============ */

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

/* ============ TYPOGRAPHY ============ */

.h3 {
  margin: 0 0 .85rem;
  font-size: 1.1rem; font-weight: 700;
  letter-spacing: -.01em;
}

.mini-title {
  font-weight: 700;
  color: var(--text-dim);
  margin-bottom: .5rem;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-family: 'JetBrains Mono', monospace;
}

/* ============ ABOUT — Timeline ============ */

.timeline { display: flex; flex-direction: column; gap: 1rem; }
.timeline__item { display: flex; gap: .85rem; align-items: flex-start; }

.timeline__dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--grad-neon);
  box-shadow: 0 0 10px rgba(139,92,246,.4);
  margin-top: .35rem;
  flex: 0 0 auto;
  animation: dotPulse 3s ease-in-out infinite;
}

.timeline__title { font-weight: 700; }
.timeline__text  { color: var(--text-dim); margin-top: .2rem; line-height: 1.55; font-weight: 300; }

/* ============ Quick Links / Chips ============ */

.quick-links { display: flex; flex-wrap: wrap; gap: .6rem; }

.chip {
  display: inline-flex; align-items: center;
  gap: .5rem; padding: .5rem .85rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--glass-stroke);
  background: var(--glass-bg);
  color: var(--text-dim);
  font-weight: 600; font-size: .9rem;
  position: relative; overflow: hidden;
}
.chip:hover {
  color: var(--text);
  transform: translateY(-2px);
  border-color: rgba(139,92,246,.3);
  background: rgba(139,92,246,.08);
  box-shadow: 0 0 20px rgba(139,92,246,.1);
}

/* ============ SKILLS ============ */

.skills {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.tag-row { display: flex; flex-wrap: wrap; gap: .5rem; }

.tag {
  display: inline-flex;
  padding: .4rem .7rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--glass-stroke);
  background: var(--glass-bg);
  color: var(--text-dim);
  font-weight: 600; font-size: .82rem;
  transition: all .25s ease;
  font-family: 'JetBrains Mono', monospace;
}
.tag:hover {
  transform: translateY(-2px);
  color: var(--text);
  border-color: rgba(6,214,160,.3);
  background: rgba(6,214,160,.07);
  box-shadow: 0 0 14px rgba(6,214,160,.08);
}

/* Category-specific tag accents */
.tag[data-type="lang"] { border-color: rgba(139, 92, 246, 0.2); }
.tag[data-type="front"] { border-color: rgba(6, 214, 160, 0.2); }
.tag[data-type="back"] { border-color: rgba(244, 114, 182, 0.2); }
.tag[data-type="db"] { border-color: rgba(59, 130, 246, 0.2); }
.tag[data-type="ds"] { border-color: rgba(245, 158, 11, 0.2); }
.tag[data-type="ai"] { border-color: rgba(217, 70, 239, 0.2); }
.tag[data-type="tool"] { border-color: rgba(255, 255, 255, 0.15); }
.tag[data-type="core"] { border-color: rgba(139, 92, 246, 0.2); }
.tag[data-type="deploy"] { border-color: rgba(6, 214, 160, 0.2); }

/* Hover states for specific types */
.tag[data-type="lang"]:hover { border-color: var(--accent-violet); box-shadow: 0 0 12px rgba(139, 92, 246, 0.25); }
.tag[data-type="front"]:hover { border-color: var(--accent-cyan); box-shadow: 0 0 12px rgba(6, 214, 160, 0.25); }
.tag[data-type="back"]:hover { border-color: var(--accent-rose); box-shadow: 0 0 12px rgba(244, 114, 182, 0.25); }
.tag[data-type="db"]:hover { border-color: var(--accent-blue); box-shadow: 0 0 12px rgba(59, 130, 246, 0.25); }
.tag[data-type="ds"]:hover { border-color: var(--accent-amber); box-shadow: 0 0 12px rgba(245, 158, 11, 0.25); }
.tag[data-type="ai"]:hover { border-color: #d946ef; box-shadow: 0 0 12px rgba(217, 70, 239, 0.25); }
.tag[data-type="deploy"]:hover { border-color: var(--accent-cyan); box-shadow: 0 0 12px rgba(6, 214, 160, 0.25); }

.list {
  margin: .25rem 0 0; padding-left: 1.2rem;
  color: var(--text-dim); line-height: 1.7; font-weight: 300;
}
.list li { margin: .4rem 0; }
.list li::marker { color: var(--accent-violet); }

/* ============ PROJECTS ============ */

.projects { display: grid; gap: 1.25rem; }

/* Two-column layout for project cards */
.projects--grid {
  grid-template-columns: repeat(2, 1fr);
}

.project__top {
  display: flex; align-items: center;
  justify-content: space-between; gap: 1rem;
}

.badge {
  display: inline-flex; align-items: center;
  padding: .35rem .7rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(139,92,246,.2);
  background: rgba(139,92,246,.07);
  color: var(--accent-violet);
  font-weight: 700; font-size: .78rem;
  letter-spacing: .02em;
  font-family: 'JetBrains Mono', monospace;
}

/* Tab Navigation */
.project-tabs {
  margin-top: 1rem;
}

.tabs-nav {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .5rem;
  margin-bottom: 2rem;
  border-radius: var(--radius-pill);
  margin-inline: auto;
  position: relative;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none; /* Hide scrollbar Firefox */
}
.tabs-nav::-webkit-scrollbar { display: none; } /* Hide scrollbar Chrome/Safari */

.tab-btn {
  background: transparent;
  border: none;
  padding: .6rem 1.5rem;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: .9rem;
  color: var(--text-dim);
  cursor: pointer;
  transition: all .3s ease;
  position: relative;
  z-index: 2;
}

.tab-btn:hover {
  color: var(--text);
}

.tab-btn.is-active {
  color: #030308;
}

.tab-indicator {
  position: absolute;
  height: calc(100% - 1rem);
  background: var(--grad-neon);
  border-radius: var(--radius-pill);
  z-index: 1;
  transition: all .35s cubic-bezier(.34,1.56,.64,1);
  box-shadow: 0 4px 15px rgba(139,92,246,.3);
}

/* Tab Panels */
.tab-panel {
  display: none;
  animation: panelFade .4s ease forwards;
}

.tab-panel.is-active {
  display: block;
}

@keyframes panelFade {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Category styling (hidden when in tabs) */
.projects-category {
  margin-top: 0;
}

.category-title {
  display: none; /* Hidden in tabbed view */
}

/* Badge variants */
.badge--warning {
  border-color: rgba(245, 158, 11, .3);
  background: rgba(245, 158, 11, .08);
  color: var(--accent-amber);
}

.badge--info {
  border-color: rgba(59, 130, 246, .3);
  background: rgba(59, 130, 246, .08);
  color: var(--accent-blue);
}

.badge--success {
  border-color: rgba(6, 214, 160, .3);
  background: rgba(6, 214, 160, .08);
  color: var(--accent-cyan);
}

.badge--glow {
  border-color: rgba(139, 92, 246, .4);
  background: rgba(139, 92, 246, .1);
  color: var(--text);
  box-shadow: 0 0 12px rgba(139, 92, 246, .2);
  animation: glowPulse 2s infinite ease-in-out;
}

@keyframes glowPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .8; transform: scale(1.02); }
}


/* "In Progress" status badge variant */
.badge--status {
  border-color: rgba(6,214,160,.25);
  background: rgba(6,214,160,.08);
  color: var(--accent-cyan);
  position: relative;
  padding-left: 1.4rem;
}
.badge--status::before {
  content: "";
  position: absolute;
  left: .55rem; top: 50%;
  transform: translateY(-50%);
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent-cyan);
  box-shadow: 0 0 6px var(--accent-cyan);
  animation: statusBlink 1.5s ease-in-out infinite;
}

.project__grid {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
.project__actions {
  display: flex; gap: .75rem;
  flex-wrap: wrap; margin-top: 1.25rem;
}

/* Project card number */
.project { counter-increment: project; }
.project .h3 { position: relative; }

/* Upcoming Project Styling */
.project.upcoming {
  border-style: dashed;
  opacity: .85;
}

.project.upcoming:hover {
  opacity: 1;
  border-style: solid;
}

/* ============ CERTIFICATIONS ============ */

.certs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.cert-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--glass-bg);
  border: 1px solid var(--glass-stroke);
}

.cert-card__image {
  position: relative;
  aspect-ratio: 16 / 11;
  overflow: hidden;
  background: #000;
  border-bottom: 1px solid var(--glass-stroke);
}

.cert-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s cubic-bezier(.23,1,.32,1);
}

.cert-card:hover .cert-card__image img {
  transform: scale(1.08);
}

.cert-card__overlay {
  position: absolute;
  inset: 0;
  background: rgba(3, 3, 8, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .3s ease, background .3s ease;
  z-index: 2;
}

/* Glossy sheen for the overlay */
.cert-card__overlay::before {
  content: "";
  position: absolute; inset: 0;
  background: var(--gloss-sheen);
  pointer-events: none;
}

.cert-card:hover .cert-card__overlay {
  opacity: 1;
}

.cert-card__content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.cert-card__content .h3 {
  margin-bottom: .25rem;
}

.btn--mini {
  height: 36px;
  padding: 0 .85rem;
  font-size: .78rem;
  border-radius: 10px;
}

.upload { margin-top: .85rem; display: flex; flex-direction: column; gap: .85rem; }

.upload__drop {
  position: relative; display: block;
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1.5px dashed rgba(139,92,246,.22);
  background: rgba(139,92,246,.03);
  cursor: pointer; text-align: center;
  transition: all .3s ease;
}
.upload__drop:hover {
  border-color: rgba(139,92,246,.4);
  background: rgba(139,92,246,.06);
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(139,92,246,.08);
}
.upload__drop input {
  position: absolute; inset: 0;
  opacity: 0; cursor: pointer;
}
.upload__title { font-weight: 700; }
.upload__hint  { color: var(--text-dim); margin-top: .3rem; font-size: .82rem; font-weight: 300; }
.upload__actions { display: flex; gap: .75rem; flex-wrap: wrap; }

/* Cert cards */
.certs { display: grid; gap: .75rem; margin-top: .85rem; }

.cert {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  align-items: center; gap: .85rem;
  padding: .85rem;
  border-radius: var(--radius);
  border: 1px solid var(--glass-stroke);
  background: var(--glass-bg);
  transition: all .25s ease;
}
.cert:hover {
  transform: translateY(-2px);
  border-color: var(--glass-stroke-hover);
  background: var(--glass-bg-hover);
  box-shadow: var(--shadow-md);
}

.cert__thumb {
  width: 56px; height: 56px;
  border-radius: 14px;
  border: 1px solid var(--glass-stroke);
  background: var(--glass-bg);
  overflow: hidden;
  display: grid; place-items: center;
}
.cert__thumb img { width: 100%; height: 100%; object-fit: cover; }

.cert__meta { min-width: 0; }
.cert__name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cert__sub  { color: var(--text-dim); font-weight: 500; font-size: .82rem; margin-top: .15rem; }
.cert__actions { display: flex; gap: .5rem; }

.icon-btn {
  width: 40px; height: 40px;
  border-radius: 12px;
  border: 1px solid var(--glass-stroke);
  background: var(--glass-bg);
  cursor: pointer;
  display: grid; place-items: center;
  transition: all .25s ease;
}
.icon-btn:hover {
  background: rgba(139,92,246,.08);
  border-color: rgba(139,92,246,.25);
  transform: translateY(-2px);
  box-shadow: 0 0 14px rgba(139,92,246,.1);
}

/* ============ ACHIEVEMENTS ============ */

.achievements {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  counter-reset: achievement;
}
.achievements .glass { counter-increment: achievement; }
.achievements .glass .h3::before {
  content: "0" counter(achievement);
  display: block;
  font-size: 2rem; font-weight: 900;
  font-family: 'JetBrains Mono', monospace;
  background: var(--grad-neon);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: .4rem;
  opacity: .5;
}

/* ============ CONTACT ============ */

.field { display: grid; gap: .5rem; margin-top: .9rem; }
.field label { color: var(--text-dim); font-weight: 600; font-size: .9rem; }

input, textarea {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--glass-stroke);
  background: rgba(255,255,255,.025);
  padding: .85rem 1rem;
  transition: border-color .25s, box-shadow .25s, background .25s;
}
input:focus, textarea:focus {
  outline: none;
  border-color: rgba(139,92,246,.35);
  background: rgba(139,92,246,.03);
  box-shadow: 0 0 0 3px rgba(139,92,246,.1), 0 0 16px rgba(139,92,246,.05);
}
textarea { resize: vertical; min-height: 130px; }
input::placeholder, textarea::placeholder { color: rgba(240,242,255,.2); }

.row-between { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }

.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.07), transparent);
  margin: 1.25rem 0;
}

.contact-list { display: grid; gap: .75rem; margin-top: .85rem; }

.contact-item {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: .85rem; padding: .9rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--glass-stroke);
  background: var(--glass-bg);
  transition: all .25s ease;
}
.contact-item:hover {
  transform: translateY(-2px);
  border-color: var(--glass-stroke-hover);
  background: var(--glass-bg-hover);
  box-shadow: var(--shadow-md), var(--shadow-glow-v);
}
.contact-item__k { color: var(--text-dim); font-weight: 700; font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; font-family: 'JetBrains Mono', monospace; }
.contact-item__v { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ============ FOOTER ============ */

.footer { padding: 2rem 0 2.5rem; }

.footer__inner {
  padding: 1.25rem 1.5rem;
  display: flex; align-items: center;
  justify-content: space-between; gap: 1rem;
}
.footer__inner::after { display: none; }

.footer__left  { display: flex; flex-direction: column; gap: .35rem; }
.footer__right { display: flex; align-items: center; gap: .5rem; }
.footer__right a { transition: color .25s; }
.footer__right a:hover { color: var(--accent-violet); }

/* ============ TOAST ============ */

.toast {
  position: fixed; left: 50%; bottom: 24px;
  transform: translateX(-50%) translateY(8px);
  z-index: 60;
  min-width: min(480px, calc(100% - 2rem));
  padding: .9rem 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--glass-stroke);
  background: rgba(7,7,15,.88);
  color: var(--text);
  box-shadow: var(--shadow-lg), var(--shadow-glow-v);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s, transform .3s;
  font-weight: 500; text-align: center;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

/* ============ SCROLL REVEAL (JS applies) ============ */

.reveal-hidden {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .55s ease, transform .55s cubic-bezier(.23,1,.32,1);
}
.reveal-hidden.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ============ KEYFRAMES ============ */

@keyframes welcomeReveal {
  from { clip-path: inset(0 100% 0 0); }
  to   { clip-path: inset(0 0 0 0); }
}
@keyframes caretBlink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}
@keyframes caretFade { to { opacity: 0; } }

/* Letter-by-letter hero reveal */
@keyframes letterReveal {
  to {
    opacity: 1;
    transform: translateY(0) rotateX(0deg);
  }
}

/* Word fade for subtitle */
@keyframes wordFade {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Rainbow gradient shimmer on name */
@keyframes rainbowShimmer {
  0%   { background-position: 0% 50%; }
  100% { background-position: 300% 50%; }
}

/* Underline glow */
@keyframes underlineGlow {
  0%   { box-shadow: 0 0 8px  rgba(139,92,246,.3); width: 40%; }
  100% { box-shadow: 0 0 18px rgba(6,214,160,.4); width: 100%; }
}

/* Section title line shimmer */
@keyframes lineShimmer {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Border spin for glass cards */
@keyframes borderSpin {
  to { transform: rotate(360deg); }
}

/* Orb floats */
@keyframes orbFloat1 {
  0%, 100% { transform: translate3d(0,0,0) scale(1); }
  33%  { transform: translate3d(30px,25px,0) scale(1.05); }
  66%  { transform: translate3d(-15px,10px,0) scale(.98); }
}
@keyframes orbFloat2 {
  0%, 100% { transform: translate3d(0,0,0) scale(1); }
  50%  { transform: translate3d(-35px,20px,0) scale(1.04); }
}
@keyframes orbFloat3 {
  0%, 100% { transform: translate3d(0,0,0) scale(1); }
  40%  { transform: translate3d(20px,-18px,0) scale(1.03); }
  70%  { transform: translate3d(-10px,-25px,0) scale(.97); }
}

@keyframes gridPan {
  0%   { transform: translate3d(0,0,0); }
  100% { transform: translate3d(-64px,32px,0); }
}

/* Vine / stem */
@keyframes vineGlow {
  0%, 100% { opacity: .45; }
  50%      { opacity: .85; }
}
@keyframes vineParticle {
  0%   { top: 70px;  opacity: 0; }
  10%  { opacity: .8; }
  90%  { opacity: .8; }
  100% { top: calc(100vh - 40px); opacity: 0; }
}
@keyframes leafPulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.15); }
}

/* Pulse / glow */
@keyframes dotPulse {
  0%, 100% { box-shadow: 0 0 10px rgba(139,92,246,.4), 0 0 4px rgba(6,214,160,.3); }
  50%      { box-shadow: 0 0 18px rgba(139,92,246,.6), 0 0 8px rgba(6,214,160,.5); }
}
@keyframes sparkPulse {
  0%, 100% { box-shadow: 0 0 8px rgba(6,214,160,.5); transform: scale(1); }
  50%      { box-shadow: 0 0 14px rgba(6,214,160,.8); transform: scale(1.2); }
}
@keyframes statusBlink {
  0%, 100% { opacity: 1; }
  50%      { opacity: .3; }
}

/* ============ REDUCED MOTION ============ */

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto; }
  body::before, body::after,
  .grid, .orb,
  main#main::before, main#main::after,
  section::before, section::after,
  .welcome__type, .welcome__type::after,
  .brand__dot, .pill__spark,
  .timeline__dot, .text-grad,
  .badge--status::before,
  .hero__title .letter,
  .hero__subtitle .word,
  .section__title .letter {
    animation: none !important;
  }
  .hero__title .letter,
  .hero__subtitle .word,
  .section__title .letter {
    opacity: 1 !important;
    transform: none !important;
  }
  .glass::after { display: none; }
  .reveal-hidden { opacity: 1; transform: none; }
}

/* ============ ACHIEVEMENTS ============ */
.achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.achieve-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: 100%;
}

.achieve-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--glass-stroke);
}

.achieve-card__images {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--glass-stroke);
}

.achieve-card__images:has(.achieve-img:only-child) {
  grid-template-columns: 1fr;
}

.achieve-img {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: #000;
}

.achieve-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}

.achieve-img:hover img {
  transform: scale(1.08);
}

.img-label {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: rgba(0,0,0,0.7);
  color: #fff;
  font-size: .65rem;
  padding: .3rem .5rem;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: .05em;
  opacity: 0;
  transition: opacity .3s ease;
}

.achieve-img:hover .img-label {
  opacity: 1;
}

.achieve-card__content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* ============ RESPONSIVE ============ */

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; }
  .skills { grid-template-columns: repeat(2, 1fr); }
  .achievements { grid-template-columns: 1fr; }
  .project__grid { grid-template-columns: 1fr; }
  .projects--grid { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .nav__toggle { display: inline-flex; }
  .nav__links {
    position: absolute;
    left: 50%; transform: translateX(-50%);
    top: 64px;
    width: min(var(--container), calc(100% - 2rem));
    flex-wrap: wrap; justify-content: center;
    padding: .85rem;
    border-radius: var(--radius-lg);
    opacity: 0; pointer-events: none;
    transition: opacity .3s, transform .3s;
    background: rgba(7,7,15,.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--shadow-lg);
  }
  .nav__links.open {
    opacity: 1; pointer-events: auto;
    transform: translateX(-50%) translateY(4px);
  }
}

@media (max-width: 640px) {
  .grid-2 { grid-template-columns: 1fr; }
  .skills { grid-template-columns: 1fr; }
  .certs-grid { grid-template-columns: 1fr; }
  .contact-item { grid-template-columns: 1fr; }

  .pad { padding: 1.15rem; }
  .hero__content { padding: 1.5rem 1rem; }
  .section__title { font-size: 1.5rem; }
  .hero__title { font-size: clamp(1.8rem, 7vw, 2.6rem); }
  .section { padding: 2.5rem 0 1.5rem; }
}

@media (max-width: 420px) {
  .pill { font-size: .76rem; padding: .4rem .7rem; }
  .nav__links a { font-size: .8rem; }
  .tab-btn { padding: .5rem 1rem; font-size: .85rem; }
  .tabs-nav { gap: .25rem; }
  .hero__title { font-size: 2rem; }
  .hero__subtitle { font-size: .9rem; }
}
