:root {
  /* Default Hue (Purple) */
  --p-h: 274;
  --p-s: 88%;
  --p-l: 53%;

  /* Backgrounds - Near-neutral dark with a subtle tint of the accent hue */
  --bg-color: hsl(var(--p-h), 8%, 5%);
  --bg-alt-color: hsl(var(--p-h), 10%, 7%);
  --text-main: #f0f0ff;
  --text-muted: hsl(var(--p-h), 8%, 68%);

  /* Glassmorphism */
  --glass-bg: hsla(var(--p-h), 8%, 14%, 0.4);
  --glass-border: hsla(var(--p-h), 12%, 40%, 0.1);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);

  --transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  --transition-fast: all 0.25s ease;
}

/* Derived variables moved here to ensure they re-calculate when --p-h changes */
:root {
  --neon-purple: hsl(var(--p-h), var(--p-s), var(--p-l));
  --neon-purple-dim: hsla(var(--p-h), var(--p-s), var(--p-l), 0.3);
  --neon-blue: hsl(218, 50%, 15%);
  --neon-blue-dim: hsla(218, 50%, 25%, 0.4);

  --gradient-primary: linear-gradient(135deg,
      hsl(var(--p-h), var(--p-s), calc(var(--p-l) - 15%)),
      hsl(var(--p-h), var(--p-s), calc(var(--p-l) + 15%)),
      hsl(var(--p-h), var(--p-s), calc(var(--p-l) - 30%)));

  --gradient-text: linear-gradient(to right,
      hsl(var(--p-h), var(--p-s), var(--p-l)),
      hsl(calc(var(--p-h) + 20), var(--p-s), calc(var(--p-l) + 10%)),
      hsl(calc(var(--p-h) - 20), var(--p-s), calc(var(--p-l) + 5%)));

  --gradient-accent: linear-gradient(135deg, var(--neon-blue) 0%, var(--neon-purple) 100%);

  /* Glows */
  --glow-sm: 0 0 10px var(--neon-purple-dim);
  --glow-md: 0 0 20px var(--neon-purple-dim), 0 0 40px hsla(var(--p-h), var(--p-s), var(--p-l), 0.15);
  --glow-lg: 0 0 30px var(--neon-purple-dim), 0 0 60px hsla(var(--p-h), var(--p-s), var(--p-l), 0.2), 0 0 100px hsla(var(--p-h), var(--p-s), var(--p-l), 0.05);
  --glow-blue: 0 0 15px var(--neon-blue-dim), 0 0 30px rgba(26, 58, 110, 0.2);
}

/* 6 Curated Portfolio Color Themes */
html[data-theme-color="amethyst"] {
  --p-h: 274;
  --p-s: 88%;
  --p-l: 53%;
}

html[data-theme-color="blue"] {
  --p-h: 217;
  --p-s: 100%;
  --p-l: 60%;
}

html[data-theme-color="teal"] {
  --p-h: 188;
  --p-s: 90%;
  --p-l: 42%;
}

html[data-theme-color="green"] {
  --p-h: 152;
  --p-s: 68%;
  --p-l: 44%;
}

html[data-theme-color="indigo"] {
  --p-h: 248;
  --p-s: 85%;
  --p-l: 62%;
}

html[data-theme-color="gold"] {
  --p-h: 42;
  --p-s: 95%;
  --p-l: 52%;
}


/* Light Theme Variables */
body.light-mode {
  --bg-color: hsl(var(--p-h), 20%, 98%);
  --bg-alt-color: hsl(var(--p-h), 15%, 95%);
  --text-main: #1a1a2e;
  --text-muted: #555570;

  --glass-bg: hsla(var(--p-h), 10%, 100%, 0.75);
  --glass-border: hsla(var(--p-h), 15%, 0%, 0.08);
  --glass-shadow: 0 8px 32px 0 rgba(var(--p-h), 20%, 20%, 0.05);

  --p-l: 45%;
  /* Slightly darker for better visibility in light mode */
}

/* Base Styles */
html {
  scroll-behavior: smooth;
}

