.floating-nav-link.active {
  background-color: var(--accent-color);
}

@media screen and (max-width: 576px) {
  .hero-title {
      font-size: 2.5rem;
  }
  
  .about-text, .skills-container, .contact-info, .contact-form {
      min-width: 100%;
  }
  
  .logo svg {
      height: 45px;
      width: 150px;
  }
  
  .floating-nav-link {
      width: 35px;
      height: 35px;
      font-size: 0.9rem;
  }
  
  .project-card {
      height: 400px;
  }
  
  /* Fix responsive theme switcher position */
  .theme-switch-wrapper {
      position: absolute;
      top: 15px;
      right: 70px;
  }
  
  /* Ensure hamburger is properly positioned and visible */
  .hamburger {
      display: block;
      position: relative;
      z-index: 110; /* Higher z-index to ensure visibility */
  }
}

/* Star background for dark mode */
.stars {
  background: #1a0b2e url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIHZpZXdCb3g9IjAgMCAxMTAwIDgwMCI+PHJlY3QgZmlsbD0iIzFhMGIyZSIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIvPjxnIGZpbGw9IiNmZmYiPjxjaXJjbGUgb3BhY2l0eT0iMC43IiBjeD0iNTIzIiBjeT0iMzE5IiByPSIxIi8+PGNpcmNsZSBvcGFjaXR5PSIwLjciIGN4PSI0MTkiIGN5PSIyNzQiIHI9IjEiLz48Y2lyY2xlIG9wYWNpdHk9IjAuNyIgY3g9IjYyOCIgY3k9IjEwOSIgcj0iMSIvPjxjaXJjbGUgb3BhY2l0eT0iMC41IiBjeD0iNzE2IiBjeT0iMzM2IiByPSIxIi8+PGNpcmNsZSBvcGFjaXR5PSIwLjciIGN4PSI4MTgiIGN5PSIxODMiIHI9IjEiLz48L2c+PC9zdmc+');
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.tooltip {
  position: absolute;
  right: 60px;
  background-color: var(--card-bg);
  color: var(--light-text);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.floating-nav-link:hover .tooltip {
  opacity: 1;
  visibility: visible;
}

body.light-theme .floating-nav-link {
  background-color: var(--light-card-bg);
  color: var(--dark-text);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

body.light-theme .tooltip {
  background-color: var(--light-card-bg);
  color: var(--dark-text);
}

body.light-theme .floating-nav-link:hover,
body.light-theme .floating-nav-link.active {
  background-color: var(--light-primary-color);
  color: var(--light-text);
}

/* Animations */
@keyframes fadeInUp {
  from {
      opacity: 0;
      transform: translateY(30px);
  }
  to {
      opacity: 1;
      transform: translateY(0);
  }
}

@keyframes pulse {
  0% {
      transform: scale(1);
  }
  50% {
      transform: scale(1.05);
  }
  100% {
      transform: scale(1);
  }
}

/* Responsive Design - Enhanced for mobile */
@media screen and (max-width: 992px) {
  .section {
      padding: 80px 5%;
  }
  
  .hero-title {
      font-size: 3.5rem;
  }
  
  .projects-container {
      grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
  
  .logo svg {
      height: 65px;
  }
  
  .floating-nav {
      bottom: 30px;
      right: 30px;
  }
}

@media screen and (max-width: 768px) {
  nav {
      padding: 15px 5%;
  }
  
  .nav-links {
      position: fixed;
      top: 0;
      right: -100%;
      height: 100vh;
      width: 70%;
      background-color: var(--dark-bg);
      flex-direction: column;
      align-items: center;
      justify-content: center;
      transition: right 0.5s ease;
      box-shadow: -5px 0 15px rgba(0, 0, 0, 0.2);
      z-index: 100;
  }
  
  body.light-theme .nav-links {
      background-color: var(--light-bg);
  }
  
  .nav-links.active {
      right: 0;
  }
  
  .nav-links li {
      margin: 20px 0;
  }
  
  /* Show hamburger menu in mobile view */
  .hamburger {
      display: block;
      z-index: 101;
  }
  
  .hamburger.active .bar:nth-child(1) {
      transform: translateY(8px) rotate(45deg);
  }
  
  .hamburger.active .bar:nth-child(2) {
      opacity: 0;
  }
  
  .hamburger.active .bar:nth-child(3) {
      transform: translateY(-8px) rotate(-45deg);
  }
  
  /* Fix theme switch position in mobile view */
  .theme-switch-wrapper {
      position: absolute;
      top: 15px;
      right: 60px; /* Position it to the left of hamburger */
  }
  
  .hero-title {
      font-size: 3rem;
  }
  
  .hero-description {
      font-size: 1.2rem;
  }
  
  .btn {
      padding: 10px 25px;
      font-size: 1rem;
  }
  
  .section-title {
      font-size: 2rem;
  }
  
  .logo svg {
      height: 55px;
  }
  
  .floating-nav {
      bottom: 20px;
      right: 20px;
  }
  
  .floating-nav-links {
      flex-direction: row;
      gap: 10px;
  }
  
  .floating-nav-link {
      width: 40px;
      height: 40px;
      font-size: 1rem;
  }
  
  .tooltip {
      display: none;
  }
  
  /* Adjust buttons to stack in mobile view */
  .hero-cta {
      display: flex;
      flex-direction: column;
      align-items: center;
  }
  
  .btn-outline {
      margin-left: 0;
      margin-top: 15px;
  }
}:root {
  /* Original Dark Mode Variables */
  --primary-color: #5e17eb;
  --secondary-color: #9351ae;
  --accent-color: #bf67e2;
  --dark-bg: #1a0b2e;
  --light-text: #f8f8ff;
  --card-bg: #2d1b4e;
  
  /* Light Mode Variables */
  --light-primary-color: #7c3aed;
  --light-secondary-color: #a855f7;
  --light-accent-color: #d8b4fe;
  --light-bg: #f8f9fc;
  --light-card-bg: #ffffff;
  --dark-text: #1e293b;
}

* {
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  box-sizing: border-box;
  scroll-behavior: smooth;
  transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

body {
  background: var(--dark-bg);
  color: var(--light-text);
  line-height: 1.6;
}

body.light-theme {
  background: var(--light-bg);
  color: var(--dark-text);
}

/* Preloader */
.preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--dark-bg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.preloader.loaded {
  opacity: 0;
  visibility: hidden;
}

.logo-container {
  margin-bottom: 20px;
  animation: pulse 1.5s infinite alternate;
}

.animated-path {
  stroke-dasharray: 150;
  stroke-dashoffset: 150;
  animation: draw 2s infinite alternate;
}

.loading-text {
  color: var(--light-text);
  font-size: 1.2rem;
  letter-spacing: 2px;
}

.dots span {
  animation: dot-animation 1.4s infinite;
  animation-fill-mode: both;
  font-size: 1.5rem;
}

.dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes draw {
  from {
      stroke-dashoffset: 150;
  }
  to {
      stroke-dashoffset: 0;
  }
}

@keyframes dot-animation {
  0% { opacity: 0; }
  50% { opacity: 1; }
  100% { opacity: 0; }
}

body.light-theme .preloader {
  background-color: var(--light-bg);
}

body.light-theme .loading-text {
  color: var(--dark-text);
}

/* Scroll Progress Indicator */
.scroll-progress-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: rgba(255, 255, 255, 0.1);
  z-index: 1001;
}

.scroll-progress-bar {
  height: 100%;
  width: 0;
  background: linear-gradient(to right, var(--primary-color), var(--accent-color));
  transition: width 0.1s ease;
}

body.light-theme .scroll-progress-container {
  background: rgba(0, 0, 0, 0.1);
}

/* Header & Navigation */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  transition: all 0.3s ease;
}

.header-scrolled {
  background-color: rgba(26, 11, 46, 0.9);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
}

body.light-theme header:not(.header-scrolled) {
  background-color: rgba(248, 249, 252, 0.9);
}

body.light-theme .header-scrolled {
  background-color: rgba(248, 249, 252, 0.9);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 8%;
}

.logo {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent-color);
  letter-spacing: 1px;
  display: flex;
  align-items: center;
}

.logo svg {
  height: 75px;
  width: auto;
  transition: transform 0.3s ease;
}

.logo:hover svg {
  transform: scale(1.05);
}

.nav-links {
  display: flex;
  align-items: center;
  list-style: none;
}

.nav-links li {
  margin: 0 20px;
}

.nav-links a {
  position: relative;
  color: var(--light-text);
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  transition: 0.3s;
}

body.light-theme .nav-links a {
  color: var(--dark-text);
}

.nav-links a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -5px;
  left: 0;
  background-color: var(--accent-color);
  transition: width 0.3s ease;
}

.nav-links a:hover {
  color: var(--accent-color);
}

.nav-links a:hover::after {
  width: 100%;
}

.hamburger {
  display: none;
  cursor: pointer;
  z-index: 1001; /* Increased z-index to ensure it's above other elements */
}

.hamburger .bar {
  display: block;
  width: 25px;
  height: 3px;
  margin: 5px auto;
  background-color: var(--light-text);
  transition: all 0.3s ease;
}

body.light-theme .hamburger .bar {
  background-color: var(--dark-text);
}

/* Theme Switch - Modified for responsive */
.theme-switch-wrapper {
  display: flex;
  align-items: center;
  margin-left: 20px;
}

.theme-switch {
  display: inline-block;
  height: 34px;
  position: relative;
  width: 60px;
}

.theme-switch input {
  display: none;
}

.slider {
  background-color: var(--card-bg);
  bottom: 0;
  cursor: pointer;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
  transition: .4s;
  border-radius: 34px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  overflow: hidden;
}

.slider:before {
  background-color: var(--primary-color);
  bottom: 4px;
  content: "";
  height: 26px;
  left: 4px;
  position: absolute;
  transition: .4s;
  width: 26px;
  border-radius: 50%;
  z-index: 2;
}

.slider .fa-sun {
  color: #f39c12;
  font-size: 14px;
  z-index: 1;
}

.slider .fa-moon {
  color: #f5f5f5;
  font-size: 14px;
  z-index: 1;
}

input:checked + .slider:before {
  transform: translateX(26px);
}

/* Hero Section */
.hero {
  height: 100vh;
  width: 100%;
  background-image: linear-gradient(to bottom, rgba(26, 11, 46, 0.8), rgba(26, 11, 46, 0.95)), url('img.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 20px;
  position: relative;
  overflow: hidden;
}

body.light-theme .hero {
  background-image: linear-gradient(to bottom, rgba(248, 249, 252, 0.8), rgba(248, 249, 252, 0.95)), url('img.jpg');
}

/* Animated Background */
.animated-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.twinkling {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  z-index: 1;
  animation: twinkle 8s linear infinite;
}

.floating-shapes {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
}

.shape {
  position: absolute;
  background: rgba(191, 103, 226, 0.1);
  border-radius: 50%;
}

.shape-1 {
  width: 100px;
  height: 100px;
  top: 20%;
  left: 10%;
  animation: float 15s ease-in-out infinite;
}

.shape-2 {
  width: 150px;
  height: 150px;
  top: 60%;
  left: 70%;
  animation: float 20s ease-in-out infinite;
  animation-delay: 1s;
}

.shape-3 {
  width: 80px;
  height: 80px;
  top: 30%;
  left: 80%;
  animation: float 18s ease-in-out infinite;
  animation-delay: 2s;
}

.shape-4 {
  width: 120px;
  height: 120px;
  top: 70%;
  left: 30%;
  animation: float 22s ease-in-out infinite;
  animation-delay: 3s;
}

@keyframes twinkle {
  from { background-position: 0 0; }
  to { background-position: -1000px 1000px; }
}

@keyframes float {
  0% {
      transform: translateY(0) translateX(0);
  }
  50% {
      transform: translateY(-40px) translateX(20px);
  }
  100% {
      transform: translateY(0) translateX(0);
  }
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--accent-color);
  letter-spacing: 3px;
  margin-bottom: 20px;
  opacity: 0;
  animation: fadeInUp 1s ease forwards;
}

.hero-title {
  font-size: 4.5rem;
  color: var(--light-text);
  margin-bottom: 20px;
  opacity: 0;
  animation: fadeInUp 1s ease 0.3s forwards;
}

body.light-theme .hero-title {
  color: var(--dark-text);
}

.hero-description {
  font-size: 1.5rem;
  color: rgba(248, 248, 255, 0.9);
  margin-bottom: 40px;
  opacity: 0;
  animation: fadeInUp 1s ease 0.6s forwards;
}

body.light-theme .hero-description {
  color: var(--dark-text);
}

.typed-text {
  font-weight: 600;
  color: var(--accent-color);
}

.cursor {
  display: inline-block;
  width: 3px;
  background-color: var(--accent-color);
  margin-left: 2px;
  animation: blink 1s infinite;
}

.cursor.typing {
  animation: none;
}

@keyframes blink {
  0% { background-color: var(--accent-color); }
  49% { background-color: var(--accent-color); }
  50% { background-color: transparent; }
  99% { background-color: transparent; }
  100% { background-color: var(--accent-color); }
}

.hero-cta {
  opacity: 0;
  animation: fadeInUp 1s ease 0.9s forwards;
}

.btn {
  display: inline-block;
  padding: 12px 30px;
  background-color: var(--primary-color);
  color: var(--light-text);
  text-decoration: none;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  border: 2px solid var(--primary-color);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.btn:hover {
  background-color: transparent;
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(94, 23, 235, 0.3);
}

.btn-outline {
  background-color: transparent;
  margin-left: 20px;
  border: 2px solid var(--accent-color);
}

.btn-outline:hover {
  background-color: var(--accent-color);
  color: var(--light-text);
}

/* Parallax Effect - Reduced for preventing overlaps */
.parallax {
  transition: transform 0.1s ease-out;
  /* Limited parallax effect to prevent overlap */
  transform: translateY(0) !important;
  margin-bottom: 20px; /* Added spacing to prevent overlap */
}

/* Section Styling - Modified to ensure content visibility */
.section {
  padding: 100px 8%;
  opacity: 1; /* Always visible */
  transform: translateY(0); /* No initial transform */
  transition: opacity 0.8s ease, transform 0.8s ease;
  margin-top: 30px; /* Added spacing between sections */
  position: relative; /* Added for proper positioning */
}

.section-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Removed .section-hidden class to ensure sections are always visible */

.section-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 60px;
  color: var(--light-text);
  position: relative;
  padding-top: 30px; /* Added padding to prevent overlap */
}

body.light-theme .section-title {
  color: var(--dark-text);
}

.section-title::after {
  content: '';
  position: absolute;
  width: 80px;
  height: 4px;
  background-color: var(--accent-color);
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 2px;
}

/* About Section */
.about-container {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 50px;
}

.about-text {
  flex: 1;
  min-width: 300px;
}

.about-text p {
  font-size: 1.1rem;
  color: rgba(248, 248, 255, 0.8);
  margin-bottom: 25px;
  line-height: 1.8;
}

body.light-theme .about-text p {
  color: var(--dark-text);
}

/* Skills Container */
.skills-container {
  flex: 1;
  min-width: 300px;
  display: flex;
  flex-direction: column;
  position: relative;
}

#skills-chart {
  width: 100%;
  height: 300px;
  margin-bottom: 20px;
}

