/* ================================================
   BASE.CSS — Design System Foundation
   Portfolio: Shrenik Jain
   ================================================ */

/* -------- Reset -------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

img,
video {
  max-width: 100%;
  display: block;
}

input,
textarea {
  font-family: inherit;
  width: 100%;
}

/* -------- CSS Custom Properties (Design Tokens) -------- */
:root {
  /* Color Palette — Light Mode */
  --clr-bg: #f0f2ff;
  --clr-bg-alt: #ffffff;
  --clr-surface: rgba(255, 255, 255, 0.70);
  --clr-surface-alt: rgba(255, 255, 255, 0.45);
  --clr-border: rgba(102, 126, 234, 0.18);
  --clr-border-strong: rgba(102, 126, 234, 0.4);
  --clr-text: #0f0f23;
  --clr-text-muted: #4b5570;
  --clr-text-faint: #8892b0;

  /* Brand Gradient */
  --grad-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --grad-accent: linear-gradient(135deg, #667eea 0%, #f093fb 100%);
  --grad-glow: linear-gradient(135deg, rgba(102, 126, 234, 0.3), rgba(240, 147, 251, 0.15));

  /* Brand Colors */
  --clr-primary: #667eea;
  --clr-secondary: #764ba2;
  --clr-accent: #f093fb;
  --clr-cyan: #06b6d4;
  --clr-green: #10b981;

  /* Spacing Scale (8px base) */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-8: 32px;
  --sp-10: 40px;
  --sp-12: 48px;
  --sp-16: 64px;
  --sp-20: 80px;
  --sp-24: 96px;

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-2xl: 40px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 2px 12px rgba(102, 126, 234, 0.10);
  --shadow-md: 0 8px 32px rgba(102, 126, 234, 0.18);
  --shadow-lg: 0 20px 60px rgba(102, 126, 234, 0.25);
  --shadow-xl: 0 32px 80px rgba(102, 126, 234, 0.30);
  --shadow-glow: 0 0 30px rgba(102, 126, 234, 0.5);

  /* Typography */
  --font-sans: 'Inter', 'Poppins', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Mono', monospace;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;
  --text-6xl: 3.75rem;

  --weight-light: 300;
  --weight-normal: 400;
  --weight-medium: 500;
  --weight-semi: 600;
  --weight-bold: 700;
  --weight-black: 900;

  /* Transitions */
  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out: cubic-bezier(0.0, 0, 0.2, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --duration-fast: 150ms;
  --duration-base: 300ms;
  --duration-slow: 500ms;
  --duration-xl: 800ms;
  --transition: all var(--duration-base) var(--ease-spring);
  --transition-fast: all var(--duration-fast) var(--ease-out);

  /* Z-Index Scale */
  --z-bg: -1;
  --z-base: 0;
  --z-above: 10;
  --z-nav: 100;
  --z-modal: 200;
  --z-top: 300;

  /* Layout */
  --nav-height: 80px;
  --container-max: 1200px;
  --section-padding: var(--sp-20) var(--sp-5);
}

/* -------- Body -------- */
body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  color: var(--clr-text);
  background: transparent;
  /* #global-bg provides the base color */
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  transition: color var(--duration-slow) var(--ease-in-out);
}

/* -------- Typography -------- */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: var(--weight-bold);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

p {
  line-height: 1.75;
}

/* -------- Layout Utilities -------- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--sp-6);
}

.section {
  padding: var(--section-padding);
  scroll-margin-top: var(--nav-height);
}

.section-inner {
  max-width: var(--container-max);
  margin: 0 auto;
}

/* -------- Section Title -------- */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--text-xs);
  font-weight: var(--weight-semi);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--clr-primary);
  background: rgba(102, 126, 234, 0.1);
  border: 1px solid var(--clr-border-strong);
  padding: var(--sp-1) var(--sp-4);
  border-radius: var(--radius-full);
  margin-bottom: var(--sp-4);
}

.section-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: var(--weight-black);
  margin-bottom: var(--sp-4);
  background: var(--grad-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
}

.section-desc {
  font-size: var(--text-lg);
  color: var(--clr-text-muted);
  max-width: 560px;
  margin-bottom: var(--sp-12);
}

.section-header {
  margin-bottom: var(--sp-12);
}

.section-header.centered {
  text-align: center;
}

.section-header.centered .section-desc {
  margin-left: auto;
  margin-right: auto;
}

.section-header.centered .section-label {
  margin-left: auto;
  margin-right: auto;
}

/* -------- Gradient Text -------- */
.gradient-text {
  background: var(--grad-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* -------- Glassmorphism Card -------- */
.glass {
  background: var(--clr-surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
}

.glass-dark {
  background: rgba(15, 15, 35, 0.65);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
}

/* -------- Buttons -------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 14px 28px;
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: var(--weight-semi);
  letter-spacing: 0.01em;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.15);
  opacity: 0;
  transition: opacity var(--duration-fast) var(--ease-out);
}

.btn:hover::before {
  opacity: 1;
}

.btn-primary {
  background: var(--grad-primary);
  color: #fff;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.btn-secondary {
  background: var(--clr-surface);
  color: var(--clr-text);
  border: 1px solid var(--clr-border);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  transform: translateY(-2px);
  border-color: var(--clr-primary);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: transparent;
  color: var(--clr-primary);
  border: 1px solid var(--clr-border-strong);
  padding: 10px 22px;
}

.btn-outline:hover {
  background: rgba(102, 126, 234, 0.1);
  border-color: var(--clr-primary);
  transform: translateY(-1px);
}

.btn-sm {
  padding: 9px 18px;
  font-size: var(--text-xs);
}

/* -------- Tag / Badge -------- */
.tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  background: rgba(102, 126, 234, 0.12);
  color: var(--clr-primary);
  border: 1px solid rgba(102, 126, 234, 0.2);
  transition: var(--transition-fast);
}

.tag:hover {
  background: var(--grad-primary);
  color: white;
  border-color: transparent;
}

/* ═══════════════════════════════════════════════════════════
   GLOBAL BACKGROUND — unified futuristic space environment
   Fixed layer; GPU-composited (transform + opacity only)
   Works for BOTH light and dark modes.
   ═══════════════════════════════════════════════════════════ */

#global-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
  will-change: transform;

  /* LIGHT MODE base — soft lavender-white */
  background: #f0f2ff;
  transition: background 0.5s ease;
}

.hero {
  isolation: isolate;
}

.hero-bg-gradient {
  position: absolute;
  inset: 0;

  background:
    radial-gradient(circle at 20% 30%, rgba(102, 126, 234, .25), transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(240, 147, 251, .22), transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(6, 182, 212, .15), transparent 60%);

  background-size: 200% 200%;
  animation: heroGradient 16s ease-in-out infinite;
}

.hero-bg-grid {
  position: absolute;
  inset: 0;

  background-image:
    linear-gradient(rgba(102, 126, 234, .08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(102, 126, 234, .08) 1px, transparent 1px);

  background-size: 40px 40px;
  opacity: .35;
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: .45;
  animation: orbFloat var(--duration, 12s) ease-in-out infinite alternate;
}

@keyframes orbFloat {
  from {
    transform: translateY(0px);
  }

  to {
    transform: translateY(60px);
  }
}

/* Hero canvas stays inside hero section (overflow:hidden clips it) */
#background-canvas {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  width: 100%;
  height: 100%;
}

@keyframes heroGradient {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

/* ── DARK MODE overrides for #global-bg ── */
body.dark-theme #global-bg {
  background: #09090f;
  /* deep dark base */
}



/* -------- Responsive -------- */
@media (max-width: 768px) {
  :root {
    --section-padding: var(--sp-12) var(--sp-4);
  }

  .section-desc {
    font-size: var(--text-base);
  }
}

@media (max-width: 480px) {
  :root {
    --section-padding: var(--sp-10) var(--sp-4);
  }
}

/* -------- Reduced Motion -------- */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}


