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

:root {
    --blue: rgb(102, 124, 166);
    --purple: rgb(161, 136, 162);
    --light-blue: rgb(118, 153, 184);
    --light: rgb(235, 234, 230);
    --dark: rgb(25, 29, 38);
    --muted: rgb(91, 100, 117);
    --page-padding: clamp(25px, 3vw, 55px);
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    scrollbar-width: none;
}

html::-webkit-scrollbar {
    display: none;
}

body {
    font-family: "Inter", Arial, sans-serif;
    background: var(--light);
    color: var(--dark);
}

.project-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 20;
    padding: 22px var(--page-padding);
    display: flex;
    justify-content: space-between;
    align-items: center;
    mix-blend-mode: difference;
}

.project-logo {
    width: 50px;
    height: 50px;
    display: block;
}

.project-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: filter .3s ease;
}

.project-logo:hover img {
    filter: drop-shadow(0 0 5px var(--light))
        drop-shadow(0 0 14px var(--light));
}

.project-header.over-light-content .project-logo:hover img {
    filter: drop-shadow(0 0 5px rgb(85, 85, 85))
        drop-shadow(0 0 14px rgb(85, 85, 85));
}

.project-back {
    color: var(--light);
    text-decoration: none;
    font-size: clamp(9px, 0.75vw, 12px);
    font-weight: 700;
    letter-spacing: .1em;
    transition: text-shadow .3s ease;
}

.project-back:hover {
    text-shadow: 0 0 5px currentColor,
        0 0 14px currentColor;
}

.project-header.over-light-content .project-back:hover {
    text-shadow: 0 0 5px rgb(85, 85, 85),
        0 0 14px rgb(85, 85, 85);
}

.project-hero {
    width: 100%;
    height: 50vh;
    min-height: 360px;
    max-height: 760px;
    background: var(--light-blue);
    border: none;
    padding: 0;
    display: block;
}

.project-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.project-content {
    padding: 70px var(--page-padding) 0;
    width: 80%;
    max-width: 1700px;
    margin: 0 auto;
}

.project-meta-block {
    margin-bottom: 70px;
}

.project-title {
    font-size: clamp(40px, 5vw, 78px);
    line-height: .95;
    letter-spacing: -.04em;
    font-weight: 500;
    margin-bottom: 30px;
}



.project-facts {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
    border-top: 1px solid rgba(25, 29, 38, .15);
    padding-top: 18px;
}

.project-fact {
    display: flex;
    flex-direction: column;
}



.project-fact-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .3em;
    color: var(--muted);
    margin-bottom: 7px;
}

.project-fact-value {
    font-size: 14px;
}


.project-info-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
    grid-column: 1 / -1;
    margin-top: 20px;
}

.project-team-wrapper {
    width: fit-content;
    text-align: left;
    margin-top: 0;
}

.project-photography-wrapper {
    width: fit-content;
    margin-top: 0;
    margin-left: auto;
    margin-right: 0;
    text-align: right;
}

.project-team {
    margin-top: 10px;
    display: grid;
    grid-template-columns: max-content max-content;
    justify-content: end;
    column-gap: 30px;
    row-gap: 8px;
}

.project-photography {
    margin-top: 10px;
    /*
    display: grid;
    grid-template-columns: max-content max-content;
    column-gap: 30px;
    */
}


.project-showcase {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: auto;
    grid-auto-rows: clamp(100px, 17vw, 280px);
    gap: 26px;
    grid-auto-flow: dense;
}

.project-description {
    grid-column: 1 / -1;
    max-width: none;
}

.project-description p {
    font-size: 20px;
    line-height: 1.5;
    margin-bottom: 18px;
    text-align: justify;
}

.awards {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    align-items: center;
    margin-top: 10px;
    margin-bottom: 25px;
}

.awards img {
    width: 100%;
    height: 100px;
    object-fit: contain;
    display: block;
}

.project-gallery-item {
    display: block;
    overflow: hidden;
    background: var(--light-blue);
    cursor: zoom-in;
}

.project-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .35s ease;
}

.project-gallery-item:hover img {
    transform: scale(1.02);
}

.gallery-start {
    grid-column: auto;
    grid-row: auto;
}

.size-large {
    grid-column: span 2;
    grid-row: span 2;
}

.size-wide {
    grid-column: span 2;
}

/* height is purely grid-driven: 2 × short-row height + gap ≈ portrait */
.size-tall {
    grid-row: span 2;
}

/* ==========================================================
   PROJECT FOOTER
========================================================== */


.contact-footer {
    width: 100%;
    max-width: 1500px;
    margin: 20px auto 0;
    padding: 20px var(--page-padding) 18px;
    border-top: 1px solid rgba(25, 29, 38, .2);

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

    font-size: 11px;
    color: rgba(25, 29, 38, .65);
}


.contact-footer-left,
.contact-footer-right {
    display: flex;
    gap: 30px;
}

