.brand-link {
    display: inline-flex;
}

.project-page {
    text-align: left;
}

.project-hero {
    position: relative;
    min-height: clamp(440px, 64vh, 680px);
    display: flex;
    align-items: flex-end;
    overflow: hidden;
}

.project-hero > img,
.project-hero-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.project-hero > img {
    object-fit: cover;
}

.project-hero-overlay {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.92));
}

.project-hero-content {
    position: relative;
    z-index: 1;
    width: min(1200px, 100%);
    margin: 0 auto;
    padding: 90px 40px 65px;
}

.project-hero h1 {
    max-width: 850px;
    margin: 10px 0 16px;
    font-size: clamp(2.6rem, 7vw, 5.5rem);
    line-height: 0.95;
}

.project-hero-content > p:last-child {
    max-width: 650px;
    margin: 0;
    color: #d2d2d2;
    font-size: 19px;
    line-height: 1.6;
}

.back-link {
    display: inline-block;
    margin-bottom: 35px;
    color: white;
    font-weight: bold;
    text-decoration: none;
}

.back-link:hover {
    color: #f36c21;
}

.project-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    max-width: 1100px;
    margin: -24px auto 0;
    position: relative;
    z-index: 2;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 6px;
}

.project-summary div {
    padding: 25px 30px;
    border-right: 1px solid #333;
}

.project-summary div:last-child {
    border-right: 0;
}

.project-summary span,
.project-summary strong {
    display: block;
}

.project-summary span {
    margin-bottom: 7px;
    color: #f36c21;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.progress-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 110px 40px;
}

.project-introduction {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    column-gap: 70px;
    margin-bottom: 45px;
}

.project-introduction .eyebrow {
    grid-column: 1 / -1;
}

.project-introduction h2 {
    margin: 0;
    font-size: clamp(2.2rem, 5vw, 3.5rem);
}

.project-introduction > p:last-child {
    margin: 0;
    color: #bdbdbd;
    font-size: 18px;
    line-height: 1.7;
}

.progress-gallery {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.gallery-item {
    position: relative;
    min-height: 330px;
    padding: 0;
    overflow: hidden;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 5px;
    color: white;
    cursor: zoom-in;
}

.gallery-item-featured {
    grid-column: 1 / -1;
    min-height: 540px;
}

.gallery-item img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease, filter 0.45s ease;
}

.gallery-item::after {
    content: "";
    position: absolute;
    inset: 45% 0 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.82));
}

.gallery-item span {
    position: absolute;
    z-index: 1;
    left: 22px;
    bottom: 20px;
    font-size: 18px;
    font-weight: bold;
}

.gallery-item:hover img {
    transform: scale(1.025);
    filter: brightness(0.9);
}

.gallery-empty {
    padding: 70px 25px;
    color: #aaa;
    text-align: center;
    border: 1px solid #333;
}

.project-cta {
    padding: 95px 30px;
    background: #1a1a1a;
    text-align: center;
}

.project-cta h2 {
    margin: 8px 0 15px;
    font-size: clamp(2rem, 5vw, 3.2rem);
}

.project-cta > p:not(.eyebrow) {
    margin: 0 auto 30px;
    color: #bbb;
}

.project-cta .primary-button {
    display: inline-block;
    padding: 15px 25px;
    text-decoration: none;
    font-weight: bold;
    border-radius: 4px;
}

.lightbox[hidden] {
    display: none;
}

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr) 70px;
    align-items: center;
    padding: 30px;
    background: rgba(0, 0, 0, 0.94);
}

.lightbox figure {
    margin: 0;
    text-align: center;
}

.lightbox figure img {
    display: block;
    max-width: 100%;
    max-height: calc(100vh - 110px);
    margin: auto;
    object-fit: contain;
}

.lightbox figcaption {
    margin-top: 13px;
    color: #ddd;
}

.lightbox-close,
.lightbox-arrow {
    background: none;
    color: white;
    border: 0;
    cursor: pointer;
}

.lightbox-close {
    position: absolute;
    top: 12px;
    right: 22px;
    font-size: 42px;
}

.lightbox-arrow {
    font-size: 58px;
}

.lightbox-close:hover,
.lightbox-arrow:hover {
    color: #f36c21;
}

.project-card-link,
.project-card-link:visited {
    display: block;
    color: inherit;
    text-decoration: none;
}

.project-card-link:hover {
    color: inherit;
    text-decoration: none;
}

.project-card-link .project-card {
    height: 100%;
    transition:
        transform 0.25s ease,
        border-color 0.25s ease;
}

.project-card-link:hover .project-card {
    transform: translateY(-4px);
    border-color: #f36c21;
}

@media (max-width: 768px) {
    .project-hero-content {
        padding: 70px 20px 50px;
    }

    .project-summary {
        grid-template-columns: 1fr;
        margin: 0;
        border-radius: 0;
    }

    .project-summary div,
    .project-summary div:last-child {
        padding: 18px 20px;
        border-right: 0;
        border-bottom: 1px solid #333;
    }

    .progress-section {
        padding: 70px 20px;
    }

    .project-introduction {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .progress-gallery {
        grid-template-columns: 1fr;
    }

    .gallery-item,
    .gallery-item-featured {
        grid-column: auto;
        min-height: 0;
        aspect-ratio: 4 / 3;
    }

    .lightbox {
        grid-template-columns: 45px minmax(0, 1fr) 45px;
        padding: 18px 6px;
    }

    .lightbox-arrow {
        font-size: 45px;
    }
}
