/* ── page hero ── */
.photo-hero {
    margin: 2rem auto 0;
    text-align: center;
}

.photo-hero-title {
    font-family: "Dela Gothic One";
    font-size: clamp(2rem, 8vw, 3.5rem);
    font-weight: 400;
    letter-spacing: -0.02em;
    line-height: 1.1;
    color: hsl(var(--foreground));
    margin: 0 0 0.5rem;
    animation: heroTitleWordIn 0.6s ease-out forwards;
    opacity: 0;
}

.photo-hero-desc {
    font-size: 0.9375rem;
    color: hsl(var(--muted-foreground));
    font-weight: 500;
    margin: 0;
    animation: heroTitleWordIn 0.6s ease-out 0.2s forwards;
    opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
    .photo-hero-title,
    .photo-hero-desc {
        animation: none;
        opacity: 1;
    }
}

/* ── filter pills ── */
.photo-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin-bottom: 1.25rem;
}

.photo-filter {
    font-size: 0.8125rem;
    font-weight: 500;
    padding: 0.35rem 0.875rem;
    border-radius: 9999px;
    border: 1px solid hsl(var(--border));
    background: hsl(var(--card));
    color: hsl(var(--muted-foreground));
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.photo-filter:hover {
    background: hsl(var(--accent));
    color: hsl(var(--accent-foreground));
    border-color: hsl(var(--ring) / 0.3);
}

.photo-filter:focus-visible {
    outline: 2px solid hsl(var(--ring));
    outline-offset: 2px;
}

.photo-filter.active {
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
    border-color: hsl(var(--primary));
}

/* ── masonry-style grid ── */
.photo-grid {
    columns: 2;
    column-gap: 0.75rem;
    margin-top: 0.5rem;
}

@media (max-width: 480px) {
    .photo-grid {
        columns: 1;
    }
}

/* ── individual photo card ── */
.photo-item {
    break-inside: avoid;
    margin-bottom: 0.75rem;
    animation: experienceItemIn 0.45s cubic-bezier(0.34, 1.2, 0.64, 1) both;
    opacity: 0;
}

.photo-item:nth-child(1) { animation-delay: 0.05s; }
.photo-item:nth-child(2) { animation-delay: 0.12s; }
.photo-item:nth-child(3) { animation-delay: 0.19s; }
.photo-item:nth-child(4) { animation-delay: 0.26s; }
.photo-item:nth-child(5) { animation-delay: 0.33s; }
.photo-item:nth-child(6) { animation-delay: 0.40s; }
.photo-item:nth-child(n+7) { animation-delay: 0.47s; }

@media (prefers-reduced-motion: reduce) {
    .photo-item {
        animation: none;
        opacity: 1;
    }
}

.photo-frame {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid hsl(var(--border));
    background: hsl(var(--muted));
    cursor: pointer;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.photo-frame:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 28px -6px hsl(0 0% 0% / 0.14);
    border-color: hsl(var(--ring) / 0.35);
}

[data-theme="dark"] .photo-frame:hover {
    box-shadow: 0 10px 32px -6px hsl(0 0% 0% / 0.5);
}

.photo-frame img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    transition: transform 0.35s ease;
    /* placeholder style before image loads */
    min-height: 140px;
    background: hsl(var(--muted));
}

.photo-frame:hover img {
    transform: scale(1.03);
}

/* ── category overlay label ── */
.photo-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, hsl(0 0% 0% / 0.45) 0%, transparent 55%);
    opacity: 0;
    transition: opacity 0.2s ease;
    display: flex;
    align-items: flex-end;
    padding: 0.75rem;
}

.photo-frame:hover .photo-overlay {
    opacity: 1;
}

.photo-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: hsl(0 0% 100%);
    background: hsl(0 0% 0% / 0.35);
    padding: 0.2rem 0.55rem;
    border-radius: var(--radius-sm);
    backdrop-filter: blur(4px);
}

/* ── lightbox ── */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: hsl(0 0% 0% / 0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    animation: lbFadeIn 0.2s ease forwards;
}

.lightbox[hidden] {
    display: none;
}

@keyframes lbFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.lightbox-content {
    max-width: min(90vw, 800px);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: var(--radius-lg);
    box-shadow: 0 24px 64px hsl(0 0% 0% / 0.6);
    animation: lbImgIn 0.25s ease forwards;
}

@keyframes lbImgIn {
    from { opacity: 0; transform: scale(0.96); }
    to   { opacity: 1; transform: scale(1); }
}

.lightbox-caption {
    font-size: 0.875rem;
    color: hsl(0 0% 75%);
    text-align: center;
    margin: 0;
    max-width: 480px;
}

.lightbox-close {
    position: fixed;
    top: 1.25rem;
    right: 1.25rem;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: hsl(0 0% 100% / 0.1);
    border: 1px solid hsl(0 0% 100% / 0.15);
    color: hsl(0 0% 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s;
    z-index: 201;
}

.lightbox-close:hover {
    background: hsl(0 0% 100% / 0.2);
}

.lightbox-close:focus-visible {
    outline: 2px solid hsl(var(--ring));
    outline-offset: 2px;
}

.lightbox-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
    background: hsl(0 0% 100% / 0.1);
    border: 1px solid hsl(0 0% 100% / 0.15);
    color: hsl(0 0% 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s;
    z-index: 201;
}

.lightbox-nav:hover {
    background: hsl(0 0% 100% / 0.2);
}

.lightbox-nav:focus-visible {
    outline: 2px solid hsl(var(--ring));
    outline-offset: 2px;
}

.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }

@media (max-width: 480px) {
    .lightbox-prev { left: 0.5rem; }
    .lightbox-next { right: 0.5rem; }
    .lightbox-nav {
        width: 2.25rem;
        height: 2.25rem;
    }
}