.skills-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
}

.skill-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.skill-color {
  display: inline-block;
  width: 15px;
  height: 15px;
  border-radius: 50%;
}

.html-color { background-color: #e34c26; }
.css-color { background-color: #264de4; }
.js-color { background-color: #f7df1e; }
.php-color { background-color: #777bb3; }
.sql-color { background-color: #f29111; }
.csharp-color { background-color: #68217a; }

/* Projects Section */
.projects-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 40px;
}

/* Flip Cards */
.project-card {
  perspective: 1000px;
  height: 450px;
}

.project-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.8s;
  transform-style: preserve-3d;
}

.project-card.flipped .project-card-inner {
  transform: rotateY(180deg);
}

.project-card-front, .project-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  background-color: var(--card-bg);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 15px 25px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
}

.project-card-back {
  transform: rotateY(180deg);
  padding: 30px;
}

body.light-theme .project-card-front, 
body.light-theme .project-card-back {
  background-color: var(--light-card-bg);
}

.project-img {
  height: 200px;
  background-color: rgba(94, 23, 235, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.project-img i {
  font-size: 4rem;
  color: var(--accent-color);
  transition: transform 0.5s ease;
}

.project-card:hover .project-img i {
  transform: scale(1.2);
}

.project-content {
  padding: 30px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.project-title {
  font-size: 1.5rem;
  color: var(--accent-color);
  margin-bottom: 15px;
  font-weight: 600;
}

body.light-theme .project-title {
  color: var(--light-primary-color);
}

.project-description {
  color: rgba(248, 248, 255, 0.7);
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 25px;
}

body.light-theme .project-description {
  color: var(--dark-text);
}

.project-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.project-detail {
  display: flex;
  align-items: center;
  gap: 10px;
}

.project-detail i {
  color: var(--accent-color);
  font-size: 1.2rem;
}

.project-links {
  display: flex;
  gap: 15px;
  margin-top: 20px;
}

.project-link {
  display: inline-block;
  padding: 10px 25px;
  background-color: var(--primary-color);
  color: var(--light-text);
  text-decoration: none;
  border-radius: 50px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.project-link:hover {
  background-color: var(--accent-color);
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.flip-btn {
  background-color: var(--primary-color);
  color: var(--light-text);
  border: none;
  padding: 10px 20px;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
  font-size: 0.9rem;
  margin-top: 20px;
}

.flip-btn:hover {
  background-color: var(--accent-color);
  transform: translateY(-3px);
}

/* Contact Section */
#contact {
  position: relative;
  padding-bottom: 100px; /* Add more space at the bottom */
}

.particle-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

#particle-canvas {
  width: 100%;
  height: 100%;
  pointer-events: all;
}

.contact-container {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 50px;
}

.contact-info {
  flex: 1;
  min-width: 300px;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 30px;
}

.contact-icon {
  width: 60px;
  height: 60px;
  background-color: rgba(94, 23, 235, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 20px;
  color: var(--accent-color);
  font-size: 1.3rem;
  transition: all 0.3s ease;
}

.contact-item:hover .contact-icon {
  background-color: var(--accent-color);
  color: var(--light-text);
  transform: translateY(-5px);
}

.contact-details h5 {
  font-size: 1.2rem;
  color: var(--light-text);
  margin-bottom: 8px;
}

body.light-theme .contact-details h5 {
  color: var(--dark-text);
}

.contact-details p {
  color: rgba(248, 248, 255, 0.7);
  font-size: 1rem;
}

body.light-theme .contact-details p {
  color: var(--dark-text);
}

.contact-form {
  flex: 1;
  min-width: 300px;
}

.form-group {
  margin-bottom: 25px;
}

.form-group label {
  display: block;
  margin-bottom: 10px;
  color: var(--light-text);
  font-weight: 500;
}

body.light-theme .form-group label {
  color: var(--dark-text);
}

.form-control {
  width: 100%;
  padding: 15px;
  background-color: rgba(94, 23, 235, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: var(--light-text);
  font-size: 1rem;
  transition: all 0.3s ease;
}

body.light-theme .form-control {
  background-color: rgba(94, 23, 235, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.1);
  color: var(--dark-text);
}

.form-control:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 15px rgba(191, 103, 226, 0.3);
}

.form-control.error {
  border-color: crimson;
}

textarea.form-control {
  min-height: 150px;
  resize: vertical;
}

/* Footer */
footer {
  background-color: rgba(0, 0, 0, 0.3);
  padding: 40px 0;
  text-align: center;
}

body.light-theme footer {
  background-color: rgba(0, 0, 0, 0.05);
}

.social-icons {
  margin-bottom: 25px;
}

.social-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  background-color: rgba(94, 23, 235, 0.1);
  color: var(--light-text);
  border-radius: 50%;
  margin: 0 10px;
  font-size: 1.2rem;
  transition: all 0.3s ease;
}

body.light-theme .social-icons a {
  color: var(--dark-text);
}

.social-icons a:hover {
  background-color: var(--accent-color);
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

body.light-theme .social-icons a:hover {
  color: var(--light-text);
}

.copyright {
  color: rgba(248, 248, 255, 0.5);
  font-size: 0.9rem;
}

body.light-theme .copyright {
  color: rgba(30, 41, 59, 0.5);
}

/* Floating Navigation - Improved positioning */
.floating-nav {
  position: fixed;
  bottom: 40px;
  right: 40px;
  z-index: 100;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  visibility: hidden;
}

.floating-nav.visible {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
}

.floating-nav-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 15px;
  align-items: center;
}

.floating-nav-link {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: var(--card-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--light-text);
  text-decoration: none;
  font-size: 1.2rem;
  position: relative;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.floating-nav-link:hover {
  background-color: var(--primary-color);
  transform: translateY(-5px);
}

.floating-nav-link.active {
  background-color: var(--accent-color);
}

/* New CSS to add to your existing styles.css file */

/* Project Filter System */
.project-filter-container {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 40px;
}

.filter-btn {
  padding: 8px 18px;
  background-color: var(--card-bg);
  color: var(--light-text);
  border: 2px solid var(--primary-color);
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
}

.filter-btn.active, .filter-btn:hover {
  background-color: var(--primary-color);
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(94, 23, 235, 0.3);
}

body.light-theme .filter-btn {
  background-color: var(--light-card-bg);
  color: var(--dark-text);
}

body.light-theme .filter-btn.active, 
body.light-theme .filter-btn:hover {
  background-color: var(--light-primary-color);
  color: white;
}

/* Project Card Transitions */
.project-card {
  transition: opacity 0.5s ease, transform 0.5s ease;
}

/* Animated Stats Counter */
.stats-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  margin-top: 40px;
  gap: 20px;
}

.stat-box {
  flex: 1;
  min-width: 150px;
  background-color: var(--card-bg);
  padding: 30px 20px;
  border-radius: 15px;
  text-align: center;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-box:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(94, 23, 235, 0.2);
}

.stat-box i {
  font-size: 2.5rem;
  color: var(--accent-color);
  margin-bottom: 15px;
}

.stat-box h3 {
  font-size: 2rem;
  color: var(--light-text);
  margin-bottom: 10px;
}

.stat-box p {
  color: rgba(248, 248, 255, 0.8);
  font-size: 1rem;
}

body.light-theme .stat-box {
  background-color: var(--light-card-bg);
}

body.light-theme .stat-box h3 {
  color: var(--dark-text);
}

body.light-theme .stat-box p {
  color: var(--dark-text);
}

/* Scroll Animations */
.scroll-animate {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.scroll-animate.animate-in {
  opacity: 1;
  transform: translateY(0);
}

/* Project Gallery */
.gallery-section {
  margin-top: 60px;
}

.gallery-title {
  font-size: 1.8rem;
  text-align: center;
  margin-bottom: 30px;
  color: var(--light-text);
}

body.light-theme .gallery-title {
  color: var(--dark-text);
}

.gallery-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: filter 0.3s ease;
}

.gallery-item:hover img {
  filter: brightness(0.8);
}

/* Lightbox */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lightbox-content {
  position: relative;
  max-width: 80%;
  max-height: 80%;
}

.lightbox-image {
  max-width: 100%;
  max-height: 80vh;
  border-radius: 5px;
}

.lightbox-caption {
  color: white;
  text-align: center;
  padding: 10px 0;
  font-size: 1.1rem;
}

.lightbox-close {
  position: absolute;
  top: -40px;
  right: 0;
  color: white;
  font-size: 30px;
  cursor: pointer;
}

.lightbox-prev, .lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: white;
  font-size: 18px;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.lightbox-prev {
  left: -70px;
}

.lightbox-next {
  right: -70px;
}

.lightbox-prev:hover, .lightbox-next:hover {
  background: rgba(94, 23, 235, 0.8);
}

/* Enhanced Parallax */
.parallax-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transition: transform 0.2s ease-out;
}

.parallax-star {
  position: absolute;
  border-radius: 50%;
  background-color: white;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
  animation: twinkle 4s infinite alternate;
}

@keyframes twinkle {
  0% { opacity: 0.2; }
  100% { opacity: 1; }
}

.layer-0 .parallax-star { animation-delay: 0s; }
.layer-1 .parallax-star { animation-delay: 0.2s; }
.layer-2 .parallax-star { animation-delay: 0.4s; }
.layer-3 .parallax-star { animation-delay: 0.6s; }
.layer-4 .parallax-star { animation-delay: 0.8s; }

/* Experience Timeline */
.timeline-section {
  margin-top: 80px;
}

.timeline-title {
  font-size: 1.8rem;
  text-align: center;
  margin-bottom: 50px;
  color: var(--light-text);
}

body.light-theme .timeline-title {
  color: var(--dark-text);
}

.timeline-container {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
}

.timeline-line {
  position: absolute;
  width: 6px;
  background-color: var(--accent-color);
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 3px;
}

.timeline-item {
  position: relative;
  width: 50%;
  padding: 20px 40px;
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.5s ease;
}

.timeline-item.animate-timeline {
  opacity: 1;
  transform: translateY(0);
}

.timeline-item.left {
  left: 0;
}

.timeline-item.right {
  left: 50%;
}

.timeline-content {
  padding: 30px;
  background-color: var(--card-bg);
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  position: relative;
}

body.light-theme .timeline-content {
  background-color: var(--light-card-bg);
}

.timeline-content::before {
  content: '';
  position: absolute;
  width: 25px;
  height: 25px;
  background-color: var(--primary-color);
  border-radius: 50%;
  top: 50%;
  transform: translateY(-50%);
}

.timeline-item.left .timeline-content::before {
  right: -52px;
}

.timeline-item.right .timeline-content::before {
  left: -52px;
}

.timeline-year {
  display: inline-block;
  padding: 5px 15px;
  background-color: var(--accent-color);
  color: white;
  border-radius: 20px;
  font-weight: 600;
  margin-bottom: 10px;
}

.timeline-content h4 {
  color: var(--light-text);
  margin-bottom: 10px;
  font-size: 1.3rem;
}

.timeline-content p {
  color: rgba(248, 248, 255, 0.8);
}

body.light-theme .timeline-content h4 {
  color: var(--dark-text);
}

body.light-theme .timeline-content p {
  color: var(--dark-text);
}

/* Enhanced Skills Chart */
.skill-legend-item {
  cursor: pointer;
  padding: 5px 10px;
  border-radius: 5px;
  transition: all 0.3s ease;
}

.skill-legend-item:hover {
  background-color: rgba(94, 23, 235, 0.1);
  transform: translateY(-3px);
}

.skill-highlight {
  background-color: rgba(94, 23, 235, 0.2);
}

/* Notification System */
.notification-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.notification {
  display: flex;
  align-items: center;
  padding: 15px 20px;
  background-color: var(--card-bg);
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  transform: translateX(120%);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  max-width: 350px;
}

.notification.show {
  transform: translateX(0);
  opacity: 1;
}

.notification.success {
  border-left: 5px solid #4CAF50;
}

.notification.error {
  border-left: 5px solid #F44336;
}

.notification-icon {
  margin-right: 15px;
  font-size: 1.5rem;
}

.notification.success .notification-icon {
  color: #4CAF50;
}

.notification.error .notification-icon {
  color: #F44336;
}

.notification-message {
  flex: 1;
  color: var(--light-text);
}

body.light-theme .notification {
  background-color: var(--light-card-bg);
}

body.light-theme .notification-message {
  color: var(--dark-text);
}

/* Interactive Animations for Project Cards */
.project-card:hover .project-card-inner {
  box-shadow: 0 20px 40px rgba(94, 23, 235, 0.3);
}

.project-card:hover .project-title {
  color: var(--primary-color);
}

/* Enhanced Buttons */
.btn {
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: -100%;
  background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.2) 50%, rgba(255,255,255,0) 100%);
  transition: all 0.5s ease;
}

.btn:hover::after {
  left: 100%;
}

/* Floating 3D Effect for Card Elements */
.project-card-inner, .contact-icon, .stat-box {
  transform-style: preserve-3d;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card-inner:hover, .contact-icon:hover, .stat-box:hover {
  transform: translateY(-10px) rotateX(5deg) rotateY(5deg);
}

/* Modern Form Styling */
.form-control {
  position: relative;
  border: none;
  border-bottom: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 0;
  background-color: transparent;
  padding: 15px 5px;
  transition: all 0.3s ease;
}

.form-control:focus {
  border-bottom-color: var(--accent-color);
  background-color: rgba(94, 23, 235, 0.05);
  border-radius: 5px;
}

.form-group label {
  position: relative;
  padding-left: 5px;
  transition: all 0.3s ease;
}

.form-control:focus + label {
  color: var(--accent-color);
}

/* Add these styles to your styles.css file */

/* Light Theme Hero Adjustments */
body.light-theme .hero {
  background-image: linear-gradient(to bottom, rgba(248, 249, 252, 0.8), rgba(248, 249, 252, 0.95)), url('img.jpg');
}

body.light-theme .stars,
body.light-theme .twinkling {
  opacity: 0;
  transition: opacity 0.5s ease;
}

/* Dark Theme Hero - Original */
body:not(.light-theme) .stars,
body:not(.light-theme) .twinkling {
  opacity: 1;
  transition: opacity 0.5s ease;
}


/* Clouds for light theme */
.clouds {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  pointer-events: none;
  opacity: 0;
  animation: fadeIn 1s ease forwards;
}

.cloud {
  position: absolute;
  background: white;
  border-radius: 50px;
  opacity: 0.8;
  box-shadow: 0 0 20px rgba(255,255,255,0.5);
}

/* First cloud */
.cloud:nth-child(1) {
  width: 180px;
  height: 60px;
  top: 100px;
  left: 15%;
  animation: floatCloud 30s linear infinite;
}

.cloud:nth-child(1):before,
.cloud:nth-child(1):after {
  content: '';
  position: absolute;
  background: white;
  border-radius: 50%;
}

.cloud:nth-child(1):before {
  width: 80px;
  height: 80px;
  top: -30px;
  left: 25px;
}

.cloud:nth-child(1):after {
  width: 60px;
  height: 60px;
  top: -20px;
  right: 25px;
}

/* Second cloud */
.cloud:nth-child(2) {
  width: 140px;
  height: 50px;
  top: 160px;
  left: 60%;
  animation: floatCloud 25s linear infinite;
  animation-delay: 5s;
}

.cloud:nth-child(2):before,
.cloud:nth-child(2):after {
  content: '';
  position: absolute;
  background: white;
  border-radius: 50%;
}

.cloud:nth-child(2):before {
  width: 70px;
  height: 70px;
  top: -25px;
  left: 20px;
}

.cloud:nth-child(2):after {
  width: 50px;
  height: 50px;
  top: -15px;
  right: 20px;
}

/* Third cloud */
.cloud:nth-child(3) {
  width: 120px;
  height: 40px;
  top: 220px;
  left: 35%;
  animation: floatCloud 35s linear infinite;
  animation-delay: 10s;
}

.cloud:nth-child(3):before,
.cloud:nth-child(3):after {
  content: '';
  position: absolute;
  background: white;
  border-radius: 50%;
}

.cloud:nth-child(3):before {
  width: 60px;
  height: 60px;
  top: -20px;
  left: 15px;
}

.cloud:nth-child(3):after {
  width: 40px;
  height: 40px;
  top: -10px;
  right: 15px;
}

/* Light theme shapes */
body.light-theme .shape {
  background-color: rgba(124, 58, 237, 0.1);
}

/* Animations */
@keyframes floatCloud {
  0% { transform: translateX(0); }
  50% { transform: translateX(50px); }
  100% { transform: translateX(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 0.9; }
}

/* Smooth transitions for theme switching */
.hero, .stars, .twinkling, .shape {
  transition: background-color 0.3s ease, opacity 0.3s ease, background-image 0.3s ease;
}

/* Add this to your styles.css file to hide the floating shapes */
.floating-shapes {
  display: none; /* This completely hides the floating shapes container */
}

/* Alternative approach if you want to keep the container but hide individual shapes */
/*
.shape-1, .shape-2, .shape-3, .shape-4 {
  display: none;
}
*/

/* Make sure the hero content is properly centered without the shapes */
.hero-content {
  position: relative;
  z-index: 3; /* Ensure it's above other elements */
  max-width: 800px;
  text-align: center;
}

/* Enhance the stars/twinkling for dark theme to compensate for removed bubbles */
.stars {
  opacity: 1;
}

/* Make sure the light theme looks good without the bubbles */
body.light-theme .hero {
  background-image: linear-gradient(to bottom, rgba(248, 249, 252, 0.8), rgba(248, 249, 252, 0.95)), url('img.jpg');
}

/* Mobile Responsive Improvements for Semmy's Portfolio */

/* Additional mobile breakpoints */
@media screen and (max-width: 480px) {
  /* Reduce font sizes for very small screens */
  .section-title {
    font-size: 1.8rem;
    margin-bottom: 40px;
  }
  
  .hero-title {
    font-size: 2.2rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
  }
  
  .hero-description {
    font-size: 1rem;
  }
  
  /* Adjust buttons for very small screens */
  .hero-cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
  }
  
  .btn {
    width: 100%;
    max-width: 200px;
    text-align: center;
    padding: 10px 20px;
    font-size: 0.9rem;
  }
  
  .btn-outline {
    margin-left: 0;
  }
  
  /* Fix project cards height */
  .project-card {
    height: auto;
    min-height: 450px;
  }
  
  /* Improve form layout */
  .form-control {
    padding: 12px 5px;
    font-size: 0.9rem;
  }
  
  /* Make contact section more compact */
  .contact-item {
    margin-bottom: 20px;
  }
  
  .contact-icon {
    width: 50px;
    height: 50px;
    font-size: 1.1rem;
  }
  
  .contact-details h5 {
    font-size: 1rem;
  }
  
  .contact-details p {
    font-size: 0.9rem;
  }
  
  /* Improve mobile nav */
  .hamburger {
    position: absolute;
    right: 20px;
    top: 25px;
    z-index: 1001;
  }
  
  /* Adjust skills chart container */
  .skills-container {
    height: auto;
    min-height: 350px;
  }
  
  /* Fix footer for small screens */
  .social-icons a {
    width: 40px;
    height: 40px;
    margin: 0 5px;
  }
}

/* Fix hamburger menu and navigation for all mobile devices */
@media screen and (max-width: 768px) {
  /* Improve navigation for touch devices */
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;  /* Increased width for better visibility */
    height: 100vh;
    background-color: var(--card-bg);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: right 0.3s ease;
    z-index: 1000;
    padding: 50px 20px;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.2);
  }
  
  body.light-theme .nav-links {
    background-color: var(--light-card-bg);
  }
  
  .nav-links.active {
    right: 0;
  }
  
  .nav-links li {
    margin: 15px 0;
    width: 100%;
    text-align: center;
  }
  
  .nav-links a {
    display: block;
    padding: 10px 0;
    font-size: 1.2rem;
  }
  
  /* Improve hamburger position and visibility */
  .hamburger {
    display: block;
    cursor: pointer;
    z-index: 1002;
  }
  
  .hamburger .bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--light-text);
    transition: all 0.3s ease;
  }
  
  .hamburger.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  
  .hamburger.active .bar:nth-child(2) {
    opacity: 0;
  }
  
  .hamburger.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }
  
  body.light-theme .hamburger .bar {
    background-color: var(--dark-text);
  }
  
  /* Adjust logo size on small screens */
  .logo svg {
    height: 55px;
    width: auto;
  }
  
  /* Make project cards more mobile-friendly */
  .projects-container {
    grid-template-columns: 1fr;
  }
  
  /* Improve contact form on mobile */
  .contact-container {
    flex-direction: column;
  }
  
  /* Fix skills section on mobile */
  .about-container {
    flex-direction: column;
  }
  
  /* Fix floating nav on mobile */
  .floating-nav {
    bottom: 20px;
    right: 20px;
  }
  
  .floating-nav-links {
    flex-direction: column;
  }
  
  .floating-nav-link {
    width: 45px;
    height: 45px;
    font-size: 1.1rem;
  }
  
  /* Ensure touch targets are large enough */
  .nav-links a, 
  .floating-nav-link,
  .flip-btn,
  .btn,
  .social-icons a,
  .project-link {
    min-height: 44px;
    min-width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

/* Fix touch interactions for mobile devices */
@media (hover: none) {
  /* Remove hover effects that might cause issues on touch devices */
  .project-card:hover .project-card-inner {
    transform: none;
    box-shadow: 0 15px 25px rgba(0, 0, 0, 0.2);
  }
  
  .btn:hover {
    transform: none;
  }
  
  /* Make card flipping more touch-friendly */
  .flip-btn {
    padding: 12px 25px;
    font-size: 1rem;
  }
  
  /* Improve form elements for touch */
  .form-control {
    padding: 15px 10px;
  }
  
  /* Ensure tooltip visibility is controlled by tap rather than hover */
  .floating-nav-link .tooltip {
    display: none;
  }
}

/* Fix landscape orientation issues on mobile */
@media screen and (max-height: 500px) and (orientation: landscape) {
  .hero {
    height: auto;
    min-height: 100vh;
    padding: 100px 0;
  }
  
  .hero-content {
    margin-top: 50px;
  }
  
  .nav-links {
    padding-top: 70px;
  }
}

/* Fix theme switch positioning on mobile */
@media screen and (max-width: 768px) {
  .theme-switch-wrapper {
    position: absolute;
    top: 22px;
    right: 70px;
  }
  
  .theme-switch {
    height: 30px;
    width: 54px;
  }
  
  .slider:before {
    height: 22px;
    width: 22px;
  }
  
  input:checked + .slider:before {
    transform: translateX(24px);
  }
}

/* Improve preloader on mobile */
@media screen and (max-width: 768px) {
  .preloader .logo-container svg {
    width: 80px;
    height: 80px;
  }
  
  .loading-text {
    font-size: 1rem;
  }
}

/* Make project cards fully responsive */
.project-card {
  perspective: 1000px;
  height: auto;
  min-height: 450px;
}

.project-card-inner {
  height: 100%;
}

.project-card-front, .project-card-back {
  min-height: 450px;
}

/* Improve scrolling behavior on mobile */
html, body {
  overflow-x: hidden;
  position: relative;
  width: 100%;
}

/* Fix for mobile safari 100vh issue */
.hero {
  height: 100vh;
  height: calc(var(--vh, 1vh) * 100);
}

/* Critical fixes for mobile devices */

/* Fix hamburger menu functionality */
@media screen and (max-width: 768px) {
  /* Better hamburger menu positioning */
  .hamburger {
    position: fixed;
    top: 25px;
    right: 20px;
    z-index: 2000;
    cursor: pointer;
  }

  /* Ensure mobile nav fills screen and appears properly */
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background-color: var(--dark-bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: right 0.3s ease;
    z-index: 1500;
    overflow-y: auto;
  }

  body.light-theme .nav-links {
    background-color: var(--light-bg);
  }

  .nav-links.active {
    right: 0;
  }

  .nav-links li {
    margin: 20px 0;
    width: 100%;
    text-align: center;
  }

  .nav-links a {
    font-size: 1.4rem;
    width: 100%;
    display: block;
    padding: 15px 0;
  }

  /* Adjust skills chart for mobile */
  #skills-chart {
    height: 250px;
    width: 100%;
    display: block;
  }

  /* Make skills legend more compact and readable */
  .skills-legend {
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    padding: 0 10px;
  }

  .skill-legend-item {
    padding: 5px 8px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 5px;
    margin: 3px;
    display: inline-flex;
    align-items: center;
  }

  body.light-theme .skill-legend-item {
    background-color: rgba(0, 0, 0, 0.05);
  }

  /* Hide floating navigation on mobile */
  .floating-nav {
    display: none;
  }

  /* Fix project cards height for mobile */
  .project-card {
    height: auto;
    min-height: 420px;
    max-height: none;
  }

  .project-card-inner {
    height: 100%;
  }

  .project-card-front, 
  .project-card-back {
    min-height: 420px;
    height: auto;
  }

  .project-img {
    height: 150px;
  }

  /* Make contact form mobile-friendly */
  .contact-form form {
    width: 100%;
  }

  .form-control {
    padding: 12px 8px;
    font-size: 16px; /* Prevent iOS zoom on focus */
  }

  textarea.form-control {
    min-height: 120px;
  }

  /* Improve contact info section */
  .contact-container {
    gap: 30px;
  }

  .contact-icon {
    width: 45px;
    height: 45px;
    font-size: 1.1rem;
  }

  /* Fix footer social icons */
  .social-icons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
  }

  .social-icons a {
    margin: 0 8px;
    width: 40px;
    height: 40px;
  }

  /* Fix all buttons for touch devices */
  .btn, .project-link, .flip-btn {
    padding: 12px 20px;
    margin-bottom: 10px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

/* Extra small devices fixes */
@media screen and (max-width: 480px) {
  /* Fix hero section sizing */
  .hero-title {
    font-size: 2rem;
    margin-bottom: 15px;
  }

  .hero-subtitle {
    font-size: 0.9rem;
  }

  .hero-description {
    font-size: 1rem;
    margin-bottom: 30px;
  }

  /* Fix section padding */
  .section {
    padding: 70px 5% 50px;
  }

  .section-title {
    font-size: 1.8rem;
    margin-bottom: 40px;
  }

  /* Fix projects layout */
  .projects-container {
    gap: 25px;
  }

  /* Center theme switch */
  .theme-switch-wrapper {
    position: fixed;
    top: 25px;
    right: 70px;
    z-index: 2001;
  }

  .theme-switch {
    width: 50px;
    height: 28px;
  }

  .slider:before {
    width: 20px;
    height: 20px;
  }

  input:checked + .slider:before {
    transform: translateX(22px);
  }
}

/* Fix for proper height on mobile browsers */
@media screen and (max-width: 768px) {
  .hero {
    height: 100vh;
    height: calc(var(--vh, 1vh) * 100);
  }
}

/* Essential fixes for touch devices */
@media (hover: none) {
  /* Eliminate hover states that make touch UX worse */
  a:hover, .btn:hover, .project-link:hover, .flip-btn:hover, 
  .social-icons a:hover, .contact-icon:hover {
    transform: none !important;
  }

  /* Ensure no transforms on project cards for mobile */
  .project-card-inner:hover, .contact-icon:hover, .stat-box:hover {
    transform: none !important;
  }

  /* Make form elements touch-friendly */
  input, textarea, button {
    font-size: 16px !important; /* Prevent iOS zoom */
  }
}

/* Project Cards Spacing Fix */
.projects-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 40px; /* Increased from likely 20px or 30px */
}

