/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-y: auto; /* Ensure HTML element allows scrolling */
    height: 100%; /* Ensure HTML has full height */
}

/* Prevent mobile viewport issues */
@media (max-width: 768px) {
    html {
        scroll-behavior: auto !important; /* Disable smooth scroll on mobile */
        -webkit-overflow-scrolling: touch; /* Enable momentum scrolling */
    }
    
    body {
        -webkit-text-size-adjust: 100%; /* Prevent text scaling */
        -webkit-touch-callout: none; /* Disable callout on touch */
        -webkit-tap-highlight-color: transparent; /* Remove tap highlight */
        touch-action: pan-y; /* Only allow vertical scrolling */
        overscroll-behavior: none; /* Prevent pull-to-refresh and bounce */
        -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
        position: relative; /* Ensure proper positioning */
        overflow-y: auto !important; /* Force vertical scrolling to work */
    }
    
    /* Ensure all sections are visible and scrollable */
    section {
        position: relative !important;
        overflow: visible !important;
    }
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: #e0e0e0;
    overflow-x: hidden;
    overflow-y: auto; /* Ensure vertical scrolling works */
    background: linear-gradient(135deg, #0c0c0c 0%, #1a1a1a 50%, #0c0c0c 100%);
    position: relative;
    max-width: 100vw; /* Prevent horizontal overflow */
    min-height: 100vh; /* Ensure body has height for scrolling */
}

/* Ensure main content is scrollable */
main {
    min-height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(102, 126, 234, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(118, 75, 162, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(240, 147, 251, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
    animation: backgroundShift 20s ease-in-out infinite;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    overflow-x: hidden; /* Prevent horizontal overflow */
    width: 100%; /* Ensure full width usage */
    box-sizing: border-box; /* Include padding in width calculation */
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(12, 12, 12, 0.95);
    backdrop-filter: blur(20px);
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(102, 126, 234, 0.2);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo {
    font-size: 24px;
    font-weight: 700;
    color: #667eea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-link {
    text-decoration: none;
    color: #e0e0e0;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: #667eea;
    text-shadow: 0 0 10px rgba(102, 126, 234, 0.5);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background: #e0e0e0;
    margin: 3px 0;
    transition: 0.3s;
}

 /* Hero Section */
 .hero {
     min-height: 100vh;
     display: flex;
     align-items: center;
     background: linear-gradient(135deg, rgba(102, 126, 234, 0.3) 0%, rgba(118, 75, 162, 0.3) 100%), url("../assets/images/hero-background.jpg");
     background-size: cover;
     background-position: center;
     background-attachment: fixed;
     position: relative;
     overflow: hidden;
 }

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.hero-content {
    color: white;
    animation: fadeInUp 1s ease-out;
}

 .hero-title {
     font-size: 3.5rem;
     font-weight: 700;
     margin-bottom: 20px;
     line-height: 1.2;
     animation: glow 2s ease-in-out infinite alternate;
     text-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
 }

.text-gradient {
    background: linear-gradient(45deg, #fff, #f0f0f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 20px;
    opacity: 0.9;
}

.hero-description {
    font-size: 1.1rem;
    margin-bottom: 30px;
    opacity: 0.8;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 20px;
}

.btn {
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
}

 .btn-primary {
     background: linear-gradient(45deg, #667eea, #764ba2, #f093fb);
     background-size: 200% 200%;
     color: white;
     animation: gradientMove 3s ease infinite;
     border: none;
     box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
 }

 .btn-primary:hover {
     transform: translateY(-3px) scale(1.05);
     box-shadow: 0 15px 35px rgba(102, 126, 234, 0.6);
     animation: pulse 0.6s ease-in-out;
 }

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: white;
    color: #667eea;
    transform: translateY(-3px);
}

.hero-visual {
    position: relative;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.floating-elements {
    position: relative;
    width: 300px;
    height: 300px;
}

 .element {
     position: absolute;
     font-size: 3rem;
     animation: float 6s ease-in-out infinite;
     opacity: 0.9;
     filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.3));
     transition: all 0.3s ease;
 }
 
 .element:hover {
     transform: scale(1.2) rotate(10deg);
     filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.8));
 }

.element-1 {
    top: 20%;
    left: 20%;
    animation-delay: 0s;
}

.element-2 {
    top: 60%;
    right: 20%;
    animation-delay: 1.5s;
}

.element-3 {
    bottom: 20%;
    left: 30%;
    animation-delay: 3s;
}

.element-4 {
    top: 40%;
    right: 10%;
    animation-delay: 4.5s;
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

.scroll-arrow {
    width: 30px;
    height: 30px;
    border: 2px solid white;
    border-top: none;
    border-left: none;
    transform: rotate(45deg);
}

 /* Section Styles */
 .section-title {
     font-size: 2.5rem;
     font-weight: 700;
     text-align: center;
     margin-bottom: 50px;
     background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
     background-size: 200% 200%;
     -webkit-background-clip: text;
     -webkit-text-fill-color: transparent;
     background-clip: text;
     animation: gradientMove 4s ease infinite;
     position: relative;
 }
 
 .section-title::after {
     content: '';
     position: absolute;
     bottom: -10px;
     left: 50%;
     transform: translateX(-50%);
     width: 100px;
     height: 3px;
     background: linear-gradient(90deg, #667eea, #764ba2, #f093fb);
     border-radius: 2px;
     animation: widthExpand 2s ease-in-out infinite alternate;
 }

/* About Section */
 .about {
     padding: 100px 0;
     background: linear-gradient(135deg, #1a1a1a 0%, #0c0c0c 50%, #1a1a1a 100%);
     position: relative;
     overflow: hidden;
 }
 
 .about::before {
     content: '';
     position: absolute;
     top: 0;
     left: 0;
     right: 0;
     bottom: 0;
     background: 
         radial-gradient(circle at 30% 70%, rgba(102, 126, 234, 0.1) 0%, transparent 50%),
         radial-gradient(circle at 70% 30%, rgba(118, 75, 162, 0.1) 0%, transparent 50%),
         url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="%23667eea" opacity="0.05"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
     opacity: 0.5;
     pointer-events: none;
     animation: textureMove 30s linear infinite;
 }

 .about-content {
     display: grid;
     grid-template-columns: 2fr 1fr;
     gap: 50px;
     align-items: start;
     position: relative;
     z-index: 1;
 }

.about-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 30px;
    color: #e0e0e0;
}

.skills h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: #ffffff;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

 .skill-tag {
     background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
     background-size: 200% 200%;
     color: white;
     padding: 8px 16px;
     border-radius: 25px;
     font-size: 0.9rem;
     font-weight: 500;
     transition: all 0.3s ease;
     animation: gradientMove 3s ease infinite;
     box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
 }

 .skill-tag:hover {
     transform: translateY(-3px) scale(1.05);
     box-shadow: 0 8px 20px rgba(102, 126, 234, 0.5);
 }

.about-stats {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

 .stat-item {
     text-align: center;
     padding: 10px;
     background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(248, 249, 250, 0.9) 100%);
     border-radius: 15px;
     box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
     transition: all 0.3s ease;
     border: 1px solid rgba(102, 126, 234, 0.1);
     backdrop-filter: blur(10px);
 }

.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

 .stat-number {
     font-size: 2.5rem;
     font-weight: 700;
     background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
     background-size: 200% 200%;
     -webkit-background-clip: text;
     -webkit-text-fill-color: transparent;
     background-clip: text;
     margin-bottom: 10px;
     animation: gradientMove 3s ease infinite;
 }

.stat-label {
    font-size: 1rem;
    color: #666;
    font-weight: 500;
}

/* Education Section */
.education {
    padding: 100px 0;
    background: linear-gradient(135deg, #0c0c0c 0%, #1a1a1a 50%, #0c0c0c 100%);
    position: relative;
    overflow: hidden;
}

.education::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(118, 75, 162, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(102, 126, 234, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
    animation: backgroundShift 25s ease-in-out infinite reverse;
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

 .timeline::before {
     content: '';
     position: absolute;
     left: 50%;
     top: 0;
     bottom: 0;
     width: 3px;
     background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
     background-size: 200% 200%;
     transform: translateX(-50%);
     animation: gradientMove 4s ease infinite;
     box-shadow: 0 0 10px rgba(102, 126, 234, 0.3);
 }

.timeline-item {
    position: relative;
    margin-bottom: 50px;
    opacity: 0;
    transform: translateY(50px);
    animation: fadeInUp 0.8s ease-out forwards;
}

.timeline-item:nth-child(odd) {
    animation-delay: 0.2s;
}

.timeline-item:nth-child(even) {
    animation-delay: 0.4s;
}

.timeline-item:nth-child(3) {
    animation-delay: 0.6s;
}

.timeline-content {
    background: rgba(26, 26, 26, 0.9);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    position: relative;
    margin-left: 50px;
    transition: all 0.3s ease;
    border: 1px solid rgba(102, 126, 234, 0.2);
    backdrop-filter: blur(10px);
}

.timeline-content::before {
    content: '';
    position: absolute;
    left: -15px;
    top: 30px;
    width: 0;
    height: 0;
    border-top: 15px solid transparent;
    border-bottom: 15px solid transparent;
    border-right: 15px solid rgba(26, 26, 26, 0.9);
}

.timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.timeline-header h3 {
    font-size: 1.3rem;
    color: #ffffff;
    margin-bottom: 5px;
}

 .timeline-date {
     background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
     background-size: 200% 200%;
     color: white;
     padding: 5px 12px;
     border-radius: 20px;
     font-size: 0.9rem;
     font-weight: 500;
     animation: gradientMove 3s ease infinite;
     box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
 }

.timeline-institution {
    font-size: 1.1rem;
    color: #667eea;
    font-weight: 600;
    margin-bottom: 10px;
}

.timeline-details {
    display: flex;
    gap: 20px;
}

.gpa, .grade {
    background: #f8f9fa;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

 /* Experience Section */
 .experience {
     padding: 100px 0;
     background: linear-gradient(135deg, #1a1a1a 0%, #0c0c0c 50%, #1a1a1a 100%);
     position: relative;
     overflow: hidden;
 }

 .experience::before {
     content: '';
     position: absolute;
     top: 0;
     left: 0;
     right: 0;
     bottom: 0;
     background: 
         radial-gradient(circle at 40% 60%, rgba(240, 147, 251, 0.1) 0%, transparent 50%),
         radial-gradient(circle at 60% 40%, rgba(102, 126, 234, 0.1) 0%, transparent 50%);
     pointer-events: none;
     z-index: 0;
     animation: backgroundShift 30s ease-in-out infinite;
 }
 
 .experience-grid {
     max-width: 1000px;
     margin: 0 auto;
     display: flex;
     flex-direction: column;
     gap: 30px;
 }
 
 .experience-item {
     background: rgba(26, 26, 26, 0.9);
     padding: 30px;
     border-radius: 15px;
     box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
     transition: all 0.3s ease;
     border-left: 4px solid transparent;
     border: 1px solid rgba(102, 126, 234, 0.2);
     backdrop-filter: blur(10px);
 }
 
 .experience-item:hover {
     transform: translateY(-5px);
     box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
     border-left-color: #667eea;
 }
 
 .experience-item.featured {
     border-left-color: #667eea;
     background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
 }
 
 .experience-header {
     display: flex;
     justify-content: space-between;
     align-items: flex-start;
     margin-bottom: 15px;
     flex-wrap: wrap;
     gap: 15px;
 }
 
 .experience-company h3 {
     font-size: 1.3rem;
     color: #ffffff;
     margin-bottom: 5px;
 }
 
 .company-type {
     font-size: 0.9rem;
     color: #667eea;
     font-weight: 500;
 }
 
 .experience-role h4 {
     font-size: 1.1rem;
     color: #ffffff;
     margin-bottom: 5px;
     text-align: right;
 }
 
 .experience-date {
     background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
     background-size: 200% 200%;
     color: white;
     padding: 5px 12px;
     border-radius: 20px;
     font-size: 0.9rem;
     font-weight: 500;
     animation: gradientMove 3s ease infinite;
     box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
     text-align: right;
 }
 
 .experience-department {
     font-size: 1rem;
     color: #666;
     font-weight: 500;
     margin-bottom: 15px;
     font-style: italic;
 }
 
 .experience-achievements {
     list-style: none;
     padding: 0;
 }
 
 .experience-achievements li {
     position: relative;
     padding-left: 25px;
     margin-bottom: 10px;
     line-height: 1.6;
     color: #e0e0e0;
 }
 
 .experience-achievements li::before {
     content: '▸';
     position: absolute;
     left: 0;
     color: #667eea;
     font-weight: bold;
 }
 
 /* Projects Section */
 .projects {
     padding: 100px 0;
     background: linear-gradient(135deg, #0c0c0c 0%, #1a1a1a 50%, #0c0c0c 100%);
     position: relative;
     overflow: hidden;
 }
 
 .projects::before {
     content: '';
     position: absolute;
     top: 0;
     left: 0;
     right: 0;
     bottom: 0;
     background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="dots" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1" fill="%23667eea" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23dots)"/></svg>');
     opacity: 0.2;
     pointer-events: none;
 }
 
 .projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* Center the last item when it's alone in the last row */
.projects-grid .project-item:last-child:nth-child(3n - 2) {
    grid-column: 2;
}

.projects-grid .project-item:last-child:nth-child(3n - 1) {
    grid-column: 2;
}

.projects-grid .project-item:last-child:nth-child(3n) {
    grid-column: 2;
}
 
   .project-item {
      background: rgba(26, 26, 26, 0.9);
      padding: 30px;
      border-radius: 15px;
      box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
      text-align: center;
      transition: all 0.3s ease;
      border: 1px solid rgba(102, 126, 234, 0.2);
      backdrop-filter: blur(10px);
      position: relative;
      overflow: hidden;
      transform-style: preserve-3d;
      perspective: 1000px;
  }
  
  .project-item:hover {
      transform: translateY(-5px) rotateY(25deg) scale(1.02);
      box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4), 0 0 30px rgba(102, 126, 234, 0.3);
      border-color: rgba(102, 126, 234, 0.5);
      transform-origin: left center;
      animation: doorCreak 2s ease-in-out infinite;
  }

  /* Enhanced hover effects for project content */
  .project-item:hover .project-icon {
      transform: scale(1.1) rotate(5deg) translateZ(10px) rotateY(-10deg);
      box-shadow: 0 10px 30px rgba(102, 126, 234, 0.6), 0 0 20px rgba(240, 147, 251, 0.4);
  }

  .project-item:hover h3 {
      transform: translateZ(5px) rotateY(-5deg);
      text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
  }

  .project-item:hover p {
      transform: translateZ(3px) rotateY(-3deg);
  }

  /* Project Item Door Hover Effect */
  .project-item::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
      opacity: 0;
      transition: all 0.3s ease;
      border-radius: 15px;
      transform: translateZ(-10px);
  }

  .project-item:hover::before {
      opacity: 1;
  }

  /* Project Item Door Handle */
  .project-item::after {
      content: '';
      position: absolute;
      top: 50%;
      right: 15px;
      width: 15px;
      height: 40px;
      background: linear-gradient(135deg, #f093fb 0%, #667eea 100%);
      border-radius: 8px;
      transform: translateY(-50%) translateZ(5px) rotateY(0deg);
      opacity: 0;
      transition: all 0.3s ease;
      box-shadow: 0 0 15px rgba(240, 147, 251, 0.6);
      transform-origin: center center;
  }

  .project-item:hover::after {
      opacity: 1;
      transform: translateY(-50%) translateZ(5px) rotateY(-25deg);
      animation: doorHandleGlow 1s ease-in-out infinite alternate;
  }

  /* Project Item Door Hinge */
  .project-item .door-hinge-preview {
      position: absolute;
      top: 0;
      left: 0;
      width: 3px;
      height: 100%;
      background: linear-gradient(135deg, #f093fb 0%, #667eea 100%);
      opacity: 0;
      transition: all 0.3s ease;
      box-shadow: 0 0 10px rgba(240, 147, 251, 0.6);
  }

  .project-item:hover .door-hinge-preview {
      opacity: 1;
  }

  /* Project Item Door Crack */
  .project-item .door-crack {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: linear-gradient(90deg, transparent 0%, rgba(102, 126, 234, 0.1) 50%, transparent 100%);
      opacity: 0;
      transition: all 0.3s ease;
      border-radius: 15px;
      transform: rotateY(-90deg);
      transform-origin: left center;
  }

  .project-item:hover .door-crack {
      opacity: 1;
      transform: rotateY(0deg);
  }

  /* Door Opening Sound Effect Simulation */
  .project-item .door-sound-wave {
      position: absolute;
      top: 50%;
      left: 50%;
      width: 0;
      height: 0;
      border: 2px solid rgba(102, 126, 234, 0.3);
      border-radius: 50%;
      transform: translate(-50%, -50%);
      opacity: 0;
      transition: all 0.3s ease;
  }

  .project-item:hover .door-sound-wave {
      width: 120px;
      height: 120px;
      opacity: 1;
      animation: soundWave 0.8s ease-out forwards;
  }

  /* Door Swing Effect */
  .project-item .door-swing-shadow {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: linear-gradient(135deg, rgba(0, 0, 0, 0.1) 0%, transparent 50%);
      opacity: 0;
      transition: all 0.3s ease;
      border-radius: 15px;
      transform: rotateY(0deg);
      transform-origin: left center;
  }

  .project-item:hover .door-swing-shadow {
      opacity: 1;
      transform: rotateY(-15deg);
  }
 
 .project-icon {
     width: 80px;
     height: 80px;
     background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
     background-size: 200% 200%;
     border-radius: 50%;
     display: flex;
     align-items: center;
     justify-content: center;
     margin: 0 auto 20px;
     color: white;
     font-size: 2rem;
     animation: gradientMove 3s ease infinite;
     box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
     transition: all 0.3s ease;
 }
 
 .project-icon:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.6);
}

/* Windmill Icon Styles */
.windmill-icon {
    width: 2rem;
    height: 2rem;
    color: white;
    transition: transform 0.3s ease;
}

.project-icon:hover .windmill-icon {
    transform: rotate(180deg);
}
 
 .project-item h3 {
     font-size: 1.2rem;
     color: #ffffff;
     margin-bottom: 15px;
 }
 
 .project-item p {
     color: #e0e0e0;
     line-height: 1.6;
 }

   /* Project Link Styles */
  .project-link {
      text-decoration: none;
      color: inherit;
      position: relative;
      overflow: hidden;
      cursor: pointer;
      transition: all 0.3s ease;
  }
 
  .project-link:hover {
      text-decoration: none;
      color: inherit;
  }

     /* Door Opening Animation Container */
   .door-animation-container {
       position: fixed;
       top: 0;
       left: 0;
       width: 100%;
       height: 100%;
       z-index: 9999;
       pointer-events: none;
       opacity: 0;
       transition: opacity 0.3s ease;
       background: radial-gradient(circle at center, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.95) 100%);
   }

  .door-animation-container.active {
      opacity: 1;
      pointer-events: all;
  }

     /* Door Panels */
   .door-left, .door-right {
       position: absolute;
       top: 0;
       width: 50%;
       height: 100%;
       background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
       background-size: 200% 200%;
       animation: gradientMove 2s ease infinite;
       box-shadow: 0 0 50px rgba(102, 126, 234, 0.5);
       transform-origin: center;
       transition: transform 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
       perspective: 1000px;
       transform-style: preserve-3d;
       animation: doorSwing 0.8s ease-in-out;
   }

     .door-left {
       left: 0;
       transform: translateX(0);
       border-right: 2px solid rgba(255, 255, 255, 0.3);
       transform-origin: right center;
   }

   .door-right {
       right: 0;
       transform: translateX(0);
       border-left: 2px solid rgba(255, 255, 255, 0.3);
       transform-origin: left center;
   }

           .door-left.open {
        transform: translateX(-100%) rotateY(-90deg) translateZ(20px);
        transform-origin: right center;
    }
  
    .door-right.open {
        transform: translateX(100%) rotateY(90deg) translateZ(20px);
        transform-origin: left center;
    }

  /* Door Handle */
     .door-handle {
       position: absolute;
       top: 50%;
       width: 20px;
       height: 60px;
       background: linear-gradient(135deg, #f093fb 0%, #667eea 100%);
       border-radius: 10px;
       box-shadow: 0 0 20px rgba(240, 147, 251, 0.6);
       transform: translateY(-50%);
       transition: all 0.3s ease;
       transform-origin: center center;
   }

     .door-left .door-handle {
       right: 20px;
   }

   .door-right .door-handle {
       left: 20px;
   }

   .door-left.open .door-handle {
       transform: translateY(-50%) rotateY(-90deg);
   }

   .door-right.open .door-handle {
       transform: translateY(-50%) rotateY(90deg);
   }

     .door-handle::before {
       content: '';
       position: absolute;
       top: 50%;
       left: 50%;
       width: 8px;
       height: 8px;
       background: rgba(255, 255, 255, 0.8);
       border-radius: 50%;
       transform: translate(-50%, -50%);
       box-shadow: 0 0 10px rgba(255, 255, 255, 0.6);
   }

   /* Door Lock Effect */
   .door-lock {
       position: absolute;
       top: 20%;
       left: 50%;
       transform: translateX(-50%);
       width: 30px;
       height: 30px;
       background: linear-gradient(135deg, #f093fb 0%, #667eea 100%);
       border-radius: 50%;
       box-shadow: 0 0 20px rgba(240, 147, 251, 0.6);
       opacity: 0;
       transition: all 0.3s ease;
   }

   .door-lock.show {
       opacity: 1;
       animation: lockGlow 0.5s ease-in-out;
   }

  /* Door Frame */
  .door-frame {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      border: 4px solid rgba(102, 126, 234, 0.8);
      box-sizing: border-box;
      pointer-events: none;
  }

  /* Zoom Effect */
  .zoom-container {
      position: absolute;
      top: 50%;
      left: 50%;
      width: 0;
      height: 0;
      background: radial-gradient(circle, rgba(102, 126, 234, 0.9) 0%, rgba(118, 75, 162, 0.9) 100%);
      border-radius: 50%;
      transform: translate(-50%, -50%);
      transition: all 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
      z-index: 1;
  }

  .zoom-container.active {
      width: 200vw;
      height: 200vh;
  }

  /* Door Opening Text */
     .door-text {
       position: absolute;
       top: 50%;
       left: 50%;
       transform: translate(-50%, -50%);
       color: white;
       font-size: 2rem;
       font-weight: 700;
       text-align: center;
       z-index: 2;
       opacity: 0;
       transition: all 0.5s ease;
       text-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
       transform-style: preserve-3d;
   }

     .door-text.show {
       opacity: 1;
       animation: textSwing 0.8s ease-in-out;
   }

  .door-text .loading-dots {
      display: inline-block;
      animation: loadingDots 1.5s infinite;
  }

  /* Door Hinge Effect */
     .door-hinge {
       position: absolute;
       top: 0;
       width: 4px;
       height: 100%;
       background: linear-gradient(135deg, #f093fb 0%, #667eea 100%);
       box-shadow: 0 0 10px rgba(240, 147, 251, 0.6);
   }

   .door-left .door-hinge {
       right: 0;
   }

   .door-right .door-hinge {
       left: 0;
   }

   .door-left.open .door-hinge {
       transform: rotateY(-90deg);
   }

   .door-right.open .door-hinge {
       transform: rotateY(90deg);
   }

  /* Door Opening Particles */
  .door-particles {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      pointer-events: none;
      z-index: 3;
  }

  .particle {
      position: absolute;
      width: 4px;
      height: 4px;
      background: rgba(255, 255, 255, 0.8);
      border-radius: 50%;
      animation: particleFloat 2s ease-out forwards;
  }
 
  .project-overlay {
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: linear-gradient(135deg, rgba(102, 126, 234, 0.9) 0%, rgba(118, 75, 162, 0.9) 100%);
      display: flex;
      align-items: center;
      justify-content: center;
      opacity: 0;
      transition: all 0.3s ease;
      border-radius: 15px;
  }
 
  .project-link:hover .project-overlay {
      opacity: 1;
  }
 
  .view-details {
      color: white;
      font-weight: 600;
      font-size: 1.1rem;
      display: flex;
      align-items: center;
      gap: 10px;
      transform: translateY(20px);
      transition: all 0.3s ease;
  }
 
  .project-link:hover .view-details {
      transform: translateY(0);
  }
 
  .view-details i {
      transition: transform 0.3s ease;
  }
 
  .project-link:hover .view-details i {
      transform: translateX(5px);
  }
 
 /* Achievements Section */
 .achievements {
     padding: 100px 0;
     background: linear-gradient(135deg, #1a1a1a 0%, #0c0c0c 50%, #1a1a1a 100%);
     position: relative;
     overflow: hidden;
 }

 .achievements::before {
     content: '';
     position: absolute;
     top: 0;
     left: 0;
     right: 0;
     bottom: 0;
     background: 
         radial-gradient(circle at 25% 75%, rgba(102, 126, 234, 0.1) 0%, transparent 50%),
         radial-gradient(circle at 75% 25%, rgba(118, 75, 162, 0.1) 0%, transparent 50%);
     pointer-events: none;
     z-index: 0;
     animation: backgroundShift 35s ease-in-out infinite;
 }
 
 .achievements-grid {
     display: grid;
     grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
     gap: 30px;
     max-width: 1200px;
     margin: 0 auto;
 }
 
 .achievement-item {
     background: rgba(26, 26, 26, 0.9);
     padding: 30px;
     border-radius: 15px;
     box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
     text-align: center;
     transition: all 0.3s ease;
     border-top: 4px solid transparent;
     border: 1px solid rgba(102, 126, 234, 0.2);
     backdrop-filter: blur(10px);
 }
 
 .achievement-item:hover {
     transform: translateY(-5px);
     box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
     border-top-color: #667eea;
 }
 
 .achievement-icon {
     width: 80px;
     height: 80px;
     background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
     background-size: 200% 200%;
     border-radius: 50%;
     display: flex;
     align-items: center;
     justify-content: center;
     margin: 0 auto 20px;
     color: white;
     font-size: 2rem;
     animation: gradientMove 3s ease infinite;
     box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
     transition: all 0.3s ease;
 }
 
 .achievement-icon:hover {
     transform: scale(1.1) rotate(-5deg);
     box-shadow: 0 10px 30px rgba(102, 126, 234, 0.6);
 }
 
 .achievement-item h3 {
     font-size: 1.2rem;
     color: #ffffff;
     margin-bottom: 15px;
 }
 
 .achievement-item p {
     color: #e0e0e0;
     line-height: 1.6;
 }
 
 /* Contact Section */
 .contact {
     padding: 100px 0;
     background: linear-gradient(135deg, #0c0c0c 0%, #1a1a1a 50%, #0c0c0c 100%);
     position: relative;
     overflow: hidden;
 }
 
 .contact::before {
     content: '';
     position: absolute;
     top: 0;
     left: 0;
     right: 0;
     bottom: 0;
     background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="waves" width="100" height="20" patternUnits="userSpaceOnUse"><path d="M0,10 Q25,0 50,10 T100,10" stroke="%23667eea" stroke-width="1" fill="none" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23waves)"/></svg>');
     opacity: 0.2;
     pointer-events: none;
 }

 .contact-content {
     max-width: 800px;
     margin: 0 auto;
     position: relative;
     z-index: 1;
 }

.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

 .contact-item {
     background: rgba(26, 26, 26, 0.9);
     padding: 30px;
     border-radius: 15px;
     box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
     display: flex;
     align-items: center;
     gap: 20px;
     transition: all 0.3s ease;
     border: 1px solid rgba(102, 126, 234, 0.2);
     backdrop-filter: blur(10px);
 }

.contact-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

 .contact-icon {
     width: 60px;
     height: 60px;
     background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
     background-size: 200% 200%;
     border-radius: 50%;
     display: flex;
     align-items: center;
     justify-content: center;
     color: white;
     font-size: 1.5rem;
     animation: gradientMove 3s ease infinite;
     box-shadow: 0 3px 15px rgba(102, 126, 234, 0.4);
     transition: all 0.3s ease;
 }
 
 .contact-icon:hover {
     transform: scale(1.1) rotate(10deg);
     box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6);
 }

 .contact-details h3 {
     font-size: 1.2rem;
     color: #ffffff;
     margin-bottom: 5px;
 }

 .contact-details a,
 .contact-details span {
     color: #e0e0e0;
     text-decoration: none;
     transition: color 0.3s ease;
 }

.contact-details a:hover {
    color: #667eea;
}

/* Footer */
.footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 30px 0;
}

   /* Animations */
  @keyframes fadeInUp {
      from {
          opacity: 0;
          transform: translateY(50px);
      }
      to {
          opacity: 1;
          transform: translateY(0);
      }
  }

  @keyframes backgroundShift {
      0%, 100% {
          transform: translateX(0) translateY(0);
      }
      25% {
          transform: translateX(-10px) translateY(-10px);
      }
      50% {
          transform: translateX(10px) translateY(10px);
      }
      75% {
          transform: translateX(-5px) translateY(5px);
      }
  }

  @keyframes textureMove {
      0% {
          transform: translateX(0) translateY(0);
      }
      100% {
          transform: translateX(100px) translateY(100px);
      }
  }
 
 @keyframes gradientShift {
     0%, 100% {
         background-position: 0% 50%;
     }
     25% {
         background-position: 100% 50%;
     }
     50% {
         background-position: 100% 100%;
     }
     75% {
         background-position: 0% 100%;
     }
 }
 
 @keyframes gradientMove {
     0%, 100% {
         background-position: 0% 50%;
     }
     50% {
         background-position: 100% 50%;
     }
 }
 
 @keyframes glow {
     from {
         text-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
     }
     to {
         text-shadow: 0 0 30px rgba(255, 255, 255, 0.8), 0 0 40px rgba(255, 255, 255, 0.3);
     }
 }
 
 @keyframes pulse {
     0% {
         transform: translateY(-3px) scale(1.05);
     }
     50% {
         transform: translateY(-3px) scale(1.1);
     }
     100% {
         transform: translateY(-3px) scale(1.05);
     }
 }
 
 @keyframes widthExpand {
     from {
         width: 100px;
     }
     to {
         width: 150px;
     }
 }
 
 @keyframes slideInFromLeft {
     from {
         opacity: 0;
         transform: translateX(-100px);
     }
     to {
         opacity: 1;
         transform: translateX(0);
     }
 }
 
 @keyframes slideInFromRight {
     from {
         opacity: 0;
         transform: translateX(100px);
     }
     to {
         opacity: 1;
         transform: translateX(0);
     }
 }
 
   @keyframes particleFloat {
      0% {
          transform: translateY(0) rotate(0deg);
          opacity: 1;
      }
      100% {
          transform: translateY(-100vh) rotate(360deg);
          opacity: 0;
      }
  }

  @keyframes loadingDots {
      0%, 20% {
          opacity: 0;
      }
      50% {
          opacity: 1;
      }
      100% {
          opacity: 0;
      }
  }

  @keyframes doorKnock {
      0%, 100% {
          transform: translateY(-50%) scale(1);
      }
      50% {
          transform: translateY(-50%) scale(1.1);
      }
  }

     @keyframes doorGlow {
       0%, 100% {
           box-shadow: 0 0 50px rgba(102, 126, 234, 0.5);
       }
       50% {
           box-shadow: 0 0 80px rgba(102, 126, 234, 0.8), 0 0 120px rgba(240, 147, 251, 0.4);
       }
   }

       @keyframes lockGlow {
        0%, 100% {
            box-shadow: 0 0 20px rgba(240, 147, 251, 0.6);
        }
        50% {
            box-shadow: 0 0 40px rgba(240, 147, 251, 0.9), 0 0 60px rgba(102, 126, 234, 0.6);
        }
    }

    @keyframes doorHandleGlow {
        0%, 100% {
            box-shadow: 0 0 15px rgba(240, 147, 251, 0.6);
        }
        50% {
            box-shadow: 0 0 25px rgba(240, 147, 251, 0.9), 0 0 35px rgba(102, 126, 234, 0.6);
        }
    }

         @keyframes soundWave {
         0% {
             width: 0;
             height: 0;
             opacity: 1;
         }
         100% {
             width: 150px;
             height: 150px;
             opacity: 0;
         }
     }

     @keyframes doorCreak {
         0%, 100% {
             transform: translateY(-5px) rotateY(25deg) scale(1.02);
         }
         25% {
             transform: translateY(-5px) rotateY(27deg) scale(1.02);
         }
         75% {
             transform: translateY(-5px) rotateY(23deg) scale(1.02);
         }
     }

     @keyframes textSwing {
         0% {
             transform: translate(-50%, -50%) rotateY(-15deg);
         }
         50% {
             transform: translate(-50%, -50%) rotateY(15deg);
         }
         100% {
             transform: translate(-50%, -50%) rotateY(0deg);
         }
     }

     @keyframes doorSwing {
         0% {
             transform: translateX(0) rotateY(0deg);
         }
         50% {
             transform: translateX(0) rotateY(5deg);
         }
         100% {
             transform: translateX(0) rotateY(0deg);
         }
     }

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

 /* Responsive Design */
@media (max-width: 768px) {
    /* Disable all animations on mobile to prevent scroll interference */
    * {
        animation: none !important;
        transition: none !important;
    }
    
    /* Ensure scrolling works properly */
    html, body, main {
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        scroll-behavior: auto !important;
    }
    
    /* Disable specific problematic elements */
    .element {
        animation: none !important;
        transform: none !important;
    }
    
    /* Disable background texture animations */
    body::before,
    .about::before,
    .education::before,
    .experience::before,
    .projects::before,
    .achievements::before {
        animation: none !important;
        transform: none !important; /* Prevent any transform animations */
    }
    
    /* Disable background attachment fixed on mobile */
    .hero {
        background-attachment: scroll !important;
    }
    
    /* Disable parallax effects on mobile */
    .project-hero {
        background-attachment: scroll !important;
    }
    
    .hamburger {
        display: flex;
    }
     
     .nav-menu {
         position: fixed;
         left: -100%;
         top: 70px;
         flex-direction: column;
         background-color: rgba(12, 12, 12, 0.98);
         backdrop-filter: blur(20px);
         width: 100%;
         text-align: center;
         transition: 0.3s;
         box-shadow: 0 10px 27px rgba(0, 0, 0, 0.3);
         padding: 20px 0;
         z-index: 999; /* Ensure it stays above other content */
         border-bottom: 1px solid rgba(102, 126, 234, 0.2);
         max-width: 100vw; /* Prevent overflow */
         overflow-x: hidden;
     }
     
     .nav-menu.active {
         left: 0;
     }
     
     /* Fix header overlap on mobile */
     .hero {
         padding-top: 70px;
     }
     
     .about {
         padding-top: 120px;
     }
     
     .education {
         padding-top: 120px;
     }
     
     .experience {
         padding-top: 120px;
     }
     
     .projects {
         padding-top: 120px;
     }
     
     .achievements {
         padding-top: 120px;
     }
     
     .contact {
         padding-top: 120px;
     }
     
     .hero-container {
         grid-template-columns: 1fr;
         text-align: center;
     }
     
     .hero-title {
         font-size: 2.5rem;
     }
     
     .hero-buttons {
         justify-content: center;
         flex-wrap: wrap;
     }
     
     .about-content {
         grid-template-columns: 1fr;
     }
     
     .timeline::before {
         left: 20px;
     }
     
     .timeline-content {
         margin-left: 50px;
     }
     
     .timeline-content::before {
         left: -15px;
         border-right: 15px solid white;
     }
     
     .contact-info {
         grid-template-columns: 1fr;
     }
     
     .experience-header {
         flex-direction: column;
         align-items: flex-start;
     }
     
     .projects-grid {
    grid-template-columns: 1fr;
}

/* Reset centering on mobile for single column layout */
.projects-grid .project-item:last-child:nth-child(3n - 2),
.projects-grid .project-item:last-child:nth-child(3n - 1),
.projects-grid .project-item:last-child:nth-child(3n) {
    grid-column: 1;
}
     
     .achievements-grid {
         grid-template-columns: 1fr;
     }
     
     .section-title {
         font-size: 2rem;
     }
 }

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .timeline-header {
        flex-direction: column;
        gap: 10px;
    }
    
    .timeline-date {
        align-self: flex-start;
    }
    
    /* Additional mobile improvements */
    .nav-container {
        padding: 0 15px; /* Reduce padding on very small screens */
    }
    
    .container {
        padding: 0 15px; /* Reduce container padding */
    }
    
    /* Ensure text doesn't overflow */
    h1, h2, h3, h4, h5, h6 {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    /* Improve mobile navigation spacing */
    .nav-menu {
        padding: 30px 0;
    }
    
    .nav-item {
        margin: 10px 0;
    }
}
