/* =========================
   RESET DE BASE
   ========================= */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    width: 100%;
    min-height: 100%;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: #000;
    color: #fff;
    font-family: Arial, Helvetica, sans-serif;
}


body.mobile-menu-open {
    overflow: hidden;
}

/* =========================
   HOMEPAGE
   ========================= */

.hero {
    position: relative;

    width: 100%;
    height: 100vh;
    min-height: 100vh;

    overflow: hidden;

    background-color: #000;
}

/* =========================
   IMAGE HERO
   ========================= */

.hero-background {
    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;

    overflow: hidden;

    z-index: 0;
}

.hero-image {
    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;

    object-fit: cover;
    object-position: center;

    opacity: 0;

    transition: opacity 2.3s ease-in-out;
}

.hero.is-nav-preview .hero-image {
    transition: opacity 0.6s ease-out;
}

.hero-image.is-visible {
    opacity: 1;
}

.hero-overlay {
    position: absolute;
    inset: 0;

    z-index: 1;

    pointer-events: none;

    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.28) 0%,
        rgba(0, 0, 0, 0.10) 15%,
        rgba(0, 0, 0, 0) 32%
    );
}


/* =========================
   HEADER
   ========================= */

.site-header {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 10;

    width: 100%;

    display: flex;
    justify-content: space-between;
    align-items: flex-start;

    padding: 38px 60px;
}


/* =========================
   IDENTITÉ
   ========================= */

.identity {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.name {
    color: #fff;
    text-decoration: none;

    font-size: 28px;
    font-weight: 800;

    letter-spacing: 0.06em;
    line-height: 1;
}

.role {
    margin-top: 9px;

    color: #fff;

    font-size: 11px;
    font-weight: 500;

    letter-spacing: 0.28em;
    line-height: 1;
}


/* =========================
   NAVIGATION
   ========================= */

.main-nav {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-item {
    position: relative;
}

.nav-link {
    position: relative;

    color: #fff;
    text-decoration: none;

    font-size: 12px;
    font-weight: 500;

    letter-spacing: 0.16em;

    text-transform: uppercase;

    line-height: 1;
}

.nav-dropdown-trigger {
    border: 0;
    padding: 0;

    background: transparent;

    font-family: inherit;

    cursor: pointer;
}

.nav-link::after {
    content: "";

    position: absolute;
    left: 0;
    bottom: -5px;

    width: 100%;
    height: 1px;

    background-color: #fff;

    transform: scaleX(0);
    transform-origin: right;

    transition: transform 0.25s ease;
}

.nav-link:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.nav-link.is-active::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* =========================
   DROPDOWN NAVIGATION
   ========================= */

.nav-dropdown {
    position: absolute;

    top: 100%;
    left: 0;

    min-width: max-content;

    padding-top: 14px;

    display: flex;
    flex-direction: column;
    align-items: flex-start;

    gap: 6px;

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transform: translateY(-5px);

    transition:
        opacity 0.25s ease,
        transform 0.25s ease,
        visibility 0.25s ease;
}

.has-dropdown:hover .nav-dropdown,
.has-dropdown:focus-within .nav-dropdown {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;

    transform: translateY(0);
}

.dropdown-link {
    position: relative;

    color: #fff;
    text-decoration: none;

    font-size: 10px;
    font-weight: 500;

    letter-spacing: 0.14em;

    text-transform: uppercase;

    line-height: 1;

    padding: 5px 0;

    opacity: 0.8;

    transition: opacity 0.2s ease;
}

.dropdown-link::after {
    content: "";

    position: absolute;

    left: 0;
    bottom: 1px;

    width: 100%;
    height: 1px;

    background-color: #fff;

    transform: scaleX(0);
    transform-origin: right;

    transition: transform 0.25s ease;
}

.dropdown-link:hover,
.dropdown-link:focus-visible {
    opacity: 1;
}

.dropdown-link:hover::after,
.dropdown-link:focus-visible::after {
    transform: scaleX(1);
    transform-origin: left;
}

.dropdown-link.is-active {
    opacity: 1;
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-thickness: 1px;
}


/* =========================
   INSTAGRAM
   ========================= */

.instagram-link {
    display: flex;
    align-items: center;
    justify-content: center;

    color: #fff;
    text-decoration: none;

    width: 20px;
    height: 20px;
}

.instagram-link svg {
    width: 18px;
    height: 18px;
}

/* =========================
   BOUTON MENU MOBILE
   ========================= */

.mobile-menu-toggle {
    display: none;
}

.mobile-menu {
    display: none;
}

/* =========================
   PAGE PORTFOLIO
   ========================= */

.portfolio-page {
    min-height: 100vh;
    background-color: #000;
}


/* =========================
   CONTENU PORTFOLIO
   ========================= */

.portfolio-content {
    width: 100%;

    padding:
        115px
        12px
        120px;
}


/* =========================
   NAVIGATION CATÉGORIES
   ========================= */

.portfolio-categories {
    position: sticky;
    top: 0;

    z-index: 8;

    display: flex;
    align-items: center;

    gap: 28px;

    padding: 18px 0 16px;

    margin-bottom: 28px;

    background-color: #000;

}

.portfolio-category-link {
    position: relative;

    color: #fff;
    text-decoration: none;

    font-size: 12px;
    font-weight: 500;

    letter-spacing: 0.16em;

    text-transform: uppercase;

    line-height: 1;
}

.portfolio-category-link::after {
    content: "";

    position: absolute;

    left: 0;
    bottom: -6px;

    width: 100%;
    height: 1px;

    background-color: #fff;

    transform: scaleX(0);
    transform-origin: left;

    transition: transform 0.35s ease;
}

.portfolio-category-link.is-active::after {
    transform: scaleX(1);
}

/* =========================
   SECTIONS PORTFOLIO
   ========================= */

.portfolio-section {
    margin-bottom: 0;

    scroll-margin-top: 90px;
}

.portfolio-section + .portfolio-section {
    padding-top: 28px;
}

.portfolio-section-title {
    display: flex;
    align-items: center;

    gap: 16px;

    margin-bottom: 18px;

    color: rgba(255, 255, 255, 0.78);

    font-size: 10px;
    font-weight: 500;

    letter-spacing: 0.18em;

    text-transform: uppercase;

    line-height: 1;

    white-space: nowrap;
}

.portfolio-section-title::after {
    content: "";

    flex: 1;

    height: 1px;

    background-color: rgba(255, 255, 255, 0.10);
}


/* =========================
   GRILLE DES PROJETS
   ========================= */

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));

    column-gap: 8px;
    row-gap: 8px;
}

