/* ================================
   Gallery Page Styles
   Shared by all gallery pages
   ================================ */

body {
    background-color: var(--bg);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    padding: 0 8% 60px 8%;
    margin: 0;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Dot grid texture */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 28px 28px;
    pointer-events: none;
    z-index: -1;
}
body.light-theme::before {
    background-image: radial-gradient(circle, rgba(0, 0, 0, 0.04) 1px, transparent 1px);
}

/* --- Sticky Header --- */

.sticky-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: var(--header-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding-top: 48px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--header-border);
}

.back-link {
    text-decoration: none;
    color: var(--accent);
    font-weight: 600;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 1.25rem;
    transition: gap 0.2s ease, opacity 0.2s;
    opacity: 0.8;
}
.back-link:hover { gap: 0.7rem; opacity: 1; }

h1 { font-size: clamp(2rem, 6vw, 3rem); font-weight: 800; letter-spacing: -1.5px; margin: 0 0 0.4rem 0; }
.subheading { color: var(--text-dim); margin: 0; font-size: 0.9rem; }

/* --- Instagram CTA --- */

.insta-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 1rem;
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 500;
    transition: all 0.25s ease;
    padding: 0.35rem 0.9rem;
    border-radius: 50px;
    border: 1px solid transparent;
}

.insta-cta:hover {
    color: var(--insta);
    background: rgba(225, 48, 108, 0.05);
    border-color: rgba(225, 48, 108, 0.25);
    box-shadow: 0 0 16px rgba(225, 48, 108, 0.15);
    transform: translateX(4px);
}

/* Theme toggle anchored to the sticky header */
.sticky-header .theme-toggle {
    position: absolute;
    top: 48px;
    right: 0;
}

/* --- Gallery Grid --- */

.gallery-container {
    columns: 3 280px;
    column-gap: 1.25rem;
    margin-top: 2.5rem;
}

.gallery-item {
    margin-bottom: 1.25rem;
    break-inside: avoid;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: all 0.35s ease;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    display: block;
    pointer-events: none;
    transition: transform 0.5s ease;
}

.gallery-item:hover {
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.1), 0 8px 32px rgba(99, 102, 241, 0.12);
    transform: translateY(-4px);
}
.gallery-item:hover img { transform: scale(1.03); }

/* --- Lightbox --- */

#lightbox {
    position: fixed;
    z-index: 2000;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(7, 7, 17, 0.97);
    display: none;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(16px);
    cursor: zoom-out;
}

#lightbox img {
    max-width: 90%;
    max-height: 85%;
    border-radius: 12px;
    pointer-events: none;
    transform: scale(0.92);
    transition: transform 0.35s cubic-bezier(0.23, 1, 0.32, 1);
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.6);
}

#lightbox.active { display: flex; }
#lightbox.active img { transform: scale(1); }

@media (max-width: 768px) {
    body { padding: 0 5% 50px 5%; }
    .gallery-container { columns: 2; column-gap: 0.75rem; }
    h1 { font-size: 2rem; }
    .sticky-header { padding-top: 28px; padding-bottom: 16px; }
}

@media (max-width: 480px) {
    body { padding: 0 4% 40px 4%; }
    .gallery-container { columns: 1; }
    h1 { font-size: 1.75rem; }
    .gallery-item { margin-bottom: 0.75rem; }
}
