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

body {
  font-family: 'Montserrat', sans-serif;
  background: #f8f7f5;
  color: #3a3a3a;
  -webkit-font-smoothing: antialiased;
}

/* Header */
header {
  text-align: center;
  padding: 3.5rem 1rem 1rem;
}

.header-date {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: #a09890;
  margin-bottom: 0.5rem;
}

header h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 3.2rem;
  font-weight: 300;
  letter-spacing: 0.06em;
  color: #4a4340;
}

.header-line {
  width: 40px;
  height: 1px;
  background: #c8b8a8;
  margin: 1.2rem auto 0;
}

/* Nav */
nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
  padding: 1.5rem 2rem 1.8rem;
  position: sticky;
  top: 0;
  background: rgba(248, 247, 245, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 10;
}

nav button {
  background: none;
  border: none;
  padding: 0.45rem 1rem;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 20px;
  transition: all 0.25s ease;
  color: #998f85;
}

nav button:hover {
  color: #5a504a;
  background: rgba(0,0,0,0.04);
}

nav button.active {
  background: #5a504a;
  color: #f8f7f5;
}

/* Gallery */
#gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 0 6px 4rem;
  max-width: 1600px;
  margin: 0 auto;
}

.photo {
  position: relative;
  cursor: pointer;
  overflow: hidden;
  border-radius: 1px;
  line-height: 0;
  aspect-ratio: 3 / 2;
  background: #f0eeeb;
}

.photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.photo:hover img {
  transform: scale(1.03);
}

/* Hearts on thumbnails */
.photo-heart {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: none;
  color: rgba(255,255,255,0.9);
  font-size: 1rem;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease;
  line-height: 1;
}

.photo:hover .photo-heart, .photo-heart.liked { opacity: 1; }
.photo-heart.liked { color: #e25555; background: rgba(0,0,0,0.45); }

.empty-msg {
  grid-column: 1 / -1;
  text-align: center;
  padding: 6rem 1rem;
  color: #b0a89e;
  font-size: 0.85rem;
  font-weight: 300;
  letter-spacing: 0.05em;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(15,12,10,0.96);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox[hidden] { display: none; }

#lightbox-img {
  max-width: 92vw;
  max-height: 90vh;
  object-fit: contain;
  user-select: none;
}

.lightbox-close, .lightbox-prev, .lightbox-next {
  position: fixed;
  background: none;
  border: none;
  color: rgba(255,255,255,0.6);
  cursor: pointer;
  font-size: 1.8rem;
  padding: 1.2rem;
  transition: color 0.2s;
  z-index: 101;
  font-weight: 300;
}

.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover { color: #fff; }
.lightbox-close { top: 0; right: 0.5rem; font-size: 2rem; }
.lightbox-prev { left: 0.5rem; top: 50%; transform: translateY(-50%); font-size: 2.5rem; }
.lightbox-next { right: 0.5rem; top: 50%; transform: translateY(-50%); font-size: 2.5rem; }

.lightbox-actions {
  position: fixed;
  top: 1rem;
  left: 1rem;
  display: flex;
  gap: 0.6rem;
  z-index: 101;
}

.lightbox-btn {
  background: rgba(255,255,255,0.1);
  border: none;
  color: rgba(255,255,255,0.7);
  font-size: 1.3rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  text-decoration: none;
  line-height: 1;
}

.lightbox-btn:hover { background: rgba(255,255,255,0.2); color: #fff; }
.lightbox-btn.liked { color: #e25555; }

.lightbox-counter {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.4);
  font-family: 'Montserrat', sans-serif;
  font-size: 0.7rem;
  font-weight: 300;
  letter-spacing: 0.15em;
}

/* Responsive */
@media (max-width: 1200px) { #gallery { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 800px) {
  #gallery { grid-template-columns: repeat(2, 1fr); }
  header h1 { font-size: 2.4rem; }
  nav { padding: 1rem 1rem 1.2rem; }
}
@media (max-width: 500px) {
  #gallery { grid-template-columns: repeat(2, 1fr); gap: 3px; padding: 0 3px 4rem; }
  header { padding: 2.5rem 1rem 0.5rem; }
  header h1 { font-size: 2rem; }
  nav button { font-size: 0.6rem; padding: 0.4rem 0.75rem; }
}