/* Smooth theme color transition */
html.color-transitioning * {
  transition:
    background-color 0.6s ease,
    border-color 0.6s ease,
    box-shadow 0.6s ease,
    color 0.6s ease,
    filter 0.6s ease !important;
}

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: 'Outfit', sans-serif;
  overflow-x: hidden;
  transition: background-color 0.5s ease, color 0.5s ease;
}

/* Subtle noise texture overlay for depth */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.018;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' 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)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}

/* Accessibility Focus */
:focus-visible {
  outline: 2px dashed var(--neon-purple);
  outline-offset: 4px;
}

.bg-alt {
  background-color: var(--bg-alt-color);
  transition: background-color 0.5s ease;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
}

.font-monospace {
  font-family: 'Fira Code', monospace;
}

a {
  text-decoration: none;
  color: inherit;
}

section {
  padding: 110px 0;
  position: relative;
}

@media (max-width: 768px) {
  section {
    padding: 70px 0;
  }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
  background: var(--neon-purple);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: hsl(var(--p-h), var(--p-s), calc(var(--p-l) + 15%));
}

/* Utilities */
.text-gradient {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  box-shadow: var(--glass-shadow);
  transition: var(--transition);
}

.glass-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--glow-md), 0 20px 40px rgba(0, 0, 0, 0.3);
  border-color: hsla(var(--p-h), var(--p-s), var(--p-l), 0.35);
}

.glow-text {
  text-shadow: 0 0 10px var(--neon-purple-dim);
}

/* Navbar */
.navbar {
  background: hsla(var(--p-h), 8%, 5%, 0.85) !important;
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--glass-border);
  transition: var(--transition);
}

body.light-mode .navbar {
  background: hsla(var(--p-h), 20%, 98%, 0.8) !important;
}

.navbar-brand {
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--text-main) !important;
}

.navbar-brand span {
  color: var(--neon-purple);
}

.nav-link {
  color: var(--text-muted) !important;
  font-weight: 500;
  position: relative;
  transition: color 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--neon-purple) !important;
}

.nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 50%;
  background-color: var(--neon-purple);
  transition: all 0.3s ease;
  transform: translateX(-50%);
  box-shadow: var(--glow-sm);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 80%;
}

/* Theme Toggle */
.theme-toggle {
  background: transparent;
  border: none;
  color: var(--text-main);
  font-size: 1.2rem;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.theme-toggle:hover {
  transform: rotate(15deg) scale(1.1);
  color: var(--neon-purple);
  text-shadow: var(--glow-sm);
}

.color-switcher {
  display: flex;
  gap: 7px;
  background: var(--glass-bg);
  padding: 7px 14px;
  border-radius: 30px;
  border: 1px solid var(--glass-border);
  margin-right: 15px;
  backdrop-filter: blur(12px);
}

.color-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition-fast);
  position: relative;
}

.color-dot:hover {
  transform: scale(1.3);
}

.color-dot.active {
  border-color: #fff;
  box-shadow: 0 0 0 3px hsla(var(--p-h), var(--p-s), var(--p-l), 0.3);
}

body.light-mode .color-dot.active {
  border-color: #222;
}

.dot-amethyst {
  background-color: hsl(274, 88%, 53%);
}

.dot-blue {
  background-color: hsl(217, 100%, 60%);
}

.dot-teal {
  background-color: hsl(188, 90%, 42%);
}

.dot-green {
  background-color: hsl(152, 68%, 44%);
}

.dot-indigo {
  background-color: hsl(248, 85%, 62%);
}

.dot-gold {
  background-color: hsl(42, 95%, 52%);
}


/* Neon Button */
.btn-neon {
  position: relative;
  display: inline-block;
  padding: 12px 30px;
  color: var(--text-main);
  background: transparent;
  border: 2px solid var(--neon-purple);
  border-radius: 8px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  overflow: hidden;
  transition: all 0.3s ease;
  z-index: 1;
}

.btn-neon::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0%;
  height: 100%;
  background: var(--gradient-primary);
  transition: all 0.3s ease;
  z-index: -1;
}

.btn-neon:hover {
  color: #fff;
  border-color: transparent;
  box-shadow: var(--glow-md);
  transform: translateY(-2px);
}