/* ================================================
   NAVBAR.CSS — Glassmorphism Sticky Navbar
   ================================================ */

.navbar {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: 92%;
  max-width: 1200px;
  z-index: var(--z-nav);
  background: rgba(240, 242, 255, 0.75);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-xl);
  transition: all var(--duration-slow) var(--ease-spring);
  animation: navSlideDown 0.7s var(--ease-spring) 0.1s both;
}

/* Scrolled state */
.navbar.scrolled {
  top: 10px;
  background: rgba(240, 242, 255, 0.92);
  box-shadow: var(--shadow-lg);
  transform: translateX(-50%) scale(0.975);
  width: 88%;
}

/* Nav Container */
.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-height);
  padding: 0 var(--sp-6);
  gap: var(--sp-4);
}

.navbar.scrolled .nav-container {
  height: 60px;
}

/* Logo */
.nav-logo a {
  font-size: var(--text-xl);
  font-weight: var(--weight-black);
  letter-spacing: -0.03em;
  text-decoration: none;
  background: var(--grad-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transition: var(--transition-fast);
}

.nav-logo a:hover {
  filter: brightness(1.15);
}

/* Nav Menu — Desktop */
.nav-menu {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
}

.nav-item {
  list-style: none;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--clr-text-muted);
  text-decoration: none;
  position: relative;
  transition: var(--transition-fast);
}

.nav-link:hover {
  color: var(--clr-primary);
  background: rgba(102, 126, 234, 0.08);
}

.nav-link.active {
  color: var(--clr-primary);
  background: rgba(102, 126, 234, 0.1);
}

/* Animated underline indicator */
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  border-radius: var(--radius-full);
  background: var(--grad-accent);
  transition: width var(--duration-base) var(--ease-spring);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: calc(100% - 28px);
}

/* Nav Right Controls */
.nav-controls {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  cursor: pointer;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--clr-text);
  border-radius: var(--radius-full);
  transition: var(--transition-fast);
  transform-origin: center;
}

.hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Nav Menu */
.nav-mobile {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  background: rgba(240, 242, 255, 0.97);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  padding: var(--sp-4);
  flex-direction: column;
  gap: var(--sp-1);
  animation: slideDown 0.25s var(--ease-spring);
}

.nav-mobile.open {
  display: flex;
}

.nav-mobile .nav-link {
  width: 100%;
  padding: 12px 16px;
}

/* -------- Responsive -------- */
@media (max-width: 900px) {
  .nav-menu {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .navbar {
    width: 95%;
    border-radius: var(--radius-xl);
  }

  .navbar.scrolled {
    width: 95%;
  }
}

@media (max-width: 480px) {
  .nav-container {
    padding: 0 var(--sp-4);
  }

  .nav-logo a {
    font-size: var(--text-lg);
  }
}


/* ================================================
   HERO.CSS — Futuristic Hero Section
   ================================================ */

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 120px var(--sp-6) 80px;
  overflow: hidden;
}

/*
/* Canvas is INSIDE .hero — particles are clipped by overflow:hidden */


.hero-orb-1 {
  width: 400px;
  height: 400px;
  background: rgba(102, 126, 234, 0.22);
  top: -10%;
  left: -8%;
  --duration: 11s;
}

.hero-orb-2 {
  width: 300px;
  height: 300px;
  background: rgba(240, 147, 251, 0.15);
  bottom: -5%;
  right: -5%;
  --duration: 13s;
  --delay: 2s;
}

.hero-orb-3 {
  width: 200px;
  height: 200px;
  background: rgba(6, 182, 212, 0.12);
  top: 40%;
  right: 10%;
  --duration: 9s;
  --delay: 4s;
}

/* Main content wrapper */
.hero-wrapper {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 120px;
  max-width: var(--container-max);
  width: 100%;
  flex-wrap: wrap;
}

/* Profile Image */
.hero-image {
  position: relative;
  flex-shrink: 0;
}

.hero-image-ring {
  position: relative;
  width: 280px;
  height: 280px;
}

/* Spinning gradient ring */
.hero-image-ring::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: var(--grad-accent);
  animation: rotateGlow 6s linear infinite;
  z-index: 1;
}

.hero-image-ring::after {
  content: '';
  position: absolute;
  inset: 2px;
  border-radius: 50%;
  /* Use the actual global-bg base colors, not the body variable.
     Light: #f0f2ff, Dark: overridden below */
  background: #f0f2ff;
  z-index: 2;
}

body.dark-theme .hero-image-ring::after {
  background: #09090f;
}

.hero-image-ring img {
  position: absolute;
  inset: 5px;
  width: calc(100% - 10px);
  height: calc(100% - 10px);
  object-fit: cover;
  border-radius: 50%;
  z-index: 3;
}

/* Glow halo */
.hero-image-glow {
  position: absolute;
  inset: -30px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(102, 126, 234, 0.35) 0%, transparent 70%);
  z-index: 0;
  animation: glowPulse 4s ease-in-out infinite;
}

/* Tech icon badges floating around image — scoped inside .hero-tech-badges only */
.hero-tech-badges {
  position: absolute;
  inset: 0;
  z-index: 4;
}

.hero-tech-badges .tech-badge {
  position: absolute;
  background: var(--clr-surface);
  backdrop-filter: blur(10px);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  padding: 6px 10px;
  font-size: 11px;
  font-weight: var(--weight-semi);
  color: var(--clr-text);
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 5px;
  animation: float 6s ease-in-out infinite;
}

.hero-tech-badges .tech-badge span {
  font-size: 14px;
}

.hero-tech-badges .tech-badge:nth-child(1) {
  top: 5%;
  right: -35%;
  animation-delay: 0s;
}

.hero-tech-badges .tech-badge:nth-child(2) {
  bottom: 15%;
  right: -35%;
  animation-delay: 1.5s;
}

.hero-tech-badges .tech-badge:nth-child(3) {
  top: 15%;
  left: -35%;
  animation-delay: 0.8s;
}

.hero-tech-badges .tech-badge:nth-child(4) {
  bottom: 5%;
  left: -28%;
  animation-delay: 2.2s;
}

/* Right: Content */
.hero-content {
  padding-left: 20px;
  max-width: 600px;
  flex: 1;
}

/* Intro pill */
.hero-intro {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 6px 16px;
  background: rgba(102, 126, 234, 0.1);
  border: 1px solid var(--clr-border-strong);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: var(--weight-semi);
  color: var(--clr-primary);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: var(--sp-5);
  opacity: 0;
  animation: slideUp 0.6s var(--ease-spring) 0.05s forwards;
}

.hero-intro .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--clr-green);
  animation: pulse 2s ease-in-out infinite;
}

/* Main Title */
.hero-title {
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: var(--weight-black);
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: var(--sp-4);
  color: var(--clr-text);
}

