@media screen and (max-width: 1400px) {
    #profile {
        min-height: 83vh;
        height: auto;
        margin-bottom: 6rem;
    }
    .about-containers {
        flex-wrap: wrap;
    }
    #contact,
    #projects {
        height: auto;
        min-height: fit-content;
    }

    /* Projects - flex items shrink naturally at this breakpoint */
    #projects .about-containers {
        gap: 1.5rem;
    }

    /* Fix about section zoom issues */
    #about {
        height: auto;
        min-height: 96vh;
    }

    #about .section-container {
        display: flex;
        flex-direction: column;
        gap: 2rem;
        height: auto;
    }

    #about .about-details-container {
        display: flex;
        flex-direction: row;
        justify-content: center;
        gap: 2rem;
        width: 100%;
    }

    #about .details-container {
        flex: 1;
        max-width: 400px;
    }

    #about .text-container {
        width: 100%;
        max-width: 800px;
        margin: 2rem auto;
    }
}

@media screen and (max-width: 1200px) {
    #desktop-nav {
        display: none;
    }
    #hamburger-nav {
        display: flex;
    }
    #experience,
    .experience-details-container {
        margin-top: 2rem;
    }
    #profile,
    .section-container {
        display: block;
    }
    .arrow {
        display: none;
    }
    section,
    .section-container {
        height: fit-content;
    }
    section {
        margin: 0 5%;
    }
    .section__pic-container {
        width: 275px;
        height: 275px;
        margin: 0 auto 2rem;
    }
    .about-containers {
        margin-top: 0;
    }

    #projects .about-containers {
        gap: 1.5rem;
    }

    #projects .color-container {
        flex: 0 1 300px;
    }

    /* Fix about section layout at 1200px */
    #about .about-details-container {
        flex-direction: column;
        align-items: center;
    }

    #about .details-container {
        width: 100%;
        max-width: 500px;
        margin: 0 auto;
    }

    /* Fix about section profile picture */
    #about .section__pic-container {
        width: 275px;
        height: 275px;
        margin: 0 auto 2rem;
    }

    #about .about-pic {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 2rem;
    }
}

@media screen and (max-width: 600px) {
    #contact,
    footer {
        min-height: 40vh;
        height: auto;
    }
    #profile {
        min-height: auto;
        height: auto;
        margin-bottom: 0;
        padding-bottom: 2rem;
    }
    article {
        font-size: 1rem;
    }
    footer nav {
        height: fit-content;
        margin-bottom: 2rem;
    }
    .about-containers,
    .contact-info-upper-container,
    .btn-container {
        flex-wrap: wrap;
    }
    .contact-info-container {
        margin: 0;
    }
    .contact-info-container p,
    .nav-links li a {
        font-size: 1rem;
    }
    .experience-sub-title {
        font-size: 1.25rem;
    }
    .logo {
        font-size: 1.5rem;
    }
    .nav-links {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    .section__pic-container {
        width: auto;
        height: 46vw;
        justify-content: center;
    }
    .section__text__p2 {
        font-size: 1.25rem;
    }
    .title {
        font-size: 2rem;
    }
    .text-container {
        text-align: justify;
    }
    
    /* Project section specific styles */
    #projects .experience-details-container {
        margin-top: 2rem;
    }

    #projects .about-containers {
        gap: 1.5rem;
    }

    #projects .color-container {
        flex: 0 1 90%;
        max-width: 500px;
    }

    #projects .project-title {
        font-size: 1.25rem;
        margin: 1rem 0;
    }

    #projects .btn-container {
        display: flex;
        justify-content: center;
        gap: 1rem;
    }

    /* Fix about section profile picture for mobile */
    #about .section__pic-container {
        width: 250px;
        height: 250px;
        margin: 0 auto 2rem;
    }
}

@media screen and (max-width: 400px) {
    #projects .details-container.color-container {
        width: 95%;
        padding: 1rem;
    }
    
    #projects .project-img {
        border-radius: 1rem;
    }
    
    #projects .project-title {
        font-size: 1.25rem;
    }
    
    #projects .btn-container {
        gap: 0.5rem;
    }
    
    .btn.project-btn {
        padding: 0.75rem;
        width: 7rem;
    }
}