.btn-neon:hover::before {
  width: 100%;
}

.btn-neon-outline {
  border-color: var(--text-muted);
  color: var(--text-muted);
}

.btn-neon-outline:hover {
  border-color: var(--neon-purple);
  color: #fff;
}

/* Hero Section */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: 80px;
}

/* Animated mesh grid */
.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(hsla(var(--p-h), 30%, 50%, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, hsla(var(--p-h), 30%, 50%, 0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at 60% 50%, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 60% 50%, black 30%, transparent 75%);
  pointer-events: none;
  z-index: 0;
  animation: gridDrift 30s ease-in-out infinite alternate;
}

@keyframes gridDrift {
  0% {
    transform: translate(0, 0);
  }

  100% {
    transform: translate(-20px, -10px);
  }
}

.hero-bg-anim {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at center, hsla(var(--p-h), var(--p-s), var(--p-l), 0.12) 0%, transparent 50%);
  animation: rotateBg 20s linear infinite;
  z-index: 0;
  pointer-events: none;
}

@keyframes rotateBg {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-subtitle {
  color: var(--neon-purple);
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.hero-title {
  font-size: 4rem;
  font-weight: 800;
  margin-bottom: 20px;
  line-height: 1.1;
}

.typing-container {
  font-size: 1.5rem;
  color: var(--text-muted);
  margin-bottom: 30px;
  height: 40px;
}

.typed-cursor {
  opacity: 1;
  animation: blink 0.7s infinite;
  color: var(--neon-purple);
}

@keyframes blink {
  0% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

@keyframes float {
  0% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-15px);
  }

  100% {
    transform: translateY(0px);
  }
}

.hero-img-container {
  position: relative;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  animation: float 5s ease-in-out infinite;
}

/* Glowing ring behind image */
.hero-img-container::before {
  content: '';
  position: absolute;
  inset: -20px;
  background: radial-gradient(ellipse at center, hsla(var(--p-h), var(--p-s), var(--p-l), 0.2) 0%, hsla(218, 50%, 15%, 0.1) 50%, transparent 70%);
  border-radius: 50%;
  animation: pulse-glow 3s ease-in-out infinite alternate;
  z-index: -1;
}

@keyframes pulse-glow {
  0% {
    opacity: 0.6;
    transform: scale(0.95);
  }

  100% {
    opacity: 1;
    transform: scale(1.05);
  }
}

.hero-profile-img {
  width: 100%;
  height: auto;
  /* No border-radius since the PNG has transparent background */
  filter: drop-shadow(0 10px 30px hsla(var(--p-h), var(--p-s), var(--p-l), 0.5)) drop-shadow(0 0 60px hsla(218, 50%, 15%, 0.3));
  transition: var(--transition);
  position: relative;
  z-index: 1;
}

.hero-profile-img:hover {
  transform: scale(1.03) translateY(-5px);
  filter: drop-shadow(0 15px 40px hsla(var(--p-h), var(--p-s), var(--p-l), 0.7)) drop-shadow(0 0 80px hsla(218, 50%, 15%, 0.4));
}

/* About Section */
.profile-img-container {
  position: relative;
  width: 100%;
  max-width: 430px;
  max-height: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Animated border rings */
.profile-img-container::before {
  content: '';
  position: absolute;
  inset: -15px;
  border: 1.5px solid hsla(var(--p-h), var(--p-s), var(--p-l), 0.4);
  border-radius: 24px;
  animation: rotateBorder 12s linear infinite;
  z-index: 0;
}

.profile-img-container::after {
  content: '';
  position: absolute;
  inset: -28px;
  border: 1px dashed hsla(var(--p-h), var(--p-s), var(--p-l), 0.2);
  border-radius: 30px;
  animation: rotateBorder 20s linear infinite reverse;
  z-index: 0;
}

@keyframes rotateBorder {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.profile-img {
  width: 100%;
  height: 100%;
  max-height: 520px;
  object-fit: contain;
  /* No border-radius since transparent PNG */
  filter: drop-shadow(0 8px 25px hsla(var(--p-h), var(--p-s), var(--p-l), 0.45)) drop-shadow(0 0 50px hsla(218, 50%, 15%, 0.25));
  transition: var(--transition);
  position: relative;
  z-index: 1;
}

.profile-img:hover {
  transform: scale(1.03) translateY(-5px);
  filter: drop-shadow(0 12px 35px hsla(var(--p-h), var(--p-s), var(--p-l), 0.65)) drop-shadow(0 0 70px hsla(218, 50%, 15%, 0.35));
}

.section-title {
  font-size: 2.5rem;
  margin-bottom: 3rem;
  position: relative;
  display: inline-block;
}

.section-title::before {
  content: '';
  position: absolute;
  bottom: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: var(--gradient-text);
  border-radius: 2px;
  box-shadow: var(--glow-md);
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 4px;
  background: var(--gradient-text);
  border-radius: 2px;
  box-shadow: var(--glow-lg);
  animation: shimmer-bar 2s ease-in-out infinite alternate;
}

@keyframes shimmer-bar {
  0% {
    width: 30px;
    opacity: 0.6;
  }

  100% {
    width: 80px;
    opacity: 1;
  }
}

/* Skills Section */
.skill-category {
  margin-bottom: 30px;
}

.skill-category-title {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.skill-category-title i {
  color: var(--neon-purple);
}

.skill-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 22px 16px;
  gap: 12px;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.skill-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at 50% 120%, hsla(var(--p-h), var(--p-s), var(--p-l), 0.08) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.skill-card:hover::after {
  opacity: 1;
}

.skill-icon {
  font-size: 2.5rem;
  color: var(--text-main);
  transition: var(--transition);
}

.skill-card:hover .skill-icon {
  color: var(--neon-purple);
  transform: scale(1.1);
  text-shadow: var(--glow-sm);
}

.skill-name {
  font-weight: 500;
  letter-spacing: 1px;
}

/* Projects Section */
.projects-subtitle {
  color: var(--text-muted);
  font-size: 1rem;
  margin-top: -1.5rem;
  margin-bottom: 0;
}

/* --- Carousel Wrapper --- */
.projects-carousel-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
}

/* --- Track Container (the viewport / clipping window) --- */
.projects-track-container {
  flex: 1;
  overflow: hidden;
  border-radius: 20px;
  /* subtle inner shadow to fade edges */
  mask-image: linear-gradient(to right, transparent 0%, black 3%, black 97%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 3%, black 97%, transparent 100%);
}

/* --- Track (the scrolling strip of all slides) --- */
.projects-track {
  display: flex;
  gap: 24px;
  transition: transform 0.65s cubic-bezier(0.77, 0, 0.175, 1),
    opacity 0.3s ease;
  will-change: transform;
  padding: 12px 4px;
  /* breathing room so shadows aren't clipped */
}

/* Transition state */
.projects-track.is-animating {
  pointer-events: none;
}

/* --- Individual Slide --- */
.proj-slide {
  flex: 0 0 calc((100% - 48px) / 3);
  /* 3 slides - 2 gaps */
  min-width: calc((100% - 48px) / 3);
  transition: transform 0.4s ease, opacity 0.4s ease;
}

/* Fade-blur cards that are entering/leaving */
.projects-track.slide-left-exit .proj-slide,
.projects-track.slide-right-exit .proj-slide {
  opacity: 0;
  transform: scale(0.94) translateY(10px);
  filter: blur(4px);
}

.project-card {
  height: 100%;
  overflow: hidden;
  padding: 0;
  transition: var(--transition), box-shadow 0.4s ease;
}

/* --- Project Number Badge --- */
.proj-number-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: hsla(var(--p-h), var(--p-s), var(--p-l), 0.85);
  color: #fff;
  font-family: 'Fira Code', monospace;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  letter-spacing: 1px;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 2px 12px hsla(var(--p-h), var(--p-s), var(--p-l), 0.4);
  z-index: 3;
}

/* --- Navigation Buttons --- */
.proj-nav-btn {
  position: relative;
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid hsla(var(--p-h), var(--p-s), var(--p-l), 0.4);
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  color: var(--text-main);
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  overflow: visible;
  z-index: 10;
}

.proj-nav-inner {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  transition: transform 0.3s ease;
}

/* Animated glow orb behind button */
.proj-nav-glow {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  background: radial-gradient(circle, hsla(var(--p-h), var(--p-s), var(--p-l), 0.35) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.35s ease, transform 0.35s ease;
  transform: scale(0.7);
  z-index: 0;
  pointer-events: none;
}

.proj-nav-btn:hover .proj-nav-glow {
  opacity: 1;
  transform: scale(1);
}

.proj-nav-btn:hover {
  border-color: var(--neon-purple);
  box-shadow: var(--glow-md);
  background: hsla(var(--p-h), var(--p-s), var(--p-l), 0.12);
  color: var(--neon-purple);
}

.proj-nav-btn:hover .proj-nav-inner {
  transform: scale(1.1);
}

.proj-nav-btn:active {
  transform: scale(0.93);
}

.proj-nav-btn:disabled,
.proj-nav-btn.proj-disabled {
  opacity: 0.25;
  cursor: not-allowed;
  pointer-events: none;
}

/* --- Pagination Dots --- */
.proj-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 28px;
}

.proj-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--glass-border);
  border: 1px solid hsla(var(--p-h), var(--p-s), var(--p-l), 0.3);
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.proj-dot.active {
  width: 28px;
  border-radius: 4px;
  background: var(--gradient-text);
  box-shadow: var(--glow-sm);
  border-color: transparent;
}

.proj-dot:hover:not(.active) {
  background: hsla(var(--p-h), var(--p-s), var(--p-l), 0.5);
  transform: scale(1.2);
}

/* --- Page Counter --- */
.proj-counter {
  text-align: center;
  margin-top: 10px;
  font-family: 'Fira Code', monospace;
  font-size: 0.85rem;
  color: var(--text-muted);
  letter-spacing: 1px;
}

.proj-counter #projCurrent {
  color: var(--neon-purple);
  font-weight: 700;
}