/* Animated gradient name */
.hero-name {
  display: inline;
  background: linear-gradient(135deg, #667eea, #f093fb, #06b6d4, #667eea);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 4s linear infinite;
}

/* Subtitle */
.hero-subtitle {
  font-size: var(--text-lg);
  color: var(--clr-text-muted);
  margin-bottom: var(--sp-5);
  line-height: 1.6;
  font-weight: var(--weight-normal);
}

/* Typing row */
.hero-typing {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-bottom: var(--sp-8);
  min-height: 32px;
}

.hero-typing-prefix {
  font-size: var(--text-sm);
  color: var(--clr-text-faint);
  font-family: var(--font-mono);
  white-space: nowrap;
  flex-shrink: 0;
}

.hero-typing-prefix::before {
  content: '$ ';
  color: var(--clr-green);
}

#typingText {
  font-size: var(--text-sm);
  font-family: var(--font-mono);
  color: var(--clr-primary);
  font-weight: var(--weight-medium);
}

/* CTA Buttons */
.hero-buttons {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  flex-wrap: wrap;
  margin-bottom: var(--sp-8);
}

/* Social Icons */
.social-links {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

.social-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  border: 1px solid var(--clr-border);
  background: var(--clr-surface);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--clr-text-muted);
  text-decoration: none;
  transition: var(--transition);
}

.social-icon svg {
  width: 18px;
  height: 18px;
}

.social-icon:hover {
  border-color: var(--clr-primary);
  color: var(--clr-primary);
  transform: translateY(-4px) scale(1.05);
  box-shadow: var(--shadow-md);
  background: rgba(102, 126, 234, 0.1);
}

/* Scroll indicator */
.hero-scroll {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}

/* -------- Responsive -------- */
@media (max-width: 900px) {
  .hero-wrapper {
    flex-direction: column;
    text-align: center;
    gap: 50px;
  }

  .hero-content {
    max-width: 100%;
  }

  .hero-buttons {
    justify-content: center;
  }

  .social-links {
    justify-content: center;
  }

  .hero-intro {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-tech-badges {
    display: none;
  }

  .hero-image-ring {
    width: 220px;
    height: 220px;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 110px var(--sp-4) 60px;
  }

  .hero-title {
    font-size: 2.1rem;
  }

  .hero-image-ring {
    width: 180px;
    height: 180px;
  }

  .hero-buttons {
    flex-direction: column;
    width: 100%;
  }

  .hero-buttons .btn {
    width: 100%;
    justify-content: center;
  }
}

/* ================================================
   ABOUT.CSS — About Section
   ================================================ */

.about {
  background: transparent;
  padding: var(--section-padding);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-8);
  align-items: start;
  max-width: var(--container-max);
  margin: 0 auto;
}

.about-text-card {
  padding: var(--sp-10);
  border-radius: var(--radius-xl);
  background: var(--clr-surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--clr-border);
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}

.about-text-card::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 20px;
  right: 20px;
  height: 2px;
  background: var(--grad-accent);
  border-radius: 0 0 var(--radius-full) var(--radius-full);
}

.about-text-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--clr-border-strong);
}

.about-text-card p {
  font-size: var(--text-base);
  color: var(--clr-text-muted);
  margin-bottom: var(--sp-5);
  line-height: 1.8;
}

.about-text-card p:last-child {
  margin-bottom: 0;
}

.about-text-card p strong {
  color: var(--clr-primary);
  font-weight: var(--weight-semi);
}

/* Sidebar Stats */
.about-sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.about-stat-card {
  padding: var(--sp-6);
  border-radius: var(--radius-lg);
  background: var(--clr-surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--clr-border);
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  transition: var(--transition);
}

.about-stat-card:hover {
  transform: translateX(6px);
  border-color: var(--clr-border-strong);
  box-shadow: var(--shadow-md);
}

.about-stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: rgba(102, 126, 234, 0.1);
  border: 1px solid var(--clr-border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.about-stat-info h4 {
  font-size: var(--text-base);
  font-weight: var(--weight-semi);
  color: var(--clr-text);
  margin-bottom: 2px;
}

.about-stat-info p {
  font-size: var(--text-xs);
  color: var(--clr-text-faint);
  margin: 0;
}

/* Interests chips */
.about-interests {
  padding: var(--sp-6);
  border-radius: var(--radius-lg);
  background: var(--clr-surface);
  backdrop-filter: blur(16px);
  border: 1px solid var(--clr-border);
}

.about-interests h4 {
  font-size: var(--text-sm);
  font-weight: var(--weight-semi);
  color: var(--clr-text-muted);
  margin-bottom: var(--sp-3);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.interest-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}

.interest-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  background: rgba(102, 126, 234, 0.08);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  color: var(--clr-text-muted);
  font-weight: var(--weight-medium);
  transition: var(--transition-fast);
}

.interest-chip:hover {
  background: rgba(102, 126, 234, 0.15);
  border-color: var(--clr-border-strong);
  color: var(--clr-primary);
  transform: translateY(-2px);
}

/* -------- Responsive -------- */
@media (max-width: 900px) {
  .about-grid {
    grid-template-columns: 1fr;
  }

  .about-sidebar {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .about-stat-card {
    flex: 1;
    min-width: 200px;
  }
}

@media (max-width: 600px) {
  .about-text-card {
    padding: var(--sp-6);
  }

  .about-sidebar {
    flex-direction: column;
  }
}

/* ================================================
   SKILLS.CSS — Structured Technology Showcase
   ================================================ */

.skills {
  padding: var(--section-padding);
  background: transparent;
}

/* ── Gradient section title ── */
.skills-title {
  background: linear-gradient(135deg, var(--clr-text) 0%, var(--clr-primary) 55%, #f093fb 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ════════════════════════════════════════════════
   CATEGORY CONTAINER
   NOTE: no backdrop-filter here — that creates a
   stacking context that clips grid children in Chrome.
   Blur is on the inner card elements instead.
════════════════════════════════════════════════ */
.skill-container {
  position: relative;
  margin-top: 24px;
  padding: 24px 24px 20px;
  border-radius: 16px;
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  overflow: visible;
  /* CRITICAL: never clip grid children */
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Glow top edge  */
.skill-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: var(--grad-accent);
  opacity: 0.4;
  transition: opacity 0.3s ease;
  border-radius: 0 0 4px 4px;
  pointer-events: none;
}

.skill-container:hover {
  border-color: rgba(102, 126, 234, 0.25);
  box-shadow: 0 12px 36px rgba(102, 126, 234, 0.08);
}

.skill-container:hover::before {
  opacity: 1;
}

/* ── Category header row ── */
.skill-container-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.skill-cat-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid var(--clr-border);
}

.lang-icon {
  background: rgba(102, 126, 234, 0.12);
  color: #667eea;
  border-color: rgba(102, 126, 234, 0.3);
}

.framework-icon {
  background: rgba(16, 185, 129, 0.10);
  color: #10b981;
  border-color: rgba(16, 185, 129, 0.3);
}

.tool-icon {
  background: rgba(245, 158, 11, 0.10);
  color: #f59e0b;
  border-color: rgba(245, 158, 11, 0.3);
}

.core-icon {
  background: rgba(240, 147, 251, 0.10);
  color: #f093fb;
  border-color: rgba(240, 147, 251, 0.3);
}

.soft-icon {
  background: rgba(6, 182, 212, 0.10);
  color: #06b6d4;
  border-color: rgba(6, 182, 212, 0.3);
}

.skill-cat-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--clr-text);
  margin: 0;
  white-space: nowrap;
}

.skill-cat-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, var(--clr-border), transparent);
  min-width: 12px;
}

.skill-cat-count {
  font-size: 10px;
  font-weight: 600;
  font-family: var(--font-mono);
  color: var(--clr-text-faint);
  background: rgba(102, 126, 234, 0.07);
  border: 1px solid var(--clr-border);
  padding: 2px 8px;
  border-radius: 99px;
}

