.cu-section {
    padding: 84px 0 96px;
    background: #f5e4cf;
}

.cu-section .section-title {
    margin-bottom: 34px;
}

.cu-intro {
    max-width: 700px;
    margin: 18px auto 0;
}

.cu-carousel {
    position: relative;
    padding: 0 56px;
}

.cu-carousel-track {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding: 4px 2px 18px;
    scroll-behavior: smooth;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.cu-carousel-track::-webkit-scrollbar {
    display: none;
}

.cu-carousel:not(.has-overflow) .cu-nav {
    display: none;
}

.cu-projects-shell {
    margin: 0 auto;
}

.cu-project-card {
    position: relative;
    flex: 0 0 calc((100% - 40px) / 3);
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    isolation: isolate;
    scroll-snap-align: start;
    text-decoration: none;
    background: #4f3522;
    border-radius: 18px;
    box-shadow: 0 12px 30px rgba(75, 47, 26, 0.12);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cu-project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 38px rgba(75, 47, 26, 0.2);
}

.cu-project-card.is-active {
    background: radial-gradient(circle at 28% 22%, #6a4a30 0%, #2c1c11 68%);
    box-shadow: 0 0 0 3px #9f704d, 0 18px 38px rgba(75, 47, 26, 0.24);
}

.cu-project-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: 1;
    transition: transform 0.7s ease, opacity 0.25s ease;
}

.cu-project-card.is-active .cu-project-bg {
    opacity: 0;
}

.cu-project-card:hover .cu-project-bg {
    transform: scale(1.06);
}

.cu-project-shade {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(180deg, rgba(20, 12, 6, 0.04) 0%, rgba(20, 12, 6, 0.18) 38%, rgba(20, 12, 6, 0.88) 100%);
    pointer-events: none;
}

.cu-project-card.is-active .cu-project-shade {
    background:
        linear-gradient(180deg, rgba(20, 12, 6, 0.02) 0%, rgba(20, 12, 6, 0.24) 36%, rgba(20, 12, 6, 0.94) 100%);
}

.cu-project-count {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 3;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(20, 12, 6, 0.68);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    line-height: 1.4;
    backdrop-filter: blur(4px);
}

.cu-project-copy {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 24px 24px 22px;
    color: #fff;
}

.cu-project-kicker {
    margin-bottom: 6px;
    color: rgba(255, 255, 255, 0.66);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.cu-project-name {
    color: rgba(255, 255, 255, 0.88);
    font-size: clamp(22px, 2vw, 30px);
    font-weight: 600;
    line-height: 1.16;
    text-shadow: 0 2px 14px rgba(0, 0, 0, 0.26);
    transition: color 0.3s ease;
}

.cu-project-card:hover .cu-project-name,
.cu-project-card.is-active .cu-project-name {
    color: #fff;
}

.cu-project-sub {
    margin-top: 5px;
    color: rgba(255, 255, 255, 0.68);
    font-size: 12px;
    line-height: 1.4;
}

.cu-project-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    padding-bottom: 3px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.36);
    color: rgba(255, 255, 255, 0.78);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    transition: color 0.3s ease, border-color 0.3s ease;
}

.cu-project-action i {
    font-size: 9px;
}

.cu-project-card:hover .cu-project-action,
.cu-project-card.is-active .cu-project-action {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.74);
}

.cu-nav {
    position: absolute;
    top: 50%;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    transform: translateY(-50%);
    border: 1px solid #b88b6d;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.96);
    color: #8a5f3d;
    font-size: 14px;
    box-shadow: 0 8px 20px rgba(75, 47, 26, 0.14);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}

.cu-nav:hover:not(:disabled) {
    background: #9f704d;
    border-color: #9f704d;
    color: #fff;
}

.cu-nav:focus-visible {
    outline: 2px solid #9f704d;
    outline-offset: 3px;
}

.cu-nav:disabled {
    opacity: 0.32;
    cursor: default;
}

.cu-nav-prev {
    left: 0;
}

.cu-nav-next {
    right: 0;
}

