/* === Gallery Section Styles === */
#portfolioSection {
  background-color: #111;
  color: #fff;
  padding: 2rem;
  transition: background 0.3s, color 0.3s;
}

#portfolioSection.light {
  background-color: #f4f4f4;
  color: #111;
}

#portfolioSection .gallery-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

#portfolioSection .theme-toggle {
  font-size: 0.9rem;
  cursor: pointer;
}

/* === Gallery Grid === */
#portfolioSection .gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
}

#portfolioSection .gallery-grid img {
  width: 100%;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.25);
}

#portfolioSection .gallery-grid img:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 28px rgba(255, 255, 255, 0.35);
}

#portfolioSection.light .gallery-grid img {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

#portfolioSection.light .gallery-grid img:hover {
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.65);
}

/* === Modal === */
#portfolioSection .gallery-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  visibility: hidden;
  opacity: 0;
  z-index: 9999;
  transition: 0.3s ease;
}

#portfolioSection .gallery-modal.active {
  visibility: visible;
  opacity: 1;
}

#portfolioSection .modal-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
  text-align: center;
}

#portfolioSection .modal-content img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: 8px;
}

#portfolioSection .modal-caption {
  margin-top: 10px;
  font-size: 1rem;
  color: #ccc;
}

/* === Modal Buttons === */
#portfolioSection .nav-btn,
#portfolioSection .close-btn {
  position: absolute;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  font-size: 2rem;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  cursor: pointer;
}

#portfolioSection .close-btn {
  top: -20px;
  right: -20px;
  background: #fff;
  color: #000;
}

#portfolioSection .nav-btn.prev {
  left: -50px;
  top: 50%;
  transform: translateY(-50%);
}

#portfolioSection .nav-btn.next {
  right: -50px;
  top: 50%;
  transform: translateY(-50%);
}

/* === Responsive Adjustments === */
@media (max-width: 600px) {
  #portfolioSection .nav-btn.prev {
    left: -30px;
  }

  #portfolioSection .nav-btn.next {
    right: -30px;
  }
}