/* ════════════════════════════════════════════════
   TECH BADGE GRID
   Uses auto-fill so it always fills the container
   width regardless of item count. No fixed columns.
════════════════════════════════════════════════ */
.tech-badge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
}

/* ── Single tech badge ── */
.tech-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding: 16px 6px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--clr-border);
  min-width: 0;
  box-sizing: border-box;
  cursor: default;
  transition:
    transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.25s ease,
    border-color 0.25s ease,
    background 0.25s ease;
}

.tech-badge:hover {
  transform: translateY(-7px) scale(1.04);
  background: rgba(102, 126, 234, 0.07);
  border-color: rgba(102, 126, 234, 0.35);
  box-shadow:
    0 12px 28px rgba(102, 126, 234, 0.18),
    0 0 0 1px rgba(102, 126, 234, 0.1);
}

/* Icon container — blur here, NOT on the parent container */
.tech-badge-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(102, 126, 234, 0.06);
  border: 1px solid var(--clr-border);
  flex-shrink: 0;
  transition: background 0.25s, border-color 0.25s, box-shadow 0.25s;
}

.tech-badge:hover .tech-badge-icon {
  background: rgba(102, 126, 234, 0.13);
  border-color: rgba(102, 126, 234, 0.35);
  box-shadow: 0 0 16px rgba(102, 126, 234, 0.28);
}

.tech-badge-icon img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  display: block;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.tech-badge:hover .tech-badge-icon img {
  transform: scale(1.18) rotate(-3deg);
}

/* Dark bg for monochrome logos */
.tech-badge-icon.dark-bg {
  background: #1e2433;
  border-color: rgba(255, 255, 255, 0.07);
}

.tech-badge-icon.aws-bg {
  background: #232f3e;
  border-color: rgba(255, 255, 255, 0.07);
}

/* Always white (for dark bg icons and AWS) */
.invert-always {
  filter: brightness(0) invert(1);
}

/* Badge name label */
.tech-badge>span {
  font-size: 10px;
  font-weight: 600;
  color: var(--clr-text-muted);
  text-align: center;
  word-break: break-word;
  line-height: 1.3;
  max-width: 100%;
  transition: color 0.2s;
}

.tech-badge:hover>span {
  color: var(--clr-text);
}

/* ════════════════════════════════════════════════
   CS FUNDAMENTALS — pill chips
════════════════════════════════════════════════ */
.cs-chips-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.cs-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 10px;
  background: rgba(240, 147, 251, 0.07);
  border: 1px solid rgba(240, 147, 251, 0.18);
  cursor: default;
  transition:
    background 0.22s ease,
    border-color 0.22s ease,
    transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.22s ease;
}

.cs-chip:hover {
  background: rgba(240, 147, 251, 0.14);
  border-color: rgba(240, 147, 251, 0.4);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(240, 147, 251, 0.15);
}

.cs-chip-icon {
  font-size: 1rem;
  line-height: 1;
  flex-shrink: 0;
}

.cs-chip>span:last-child {
  font-size: 13px;
  font-weight: 500;
  color: var(--clr-text);
}

/* ════════════════════════════════════════════════
   SOFT SKILLS — rounded pill tags
════════════════════════════════════════════════ */
.skill-container-soft::before {
  background: linear-gradient(to right, #06b6d4, #667eea);
}

.soft-chips-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.soft-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: 99px;
  background: rgba(6, 182, 212, 0.07);
  border: 1px solid rgba(6, 182, 212, 0.18);
  font-size: 12px;
  font-weight: 500;
  color: var(--clr-text-muted);
  cursor: default;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.2s;
}

.soft-chip:hover {
  background: rgba(6, 182, 212, 0.14);
  border-color: rgba(6, 182, 212, 0.4);
  color: #06b6d4;
  transform: translateY(-2px);
}

/* ════════════════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .tech-badge-grid {
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  }
}

@media (max-width: 600px) {
  .skill-container {
    padding: 20px 16px;
  }

  .tech-badge-grid {
    grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
    gap: 8px;
  }

  .tech-badge {
    padding: 12px 4px 10px;
  }

  .tech-badge-icon {
    width: 42px;
    height: 42px;
  }

  .tech-badge-icon img {
    width: 24px;
    height: 24px;
  }

  .cs-chip {
    padding: 8px 12px;
  }

  .cs-chip>span:last-child {
    font-size: 12px;
  }
}


/* ================================================
   PROJECTS.CSS — Showcase Cards with Cover Images
   ================================================ */

.projects {
  background: transparent;
  padding: var(--section-padding);
}

/* ── Grid: 4 → 3 → 2 → 1 columns ── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

@media (max-width: 1200px) {
  .projects-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 860px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 540px) {
  .projects-grid {
    grid-template-columns: 1fr;
  }
}

/* ══════════════════════════════════════════════
   PROJECT CARD
══════════════════════════════════════════════ */
.project-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  background: var(--clr-surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--clr-border);
  overflow: hidden;
  cursor: pointer;
  /* entire card is clickable */
  transition:
    transform 0.32s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    box-shadow 0.32s ease,
    border-color 0.32s ease;
}

/* ── Desktop hover: lift + glow border ── */
.project-card:hover {
  transform: translateY(-10px);
  border-color: rgba(102, 126, 234, 0.45);
  box-shadow:
    0 20px 48px rgba(102, 126, 234, 0.16),
    0 0 0 1px rgba(102, 126, 234, 0.12);
}

/* ── Animated gradient border line at top on hover ── */
.project-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--grad-accent);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 5;
}

.project-card:hover::after {
  opacity: 1;
}

/* ══════════════════════════════════════════════
   COVER IMAGE AREA
══════════════════════════════════════════════ */
.project-cover {
  position: relative;
  height: 175px;
  overflow: hidden;
  flex-shrink: 0;
  background: linear-gradient(135deg, #1a1f3a 0%, #0f1020 100%);
  /* fallback */
}

/* The cover photo */
.project-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Zoom image on card hover */
.project-card:hover .project-cover img {
  transform: scale(1.07);
}

/* Dark gradient scrim — bottom of cover fades into card body */
.project-cover::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom,
      rgba(0, 0, 0, 0.10) 0%,
      rgba(0, 0, 0, 0.05) 40%,
      rgba(10, 10, 20, 0.70) 100%);
  z-index: 1;
  pointer-events: none;
}

/* Project number badge — bottom-left of cover */
.project-cover-num {
  position: absolute;
  bottom: 10px;
  left: 14px;
  z-index: 3;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1;
}

/* ── Hover overlay: "View Details" button appears on image ── */
.project-cover-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 10, 28, 0.55);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.28s ease;
}

.project-card:hover .project-cover-overlay {
  opacity: 1;
}

/* The overlay button */
.project-view-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
  transform: translateY(6px);
}

.project-card:hover .project-view-btn {
  transform: translateY(0);
}

.project-view-btn:hover {
  background: rgba(102, 126, 234, 0.35);
  border-color: rgba(102, 126, 234, 0.6);
}

/* ══════════════════════════════════════════════
   CARD BODY
══════════════════════════════════════════════ */
.project-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  flex: 1;
}

/* Title + GitHub icon row */
.project-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.project-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--clr-text);
  line-height: 1.35;
  flex: 1;
}

