/* ═══════════════════════════════════════════════════════════
   PROJECTS.CSS — Styles for the projects page only
   ═══════════════════════════════════════════════════════════ */

/* ── PAGE HERO ─────────────────────────────────────────── */
#projects-hero {
  min-height: 45vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 140px 60px 40px;
}

.projects-hero-heading {
  font-size: clamp(56px, 9vw, 120px);
}

.underline-bar {
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, #9333ea, #ec4899);
  margin: 16px auto 0;
  transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.underline-bar.active {
  width: 80px;
}

.projects-hero-sub {
  color: var(--grey);
  font-size: 13px;
  margin-top: 20px;
  font-family: 'Space Mono', monospace;
  line-height: 1.8;
  text-align: center;
}

/* ── FILTER BAR ────────────────────────────────────────── */
#filter-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 60px 48px;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-pill {
  border: 1px solid #333;
  border-radius: 999px;
  padding: 10px 28px;
  background: transparent;
  color: var(--grey);
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 2px;
  cursor: none;
  transition: all 0.3s ease;
  margin: 0 6px;
  text-transform: uppercase;
}

.filter-pill:hover {
  color: white;
  border-color: rgba(255, 255, 255, 0.4);
}

.filter-pill.active {
  background: linear-gradient(135deg, #9333ea, #ec4899);
  border-color: transparent;
  color: white;
  box-shadow: 0 0 24px rgba(147, 51, 234, 0.4);
}

/* ── PROJECTS GRID ─────────────────────────────────────── */
#projects-grid {
  padding: 0 60px 100px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  max-width: 1200px;
  margin: 0 auto;
}

/* ── PROJECT CARD ──────────────────────────────────────── */
.proj-card {
  background: #0d0d0d;
  border: 1px solid #1e1e1e;
  border-radius: 22px;
  padding: 36px;
  overflow: hidden;
  transition: transform 0.3s ease, border-color 0.3s ease,
              box-shadow 0.3s ease, opacity 0.35s ease;
  will-change: transform;
}

.proj-card:hover {
  transform: translateY(-8px);
  border-color: rgba(147, 51, 234, 0.3);
  box-shadow: 0 20px 60px rgba(147, 51, 234, 0.15);
}

/* Filtered-out state */
.proj-card.hidden {
  opacity: 0;
  transform: scale(0.95);
  pointer-events: none;
  max-height: 0;
  padding: 0;
  margin: 0;
  border: none;
  overflow: hidden;
}

/* ── CARD TOP ROW ──────────────────────────────────────── */
.proj-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 28px;
  gap: 16px;
}

.proj-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.project-num {
  font-size: 64px;
  font-weight: 800;
  font-family: 'Barlow Condensed', sans-serif;
  color: white;
  line-height: 1;
  display: block;
  margin-bottom: 4px;
}

.project-type-tag {
  display: inline-block;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid #333;
  border-radius: 999px;
  padding: 3px 12px;
  font-size: 10px;
  letter-spacing: 3px;
  color: var(--grey);
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.project-name {
  font-size: 20px;
  font-weight: 700;
  font-family: 'Barlow Condensed', sans-serif;
  color: white;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.proj-live-btn {
  font-size: 11px;
  padding: 8px 20px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── IMAGE GRID ────────────────────────────────────────── */
.proj-img-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 12px;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 24px;
}

.proj-img-left {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.proj-thumb-sm {
  flex: 1;
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.3s ease;
  will-change: transform;
}

.proj-thumb-sm:hover {
  transform: scale(1.04);
}

.proj-thumb-lg {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 12px;
  transition: transform 0.3s ease;
  will-change: transform;
}

.proj-thumb-lg:hover {
  transform: scale(1.04);
}

/* ── CARD BOTTOM ───────────────────────────────────────── */
.proj-bottom {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.proj-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.proj-desc {
  font-size: 12px;
  color: var(--grey);
  font-family: 'Space Mono', monospace;
  line-height: 1.8;
}

/* ── EMPTY STATE ───────────────────────────────────────── */
#empty-state {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 40px;
  text-align: center;
  grid-column: 1 / -1;
}

#empty-state.visible {
  display: flex;
}

#empty-state h3 {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 28px;
  letter-spacing: 1px;
  color: white;
  text-transform: uppercase;
  margin-bottom: 10px;
}

#empty-state p {
  color: var(--grey);
  font-size: 13px;
  font-family: 'Space Mono', monospace;
}

