/* Badge Styles */
.badge {
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  background-color: #f3f4f6;
  color: #1f2937;
}

@media (prefers-color-scheme: dark) {
  .badge {
    background-color: #374151;
    color: #e5e7eb;
  }
}

/* Smooth Scroll */
html {
  scroll-behavior: smooth;
}

/* Mobile nav visibility */
#mobile-nav.hidden {
  display: none;
}

/* Body Styling */
body {
  font-family: 'Georgia', Times New Cambria, Cochin, Georgia, Times, 'Times New Roman', serif, Garamond, serif;
  font-size: 1rem;
  line-height: 1.6;
  color: #1f2937;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Dark Mode Body */
.dark body {
  color: #e5e7eb;
}
body {
  background: linear-gradient(to bottom right, #f9fafb, #dbeafe);
}
html.dark body {
  background: linear-gradient(to bottom right, #111827, #1f2937);
}

/* -------------------
   NAVBAR
-------------------- */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: #ffffff;
  color: #1f2937;
  z-index: 1000;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.dark header {
  background-color: #1f2937;
  color: #ffffff;
}

header nav a {
  color: inherit;
  transition: color 0.2s ease;
}

header nav a:hover {
  color: #2563eb;
}

/* -------------------
   MASONRY GALLERY
-------------------- */
#gallery-grid {
  column-count: 3;       /* Masonry layout */
  column-gap: 1rem;
}

.gallery-item {
  display: inline-block;
  width: 100%;
  margin-bottom: 1rem;
}

.gallery-item img {
  width: 100%;
  border-radius: 0.5rem;
  transition: transform 0.3s ease;
  cursor: pointer;
}

.gallery-item img:hover {
  transform: scale(1.05);
}

/* Responsive columns */
@media (max-width: 768px) {
  #gallery-grid {
    column-count: 2;
  }
}
@media (max-width: 480px) {
  #gallery-grid {
    column-count: 1;
  }
}


/* Lightbox Overlay */
#lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  display: none; /* hidden by default */
  align-items: center;
  justify-content: center;
  z-index: 9999; /* bring above everything */
  transition: opacity 0.3s ease;
}

#lightbox img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
}

#lightbox:not(.hidden) {
  display: flex;
}

/* Close Button */
#close-lightbox {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 2rem;
  color: white;
  cursor: pointer;
  z-index: 10000;
}

#next-lightbox, #prev-lightbox {
  position: absolute;
  top: 50%;
  font-size: 2.5rem;
  color: white;
  cursor: pointer;
  transform: translateY(-50%);
  z-index: 10000;
}

#next-lightbox {
  right: 20px;
}

#prev-lightbox {
  left: 20px;
}

