*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #080808;
  --bg-header: #0e0e0e;
  --text: #c8c8c8;
  --text-dim: #555;
  --accent: #d4a96a;
  --gap: 6px;
}

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Georgia', 'Times New Roman', serif;
  min-height: 100vh;
}

/* ── Header ── */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-header);
  border-bottom: 1px solid #1a1a1a;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  height: 60px;
}

.site-title {
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.tabs {
  display: flex;
  gap: 0;
}

.tab {
  background: none;
  border: none;
  color: var(--text-dim);
  font-family: inherit;
  font-size: 0.78rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 0 20px;
  height: 60px;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.tab:hover {
  color: var(--text);
}

.tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ── Gallery ── */
main {
  padding: var(--gap);
}

.gallery {
  columns: 3;
  column-gap: var(--gap);
}

@media (max-width: 900px) {
  .gallery { columns: 2; }
}

@media (max-width: 500px) {
  .gallery { columns: 1; }
  header { padding: 0 16px; }
  .site-title { display: none; }
}

.gallery-item {
  break-inside: avoid;
  display: block;
  margin-bottom: var(--gap);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  background: #111;
}

.gallery-item img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 0.4s ease, opacity 0.3s;
  opacity: 0.92;
}

.gallery-item:hover img {
  transform: scale(1.025);
  opacity: 1;
}

/* ── Custom Lightbox ── */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0,0,0,0.96);
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-overlay.hidden {
  display: none;
}

.lb-img-wrap {
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

#lb-img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  display: block;
  opacity: 0;
  transition: opacity 0.25s ease;
}

#lb-img.loaded {
  opacity: 1;
}

.lb-close {
  position: fixed;
  top: 20px;
  right: 28px;
  background: none;
  border: none;
  color: #888;
  font-size: 1.6rem;
  cursor: pointer;
  z-index: 1001;
  line-height: 1;
  transition: color 0.2s;
}

.lb-close:hover {
  color: #fff;
}

.lb-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #555;
  font-size: 3rem;
  cursor: pointer;
  z-index: 1001;
  line-height: 1;
  padding: 0 24px;
  transition: color 0.2s;
  user-select: none;
}

.lb-nav:hover {
  color: #fff;
}

.lb-prev { left: 0; }
.lb-next { right: 0; }
