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

@media screen and (max-width: 1200px) {
    #desktop-nav {
        display: none;
    }
    #hamburger-nav {
        display: flex;
        height: auto;
        min-height: 70px;
        padding: 1rem;
        background: transparent;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        border-bottom: none;
        box-shadow: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1000001;
        justify-content: flex-end;
        align-items: center;
    }
    
    .hamburger-icon {
        z-index: 1000002;
        position: relative;
    }
    
    #hamburger-nav .logo {
        display: none;
    }

    .menu-links {
        z-index: 1000000;
        font-weight: 500;
        width: 100%;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        transform: translateY(-100%);
        display: block !important;
        background: var(--card-bg);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-radius: 0;
        border-top: none;
        border-bottom: 1px solid var(--border-color);
        box-shadow: 0 8px 32px var(--shadow-color);
        padding: 1.5rem 0;
        padding-top: 85px;
        margin: 0;
        opacity: 0;
        max-height: 0;
        overflow: hidden;
        pointer-events: none;
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .menu-links.open {
        opacity: 1;
        transform: translateY(0);
        max-height: 500px;
        pointer-events: auto;
    }

    .menu-links ul {
        margin: 0;
        padding: 0;
        list-style-type: none;
        list-style-image: none;
    }

    .menu-links a,
    .menu-links li button {
        padding: 1.25rem 2rem;
        font-size: 1.1rem;
        margin: 0.5rem 1rem;
        border-radius: 0.5rem;
        display: block;
        width: calc(100% - 2rem);
    }
    
    .menu-links li:last-child {
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid var(--border-color);
    }
    
    .menu-links li:last-child button {
        margin: 0.5rem auto;
        width: auto;
        min-width: 120px;
        text-align: center;
        font-size: 1.2rem;
        padding: 1rem 2rem;
    }

    .menu-links a:hover,
    .menu-links li button:hover {
        transform: translateX(8px);
        background: var(--card-bg-hover);
    }

    #experience {
        padding: 3rem 1rem;
    }

    .about-containers {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .skills-container {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 0.75rem;
    }

    .details-container {
        padding: 1.5rem;
    }

    .skill {
        padding: 0.875rem;
        font-size: 0.85rem;
        min-height: 90px;
        max-width: 120px;
    }

    .skill img {
        width: 28px;
        height: 28px;
    }

    .experience-details-container {
        margin-top: 2rem;
    }

    #profile {
        display: block;
        transition: margin-top 0.5s ease, padding-top 0.5s ease;
        padding-top: 90px;
    }
    
    .section-container {
        display: block;
        transition: margin-top 0.5s ease;
    }

    .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-container::before {
        left: 30px;
        transform: none;
    }

    .projects-grid {
        gap: 2.5rem;
        padding: 2rem 0 2rem 4rem;
    }

    .project-card {
        width: 100%;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-right: 0 !important;
        padding-left: 0 !important;
    }

    .project-card::before {
        left: calc(-3rem - 8px) !important;
        right: auto !important;
        transform: translate(-50%, -50%) !important;
    }

    .project-card::after {
        left: calc(-3rem - 8px) !important;
        right: auto !important;
        width: calc(3rem + 8px) !important;
    }

    .project-image-wrapper {
        height: 240px;
    }

    .project-image-wrapper:has(.project-icon) {
        padding: 1.5rem;
    }
}

@media screen and (max-width: 600px) {
    #contact,
    footer {
        height: 40vh;
    }

    #profile {
        height: 83vh;
        margin-bottom: 0;
    }

    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;
    }

    .about-containers {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .skills-container {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 0.5rem;
    }

    .details-container {
        padding: 1.25rem;
    }

    .skill {
        padding: 0.75rem;
        font-size: 0.8rem;
        min-height: 80px;
        max-width: 100px;
    }

    .skill img {
        width: 24px;
        height: 24px;
    }

    .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: 60vw;
        justify-content: center;
    }

    .section__text__p2 {
        font-size: 1.25rem;
    }

    .title {
        font-size: 2rem;
    }

    .text-container {
        text-align: justify;
    }

    #content-container {
        transition: margin-top 0.4s ease;
    }

    .menu-open #content-container {
        margin-top: 0;
    }

    .menu-open #profile {
        padding-top: 500px;
    }

    .about-containers,
    .about-details-container {
        display: flex;
        width: 100%;
        text-align: center;
    }

    .projects-container::before {
        left: 20px;
        transform: none;
    }

    .projects-grid {
        gap: 2rem;
        padding: 2rem 0 2rem 3rem;
    }

    .project-card {
        width: 100%;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-right: 0 !important;
        padding-left: 0 !important;
    }

    .project-card::before {
        left: calc(-3rem - 6px) !important;
        right: auto !important;
        width: 12px;
        height: 12px;
        transform: translate(-50%, -50%) !important;
    }

    .project-card::after {
        left: calc(-3rem - 6px) !important;
        right: auto !important;
        width: calc(3rem + 6px) !important;
    }

    .project-image-wrapper {
        height: 200px;
    }

    .project-image-wrapper:has(.project-icon) {
        padding: 1.25rem;
    }

    .project-icon {
        max-width: 100px;
        max-height: 100px;
    }

    .project-content {
        padding: 1.5rem;
    }

    .project-title {
        font-size: 1.3rem;
    }

    .project-description {
        font-size: 0.95rem;
    }

    .contact-info-upper-container {
        flex-direction: column;
        padding: 2rem 1.5rem;
        gap: 1.5rem;
        width: calc(100% - 2rem);
        max-width: 100%;
        margin: 2rem 1rem;
        box-sizing: border-box;
    }

    .contact-info-container {
        width: 100%;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        padding: 1rem;
        box-sizing: border-box;
        min-width: 0;
        text-align: center;
        gap: 0.75rem;
    }

    .contact-info-container p {
        font-size: 0.95rem;
        word-break: break-word;
        overflow-wrap: break-word;
        max-width: 100%;
        flex: 0 1 auto;
        min-width: 0;
        padding: 0;
        text-align: center;
    }

    .contact-info-container .icon {
        flex-shrink: 0;
        width: 28px;
        height: 28px;
    }

    .contact-info-container a {
        word-break: break-all;
        overflow-wrap: anywhere;
        display: inline-block;
        max-width: 100%;
        line-height: 1.4;
        text-align: center;
        font-size: 1rem;
    }

    .toast {
        bottom: 1rem;
        left: 1rem;
        right: 1rem;
        transform: translateX(0) translateY(100px);
        max-width: calc(100% - 2rem);
        padding: 0.875rem 1.5rem;
        font-size: 0.9rem;
    }

    .toast.show {
        transform: translateX(0) translateY(0);
    }
}
