.photo-gallery {
    --photo-gallery-gap: 0.5rem;
    --photo-gallery-radius: 6px;
}

.photo-gallery-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 9rem), 1fr));
    gap: var(--photo-gallery-gap);
}

.photo-gallery-item {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin: 0;
}

.photo-gallery-thumb {
    appearance: none;
    border: 0;
    padding: 0;
    background: #111;
    aspect-ratio: 1 / 1;
    width: 100%;
    overflow: hidden;
    border-radius: var(--photo-gallery-radius);
    cursor: zoom-in;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    display: block;
}

.photo-gallery-thumb:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
}

.photo-gallery-thumb:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.18);
}

.photo-gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.photo-gallery-caption {
    font-size: 0.78rem;
    line-height: 1.35;
    color: rgba(20, 20, 20, 0.78);
    margin: 0;
}

.artist-photos-preview-card .photo-gallery,
.artist-photos-preview-card .photo-carousel {
    margin-top: 0.65rem;
}

.artist-photos-preview-meta {
    margin: 0.75rem 0 0;
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    color: inherit;
    opacity: 0.65;
}

.artist-photos-preview-meta a {
    color: inherit;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

.photo-carousel {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    color: inherit;
}

.photo-carousel-viewport {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 8px;
    background: #0c0c0c;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.28);
}

.photo-carousel-track {
    list-style: none;
    margin: 0;
    padding: 0;
    position: absolute;
    inset: 0;
}

.photo-carousel-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.45s ease, transform 0.6s ease;
    pointer-events: none;
}

.photo-carousel-slide.is-active {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
    z-index: 1;
}

.photo-carousel-thumb {
    appearance: none;
    background: transparent;
    border: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    display: block;
    cursor: zoom-in;
}

.photo-carousel-thumb:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
}

.photo-carousel-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.photo-carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 2.3rem;
    height: 2.3rem;
    border-radius: 999px;
    background: rgba(8, 8, 8, 0.55);
    color: #f5f5f5;
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.18s ease, transform 0.18s ease, opacity 0.18s ease;
    opacity: 0.7;
}

.photo-carousel-viewport:hover .photo-carousel-nav,
.photo-carousel-nav:focus-visible {
    opacity: 1;
}

.photo-carousel-nav:hover {
    background: rgba(8, 8, 8, 0.85);
    transform: translateY(-50%) scale(1.06);
}

.photo-carousel-prev {
    left: 0.55rem;
}

.photo-carousel-next {
    right: 0.55rem;
}

.photo-carousel-counter {
    position: absolute;
    bottom: 0.55rem;
    right: 0.7rem;
    z-index: 2;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #f5f5f5;
    background: rgba(8, 8, 8, 0.55);
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.photo-carousel-caption {
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.45;
    color: inherit;
    opacity: 0.85;
    min-height: 1.2em;
}

.photo-carousel-caption[hidden] {
    display: none;
}

.photo-carousel-dots {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
    margin-top: 0.15rem;
}

.photo-carousel-dot {
    appearance: none;
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 999px;
    background: currentColor;
    opacity: 0.28;
    border: 0;
    padding: 0;
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.photo-carousel-dot:hover {
    opacity: 0.55;
}

.photo-carousel-dot.is-active {
    opacity: 1;
    transform: scale(1.25);
}

.photo-carousel-dot:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

.artist-photos-section .photo-gallery {
    --photo-gallery-gap: 0.75rem;
}

.artist-photos-section .photo-gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 11rem), 1fr));
}

.photo-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-lightbox[hidden] {
    display: none;
}

.photo-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 8, 8, 0.92);
    cursor: zoom-out;
}

.photo-lightbox-dialog {
    position: relative;
    z-index: 1;
    max-width: min(96vw, 1100px);
    max-height: 92vh;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 0 3rem;
    gap: 1rem;
    color: #f5f5f5;
}

.photo-lightbox-figure {
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    max-height: 100%;
}

.photo-lightbox-image {
    max-width: 100%;
    max-height: 76vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
    background: #111;
}

.photo-lightbox-caption {
    text-align: center;
    font-size: 0.95rem;
    line-height: 1.5;
    max-width: 64ch;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
}

.photo-lightbox-caption-text:empty {
    display: none;
}

.photo-lightbox-subject-link {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 3px;
    font-size: 0.85rem;
    opacity: 0.85;
}

.photo-lightbox-subject-link:hover {
    opacity: 1;
}

.photo-lightbox-close,
.photo-lightbox-nav {
    appearance: none;
    background: rgba(0, 0, 0, 0.45);
    color: #f5f5f5;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 999px;
    width: 2.6rem;
    height: 2.6rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    cursor: pointer;
    transition: background 0.18s ease, transform 0.18s ease;
}

.photo-lightbox-close:hover,
.photo-lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.05);
}

.photo-lightbox-close {
    position: absolute;
    top: 0.4rem;
    right: 0.4rem;
}

.photo-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

.photo-lightbox-nav:hover {
    transform: translateY(-50%) scale(1.05);
}

.photo-lightbox-prev {
    left: 0.4rem;
}

.photo-lightbox-next {
    right: 0.4rem;
}

.photo-lightbox-counter {
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.7;
}

@media (max-width: 640px) {
    .photo-lightbox-dialog {
        padding: 0 0.5rem;
    }

    .photo-lightbox-nav {
        width: 2.2rem;
        height: 2.2rem;
        font-size: 1.1rem;
    }

    .photo-lightbox-image {
        max-height: 72vh;
    }
}

body.photo-lightbox-open {
    overflow: hidden;
}
