/* Artemis II Splashdown Archive Styles */

.archive-header {
    text-align: center;
    padding: 6rem 1.5rem 3rem;
    max-width: 900px;
    margin: 0 auto;
}

.archive-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 8vw, 4rem);
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.archive-meta {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--color-holo);
    letter-spacing: 0.2em;
    margin-bottom: 2rem;
    text-transform: uppercase;
}

/* Masonry Gallery */
.gallery-container {
    padding: 0 1.5rem 6rem;
    max-width: 1800px;
    margin: 0 auto;
}

.masonry-grid {
    column-count: 1;
    column-gap: 1.5rem;
}

@media (min-width: 600px) { .masonry-grid { column-count: 2; } }
@media (min-width: 1024px) { .masonry-grid { column-count: 3; } }
@media (min-width: 1440px) { .masonry-grid { column-count: 4; } }

.gallery-item {
    break-inside: avoid;
    margin-bottom: 1.5rem;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--color-glass-border);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
    cursor: zoom-in;
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    opacity: 0;
    transition: opacity 1s ease;
}

.gallery-item img.loaded {
    opacity: 1;
}

.gallery-item:hover {
    transform: scale(1.02);
    border-color: var(--color-holo);
    box-shadow: 0 10px 30px rgba(0, 240, 255, 0.15);
    z-index: 10;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.overlay-id {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--color-holo);
    display: block;
}

.gallery-credit {
    font-family: var(--font-mono);
    font-size: 0.5rem;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.25rem;
}

/* Lightbox & Slideshow Modal */
.lightbox, .slideshow-portal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.lightbox.active, .slideshow-portal.active {
    display: flex;
    animation: fadeIn 0.3s ease forwards;
}

.slideshow-portal {
    cursor: default;
    background: #000;
}

.slideshow-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.slideshow-img {
    max-width: 95vw;
    max-height: 80vh;
    object-fit: contain;
    position: relative;
}

/* Glitch Effect */
.glitch-active {
    animation: glitch-anim 0.4s cubic-bezier(.25, .46, .45, .94) both;
}

@keyframes glitch-anim {
    0% { transform: translate(0); clip-path: inset(45% 0 55% 0); }
    10% { transform: translate(-5px, -5px); clip-path: inset(10% 0 80% 0); }
    20% { transform: translate(5px, 5px); clip-path: inset(80% 0 10% 0); }
    30% { transform: translate(-5px, 5px); clip-path: inset(40% 0 40% 0); }
    40% { transform: translate(5px, -5px); clip-path: inset(20% 0 30% 0); filter: hue-rotate(90deg) saturate(2); }
    50% { transform: translate(-3px, 3px); clip-path: inset(60% 0 10% 0); }
    60% { transform: translate(3px, -3px); clip-path: inset(10% 0 70% 0); filter: hue-rotate(-90deg); }
    70% { transform: translate(-2px, 2px); clip-path: inset(30% 0 40% 0); }
    80% { transform: translate(2px, -2px); clip-path: inset(50% 0 20% 0); }
    90% { transform: translate(-1px, 1px); clip-path: inset(15% 0 15% 0); }
    100% { transform: translate(0); clip-path: inset(0); }
}

.slideshow-controls {
    position: absolute;
    top: 2rem;
    right: 2rem;
    z-index: 2100;
}

.close-slideshow {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--color-holo);
    color: var(--color-holo);
    padding: 0.5rem 1rem;
    font-family: var(--font-mono);
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-slideshow:hover {
    background: var(--color-holo);
    color: #000;
}

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