/* ── COMING SOON TEASER ────────────────────────────────── */
.coming-soon-teaser {
  margin: 0 60px 80px;
  padding: 56px;
  background: linear-gradient(135deg, #080808, #0f0f0f);
  border: 1.5px dashed #2a2a2a;
  border-radius: 22px;
  text-align: center;
}

.teaser-label {
  color: #9333ea;
  font-size: 11px;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  letter-spacing: 4px;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.teaser-heading {
  color: white;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  font-size: clamp(28px, 4vw, 48px);
  letter-spacing: -1px;
  text-transform: uppercase;
}

.teaser-body {
  color: var(--grey);
  font-size: 13px;
  font-family: 'Space Mono', monospace;
  line-height: 1.8;
  margin: 16px 0 32px;
}

/* ═══════════════════════════════════════════════════════════
   MOBILE RESPONSIVE — projects page
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  #projects-hero {
    padding: 120px 24px 40px;
  }

  #filter-bar {
    padding: 0 24px 32px;
  }

  #projects-grid {
    grid-template-columns: 1fr;
    padding: 0 24px 60px;
  }

  .proj-img-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 8px;
    height: auto;
  }

  .proj-img-left {
    flex-direction: row;
  }

  .proj-thumb-sm {
    height: 120px;
    flex: 1;
  }

  .proj-thumb-lg {
    height: 150px;
  }

  .proj-top {
    flex-direction: column;
  }

  .coming-soon-teaser {
    margin: 0 24px 60px;
    padding: 40px 24px;
  }
}

/* ═══════════════════════════════════════════════════════════
   LIGHTBOX MODAL
   ═══════════════════════════════════════════════════════════ */
#lightbox-modal {
  display: none; /* Changed via JS when opening/closing or we can keep it flex and toggle visibility */
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

#lightbox-modal.active {
  display: flex;
  opacity: 1;
  visibility: visible;
}

.lightbox-close {
  position: absolute;
  top: 30px;
  right: 40px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 40px;
  font-weight: 300;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 10000;
  line-height: 1;
}

.lightbox-close:hover,
.lightbox-close:focus {
  color: white;
  transform: rotate(90deg);
}

.lightbox-content-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  position: relative;
  padding: 0 80px;
}

#lightbox-img {
  max-height: 85vh;
  max-width: 100%;
  object-fit: contain;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(147, 51, 234, 0.15);
  transform: scale(0.85);
  opacity: 0;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.5s ease;
}

#lightbox-modal.active #lightbox-img {
  transform: scale(1);
  opacity: 1;
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
  font-size: 18px;
  padding: 0;
  cursor: pointer;
  border-radius: 50%;
  transition: all 0.3s ease;
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  z-index: 10000;
}

.lightbox-prev {
  left: 40px;
}

.lightbox-next {
  right: 40px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(147, 51, 234, 0.8);
  border-color: rgba(147, 51, 234, 1);
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 0 24px rgba(147, 51, 234, 0.4);
}

.lightbox-hint {
  position: absolute;
  bottom: 30px;
  color: rgba(255, 255, 255, 0.5);
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  z-index: 10000;
}

/* Ensure images in the grid look clickable */
.proj-img-grid img {
  cursor: pointer;
}

@media (max-width: 768px) {
  .lightbox-content-wrapper {
    padding: 0 16px;
  }
  #lightbox-img {
    max-width: 100%;
    max-height: 80vh;
  }
  .lightbox-prev,
  .lightbox-next {
    display: none; /* Hide arrows on mobile, rely on swipe */
  }
  .lightbox-close {
    top: 20px;
    right: 24px;
    font-size: 36px;
  }
}