.project-icon-links {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.project-icon-link {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  border: 1px solid var(--clr-border);
  background: rgba(102, 126, 234, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--clr-text-muted);
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.project-icon-link:hover {
  background: rgba(102, 126, 234, 0.15);
  border-color: var(--clr-primary);
  color: var(--clr-primary);
}

/* Description */
.project-desc {
  font-size: 12px;
  color: var(--clr-text-muted);
  line-height: 1.65;
}

/* Tech badges */
.project-tech-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: auto;
}

.tech-badge-sm {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 99px;
  font-size: 10px;
  font-weight: 600;
  background: rgba(102, 126, 234, 0.08);
  border: 1px solid rgba(102, 126, 234, 0.15);
  color: var(--clr-text-muted);
  white-space: nowrap;
}

.tech-badge-sm img {
  border-radius: 2px;
  flex-shrink: 0;
}

/* Dark-mode badge icon fixes */
.dark-theme .tech-badge-sm img[alt="Django"],
.dark-theme .tech-badge-sm img[alt="Flask"] {
  filter: invert(1) brightness(2);
}

/* ══════════════════════════════════════════════
   MOBILE — tap to open (no hover, pointer events)
══════════════════════════════════════════════ */
@media (hover: none) {

  /* Show overlay permanently at low opacity so users know it's tappable */
  .project-cover-overlay {
    opacity: 0;
    /* hidden — tap the card directly */
    pointer-events: none;
  }

  /* Tap feedback */
  .project-card:active {
    transform: scale(0.98);
    border-color: rgba(102, 126, 234, 0.4);
  }
}

/* Tablet: lighter hover */
@media (max-width: 1024px) {
  .project-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 32px rgba(102, 126, 234, 0.13);
  }
}


/* ================================================
   CERTIFICATIONS.CSS — Cards with Hover Preview
   ================================================ */

.certifications {
  background: transparent;
  padding: var(--section-padding);
}

.certifications-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--sp-4);
  margin-top: var(--sp-8);
}

/* ── Card ── */
.cert-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-xl);
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition:
    transform 0.3s var(--ease-spring),
    box-shadow 0.3s ease,
    border-color 0.3s ease;
}

.cert-card:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: rgba(102, 126, 234, 0.4);
  box-shadow:
    0 20px 50px rgba(102, 126, 234, 0.2),
    0 0 0 1px rgba(102, 126, 234, 0.1),
    0 0 30px rgba(102, 126, 234, 0.08) inset;
}

/* ── Preview Banner ── */
.cert-preview-wrap {
  position: relative;
  height: 110px;
  overflow: hidden;
  flex-shrink: 0;
}

.cert-preview {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.4s var(--ease-spring);
}

.cert-card:hover .cert-preview {
  transform: scale(1.08);
}

.cert-preview-emoji {
  font-size: 3rem;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
  transition: transform 0.3s var(--ease-spring);
}

.cert-card:hover .cert-preview-emoji {
  transform: scale(1.15) rotate(-3deg);
}

.cert-org-logo {
  width: 80px;
  height: auto;
  object-fit: contain;
}

.invert-always {
  filter: brightness(0) invert(1);
}

/* ── Hover Overlay ── */
.cert-overlay-hover {
  position: absolute;
  inset: 0;
  background: rgba(102, 126, 234, 0.85);
  backdrop-filter: blur(4px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  color: #fff;
  font-size: var(--text-sm);
  font-weight: var(--weight-semi);
  opacity: 0;
  transform: scale(0.95);
  transition:
    opacity 0.3s ease,
    transform 0.3s var(--ease-spring);
}

.cert-card:hover .cert-overlay-hover {
  opacity: 1;
  transform: scale(1);
}

/* ── Card Info ── */
.cert-info {
  padding: var(--sp-4);
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
}

.cert-info h3 {
  font-size: var(--text-sm);
  font-weight: var(--weight-semi);
  color: var(--clr-text);
  line-height: 1.35;
}

.cert-info p {
  font-size: var(--text-xs);
  color: var(--clr-text-muted);
}

.cert-year {
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  color: var(--clr-primary);
  font-family: var(--font-mono);
  margin-top: var(--sp-1);
}

/* ── Responsive ── */
@media (max-width: 600px) {
  .certifications-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 380px) {
  .certifications-grid {
    grid-template-columns: 1fr;
  }
}


/* ================================================
   RESUME.CSS — Resume / CV Section with Tabs
   ================================================ */

.resume {
  background: transparent;
  padding: var(--section-padding);
}

.resume-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: var(--sp-8);
  border-radius: var(--radius-2xl);
  background: var(--clr-surface);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--clr-border);
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

/* Top glow line */
.resume-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: var(--grad-accent);
}

/* Header */
.resume-header {
  text-align: center;
  margin-bottom: var(--sp-8);
}

.resume-contact-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--sp-2);
  margin-top: var(--sp-4);
}

.contact-info-tag {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: rgba(102, 126, 234, 0.08);
  border: 1px solid var(--clr-border);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  color: var(--clr-text-muted);
  text-decoration: none;
  transition: var(--transition-fast);
}

.contact-info-tag:hover {
  background: rgba(102, 126, 234, 0.15);
  border-color: var(--clr-primary);
  color: var(--clr-primary);
  transform: translateY(-2px);
}

/* Tabs */
.resume-tabs {
  display: flex;
  justify-content: center;
  gap: var(--sp-1);
  flex-wrap: wrap;
  padding: var(--sp-2);
  background: rgba(102, 126, 234, 0.06);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-full);
  margin-bottom: var(--sp-6);
}

.tab-btn {
  padding: 10px 22px;
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--clr-text-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: var(--transition-fast);
  font-family: var(--font-sans);
}

.tab-btn.active {
  background: var(--grad-primary);
  color: #fff;
  box-shadow: 0 4px 16px rgba(102, 126, 234, 0.4);
}

.tab-btn:hover:not(.active) {
  color: var(--clr-text);
  background: rgba(102, 126, 234, 0.08);
}

/* Tab Content */
.tab-content {
  display: none;
}

.tab-content.active {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  animation: tabFadeIn 0.4s var(--ease-spring);
}

/* Resume Cards */
.resume-card {
  position: relative;
  padding: var(--sp-6);
  border-radius: var(--radius-lg);
  background: rgba(102, 126, 234, 0.04);
  border: 1px solid var(--clr-border);
  transition: var(--transition);
  overflow: hidden;
}

/* Left accent bar */
.resume-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: var(--sp-4);
  bottom: var(--sp-4);
  width: 3px;
  background: var(--grad-accent);
  border-radius: 0 var(--radius-full) var(--radius-full) 0;
  opacity: 0;
  transition: opacity var(--duration-base) ease;
}

.resume-card:hover {
  border-color: var(--clr-border-strong);
  background: rgba(102, 126, 234, 0.07);
  transform: translateX(4px);
}

.resume-card:hover::before {
  opacity: 1;
}

.resume-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--sp-4);
  margin-bottom: var(--sp-3);
}

.resume-card-title {
  font-size: var(--text-lg);
  font-weight: var(--weight-semi);
  color: var(--clr-text);
}

.resume-card-subtitle {
  font-size: var(--text-sm);
  color: var(--clr-primary);
  font-weight: var(--weight-medium);
  margin-top: var(--sp-1);
}

.resume-card-date {
  font-size: var(--text-xs);
  color: var(--clr-text-faint);
  background: rgba(102, 126, 234, 0.08);
  border: 1px solid var(--clr-border);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  white-space: nowrap;
  flex-shrink: 0;
}

.resume-card-body {
  margin-top: var(--sp-3);
}

.resume-card-body p {
  font-size: var(--text-sm);
  color: var(--clr-text-muted);
  margin-bottom: var(--sp-1);
}

