/* ==========================================================================
   Responsive Styles
   ========================================================================== */

/* Max 1200px (Laptops) */
@media (max-width: 1200px) {
    .container {
        padding: 0 2rem;
    }
}

/* Max 992px (Tablets) */
@media (max-width: 992px) {
    .hero-grid,
    .about-grid, 
    .split-section,
    .documents-grid,
    .cards-grid,
    .bio-grid,
    .info-list,
    .skills-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .hero-actions,
    .hero-social,
    .about-content .btn-group {
        justify-content: center;
    }
    
    .hero-desc {
        margin: 0 auto 2rem auto;
    }
    
    .hero-quote {
        display: none;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem 0;
    }
    
    .stat-item:nth-child(2) {
        border-right: none;
    }
    
    .goal-section::after {
        display: none;
    }
    
    .footer-grid {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }

    .section {
        padding: 4rem 0;
    }
}

/* Max 768px (Mobile Devices) */
@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background-color: var(--white);
        flex-direction: column;
        padding: 2rem;
        transition: left 0.3s ease;
        overflow-y: auto;
        z-index: 1001; /* Ensure nav is above everything when open */
    }
    
    .nav-links.active {
        left: 0;
    }
    
    .mobile-menu-btn {
        display: block !important;
        z-index: 1002;
    }
    
    .nav-link {
        font-size: 1.25rem;
        width: 100%;
        text-align: center;
        padding: 0.5rem 0;
    }
    
    .nav-links .btn {
        width: 100%;
        margin-left: 0 !important;
        margin-top: 1rem;
        text-align: center;
    /* Typography Scaling for Mobile */
    .hero {
        background-image: none !important;
        background-color: var(--background-color);
        padding-top: 90px;
    }
    
    .hero::before {
        display: none;
    }
    
    .hero-content {
        padding: 1.5rem 1rem;
        width: 100%;
        text-align: center;
    }
    
    .hero-content .tag {
        display: none;
    }

    p {
        text-align: left;
        hyphens: auto;
        -webkit-hyphens: auto;
        -ms-hyphens: auto;
    }

    .hero-desc {
        margin: 0 auto 1.5rem auto;
    }

    .hero-title {
        font-size: 2.25rem;
        line-height: 1.2;
    }
    
    .section-title {
        font-size: 1.8rem;
    }

    h2 {
        font-size: 2rem;
    }
    
    .page-header h1 {
        font-size: 2.5rem;
        word-wrap: break-word;
        padding: 0 1rem;
    }

    .page-header p {
        font-size: 1rem;
        padding: 0 1rem;
    }

    /* Grids to single column */
    .cards-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem 1rem;
    }
    
    .stat-item {
        border-right: 1px solid var(--border-color);
        border-bottom: 1px solid var(--border-color);
        padding: 1rem 0;
    }
    
    .stat-item:nth-child(even) {
        border-right: none;
    }
    
    .stat-item:nth-child(3),
    .stat-item:nth-child(4) {
        border-bottom: none;
        padding-bottom: 0;
    }
    
    .stat-item:nth-child(1),
    .stat-item:nth-child(2) {
        padding-top: 0;
    }

    .section {
        padding: 3rem 0;
    }
    
    .section-header-flex {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    /* Fix Interest Card Padding */
    .core-interests {
        gap: 0.50rem;
    }

    .interest-card {
        padding: 0.75rem 0.25rem;
    }
    
    .interest-card h4 {
        font-size: 1rem;
    }
    
    .interest-card p {
        font-size: 0.8rem;
    }

    /* Certificates */
    .cert-item {
        padding: 1.25rem 1rem;
        gap: 1rem;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .cert-icon {
        width: 44px;
        height: 44px;
    }

    .cert-icon svg {
        width: 22px;
        height: 22px;
    }

    /* Fix image overflows */
    img, video, iframe {
        max-width: 100%;
        height: auto;
    }
}

/* Max 576px (Small Mobile Devices) */
@media (max-width: 576px) {
    .hero-title {
        font-size: 1.8rem;
    }

    .page-header h1 {
        font-size: 2rem;
    }

    .hero-social {
        gap: 1rem;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
    }

    .hero-actions .btn {
        width: 100%;
        text-align: center;
    }
}
