:root {
  --primary-color: #6366f1;
  --secondary-color: #8b5cf6;
  --accent-color: #06b6d4;
  --dark-color: #0f172a;
  --light-color: #f8fafc;
  --text-dark: #1e293b;
  --text-light: #64748b;
  --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  --gradient-secondary: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
  --gradient-accent: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
  --gradient-hero: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
  --shadow-light: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-medium: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-heavy: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  --shadow-neumorphic: 8px 8px 16px rgba(0, 0, 0, 0.1), 
                       -8px -8px 16px rgba(255, 255, 255, 0.5);
  --border-radius: 16px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

html,
body {
  width: 100%;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", "Space Grotesk", sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background: var(--light-color);
  overflow-x: hidden;
  min-height: 100vh;
}

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

::-webkit-scrollbar-track {
  background: rgba(99, 102, 241, 0.05);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: var(--gradient-primary);
  border-radius: 10px;
  border: 2px solid var(--light-color);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--secondary-color);
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.display-1,
.display-4,
.hero-title {
  font-size: clamp(2.5rem, 8vw, 4rem);
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 4px 30px rgba(99, 102, 241, 0.25);
}

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

.gradient-bg {
  background: var(--gradient-primary);
}

/* Enhanced Glass Effect */
.glass-effect {
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: var(--shadow-light);
  transition: var(--transition);
}

/* Enhanced Card Styles */
.card-modern {
  background: rgba(255, 255, 255, 0.85);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-light);
  border: none;
  transition: var(--transition);
  overflow: hidden;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.card-modern:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: var(--shadow-heavy);
  backdrop-filter: blur(16px);
}

/* Enhanced Navigation Styles */
.navbar {
  background: rgba(15, 23, 42, 0.92) !important;
  backdrop-filter: blur(20px) saturate(180%);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  transition: var(--transition);
  padding: 1rem 0;
}

.navbar.scrolled {
  background: rgba(255, 255, 255, 0.96) !important;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.navbar.scrolled .navbar-brand,
.navbar.scrolled .nav-link {
  color: var(--dark-color) !important;
}

.navbar.scrolled .nav-link:hover,
.navbar.scrolled .nav-link.active {
  color: white !important;
}

.navbar-brand {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 900;
  font-size: 2.1rem;
  color: white !important;
  letter-spacing: 2px;
  position: relative;
  z-index: 1;
}

.navbar-brand::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 3px;
  background: var(--gradient-primary);
  transition: var(--transition);
  z-index: -1;
  border-radius: 2px;
}

.navbar-brand:hover::after {
  width: 100%;
}

.navbar-nav .nav-link {
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8) !important;
  margin: 0 0.5rem;
  padding: 0.5rem 1rem !important;
  border-radius: 8px;
  transition: var(--transition);
  position: relative;
}
.navbar-toggler-icon {
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='rgba%28255,255,255,1%29' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}

/* Make Next.js, Flask, Express devicon icons visible/darker */
.devicon-nextjs-original-wordmark,
.devicon-express-original,
.devicon-flask-original {
  filter: none !important;
  color: #222 !important;        /* makes the paths visible */
  fill: #222 !important;         /* makes SVG fills visible */
  stroke: #222 !important;       /* for flask/express, if SVG uses stroke */
  opacity: 1 !important;
  /* Optional: add a white outline for contrast on dark backgrounds */
  text-shadow: 0 0 2px #fff, 0 0 4px #fff;
}
.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  color: white !important;
  background: var(--gradient-primary);
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(99, 102, 241, 0.3);
}

.navbar-nav .nav-link::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: var(--transition);
  border-radius: 2px;
}

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

.cta-nav-button {
  background: var(--gradient-primary) !important;
  border: none !important;
  border-radius: 25px !important;
  padding: 0.6rem 1.5rem !important;
  font-weight: 700 !important;
  letter-spacing: 1px;
  transition: var(--transition) !important;
  box-shadow: var(--shadow-medium) !important;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.cta-nav-button::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: var(--transition);
  z-index: -1;
}

.cta-nav-button:hover::before {
  left: 100%;
}

