.portfolio-page {
    background: #f3f0e9;
}

.portfolio-hero {
    position: relative;
    min-height: 540px;
    display: flex;
    align-items: end;
    overflow: hidden;
    background: #131c2c;
    color: #fff;
}

.portfolio-hero__image {
    position: absolute;
    inset: 0;
    background: url("../images/st-laurent-apres-04.jpg") center 45% / cover no-repeat;
    opacity: .42;
}

.portfolio-hero::after {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(13, 17, 20, .94), rgba(13, 17, 20, .42));
    content: "";
}

.portfolio-hero__content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 100px;
    align-items: end;
    padding-top: 180px;
    padding-bottom: 68px;
}

.portfolio-hero h1 {
    margin: 0;
    font-family: "Arial Narrow", "Aptos Display", "Segoe UI", sans-serif;
    font-size: clamp(3.8rem, 6.8vw, 7rem);
    font-weight: 900;
    letter-spacing: -.06em;
    line-height: .84;
    text-transform: uppercase;
}

.portfolio-hero h1 em {
    color: var(--lime);
    font-style: normal;
}

.portfolio-hero__summary {
    padding: 24px 0 4px;
    border-top: 2px solid var(--ardoise);
}

.portfolio-hero__summary > p {
    margin: 0 0 26px;
    color: rgba(255, 255, 255, .67);
    font-size: .9rem;
}

.portfolio-hero__summary > div {
    display: grid;
    grid-template-columns: auto 1fr auto 1fr;
    align-items: baseline;
    gap: 10px;
}

.portfolio-hero__summary strong {
    font-family: "Arial Narrow", "Aptos Display", sans-serif;
    font-size: 2.3rem;
    line-height: 1;
}

.portfolio-hero__summary span {
    color: var(--lime);
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.portfolio-index {
    position: sticky;
    z-index: 20;
    top: 79px;
    border-bottom: 1px solid var(--line);
    background: rgba(243, 240, 233, .97);
    backdrop-filter: blur(12px);
}

.portfolio-index__inner {
    min-height: 78px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.portfolio-index__inner > p {
    margin: 0;
    color: #737779;
    font-size: .7rem;
    font-weight: 850;
    letter-spacing: .11em;
    text-transform: uppercase;
}

.portfolio-filters {
    display: flex;
    align-items: center;
    gap: 8px;
}

.portfolio-filters button {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 14px;
    border: 1px solid var(--line);
    background: transparent;
    color: #5d6264;
    cursor: pointer;
    font-size: .75rem;
    font-weight: 750;
    transition: background .2s ease, color .2s ease, border-color .2s ease;
}

.portfolio-filters button span {
    color: currentColor;
    font-size: .62rem;
    opacity: .55;
}

.portfolio-filters button:hover,
.portfolio-filters button.is-active {
    border-color: var(--ink);
    background: var(--ink);
    color: #fff;
}

.portfolio-list {
    padding-top: 20px;
    padding-bottom: 110px;
}

.portfolio-project {
    padding: 90px 0 100px;
    border-bottom: 1px solid var(--line);
}

.portfolio-project[hidden] {
    display: none;
}

.portfolio-project__header {
    display: grid;
    grid-template-columns: 55px minmax(280px, .8fr) minmax(280px, .5fr);
    gap: 35px;
    align-items: end;
    margin-bottom: 42px;
}

.portfolio-project__number {
    align-self: start;
    color: var(--ardoise);
    font-size: .72rem;
    font-weight: 900;
    letter-spacing: .13em;
}

.portfolio-project__header div > p {
    margin: 0 0 8px;
    color: #727678;
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .11em;
    text-transform: uppercase;
}

.portfolio-project h2 {
    margin: 0;
    font-family: "Arial Narrow", "Aptos Display", "Segoe UI", sans-serif;
    font-size: clamp(2.25rem, 3.6vw, 3.6rem);
    font-weight: 850;
    letter-spacing: -.045em;
    line-height: .95;
}

.portfolio-project__header > p {
    max-width: 430px;
    margin: 0 0 3px;
    color: #686d6f;
    font-size: .9rem;
}

.gallery-grid {
    display: grid;
    gap: 10px;
}

.gallery-grid--twelve {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-rows: 205px;
}

.gallery-grid--three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: 330px;
}

.gallery-grid--two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 420px;
}

.gallery-grid--single {
    grid-template-columns: 1fr;
    grid-auto-rows: 500px;
}

.gallery-grid--five {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: repeat(2, 260px);
}

.gallery-grid--five .gallery-photo:first-child {
    grid-row: span 2;
}

.gallery-photo {
    position: relative;
    min-width: 0;
    min-height: 0;
    display: block;
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: 0;
    background: #20262a;
    color: #fff;
    cursor: zoom-in;
}

.gallery-photo::after {
    position: absolute;
    inset: 0;
    background: rgba(12, 16, 19, .05);
    content: "";
    transition: background .3s ease;
}

.gallery-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .65s var(--ease);
}

.gallery-photo > span {
    position: absolute;
    z-index: 2;
    top: 14px;
    left: 14px;
    padding: 5px 8px;
    background: rgba(19, 23, 26, .86);
    color: #fff;
    font-size: .6rem;
    font-weight: 850;
    letter-spacing: .11em;
    text-transform: uppercase;
}

.gallery-photo > span.is-after {
    background: var(--ardoise);
}

.gallery-photo > i {
    position: absolute;
    z-index: 3;
    right: 14px;
    bottom: 14px;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    background: var(--ardoise);
    color: #fff;
    font-style: normal;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity .25s ease, transform .25s ease;
}