.project-card {
    position: relative;

    display: block;

    color: #fff;
    text-decoration: none;
}

.project-image-wrapper {
    position: relative;

    width: 100%;

    aspect-ratio: 2.39 / 1;

    overflow: hidden;

    background-color: #111;
}

.project-image-wrapper::after {
    content: "";

    position: absolute;
    inset: 0;

    z-index: 1;

    background-color: rgba(0, 0, 0, 0.22);

    opacity: 1;

    pointer-events: none;

    transition: opacity 0.45s ease;
}

.project-card:hover .project-image {
    transform: scale(1.02);
}

.project-card:hover .project-image-wrapper::after {
    opacity: 0;
}

.project-card:hover .project-title {
    opacity: 0;
}

.project-image {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;

    transition: transform 0.5s ease;
}

.project-title {
    position: absolute;
    inset: 0;

    z-index: 2;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    gap: 4px;

    width: 100%;
    padding: 18px 6%;

    color: #fff;

    text-align: center;
    text-transform: uppercase;

    pointer-events: none;

    transition: opacity 0.35s ease;
}

.project-secondary {
    max-width: 90%;

    font-size: clamp(9px, 0.7vw, 12px);
    font-weight: 500;

    letter-spacing: 0.14em;

    line-height: 1.15;

    text-align: center;

    opacity: 0.82;
}

.project-main-title {
    font-size: clamp(22px, 1.8vw, 34px);
    font-weight: 900;

    letter-spacing: -0.045em;

    line-height: 0.92;

    text-wrap: balance;

    text-shadow:
        0 2px 18px rgba(0, 0, 0, 0.45);
}

.project-card:hover .project-image {
    transform: scale(1.02);
}

.project-card:hover .project-title {
    opacity: 0;
}

/* =========================
   MOBILE
   ========================= */

