.project-page {
    max-width: 1440px;
    margin: 0 auto;
}

.project-page .project-gallery {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) auto;
    max-width: 1320px;
    height: min(80vh, 900px);
    margin: 3vw auto 0;
}

.project-page > h1 {
    display: none;
}

.project-page .project-gallery img {
    display: none;
    grid-column: 1;
    grid-row: 1;
    width: 100%;
    height: 100%;
    object-fit: contain;
    margin: 0 auto;
}

.project-page .project-gallery img.is-active {
    display: block;
}

.project-carousel-controls {
    display: flex;
    grid-column: 1;
    grid-row: 2;
    justify-content: space-between;
    margin-top: 18px;
}

.project-carousel-controls button {
    border: 0;
    padding: 8px 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    font: inherit;
    font-size: 22px;
}

.project-carousel-controls button:hover,
.project-carousel-controls button:focus-visible {
    color: #777;
}

.project-details {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(48px, 10vw, 160px);
    max-width: 1320px;
    margin: 34px auto 0;
}

.project-description {
    padding-top: 20px;
    font-size: clamp(14px, 1.2vw, 17px);
    line-height: 1.9;
}

.project-description p + p {
    margin-top: 34px;
}

.project-information {
    align-self: start;
    padding: 20px;
    background: #0000c8;
    color: #fff;
    font-size: clamp(14px, 1.1vw, 16px);
    line-height: 1.5;
}

.project-information h2 {
    margin-bottom: 18px;
    font-size: 1.1em;
}

.project-information dl {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    column-gap: 12px;
    row-gap: 0;
    align-items: baseline;
    line-height: inherit;
}

.project-information dt {
    font-weight: 700;
}

.project-information dd {
    margin: 0;
}

.project-information .project-completion {
    color: #fff;
}

@media (min-width: 701px) {
    .project-page {
        display: grid;
        grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
        grid-template-areas: "details gallery";
        align-items: stretch;
        gap: clamp(28px, 4vw, 64px);
        width: 100%;
        max-width: 1600px;
        height: 100svh;
        margin: 0 auto;
        padding: clamp(96px, 12vh, 130px) clamp(28px, 5vw, 76px) 28px;
    }

    .project-page .project-gallery {
        grid-area: gallery;
        grid-template-rows: minmax(0, 1fr) auto;
        width: 100%;
        max-width: none;
        height: 100%;
        min-height: 0;
        margin: 0;
    }

    .project-details {
        grid-area: details;
        display: flex;
        flex-direction: column;
        justify-content: safe center;
        gap: clamp(24px, 3vh, 32px);
        width: 100%;
        height: 100%;
        min-height: 0;
        margin: 0;
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
    }

    .project-description {
        flex: 0 0 auto;
        width: 100%;
        padding-top: 0;
        font-size: clamp(12px, 0.95vw, 14px);
        line-height: 1.55;
    }

    .project-description p + p {
        margin-top: clamp(14px, 1.8vh, 20px);
    }

    .project-information {
        flex: 0 0 auto;
        align-self: stretch;
        width: 100%;
        order: -1;
        margin-top: 0;
    }
}

@media (max-width: 700px) {
    .project-page .project-gallery {
        margin-top: 12vw;
    }

    .project-details {
        grid-template-columns: 1fr;
        gap: 24px;
        margin-top: 28px;
    }

    .project-description {
        font-size: 14px;
    }

    .project-description p + p {
        margin-top: 22px;
    }

    .project-information {
        padding: 18px;
        font-size: 15px;
    }

}