.gallery-photo > i svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
}

.gallery-photo:hover img {
    transform: scale(1.045);
}

.gallery-photo:hover::after {
    background: rgba(12, 16, 19, .24);
}

.gallery-photo:hover > i,
.gallery-photo:focus-visible > i {
    opacity: 1;
    transform: none;
}

.portfolio-cta {
    padding: 85px 0;
    background: var(--ink);
    color: #fff;
}

.portfolio-cta__inner {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 50px;
}

.portfolio-cta h2 {
    margin: 0;
    font-family: "Arial Narrow", "Aptos Display", "Segoe UI", sans-serif;
    font-size: clamp(2.6rem, 5vw, 5rem);
    letter-spacing: -.055em;
    line-height: .95;
}

.portfolio-footer {
    min-height: 95px;
}

.lightbox {
    width: min(94vw, 1200px);
    height: min(92vh, 900px);
    max-width: none;
    max-height: none;
    padding: 0;
    overflow: hidden;
    border: 0;
    background: #101417;
    color: #fff;
    box-shadow: 0 35px 100px rgba(0, 0, 0, .5);
}

.lightbox::backdrop {
    background: rgba(8, 11, 13, .9);
    backdrop-filter: blur(6px);
}

.lightbox figure {
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-rows: 1fr auto;
    margin: 0;
}

.lightbox figure img {
    width: 100%;
    height: 100%;
    min-height: 0;
    object-fit: contain;
}

.lightbox figcaption {
    min-height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 80px;
    color: rgba(255, 255, 255, .7);
    font-size: .8rem;
    text-align: center;
}

.lightbox__close,
.lightbox__nav {
    position: absolute;
    z-index: 3;
    display: grid;
    place-items: center;
    border: 0;
    background: rgba(20, 25, 28, .88);
    color: #fff;
    cursor: pointer;
}

.lightbox__close {
    top: 14px;
    right: 14px;
    width: 46px;
    height: 46px;
    font-size: 1.8rem;
    line-height: 1;
}

.lightbox__nav {
    top: 50%;
    width: 52px;
    height: 58px;
    font-size: 1.35rem;
    transform: translateY(-50%);
}

.lightbox__nav--prev { left: 14px; }
.lightbox__nav--next { right: 14px; }

.lightbox__close:hover,
.lightbox__nav:hover {
    background: var(--ardoise);
}

@media (max-width: 940px) {
    .portfolio-hero {
        min-height: 610px;
    }

    .portfolio-hero__content {
        grid-template-columns: 1fr;
        gap: 45px;
        padding-top: 180px;
        padding-bottom: 55px;
    }

    .portfolio-hero__summary {
        max-width: 520px;
    }

    .portfolio-index {
        top: 77px;
    }

    .portfolio-index__inner {
        align-items: flex-start;
        flex-direction: column;
        padding-top: 18px;
        padding-bottom: 18px;
    }

    .portfolio-filters {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 3px;
        scrollbar-width: thin;
    }

    .portfolio-filters button {
        flex: 0 0 auto;
    }

    .portfolio-project__header {
        grid-template-columns: 45px 1fr;
    }

    .portfolio-project__header > p {
        grid-column: 2;
    }

    .gallery-grid--twelve {
        grid-template-columns: repeat(3, 1fr);
        grid-auto-rows: 190px;
    }

    .gallery-grid--three {
        grid-auto-rows: 270px;
    }

    .gallery-grid--five {
        grid-template-rows: repeat(2, 230px);
    }
}

@media (max-width: 680px) {
    .portfolio-hero {
        min-height: 580px;
    }

    .portfolio-hero__image {
        background-position: 60% center;
    }

    .portfolio-hero__content {
        padding-top: 155px;
        padding-bottom: 45px;
    }

    .portfolio-hero h1 {
        font-size: clamp(2.6rem, 10.6vw, 4rem);
    }

    .portfolio-index {
        position: relative;
        top: auto;
    }

    .portfolio-index__inner > p {
        display: none;
    }

    .portfolio-list {
        padding-bottom: 65px;
    }

    .portfolio-project {
        padding: 70px 0;
    }

    .portfolio-project__header {
        grid-template-columns: 1fr;
        gap: 14px;
        margin-bottom: 30px;
    }

    .portfolio-project__number,
    .portfolio-project__header > p {
        grid-column: auto;
    }

    .portfolio-project__number {
        margin-bottom: 8px;
    }

    .gallery-grid,
    .gallery-grid--twelve,
    .gallery-grid--three,
    .gallery-grid--two,
    .gallery-grid--single,
    .gallery-grid--five {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-auto-rows: 185px;
        grid-template-rows: none;
        gap: 6px;
    }

    .gallery-grid--five .gallery-photo:first-child,
    .gallery-grid--single .gallery-photo {
        grid-column: span 2;
        grid-row: auto;
    }

    .gallery-grid--single .gallery-photo {
        height: 235px;
    }

    .gallery-photo > i {
        width: 34px;
        height: 34px;
        opacity: 1;
        transform: none;
    }

    .portfolio-cta__inner {
        align-items: stretch;
        flex-direction: column;
    }

    .lightbox {
        width: 100vw;
        height: 100dvh;
    }

    .lightbox figcaption {
        padding-inline: 55px;
    }

    .lightbox__nav {
        top: auto;
        bottom: 9px;
        width: 42px;
        height: 42px;
        transform: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .gallery-photo img {
        transition: none;
    }
}
