/* Base Styles & Variables */
:root {
  --primary-color: #1e40af; 
  --secondary-color: #1c4181; 
  --accent-color: #0ea5e9; 
  --dark-color: #0f172a; 
  --light-color: #ffffff; 
  --gray-color: #253748;
  --light-gray: #e2e8f0; 
  --gradient: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08),
    0 4px 6px -2px rgba(0, 0, 0, 0.04);
  --border-radius: 8px; 
  --transition: all 0.3s ease;
  --max-width: 1200px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", sans-serif;
  line-height: 1.7;
  color: var(--dark-color);
  background-color: var(--light-color);
}

img {
  max-width: 100%;
  height: auto;
}

a {
  text-decoration: none;
  color: var(--primary-color);
  transition: var(--transition);
}

a:hover {
  color: var(--secondary-color);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Poppins", sans-serif;
  line-height: 1.3;
  font-weight: 600;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

section {
  padding: 80px 0;
}

/* Utility Classes */
.btn-primary,
.btn-secondary {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 50px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  font-family: "Poppins", sans-serif;
  transition: var(--transition);
}

.btn-primary {
  background: var(--gradient);
  color: white;
  border: none;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  color: white;
}

.btn-secondary {
  background: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
  background: var(--primary-color);
  color: white;
}

.btn-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.9rem;
  color: var(--primary-color);
  font-weight: 600;
  transition: var(--transition);
}

.btn-link:hover {
  color: var(--secondary-color);
  transform: translateX(3px);
}

.section-title {
  font-size: 2.2rem;
  text-align: center;
  margin-bottom: 50px;
  position: relative;
}

.section-title span {
  position: relative;
  z-index: 1;
}

.section-title span::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--gradient);
  border-radius: 5px;
}

/* Header & Navbar */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
  padding: 0 30px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.logo {
  font-family: "Poppins", sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-color);
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 30px;
}

.nav-link {
  font-family: "Poppins", sans-serif;
  font-weight: 500;
  color: var(--dark-color);
  position: relative;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient);
  transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.theme-switch {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 1.2rem;
  color: var(--dark-color);
  transition: var(--transition);
}

/* Tooltip (from data-tooltip) */
.theme-switch::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: -35px;
  left: 50%;
  transform: translateX(-50%) translateY(5px);
  background: #1e293b;   /* Always dark background */
  color: #fff;           /* Always white text */
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 0.8rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.theme-switch::before {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%) translateY(5px);
  border-width: 6px;
  border-style: solid;
  border-color: #1e293b transparent transparent transparent; /* Match tooltip bg */
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
}


/* Show tooltip */
.theme-switch:hover::after,
.theme-switch:hover::before {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}


