/* Gallery: HUD tiles + lightbox */
#wrapper.gallery-page { width: 100%; max-width: 1400px; margin: 0 auto; padding: 1rem 1rem 3rem; }

.gallery-years { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.5rem; }
.gallery-years a {
    font-family: "Orbitron", sans-serif; font-size: .8rem; letter-spacing: .1em;
    color: var(--hud-cyan); border: 1px solid var(--hud-cyan); padding: .25rem .75rem; text-decoration: none;
    clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 6px, 100% 100%, 6px 100%, 0 calc(100% - 6px));
}
.gallery-years a:hover { background: var(--hud-cyan); color: #0a0a0c; }

.gallery-year { margin-top: 1.5rem !important; }
.gallery-year h2 {
    font-size: 1.1rem; color: var(--hud-orange); letter-spacing: .15em; margin: 0 0 .75rem;
    display: flex; align-items: center; gap: .75rem;
}
.gallery-year h2::after { content: ""; flex: 1; height: 1px; background: var(--hud-border); }

.gallery-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }

.gallery-tile {
    position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden;
    background: var(--hud-panel); border: 1px solid var(--hud-border); border-top: 3px solid var(--hud-orange);
    box-shadow: 0 0 10px rgba(255, 113, 0, .12);
    clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
}
.gallery-tile img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s; }
.gallery-tile:hover img { transform: scale(1.05); }
.gallery-cap {
    position: absolute; left: 0; right: 0; bottom: 0; padding: 1.25rem .75rem .5rem;
    background: linear-gradient(to top, rgba(10, 10, 12, .95), rgba(10, 10, 12, 0));
    display: flex; justify-content: space-between; align-items: baseline; gap: .5rem;
    color: var(--hud-text); font-size: .8rem;
}
.gallery-cap strong { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gallery-cap time { color: var(--hud-cyan); font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; flex: none; }

/* lightbox */
.lightbox {
    position: fixed; inset: 0; z-index: 2000; background: rgba(5, 5, 7, .94);
    display: flex; align-items: center; justify-content: center;
}
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; max-width: min(92vw, 1400px); max-height: 92vh; display: flex; flex-direction: column; }
.lightbox img {
    max-width: 100%; max-height: calc(92vh - 3rem); object-fit: contain;
    border: 1px solid var(--hud-border); border-top: 3px solid var(--hud-orange); box-shadow: 0 0 24px rgba(255, 113, 0, .25);
}
.lightbox figcaption { padding: .5rem 0; color: var(--hud-text); display: flex; justify-content: space-between; gap: 1rem; }
.lightbox figcaption time { color: var(--hud-cyan); font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; }
.lightbox button {
    position: absolute; background: transparent; border: 1px solid var(--hud-orange); color: var(--hud-orange);
    width: 2.75rem; height: 2.75rem; font-size: 1.4rem; line-height: 1; cursor: pointer;
}
.lightbox button:hover { background: var(--hud-orange); color: #0a0a0c; }
.lb-close { top: 1rem; right: 1rem; }
.lb-prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lb-next { right: 1rem; top: 50%; transform: translateY(-50%); }
@media (max-width: 600px) {
    .lb-prev, .lb-next { top: auto; bottom: 1rem; transform: none; }
    .lightbox figure { max-height: calc(100vh - 7rem); }
}
