/* ============================================
   SKULL INK - Portfolio Page Styles
   ============================================ */

/* ============================================
   PORTFOLIO HEADER
   ============================================ */
.portfolio-header {
  padding-top: 140px;
  padding-bottom: 48px;
  background: var(--bg-base);
}

/* ============================================
   FILTER BAR
   ============================================ */
.filter-bar {
  position: sticky;
  top: 60px;
  z-index: var(--z-nav);
  background: rgba(8, 8, 8, 0.95);
  backdrop-filter: blur(20px);
  padding: 16px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.filter-bar__inner {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 10px 20px;
  border: 1px solid var(--border-subtle);
  background: transparent;
  font-family: var(--font-body);
  font-size: var(--text-small);
  font-weight: 500;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-normal);
}

.filter-btn:hover {
  border-color: var(--text-primary);
  color: var(--text-primary);
}

.filter-btn.active {
  background: var(--text-primary);
  color: var(--bg-base);
  border-color: var(--text-primary);
}

/* ============================================
   GALLERY GRID (Masonry)
   ============================================ */
.gallery-section {
  padding: 48px 0 96px;
  background: var(--bg-base);
}

.gallery-grid {
  columns: 3;
  column-gap: 12px;
}

.gallery-item {
  break-inside: avoid;
  margin-bottom: 12px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.gallery-item__image {
  width: 100%;
  height: auto;
  display: block;
  transition: transform var(--transition-slow), filter var(--transition-normal);
}

.gallery-item:hover .gallery-item__image {
  transform: scale(1.04);
  filter: brightness(1.1);
}

.gallery-item__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.gallery-item:hover .gallery-item__overlay {
  opacity: 1;
}

.gallery-item__label {
  font-family: var(--font-accent);
  font-size: var(--text-small);
  letter-spacing: var(--tracking-wide);
  color: var(--text-primary);
  text-transform: uppercase;
  padding: 12px 24px;
  border: 1px solid var(--text-primary);
}

/* Hidden state for filtering */
.gallery-item.hidden {
  display: none;
}

/* ============================================
   LIGHTBOX
   ============================================ */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: var(--z-modal);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox__content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox__image {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  transform: scale(0.9);
  opacity: 0;
  transition: all var(--transition-smooth);
}

.lightbox.active .lightbox__image {
  transform: scale(1);
  opacity: 1;
}

.lightbox__info {
  margin-top: 24px;
  text-align: center;
}

.lightbox__title {
  font-family: var(--font-display);
  font-size: var(--text-h3);
  color: var(--text-primary);
  margin-bottom: 8px;
}

.lightbox__meta {
  font-family: var(--font-body);
  font-size: var(--text-small);
  color: var(--text-secondary);
}

.lightbox__meta span {
  margin: 0 8px;
}

.lightbox__close {
  position: absolute;
  top: -48px;
  right: 0;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 24px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all var(--transition-normal);
}

.lightbox__close:hover {
  background: var(--text-primary);
  color: var(--bg-base);
}

.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 20px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all var(--transition-normal);
}

.lightbox__nav:hover {
  background: var(--text-primary);
  color: var(--bg-base);
}

.lightbox__nav--prev {
  left: -80px;
}

.lightbox__nav--next {
  right: -80px;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .gallery-grid {
    columns: 2;
  }

  .lightbox__nav--prev {
    left: 16px;
  }

  .lightbox__nav--next {
    right: 16px;
  }
}

@media (max-width: 768px) {
  .gallery-grid {
    columns: 1;
  }

  .filter-bar {
    top: 52px;
  }

  .filter-bar__inner {
    gap: 8px;
  }

  .filter-btn {
    padding: 8px 14px;
    font-size: 11px;
  }

  .lightbox__nav {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }

  .lightbox__nav--prev {
    left: 8px;
  }

  .lightbox__nav--next {
    right: 8px;
  }
}