/* Hero Section */
/* Enhanced Hero Section Styles */
/*
.hero {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background: linear-gradient(135deg, #f8fafc, #e2e8f0);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
*/
.hero {
  position: relative;
  background: url("Moon.svg") no-repeat center center/cover;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
/*
.particles-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}
*/
.hero-wrapper {
  position: relative;
  z-index: 2;
  padding: 100px 0;
}

.hero-content {
  display: flex;
  align-items: center;
  gap: 70px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.hero-image {
  flex: 1;
  position: relative;
  max-width: 400px;
}
/*
.hero-image-frame {
  position: relative;
  z-index: 2;
  width: 320px;
  height: 320px;
  border-radius: 30px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transform: rotate(-5deg);
  transition: transform 0.5s ease;
}

.hero-image:hover .hero-image-frame {
  transform: rotate(0deg);
}

.hero-image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-image-shape {
  position: absolute;
  z-index: 1;
  top: -20px;
  left: 20px;
  width: 320px;
  height: 320px;
  background: var(--gradient);
  border-radius: 30px;
  opacity: 0.5;
  transform: rotate(5deg);
  transition: transform 0.5s ease;
}

.hero-image:hover .hero-image-shape {
  transform: rotate(0deg);
}
*/
/* 🔹 Hero Profile Picture with Golden Rim */
.profile-pic {
  width: 320px;
  height: 320px;
  border-radius: 50%;
  object-fit: cover;
  border: 8px solid #FFD900; /* base border */
  background: linear-gradient(135deg, #ffd900, #ffb400); /* gold gradient */
  background-clip: padding-box, border-box;
  background-origin: border-box;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  cursor: pointer;
}

/* Hover zoom effect */
.profile-pic:hover {
  transform: scale(1.08);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.45);
}

.hero-text {
  flex: 1;
  max-width: 600px;
}

.hero-subtitle {
  font-family: "Poppins", sans-serif;
  color: var(--gray-color);
  font-size: 1.2rem;
  margin-bottom: 10px;
  letter-spacing: 1px;
}

.hero-title {
  font-size: 4rem;
  font-weight: 700;
  margin-bottom: 10px;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.1;
  letter-spacing: -1px;
}

.hero-role {
  font-size: 2rem;
  color: var(--dark-color);
  margin-bottom: 25px;
  font-weight: 600;
  height: 2.5rem;
  display: flex;
  align-items: center;
}

.txt-rotate {
  display: inline-block;
  position: relative;
}

.txt-rotate::after {
  content: "|";
  animation: blink 0.7s infinite;
}

@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}

.hero-text p {
  margin-bottom: 30px;
  font-size: 1.1rem;
  color: var(--gray-color);
  line-height: 1.7;
}

.hero-cta {
  display: flex;
  gap: 15px;
  margin-bottom: 30px;
}

.hero-cta a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hero-social {
  display: flex;
  gap: 12px;
}

.hero-social .social-icon {
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: white;
  color: var(--primary-color);
  font-size: 1.2rem;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
  transition: var(--transition);
}

.hero-social .social-icon:hover {
  background: var(--gradient);
  color: white;
  transform: translateY(-5px);
}

.hero-scroll {
  position: absolute;
  bottom: 30px;
  left: 0;
  right: 0;
  text-align: center;
  z-index: 2;
}

.hero-scroll a {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  color: var(--gray-color);
  transition: var(--transition);
}

.hero-scroll a:hover {
  color: var(--primary-color);
  transform: translateY(-5px);
}

@keyframes mouse-wheel {
  0% {
    transform: translateY(0);
    opacity: 1;
  }
  100% {
    transform: translateY(15px);
    opacity: 0;
  }
}

/* Dark Mode for Hero Section */
.dark-mode .hero {
  background: linear-gradient(135deg, #0f172a, #1e293b);
}

.dark-mode .hero-social .social-icon {
  background: #1e293b;
  color: #e2e8f0;
}

.dark-mode .hero-social .social-icon:hover {
  background: var(--gradient);
  color: white;
}

/* Responsive adjustments */
@media (max-width: 992px) {
  .hero-content {
    flex-direction: column;
    text-align: center;
    gap: 40px;
  }

  .hero-image {
    margin: 0 auto;
  }

  .hero-image-frame,
  .hero-image-shape {
    width: 280px;
    height: 280px;
  }

  .hero-text {
    max-width: 100%;
  }

  .hero-title {
    font-size: 3.5rem;
  }

  .hero-role {
    font-size: 1.8rem;
    justify-content: center;
  }

  .hero-cta {
    justify-content: center;
  }

  .hero-social {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 3rem;
  }

  .hero-role {
    font-size: 1.5rem;
  }

  .hero-cta {
    flex-direction: column;
    width: 100%;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
  }

  .hero-cta a {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 576px) {
  .hero-image-frame,
  .hero-image-shape {
    width: 240px;
    height: 240px;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .hero-role {
    font-size: 1.3rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }
}
/* Skills Section */
.skills-section {
  background-color: #f9fafb;
}

.skills-category {
  margin-bottom: 40px;
}

.skills-category h3 {
  font-size: 1.3rem;
  color: var(--dark-color);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e5e7eb;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 20px;
}

.skill-card {
  background: white;
  border-radius: var(--border-radius);
  padding: 20px;
  text-align: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  transition: var(--transition);
}

.skill-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.skill-card img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  margin-bottom: 10px;
}

.skill-card span {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
}


.project-card img {
  width: 100%;
  height: 180px;       /* ✅ fixed height for all images */
  object-fit: contain; /* ✅ keeps proportions without cropping */
  border-radius: 10px;
  margin-bottom: 1rem;
  background: #fff;    /* ✅ optional, makes transparent logos look neat */
  padding: 10px;       /* ✅ gives breathing space inside the frame */
}


/* Timeline Section */
.timeline-section {
  background-color: #f9fafb;
}

.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #e5e7eb;
  left: 50%;
  transform: translateX(-50%);
}

.timeline-item {
  padding: 30px 0;
  position: relative;
  width: 100%;
}

.timeline-dot {
  position: absolute;
  width: 16px;
  height: 16px;
  background: var(--primary-color);
  border-radius: 50%;
  left: 50%;
  top: 30px;
  transform: translateX(-50%);
  z-index: 2;
}

.timeline-content {
  position: relative;
  width: 45%;
  background: white;
  padding: 20px;
  border-radius: var(--border-radius);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

.timeline-item:nth-child(odd) .timeline-content {
  margin-left: auto;
}

.timeline-item:nth-child(even) .timeline-content::before {
  content: "";
  position: absolute;
  top: 20px;
  right: -10px;
  border-width: 10px 0 10px 10px;
  border-style: solid;
  border-color: transparent transparent transparent white;
}

.timeline-item:nth-child(odd) .timeline-content::before {
  content: "";
  position: absolute;
  top: 20px;
  left: -10px;
  border-width: 10px 10px 10px 0;
  border-style: solid;
  border-color: transparent white transparent transparent;
}

.timeline-content h3 {
  font-size: 1.2rem;
  margin-bottom: 5px;
}

.timeline-content h4 {
  font-size: 1rem;
  color: var(--gray-color);
  font-weight: 500;
  margin-bottom: 10px;
}

.timeline-date {
  color: var(--primary-color);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 5px;
}

/* Contact Section */
.contact-section {
  background-color: white;
}

.contact-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
}

.contact-info {
  padding: 20px;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  margin-bottom: 30px;
}

.contact-item i {
  font-size: 1.5rem;
  color: var(--primary-color);
}

.contact-item h3 {
  font-size: 1.1rem;
  margin-bottom: 5px;
}

.contact-item p,
.contact-item a {
  color: var(--gray-color);
}

.social-links {
  display: flex;
  gap: 15px;
  margin-top: 30px;
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #f1f5f9;
  color: var(--dark-color);
  font-size: 1.2rem;
  transition: var(--transition);
}

.social-icon:hover {
  background: var(--gradient);
  color: white;
  transform: translateY(-3px);
}

.contact-form {
  background: #f9fafb;
  padding: 30px;
  border-radius: var(--border-radius);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

.form-group {
  margin-bottom: 20px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #e5e7eb;
  border-radius: 5px;
  font-family: "Open Sans", sans-serif;
  font-size: 1rem;
  transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1001;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.9);
  align-items: center;
  justify-content: center;
}

.modal-content {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  border-radius: 5px;
}

.close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: white;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  z-index: 1002;
}

/* Footer */
footer {
  background-color: var(--dark-color);
  color: white;
  text-align: center;
  padding: 30px 0;
}

/* Responsive Styles */
@media (max-width: 992px) {
  .hero-content {
    flex-direction: column;
    text-align: center;
  }

  .hero-text h1 {
    font-size: 3rem;
  }

  .hero-text p {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-cta {
    justify-content: center;
  }

  .contact-container {
    grid-template-columns: 1fr;
  }

  .timeline::before {
    left: 30px;
  }

  .timeline-dot {
    left: 30px;
  }

  .timeline-content {
    width: calc(100% - 60px);
    margin-left: 60px !important;
  }

  .timeline-item:nth-child(odd) .timeline-content::before,
  .timeline-item:nth-child(even) .timeline-content::before {
    left: -10px;
    border-width: 10px 10px 10px 0;
    border-color: transparent white transparent transparent;
  }
}

@media (max-width: 768px) {
  .navbar {
    padding: 0 20px;
  }

  nav ul {
    gap: 15px;
  }

  .section-title {
    font-size: 1.8rem;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .hero-text h1 {
    font-size: 2.5rem;
  }

  .hero-text h2 {
    font-size: 1.5rem;
  }
}

@media (max-width: 576px) {
  nav ul {
    display: none;
  }

  .navbar {
    justify-content: space-between;
  }

  .hero-text h1 {
    font-size: 2rem;
  }

  .hero-text h2 {
    font-size: 1.2rem;
  }

  .hero-cta {
    flex-direction: column;
    gap: 10px;
  }

  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .filter-btn {
    font-size: 0.8rem;
    padding: 6px 12px;
  }
}
/* Dark Mode Styles */
.dark-mode {
  --primary-color: #3b82f6;
  --secondary-color: #60a5fa;
  --accent-color: #22d3ee;
  --dark-color: #f8fafc;
  --light-color: #0f172a;
  --gray-color: #94a3b8;
  --gradient: linear-gradient(135deg, #3b82f6, #2563eb);
  --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.4),
    0 4px 6px -2px rgba(0, 0, 0, 0.2);
}

.dark-mode header {
  background-color: rgba(15, 23, 42, 0.95);
}

.dark-mode .nav-link {
  color: var(--dark-color);
}

.dark-mode .skill-card,
.dark-mode .project-card,
.dark-mode .timeline-content,
.dark-mode .contact-form {
  background-color: #1e293b;
  color: var(--dark-color);
}

.dark-mode .timeline-content::before {
  border-color: transparent #1e293b transparent transparent;
}

.dark-mode .timeline-item:nth-child(odd) .timeline-content::before {
  border-color: transparent transparent transparent #1e293b;
}

.dark-mode .skills-section,
.dark-mode .timeline-section {
  background-color: #0f172a;
}

.dark-mode .projects-section,
.dark-mode .contact-section {
  background-color: #111827;
}

.dark-mode .skills-category h3 {
  color: var(--dark-color);
  border-bottom-color: #334155;
}

.dark-mode .project-tags span {
  background-color: #334155;
  color: #cbd5e1;
}

.dark-mode .form-group input,
.dark-mode .form-group textarea {
  background-color: #1e293b;
  border-color: #334155;
  color: #e2e8f0;
}

.dark-mode .form-group input:focus,
.dark-mode .form-group textarea:focus {
  border-color: var(--primary-color);
}

.dark-mode .social-icon {
  background-color: #334155;
  color: #e2e8f0;
}

.dark-mode .filter-btn {
  background: #1e293b;
  border-color: #334155;
  color: #e2e8f0;
}

.dark-mode .filter-btn:hover,
.dark-mode .filter-btn.active {
  background: var(--gradient);
  color: white;
}

.dark-mode footer {
  background-color: #0f172a;
}

/* Add animation classes for scroll effects */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Add transition for dark mode switching */
body {
  transition: background-color 0.3s ease;
}

.navbar,
.skill-card,
.project-card,
.timeline-content,
.contact-form,
.form-group input,
.form-group textarea,
.filter-btn,
.social-icon {
  transition: background-color 0.3s ease, color 0.3s ease,
    border-color 0.3s ease;
}
/* Enhanced Project Card and Slider Styles */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 40px;
}

.project-card {
  background: white;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: var(--transition);
  position: relative;
}

.project-card.featured-project {
  grid-column: span 2;
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow);
}

.project-slider {
  position: relative;
  height: 250px;
  overflow: hidden;
}

.featured-project .project-slider {
  height: 350px;
}

.project-slider-inner {
  display: flex;
  height: 100%;
  transition: transform 0.5s ease;
}

.project-slider-inner img {
  min-width: 100%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.slider-controls {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
  padding: 0 10px;
  z-index: 10;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.project-slider:hover .slider-controls {
  opacity: 1;
}

.slider-prev,
.slider-next {
  background: rgba(255, 255, 255, 0.8);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--dark-color);
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.slider-prev:hover,
.slider-next:hover {
  background: white;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transform: scale(1.1);
}

.slider-dots {
  position: absolute;
  bottom: 15px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.slider-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.slider-dot.active {
  background: var(--primary-color);
  transform: scale(1.2);
}

.project-content {
  padding: 25px;
}

.project-content h3 {
  font-size: 1.4rem;
  margin-bottom: 12px;
  position: relative;
  padding-bottom: 10px;
}

.project-content h3::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background: var(--gradient);
  border-radius: 3px;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 15px;
}

.project-tags span {
  background: #f1f5f9;
  color: var(--gray-color);
  padding: 5px 12px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 500;
  transition: var(--transition);
}

.project-card:hover .project-tags span {
  background: #e2e8f0;
}

.project-content p {
  margin-bottom: 20px;
  color: var(--gray-color);
  font-size: 0.95rem;
  line-height: 1.6;
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
}

.btn-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.9rem;
  color: var(--primary-color);
  font-weight: 600;
  transition: var(--transition);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.btn-link:hover {
  color: var(--secondary-color);
  transform: translateX(3px);
}

.view-more-container {
  margin-top: 50px;
  text-align: center;
}

/* Project Gallery Modal */
.project-gallery-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  z-index: 1100;
  overflow: hidden;
  justify-content: center;
  align-items: center;
}

.gallery-modal-content {
  position: relative;
  width: 90%;
  max-width: 1000px;
  background: white;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.gallery-close {
  position: absolute;
  top: 15px;
  right: 15px;
  font-size: 28px;
  font-weight: bold;
  color: var(--dark-color);
  cursor: pointer;
  z-index: 2;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  transition: var(--transition);
}

.gallery-close:hover {
  background: white;
  transform: rotate(90deg);
}

.gallery-title {
  padding: 20px 25px;
  margin: 0;
  background: #f1f5f9;
  border-bottom: 1px solid #e2e8f0;
  font-size: 1.4rem;
}

.gallery-container {
  position: relative;
  height: 500px;
  overflow: hidden;
  background: #0f172a;
}

.gallery-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.gallery-slide.active {
  opacity: 1;
}

.gallery-slide img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.gallery-navigation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 25px;
  background: #f1f5f9;
}

.gallery-prev,
.gallery-next {
  background: white;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--dark-color);
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.gallery-prev:hover,
.gallery-next:hover {
  background: var(--primary-color);
  color: white;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.gallery-dots {
  display: flex;
  gap: 8px;
}

.gallery-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #e2e8f0;
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.gallery-dot.active {
  background: var(--primary-color);
  transform: scale(1.2);
}

.dark-mode .project-card,
.dark-mode .gallery-modal-content {
  background: #1e293b;
}

.dark-mode .gallery-title,
.dark-mode .gallery-navigation {
  background: #0f172a;
  color: white;
  border-color: #334155;
}

.dark-mode .gallery-prev,
.dark-mode .gallery-next {
  background: #334155;
  color: white;
}

.dark-mode .gallery-prev:hover,
.dark-mode .gallery-next:hover {
  background: var(--primary-color);
}

.dark-mode .gallery-dot {
  background: #475569;
}

/* Responsive adjustments */
/* Project Section Zoom Fix */
.projects-section {
  background-color: white;
  padding: 60px 0;
}

/* Container constraint */
.projects-section .container {
  max-width: 1140px;
  padding: 0 20px;
  margin: 0 auto;
}

/* Title styling */
.section-title {
  font-size: 2rem;
  text-align: center;
  margin-bottom: 40px;
  position: relative;
}

/* Filter buttons styling */
.projects-filter {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 35px;
}

.filter-btn {
  background: none;
  border: 1px solid #e5e7eb;
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.filter-btn.active {
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: white;
  border-color: transparent;
}

/* Project grid layout - reduced size */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 25px;
}

/* Project card styling */
.project-card {
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

/* Featured project - constraint */
.project-card.featured-project {
  grid-column: span 1;
}

@media (min-width: 992px) {
  .project-card.featured-project {
    grid-column: span 2;
  }
}

/* Project slider - fixed height */
.project-slider {
  position: relative;
  height: 180px;
  overflow: hidden;
}

.featured-project .project-slider {
  height: 220px;
}

.project-slider-inner {
  display: flex;
  height: 100%;
  transition: transform 0.5s ease;
}

/* Fixing the image size/zoom issue */
.project-slider-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* This maintains aspect ratio without zoom */
  object-position: center top; /* Focus on top of image */
  transition: transform 0.5s ease;
}

/* Slider controls */
.slider-controls {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
  padding: 0 10px;
  z-index: 10;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.project-slider:hover .slider-controls {
  opacity: 1;
}

.slider-prev,
.slider-next {
  background: rgba(255, 255, 255, 0.8);
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #1e293b;
  cursor: pointer;
  transition: all 0.3s ease;
}

/* Slider dots */
.slider-dots {
  position: absolute;
  bottom: 10px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 6px;
}

.slider-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  border: none;
  cursor: pointer;
}

.slider-dot.active {
  background: #2563eb;
  transform: scale(1.2);
}

/* Project content */
.project-content {
  padding: 16px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.project-content h3 {
  font-size: 1.2rem;
  margin-bottom: 8px;
  position: relative;
  padding-bottom: 8px;
}

.project-content h3::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 3px;
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  border-radius: 3px;
}

/* Project tags */
.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.project-tags span {
  background: #f1f5f9;
  color: #64748b;
  padding: 3px 8px;
  border-radius: 50px;
  font-size: 0.7rem;
  font-weight: 500;
}

/* Project description */
.project-content p {
  margin-bottom: 15px;
  color: #64748b;
  font-size: 0.85rem;
  line-height: 1.6;
  flex-grow: 1;
}

/* Project links */
.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: auto;
}

.btn-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.8rem;
  color: #2563eb;
  font-weight: 600;
  transition: all 0.3s ease;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.btn-link:hover {
  color: #3b82f6;
  transform: translateX(3px);
}

.view-more-container {
  margin-top: 35px;
  text-align: center;
}

/* Gallery Modal - Fixed Size */
.project-gallery-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  z-index: 1100;
  overflow: hidden;
  justify-content: center;
  align-items: center;
}

.gallery-modal-content {
  position: relative;
  width: 85%;
  max-width: 800px;
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.gallery-title {
  padding: 15px 20px;
  margin: 0;
  background: #f1f5f9;
  border-bottom: 1px solid #e2e8f0;
  font-size: 1.2rem;
}

.gallery-container {
  position: relative;
  height: 400px;
  overflow: hidden;
  background: #0f172a;
}

.gallery-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.gallery-slide.active {
  opacity: 1;
}

.gallery-slide img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .projects-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
  }

  .project-slider {
    height: 160px;
  }

  .featured-project .project-slider {
    height: 180px;
  }

  .project-content {
    padding: 12px;
  }

  .project-content h3 {
    font-size: 1.1rem;
  }

  .gallery-container {
    height: 320px;
  }
}