@media (max-width: 768px) {

/* =========================
MENU MOBILE OUVERT
========================= */

    .mobile-menu {
        position: fixed;
        inset: 0;

        z-index: 20;

        width: 100%;
        height: 100svh;

        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;

        background-color: rgba(0, 0, 0, 0.65);

        opacity: 0;
        visibility: hidden;
        pointer-events: none;

        transition:
            opacity 0.5s ease,
            visibility 0.5s ease;
    }

    .mobile-menu.is-open {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .mobile-menu-nav {
        display: flex;
        flex-direction: column;
        align-items: center;

        gap: 0px;

        transform: translateY(-3vh);
    }

    .mobile-menu-link {
        color: #fff;
        text-decoration: none;

        font-size: 21px;
        font-weight: 400;

        letter-spacing: 0.06em;

        text-transform: uppercase;

        line-height: 1;

        padding: 10px 16px;
    }

    .mobile-nav-group {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .mobile-nav-row {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .mobile-parent-toggle {
        display: flex;
        align-items: center;
        justify-content: center;

        gap: 10px;

        border: 0;
        padding: 10px 16px;

        background: transparent;
        color: #fff;

        font-family: inherit;
        font-size: 21px;
        font-weight: 400;

        letter-spacing: 0.06em;
        text-transform: uppercase;

        line-height: 1;

        cursor: pointer;
    }

    .mobile-submenu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;

        width: 36px;
        height: 36px;

        border: 0;
        padding: 0;

        background: transparent;
        color: #fff;

        cursor: pointer;
    }

    .mobile-submenu-icon {
        display: block;

        font-size: 20px;
        font-weight: 300;

        line-height: 1;

        transition: transform 0.3s ease;
    }

    .mobile-submenu {
    display: grid;

    grid-template-rows: 0fr;

    opacity: 0;

    transition:
        grid-template-rows 0.35s ease,
        opacity 0.35s ease;
}

.mobile-submenu-inner {
    overflow: hidden;

    display: flex;
    flex-direction: column;
    align-items: center;
}

.mobile-nav-group.is-open .mobile-submenu {
    grid-template-rows: 1fr;

    opacity: 1;
}

.mobile-submenu-link {
    color: #fff;
    text-decoration: none;

    font-size: 15px;
    font-weight: 400;

    letter-spacing: 0.08em;
    text-transform: uppercase;

    line-height: 1;

    opacity: 0.8;

    padding: 9px 16px;
}

.mobile-nav-group.is-open .mobile-submenu-icon {
    transform: rotate(45deg);
}

    .mobile-instagram-link {
        position: absolute;

        bottom: 36px;
        left: 50%;

        transform: translateX(-50%);

        display: flex;
        align-items: center;
        justify-content: center;

        width: 24px;
        height: 24px;

        color: #fff;
        text-decoration: none;
    }

    .mobile-instagram-link svg {
        width: 22px;
        height: 22px;
    }

    .hero {
        height: 100svh;
        min-height: 100svh;
    }

    .site-header {
        padding: 28px 24px;

        z-index: 30;
    }

    .name {
        font-size: 20px;
        letter-spacing: 0.04em;
    }

    .role {
        margin-top: 7px;

        font-size: 8px;
        letter-spacing: 0.24em;
    }

    .main-nav {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
        flex-direction: column;
        justify-content: center;

        gap: 8px;

        width: 36px;
        height: 30px;

        padding: 0;

        border: 0;
        background: transparent;

        cursor: pointer;
    }

    .mobile-menu-toggle span {
        display: block;

        width: 36px;
        height: 1.5px;

        background-color: #fff;

        transition: transform 0.35s ease;
    }

    .mobile-menu-toggle.is-open span:first-child {
        transform: translateY(4.75px) rotate(45deg);
    }

    .mobile-menu-toggle.is-open span:last-child {
        transform: translateY(-4.75px) rotate(-45deg);
    }

    .hero-image {
        object-position: center center;
    }

}

/* =========================
   PORTFOLIO — MOBILE
   ========================= */

@media (max-width: 768px) {

    .portfolio-page .portfolio-content {
        padding-top: 82px;
        padding-left: 8px;
        padding-right: 8px;
    }

    .portfolio-page .projects-grid {
        grid-template-columns: 1fr;
        column-gap: 0;
        row-gap: 8px;
    }

    .portfolio-page .portfolio-categories {
        top: 0;
        z-index: 20;

        gap: 24px;

        margin-bottom: 28px;
        padding: 14px 0 12px;

        overflow-x: auto;
        overflow-y: hidden;

        white-space: nowrap;

        background-color: #000;

        scrollbar-width: none;
    }

    .portfolio-page .portfolio-categories::-webkit-scrollbar {
        display: none;
    }

    .portfolio-page .portfolio-category-link {
        flex: 0 0 auto;

        font-size: 12px;
        letter-spacing: 0.14em;
    }

        .portfolio-page .portfolio-section-title {
        gap: 12px;
        margin-bottom: 12px;

        font-size: 10px;
        letter-spacing: 0.16em;
    }

    .portfolio-page .portfolio-section + .portfolio-section {
        padding-top: 24px;
    }

        .portfolio-page .project-title {
        padding: 14px 5%;
        gap: 4px;
    }

    .portfolio-page .project-main-title {
        font-size: clamp(22px, 6.6vw, 30px);
        line-height: 0.94;
    }

    .portfolio-page .project-secondary {
        max-width: 94%;

        font-size: 10px;
        letter-spacing: 0.12em;
        line-height: 1.2;
    }

}

/* =========================
   PROJECT DETAIL PAGE
   ========================= */

.project-page {
    background-color: #000;
    color: #fff;
}


/* =========================
   PROJECT CONTENT
   ========================= */

.project-content {
    width: 100%;

    padding:
        145px
        48px
        100px;
}

.project-detail {
    width: 100%;
    max-width: 1480px;

    margin: 0 auto;
}


/* =========================
   BACK LINK
   ========================= */

.project-back-link {
    display: inline-block;

    margin-bottom: 42px;

    color: rgba(255, 255, 255, 0.65);

    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.16em;

    text-decoration: none;
    text-transform: uppercase;

    transition:
        color 0.25s ease,
        opacity 0.25s ease;
}

.project-back-link:hover {
    color: #fff;
}


/* =========================
   PROJECT HEADING
   ========================= */

.project-detail-header {
    margin-bottom: 28px;
}

.project-heading-line {
    display: flex;
    align-items: center;

    width: 100%;

    gap: 16px;
}

.project-detail-title {
    flex: 0 0 auto;

    margin: 0;

    font-size: clamp(14px, 1.1vw, 18px);
    font-weight: 800;

    line-height: 1;
    letter-spacing: -0.01em;

    text-transform: uppercase;
}

.project-detail-secondary {
    flex: 0 0 auto;

    margin: 0;

    color: rgba(255, 255, 255, 0.55);

    font-size: clamp(9px, 0.7vw, 11px);
    font-weight: 500;

    line-height: 1;
    letter-spacing: 0.14em;

    text-transform: uppercase;
}

.project-heading-rule {
    flex: 1;

    min-width: 40px;
    height: 1px;

    background-color: rgba(255, 255, 255, 0.12);
}


/* =========================
   PROJECT GALLERY
   ========================= */

.project-gallery {
    position: relative;

    width: 100%;

    /*
        Hauteur temporaire.

        Elle donne au navigateur une vraie
        distance VERTICALE à parcourir.

        project.js calculera ensuite
        automatiquement la hauteur exacte.
    */

    height: var(
        --project-gallery-height,
        320vh
    );
}

.project-gallery-track {
    display: flex;
    align-items: center;

    width: max-content;

    gap: 10px;

    transform: translate3d(0, 0, 0);

    will-change: transform;
}

/* FUTURES SLIDES */

.project-gallery-sticky {
    position: sticky;

    top: 96px;

    display: flex;
    flex-direction: column;
    justify-content: center;

    width: 100%;
    min-height: calc(100vh - 120px);

    overflow: hidden;
}

.project-gallery-viewport {
    width: 100%;

    overflow: hidden;
}

.project-gallery-slide {
    flex: 0 0 min(82vw, 1280px);

    display: flex;
    align-items: center;
    justify-content: center;
}

.project-gallery-slide img,
.project-gallery-slide video {
    display: block;

    width: auto;
    height: auto;

    max-width: 100%;
    max-height: 68vh;

    object-fit: contain;

    border: 0;
}

.project-video-frame {
    width: 100%;
    max-width: 121vh;

    aspect-ratio: 16 / 9;

    overflow: hidden;
    background-color: #000;
}

.project-gallery-slide iframe,
.project-vimeo-player {
    display: block;

    width: 100%;
    height: 100%;

    border: 0;
}

.project-gallery-slide img[role="button"] {
    cursor: pointer;
}


/* =========================
   GALLERY INDICATOR
   ========================= */

.project-gallery-navigation {
    display: flex;
    align-items: center;

    gap: 18px;

    margin-top: 16px;
}

.project-gallery-progress {
    position: relative;

    flex: 1;

    height: 1px;

    overflow: hidden;

    background-color:
        rgba(255, 255, 255, 0.14);
}

.project-gallery-progress-bar {
    position: absolute;

    top: 0;
    left: 0;

    width: 100%;
    height: 100%;

    background-color: #fff;

    transform: scaleX(0);
    transform-origin: left center;

    transition: transform 0.2s ease;
}

.project-gallery-counter {
    flex: 0 0 auto;

    margin: 0;

    color: rgba(255, 255, 255, 0.65);

    font-size: 9px;
    font-weight: 500;

    line-height: 1;
    letter-spacing: 0.12em;
}


/* =========================
   PROJECT DETAILS
   ========================= */

.project-details {
    margin-top: 88px;
}

/* =========================
   PROJECT NAVIGATION
   ========================= */

/*
    Ancien bloc Next Project :
    project.js le retire automatiquement.
    Cette règle évite tout flash avant le JS.
*/
.project-next {
    display: none;
}

.project-navigation {
    display: grid;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 32px;

    margin-top: 96px;
    padding-top: 22px;

    border-top:
        1px solid rgba(255, 255, 255, 0.10);
}

.project-navigation-side {
    min-width: 0;

    display: flex;
}

.project-navigation-side--previous {
    justify-content: flex-start;
}

.project-navigation-side--next {
    justify-content: flex-end;
}

.project-navigation-side.is-empty {
    pointer-events: none;
}

.project-navigation-item {
    display: flex;
    flex-direction: column;

    width: fit-content;
    max-width: 100%;

    gap: 14px;

    color: #fff;
    text-decoration: none;
}

.project-navigation-item--previous {
    align-items: flex-start;
    text-align: left;
}

.project-navigation-item--next {
    align-items: flex-end;
    text-align: right;
}

.project-navigation-label {
    color: rgba(255, 255, 255, 0.42);

    font-size: 9px;
    font-weight: 500;

    line-height: 1;
    letter-spacing: 0.18em;

    text-transform: uppercase;
}

.project-navigation-main {
    display: flex;
    align-items: center;

    max-width: 100%;

    gap: 14px;
}

.project-navigation-title {
    min-width: 0;

    font-size: clamp(13px, 1vw, 16px);
    font-weight: 700;

    line-height: 1.15;
    letter-spacing: 0.02em;

    text-transform: uppercase;
}

.project-navigation-arrow {
    flex: 0 0 auto;

    color: rgba(255, 255, 255, 0.45);

    font-size: 16px;
    font-weight: 300;

    line-height: 1;

    transition:
        transform 0.3s ease,
        color 0.3s ease;
}

.project-navigation-item--previous:hover
.project-navigation-arrow {
    transform: translateX(-5px);
    color: #fff;
}

.project-navigation-item--next:hover
.project-navigation-arrow {
    transform: translateX(5px);
    color: #fff;
}

@media (max-width: 768px) {

    .project-navigation {
        gap: 16px;

        margin-top: 64px;
        padding-top: 18px;
    }

    .project-navigation-item {
        gap: 12px;
    }

    .project-navigation-label {
        font-size: 8px;
        letter-spacing: 0.14em;
    }

    .project-navigation-main {
        gap: 8px;
    }

    .project-navigation-title {
        font-size: 13px;
        line-height: 1.2;
    }

    .project-navigation-arrow {
        font-size: 16px;
    }

}

/* =========================
   SECTION TITLE
   ========================= */

.project-details-title,
.project-crew-title {
    display: flex;
    align-items: center;

    width: 100%;

    gap: 16px;

    margin: 0 0 30px;

    color: rgba(255, 255, 255, 0.72);

    font-size: 10px;
    font-weight: 500;

    line-height: 1;
    letter-spacing: 0.18em;

    text-transform: uppercase;
}


.project-details-title::after,
.project-crew-title::after {
    content: "";

    flex: 1;

    height: 1px;

    background-color:
        rgba(255, 255, 255, 0.10);
}


/* =========================
   DETAILS GRID
   ========================= */

.project-details-grid {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    column-gap: 36px;
    row-gap: 34px;
}


/* =========================
   DETAIL ITEM
   ========================= */

.project-detail-item {
    min-width: 0;
}


.project-detail-label {
    margin: 0 0 8px;

    color: rgba(255, 255, 255, 0.42);

    font-size: 9px;
    font-weight: 500;

    line-height: 1;
    letter-spacing: 0.16em;

    text-transform: uppercase;
}


.project-detail-value {
    margin: 0;

    color: rgba(255, 255, 255, 0.92);

    font-size: clamp(12px, 0.9vw, 15px);
    font-weight: 500;

    line-height: 1.35;
    letter-spacing: 0.01em;
}


/* =========================
   KEY CREW
   ========================= */

.project-crew {
    margin-top: 64px;
}


.project-crew-grid {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    column-gap: 36px;
    row-gap: 34px;
}


/* =========================
   PROJECT DETAILS — MOBILE
   ========================= */

@media (max-width: 768px) {

    .project-details {
        margin-top: 56px;
    }


    .project-details-title,
    .project-crew-title {
        gap: 12px;

        margin-bottom: 24px;

        font-size: 9px;
    }


    .project-details-grid,
    .project-crew-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        column-gap: 20px;
        row-gap: 28px;
    }


    .project-crew {
        margin-top: 48px;
    }


    .project-detail-label {
        margin-bottom: 7px;

        font-size: 8px;
    }


    .project-detail-value {
        font-size: 12px;
    }

}

/* =========================
   PROJECT LIGHTBOX
   ========================= */

.project-lightbox {
    position: fixed;
    inset: 0;

    z-index: 1000;

    display: flex;
    align-items: center;
    justify-content: center;

    padding:
        28px
        64px
        46px;

    background-color: rgba(0, 0, 0, 0.985);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transition:
        opacity 0.3s ease,
        visibility 0.3s ease;
}


/* =========================
   LIGHTBOX OPEN
   ========================= */

.project-lightbox.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}


