/* Shared mobile rules for every project page and the project template. */
* {
    box-sizing: border-box;
}

.binder {
    background-attachment: fixed;
}

.carousel {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-inline: contain;
    touch-action: pan-x;
}

@media (max-width: 800px) {
    html,
    body {
        width: 100%;
        height: 100%;
        overflow: hidden;
    }

    .Nav_Bar {
        display: flex;
        height: 7.5rem;
        padding: 0.65rem 0.85rem;
        flex-direction: column;
        align-items: stretch;
        justify-content: center;
        gap: 0.55rem;
        background: rgba(10, 11, 26, 0.9);
        backdrop-filter: blur(12px);
    }

    #heroTitle {
        width: 100%;
        padding: 0;
        overflow: hidden;
        font-size: clamp(1.45rem, 7vw, 2.15rem);
        line-height: 1.05;
        text-align: center;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .Nav_Bar nav {
        width: 100%;
        height: auto;
        padding: 0;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .Nav_Bar nav ul {
        display: flex;
        width: max-content;
        min-width: 100%;
        margin: 0;
        padding: 0;
        justify-content: center;
        gap: 0.35rem;
    }

    .Nav_Bar nav ul li {
        flex: 0 0 auto;
        padding: 0.28rem 0.48rem;
        border-width: 1px;
        font-size: 0.72rem;
        text-align: center;
    }

    .Nav_Bar nav ul li a {
        mix-blend-mode: normal;
    }

    .binder {
        position: relative;
        width: 100%;
        height: 100svh;
        overflow: hidden;
        background-position: center;
        background-size: auto 100svh;
        background-repeat: no-repeat;
        background-attachment: fixed;
    }

    .binderMask {
        position: absolute;
        inset: 7.5rem 0 0;
        width: 100%;
        height: auto;
        padding: 0 0 5rem;
        overflow-x: hidden;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .carousel {
        width: 100%;
        margin: 1rem auto 2.5rem;
        padding: 0 1rem;
        gap: 0.75rem;
        overflow-x: auto;
        transform: none;
        scroll-padding-inline: 1rem;
        scroll-snap-type: x mandatory;
    }

    .carousel::scroll-button(left),
    .carousel::scroll-button(right),
    .carousel::scroll-marker-group {
        display: none;
    }

    .card {
        flex: 0 0 86vw;
        width: 86vw;
        height: min(58vw, 285px);
        max-width: 430px;
        scroll-snap-align: center;
    }

    .card img,
    .card video {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

    #spacer1 {
        height: 1.5rem;
    }

    .page,
    #dateCompletedPage,
    #summaryPage,
    #QuickdisconnectsPAGE,
    #process,
    #currentStatus,
    #intro {
        width: 100%;
        height: auto !important;
        min-height: 0 !important;
        padding: 1.5rem 1.25rem;
        align-items: flex-start;
    }

    .page h1,
    #writeupPage h1 {
        width: min(100%, 42rem);
        margin: 0 auto 0.75rem;
        font-size: clamp(1.75rem, 9vw, 2.6rem);
        line-height: 1.1;
    }

    .page p,
    #summary,
    #processYap,
    #left,
    #right {
        width: min(100%, 42rem);
        max-width: 100%;
        margin: 0 auto 1rem;
        overflow-wrap: anywhere;
        font-size: clamp(0.92rem, 4vw, 1.08rem);
        line-height: 1.62;
    }

    #split {
        display: grid;
        width: min(100%, 42rem);
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    #writeupPage {
        width: 100%;
        height: auto;
        min-height: 70svh;
        padding: 1.5rem 1rem;
    }

    #writeup {
        display: block;
        width: 100%;
        height: 68svh;
        margin: 0 auto;
        border: 0;
    }

    .lightbox-img {
        max-width: 94%;
        max-height: 82%;
    }

    .close {
        top: 0.75rem;
        right: 1rem;
        padding: 0.5rem;
    }
}