/* --- Responsive Carousel --- */
@media (max-width: 991px) {
  .proj-slide {
    flex: 0 0 calc((100% - 24px) / 2);
    min-width: calc((100% - 24px) / 2);
  }
}

@media (max-width: 600px) {
  .proj-slide {
    flex: 0 0 100%;
    min-width: 100%;
  }

  .proj-nav-btn {
    width: 40px;
    height: 40px;
    font-size: 0.9rem;
  }
}

.project-img-wrapper {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
}

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

.project-card:hover .project-img {
  transform: scale(1.1);
}

.project-img-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, transparent, hsl(var(--p-h), 8%, 4%));
  opacity: 0.8;
}

.project-content {
  padding: 25px;
}

.project-title {
  font-size: 1.5rem;
  margin-bottom: 15px;
}

.tech-tag {
  font-size: 0.75rem;
  padding: 4px 11px;
  background: hsla(var(--p-h), var(--p-s), var(--p-l), 0.1);
  color: var(--neon-purple);
  border: 1px solid hsla(var(--p-h), var(--p-s), var(--p-l), 0.3);
  border-radius: 20px;
  margin-right: 6px;
  margin-bottom: 6px;
  display: inline-block;
  font-weight: 500;
  letter-spacing: 0.3px;
  transition: var(--transition-fast);
}