/* =========================
   LOCK PAGE
   ========================= */

body.lightbox-open {
    overflow: hidden;
}


/* =========================
   MEDIA
   ========================= */

.project-lightbox-media {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    height: 100%;
}


.project-lightbox-image {
    display: block;

    width: auto;
    height: auto;

    max-width: calc(100vw - 160px);
    max-height: calc(100vh - 110px);

    object-fit: contain;

    user-select: none;
}


/* =========================
   CLOSE
   ========================= */

.project-lightbox-close {
    position: absolute;

    top: 22px;
    right: 26px;

    z-index: 2;

    padding: 8px;

    border: 0;

    background: none;

    color: rgba(255, 255, 255, 0.5);

    font: inherit;
    font-size: 23px;
    font-weight: 300;
    line-height: 1;

    cursor: pointer;

    transition:
        color 0.25s ease,
        opacity 0.25s ease;
}


.project-lightbox-close:hover {
    color: #fff;
}


/* =========================
   ARROWS
   ========================= */

.project-lightbox-arrow {
    position: absolute;

    top: 50%;

    z-index: 2;

    transform: translateY(-50%);

    padding: 18px;

    border: 0;

    background: none;

    color: rgba(255, 255, 255, 0.32);

    font: inherit;
    font-size: 20px;
    font-weight: 300;
    line-height: 1;

    cursor: pointer;

    transition:
        color 0.25s ease,
        transform 0.25s ease;
}


