/* ===== GLOBAL ===== */

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #f8f5f1;
  color: #48220a;
}

a {
  color: #48220a;
  text-decoration: none;
}

a:hover {
  color: #aaaaaa;
}

/* ===== HEADER ===== */

.header {
  text-align: center;
  padding: 40px 20px 10px;
}

.header h1 {
  margin: 0;
  font-weight: 500;
  letter-spacing: 1px;
}

.header p {
  margin-top: 10px;
  color: #888;
  font-size: 14px;
}

/* ===== NAV ===== */

.nav {
  text-align: center;
  margin-bottom: 20px;
}

.nav a {
  margin: 0 10px;
  font-size: 14px;
}

/* ===== GRID ===== */

.grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  padding: 40px;
}

@media (max-width: 1200px) {
  .grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 700px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
  opacity: 0.85;
  transition: opacity 0.25s ease, transform 0.25s ease;
  border-radius: 10px;
  
}

.grid img:hover {
  opacity: 1;
  transform: scale(1.02);
}

/* ===== VIEWER ===== */

#viewer {
  position: fixed;
  inset: 0;
  background: rgba(29, 29, 29, 0.95);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.overlay {
  position: relative;
  width: 100%;
  height: 100%;

  display: flex;
  justify-content: center;
  align-items: center;
}

/* 👇 NEW: centers image + exif together */
.viewer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 90%;
  max-height: 90%;
}

.viewer-content img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: 5px;
  box-shadow: 0 0 20px rgba(151, 239, 194, 0.3);
  
}

/* EXIF centered under image */
#exif {
  margin-top: 12px;
  font-size: 13px;
  color: #ccc;
  text-align: center;
  line-height: 1.4;
}

/* arrows */

#prev, #next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #aaa;
  font-size: 30px;
  cursor: pointer;
  padding: 20px;
}

#prev:hover, #next:hover {
  color: white;
}

#prev { left: 10px; }
#next { right: 10px; }

/* close button */

#close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  color: #aaa;
  font-size: 24px;
  cursor: pointer;
}

#close:hover {
  color: white;
}

/* ===== COLLECTION HEADER ===== */

.collection-header {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  text-align: center;
}

.collection-header h2 {
  margin-bottom: 10px;
}

.collection-header p {
  color: #626262;
  font-size: 14px;
}

/* ===== ABOUT ===== */

.about {
  max-width: 700px;
  margin: 60px auto;
  padding: 20px;
  line-height: 1.6;
}

.about h2 {
  margin-bottom: 20px;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 5px solid rgba(255,255,255,0.2);
  border-top: 5px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: auto;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.viewer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

#img {
  max-width: 90vw;
  max-height: 80vh;
}

.fade-in {
  opacity: 0;
  animation: fadeIn 0.6s ease forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}