/* Projects Page Specific Styles */
.projects-page {
  padding-top: 150px;
  min-height: 100vh;
}

.projects-header {
  padding: 4rem 2rem 2rem;
}

/* CSS Masonry Layout */
.masonry {
  column-count: 3;
  column-gap: 1.5rem;
  padding: 2rem 0;
}

@media (max-width: 1024px) {
  .masonry {
    column-count: 2;
  }
}

@media (max-width: 600px) {
  .projects-page {
    padding-top: 100px;
  }
  .projects-header {
    padding: 2rem 1.25rem 1rem;
  }
  .masonry {
    column-count: 1;
    column-gap: 1rem;
    padding: 1rem 0;
  }
  .masonry-item {
    margin-bottom: 1rem;
  }
  .lightbox-close {
    top: 16px;
    right: 20px;
    font-size: 32px;
  }
}

.masonry-item {
  break-inside: avoid-column;
  margin-bottom: 1.5rem;
  position: relative;
  overflow: hidden;
  border-radius: 6px;
  cursor: pointer;
  background: var(--bg-secondary);
}

.masonry-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), filter 0.8s ease;
  will-change: transform;
}

.masonry-item:hover img {
  transform: scale(1.05);
  filter: brightness(0.85);
}

.masonry-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 9, 8, 0.4);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.masonry-item:hover .masonry-overlay {
  opacity: 1;
}

.masonry-icon {
  width: 50px; height: 50px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center; justify-content: center;
  color: #fff;
  font-size: 1.5rem;
  transform: scale(0.5);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.masonry-item:hover .masonry-icon {
  transform: scale(1);
}

/* Lightbox Modal */
.lightbox {
  display: none; 
  position: fixed;
  z-index: 9999;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background-color: rgba(5, 4, 3, 0.95);
  backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.lightbox.active {
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 1;
}

.lightbox-content {
  max-width: 90%;
  max-height: 90vh;
  border-radius: 4px;
  box-shadow: 0 40px 100px rgba(0,0,0,0.8);
  transform: scale(0.9);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.lightbox.active .lightbox-content {
  transform: scale(1);
}

.lightbox-close {
  position: absolute;
  top: 30px; right: 40px;
  color: #fff;
  font-size: 40px;
  font-weight: 300;
  cursor: pointer;
  transition: color 0.3s;
}

.lightbox-close:hover {
  color: var(--accent-gold);
}
