/* Tablet & Smaller Desktop */
@media (max-width: 1024px) {
    .hero-name { font-size: clamp(3rem, 8vw, 6rem); }
    .hero-role { font-size: 1rem; }
    
    .about-grid { gap: var(--space-xl); }
    
    /* Adjust floating projects for mid-screens */
    .floating-1 { left: 2%; width: 25%; }
    .floating-2 { right: 2%; width: 28%; }
    .floating-3 { left: 5%; width: 30%; }
    .floating-4 { right: 5%; width: 25%; }
}

/* Tablet */
@media (max-width: 768px) {
    :root {
        --space-xxl: 5rem;
        --space-xl: 3rem;
        --space-lg: 2rem;
    }

    .hero-name { font-size: clamp(2.5rem, 8vw, 4.5rem); }
    
    .navbar {
        gap: 1.5rem;
        padding: 0.5rem 0.5rem 0.5rem 1.5rem;
    }
    
    .nav-links { gap: 1rem; }
    
    /* Switch to single column for grids */
    .project-grid { grid-template-columns: 1fr; }
    .about-grid { grid-template-columns: 1fr; }
    
    .metrics-section {
        flex-direction: column;
        gap: var(--space-lg);
        padding: var(--space-xl) 5%;
    }
    
    .metric { text-align: center; }
    
    /* Stack floating projects nicely on tablet if possible, or hide some */
    .floating-projects {
        opacity: 0.3; /* Reduce opacity so text is readable */
    }
    
    .floating-1 { top: 10%; left: 0; width: 35%; }
    .floating-2 { top: 20%; right: 0; width: 40%; }
    .floating-3 { bottom: 20%; left: 0; width: 40%; }
    .floating-4 { bottom: 10%; right: 0; width: 35%; }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: var(--space-lg);
    }
}

/* Mobile */
@media (max-width: 480px) {
    .hero-name { 
        font-size: clamp(2rem, 12vw, 3.5rem); 
        white-space: normal; /* Allow wrapping on very small screens to avoid horizontal scroll */
        word-wrap: break-word;
    }
    
    .hero-role {
        font-size: 0.85rem;
    }
    
    .navbar-wrapper {
        top: 15px; /* Less space on mobile */
    }
    
    .navbar {
        width: calc(100% - 30px);
        max-width: none;
        padding: 0.4rem;
        justify-content: space-between;
    }
    
    .nav-links {
        display: none; /* Hide links on mobile for now, just show contact */
    }
    
    .nav-contact-btn {
        width: 100%;
        text-align: center;
    }
    
    /* On mobile, either hide floating projects or make them very subtle background */
    .floating-projects {
        opacity: 0.15;
    }
    
    .floating-1 { top: 5%; left: -10%; width: 60%; }
    .floating-2 { top: 25%; right: -10%; width: 70%; }
    .floating-3 { bottom: 25%; left: -10%; width: 70%; }
    .floating-4 { bottom: 5%; right: -10%; width: 60%; }
    
    .metrics-section {
        gap: var(--space-md);
    }
    
    .metric-value {
        font-size: 2rem;
    }
    
    .email-link {
        font-size: 1.5rem;
    }
}