.tech-tag:hover {
  background: hsla(var(--p-h), var(--p-s), var(--p-l), 0.2);
  border-color: var(--neon-purple);
  transform: translateY(-1px);
}

.project-links {
  display: flex;
  gap: 15px;
  margin-top: 20px;
}

.project-link {
  font-size: 1.2rem;
  color: var(--text-muted);
  transition: var(--transition);
}

.project-link:hover {
  color: var(--neon-purple);
  text-shadow: var(--glow-sm);
  transform: translateY(-3px);
}

/* Experience Timeline */
.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.timeline::after {
  content: '';
  position: absolute;
  width: 2px;
  background: linear-gradient(to bottom,
      transparent,
      var(--neon-purple),
      var(--neon-purple),
      transparent);
  top: 0;
  bottom: 0;
  left: 30px;
  margin-left: -1px;
  opacity: 0.4;
}

.timeline-item {
  padding: 20px 40px 40px 80px;
  position: relative;
  width: 100%;
}

.timeline-dot {
  position: absolute;
  width: 20px;
  height: 20px;
  left: 20px;
  top: 25px;
  background: var(--bg-color);
  border: 4px solid var(--neon-purple);
  border-radius: 50%;
  z-index: 1;
  box-shadow: var(--glow-sm);
  transition: var(--transition);
}