@media screen and (max-width: 992px) {
  .projects-container {
    gap: 30px; /* Adjusted gap for medium screens */
  }
}

@media screen and (max-width: 768px) {
  .projects-container {
    grid-template-columns: 1fr; /* Single column on mobile */
    gap: 50px; /* More vertical space between cards on mobile */
    padding: 0 15px; /* Add padding on sides */
  }
  
  /* Give project cards more breathing room */
  .project-card {
    margin-bottom: 20px;
    height: auto; /* Allow cards to expand based on content */
    min-height: 450px;
  }
}

/* Skills Chart Fix */
@media screen and (max-width: 768px) {
  .skills-container {
    min-height: 350px; /* Ensure container has minimum height */
    width: 100%;
    margin: 0 auto;
    padding: 0 10px;
  }
  
  #skills-chart {
    width: 100% !important;
    height: 300px !important; /* Force height with !important */
    display: block;
    margin: 0 auto 30px;
  }
  
  /* Better skills legend display on mobile */
  .skills-legend {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin: 0 auto;
    width: 100%;
    padding: 0 10px;
  }
}

/* Hero Section Improvements */
.hero {
  min-height: 100vh; /* Minimum height for all screen sizes */
  padding: 150px 20px 80px; /* More padding to ensure content doesn't feel cramped */
}

