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

:root {
  --bg: #f5f5f3;
  --bg-card: #ebebea;
  --text: #111111;
  --text-muted: #777;
  --gap: 4px;
  --transition: 0.3s ease;
}

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  user-select: none;
  -webkit-user-select: none;
}

/* ── HEADER ── */
#site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  padding: 22px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(245, 245, 243, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(0,0,0,0.07);
}

.logo {
  font-size: 1.25rem;
  font-weight: 300;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
}

.logo-first {
  font-weight: 600;
}

nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: color var(--transition);
}

nav a:hover {
  color: var(--text);
}

/* ── HERO ── */
.hero {
  padding: 140px 40px 70px;
  border-bottom: 1px solid rgba(0,0,0,0.07);
}

.hero-content {
  max-width: 800px;
}

.hero h1 {
  font-size: clamp(2.8rem, 7vw, 6rem);
  font-weight: 200;
  letter-spacing: 0.04em;
  line-height: 1;
  margin-bottom: 16px;
  color: var(--text);
}

.hero h1 strong {
  font-weight: 600;
}

.hero-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.25em;
  text-transform: uppercase;
}

/* ── GALLERY INDEX ── */
.section {
  padding: 50px 40px 70px;
}

.section-label {
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.albums-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
}

.album-card {
  position: relative;
  cursor: pointer;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--bg-card);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.album-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  transition: transform 0.6s ease;
}

.album-card:hover img {
  transform: scale(1.06);
}

.album-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.65) 0%, transparent 55%);
  transition: background 0.3s ease;
}

.album-card:hover::after {
  background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.1) 100%);
}

.album-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 18px 20px;
  z-index: 1;
}

.album-label h3 {
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  margin-bottom: 2px;
}

.album-label .photo-count {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.08em;
}

/* ── GALLERY PAGE ── */
.gallery-header {
  padding: 95px 40px 36px;
  display: flex;
  align-items: center;
  gap: 24px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  margin-bottom: 4px;
}

.back-btn {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: color var(--transition);
  flex-shrink: 0;
}

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

.gallery-page-title {
  font-size: 1.3rem;
  font-weight: 300;
  letter-spacing: 0.08em;
}

.photos-grid {
  padding: 4px 40px 60px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--gap);
}

.photo-thumb {
  position: relative;
  cursor: pointer;
  overflow: hidden;
  aspect-ratio: 3 / 2;
  background: var(--bg-card);
}

.photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  transition: transform 0.4s ease, filter 0.4s ease;
}

.photo-thumb:hover img {
  transform: scale(1.04);
  filter: brightness(1.08);
}

/* ── EMPTY STATE ── */
.empty-state {
  grid-column: 1 / -1;
  padding: 80px 40px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

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

.lightbox.active {
  display: flex;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  display: block;
}

.lightbox-controls {
  position: absolute;
  top: 14px;
  right: 18px;
  display: flex;
  gap: 4px;
  z-index: 2;
}

.lightbox-btn {
  color: rgba(0,0,0,0.4);
  font-size: 1.2rem;
  cursor: pointer;
  background: none;
  border: none;
  line-height: 1;
  padding: 8px 10px;
  transition: color var(--transition);
}

.lightbox-btn:hover { color: #111; }
.lightbox-btn.active { color: #111; }

.lightbox:fullscreen,
.lightbox:-webkit-full-screen {
  background: #000;
}

.lightbox:fullscreen .lightbox-img,
.lightbox:-webkit-full-screen .lightbox-img {
  max-width: 100vw;
  max-height: 100vh;
}

.lightbox:fullscreen .lightbox-btn,
.lightbox:fullscreen .lightbox-prev,
.lightbox:fullscreen .lightbox-next,
.lightbox:fullscreen .lightbox-counter {
  color: rgba(255,255,255,0.5);
}

.lightbox:fullscreen .lightbox-btn:hover,
.lightbox:fullscreen .lightbox-prev:hover,
.lightbox:fullscreen .lightbox-next:hover {
  color: #fff;
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(0,0,0,0.25);
  font-size: 3rem;
  cursor: pointer;
  background: none;
  border: none;
  padding: 20px 16px;
  line-height: 1;
  transition: color var(--transition);
  user-select: none;
}

.lightbox-prev { left: 0; }
.lightbox-next { right: 0; }
.lightbox-prev:hover,
.lightbox-next:hover { color: rgba(0,0,0,0.8); }

.lightbox-counter {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(0,0,0,0.35);
  font-size: 0.78rem;
  letter-spacing: 0.15em;
}

/* ── FOOTER ── */
footer {
  padding: 28px 40px;
  border-top: 1px solid rgba(0,0,0,0.07);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .albums-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  #site-header { padding: 16px 20px; }
  .hero { padding: 40px 20px; }
  .section { padding: 36px 20px 50px; }
  .albums-grid { grid-template-columns: 1fr; }
  .gallery-header { padding: 80px 20px 28px; }
  .photos-grid { padding: 4px 20px 50px; grid-template-columns: repeat(2, 1fr); }
  .lightbox-prev { left: 0; }
  .lightbox-next { right: 0; }
}
