/* Critical breakpoint for very small screens (320px) */
@media screen and (max-width: 320px) {
    body {
        font-size: 14px;
    }
    
    .container {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
}

/* Nav collapse breakpoint (≤1170px) — menu items overlap above this width */
@media screen and (max-width: 1170px) {
    .nav-menu-desktop {
        display: none;
    }

    .hamburger-icon {
        display: flex !important;
        margin-left: auto;
    }
}

/* Show desktop nav above 1170px */
@media screen and (min-width: 1171px) {
    .hamburger-icon {
        display: none !important;
    }

    .nav-menu-mobile {
        display: none !important;
    }
}

/* Small devices - portrait phones (≤768px) */
@media screen and (max-width: 768px) {
    /* Hero section - center content for better mobile experience */
    #hero,
    header {
        text-align: center;
        padding-top: 3rem;
        padding-bottom: 2rem;
    }

    .experience-header {
        flex-direction: column;
    }

    .hero-cta {
        justify-content: center;
    }
}

/* Certifications 2x2 grid — 3+1 layout between 849px and 1170px looks unbalanced */
@media screen and (min-width: 849px) and (max-width: 1170px) {
    .certifications-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Contact form: two-column layout on tablets and up */
@media screen and (min-width: 768px) {
    .contact-layout {
        grid-template-columns: minmax(180px, 240px) 1fr;
        align-items: start;
    }
}

/* Large devices - desktops (1024px to 1439px) */
@media screen and (min-width: 1024px) {
    .container {
        max-width: 100%;
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

/* Extra large devices - large desktops (≥1440px) */
@media screen and (min-width: 1440px) {
    .container {
        max-width: 1280px;
    }
    
    #hero .container {
        gap: 3rem;
    }
}

/* Touch target size compliance - minimum 44x44 pixels for interactive controls */
.nav-menu-desktop a,
.hamburger-icon,
button {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
}

/* Recommendation carousel — 1 card on mobile, 2 on ≥769px */
.recommendation-card {
    flex: 0 0 100%;
    min-width: 0;
}

@media screen and (min-width: 769px) {
    .recommendation-card {
        flex: 0 0 calc(50% - 0.75rem);
    }
}

@media screen and (min-width: 768px) {
    .achievement-metric {
        font-size: 2.25rem;
    }
}