.resume-card-body p strong {
  color: var(--clr-text);
}

.resume-card-body ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.resume-card-body li {
  position: relative;
  padding-left: var(--sp-5);
  font-size: var(--text-sm);
  color: var(--clr-text-muted);
  line-height: 1.65;
}

.resume-card-body li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--clr-primary);
  font-size: 12px;
  top: 2px;
}

/* Download button */
.resume-download {
  text-align: center;
  margin-top: var(--sp-8);
  padding-top: var(--sp-6);
  border-top: 1px solid var(--clr-border);
}

/* Skills in resume tab */
.resume-skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-5);
}

.resume-skill-group h4 {
  font-size: var(--text-xs);
  font-weight: var(--weight-semi);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--clr-text-muted);
  margin-bottom: var(--sp-3);
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skill-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 10px;
  background: rgba(102, 126, 234, 0.08);
  border: 1px solid var(--clr-border);
  font-size: var(--text-xs);
  color: var(--clr-text-muted);
  font-weight: var(--weight-medium);
  transition: var(--transition-fast);
  cursor: default;
}

.skill-item img {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  display: block;
}

.skill-emoji {
  font-size: 16px;
  line-height: 1;
  display: inline-block;
}

.skill-item:hover {
  background: rgba(102, 126, 234, 0.15);
  border-color: var(--clr-border-strong);
  color: var(--clr-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

/* -------- Responsive -------- */
@media (max-width: 768px) {
  .resume-container {
    padding: var(--sp-5);
  }

  .resume-tabs {
    border-radius: var(--radius-xl);
  }

  .tab-btn {
    padding: 8px 14px;
    font-size: var(--text-xs);
  }

  .resume-card-header {
    flex-direction: column;
    gap: var(--sp-2);
  }

  .resume-skills-grid {
    grid-template-columns: 1fr;
  }
}


/* ================================================
   CONTACT.CSS — Contact Section
   ================================================ */

.contact {
  background: transparent;
  padding: var(--section-padding);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: var(--sp-6);
  max-width: 1000px;
  margin: 0 auto;
  align-items: start;
}

/* Contact info sidebar */
.contact-info {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.contact-card {
  position: relative;
  padding: var(--sp-6);
  border-radius: var(--radius-lg);
  background: var(--clr-surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--clr-border);
  text-decoration: none;
  color: inherit;
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  transition: var(--transition);
  overflow: hidden;
}

.contact-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--grad-glow);
  opacity: 0;
  transition: opacity var(--duration-base) ease;
}

.contact-card:hover {
  transform: translateY(-4px);
  border-color: var(--clr-border-strong);
  box-shadow: var(--shadow-md);
}

.contact-card:hover::before {
  opacity: 1;
}

.contact-card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: rgba(102, 126, 234, 0.1);
  border: 1px solid var(--clr-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  position: relative;
  transition: var(--transition-fast);
}

.contact-card:hover .contact-card-icon {
  background: var(--grad-primary);
  border-color: transparent;
}

.contact-card-info h4 {
  font-size: var(--text-sm);
  font-weight: var(--weight-semi);
  color: var(--clr-text);
  margin-bottom: 2px;
  position: relative;
}

.contact-card-info p,
.contact-card-info span {
  font-size: var(--text-xs);
  color: var(--clr-text-muted);
  position: relative;
}

/* Contact Form Card */
.contact-form-card {
  padding: var(--sp-8);
  border-radius: var(--radius-xl);
  background: var(--clr-surface);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--clr-border);
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.contact-form-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 20%;
  right: 20%;
  height: 1px;
  background: var(--grad-accent);
}

.contact-form-card h3 {
  font-size: var(--text-xl);
  font-weight: var(--weight-semi);
  margin-bottom: var(--sp-2);
  color: var(--clr-text);
}

.contact-form-card>p {
  font-size: var(--text-sm);
  color: var(--clr-text-muted);
  margin-bottom: var(--sp-6);
}

/* Form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.form-group {
  position: relative;
}

.form-group label {
  display: block;
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  color: var(--clr-text-muted);
  margin-bottom: var(--sp-2);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 13px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--clr-border);
  background: rgba(102, 126, 234, 0.04);
  color: var(--clr-text);
  font-size: var(--text-sm);
  font-family: var(--font-sans);
  outline: none;
  transition: var(--transition-fast);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: var(--clr-text-faint);
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--clr-primary);
  background: rgba(102, 126, 234, 0.07);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

/* Animated focus bar */
.form-focus-bar {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: calc(100% - 2px);
  height: 2px;
  background: var(--grad-accent);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  transition: transform var(--duration-base) var(--ease-spring);
  pointer-events: none;
}

.form-group:focus-within .form-focus-bar {
  transform: translateX(-50%) scaleX(1);
}

.contact-form textarea {
  resize: vertical;
  min-height: 130px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-4);
}

/* Submit button */
.contact-form .btn {
  width: 100%;
  justify-content: center;
  padding: 15px;
  font-size: var(--text-base);
}

/* -------- Responsive -------- */
@media (max-width: 900px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .contact-info {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .contact-card {
    flex: 1;
    min-width: 200px;
  }
}

@media (max-width: 600px) {
  .contact-form-card {
    padding: var(--sp-5);
  }

  .contact-info {
    flex-direction: column;
  }

  .form-row {
    grid-template-columns: 1fr;
  }
}


/* ================================================
   FOOTER.CSS — Footer & Back-to-Top
   ================================================ */

footer {
  padding: var(--sp-10) var(--sp-6) var(--sp-8);
  border-top: 1px solid var(--clr-border);
  text-align: center;
}

.footer-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-5);
}

.footer-logo {
  font-size: var(--text-2xl);
  font-weight: var(--weight-black);
  background: var(--grad-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.03em;
}

.footer-links {
  display: flex;
  gap: var(--sp-6);
  flex-wrap: wrap;
  justify-content: center;
}

.footer-links a {
  font-size: var(--text-sm);
  color: var(--clr-text-faint);
  text-decoration: none;
  transition: color var(--duration-fast) ease;
}

.footer-links a:hover {
  color: var(--clr-primary);
}

.footer-socials {
  display: flex;
  gap: var(--sp-3);
}

.footer-social-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  border: 1px solid var(--clr-border);
  background: var(--clr-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--clr-text-muted);
  text-decoration: none;
  transition: var(--transition);
}

.footer-social-icon svg {
  width: 16px;
  height: 16px;
}

.footer-social-icon:hover {
  border-color: var(--clr-primary);
  color: var(--clr-primary);
  transform: translateY(-3px);
  background: rgba(102, 126, 234, 0.08);
}

.footer-copy {
  font-size: var(--text-xs);
  color: var(--clr-text-faint);
}

.footer-copy span {
  color: var(--clr-primary);
}

/* -------- Back to Top -------- */
.back-to-top {
  position: fixed;
  bottom: var(--sp-6);
  right: var(--sp-6);
  width: 46px;
  height: 46px;
  border-radius: var(--radius-md);
  background: var(--grad-primary);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--z-above);
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: var(--transition);
  box-shadow: var(--shadow-md);
}

.back-to-top.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

.back-to-top:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.back-to-top svg {
  width: 20px;
  height: 20px;
}

/* -------- Responsive -------- */
@media (max-width: 480px) {
  .back-to-top {
    bottom: var(--sp-4);
    right: var(--sp-4);
  }

  .footer-links {
    gap: var(--sp-4);
  }
}


