/* Mobile Responsive Fixes - Complete Mobile UI Redesign */
/* This CSS ONLY affects mobile devices (max-width: 768px) */
/* Desktop UI remains completely untouched */

@media (max-width: 768px) {
    /* ===== GLOBAL MOBILE FIXES ===== */
    
    html {
        overflow-x: hidden;
        width: 100%;
        max-width: 100vw;
    }
    
    body {
        overflow-x: hidden;
        width: 100%;
        max-width: 100vw;
        margin: 0;
        padding: 0;
        padding-top: 160px;
    }
    
    * {
        box-sizing: border-box;
    }
    
    .container {
        width: 100%;
        max-width: 100%;
        padding: 0 1rem;
        margin: 0 auto;
    }
    
    /* ===== NAVIGATION MOBILE - FORCE SHOW ===== */
    
    /* Hide hamburger completely */
    .mobile-menu-btn,
    .hamburger-menu,
    .menu-toggle,
    button[id*="menu"],
    button[class*="menu"] {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
    }
    
    .navbar {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        z-index: 10000 !important;
        padding: 0.8rem 0 !important;
        background: rgba(10, 14, 27, 0.98) !important;
        backdrop-filter: blur(15px) !important;
        border-bottom: 1px solid rgba(74, 144, 226, 0.2) !important;
        transition: transform 0.3s ease, opacity 0.3s ease !important;
        transform: translateY(0) !important;
        opacity: 1 !important;
    }
    
    .navbar.mobile-hidden {
        transform: translateY(-100%) !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }
    
    .nav-container {
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: flex-start !important;
        flex-wrap: wrap !important;
        padding: 0 1rem !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .nav-logo {
        display: block !important;
        text-align: left !important;
        font-size: 1.2rem !important;
        width: 100% !important;
        margin-bottom: 0.5rem !important;
        order: 1 !important;
    }
    
    .nav-menu {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 0.4rem !important;
        padding: 0 !important;
        margin: 0 !important;
        list-style: none !important;
        width: 100% !important;
        order: 2 !important;
        position: static !important;
        left: auto !important;
        top: auto !important;
        height: auto !important;
        background: transparent !important;
        visibility: visible !important;
        opacity: 1 !important;
        transform: none !important;
    }
    
    .nav-menu li {
        display: block !important;
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        visibility: visible !important;
        opacity: 1 !important;
        transform: none !important;
    }
    
    .nav-link {
        display: block !important;
        width: 100% !important;
        font-size: 0.75rem !important;
        padding: 0.6rem 0.3rem !important;
        text-align: center !important;
        background: rgba(74, 144, 226, 0.15) !important;
        border: 1px solid rgba(74, 144, 226, 0.3) !important;
        border-radius: 8px !important;
        color: rgba(255, 255, 255, 0.95) !important;
        text-decoration: none !important;
        font-weight: 500 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        visibility: visible !important;
        opacity: 1 !important;
        transition: all 0.3s ease !important;
    }
    
    .nav-link:hover,
    .nav-link.active {
        background: rgba(74, 144, 226, 0.4) !important;
        color: #fff !important;
        border-color: rgba(74, 144, 226, 0.6) !important;
        transform: translateY(-2px) !important;
        box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3) !important;
    }
    
    /* ===== HERO SECTION MOBILE ===== */
    
    .hero,
    .cert-hero,
    .about-hero,
    .skills-hero,
    .projects-hero,
    .contact-hero {
        width: 100%;
        min-height: calc(100vh - 140px);
        padding: 2rem 0;
        overflow-x: hidden;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .hero-content,
    .hero-content-centered {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        width: 100%;
        max-width: 100%;
        padding: 0 1rem;
        margin: 0 auto;
        gap: 1.5rem;
    }
    
    /* Profile Image */
    .hero-image {
        order: 1;
        margin: 0 auto;
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    
    .profile-wrapper {
        width: 180px;
        height: 180px;
        margin: 0 auto;
        position: relative;
    }
    
    .profile-container {
        width: 180px;
        height: 180px;
        margin: 0 auto;
        border-radius: 50%;
        overflow: hidden;
    }
    
    .profile-photo {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }
    
    /* Hero Text Content */
    .hero-text {
        order: 2;
        width: 100%;
        max-width: 100%;
        padding: 0;
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .greeting-badge {
        margin: 0 auto;
        display: inline-flex;
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .hero-name,
    .main-title {
        font-size: 2rem !important;
        margin: 0 auto;
        text-align: center;
        width: 100%;
        word-wrap: break-word;
        line-height: 1.2;
        padding: 0 1rem;
    }
    
    .hero-title,
    .hero-subtitle {
        font-size: 1.3rem !important;
        margin: 0 auto;
        text-align: center;
        width: 100%;
        line-height: 1.3;
        padding: 0 1rem;
    }
    
    .hero-location {
        margin: 0 auto;
        justify-content: center;
        display: inline-flex;
        font-size: 0.9rem;
    }
    
    .hero-description {
        font-size: 0.95rem;
        line-height: 1.6;
        margin: 0 auto;
        text-align: center;
        width: 100%;
        max-width: 100%;
        padding: 0 1rem;
    }
    
    /* Stats */
    .hero-stats {
        display: flex;
        flex-direction: row;
        justify-content: center;
        gap: 1.5rem;
        margin: 1rem auto;
        width: 100%;
        flex-wrap: wrap;
    }
    
    .stat-item {
        text-align: center;
        min-width: 70px;
        flex: 0 1 auto;
    }
    
    .stat-number {
        font-size: 1.5rem;
        display: block;
        font-weight: 700;
    }
    
    .stat-label {
        font-size: 0.75rem;
        display: block;
        margin-top: 0.3rem;
    }
    
    /* Buttons */
    .hero-buttons {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        margin: 1rem auto;
        width: 100%;
        max-width: 280px;
        align-items: center;
    }
    
    .btn-modern,
    .btn-primary,
    .btn-secondary,
    .btn-outline {
        width: 100%;
        max-width: 280px;
        padding: 0.8rem 1.5rem;
        justify-content: center;
        display: flex;
        align-items: center;
        gap: 0.5rem;
        font-size: 0.9rem;
    }
    
    /* Social Links */
    .social-connect {
        width: 100%;
        text-align: center;
        margin: 1rem auto 0;
    }
    
    .social-label {
        display: block;
        margin-bottom: 1rem;
        font-size: 0.9rem;
    }
    
    .social-icons {
        display: flex;
        justify-content: center;
        gap: 1rem;
        margin: 0 auto;
        flex-wrap: wrap;
    }
    
    .social-icon {
        width: 45px;
        height: 45px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* ===== STATS SECTION MOBILE ===== */
    
    .stats,
    .cgpa-overview {
        width: 100%;
        padding: 3rem 0;
        overflow-x: hidden;
    }
    
    .stats-grid,
    .cgpa-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 1.5rem;
        width: 100%;
        max-width: 100%;
        margin: 0 auto;
    }
    
    .stat-card,
    .cgpa-card {
        width: 100%;
        padding: 1.5rem;
        margin: 0 auto;
    }
    
    /* ===== PROJECTS SECTION MOBILE ===== */
    
    .featured-projects {
        width: 100%;
        padding: 3rem 0;
        overflow-x: hidden;
    }
    
    .projects-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 2rem;
        width: 100%;
    }
    
    .project-card {
        width: 100%;
        margin: 0 auto;
    }
    
    /* ===== CERTIFICATES & INTERNSHIPS MOBILE ===== */
    
    .cert-grid,
    .internship-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
        width: 100% !important;
    }
    
    .cert-card-modern,
    .internship-card-modern {
        width: 100% !important;
        margin: 0 auto !important;
    }
    
    /* ===== FOOTER MOBILE ===== */
    
    .footer {
        width: 100%;
        padding: 2rem 0;
        overflow-x: hidden;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
        width: 100%;
    }
    
    .footer-text {
        width: 100%;
        padding: 0 1rem;
    }
    
    .footer-text p {
        font-size: 0.85rem;
        margin-bottom: 0.6rem;
        color: rgba(255, 255, 255, 0.95);
        line-height: 1.6;
        word-wrap: break-word;
    }
    
    .created-by {
        font-size: 0.75rem;
        margin-top: 0.8rem;
        display: block;
        line-height: 1.5;
        word-wrap: break-word;
        max-width: 100%;
    }
    
    .footer-social {
        justify-content: center;
        gap: 1rem;
    }
    
    .social-link {
        width: 40px;
        height: 40px;
    }
}

/* ===== EXTRA SMALL MOBILE (480px and below) ===== */
@media (max-width: 480px) {
    body {
        padding-top: 130px;
    }
    
    .hero-name,
    .main-title {
        font-size: 1.8rem !important;
    }
    
    .hero-title,
    .hero-subtitle {
        font-size: 1.1rem !important;
    }
    
    .hero-description {
        font-size: 0.9rem;
    }
    
    .profile-wrapper,
    .profile-container {
        width: 150px;
        height: 150px;
    }
    
    .stat-number {
        font-size: 1.3rem;
    }
    
    .stat-label {
        font-size: 0.7rem;
    }
    
    .btn-modern,
    .btn-primary,
    .btn-secondary,
    .btn-outline {
        font-size: 0.85rem;
        padding: 0.7rem 1.2rem;
    }
    
    .footer-text p {
        font-size: 0.8rem;
    }
    
    .created-by {
        font-size: 0.7rem;
    }
}