@media screen and (max-width: 768px) {
  .hero-content {
    width: 100%; /* Full width on mobile */
    max-width: 500px; /* But cap the maximum width */
    margin: 0 auto;
    padding: 20px;
  }
  
  .hero-title {
    font-size: 3.5rem; /* Larger title on mobile */
    margin-bottom: 15px;
  }
  
  .hero-subtitle {
    font-size: 1.2rem;
  }
  
  .hero-description {
    font-size: 1.2rem;
    margin-bottom: 30px;
  }
  
  /* Fix button alignment */
  .hero-cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
  }
  
  .btn {
    min-width: 200px;
    text-align: center;
  }
  
  .btn-outline {
    margin-left: 0; /* Remove left margin on stacked buttons */
  }
}

/* Better Button Alignment Everywhere */
@media screen and (max-width: 768px) {
  .contact-form button,
  .project-links,
  .flip-btn {
    width: 100%;
    text-align: center;
    justify-content: center;
  }
  
  .project-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  
  .project-link {
    width: 100%;
    text-align: center;
  }
}

/* Fix hamburger menu positioning and behavior */
@media screen and (max-width: 768px) {
  .hamburger {
    position: fixed;
    top: 25px;
    right: 20px;
    z-index: 2000;
  }
  
  .theme-switch-wrapper {
    position: fixed;
    top: 25px;
    right: 80px; /* Position to the left of hamburger */
    z-index: 2000;
  }
  
  /* Ensure nav takes full width when open */
  .nav-links.active {
    width: 100%;
    right: 0;
  }
}

