/* =============================================
   ShutterPhrase — GALLERY.CSS
   ============================================= */

/* ═══════════ PORTFOLIO ═══════════ */
.portfolio-scroll-section { height: 220dvh; position: relative; width: 100%; margin-top: 80px; z-index: 10; }
@media (min-width: 768px) { .portfolio-scroll-section { height: 350dvh; } }
.portfolio-sticky { position: sticky; top: 0; height: 100dvh; width: 100%; overflow: hidden; perspective: 1000px; perspective-origin: center top; display: flex; justify-content: center; align-items: center; }
.gallery-glow { pointer-events: none; position: absolute; z-index: 0; height: 100dvh; width: 100%; background: radial-gradient(circle at 25% 45%, rgba(255,255,255,0.08) 0%, rgba(245,166,35,0.06) 20%, rgba(255,223,133,0.03) 40%, transparent 60%), radial-gradient(circle at 75% 55%, rgba(255,255,255,0.07) 0%, rgba(245,166,35,0.05) 15%, rgba(255,223,133,0.02) 35%, transparent 55%); filter: blur(45px); mix-blend-mode: screen; }

.gallery-container { position: relative; z-index: 10; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: 100vw; max-width: 1200px; padding: 0 10px; transform-style: preserve-3d; will-change: transform; transform-origin: 50% 50%; }
@media (min-width: 768px) { .gallery-container { gap: 24px; padding: 0 24px; } }
.gallery-col { display: flex; flex-direction: column; gap: 8px; will-change: transform; width: 100%; }
@media (min-width: 768px) { .gallery-col { gap: 24px; } }
.gallery-col.col-2 { margin-top: -50%; }
@media (max-width: 768px) {
    .gallery-col.col-2 { margin-top: 0; }
    .portfolio-sticky { perspective: none; }
    .gallery-container { opacity: 0; transition: opacity 0.6s ease, transform 0.6s ease; }
}

.gallery-img { width: 100%; height: auto; aspect-ratio: 4/5; object-fit: cover; border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,0.8); cursor: pointer; transition: transform 0.4s ease, filter 0.4s ease, box-shadow 0.4s ease; transform: translateZ(0); }
@media (min-width: 768px) { .gallery-img { border-radius: 12px; } }
@media (pointer: fine) { .gallery-img:hover { transform: scale(1.03); filter: brightness(1.1); box-shadow: 0 15px 40px rgba(255,255,255,0.1); } }

.reveal { opacity: 0; transform: translateY(40px); transition: opacity 1s cubic-bezier(0.2, 0.8, 0.2, 1), transform 1s cubic-bezier(0.2, 0.8, 0.2, 1); }
/* .active — scroll reveal state */
.reveal.active { opacity: 1; transform: translateY(0); }

/* ================= LIGHTBOX ================= */
#lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.98); display: none; justify-content: center; align-items: center; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); z-index: 1000; padding: 10px; }
/* .active — tab panel visible state */
#lightbox.active { display: flex; }
.lb-image { max-width: 100%; max-height: 85vh; border-radius: 12px; box-shadow: 0 20px 80px rgba(255,255,255,0.05); object-fit: contain; user-select: none; -webkit-user-select: none; }
@media (min-width: 768px) { .lb-image { max-width: 90%; max-height: 90vh; border-radius: 18px; } }
.lb-btn { position: absolute; font-size: 30px; padding: 10px; min-width: 50px; min-height: 50px; opacity: .7; transition: .3s; color: white; background: transparent; border: none; display: flex; align-items: center; justify-content: center; z-index: 1001; }
@media (min-width: 768px) { .lb-btn { font-size: 40px; padding: 18px; opacity: .6; } }
.lb-btn:hover { opacity: 1; transform: scale(1.1); color: #ffdf85; text-shadow: 0 0 15px rgba(245,166,35,0.5); }
#prev { left: 5px; top: 50%; transform: translateY(-50%); } #next { right: 5px; top: 50%; transform: translateY(-50%); }
#close { top: 15px; right: 15px; font-size: 40px; background: rgba(0,0,0,0.5); border-radius: 50%; width: 45px; height: 45px; border: 1px solid rgba(255,255,255,0.1); }
@media (min-width: 768px) { #prev { left: 30px; transform: none; } #next { right: 30px; transform: none; } #close { top: 30px; right: 30px; font-size: 50px; background: transparent; border: none; } }

/* =================
