/* ============================================================
   PROJECTS.CSS — Projects listing page styles
   Extends style.css (which must load first)
============================================================ */

/* ──────────────────────────────────────────────
   PAGE HEADER
────────────────────────────────────────────── */
.page-header {
  padding: 220px 0 32px;
}

.page-header-inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
}

.page-header-left {
  display: flex;
  align-items: baseline;
  gap: 20px;
}

.page-title {
  font-family: var(--font-heading);
  font-size: clamp(52px, 8vw, 108px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
}

.page-header-right {
  max-width: 320px;
  flex-shrink: 0;
}

.page-subtitle {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.65;
  text-align: right;
}

/* ──────────────────────────────────────────────
   FILTER BAR
────────────────────────────────────────────── */
.filter-bar {
  padding: 16px 0 0;
}

.filter-bar-inner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 20px;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: 100px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  background: white;
  color: var(--text-muted);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.22s ease, color 0.22s ease, border-color 0.22s ease;
  white-space: nowrap;
  flex-shrink: 0;
}
.filter-chip:hover {
  color: var(--text);
  border-color: rgba(13,13,13,0.25);
}
.filter-chip.active {
  background: var(--text);
  color: white;
  border-color: var(--text);
}
.filter-chip.active:hover {
  background: #2a2a2a;
}

.filter-count {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  background: rgba(13,13,13,0.1);
  color: inherit;
  border-radius: 100px;
  padding: 1px 6px;
  letter-spacing: 0.03em;
  transition: background 0.22s ease;
}
.filter-chip.active .filter-count {
  background: rgba(255,255,255,0.2);
}

/* ──────────────────────────────────────────────
   PROJECTS GRID (full page override)
────────────────────────────────────────────── */
.projects-page-section {
  padding: 48px 0 120px;
}

/* Override the home page grid spacing on the projects page */
.projects-page-section .projects-grid {
  margin-top: 0;
  gap: 10px;
}

/* ── Card filter states ── */
.project-card {
  transition: opacity 0.28s ease, transform 0.28s ease;
}
.project-card.is-fading {
  opacity: 0;
  transform: scale(0.96);
  pointer-events: none;
}
.project-card.is-hidden {
  display: none;
}

/* ── Card is a full link on the projects page ── */
a.project-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-decoration: none;
  color: inherit;
}

/* ──────────────────────────────────────────────
   EMPTY STATE (no results)
────────────────────────────────────────────── */
.projects-empty {
  grid-column: 1 / -1;
  padding: 80px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 15px;
  display: none;
}
.projects-empty.visible { display: block; }

/* ──────────────────────────────────────────────
   EXTRA GRADIENTS (cards 5–8)
────────────────────────────────────────────── */
.project-gradient-5 { background: linear-gradient(135deg, #1a0f2e 0%, #2d1b6b 50%, #160f2a 100%); }
.project-gradient-6 { background: linear-gradient(135deg, #1a1500 0%, #3d3000 50%, #2a2000 100%); }
.project-gradient-7 { background: linear-gradient(135deg, #001a1a 0%, #003535 50%, #002020 100%); }
.project-gradient-8 { background: linear-gradient(135deg, #1f0a16 0%, #4a1a30 50%, #300d20 100%); }

/* ──────────────────────────────────────────────
   MOBILE
────────────────────────────────────────────── */
@media (max-width: 768px) {
  .page-header { padding: 120px 0 20px; }
  .page-header-inner { flex-direction: row; align-items: center; justify-content: space-between; gap: 16px; }
  .page-header-left { flex-shrink: 0; }
  .page-header-right { flex: 1; max-width: none; }
  .page-subtitle { text-align: right; }
  .filter-bar { padding: 10px 0 0; }
  .filter-bar-inner { gap: 6px; flex-wrap: wrap; overflow-x: visible; }
  .filter-chip { padding: 8px 14px; font-size: 12px; }
  .projects-page-section { padding: 32px 0 80px; }
}