.cta-nav-button:hover {
  transform: translateY(-2px) scale(1.05) !important;
  box-shadow: var(--shadow-heavy) !important;
}

/* Enhanced Hero Section */
.hero {
  min-height: 100vh;
  background: var(--gradient-hero);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 8vh;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 30%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(139, 92, 246, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 40% 80%, rgba(6, 182, 212, 0.1) 0%, transparent 50%);
  animation: float 20s ease-in-out infinite;
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E");
  opacity: 0.3;
  pointer-events: none;
}

.hero .container {
  position: relative;
  z-index: 2;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 900;
  color: white;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.23);
  margin-bottom: 1rem;
  letter-spacing: 1px;
  animation: fadeInUp 1s ease-out;
}

.hero-subtitle {
  font-size: clamp(1.2rem, 3vw, 1.7rem);
  color: rgba(255, 255, 255, 0.93);
  font-weight: 600;
  margin-bottom: 1rem;
  letter-spacing: 0.5px;
  animation: fadeInUp 1s ease-out 0.2s both;
}

.hero .text-muted {
  color: rgba(255, 255, 255, 0.7) !important;
  animation: fadeInUp 1s ease-out 0.4s both;
}

.hero .lead {
  color: rgba(255, 255, 255, 0.84) !important;
}

.profile-image-modern {
  transition: var(--transition);
  position: relative;
  cursor: pointer;
  width: 185px !important;
  height: 185px !important;
  margin-top: 1.5rem;
  margin-bottom: 2rem;
  border: 4px solid rgba(255, 255, 255, 0.2);
  box-shadow: 
    0 8px 32px rgba(99, 102, 241, 0.19),
    inset 0 0 0 4px rgba(255, 255, 255, 0.1);
  animation: fadeIn 1s ease-out, float 6s ease-in-out infinite;
}

.profile-image-modern:hover {
  transform: scale(1.08) rotate(2deg);
  box-shadow: 
    0 24px 48px rgba(99, 102, 241, 0.35),
    inset 0 0 0 4px rgba(255, 255, 255, 0.2) !important;
  border-color: rgba(255, 255, 255, 0.3);
}

.profile-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--gradient-primary);
  opacity: 0;
  transition: var(--transition);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-image-modern:hover .profile-overlay {
  opacity: 0.16;
}

.social-btn {
  border-radius: 50px !important;
  padding: 0.7rem 2.3rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.5px;
  transition: var(--transition) !important;
  border: none !important;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.social-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: var(--transition);
  z-index: -1;
}

.social-btn:hover::before {
  left: 100%;
}

.social-btn:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: var(--shadow-heavy) !important;
}

.btn-primary.social-btn {
  background: var(--gradient-primary) !important;
  color: #fff !important;
}

.btn-dark.social-btn {
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%) !important;
  color: #fff !important;
}

.hero-buttons {
  animation: fadeInUp 1s ease-out 0.6s both;
}

/* Section Styling */
.section {
  padding: 6rem 0;
  position: relative;
}

.section-title {
  font-size: 2.8rem;
  font-weight: 900;
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
  letter-spacing: 1px;
  padding-bottom: 1rem;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: var(--gradient-primary);
  border-radius: 2px;
}
.skills-section {
  padding: 2rem 0; /* spacing for section itself */
}

.skill-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  gap: 0.5rem; /* space between icon and text */
  padding: 1rem; /* reduce padding so it doesn’t look like a card */

  border-radius: 50%; /* makes the container round */
  background: rgba(255, 255, 255, 0.2); /* soft minimal look */
  border: none; /* remove card-like border */
  box-shadow: none; /* remove heavy shadows */
  transition: transform 0.3s ease;
}

.skill-icon:hover {
  transform: translateY(-5px) scale(1.05);
}


/* Experience Cards */
.experience-section .card-modern {
  border-left: 4px solid;
  border-image: var(--gradient-primary);
  border-image-slice: 1;
  transition: var(--transition);
}

.experience-section .card-modern:hover {
  transform: translateX(10px);
}

/* Project Cards */
.project-img-wrapper {
  overflow: hidden;
  position: relative;
  height: 200px;
}

.project-img-wrapper img {
  /* width: 100%; */
  /* height: 100%; */
  object-fit: cover;
  transition: var(--transition-slow);
}