@media (max-width: 576px) {
  .projects-grid {
    grid-template-columns: 1fr;
    max-width: 320px;
    margin: 0 auto;
  }

  .gallery-container {
    height: 260px;
  }
}
/* Image Zoom Fix - Add this to your CSS */

/* Fix the image container size */
.project-slider {
  position: relative;
  height: 180px !important; /* Force a reasonable height */
  overflow: hidden;
}

/* Fix the image scaling */
.project-slider-inner img {
  width: 100%;
  height: 100%;
  object-fit: contain !important; /* This fixes the zoom issue */
  object-position: center !important; /* Center the image */
  background-color: #f8f9fa; /* Light background for images */
}

/* For the cards with browser decorations */
.project-slider::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 25px;
  background-color: #f1f3f5;
  border-bottom: 1px solid #dee2e6;
  z-index: 2;
}

/* Add some padding to prevent image cut-off */
.project-slider-inner {
  padding-top: 25px;
}

/* Make card borders more distinct */
.project-card {
  border: 1px solid #e9ecef;
}
/* Fixed Image Slider CSS */

/* Project card styling */
.project-card {
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
  border: 1px solid #e9ecef;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

/* Fix the image container size */
.project-slider {
  position: relative;
  height: 220px;
  overflow: hidden;
  background-color: #f8f9fa;
}

/* Create the browser-like top bar */
.project-slider::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 22px;
  background-color: #f1f3f5;
  border-bottom: 1px solid #dee2e6;
  z-index: 2;
  border-radius: 8px 8px 0 0;
}

