/* Gallery UI (loads after assets/style.css) */
.gallery-topbar{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:16px;
  margin-bottom:18px;
  flex-wrap:wrap;
}

.gallery-topbar h2{
  margin:0;
  font-size:2rem;
  font-weight:900;
}

.gallery-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.gbtn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  height:44px;
  padding:0 16px;
  border-radius:999px;
  text-decoration:none;
  font-weight:800;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.06);
  color: var(--text);
}
.gbtn:hover{ border-color: rgba(0,191,255,.35); }
.gbtn.primary{
  background: color-mix(in srgb, var(--accent) 35%, rgba(255,255,255,.06));
  border-color: rgba(0,191,255,.35);
}

.gallery-filters{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin: 10px 0 24px;
}
.gchip{
  cursor:pointer;
  user-select:none;
  padding:8px 12px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  font-weight:800;
  color: var(--muted);
}
.gchip.active{
  color: var(--text);
  border-color: rgba(0,191,255,.45);
  background: rgba(0,191,255,.10);
}

/* Masonry-ish responsive grid (no JS) */
.gallery-grid{
  column-count: 4;
  column-gap: 18px;
}
@media (max-width:1200px){ .gallery-grid{ column-count: 3; } }
@media (max-width:900px){ .gallery-grid{ column-count: 2; } }
@media (max-width:600px){ .gallery-grid{ column-count: 1; } }

.gitem{
  break-inside: avoid;
  margin: 0 0 18px;
  border-radius: var(--radius);
  overflow:hidden;
  border:1px solid rgba(255,255,255,.08);
  background: var(--panel2);
  box-shadow: var(--shadow);
  cursor:pointer;
  transition: transform .18s ease, border-color .18s ease;
}
.gitem:hover{
  transform: translateY(-4px);
  border-color: rgba(0,191,255,.35);
}

.gitem img{
  width:100%;
  height:auto;
  display:block;
}

.gmeta{
  padding: 12px 14px 14px;
  display:grid;
  gap:6px;
}
.gtitle{
  font-weight:950;
  font-size:1rem;
  color: var(--text);
}
.gsub{
  color: var(--muted);
  font-size:.9rem;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}
.gbadge{
  display:inline-flex;
  align-items:center;
  height:20px;
  padding:0 8px;
  border-radius:999px;
  background: rgba(255,255,255,.07);
  border:1px solid rgba(255,255,255,.08);
  font-weight:850;
  font-size:.78rem;
}
.gbadge.role{
  background: rgba(0,191,255,.10);
  border-color: rgba(0,191,255,.25);
}

/* Lightbox */
.lightbox{
  position:fixed;
  inset:0;
  background: rgba(0,0,0,.78);
  display:none;
  align-items:center;
  justify-content:center;
  padding: 22px;
  z-index: 99999;
}
.lightbox.open{ display:flex; }

.lightbox-inner{
  width:min(1100px, 98vw);
  max-height: 92vh;
  background: var(--panel2);
  border:1px solid rgba(255,255,255,.10);
  border-radius: 18px;
  overflow:hidden;
  box-shadow: 0 30px 90px rgba(0,0,0,.60);
}
.lightbox-img{
  width:100%;
  max-height: 70vh;
  object-fit: contain;
  background: #000;
  display:block;
}
.lightbox-bar{
  padding: 12px 14px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
}
.lightbox-bar .info{
  display:grid;
  gap:4px;
}
.lightbox-bar .info .t{ font-weight:950; }
.lightbox-bar .info .s{ color: var(--muted); font-size:.9rem; }
.lightbox-close{
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color: var(--text);
  border-radius: 12px;
  padding: 10px 12px;
  font-weight:900;
  cursor:pointer;
}
.lightbox-close:hover{ border-color: rgba(0,191,255,.35); }