@media screen and (max-width: 1400px) {
    section {
        padding: 3rem 5%;
    }

    .about-containers, .skills-grid, .blog-container {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }

    #three-canvas {
        opacity: 0.6;
    }

    [data-theme="dark"] #three-canvas {
        opacity: 0.8;
    }
}

@media screen and (max-width: 1200px) {
    #desktop-nav {
        display: none;
    }

    #hamburger-nav {
        display: flex;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 60px;
        z-index: 1000;
        background-color: rgba(255, 255, 255, 0.95);
        box-shadow: var(--shadow-sm);
    }

    [data-theme="dark"] #hamburger-nav {
        background-color: var(--dark-nav-bg);
    }

    body {
        padding-top: 60px;
    }

    #profile {
        flex-direction: column;
        text-align: center;
        padding: 2rem 5%;
        margin-top: 0;
        padding-top: 2rem;
    }

    .section__text {
        order: 1;
    }

    .section__pic-container {
        order: 2;
        width: 250px;
        height: 250px;
        margin: 2rem auto;
    }

    .about-containers, .skills-grid, .blog-container {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }

    .details-container {
        min-width: 250px;
    }

    #socials-container {
        justify-content: center;
    }

    .btn-container {
        justify-content: center;
        flex-wrap: wrap;
    }

    .menu-links {
        position: fixed;
        top: 60px;
        left: 0;
        width: 100%;
        z-index: 1001;
        background-color: white;
        max-height: 0;
        overflow: hidden;
        transition: all 0.3s ease-in-out;
    }

    [data-theme="dark"] .menu-links {
        background-color: var(--dark-container-bg);
    }

    .menu-links.open {
        max-height: 100vh;
        overflow-y: auto;
    }

    section {
        scroll-margin-top: 60px;
    }

    #three-canvas {
        opacity: 0.5;
    }

    [data-theme="dark"] #three-canvas {
        opacity: 0.7;
    }
}

@media screen and (max-width: 768px) {
    nav {
        height: 60px;
    }

    .logo {
        font-size: 1.5rem;
    }

    .title {
        font-size: 2.5rem;
    }

    .section__text__p2 {
        font-size: 1.2rem;
    }

    .btn {
        padding: 0.7rem 1.2rem;
        font-size: 0.9rem;
        width: 100%;
        max-width: 140px;
    }

    .project-btn {
        padding: 0.7rem 1.2rem;
        font-size: 0.9rem;
        width: 100px;
    }

    .contact-info-upper-container {
        flex-direction: column;
        padding: 1.5rem;
    }

    .contact-info-container p {
        font-size: 1rem;
    }

    .project-img {
        max-height: 140px;
        max-width: 250px;
    }

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

    .project-category-title {
        font-size: 1.5rem;
    }

    .details-container {
        min-width: 100%;
    }

    .skills-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }

    .blog-container {
        grid-template-columns: 1fr;
    }

    .skill-card {
        padding: 0.8rem;
    }

    .skill-logo {
        width: 24px;
        height: 24px;
    }

    .skill-card p {
        font-size: 0.85rem;
    }

    .skill-badge {
        font-size: 0.65rem;
        padding: 0.2rem 0.5rem;
    }

    footer {
        padding: 1.5rem 5%;
    }

    /* Project skills adjustments */
    .project-skills {
        gap: 6px;
    }
    
    .skill-badge.project-skill {
        font-size: 12px;
        padding: 0.2rem 0.6rem;
    }

    /* Language toggle adjustments */
    .language-toggle-btn {
        margin: 0.5rem 0;
        width: 100%;
        text-align: center;
    }
    
    .menu-links .language-toggle-btn {
        margin: 0.5rem auto;
        display: block;
        width: 80px;
    }

    /* About section adjustments */
    .about-containers {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1rem;
    }
    
    .details-container {
        padding: 1.5rem;
        min-height: 250px;
    }
    
    .details-container .icon {
        width: 40px;
        height: 40px;
    }
    
    .details-container h3 {
        font-size: 1.2rem;
    }
    
    .details-container p {
        font-size: 0.9rem;
    }

    /* Theme toggle adjustments */
    .theme-toggle-btn {
        padding: 0.3rem;
    }

    .theme-icon {
        height: 1.2rem;
        width: 1.2rem;
    }

    .theme-text {
        font-size: 0.8rem;
    }

    #three-canvas {
        opacity: 0.4;
    }

    [data-theme="dark"] #three-canvas {
        opacity: 0.6;
    }
}

@media screen and (max-width: 480px) {
    /* Extra small devices */
    .title {
        font-size: 2rem;
    }
    
    .section__text__p1, .section__text__p2 {
        font-size: 1rem;
    }
    
    .about-containers {
        grid-template-columns: 1fr;
    }
    
    .btn {
        max-width: 120px;
        padding: 0.6rem 1rem;
    }
    
    .project-btn {
        width: 90px;
        padding: 0.6rem 1rem;
    }
    
    /* Footer adjustments */
    footer .nav-links {
        flex-direction: column;
        gap: 0.8rem;
    }
    
    footer .nav-links a {
        font-size: 0.9rem;
    }
    
    footer p {
        font-size: 0.8rem;
    }
}