/* Gallery modal */

body.cu-modal-open {
    overflow: hidden;
}

.cu-modal {
    position: fixed;
    inset: 0;
    z-index: 9990;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.cu-modal[hidden] {
    display: none;
}

.cu-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(16, 10, 5, 0.82);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.cu-modal.is-open .cu-modal-backdrop {
    opacity: 1;
}

.cu-modal-dialog {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    width: min(1080px, 100%);
    max-height: calc(100vh - 48px);
    overflow: hidden;
    border-radius: 20px;
    background: #171009;
    color: #fff;
    box-shadow: 0 32px 90px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transform: translateY(18px) scale(0.985);
    transition: opacity 0.28s ease, transform 0.28s ease;
}

.cu-modal.is-open .cu-modal-dialog {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.cu-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.cu-modal-close:hover {
    background: #9f704d;
    border-color: #9f704d;
}

.cu-modal-close:focus-visible,
.cu-modal-nav:focus-visible {
    outline: 2px solid #d9b593;
    outline-offset: 3px;
}

.cu-modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 20px 70px 16px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.cu-modal-head .cu-eyebrow {
    color: #d9b593;
}

.cu-modal-head h3 {
    margin: 5px 0 0;
    color: #fff;
    font-size: 24px;
    font-weight: 600;
    line-height: 1.25;
}

.cu-modal-sub {
    margin: 4px 0 0;
    color: rgba(255, 255, 255, 0.58);
    font-size: 13px;
    line-height: 1.4;
}

.cu-modal-counter {
    flex-shrink: 0;
    margin-top: 4px;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    white-space: nowrap;
}

.cu-modal-body {
    position: relative;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
}

.cu-modal-stage {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 auto;
    min-height: 0;
    padding: 22px 84px;
    background:
        radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.06), transparent 62%),
        #120c07;
}

.cu-modal-stage[hidden],
.cu-modal-foot[hidden],
.cu-modal-empty[hidden] {
    display: none;
}

.cu-modal-figure {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    max-height: 100%;
    margin: 0;
}

.cu-modal-figure img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: min(62vh, 620px);
    border-radius: 10px;
    background: #221710;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cu-modal-figure img.is-loaded {
    opacity: 1;
}

.cu-modal-latest {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 5px 12px;
    border-radius: 999px;
    background: #9f704d;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.cu-modal-latest[hidden] {
    display: none;
}

.cu-modal-nav {
    position: absolute;
    top: 50%;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    padding: 0;
    transform: translateY(-50%);
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 17px;
    line-height: 1;
    cursor: pointer;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transition: background 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}

.cu-modal-nav:hover:not(:disabled) {
    background: #9f704d;
    border-color: #9f704d;
}

.cu-modal-nav:disabled {
    opacity: 0.25;
    cursor: default;
}

.cu-modal-prev {
    left: 18px;
}

.cu-modal-next {
    right: 18px;
}

.cu-modal-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 16px 24px 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.09);
    background: #171009;
}

.cu-modal-meta time {
    color: #d9b593;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.cu-modal-meta p {
    margin: 4px 0 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 14px;
    line-height: 1.4;
}

.cu-modal-meta p.is-muted {
    color: rgba(255, 255, 255, 0.48);
    font-style: italic;
}

.cu-modal-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 64px 24px 72px;
    text-align: center;
}

.cu-modal-empty > i {
    color: #d9b593;
    font-size: 34px;
}

.cu-modal-empty strong {
    color: #fff;
    font-size: 18px;
    font-weight: 600;
}

.cu-modal-empty p {
    max-width: 420px;
    margin: 0;
    color: rgba(255, 255, 255, 0.58);
    font-size: 14px;
    line-height: 1.5;
}

.cu-empty {
    max-width: 760px;
    margin: 0 auto;
    padding: 60px 24px;
    border: 1px dashed rgba(159, 112, 77, 0.38);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.55);
    text-align: center;
}

.cu-empty > i {
    display: block;
    margin-bottom: 18px;
    color: #9f704d;
    font-size: 40px;
}