.project-lightbox-arrow:hover {
    color: rgba(255, 255, 255, 0.95);
}


.project-lightbox-arrow-left {
    left: 18px;
}


.project-lightbox-arrow-right {
    right: 18px;
}


/* =========================
   COUNTER
   ========================= */

.project-lightbox-counter {
    position: absolute;

    left: 50%;
    bottom: 22px;

    transform: translateX(-50%);

    margin: 0;

    color: rgba(255, 255, 255, 0.42);

    font-size: 9px;
    font-weight: 500;

    line-height: 1;
    letter-spacing: 0.18em;

    white-space: nowrap;
}


/* =========================
   MOBILE
   ========================= */

@media (max-width: 768px) {

    .project-lightbox {
        padding:
            52px
            12px
            48px;
    }


    .project-lightbox-image {
        max-width: calc(100vw - 24px);
        max-height: calc(100vh - 110px);
    }


    .project-lightbox-close {
        top: 12px;
        right: 12px;
    }


    .project-lightbox-arrow {
        padding: 12px;

        font-size: 18px;
    }


    .project-lightbox-arrow-left {
        left: 0;
    }


    .project-lightbox-arrow-right {
        right: 0;
    }


    .project-lightbox-counter {
        bottom: 16px;
    }

}

/* =========================
   PROJECT PAGE — MOBILE
   ========================= */

@media (max-width: 768px) {

    .project-content {
        padding:
            110px
            8px
            72px;
    }


    .project-back-link {
        margin-bottom: 28px;

        font-size: 9px;
    }


    .project-detail-header {
        margin-bottom: 18px;
    }


    .project-heading-line {
        gap: 10px;
    }


    .project-detail-title {
        font-size: 14px;
    }


    .project-detail-secondary {
        font-size: 8px;

        letter-spacing: 0.12em;
    }


    .project-heading-rule {
        min-width: 18px;
    }


    /* =========================
       GALLERY MOBILE
       ========================= */

    .project-gallery-sticky {
        top: 78px;

        min-height:
            calc(100svh - 96px);
    }


    .project-gallery-slide {
        flex-basis: 92vw;
    }


    .project-gallery-slide img,
    .project-gallery-slide video {
        max-height: 62svh;
    }

    .project-video-frame {
        max-width: 110svh;
    }


    .project-gallery-navigation {
        gap: 12px;

        margin-top: 12px;
    }

}