/* Fix for vh units on mobile */
:root {
  --vh: 1vh;
}

.hero {
  height: 100vh; /* Fallback */
  height: calc(var(--vh, 1vh) * 100);
}

/* Fix contact section stacking */
@media screen and (max-width: 768px) {
  .contact-container {
    flex-direction: column;
    gap: 40px;
  }
  
  .contact-info, .contact-form {
    width: 100%;
  }
}

/* Hero Section Enhancements */
.hero {
  height: 100vh; /* Full viewport height */
  height: calc(var(--vh, 1vh) * 100); /* Mobile viewport height fix */
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  padding: 120px 20px 80px; /* Top padding for header, bottom and sides padding */
}

/* Improved background gradient */
.hero {
  background-image: linear-gradient(to bottom, 
    rgba(26, 11, 46, 0.8), 
    rgba(26, 11, 46, 0.95)), 
    url('img.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed; /* Parallax effect */
}

/* Light theme variation */
body.light-theme .hero {
  background-image: linear-gradient(to bottom, 
    rgba(248, 249, 252, 0.8), 
    rgba(248, 249, 252, 0.95)), 
    url('img.jpg');
}

/* Enhanced hero content */
.hero-content {
  position: relative;
  z-index: 5;
  max-width: 800px;
  width: 100%;
  padding: 20px;
  border-radius: 10px;
  transition: all 0.3s ease;
}

/* Scale hero content based on screen size */
@media screen and (max-width: 992px) {
  .hero-content {
    max-width: 700px;
  }
  
  .hero-title {
    font-size: 4rem;
  }
}

@media screen and (max-width: 768px) {
  .hero-content {
    max-width: 90%;
  }
  
  .hero-title {
    font-size: 3.5rem;
    margin-bottom: 15px;
  }
  
  .hero-subtitle {
    font-size: 1.1rem;
    margin-bottom: 15px;
  }
  
  .hero-description {
    font-size: 1.2rem;
    margin-bottom: 30px;
  }
}

@media screen and (max-width: 576px) {
  .hero-content {
    max-width: 100%;
    padding: 15px;
  }
  
  .hero-title {
    font-size: 2.8rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
  }
  
  .hero-description {
    font-size: 1.1rem;
  }
}

/* Improved CTA buttons */
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  margin-top: 30px;
}