/* ================================================
   MODAL.CSS — Project Detail Modal
   ================================================ */

.project-modal {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(9, 9, 15, 0.55);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration-base) var(--ease-out);
  padding: var(--sp-5);
}

.project-modal.active {
  opacity: 1;
  pointer-events: all;
  animation: modalBackdropIn 0.3s var(--ease-out);
}

.project-modal-card {
  position: relative;
  width: 100%;
  max-width: 660px;
  max-height: 85vh;
  overflow-y: auto;
  background: var(--clr-bg-alt);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-2xl);
  padding: var(--sp-8);
  box-shadow: var(--shadow-xl);
  transform: scale(0.92) translateY(20px);
  transition: transform var(--duration-base) var(--ease-spring);
}

.project-modal.active .project-modal-card {
  transform: scale(1) translateY(0);
  animation: modalCardIn 0.35s var(--ease-spring);
}

/* Scrollbar */
.project-modal-card::-webkit-scrollbar {
  width: 5px;
}

.project-modal-card::-webkit-scrollbar-track {
  background: transparent;
}

.project-modal-card::-webkit-scrollbar-thumb {
  background: var(--clr-border-strong);
  border-radius: 3px;
}

/* Top accent */
.project-modal-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 15%;
  right: 15%;
  height: 1px;
  background: var(--grad-accent);
}

/* Close button */
.modal-close {
  position: absolute;
  top: var(--sp-5);
  right: var(--sp-5);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: rgba(102, 126, 234, 0.08);
  border: 1px solid var(--clr-border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--clr-text-muted);
  font-size: 20px;
  line-height: 1;
  transition: var(--transition-fast);
  z-index: 2;
}

.modal-close:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.4);
  color: #ef4444;
}

/* Modal body content */
#modalBody h2 {
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
  color: var(--clr-text);
  margin-bottom: var(--sp-3);
  padding-right: var(--sp-8);
}

#modalBody>p {
  font-size: var(--text-sm);
  color: var(--clr-text-muted);
  margin-bottom: var(--sp-5);
  line-height: 1.7;
}

#modalBody ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  margin-bottom: var(--sp-5);
}

#modalBody li {
  position: relative;
  padding-left: var(--sp-5);
  font-size: var(--text-sm);
  color: var(--clr-text-muted);
  line-height: 1.6;
}

#modalBody li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--clr-primary);
  font-size: 12px;
  top: 2px;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-bottom: var(--sp-6);
}

.project-tech span {
  display: inline-block;
  padding: 5px 14px;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  background: rgba(102, 126, 234, 0.1);
  color: var(--clr-primary);
  border: 1px solid rgba(102, 126, 234, 0.2);
}

.project-links {
  display: flex;
  gap: var(--sp-3);
  flex-wrap: wrap;
}

/* -------- Responsive -------- */
@media (max-width: 600px) {
  .project-modal-card {
    padding: var(--sp-5);
    border-radius: var(--radius-xl);
  }

  #modalBody h2 {
    font-size: var(--text-xl);
  }
}


/* ================================================
   ANIMATIONS.CSS — Keyframes & Motion System
   ================================================ */

/* -------- Keyframe Library -------- */

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-40px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(40px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
  }

  33% {
    transform: translateY(-14px) rotate(1deg);
  }

  66% {
    transform: translateY(-8px) rotate(-1deg);
  }
}

@keyframes floatSlow {

  0%,
  100% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-20px);
  }
}

@keyframes blink {

  0%,
  49% {
    opacity: 1;
  }

  50%,
  100% {
    opacity: 0;
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% center;
  }

  100% {
    background-position: 200% center;
  }
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

@keyframes glowPulse {

  0%,
  100% {
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.3);
  }

  50% {
    box-shadow: 0 0 40px rgba(102, 126, 234, 0.7), 0 0 80px rgba(240, 147, 251, 0.2);
  }
}

@keyframes rotateGlow {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes heroGradient {
  0% {
    transform: translate3d(0, 0, 0);
  }

  50% {
    transform: translate3d(-3%, -2%, 0);
  }

  100% {
    transform: translate3d(0, 0, 0);
  }
}

@keyframes progressFill {
  from {
    width: 0;
  }

  to {
    width: var(--progress);
  }
}

@keyframes pulse {

  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.05);
    opacity: 0.85;
  }
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes borderGlow {

  0%,
  100% {
    border-color: rgba(102, 126, 234, 0.3);
  }

  50% {
    border-color: rgba(240, 147, 251, 0.7);
  }
}

@keyframes popIn {
  0% {
    opacity: 0;
    transform: scale(0.5);
  }

  70% {
    transform: scale(1.08);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes typeIn {
  from {
    width: 0;
  }

  to {
    width: 100%;
  }
}

/* -------- Scroll Reveal — Pure CSS (no JS dependency) -------- */
/* Elements animate in using @keyframes when they enter the viewport.
   Works via CSS animation-play-state: paused by default, running when
   .visible is added by JS — BUT also visible by default so nothing is
   hidden if JS hasn't run yet. */

.reveal,
.reveal-left,
.reveal-right,
.reveal-scale {
  animation-fill-mode: both;
  animation-duration: 0.65s;
  animation-timing-function: cubic-bezier(0.34, 1.56, 0.64, 1);
}

.reveal {
  animation-name: slideUp;
  animation-delay: 0.05s;
}

.reveal-left {
  animation-name: slideInLeft;
  animation-delay: 0.05s;
}

.reveal-right {
  animation-name: slideInRight;
  animation-delay: 0.05s;
}

.reveal-scale {
  animation-name: scaleIn;
  animation-delay: 0.05s;
}

/* Stagger delays — applied to both transition-delay and animation-delay */
.stagger-1 {
  animation-delay: 0.08s;
}

.stagger-2 {
  animation-delay: 0.14s;
}

.stagger-3 {
  animation-delay: 0.20s;
}

.stagger-4 {
  animation-delay: 0.26s;
}

.stagger-5 {
  animation-delay: 0.32s;
}

.stagger-6 {
  animation-delay: 0.38s;
}

.stagger-7 {
  animation-delay: 0.44s;
}

.stagger-8 {
  animation-delay: 0.50s;
}

/* -------- Floating / Glow Utilities -------- */
.animate-float {
  animation: float 6s ease-in-out infinite;
}

.animate-float-slow {
  animation: floatSlow 8s ease-in-out infinite;
}

.animate-glow {
  animation: glowPulse 3s ease-in-out infinite;
}

.animate-pulse {
  animation: pulse 2s ease-in-out infinite;
}

.animate-spin-slow {
  animation: spin 20s linear infinite;
}

/* -------- Hero Headline Animation -------- */
.hero-title-word {
  display: inline-block;
  opacity: 0;
  transform: translateY(40px);
  animation: slideUp 0.8s var(--ease-spring) forwards;
}

.hero-title-word:nth-child(1) {
  animation-delay: 0.1s;
}

.hero-title-word:nth-child(2) {
  animation-delay: 0.2s;
}

.hero-title-word:nth-child(3) {
  animation-delay: 0.3s;
}

.hero-title-word:nth-child(4) {
  animation-delay: 0.4s;
}

.hero-title-word:nth-child(5) {
  animation-delay: 0.5s;
}

.hero-subtitle-anim {
  opacity: 0;
  animation: slideUp 0.8s var(--ease-spring) 0.45s forwards;
}

.hero-cta-anim {
  opacity: 0;
  animation: slideUp 0.8s var(--ease-spring) 0.6s forwards;
}

.hero-social-anim {
  opacity: 0;
  animation: slideUp 0.8s var(--ease-spring) 0.75s forwards;
}

/* -------- Gradient Border -------- */
.gradient-border {
  position: relative;
  background: var(--clr-surface);
  border-radius: var(--radius-lg);
}

.gradient-border::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: var(--grad-accent);
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity var(--duration-base) var(--ease-out);
}

.gradient-border:hover::before {
  opacity: 1;
}

/* -------- Tilt 3D Effect -------- */
.tilt-card {
  transform-style: preserve-3d;
  transform: perspective(1000px) rotateX(0deg) rotateY(0deg);
  transition: transform 0.15s ease-out;
}

/* -------- Typing Cursor -------- */
.cursor {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  background: var(--clr-primary);
  margin-left: 3px;
  vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
}

/* -------- Scroll Indicator -------- */
.scroll-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2);
  opacity: 0;
  animation: fadeIn 1s ease 1.2s forwards;
}

