/* Responsive Styles */
@media (max-width: 768px) {
    :root {
        --spacing-lg: 3rem;
        --spacing-xl: 5rem;
    }

    body {
        overflow-x: hidden;
        /* Prevent any horizontal scroll on mobile */
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .nav-links {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: center;
        width: 100%;
        gap: 0.8rem;
        margin-top: 10px;
    }

    .nav-links li {
        margin: 0;
    }

    .nav-links a {
        font-size: 0.8rem;
        /* Slightly smaller to fit better */
    }

    .hamburger {
        display: none !important;
        /* Hide hamburger entirely */
    }

    .navbar {
        height: auto;
        /* Let navbar height grow to fit wrapped links */
        padding: 10px 0;
    }

    .navbar .container {
        flex-direction: column;
        /* Stack logo on top of links */
        align-items: center;
        gap: 5px;
    }

    #about-portrait-img {
        width: 100% !important;
    }

    .form-wrapper {
        width: 100% !important;
        padding: 0 1rem;
    }

    /* Tighten Certification Badges on Mobile */
    #credentials .logo-grid {
        gap: 2rem !important;
        /* Reduce gap significantly */
    }

    #credentials .credential-item img {
        max-height: 50px !important;
        /* Scale down slightly for a neat single row */
    }

    /* Override split layouts to stack on mobile - use flexbox with order for clean stacking */
    .split-layout,
    .split-layout.reverse {
        display: flex;
        flex-direction: column;
        direction: ltr;
        text-align: left;
    }

    /* Always show image BELOW text on mobile regardless of desktop layout */
    .split-layout .split-content {
        order: 1;
    }

    .split-layout .split-image {
        order: 2;
        margin-top: var(--spacing-lg);
        padding-left: 0;
    }

    #about .split-image {
        padding-left: 0;
    }
}

/* Default Desktop sizing for form-wrapper */
.form-wrapper {
    width: 100%;
    max-width: 1200px;
}