@media screen and (max-width: 576px) {
  .hero-cta {
    flex-direction: column;
    align-items: center;
  }
  
  .btn, .btn-outline {
    width: 100%;
    max-width: 250px;
    margin: 0;
    text-align: center;
  }
}

/* Enhanced animated background for hero */
.animated-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.stars {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  opacity: 1;
  transition: opacity 0.5s ease;
}

.twinkling {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  animation: twinkle 8s linear infinite;
}

/* Light theme adjustments */
body.light-theme .stars,
body.light-theme .twinkling {
  opacity: 0;
}

/* Add subtle animation to hero content */
.hero-subtitle {
  animation: fadeInUp 1s ease forwards;
  opacity: 0;
}

.hero-title {
  animation: fadeInUp 1s ease 0.3s forwards;
  opacity: 0;
}

.hero-description {
  animation: fadeInUp 1s ease 0.6s forwards;
  opacity: 0;
}

.hero-cta {
  animation: fadeInUp 1s ease 0.9s forwards;
  opacity: 0;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Improved typing cursor */
.cursor {
  display: inline-block;
  width: 3px;
  height: 1.2em;
  background-color: var(--accent-color);
  margin-left: 2px;
  vertical-align: middle;
  animation: blink 1s infinite;
}

.cursor.typing {
  animation: none;
}

/* Added to ensure the cursor height matches text height */
.typed-text, .cursor {
  vertical-align: middle;
}

/* Project Cards Fixes */

/* Set proper dimensions for project cards */
.project-card {
  perspective: 1000px;
  height: auto;  /* Auto height instead of fixed */
  min-height: 450px;
  margin-bottom: 30px; /* Add bottom margin for spacing */
  max-width: 100%; /* Ensure cards don't overflow their container */
}

/* Ensure the inner container expands properly */
.project-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.8s;
  transform-style: preserve-3d;
}

