html.is-work-page,
html.is-work-page body {
    height: 100%;
    overflow: hidden;
    overscroll-behavior: none;
}

html.is-work-page body {
    position: fixed;
    inset: 0;
    width: 100%;
}

.work-page {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    touch-action: none;
}

.work-pin-panel {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.carousel-container {
    position: relative;
    z-index: 1;
    flex: 1;
    min-height: 0;
    width: 100%;
    overflow: hidden;
    padding: 0;
    margin: 0;
}

.carousel-track {
    display: flex;
    gap: 0;
    align-items: flex-start;
    width: max-content;
    will-change: transform;
}

.project-slide {
    flex: 0 0 auto;
    overflow: hidden;
    opacity: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.project-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
}

.project-index {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    column-gap: var(--grid-gap);
    padding: 0 var(--site-margin);
    opacity: 1;
    transition: opacity 0.4s ease;
    position: fixed;
    left: 0;
    right: 0;
    bottom: var(--index-bottom-inset);
    z-index: 100;
    pointer-events: auto;
}

.project-index.is-hidden {
    opacity: 0;
    pointer-events: none;
}

.index-left-panel {
    grid-column: 1 / span 3;
}

.index-right-panel {
    grid-column: 4 / span 9;
}

.project-list-nav,
.project-scope-list {
    list-style: none;
    padding: 0;
    margin: 0;
    font-family: var(--font-main);
    font-size: var(--font-size-small);
    font-weight: 300;
    line-height: 1.45;
}

.project-list-nav li {
    color: var(--grey);
    cursor: pointer;
    transition: color 0.35s ease;
}

.project-list-nav li.active-item {
    color: var(--black);
    font-weight: 400;
    text-underline-offset: 0.2em;
}

.project-scope-list li {
    color: var(--grey);
    transition: color 0.35s ease;
}

.project-scope-list li.active-scope {
    color: var(--black);
    font-weight: 400;
    text-underline-offset: 0.2em;
}

.work-index-spacer {
    display: none;
}

@media (max-width: 900px) {
    html.is-work-page,
    html.is-work-page body {
        height: auto;
        overflow: visible;
        overscroll-behavior: auto;
    }

    html.is-work-page body {
        position: static;
        width: 100%;
    }

    .work-page {
        position: static;
        top: auto;
        left: auto;
        right: auto;
        bottom: auto;
        overflow: visible;
        touch-action: auto;
        padding-top: var(--nav-height); 
    }

    .work-pin-panel {
        display: none !important;
    }

    .work-list-mobile {
        display: flex;
        flex-direction: column;
        gap: 4.5rem;
        padding: 2rem var(--site-margin) var(--section-margin);
    }

    .work-item {
        display: block;
        text-decoration: none;
        width: 100%;
    }

    .work-item img {
        width: 100%;
        height: auto;
        aspect-ratio: 383 / 257;
        object-fit: cover;
        object-position: center top;
        display: block;
    }

    .work-item__title,
    .work-item__scope {
        font-family: var(--font-main);
        font-size: var(--font-size-medium);
        font-weight: 400;
        line-height: 1.4;
        color: var(--grey);
        margin: 0;
    }

    .work-item__title {
        margin-top: 0.85rem;
        color: var(--black);
    }
}
