body {
    overflow-y: auto !important;
}

/* === Projects Gallery Styles (Mobile First) === */
.projects-section {
    display: flex;
    flex-direction: column;
    width: 100vw;
    min-height: 100vh;
    box-sizing: border-box;
    padding: 0 4vw;
}

.projects-title-area {
    max-width: 100vw;
    min-width: 0;
    padding: 32px 0 0 0;
    align-items: center;
    text-align: center;
    display: flex;
    flex-direction: column;
}

.projects-title-area h1 {
    font-size: clamp(1.5rem, 6vw, 4rem);
    color: var(--gray);
    margin: 2em 0 1rem 0;
    line-height: 1.1;
}

.projects-title-area .highlight {
    color: var(--orange);
    display: block;
}

.projects-gallery {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    position: static;
    padding: 0;
    min-height: unset;
    gap: 32px;
    margin-bottom: 1.5em;
}

.project-card {
    border-radius: 18px;
    margin: 0;
    /* Add lateral padding */
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    position: relative;
}

.project-card img {
    border-radius: 18px;
    width: 100%;
    height: 60vw;
    min-height: 220px;
    object-fit: cover;
    display: block;
}

.project-overlay {
    background: none;
    opacity: 1;
    justify-content: flex-end;
    align-items: flex-start;
    padding: 0 0 18px 0;
    pointer-events: none;
    position: absolute;
    inset: 0;
    color: #fff;
    display: none;
    flex-direction: column;
    border-radius: 0;
    z-index: 2;
    text-align: left;
}

.project-info-mobile {
    display: block;
    background: var(--orange);
    color: #fff;
    border-radius: 0 12px 0 0;
    padding: 12px 20px 10px 16px;
    margin: 0 0 18px 0;
    position: absolute;
    left: 0;
    bottom: 0;
    min-width: 60vw;
    max-width: 90vw;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.project-title {
    font-size: clamp(1rem, 5vw, 3rem);
    margin-bottom: 0.2em;
}

.project-location {
    font-size: clamp(0.95rem, 4.5vw, 3rem);
}

.gallery-arrow {
    display: none;
    z-index: 10;
    background: rgba(255, 255, 255, 0.92);
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    font-size: 2rem;
    color: var(--orange);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: background 0.2s;
    outline: none;
    position: static;
    transform: none;
    margin: 0 16px;
}

.gallery-arrow:hover {
    background: var(--orange);
    color: #fff;
}

/* Desktop and up */
@media (min-width: 900px) {
    .projects-section {
        flex-direction: row;
        align-items: center;
        position: relative;
    }

    .projects-title-area {
        min-width: 220px;
        max-width: 340px;
        align-items: flex-start;
        text-align: left;
        display: flex;
        flex-direction: column;
        justify-content: center;
        /* Vertically center text */
        height: 100%;
        padding: 0;
    }

    .projects-title-area h1 {
        font-size: 3rem;
        margin-top: -40px;
    }

    .projects-gallery-wrapper {
        width: inherit;
        max-width: 75vw;
    }

    .projects-gallery {
        flex: 1 1 auto;
        display: flex;
        flex-direction: row;
        align-items: center;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
        gap: 48px;
        padding: 0 40px;
        min-height: 400px;
        position: relative;
        margin-bottom: 0;
    }

    .project-card {
        flex: 0 0 480px;
        max-width: 90vw;
        min-width: 340px;
        margin: 0;
        border-radius: 24px;
        box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
        position: relative;
        transition: transform 0.3s, box-shadow 0.3s;
    }

    .project-card img {
        width: 100%;
        height: 340px;
        border-radius: 24px;
    }

    .project-card.current {
        transform: scale(1.08);
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.16);
        z-index: 2;
    }

    .project-overlay {
        background: rgba(249, 168, 37, 0.92);
        opacity: 0;
        justify-content: center;
        align-items: center;
        pointer-events: auto;
        border-radius: 24px;
        text-align: center;
        display: flex;
        transition: opacity 240ms ease;
        will-change: opacity;
    }

    .project-overlay > div {
        opacity: 0;
        transform: translateY(8px);
        transition: opacity 240ms ease, transform 240ms ease;
        will-change: opacity, transform;
    }

    .project-card:hover .project-overlay,
    .project-card:focus .project-overlay {
        opacity: 1;
        cursor: pointer;
    }

    .project-card:hover .project-overlay > div,
    .project-card:focus .project-overlay > div {
        opacity: 1;
        transform: none;
    }

    .project-info-mobile {
        display: none !important;
    }

    /* Hide scroll bar for aesthetics */
    .projects-gallery::-webkit-scrollbar {
        display: none;
    }

    .projects-gallery {
        -ms-overflow-style: none;
        scrollbar-width: none;
    }

    .project-title {
        font-size: 1.4rem;
        margin-bottom: 0.5em;
    }

    .project-location {
        font-size: 1.1rem;
    }

    .gallery-arrows {
        display: flex;
        justify-content: center;
        align-items: center;
        margin-top: 32px;
        gap: 32px;
        width: 100%;
        position: static;
    }

    .gallery-arrow {
        display: inline-flex;
        position: static;
        transform: none;
        margin: 0 16px;
    }

    /* Keyboard focus ring for accessibility */
    .project-card:focus-visible {
        outline: 3px solid rgba(249, 168, 37, 0.95);
        outline-offset: 8px;
    }

    /* Respect reduced motion preferences */
    @media (prefers-reduced-motion: reduce) {
        .project-overlay,
        .project-overlay > div,
        .project-card {
            transition: none !important;
            transform: none !important;
        }
    }
}