.timeline-item:hover .timeline-dot {
  background: var(--neon-purple);
  box-shadow: var(--glow-md);
  transform: scale(1.2);
}

.timeline-date {
  color: var(--neon-purple);
  font-family: 'Fira Code', monospace;
  font-size: 0.9rem;
  margin-bottom: 10px;
  display: inline-block;
}

.timeline-title {
  font-size: 1.3rem;
  margin-bottom: 5px;
}

.timeline-subtitle {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 15px;
}

/* Contact Section */
.contact-info {
  margin-bottom: 30px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 18px;
  color: var(--text-muted);
  text-decoration: none;
  transition: var(--transition-fast);
}

.contact-item:hover {
  color: var(--text-main);
  transform: translateX(4px);
}

.contact-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--glass-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--neon-purple);
  font-size: 1.1rem;
  box-shadow: var(--glass-shadow);
  border: 1px solid var(--glass-border);
  transition: var(--transition);
}

.contact-item:hover .contact-icon {
  background: var(--neon-purple);
  color: #fff;
  box-shadow: var(--glow-md);
  transform: scale(1.1);
}

.contact-form .form-control {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-main);
  padding: 14px 18px;
  border-radius: 10px;
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  transition: var(--transition);
}

body.light-mode .contact-form .form-control {
  background: rgba(255, 255, 255, 0.8);
  color: #1a1a2e;
}

.contact-form .form-control:focus {
  background: hsla(var(--p-h), 15%, 15%, 0.08);
  border-color: var(--neon-purple);
  box-shadow: var(--glow-sm);
  outline: none;
}

.contact-form .form-control::placeholder {
  color: var(--text-muted);
}

/* Footer */
footer {
  border-top: 1px solid var(--glass-border);
  padding: 40px 0;
  text-align: center;
  color: var(--text-muted);
  background: hsl(var(--p-h), 8%, 3%);
  backdrop-filter: blur(10px);
  transition: background-color 0.6s ease;
}

body.light-mode footer {
  background: hsl(var(--p-h), 20%, 97%);
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  color: #33334d;
}

footer .footer-links a {
  color: var(--text-muted);
  margin: 0 12px;
  font-size: 1.3rem;
  transition: var(--transition-fast);
}

footer .footer-links a:hover {
  color: var(--neon-purple);
  text-shadow: var(--glow-sm);
  transform: translateY(-3px);
  display: inline-block;
}

/* Scroll To Top Button */
#scroll-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--gradient-primary);
  color: #fff;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--glow-md);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 9999;
}

#scroll-top.visible {
  opacity: 1;
  transform: translateY(0);
}

#scroll-top:hover {
  box-shadow: var(--glow-lg);
  transform: translateY(-3px);
}

/* Scroll Animations */
.reveal {
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.8s ease-out;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Stats Section */
.stat-card {
  text-align: center;
  padding: 32px 24px;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 100%, hsla(var(--p-h), var(--p-s), var(--p-l), 0.06) 0%, transparent 70%);
  pointer-events: none;
  transition: opacity 0.4s ease;
  opacity: 0;
}

.stat-card:hover::before {
  opacity: 1;
}

.stat-number {
  font-size: 3rem;
  font-weight: 800;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 8px;
}

.stat-label {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* Responsive adjustments */
@media (max-width: 991px) {
  .hero-title {
    font-size: 3rem;
  }

  .hero-img-container {
    max-width: 320px;
    margin-bottom: 2rem;
  }

  .profile-img-container {
    max-width: 350px;
    margin-bottom: 2rem;
  }
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }

  .typed-cursor {
    display: none;
  }

  .typing-container {
    font-size: 1.2rem;
  }

  .timeline::after {
    left: 20px;
  }

  .timeline-item {
    padding: 20px 20px 40px 60px;
  }

  .timeline-dot {
    left: 10px;
  }

  #scroll-top {
    bottom: 20px;
    right: 20px;
    width: 42px;
    height: 42px;
  }
}

