.portfolio-page {
    margin-top: -4rem;

    .portfolio-top {
        position: relative;
        isolation: isolate;
        overflow: hidden;
        background: linear-gradient(180deg, rgb(255 255 255 / .74), rgb(255 255 255 / .9) 42%, rgb(255 255 255 / .96));

        .portfolio-top-background {
            position: absolute;
            inset: -3rem;
            z-index: -1;
            background-position: center;
            background-size: cover;
            background-repeat: no-repeat;
            filter: blur(36px) saturate(.82) brightness(1.1);
            opacity: .2;
            pointer-events: none;
        }

        .portfolio-top-content {
            margin: 0 auto;
            padding: 1rem 1.25rem 1.5rem;
            display: grid;
            gap: var(--gap-size);
            grid-template-columns: 1fr 1fr;
            grid-template-rows: minmax(0, 3fr) minmax(0, 1fr);
            height: max(calc(100vh - 3rem), 40rem);

            .hero-image-shell {
                align-self: center;
                justify-self: center;
                grid-column: 1 / -1;
                grid-row: 1;
                position: relative;
                display: grid;
                place-items: center;
                width: 100%;
                height: 75%;
                min-height: 0;
                overflow: hidden;

                &::before {
                    content: "";
                    position: absolute;
                    inset: 4% 10%;
                    border-radius: 2.5rem;
                    background: radial-gradient(circle at 50% 50%, rgb(18 32 51 / .16), rgb(18 32 51 / 0) 72%);
                    filter: blur(40px);
                    pointer-events: none;
                }
            }

            .hero-image {
                position: relative;
                display: block;
                height: 100%;
                max-width: 100%;
                min-height: 0;
                margin: 0 auto;
                object-fit: contain;
                color: transparent;
                filter: drop-shadow(0 20px 40px rgb(18 32 51 / .08));
            }

            .portfolio-hero-title {
                align-self: center;
                grid-column: 1;
                grid-row: 2;
                max-width: 32rem;

                h1 {
                    margin-bottom: .5rem;
                    line-height: .92;
                    font-size: clamp(2.4rem, 6vw, 4.5rem);
                    letter-spacing: -.05em;
                    text-wrap: balance;
                }

                p {
                    margin: 0;
                    font-weight: 500;
                }
            }

            .portfolio-hero-info {
                align-self: center;
                justify-self: end;
                grid-column: 2;
                grid-row: 2;
                display: grid;
                grid-template-columns: auto auto;
                grid-template-rows: 1fr 1fr;
                padding: .5rem;
                border-radius: 999px;
                background: rgb(255 255 255 / 0.5);
                backdrop-filter: blur(24px) saturate(180%);
                -webkit-backdrop-filter: blur(24px) saturate(180%);
                align-items: center;

                .button-primary {
                    grid-column: 2;
                    grid-row: 1 / -1;
                }

                p {
                    padding: 0 1rem;
                    margin: 0;
                }

                p:first-of-type {
                    grid-column: 1;
                    grid-row: 1;
                    color: var(--color-muted)
                }

                p:last-of-type {
                    grid-column: 1;
                    grid-row: 2;
                }

                p:only-of-type {
                    grid-column: 1;
                    grid-row: 1 / -1;
                    color: var(--color-ink)
                }
            }
        }
    }

    .page-section {
        margin-top: 6rem;
    }
}

@media (max-width: 75rem) {
    .portfolio-page {
        .portfolio-top {
            .portfolio-top-content {
                grid-template-columns: 1fr;
                grid-template-rows: 3fr 1fr 1fr;
                gap: calc(var(--gap-size) * .5);
                padding: 0;

                .hero-image {
                    margin-top: var(--gap-size);
                }

                .portfolio-hero-title {
                    justify-self: center;
                    align-self: end;
                    text-align: center;
                }

                .portfolio-hero-info {
                    grid-column: 1;
                    grid-row: 3;
                    align-self: center;
                    justify-self: center;
                }
            }
        }

        .portfolio-unit-filters,
        .portfolio-unit-grid,
        .portfolio-unit-facts {
            grid-template-columns: 1fr;
        }
    }
}

