@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;700;900&display=swap');

body, html {
  margin: 0; padding: 0;
  font-family: 'Inter', sans-serif;
  background-color: #000;
  color: #fff;
  overflow-x: hidden;
  /* FIXED: Smooth transition added */
  transition: background-color 0.6s ease, color 0.6s ease;
}

body.light { background-color: #fafafa; color: #000; }

/* --- UI ELEMENTS (Logo & Theme Toggle) --- */
.corner-icon {
  position: fixed; top: 8px; left: 15px; z-index: 2000;
  transition: transform 0.3s ease;
}
.corner-icon img { width: 50px; height: 50px; }
.corner-icon:hover { transform: scale(1.1) rotate(-3deg); }

#theme-toggle {
  position: fixed; top: 10px; right: 15px;
  background: none; border: 1px solid currentColor;
  border-radius: 50%; width: 50px; height: 50px;
  cursor: pointer; color: inherit;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; z-index: 2000;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
#theme-toggle:hover { opacity: 0.7; transform: rotate(15deg); }


/* --- REFINED GRID --- */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px 20px 60px; /* Increased top padding since nav bar is gone */
  text-align: center;
}

.title { font-size: clamp(2.5rem, 8vw, 5rem); font-weight: 900; line-height: 0.9; margin-bottom: 50px; }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.gallery-item {
  position: relative; overflow: hidden;
  border-radius: 4px; background: #111;
  transition: transform 0.4s ease;
}

.gallery-item img {
  width: 100%; height: 100%; object-fit: cover;
  transition: 0.8s ease; filter: brightness(0.8);
}

.gallery-item:hover img { filter: brightness(1); transform: scale(1.05); }

.tall { grid-row: span 2; }
.wide { grid-column: span 2; height: 320px; }
.bottom-crop img { object-position: center top; }

.grid-footer-text {
  margin-top: 40px;
  font-size: 0.85rem;
  opacity: 0.6;
  letter-spacing: 0.5px;
}

/* --- LIGHTBOX STYLES --- */
.lightbox-overlay {
  display: none;
  position: fixed; inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.9); 
  backdrop-filter: blur(15px);
  flex-direction: column;
  align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.4s ease;
}

.lightbox-overlay.visible { display: flex; opacity: 1; }

.lightbox-caption {
  font-weight: 900; letter-spacing: 5px;
  margin-bottom: 20px; 
  font-size: 1.5rem; color: #fff;
  z-index: 10001; text-align: center;
  position: relative;
}

.lightbox-description {
  margin-top: 20px;
  font-size: 0.9rem;
  color: #fff;
  opacity: 0.7;
  max-width: 700px;
  text-align: center;
  line-height: 1.5;
  z-index: 10001;
  padding: 0 20px;
  position: relative;
}

.modal-content {
  position: relative;
  display: flex; justify-content: center; align-items: center;
  width: 100%; height: auto; 
}

.modal-content img {
  max-width: 85vw; max-height: 70vh; 
  box-shadow: 0 30px 60px rgba(0,0,0,0.8);
  animation: modalFadeIn 0.5s ease;
  cursor: zoom-in; 
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  /* FIXED: Permanent higher z-index prevents text overlap on shrink */
  position: relative;
  z-index: 10005; 
}

.modal-content img.zoomed {
  transform: scale(1.7); 
  cursor: zoom-out;
}

/* --- LIGHTBOX CONTROLS --- */
.lb-btn {
  position: absolute;
  background: none; border: none;
  color: white; font-size: 3rem;
  cursor: pointer; z-index: 10010; /* Put buttons on top of everything */
  transition: transform 0.2s, opacity 0.2s;
  opacity: 0.6;
}
.lb-btn:hover { opacity: 1; transform: scale(1.1); }

.lb-btn.prev { left: 30px; top: 50%; transform: translateY(-50%); }
.lb-btn.next { right: 30px; top: 50%; transform: translateY(-50%); }
.lb-btn.close { 
  top: 20px; right: 30px; 
  font-size: 3.5rem; line-height: 1; 
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.copyright { margin-top: 60px; opacity: 0.3; font-size: 0.8rem; }

@media (max-width: 768px) {
  .gallery-grid { grid-template-columns: 1fr; }
  .wide { grid-column: auto; height: 300px; }
  .lb-btn.prev { left: 10px; }
  .lb-btn.next { right: 10px; }
  .modal-content img.zoomed { transform: scale(1.3); } 
}