/* Mobile and Responsive Styles */

@media (max-width: 700px), (max-width: 900px) and (orientation: portrait) {
    nav#navigation {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 8px 0;
        width: 100vw;
        max-width: 100vw;
        min-width: 0;
        white-space: normal;
        justify-content: center;
        align-items: center;
        padding: 8px 2vw 0 2vw;
        z-index: 12;
        pointer-events: none;
        background: transparent;
    }
    
    .nav-button {
        min-width: 0;
        text-align: center;
        font-size: clamp(14px, 4.5vw, 20px); /* Reduced from 16px-24px */
        padding: 12px 0;
        margin: 0;
        white-space: nowrap;
        width: 100%;
        box-sizing: border-box;
        pointer-events: auto;
        background: transparent;
        border: none;
    }
    
    #canvas {
        z-index: 11;
        pointer-events: auto;
    }
}

@media (max-width: 700px), (max-height: 600px) {
    .nav-button.active {
        pointer-events: none;
    }
}

@media (max-width: 700px) {
    .main-container {
        /* On mobile, add margin-top to account for fixed nav */
        margin-top: 100px;
    }
}

@media (max-width: 900px) {
    .project-row {
        flex-direction: column;
        padding: 24px;
        gap: 20px;
    }
    
    .project-content {
        margin-bottom: 0;
    }
    
    .project-3d {
        flex: none;
        width: 100%;
        height: 300px;
    }
    
    .model-viewer {
        width: 100%;
        height: 240px;
        min-height: 240px;
        max-height: 300px;
    }
}

@media (max-width: 700px) {
    .nav-container {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100px;
        background: transparent !important;
        z-index: 2000;
    }
    
    .nav-container::before {
        display: none !important;
    }
    
    #container, #canvas {
        height: 100px;
    }
    
    nav#navigation {
        top: 50px;
    }
    
    .main-container {
        margin-top: 100px;
    }
    
    .pages-container {
        height: auto;
        min-height: 60vh;
    }
    
    .page {
        padding: 20px;
        min-height: 60vh;
        /* Remove conflicting mobile transitions - let the slide animations handle it */
    }
    
    .page-content {
        padding-bottom: 40px;
    }
    
    .features {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .project-grid {
        grid-template-columns: 1fr;
    }
    
    .gallery {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .social-links {
        gap: 15px;
        margin: 30px 0;
    }
    
    .social-link {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .social-link svg {
        width: 24px;
        height: 24px;
    }
}

@media (min-width: 701px) {
    .side-swipe-trigger { 
        display: none; 
    }
}
