/* Responsive Design */

/* Prevent horizontal scrolling */
html, body {
    overflow-x: hidden;
    width: 100%;
}

.container, .container-fluid {
    max-width: 100%;
    overflow-x: hidden;
}

/* Enhanced Touch Targets */
@media (max-width: 768px) {
    .btn, .nav-link, .social-link {
        min-height: 44px;
        min-width: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .timeline::before {
        left: 31px;
    }

    .timeline-item {
        width: 100%;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .project-card {
        height: auto;
    }

    .backend-visual i {
        font-size: 2rem;
        margin-bottom: 1.5rem;
    }
    
    .cert-actions {
        flex-direction: column;
    }
}

@media (min-width: 768px) {
    .section-padding {
        padding: 6rem 0;
    }

    .hero-title {
        font-size: 3rem;
    }

    .hero-subtitle {
        font-size: 1.5rem;
    }

    .section-title {
        font-size: 2.5rem;
    }

    .about-image {
        margin-bottom: 0;
        margin-top: 0;
    }
    
    .project-image img {
        height: 300px;
    }
}

@media (min-width: 992px) {
    .hero-title {
        font-size: 3.5rem;
    }

    .section-title {
        font-size: 2.8rem;
    }
    
    .project-slide {
        padding: 0 30px;
    }
}

@media (max-width: 576px) {
    .section-title {
        font-size: 1.8rem;
    }

    .section-padding {
        padding: 3rem 0;
    }
    
    .backend-diagram {
        width: 90%;
    }

    .diagram-item {
        width: 32px;
        height: 32px;
        padding: 6px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .hero-text {
        font-size: 0.95rem;
    }

    .hero-cta {
        flex-direction: column;
        align-items: center;
    }

    .hero-cta .btn {
        width: 100%;
        margin-right: 0 !important;
        margin-bottom: 1rem;
    }

    .section-header {
        margin-bottom: 2rem;
    }
}

@media (max-width: 400px) {
    .project-tags span {
        padding: 0.2rem 0.5rem;
        font-size: 0.7rem;
    }

    .project-content h3 {
        font-size: 1.2rem;
    }

    .project-content p {
        font-size: 0.9rem;
    }
}

@media (max-width: 767px) {
    .row.g-4 {
        --bs-gutter-x: 1rem;
    }

    .project-card {
        margin-bottom: 2rem;
    }
}

@media (max-width: 350px) {
    .project-links {
        flex-direction: column;
        gap: 0.5rem;
    }

    .project-links a {
        width: 100%;
        text-align: center;
    }
    
    .navbar-brand {
        max-width: calc(100% - 45px);
    }
    
    .logo-text {
        font-size: 0.75rem;
    }
}