.project-carousel {
    position: relative;
    width: 100%;
}

.cover-carousel-shell {
    width: 100%;
}

.project-carousel-viewport {
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: var(--radius-md);
    min-height: 0;
    overflow: hidden;
    position: relative;
    width: 100%;
}

.project-carousel-track {
    display: flex;
    height: 100%;
    transition: transform 340ms ease;
    width: 100%;
}

.project-carousel-slide {
    flex: 0 0 100%;
    height: 100%;
    margin: 0;
}

.project-carousel-image {
    display: block;
    height: 100%;
    object-fit: cover;
    object-position: center;
    width: 100%;
}

.project-carousel-overlay {
    inset: 0;
    pointer-events: none;
    position: absolute;
}

.project-carousel-button {
    align-items: center;
    background: none;
    border: none;
    color: #ffffff;
    cursor: pointer;
    display: flex;
    font-size: 0;
    font-weight: 700;
    height: 3rem;
    justify-content: center;
    line-height: 1;
    min-width: 0;
    padding: 0;
    pointer-events: auto;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 160ms ease;
    width: 3rem;
    z-index: 2;
}

.project-carousel-button:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.8);
    outline-offset: 0.25rem;
}

.project-carousel-button::before {
    border-bottom: 2px solid #ffffff;
    border-right: 2px solid #ffffff;
    content: "";
    display: block;
    height: 0.75rem;
    filter:
        drop-shadow(0.5px 0 0 rgba(6, 10, 18, 0.7))
        drop-shadow(-0.5px 0 0 rgba(6, 10, 18, 0.7))
        drop-shadow(0 0.5px 0 rgba(6, 10, 18, 0.7))
        drop-shadow(0 -0.5px 0 rgba(6, 10, 18, 0.7));
    width: 0.75rem;
}

.project-carousel-button-prev {
    left: 1rem;
}

.project-carousel-button-prev::before {
    transform: rotate(135deg);
}

.project-carousel-button-next {
    right: 1rem;
}

.project-carousel-button-next::before {
    transform: rotate(-45deg);
}

.project-carousel-dots {
    align-items: center;
    backdrop-filter: blur(10px);
    background: rgba(15, 23, 33, 0.46);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    bottom: 1rem;
    display: flex;
    gap: 0.45rem;
    justify-content: center;
    left: 50%;
    padding: 0.45rem 0.6rem;
    pointer-events: auto;
    position: absolute;
    transform: translateX(-50%);
    z-index: 2;
}

.project-carousel-dot {
    background: rgba(255, 255, 255, 0.36);
    border: none;
    border-radius: 999px;
    cursor: pointer;
    display: inline-flex;
    height: 0.72rem;
    padding: 0;
    transition: transform 160ms ease, background-color 160ms ease;
    width: 0.72rem;
}

.project-carousel-dot:hover,
.project-carousel-dot:focus-visible {
    background: rgba(255, 255, 255, 0.62);
    transform: scale(1.08);
}

.project-carousel-dot.is-active {
    background: #ffffff;
}

.project-carousel-empty {
    align-items: center;
    background: color-mix(in srgb, var(--surface-soft) 84%, var(--accent) 16%);
    color: color-mix(in srgb, var(--text) 82%, var(--muted));
    display: flex;
    font-family: "Manrope", "Segoe UI", sans-serif;
    font-size: 0.92rem;
    font-weight: 600;
    height: 100%;
    justify-content: center;
    padding: 1rem;
    text-align: center;
}

@media (max-width: 720px) {
    .project-carousel-button {
        display: none;
    }

    .project-carousel-dots {
        bottom: 0.75rem;
    }
    
    .project-carousel-dot {
        height: 0.44rem;
        width: 0.44rem;
    }

    .project-carousel-dots {
        gap: 0.25rem;
    }
}

.project-carousel-lightbox {
    align-items: center;
    background: #000;
    bottom: 0;
    display: flex;
    justify-content: center;
    left: 0;
    opacity: 0;
    pointer-events: none;
    position: fixed;
    right: 0;
    top: 0;
    transition: opacity 220ms ease;
    z-index: 999;
    padding: 0;
    overflow: hidden;
}

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

.project-carousel-lightbox-image {
    height: auto;
    width: auto;
    max-height: 100vh;
    max-width: 100vw;
    object-fit: contain;
    background-color: #000;
}

@media (max-width: 720px) and (orientation: portrait) {
    .project-carousel-lightbox-image {
        height: auto;
        max-height: 100vh;
        max-width: 100vw;
        width: 100vw;
    }
}

.project-carousel-lightbox:focus-visible,
.project-carousel-lightbox:focus {
    outline: none;
    box-shadow: none;
}

@media (prefers-reduced-motion: reduce) {
    .project-carousel-track,
    .project-carousel-button,
    .project-carousel-dot {
        transition-duration: 0.01ms !important;
    }
}
