


@media (max-width: 768px) {
  .hero-container {
    grid-template-columns: 1fr !important;
    padding: 0 1rem !important;
    gap: 2rem !important;
  }

  .hero-content {
    text-align: center !important;
    padding: 0 0.5rem !important;
  }

  .hero-name {
    font-size: clamp(2rem, 8vw, 3rem) !important;
    line-height: 1.2 !important;
  }

  .hero-title {
    font-size: clamp(1.25rem, 5vw, 1.75rem) !important;
  }

  .hero-description {
    font-size: 1rem !important;
    padding: 0 0.5rem !important;
    line-height: 1.6 !important;
  }

  .hero-actions {
    flex-direction: column !important;
    align-items: center !important;
    gap: 0.75rem !important;
  }

  .btn {
    width: 100% !important;
    max-width: 280px !important;
    justify-content: center !important;
  }

  .nav-container {
    padding: 0 1rem !important;
  }

  .hero,
  .about,
  .experience,
  .education,
  .projects,
  .skills,
  .contact {
    padding: 3rem 0 !important;
  }

  .about-content,
  .education-grid,
  .projects-grid,
  .skills-grid,
  .contributions-grid {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }

  .section-header {
    margin-bottom: 2rem !important;
  }

  .section-title {
    font-size: clamp(1.75rem, 6vw, 2.5rem) !important;
  }

  .section-subtitle {
    font-size: 1rem !important;
    padding: 0 1rem !important;
  }

  .container {
    padding: 0 1rem !important;
  }

  img {
    max-width: 100% !important;
    height: auto !important;
  }

  .hero-social {
    justify-content: center !important;
    flex-wrap: wrap !important;
    gap: 0.75rem !important;
  }

  .social-icon {
    width: 45px !important;
    height: 45px !important;
  }

  .terminal-window {
    margin: 0 auto !important;
    max-width: 100% !important;
  }

  .terminal-body {
    font-size: 0.875rem !important;
    padding: 1rem !important;
  }

  .project-card {
    margin: 0 auto !important;
    max-width: 100% !important;
  }

  .project-card.featured {
    grid-column: span 1 !important;
  }

  .contact-item {
    flex-direction: column !important;
    text-align: center !important;
    gap: 0.5rem !important;
  }

  .social-grid {
    grid-template-columns: 1fr !important;
    gap: 0.75rem !important;
  }

  .social-card {
    justify-content: center !important;
  }

  .footer-content {
    flex-direction: column !important;
    gap: 1.5rem !important;
    text-align: center !important;
  }

  .footer-bottom {
    flex-direction: column !important;
    gap: 0.5rem !important;
    text-align: center !important;
  }
}

@media (max-width: 480px) {
  .hero-container {
    padding: 0 0.5rem !important;
  }

  .hero-name {
    font-size: clamp(1.5rem, 10vw, 2.5rem) !important;
  }

  .hero-title {
    font-size: clamp(1rem, 6vw, 1.5rem) !important;
  }

  .hero-description {
    font-size: 0.875rem !important;
  }

  .btn {
    max-width: 250px !important;
    font-size: 0.875rem !important;
  }

  .section-title {
    font-size: clamp(1.5rem, 8vw, 2rem) !important;
  }

  .section-subtitle {
    font-size: 0.875rem !important;
  }

  .container {
    padding: 0 0.5rem !important;
  }

  .hero,
  .about,
  .experience,
  .education,
  .projects,
  .skills,
  .contact {
    padding: 2rem 0 !important;
  }

  .social-icon {
    width: 40px !important;
    height: 40px !important;
    font-size: 1rem !important;
  }

  .terminal-window {
    font-size: 0.75rem !important;
  }
}

@viewport {
  width: device-width;
  initial-scale: 1;
}

html, body {
  overflow-x: hidden;
  max-width: 100vw;
}

* {
  max-width: 100%;
  box-sizing: border-box;
}

 
/* Responsiveness fixes for nav bar and hero section */

@media (max-width: 768px) {
  .hero {
    padding-top: 120px !important;
    min-height: calc(100vh + 50px) !important;
  }

  .hero-container {
    padding-top: 80px !important;
  }

  .hero-content {
    margin-top: 40px !important;
  }

  .hero-greeting {
    margin-top: 20px !important;
  }

  .terminal-greeting {
    margin-top: 10px !important;
    margin-bottom: 15px !important;
  }

  .hero {
    min-height: auto !important;
    padding: 100px 0 60px 0 !important;
  }
}

@media (max-width: 480px) {
  .hero {
    padding-top: 100px !important;
    padding-bottom: 40px !important;
  }

  .hero-container {
    padding-top: 60px !important;
  }

  .hero-content {
    margin-top: 30px !important;
  }

  .terminal-greeting {
    font-size: 0.875rem !important;
    padding: 0.5rem 0.75rem !important;
  }
}

body {
  padding-top: 0 !important;
}

html {
  scroll-padding-top: 80px !important;
}

/* Fix typewriter positioning on mobile */
        @media (max-width: 768px) {
            .hero {
                padding-top: 90px !important;
                min-height: auto !important;
            }
            
            .hero-container {
                padding-top: 20px !important;
            }
            
            .hero-content {
                margin-top: 0 !important;
            }
            
            .hero-greeting {
                margin-top: 0 !important;
                margin-bottom: 1rem !important;
            }
            
            .terminal-greeting {
                margin-top: 0 !important;
                margin-bottom: 0.5rem !important;
                font-size: 0.875rem !important;
                padding: 0.5rem 0.75rem !important;
            }
        }
        
        @media (max-width: 480px) {
            .hero {
                padding-top: 80px !important;
            }
            
            .terminal-greeting {
                font-size: 0.8rem !important;
                padding: 0.4rem 0.6rem !important;
            }
        }