/* CRITICAL MOBILE FIXES */

/* Fix hamburger menu functionality */
.hamburger-menu {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 0.5rem;
    position: fixed;
    right: 2rem;
    top: 1.5rem;
    z-index: 1001;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hamburger-menu span {
    width: 25px;
    height: 3px;
    background-color: #ffffff;
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

/* Mobile navigation fixes */
@media (max-width: 768px) {
    .hamburger-menu {
        display: flex;
    }
    
    .nav-links {
        position: fixed;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100vh;
        background: rgba(0, 0, 0, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: left 0.3s ease;
        z-index: 1000;
        gap: 3rem;
    }
    
    .nav-links.active {
        left: 0;
    }
    
    .nav-links a {
        font-size: 2rem;
        padding: 1rem 2rem;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Fix project card mobile buttons */
    .project-card {
        position: relative;
    }
    
    .mobile-project-buttons {
        display: flex !important;
        position: absolute;
        bottom: 1rem;
        right: 1rem;
        gap: 0.5rem;
        z-index: 10;
    }
    
    .mobile-project-btn {
        min-height: 44px;
        min-width: 80px;
        padding: 0.8rem 1rem;
        border-radius: 25px;
        font-weight: 600;
        font-size: 0.9rem;
        text-decoration: none;
        display: flex;
        align-items: center;
        justify-content: center;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }
    
    .mobile-project-btn.live {
        background: linear-gradient(45deg, #00ffe5, #0b66ff);
        color: #000;
    }
    
    .mobile-project-btn.code {
        background: rgba(0, 0, 0, 0.8);
        color: #fff;
        border: 1px solid rgba(255, 255, 255, 0.3);
    }
    
    /* Hide desktop overlay on mobile */
    .project-overlay {
        display: none !important;
    }
    
    /* Fix modal on mobile */
    .modal-content {
        width: 95vw;
        height: 95vh;
        margin: 2.5vh auto;
        border-radius: 12px;
    }
    
    .modal-header {
        flex-direction: column;
        gap: 1rem;
        padding: 1.5rem;
    }
    
    .modal-body {
        grid-template-columns: 1fr;
        padding: 1.5rem;
    }
    
    .modal-links {
        width: 100%;
        justify-content: center;
    }
    
    .btn-live,
    .btn-github {
        min-height: 44px;
        padding: 1rem 2rem;
        flex: 1;
        max-width: 200px;
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    .project-card:hover {
        transform: none;
    }
    
    .mobile-project-btn:active {
        transform: scale(0.95);
        transition: transform 0.1s ease;
    }
    
    .nav-links a:active {
        background: rgba(255, 255, 255, 0.1);
    }
}

/* Accessibility improvements */
.mobile-project-btn:focus,
.nav-links a:focus {
    outline: 2px solid #00ffe5;
    outline-offset: 2px;
}

/* Fix text sizing on small screens */
@media (max-width: 480px) {
    .first-name,
    .last-name {
        font-size: clamp(2.5rem, 10vw, 4rem);
    }
    
    .title {
        font-size: clamp(0.9rem, 4vw, 1.2rem);
    }
    
    .about-section h3 {
        font-size: 1.2rem;
    }
    
    .about-section p {
        font-size: 0.9rem;
        line-height: 1.6;
    }
}