.cu-empty h3 {
    margin-bottom: 10px;
    color: #3c2a1c;
    font-size: 26px;
    font-weight: 600;
}

.cu-empty p {
    max-width: 480px;
    margin: 0 auto 24px;
}

@media (max-width: 1199px) {
    .cu-project-card {
        flex-basis: calc((100% - 20px) / 2);
    }
}

@media (max-width: 991px) {
    .cu-section {
        padding: 64px 0 72px;
    }

    .cu-carousel {
        padding: 0 46px;
    }

    .cu-modal-head h3 {
        font-size: 22px;
    }

    .cu-modal-stage {
        padding: 20px 72px;
    }

    .cu-modal-figure img {
        max-height: min(56vh, 520px);
    }
}

@media (max-width: 767px) {
    .cu-modal {
        padding: 0;
        align-items: stretch;
    }

    .cu-modal-dialog {
        width: 100%;
        max-height: none;
        height: 100%;
        border-radius: 0;
        transform: translateY(24px);
    }

    .cu-modal.is-open .cu-modal-dialog {
        transform: translateY(0);
    }

    .cu-modal-head {
        padding: 18px 64px 14px 18px;
    }

    .cu-modal-head h3 {
        font-size: 20px;
    }

    .cu-modal-sub {
        font-size: 12px;
    }

    .cu-modal-counter {
        padding: 5px 11px;
        font-size: 11px;
    }

    .cu-modal-body {
        justify-content: center;
    }

    .cu-modal-stage {
        flex: 0 1 auto;
        padding: 16px 56px;
    }

    .cu-modal-figure img {
        max-height: 58vh;
    }

    .cu-modal-nav {
        width: 42px;
        height: 42px;
        font-size: 14px;
    }

    .cu-modal-prev {
        left: 8px;
    }

    .cu-modal-next {
        right: 8px;
    }

    .cu-modal-foot {
        padding: 14px 18px 20px;
    }

    .cu-modal-empty {
        padding: 44px 20px 56px;
    }
}

@media (max-width: 575px) {
    .cu-section {
        padding: 54px 0 62px;
    }

    .cu-carousel {
        padding: 0 38px;
    }

    .cu-carousel-track {
        gap: 14px;
    }

    .cu-project-card {
        flex-basis: 82%;
        aspect-ratio: 1.12 / 1;
    }

    .cu-project-copy {
        padding: 18px 18px 17px;
    }

    .cu-project-kicker {
        font-size: 9px;
    }

    .cu-project-name {
        font-size: 22px;
    }

    .cu-project-sub {
        font-size: 11px;
    }

    .cu-project-action {
        margin-top: 10px;
        font-size: 9px;
    }

    .cu-project-count {
        top: 9px;
        right: 9px;
        padding: 4px 8px;
        font-size: 10px;
    }

    .cu-nav {
        width: 36px;
        height: 36px;
        font-size: 12px;
    }

    .cu-modal-head {
        gap: 10px;
        padding: 16px 58px 12px 16px;
    }

    .cu-modal-head h3 {
        font-size: 18px;
    }

    .cu-modal-close {
        top: 10px;
        right: 10px;
        width: 36px;
        height: 36px;
        font-size: 14px;
    }

    .cu-modal-counter {
        padding: 4px 9px;
        font-size: 10px;
    }

    .cu-modal-stage {
        padding: 12px 48px;
    }

    .cu-modal-figure img {
        max-height: 54vh;
        border-radius: 8px;
    }

    .cu-modal-latest {
        top: 8px;
        left: 8px;
        padding: 4px 9px;
        font-size: 9px;
    }

    .cu-modal-nav {
        width: 36px;
        height: 36px;
        font-size: 12px;
    }

    .cu-modal-foot {
        padding: 12px 16px 18px;
    }

    .cu-modal-meta p {
        font-size: 13px;
    }

    .cu-empty {
        padding: 44px 18px;
    }

    .cu-empty h3 {
        font-size: 21px;
    }
}