@media (max-width: 576px) {
  .hero-title {
    font-size: 2.2rem;
  }

  .hero-subtitle {
    font-size: 0.8rem;
  }

  .hero-img-container {
    max-width: 260px;
  }

  .profile-img-container {
    max-width: 280px;
  }

  .profile-img {
    max-height: 380px;
  }

  .section-title {
    font-size: 2rem;
  }
}

/* Experience Tabs */
.exp-tabs {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.exp-tab-btn {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
  padding: 12px 24px;
  border-radius: 30px;
  font-family: 'Outfit', sans-serif;
  font-weight: 500;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.exp-tab-btn i {
  color: var(--neon-purple);
  transition: var(--transition);
}

.exp-tab-btn:hover {
  background: hsla(var(--p-h), var(--p-s), var(--p-l), 0.1);
  color: var(--text-main);
  border-color: hsla(var(--p-h), var(--p-s), var(--p-l), 0.3);
  transform: translateY(-2px);
}

.exp-tab-btn.active {
  background: var(--gradient-primary);
  color: #fff;
  border-color: transparent;
  box-shadow: var(--glow-sm);
}

.exp-tab-btn.active i {
  color: #fff;
}

.cert-badge {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 12px;
  margin-left: 8px;
  font-weight: 600;
}

.exp-tab-content {
  display: none;
  animation: fadeIn 0.5s ease;
}

.exp-tab-content.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Certifications Cards */
.cert-card {
  position: relative;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}

.cert-header {
  display: flex;
  align-items: center;
  margin-bottom: 18px;
}

.cert-icon-wrap {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, hsla(var(--p-h), var(--p-s), var(--p-l), 0.15), hsla(var(--p-h), var(--p-s), var(--p-l), 0.05));
  border: 1px solid hsla(var(--p-h), var(--p-s), var(--p-l), 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--neon-purple);
  margin-right: 15px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: var(--transition);
}

.cert-card:hover .cert-icon-wrap {
  transform: scale(1.05) rotate(-3deg);
  box-shadow: var(--glow-sm), 0 4px 15px rgba(0, 0, 0, 0.3);
}

.cert-issuer {
  display: block;
  font-weight: 600;
  color: var(--text-main);
  font-size: 0.95rem;
}

.cert-date {
  display: block;
  color: var(--neon-purple);
  font-family: 'Fira Code', monospace;
  font-size: 0.8rem;
  opacity: 0.85;
}

.cert-title {
  font-size: 1.1rem;
  margin-bottom: 10px;
  line-height: 1.4;
  flex-grow: 1;
}

.cert-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 18px;
  line-height: 1.6;
}

.cert-verify-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  color: var(--neon-purple);
  font-size: 0.82rem;
  font-weight: 600;
  border: 1px solid hsla(var(--p-h), var(--p-s), var(--p-l), 0.3);
  padding: 7px 16px;
  border-radius: 20px;
  background: hsla(var(--p-h), var(--p-s), var(--p-l), 0.07);
  align-self: flex-start;
  transition: var(--transition-fast);
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.cert-verify-btn:hover {
  background: var(--neon-purple);
  color: #fff;
  border-color: transparent;
  box-shadow: var(--glow-sm);
  transform: translateY(-2px);
}

/* Smooth background transition on color switch */
section,
footer,
.navbar,
.glass-card,
.contact-icon,
.skill-card,
.stat-card {
  transition:
    background-color 0.6s ease,
    border-color 0.6s ease,
    box-shadow 0.5s ease,
    transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Mobile: hide color switcher pill, show as icon strip */
@media (max-width: 768px) {
  .color-switcher {
    padding: 5px 10px;
    gap: 5px;
  }

  .color-dot {
    width: 16px;
    height: 16px;
  }
}