.badge {
  font-weight: 500;
  /* padding: 0.5rem 0.8rem; */
  border-radius: 20px;
}

/* Volunteer Section */
.volunteer-bg-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('https://cdn-icons-png.flaticon.com/512/4128/4128176.png') no-repeat center center;
  background-size: 30%;
  opacity: 0.05;
  z-index: 0;
  pointer-events: none;
}

.volunteer-section .card-modern {
  transition: var(--transition);
}

.volunteer-section .card-modern:hover {
  transform: translateY(-5px);
}

/* Contact Section */
.contact-section .card-modern {
  transition: var(--transition);
  /* border: 1px solid rgba(255, 255, 255, 0.5); */
}

.contact-section .card-modern:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-medium);
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

/* Loading Animation */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--light-color);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: fadeOut 0.8s ease-in-out 1.7s both;
}

.loading-spinner {
  width: 54px;
  height: 54px;
  border: 4px solid rgba(99, 102, 241, 0.2);
  border-top: 4px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes fadeOut {
  to {
    opacity: 0;
    visibility: hidden;
  }
}

/* Particle effect for hero background */
.particle {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  animation: float 15s infinite ease-in-out;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .container {
    padding: 0 15px;
  }
  
  .hero {
    text-align: center;
    padding: 2rem 0;
  }
  
  .profile-image-modern {
    width: 150px !important;
    height: 150px !important;
  }
  
  .hero-title {
    font-size: 2.2rem;
  }
  
  .hero-buttons .btn {
    display: block;
    margin: 0.7rem auto !important;
    width: 200px;
  }
  
  .section {
    padding: 4rem 0;
  }
  
  .section-title {
    font-size: 2.2rem;
  }
  
  .navbar-nav .nav-link {
    text-align: center;
    margin: 0.2rem 0;
  }
  
  .navbar-collapse {
    background: rgba(15, 23, 42, 0.98);
    backdrop-filter: blur(20px);
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-top: 1rem;
  }
  
  .navbar.scrolled .navbar-collapse {
    background: rgba(255, 255, 255, 0.98);
  }
}

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

.shadow-soft {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.hover-lift {
  transition: var(--transition);
}

.hover-lift:hover {
  transform: translateY(-5px);
}

/* Focus states for accessibility */
a:focus,
button:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Reduced motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  :root {
    --light-color: #0f172a;
    --text-dark: #f1f5f9;
    --text-light: #cbd5e1;
  }
  
  .card-modern {
    /* background: rgba(15, 23, 42, 0.7); */
    border: 1px solid rgba(255, 255, 255, 0.1);
  }
  
.skill-icon {
  border-radius: 50%;
  /* background: rgba(240, 240, 240, 0.6); */
}
}

.emoji {
  color: initial !important; 
  display: inline-block;
  animation: pulse 2s infinite;
}


/* Only add or change the following for project buttons/card spacing */
.project-action-row {
  display: flex;
  justify-content: flex-end;
  gap: 0.5em;
  margin-top: auto;
  margin-bottom: 0;
  align-items: center;
  text-align: center;
}
.project-action-btn {
  background: var(--gradient-primary) !important;
  color: #fff !important;
  border: none;
  border-radius: 22px;
  padding: 0.35rem 1.1rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: var(--transition);
  box-shadow: var(--shadow-medium);
  font-size: 0.96rem;
  display: flex;
  align-items: center;
  gap: 0.38em;
  outline: none !important;
  white-space: nowrap;
  min-width: 80px;
  min-height: 36px;
}
.project-action-btn:hover,
.project-action-btn:focus {
  background: var(--gradient-secondary) !important;
  color: #fff !important;
  box-shadow: var(--shadow-heavy);
  transform: translateY(-2px) scale(1.04);
}
@media (max-width: 767px) {
  .project-action-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.38em;
  }
}
.card.card-modern .card-title {
  font-size: 1.11rem;
  margin-bottom: 0.15rem;
}
.card.card-modern .card-text {
  font-size: 0.98rem;
}
.card.card-modern {
  min-height: 75px;
  padding-bottom: 0.5rem;
}