/* ===========================
   Project Hero
   =========================== */
.project-hero {
  padding: 14rem 3rem 6rem;
  border-bottom: 1px solid var(--border);
  position: relative;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.project-hero-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 5rem;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color var(--transition);
}

.back-link:hover {
  color: var(--text-primary);
}

.back-link svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
  transition: transform var(--transition);
}

.back-link:hover svg {
  transform: translateX(-4px);
}

.project-hero-number {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.project-hero-title {
  font-family: var(--font-serif);
  font-size: clamp(3rem, 8vw, 8rem);
  font-weight: 400;
  line-height: 0.93;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  margin-bottom: 5rem;
}

.project-hero-meta {
  display: flex;
  gap: 5rem;
  border-top: 1px solid var(--border);
  padding-top: 2.5rem;
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.meta-label {
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.meta-value {
  font-size: 0.9rem;
  color: var(--text-primary);
}

/* ===========================
   Gallery
   =========================== */
.gallery {
  padding: 5rem 3rem;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1rem;
}

/* Layout classes assigned by JS */
.gallery-item {
  overflow: hidden;
  cursor: pointer;
  background-color: var(--bg-card);
  position: relative;
}

.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  transition: background 0.4s ease;
  pointer-events: none;
}

.gallery-item:hover::after {
  background: rgba(0, 0, 0, 0.15);
}

.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

/* Wide — full 12 cols */
.gallery-item--wide {
  grid-column: span 12;
}

/* Half — 6 cols each */
.gallery-item--half {
  grid-column: span 6;
}

/* Third — 4 cols each */
.gallery-item--third {
  grid-column: span 4;
}

/* Tall — 5 cols */
.gallery-item--tall {
  grid-column: span 5;
}

/* Big — 7 cols */
.gallery-item--big {
  grid-column: span 7;
}

/* ===========================
   Project Navigation
   =========================== */
.project-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 3rem;
  border-top: 1px solid var(--border);
  margin-top: 2rem;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.project-nav-link {
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.project-nav-link:hover {
  color: var(--text-primary);
}

/* ===========================
   Lightbox
   =========================== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(250, 248, 244, 0.97);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.lightbox.active {
  opacity: 1;
  pointer-events: all;
}

.lightbox-content {
  display: flex;
  align-items: center;
  justify-content: center;
  width: calc(100vw - 160px);
  height: calc(100vh - 120px);
}

.lightbox-content img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  user-select: none;
  transform: scale(0.96);
  transition: transform 0.35s var(--ease);
}

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

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: color var(--transition);
  line-height: 1;
  padding: 0.5rem;
  font-family: var(--font-sans);
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  color: var(--text-primary);
  cursor: none;
}

.lightbox-close {
  top: 2rem;
  right: 2.5rem;
  font-size: 1.5rem;
  font-weight: 300;
}

.lightbox-prev {
  left: 2.5rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2.5rem;
  font-weight: 200;
}

.lightbox-next {
  right: 2.5rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2.5rem;
  font-weight: 200;
}

.lightbox-counter {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

/* ===========================
   Responsive — Mobile
   =========================== */
@media (max-width: 768px) {
  .project-hero {
    padding: 8rem 1.5rem 4rem;
  }

  .project-hero-top {
    margin-bottom: 3rem;
  }

  .project-hero-meta {
    gap: 2.5rem;
    flex-wrap: wrap;
  }

  .gallery {
    padding: 3rem 1rem;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }

  .gallery-item--wide {
    grid-column: span 2;
    aspect-ratio: 4 / 3;
  }

  .gallery-item--half,
  .gallery-item--tall,
  .gallery-item--big {
    grid-column: span 2;
    aspect-ratio: 4 / 3;
  }

  .gallery-item--third {
    grid-column: span 1;
    aspect-ratio: 1;
  }

  .project-nav {
    padding: 2rem 1.5rem;
  }

  .lightbox-content {
    width: 100vw;
    height: calc(100vh - 100px);
  }

  .lightbox-prev {
    left: 0.75rem;
  }

  .lightbox-next {
    right: 0.75rem;
  }
}