/* Make front and back sides match in height */
.project-card-front, 
.project-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  min-height: 450px;
  backface-visibility: hidden;
  border-radius: 15px;
  box-shadow: 0 15px 25px rgba(0, 0, 0, 0.2);
}

/* Adjust project container spacing */
.projects-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 60px; /* Increased gap between cards */
  margin: 0 auto;
  max-width: 1400px; /* Maximum width for better layout */
  padding: 0 20px; /* Add padding on sides */
}

/* Ensure content fits within card */
.project-content,
.project-details {
  padding: 20px;
  height: auto;
  overflow: hidden;
}

/* Fix image height to maintain consistency */
.project-img {
  height: 180px; /* Slightly reduced from 200px */
}

/* Mobile adjustments */
@media screen and (max-width: 992px) {
  .projects-container {
    gap: 50px;
  }
}

@media screen and (max-width: 768px) {
  .projects-container {
    grid-template-columns: 1fr; /* Single column on mobile */
    gap: 50px;
  }
  
  .project-card {
    margin: 0 auto 30px;
    max-width: 500px; /* Limit card width on mobile */
  }
  
  .project-card-front, 
  .project-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
  }
}

/* Force proper card height calculation */
@media (hover: none) {
  .project-card {
    height: auto !important;
  }
  
  .project-card-front, 
  .project-card-back {
    min-height: 450px;
  }
}

