/* Responsive Styles */

@media (max-width: 1024px) {
    h1 { font-size: 3.5rem; }
    h2 { font-size: 2.5rem; }
    
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    :root {
        --spacing-lg: 3rem;
        --spacing-xl: 5rem;
    }

    h1 { font-size: 2.8rem; }
    h2 { font-size: 2.2rem; }

    /* Mobile Navbar */
    .mobile-toggle {
        display: block;
        z-index: 1001;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: var(--surface-color);
        flex-direction: column;
        justify-content: center;
        transition: right 0.4s ease;
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
        z-index: 1000;
    }

    .nav-links.active {
        right: 0;
    }

    /* Mobile Nav Overlay */
    .nav-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(3px);
        z-index: 999; /* Below the nav (1000) and toggle (1001) */
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.4s ease, visibility 0.4s ease;
    }

    .nav-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    .grid-3 {
        grid-template-columns: 1fr;
    }
    
    .page-header {
        height: 40vh;
    }

    /* Homepage specific */
    .hero-content {
        padding: 0 var(--spacing-md);
    }
    
    .about-preview {
        flex-direction: column;
    }
    
    .about-image {
        min-height: 300px;
        order: -1;
    }
}

@media (max-width: 480px) {
    h1 { font-size: 2.2rem; }
    h2 { font-size: 1.8rem; }
    
    .section-padding {
        padding: calc(var(--spacing-xl) * 0.7) 0;
    }
    
    .btn {
        padding: 10px 24px;
    }
}