.contact-footer a {
    color: var(--dark);
    text-decoration: none;
    transition: opacity .3s ease, text-shadow .3s ease;
}

.contact-footer a:hover {
    opacity: .6;
    text-shadow:
        0 0 5px currentColor,
        0 0 14px currentColor;
}

.contact-footer a img {
    width: 14px;
    height: 14px;
    display: block;
}


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

.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(25, 29, 38, .96);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox[hidden] {
    display: none;
}

.lightbox-image-wrap {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 70px clamp(16px, 3vw, 40px);
}

.lightbox-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: 22px;
    right: 22px;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(235, 234, 230, .4);
    border-radius: 50%;
    background: rgba(25, 29, 38, .6);
    color: var(--light);
    font-size: 24px;
    cursor: pointer;
    z-index: 4;
}

.lightbox-hit {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 50%;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 2;
}

.lightbox-hit--left {
    left: 0;
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cpath d='M20 4 L8 16 L20 28' fill='none' stroke='white' stroke-width='5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") 16 16, auto;
}

.lightbox-hit--right {
    right: 0;
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cpath d='M12 4 L24 16 L12 28' fill='none' stroke='white' stroke-width='5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") 16 16, auto;
}

body.lightbox-open {
    overflow: hidden;
}

@media (max-width: 820px) {
    .project-facts {
        grid-template-columns: repeat(2, minmax(130px, 1fr));
    }

    .project-showcase {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: clamp(80px, 25vw, 180px);
    }

    .project-description {
        grid-column: 1 / -1;
        grid-row: auto;
        max-width: none;
    }

    .gallery-start,
    .size-large,
    .size-wide,
    .size-tall,
    .size-small {
        grid-column: auto;
        grid-row: auto;
    }
}

@media (max-width: 650px), (hover: none) and (orientation: landscape) and (max-height: 600px) {
    .project-header {
        height: 70px;
        padding: 0 var(--page-padding);
    }

    .project-logo {
        width: 35px;
        height: 35px;
        transform: translateY(-5px);
    }

    .project-back {
        font-size: 9px;
        letter-spacing: .08em;
        transform: translateY(-8px);
    }

    .project-hero {
        height: 42vh;
        min-height: 280px;
    }

    .project-content {
        width: 100%;
        padding: 42px var(--page-padding) 80px;
        min-width: 0;
    }

    .project-title {
        margin-bottom: 22px;
    }

    .project-description p {
        font-size: 16px;
        line-height: 1.45;
        text-align: left;
    }

    .project-showcase {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: auto;
    gap: 6px;
    min-width: 0;
}

.project-showcase .project-info-row {
    grid-column: 1 / -1;
    width: 100%;
    height: auto;
    min-height: 0;
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

    .project-description,
    .project-gallery-item,
    .project-gallery-item img {
        min-width: 0;
        max-width: 100%;
    }

    .size-wide {
        grid-column: span 2;
    }

    .size-large {
        grid-column: span 1;
        grid-row: auto;
    }

    .size-small,
    .size-tall {
        grid-column: span 1;
        grid-row: auto;
    }

    .size-tall {
        grid-row: span 2;
        aspect-ratio: auto;
    }



    .project-facts {
        flex-direction: column;
        gap: 16px;
    }

  .project-info-row {
    grid-column: 1 / -1;
    grid-row: auto;
    order: 999;
    width: 100%;
    height: auto;
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 28px;
}



    .project-photography-wrapper {
        margin-left: 0;
        text-align: left;
    }

    .project-team {
        width: 100%;
        grid-template-columns: minmax(0, max-content) minmax(0, 1fr);
        justify-content: start;
        column-gap: 18px;
        font-size: 13px;
    }

    .project-team-wrapper {
        width: 100%;
        min-width: 0;
    }

    .awards {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }

    .awards img {
        height: 70px;
    }

    .lightbox-image-wrap {
        padding: 72px 12px 20px;
    }

    .lightbox-close {
        top: 14px;
        right: 14px;
    }

        /* PROJECT FOOTER */

    .contact-footer {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 10px var(--page-padding) 18px;

    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;

    font-size: 10px;

    
    clear: both;
    position: relative;
    z-index: 1;
}



    .contact-footer-left {
        white-space: nowrap;
        flex-shrink: 0;
    }

    .contact-footer-right {
        display: flex;
        gap: 8px 12px;
        flex-wrap: nowrap;
        flex-shrink: 0;
        align-items: center;
    }

    .contact-footer a img {
        width: 13px;
        height: 13px;
    }

}

@media (hover: none) and (max-width: 650px), (hover: none) and (orientation: landscape) and (max-height: 600px) {
    body::before {
        content: "";
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 70px;
        background: linear-gradient(
            to bottom,
            rgba(235, 234, 230, 1) 0%,
            rgba(235, 234, 230, .65) 50%,
            rgba(235, 234, 230, 0) 100%
        );
        pointer-events: none;
        z-index: 19;
    }
}