/* =========================
   TABLET / FOLDABLE
   769px → 1024px
   ========================= */

@media (min-width: 769px) and (max-width: 1024px) {

    /* =========================
       HEADER / MENU
       ========================= */

    .site-header {
        padding: 30px 32px;
        z-index: 30;
    }

    .name {
        font-size: 23px;
        letter-spacing: 0.045em;
    }

    .role {
        margin-top: 8px;
        font-size: 9px;
        letter-spacing: 0.24em;
    }

    .main-nav {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 8px;

        width: 36px;
        height: 30px;
        padding: 0;

        border: 0;
        background: transparent;
        cursor: pointer;
    }

    .mobile-menu-toggle span {
        display: block;
        width: 36px;
        height: 1.5px;
        background-color: #fff;
        transition: transform 0.35s ease;
    }

    .mobile-menu-toggle.is-open span:first-child {
        transform: translateY(4.75px) rotate(45deg);
    }

    .mobile-menu-toggle.is-open span:last-child {
        transform: translateY(-4.75px) rotate(-45deg);
    }

    .mobile-menu {
        position: fixed;
        inset: 0;
        z-index: 20;

        width: 100%;
        height: 100svh;

        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;

        background-color: rgba(0, 0, 0, 0.72);

        opacity: 0;
        visibility: hidden;
        pointer-events: none;

        transition:
            opacity 0.5s ease,
            visibility 0.5s ease;
    }

    .mobile-menu.is-open {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .mobile-menu-nav {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0;
        transform: translateY(-2vh);
    }

    .mobile-menu-link {
        color: #fff;
        text-decoration: none;

        font-size: 24px;
        font-weight: 400;
        letter-spacing: 0.06em;
        text-transform: uppercase;
        line-height: 1;

        padding: 11px 18px;
    }

    .mobile-nav-group {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .mobile-nav-row {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .mobile-parent-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;

        border: 0;
        padding: 11px 18px;

        background: transparent;
        color: #fff;

        font-family: inherit;
        font-size: 24px;
        font-weight: 400;
        letter-spacing: 0.06em;
        text-transform: uppercase;
        line-height: 1;

        cursor: pointer;
    }

    .mobile-submenu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;

        width: 38px;
        height: 38px;
        padding: 0;

        border: 0;
        background: transparent;
        color: #fff;

        cursor: pointer;
    }

    .mobile-submenu-icon {
        display: block;
        font-size: 21px;
        font-weight: 300;
        line-height: 1;
        transition: transform 0.3s ease;
    }

    .mobile-submenu {
        display: grid;
        grid-template-rows: 0fr;
        opacity: 0;

        transition:
            grid-template-rows 0.35s ease,
            opacity 0.35s ease;
    }

    .mobile-submenu-inner {
        overflow: hidden;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .mobile-nav-group.is-open .mobile-submenu {
        grid-template-rows: 1fr;
        opacity: 1;
    }

    .mobile-nav-group.is-open .mobile-submenu-icon {
        transform: rotate(45deg);
    }

    .mobile-submenu-link {
        color: #fff;
        text-decoration: none;

        font-size: 16px;
        font-weight: 400;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        line-height: 1;

        opacity: 0.8;
        padding: 9px 18px;
    }

    .mobile-instagram-link {
        position: absolute;
        bottom: 34px;
        left: 50%;

        transform: translateX(-50%);

        display: flex;
        align-items: center;
        justify-content: center;

        width: 26px;
        height: 26px;

        color: #fff;
        text-decoration: none;
    }

    .mobile-instagram-link svg {
        width: 23px;
        height: 23px;
    }

    /* =========================
       PORTFOLIO
       ========================= */

    .portfolio-page .portfolio-content {
        padding-top: 102px;
        padding-left: 10px;
        padding-right: 10px;
    }

    .portfolio-page .projects-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 8px;
        row-gap: 8px;
    }

    .portfolio-page .portfolio-categories {
        gap: 26px;
        margin-bottom: 26px;
        padding-top: 16px;
        padding-bottom: 14px;
    }

    .portfolio-page .portfolio-category-link {
        font-size: 11px;
        letter-spacing: 0.15em;
    }

    .portfolio-page .portfolio-section-title {
        gap: 14px;
        margin-bottom: 14px;
        font-size: 10px;
        letter-spacing: 0.17em;
    }

    .portfolio-page .portfolio-section + .portfolio-section {
        padding-top: 26px;
    }

    .portfolio-page .project-title {
        padding: 16px 5%;
        gap: 4px;
    }

    .portfolio-page .project-main-title {
        font-size: clamp(23px, 3vw, 30px);
        line-height: 0.94;
    }

    .portfolio-page .project-secondary {
        max-width: 94%;
        font-size: 10px;
        letter-spacing: 0.12em;
        line-height: 1.2;
    }

    /* =========================
       PROJECT PAGE
       ========================= */

    .project-content {
        padding:
            120px
            24px
            88px;
    }

    .project-back-link {
        margin-bottom: 34px;
        font-size: 9px;
    }

    .project-detail-header {
        margin-bottom: 22px;
    }

    .project-heading-line {
        gap: 12px;
    }

    .project-detail-title {
        font-size: 15px;
    }

    .project-detail-secondary {
        font-size: 9px;
        letter-spacing: 0.12em;
    }

    .project-heading-rule {
        min-width: 24px;
    }

    .project-gallery-sticky {
        top: 88px;
        min-height: calc(100svh - 110px);
    }

    .project-gallery-slide {
        flex-basis: 88vw;
    }

    .project-gallery-slide img,
    .project-gallery-slide video {
        max-height: 65svh;
    }

    .project-video-frame {
        max-width: 116svh;
    }

    .project-gallery-navigation {
        gap: 14px;
        margin-top: 14px;
    }

    .project-details {
        margin-top: 72px;
    }

    .project-details-title,
    .project-crew-title {
        gap: 14px;
        margin-bottom: 26px;
        font-size: 9px;
    }

    .project-details-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 28px;
        row-gap: 30px;
    }

    .project-crew-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        column-gap: 24px;
        row-gap: 28px;
    }

    .project-detail-value {
        font-size: 13px;
    }

    .project-navigation {
        gap: 24px;
        margin-top: 76px;
        padding-top: 20px;
    }

    .project-navigation-label {
        font-size: 8px;
        letter-spacing: 0.15em;
    }

    .project-navigation-main {
        gap: 10px;
    }

    .project-navigation-title {
        font-size: clamp(12px, 1.5vw, 15px);
        line-height: 1.2;
    }

    .project-navigation-arrow {
        font-size: 16px;
    }

    /* =========================
       LIGHTBOX
       ========================= */

    .project-lightbox {
        padding:
            36px
            48px
            44px;
    }

    .project-lightbox-image {
        max-width: calc(100vw - 120px);
        max-height: calc(100vh - 100px);
    }

    .project-lightbox-arrow-left {
        left: 8px;
    }

    .project-lightbox-arrow-right {
        right: 8px;
    }
}