/* Fix for flip buttons */
.flip-btn {
  position: relative;
  margin-top: auto;
  margin-bottom: 20px;
  z-index: 5;
}

/* Remove height constraint for front and back to allow proper sizing */
@supports (-webkit-touch-callout: none) {
  /* iOS specific fix */
  .project-card-front, 
  .project-card-back {
    position: absolute;
    height: auto;
    min-height: 450px;
  }
}

/* Project Cards Responsive Fix */

/* Reset the absolute positioning that was causing the cards to disappear */
.project-card {
  perspective: 1000px;
  height: auto;
  min-height: 450px;
  margin-bottom: 30px;
  width: 100%;
  display: block; /* Ensure cards are displayed as blocks */
}

.project-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 450px;
  transition: transform 0.8s;
  transform-style: preserve-3d;
}

/* Critical fix: change position from absolute to relative for front side */
.project-card-front {
  position: relative; /* Changed from absolute */
  width: 100%;
  backface-visibility: hidden;
  background-color: var(--card-bg);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 15px 25px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
}

/* Keep back side as absolute but make it initially hidden */
.project-card-back {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  background-color: var(--card-bg);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 15px 25px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  transform: rotateY(180deg); /* Always flipped by default */
}

/* Adjust flip mechanism */
.project-card.flipped .project-card-inner {
  transform: rotateY(180deg);
}

/* Fix container spacing */
.projects-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 40px; /* Adjust gap as needed */
  width: 100%;
  padding: 0 20px;
}

/* Make sure content fits properly */
.project-img {
  height: 180px;
  background-color: rgba(94, 23, 235, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.project-content {
  padding: 25px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Mobile specific adjustments */
@media screen and (max-width: 768px) {
  .projects-container {
    grid-template-columns: 1fr; /* Single column */
    gap: 40px;
  }
  
  .project-card {
    width: 100%;
    margin: 0 0 30px 0;
  }
  
  /* Force minimum height on mobile */
  .project-card-inner, 
  .project-card-front,
  .project-card-back {
    min-height: 450px;
  }
}

/* Adjust content spacing */
.project-title {
  margin-bottom: 15px;
}

.project-description {
  margin-bottom: 20px;
  flex-grow: 1; /* Allow description to take available space */
}

/* Improved button positioning */
.flip-btn {
  align-self: flex-start; /* Align button to the left */
  margin-top: auto; /* Push button to bottom of container */
  margin-bottom: 5px;
}

/* Fix back card padding */
.project-card-back {
  padding: 25px;
}

/* Ensure project details fill the space */
.project-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

/* Push links to bottom */
.project-links {
  margin-top: auto;
  padding-top: 20px;
}

/* Fix for the typed text alignment */

/* Update the hero description to maintain consistent alignment */
.hero-description {
  font-size: 1.5rem;
  color: rgba(248, 248, 255, 0.9);
  margin-bottom: 40px;
  opacity: 0;
  animation: fadeInUp 1s ease 0.6s forwards;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px; /* Adds a small consistent gap between "I'm a" and the typed text */
}

body.light-theme .hero-description {
  color: var(--dark-text);
}

/* Fix the typed text alignment and appearance */
.typed-text {
  font-weight: 600;
  color: var(--accent-color);
  display: inline-block;
  vertical-align: baseline;
  line-height: 1.5rem; /* Match the line height with the container */
}

/* Improve cursor positioning and appearance */
.cursor {
  display: inline-block;
  width: 3px;
  background-color: var(--accent-color);
  height: 1.5rem; /* Match the text height */
  margin-left: 2px;
  vertical-align: text-bottom; /* Better alignment with text */
  animation: blink 1s infinite;
  position: relative;
  top: 3px; /* Fine-tune vertical position */
}

.cursor.typing {
  animation: none;
}

@keyframes blink {
  0% { opacity: 1; }
  49% { opacity: 1; }
  50% { opacity: 0; }
  99% { opacity: 0; }
  100% { opacity: 1; }
}

/* Responsiveness fixes */
@media screen and (max-width: 768px) {
  .hero-description {
    font-size: 1.2rem;
    flex-wrap: wrap; /* Allow wrapping on small screens */
    justify-content: center;
    line-height: 1.4;
  }
  
  .typed-text {
    line-height: 1.3rem;
  }
  
  .cursor {
    height: 1.3rem;
  }
}

@media screen and (max-width: 480px) {
  .hero-description {
    font-size: 1.1rem;
  }
  
  .typed-text {
    line-height: 1.2rem;
  }
  
  .cursor {
    height: 1.2rem;
    top: 2px;
  }
}