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

:root {
  --bg: #1a1a1a;
  --bg-header: #111111;
  --text: #e0e0e0;
  --text-muted: #666666;
  --accent: #ffffff;
  --nav-active: #ffffff;
  --nav-idle: #777777;
  --gap: 10px;
}

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', Helvetica, Arial, sans-serif;
  font-size: 14px;
  font-weight: 300;
  min-height: 100vh;
}

/* HEADER */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-header);
  border-bottom: 1px solid #222222;
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px 32px;
  display: flex;
  align-items: center;
  gap: 48px;
}

.site-name {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 22px;
  font-weight: 400;
  letter-spacing: 0.12em;
  color: var(--accent);
  white-space: nowrap;
}

nav {
  display: flex;
  gap: 32px;
}

.nav-link {
  color: var(--nav-idle);
  text-decoration: none;
  font-family: 'Inter', Helvetica, Arial, sans-serif;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: color 0.25s;
  padding-bottom: 3px;
  border-bottom: 1px solid transparent;
  transition: color 0.25s, border-color 0.25s;
}

.nav-link:hover {
  color: var(--accent);
}

.nav-link.active {
  color: var(--nav-active);
  border-bottom-color: var(--nav-active);
}

/* MAIN */
main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 28px 32px;
  min-height: calc(100vh - 130px);
}

/* GALLERY — masonry via columns */
.gallery {
  column-count: 3;
  column-gap: var(--gap);
}

@media (max-width: 960px) {
  .gallery { column-count: 2; }
}

@media (max-width: 560px) {
  .gallery { column-count: 1; }
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 20px;
  }
  main { padding: 20px; }
}

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

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

.gallery-item:hover img {
  transform: scale(1.02);
  opacity: 0.88;
}

/* LOADING / EMPTY */
.loading, .empty {
  color: var(--text-muted);
  text-align: center;
  padding: 100px 0;
  column-span: all;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* FOOTER */
footer {
  text-align: center;
  padding: 36px 32px;
  color: var(--text-muted);
  font-size: 11px;
  letter-spacing: 0.1em;
  border-top: 1px solid #222222;
}

footer span {
  transition: color 0.2s;
}

footer span:hover {
  color: var(--accent);
}

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

.lightbox.open {
  display: flex;
}

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

.lightbox-img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  display: block;
  box-shadow: 0 8px 60px rgba(0, 0, 0, 0.8);
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: fixed;
  background: none;
  border: none;
  color: #ffffff;
  cursor: pointer;
  line-height: 1;
  opacity: 0.4;
  transition: opacity 0.2s;
  padding: 12px;
  z-index: 1001;
  font-family: 'Inter', sans-serif;
  font-weight: 300;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  opacity: 1;
}

.lightbox-close {
  top: 20px;
  right: 28px;
  font-size: 32px;
  letter-spacing: 0;
}

.lightbox-prev {
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 48px;
}

.lightbox-next {
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 48px;
}