/* Browser dots decoration */
.project-slider::after {
  content: "";
  position: absolute;
  top: 8px;
  left: 10px;
  width: 35px;
  height: 8px;

  background: linear-gradient(
    to right,
    #ff6b6b 0%,
    #ff6b6b 25%,
    #fcc419 35%,
    #fcc419 60%,
    #51cf66 70%,
    #51cf66 95%
  );
  border-radius: 10px;
  z-index: 3;
}

/* Slider inner container - adjust for browser bar */
.project-slider-inner {
  display: flex;
  height: 100%;
  width: 100%;
  padding-top: 22px;
  transition: transform 0.5s ease;
}

/* Fix the image scaling */
.project-slider-inner img {
  min-width: 100%;
  width: 100%;
  height: calc(100% - 22px);
  object-fit: contain;
  object-position: center;
  background-color: #f8f9fa;
}

/* Slider controls */
.slider-controls {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
  padding: 0 10px;
  z-index: 10;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.project-slider:hover .slider-controls {
  opacity: 1;
}

.slider-prev,
.slider-next {
  background: rgba(255, 255, 255, 0.8);
  border: none;
  border-radius: 50%;
  width: 35px;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #1e293b;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.slider-prev:hover,
.slider-next:hover {
  background: white;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  transform: scale(1.1);
}

/* Slider dots */
.slider-dots {
  position: absolute;
  bottom: 15px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 6px;
  z-index: 10;
}

.slider-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.3);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.slider-dot.active {
  background: #2563eb;
  transform: scale(1.2);
}

/* Project content */
.project-content {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.project-content h3 {
  font-size: 1.25rem;
  margin-bottom: 10px;
  font-weight: 600;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.project-tags span {
  background: #f1f5f9;
  color: #64748b;
  padding: 4px 10px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 500;
}

.project-content p {
  margin-bottom: 15px;
  color: #64748b;
  font-size: 0.9rem;
  line-height: 1.6;
  flex-grow: 1;
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: auto;
}

.btn-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.85rem;
  color: #2563eb;
  font-weight: 600;
  transition: all 0.3s ease;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.btn-link:hover {
  color: #3b82f6;
  transform: translateX(3px);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .project-slider {
    height: 200px;
  }
}

@media (max-width: 576px) {
  .project-slider {
    height: 180px;
  }

  .project-content {
    padding: 15px;
  }

  .project-content h3 {
    font-size: 1.1rem;
  }
}
/* Dark Mode Styles */
.dark-mode {
  --primary-color: #3b82f6;
  --secondary-color: #60a5fa;
  --accent-color: #22d3ee;
  --dark-color: #f8fafc;
  --light-color: #0f172a;
  --gray-color: #94a3b8;
  --gradient: linear-gradient(135deg, #3b82f6, #2563eb);
  --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.4),
    0 4px 6px -2px rgba(0, 0, 0, 0.2);
}

.dark-mode header {
  background-color: rgba(15, 23, 42, 0.95);
}

.dark-mode .nav-link {
  color: var(--dark-color);
}

.dark-mode .skill-card,
.dark-mode .project-card,
.dark-mode .timeline-content,
.dark-mode .contact-form {
  background-color: #1e293b;
  color: var(--dark-color);
}

.dark-mode .timeline-content::before {
  border-color: transparent #1e293b transparent transparent;
}

.dark-mode .timeline-item:nth-child(odd) .timeline-content::before {
  border-color: transparent transparent transparent #1e293b;
}

.dark-mode .skills-section,
.dark-mode .timeline-section {
  background-color: #0f172a;
}

.dark-mode .projects-section,
.dark-mode .contact-section {
  background-color: #111827;
}

.dark-mode .skills-category h3 {
  color: var(--dark-color);
  border-bottom-color: #334155;
}

.dark-mode .project-tags span {
  background-color: #334155;
  color: #cbd5e1;
}

.dark-mode .form-group input,
.dark-mode .form-group textarea {
  background-color: #1e293b;
  border-color: #334155;
  color: #e2e8f0;
}

.dark-mode .form-group input:focus,
.dark-mode .form-group textarea:focus {
  border-color: var(--primary-color);
}

.dark-mode .social-icon {
  background-color: #334155;
  color: #e2e8f0;
}

.dark-mode .filter-btn {
  background: #1e293b;
  border-color: #334155;
  color: #e2e8f0;
}

.dark-mode .filter-btn:hover,
.dark-mode .filter-btn.active {
  background: var(--gradient);
  color: white;
}

.dark-mode footer {
  background-color: #0f172a;
}

/* Add animation classes for scroll effects */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Add transition for dark mode switching */
body {
  transition: background-color 0.3s ease;
}

.navbar,
.skill-card,
.project-card,
.timeline-content,
.contact-form,
.form-group input,
.form-group textarea,
.filter-btn,
.social-icon {
  transition: background-color 0.3s ease, color 0.3s ease,
    border-color 0.3s ease;
}

.leetcode-icon {
  position: relative;
  font-style: normal;
}

.leetcode-icon:before {
  content: "LC";
  font-weight: bold;
}
.icon-leetcode {
  font-style: normal;
  font-weight: bold;
  font-family: monospace;
}
.leetcode-icon {
  width: 24px;
  height: 24px;
  transition: var(--transition);
}

.social-icon:hover .leetcode-icon {
  transform: translateY(-3px);
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 100vh; /* make sure hero is tall enough */
}

/* Container for bubbles */
.particles-container {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: -1; /* behind content */
}

.bubbles {
  position: relative;
  width: 100%;
  height: 100%;
}

.bubbles span {
  position: absolute;
  bottom: -150px; /* start below screen */
  border-radius: 50%;
  opacity: 0.7;
  background: radial-gradient(circle at 30% 30%, #eaf6ff, #dbeafe);
  animation: rise linear infinite;
}

/* Create variations using nth-child */
.bubbles span:nth-child(1) {
  width: 120px; height: 120px; left: 10%;
  animation-duration: 18s; animation-delay: 0s;
}
.bubbles span:nth-child(2) {
  width: 80px; height: 80px; left: 25%;
  animation-duration: 14s; animation-delay: 3s;
}
.bubbles span:nth-child(3) {
  width: 200px; height: 200px; left: 40%;
  animation-duration: 20s; animation-delay: 6s;
}
.bubbles span:nth-child(4) {
  width: 150px; height: 150px; left: 55%;
  animation-duration: 16s; animation-delay: 2s;
}
.bubbles span:nth-child(5) {
  width: 100px; height: 100px; left: 70%;
  animation-duration: 12s; animation-delay: 4s;
}
.bubbles span:nth-child(6) {
  width: 220px; height: 220px; left: 85%;
  animation-duration: 22s; animation-delay: 1s;
}
.bubbles span:nth-child(7) {
  width: 90px; height: 90px; left: 15%;
  animation-duration: 13s; animation-delay: 5s;
}
.bubbles span:nth-child(8) {
  width: 160px; height: 160px; left: 35%;
  animation-duration: 19s; animation-delay: 7s;
}
.bubbles span:nth-child(9) {
  width: 130px; height: 130px; left: 65%;
  animation-duration: 17s; animation-delay: 2s;
}
.bubbles span:nth-child(10) {
  width: 180px; height: 180px; left: 80%;
  animation-duration: 21s; animation-delay: 3s;
}

/* Rising animation */
@keyframes rise {
  0% {
    transform: translateY(0) scale(1);
    opacity: 0.7;
  }
  50% {
    transform: translateY(-50vh) scale(1.05);
    opacity: 1;
  }
  100% {
    transform: translateY(-110vh) scale(0.9);
    opacity: 0;
  }
}