.scroll-mouse {
  width: 24px;
  height: 40px;
  border: 2px solid var(--clr-border-strong);
  border-radius: 12px;
  display: flex;
  justify-content: center;
  padding: 5px;
}

.scroll-wheel {
  width: 3px;
  height: 8px;
  border-radius: 2px;
  background: var(--clr-primary);
  animation: floatSlow 1.5s ease-in-out infinite;
}

.scroll-text {
  font-size: var(--text-xs);
  color: var(--clr-text-faint);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* -------- Tab Fade Animation -------- */
@keyframes tabFadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tab-content.active {
  animation: tabFadeIn 0.4s var(--ease-spring);
}

/* -------- Navbar Slide Down -------- */
@keyframes navSlideDown {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-20px);
  }

  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* -------- Back to Top -------- */
.back-to-top {
  transform: translateY(0);
  transition: var(--transition);
}

.back-to-top:hover {
  transform: translateY(-4px);
}

/* -------- Modal Animation -------- */
@keyframes modalBackdropIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes modalCardIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(20px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}


/* ================================================
   THEMES.CSS — Light & Dark Mode System
   ================================================ */

/* -------- DARK THEME -------- */
body.dark-theme {
  /* --clr-bg is kept as a reference token used by navbar, modals, etc. */
  --clr-bg: #09090f;
  --clr-bg-alt: #0f0f23;
  --clr-surface: rgba(255, 255, 255, 0.05);
  --clr-surface-alt: rgba(255, 255, 255, 0.03);
  --clr-border: rgba(255, 255, 255, 0.09);
  --clr-border-strong: rgba(102, 126, 234, 0.38);
  --clr-text: #e2e8f0;
  --clr-text-muted: #94a3b8;
  --clr-text-faint: #64748b;

  --shadow-sm: 0 2px 12px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.6);
  --shadow-xl: 0 32px 80px rgba(0, 0, 0, 0.7);
  --shadow-glow: 0 0 40px rgba(102, 126, 234, 0.4);
}

/* -------- NAVBAR DARK -------- */
body.dark-theme .navbar {
  background: rgba(9, 9, 15, 0.75);
  border-color: rgba(255, 255, 255, 0.06);
}

body.dark-theme .navbar.scrolled {
  background: rgba(9, 9, 15, 0.95);
}

body.dark-theme .nav-mobile {
  background: rgba(9, 9, 15, 0.98);
  border-color: rgba(255, 255, 255, 0.06);
}

/* -------- GLASS DARK -------- */
body.dark-theme .glass {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

/* -------- HERO DARK -------- */
body.dark-theme .hero-bg-grid {
  opacity: 0.3;
}

/* -------- SKILL TAGS DARK -------- */
body.dark-theme .skill-item {
  background: rgba(102, 126, 234, 0.1);
  border-color: rgba(102, 126, 234, 0.15);
}

/* Invert icons that are black in dark mode */
body.dark-theme .skill-item.django-icon img,
body.dark-theme .skill-item.flask-icon img {
  filter: invert(1) brightness(2);
}

/* -------- RESUME DARK -------- */
body.dark-theme .resume-container {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.06);
}

body.dark-theme .resume-tabs {
  background: rgba(255, 255, 255, 0.02);
  border-color: rgba(255, 255, 255, 0.04);
}

body.dark-theme .tab-btn:hover:not(.active) {
  background: rgba(255, 255, 255, 0.05);
  color: var(--clr-text);
}

body.dark-theme .resume-card {
  background: rgba(255, 255, 255, 0.025);
  border-color: rgba(255, 255, 255, 0.06);
}

body.dark-theme .resume-card-date {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.06);
}

/* -------- CONTACT DARK -------- */
body.dark-theme .contact-form input,
body.dark-theme .contact-form textarea {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
  color: var(--clr-text);
}

body.dark-theme .contact-form input::placeholder,
body.dark-theme .contact-form textarea::placeholder {
  color: var(--clr-text-faint);
}

/* -------- CERTIFICATION OVERLAY DARK -------- */
body.dark-theme .cert-overlay {
  background: rgba(9, 9, 15, 0.92);
}

/* -------- MODAL DARK -------- */
body.dark-theme .project-modal-card {
  background: var(--clr-bg-alt);
}

/* -------- FOOTER DARK -------- */
body.dark-theme footer {
  border-top-color: rgba(255, 255, 255, 0.06);
}

/* -------- BACK TO TOP DARK -------- */
body.dark-theme .back-to-top {
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
}

/* -------- CONTACT TAG DARK -------- */
body.dark-theme .contact-info-tag {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

/* -------- THEME TOGGLE ICON -------- */
.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  border: 1px solid var(--clr-border);
  background: var(--clr-surface);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--clr-text);
  transition: var(--transition);
  flex-shrink: 0;
}

.theme-toggle:hover {
  border-color: var(--clr-primary);
  color: var(--clr-primary);
  box-shadow: 0 0 16px rgba(102, 126, 234, 0.3);
  transform: rotate(15deg) scale(1.05);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
  transition: transform var(--duration-slow) var(--ease-spring);
  pointer-events: none;
}

/* =========================================================================
   TASK 1: FIXED GLOBAL BACKGROUND SYSTEM
========================================================================= */

/* Ensure only transform/opacity animations apply to background elements */
.hero-bg-gradient,
.hero-bg-grid {
  will-change: transform, opacity;
}


/* =========================================================================
   TASK 2 & 3: FIX LAYOUT SHIFT AND CARD LOADING FLASH
========================================================================= */
.project-card,
.cert-card,
.skill-container,
.contact-card,
.resume-card {
  border-radius: 16px;
  background: var(--clr-surface);
  overflow: hidden;
  /* Defined explicitly before load to avoid square-to-rounded flash */
}

.project-cover {
  height: 250px;
  /* Fixed height to prevent CLS */
  width: 100%;
  position: relative;
  overflow: hidden;
  background: var(--clr-bg-muted);
  /* Fallback block */
}

/* =========================================================================
   TASK 5: THEME-AWARE LOGOS
========================================================================= */
body.dark-theme .logo-dark {
  filter: invert(1) brightness(2);
}

body.light-theme .logo-light {
  filter: invert(1) brightness(0);
}

/* =========================================================================
   TASK 7: REDUCE REPAINTS (GPU ACCELERATION)
========================================================================= */
.hero-orb,
.tech-badge,
.project-card,
.cert-card,
.contact-card,
.resume-card,
.project-modal-card,
.navbar,
.floating-badge {
  will-change: transform, opacity;
  transform: translateZ(0);
  /* Force hardware acceleration */
  backface-visibility: hidden;
}