/* =========================
   ACCESSIBILITÉ / POLISH
   ========================= */

a:focus-visible,
button:focus-visible {
    outline: 1px solid currentColor;
    outline-offset: 5px;
}

@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}


/* =========================
   MOBILE PROJECT STABILITY PATCH
   ========================= */

.project-video-frame {
    position: relative;
}

.project-video-fullscreen {
    position: absolute;
    top: 10px;
    right: 10px;

    z-index: 5;

    padding: 8px 10px;

    border:
        1px solid
        rgba(255, 255, 255, 0.28);

    background-color:
        rgba(0, 0, 0, 0.62);

    color: #fff;

    font: inherit;
    font-size: 8px;
    font-weight: 600;

    line-height: 1;
    letter-spacing: 0.12em;
    text-transform: uppercase;

    cursor: pointer;

    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

.project-video-frame:fullscreen,
.project-video-frame:-webkit-full-screen {
    width: 100vw;
    max-width: none;
    height: 100vh;

    aspect-ratio: auto;

    background: #000;
}

.project-video-frame:fullscreen .project-vimeo-player,
.project-video-frame:-webkit-full-screen .project-vimeo-player {
    width: 100%;
    height: 100%;
}

@media (max-width: 768px),
       (max-height: 560px) and (orientation: landscape) and (pointer: coarse) {

    .project-gallery {
        height: auto !important;

        margin-top: 8px;
    }

    .project-gallery-sticky {
        position: relative;

        top: auto;

        display: block;

        min-height: 0;

        overflow: visible;
    }

    .project-gallery-viewport {
        overflow-x: auto;
        overflow-y: hidden;

        scroll-snap-type: x mandatory;
        overscroll-behavior-x: contain;

        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .project-gallery-viewport::-webkit-scrollbar {
        display: none;
    }

    .project-gallery-track {
        gap: 8px;

        transform: none !important;

        will-change: auto;
    }

    .project-gallery-slide {
        flex-basis: calc(100vw - 16px);

        scroll-snap-align: center;
        scroll-snap-stop: always;
    }

    .project-gallery-slide img,
    .project-gallery-slide video {
        max-height: 72dvh;
    }

    .project-video-frame {
        width: calc(100vw - 16px);
        max-width: none;

        aspect-ratio: 16 / 9;
    }

    .project-gallery-navigation {
        margin-top: 10px;
    }

    .project-details {
        margin-top: 54px;
    }

    .project-lightbox {
        width: 100dvw;
        height: 100dvh;

        padding:
            max(14px, env(safe-area-inset-top))
            max(12px, env(safe-area-inset-right))
            max(18px, env(safe-area-inset-bottom))
            max(12px, env(safe-area-inset-left));
    }

    .project-lightbox-media {
        width: 100%;
        height: 100%;

        touch-action: pan-y;
    }

    .project-lightbox-image {
        max-width: calc(100dvw - 24px);
        max-height: calc(100dvh - 86px);
    }

    .project-lightbox-close {
        top: max(8px, env(safe-area-inset-top));
        right: max(8px, env(safe-area-inset-right));

        z-index: 6;

        padding: 10px;
    }

    .project-lightbox-arrow {
        z-index: 6;

        display: flex;
        align-items: center;
        justify-content: center;

        width: 40px;
        height: 40px;

        padding: 0;

        border-radius: 999px;

        background-color:
            rgba(0, 0, 0, 0.58);

        color:
            rgba(255, 255, 255, 0.92);

        font-size: 18px;

        -webkit-backdrop-filter: blur(7px);
        backdrop-filter: blur(7px);
    }

    .project-lightbox-arrow-left {
        left: max(6px, env(safe-area-inset-left));
    }

    .project-lightbox-arrow-right {
        right: max(6px, env(safe-area-inset-right));
    }

    .project-lightbox-counter {
        bottom: max(10px, env(safe-area-inset-bottom));
    }
}

@media
    (min-width: 769px)
    and (max-height: 560px)
    and (orientation: landscape)
    and (pointer: coarse) {

    .project-gallery-slide {
        flex-basis: calc(100vw - 48px);
    }

    .project-video-frame {
        width: calc(100vw - 48px);
    }

    .project-gallery-slide img,
    .project-gallery-slide video {
        max-height: 78dvh;
    }

    .project-lightbox-image {
        max-width: calc(100dvw - 96px);
        max-height: calc(100dvh - 28px);
    }

    .project-lightbox-counter {
        bottom: max(6px, env(safe-area-inset-bottom));
    }
}

/* === JDS TARGETED MOBILE ICON FIX START === */

html {
    color-scheme: dark;
    background-color: #000;
}

@media (max-width: 1024px) {
    .mobile-menu {
        background-color: rgba(0, 0, 0, 0.94) !important;
        color: #fff !important;
        color-scheme: dark;
    }

    .mobile-menu-link,
    .mobile-parent-toggle,
    .mobile-submenu-toggle,
    .mobile-submenu-link,
    .mobile-instagram-link {
        color: #fff !important;
        -webkit-text-fill-color: #fff;
    }

    .mobile-parent-toggle,
    .mobile-submenu-toggle,
    .mobile-menu-toggle {
        -webkit-appearance: none;
        appearance: none;
    }
}

/* PROFILE: Selected Work / Full Credits */
.profile-page .profile-text-link span[aria-hidden="true"] {
    position: relative;
    display: inline-block;
    width: 11px;
    height: 11px;
    flex: 0 0 11px;
    font-size: 0;
    transition: transform 0.25s ease;
}

.profile-page .profile-text-link span[aria-hidden="true"]::before {
    content: "";
    position: absolute;
    top: 1px;
    right: 0;
    width: 7px;
    height: 7px;
    border-top: 1px solid currentColor;
    border-right: 1px solid currentColor;
}

.profile-page .profile-text-link span[aria-hidden="true"]::after {
    content: "";
    position: absolute;
    top: 5px;
    left: 0;
    width: 10px;
    height: 1px;
    background: currentColor;
    transform: rotate(-45deg);
    transform-origin: center;
}

.profile-page .profile-text-link:hover span[aria-hidden="true"] {
    transform: translate(3px, -3px);
}

/* VIMEO FULLSCREEN ONLY */
.project-video-fullscreen {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
}

.project-video-fullscreen::after {
    content: "";
    position: relative;
    width: 8px;
    height: 8px;
    border-top: 1px solid currentColor;
    border-right: 1px solid currentColor;
    flex: 0 0 8px;
}

.project-video-fullscreen::before {
    content: "";
    position: absolute;
    width: 9px;
    height: 1px;
    right: 9px;
    background: currentColor;
    transform: translate(-2px, 2px) rotate(-45deg);
    transform-origin: center;
}

/*
   Deliberately no override for:
   .project-lightbox-arrow
   .project-navigation-arrow
   Their original arrows stay intact.
*/

/* === JDS TARGETED MOBILE ICON FIX END === */

/* === JDS FULLSCREEN CORNERS ICON START === */

/*
   Clear fullscreen icon:
   two opposite "expand" corners instead of a diagonal arrow.
   More recognisable on mobile and fully CSS-based.
*/

.project-video-fullscreen {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding-right: 12px;
}

/* top-right corner */
.project-video-fullscreen::before {
    content: "";
    position: relative;

    width: 7px;
    height: 7px;

    right: auto;
    top: auto;

    flex: 0 0 7px;

    background: none;

    border-top: 1.5px solid currentColor;
    border-right: 1.5px solid currentColor;

    transform: translate(2px, -2px);
}

/* bottom-left corner */
.project-video-fullscreen::after {
    content: "";
    position: absolute;

    width: 7px;
    height: 7px;

    right: 11px;
    bottom: 10px;

    flex: none;

    background: none;

    border: 0;
    border-left: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;

    transform: none;
}

@media (max-width: 768px) {
    .project-video-fullscreen {
        gap: 7px;
        padding-right: 12px;
    }

    .project-video-fullscreen::before,
    .project-video-fullscreen::after {
        width: 7px;
        height: 7px;
    }
}

/* === JDS FULLSCREEN CORNERS ICON END === */

/* === JDS FULLSCREEN SVG ICON START === */

/*
   Final fullscreen icon.
   Uses an inline SVG instead of Unicode or CSS pseudo-elements.
   This keeps the icon crisp and identical across browsers/devices.
*/

.project-video-fullscreen {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
}

/* Kill every older fullscreen pseudo-icon cleanly. */
.project-video-fullscreen::before,
.project-video-fullscreen::after {
    content: none !important;
    display: none !important;
}

.project-video-fullscreen-label {
    display: block;
}

.project-video-fullscreen-icon {
    display: block;
    width: 13px;
    height: 13px;
    flex: 0 0 13px;
    color: currentColor;
    overflow: visible;
}

@media (max-width: 768px) {
    .project-video-fullscreen {
        gap: 7px;
    }

    .project-video-fullscreen-icon {
        width: 14px;
        height: 14px;
        flex-basis: 14px;
    }
}

/* === JDS FULLSCREEN SVG ICON END === */
