/* ==========================================================================
   gallery.css — conference & academic travel photos.
   Loaded only on /gallery/; tokens come from theme.css.
   ========================================================================== */

.gallery-intro {
  padding-bottom: 26px;
  margin-bottom: 40px;
  border-bottom: 1px solid var(--border);
}
.gallery-intro .kicker {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 9px;
}
.gallery-intro .kicker::before { content: "// "; opacity: 0.45; }
.gallery-intro h1 { font-size: clamp(1.6rem, 4vw, 2.1rem); margin-bottom: 8px; }
.gallery-intro p { color: var(--text-muted); font-size: 0.95rem; max-width: 600px; }

/* --------------------------------------------------------------------------
   Album block
   -------------------------------------------------------------------------- */
.album { margin-bottom: 52px; }

.album-head {
  border-left: 3px solid var(--accent);
  padding-left: 15px;
  margin-bottom: 20px;
}
.album-head h2 {
  font-size: 1.22rem;
  margin-bottom: 8px;
}
.album-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-dim);
}
.album-meta i { margin-right: 5px; color: var(--accent); opacity: 0.8; }

.album-badge {
  background: var(--accent);
  color: var(--accent-text);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.66rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.album-desc {
  margin-top: 10px;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 620px;
}

/* --------------------------------------------------------------------------
   Photo grid
   -------------------------------------------------------------------------- */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
}

.photo {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  cursor: zoom-in;
  transition: transform 0.26s var(--ease), box-shadow 0.26s var(--ease),
              border-color 0.26s var(--ease);
}
.photo:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}

.photo img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--bg-subtle);
}

.photo figcaption {
  padding: 9px 12px;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.45;
  border-top: 1px solid var(--border);
}

/* --------------------------------------------------------------------------
   Empty state
   -------------------------------------------------------------------------- */
.gallery-empty {
  text-align: center;
  padding: 66px 20px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  color: var(--text-muted);
}
.gallery-empty i {
  font-size: 2rem;
  color: var(--accent);
  opacity: 0.4;
  margin-bottom: 16px;
}
.gallery-empty h2 { font-size: 1.05rem; margin-bottom: 8px; }
.gallery-empty p { font-size: 0.88rem; max-width: 420px; margin: 0 auto; }
.gallery-empty code {
  font-family: var(--font-mono);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.84em;
  color: var(--code-text);
}

/* --------------------------------------------------------------------------
   Lightbox
   -------------------------------------------------------------------------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(8, 8, 10, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 70px;
  backdrop-filter: blur(6px);
}
.lightbox[hidden] { display: none; }

.lb-stage {
  margin: 0;
  max-width: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.lb-stage img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}
.lb-stage figcaption {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.86rem;
  text-align: center;
  max-width: 620px;
  line-height: 1.5;
}

.lb-close,
.lb-nav {
  position: absolute;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease);
}
.lb-close:hover,
.lb-nav:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.5);
}

.lb-close {
  top: 22px;
  right: 26px;
  width: 40px;
  height: 40px;
  font-size: 1.5rem;
  line-height: 1;
}
.lb-nav {
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  font-size: 1.1rem;
}
.lb-prev { left: 18px; }
.lb-next { right: 18px; }

@media (max-width: 640px) {
  .lightbox { padding: 20px 12px; }
  .lb-nav { width: 38px; height: 38px; }
  .lb-prev { left: 6px; }
  .lb-next { right: 6px; }
  .photo-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
}
