/* ─── PROJECTS PAGE ──────────────────────────────────────────────
   A small sticky filter list on the left, the project cards on the
   right. Cards reuse .cases / .case from site.css.
   ─────────────────────────────────────────────────────────────── */

.pj {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
  padding-top: clamp(48px, 6vw, 88px);
}

.pj__side { position: sticky; top: 40px; }
.pj__title { font-size: 14px; font-weight: 500; letter-spacing: -0.01em; line-height: 1.3; }
.pj__intro { margin-top: 6px; font-size: 13px; line-height: 1.5; color: var(--ink-3); }

.pj__filters { display: flex; flex-direction: column; margin-top: 18px; }
.pj__filter {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 0;
  font-size: 13px;
  line-height: 1.4;
  color: var(--ink-3);
  text-align: left;
  white-space: nowrap;
  transition: color 200ms var(--ease), padding 300ms var(--ease);
}
.pj__filter:hover { color: var(--ink-2); }
.pj__filter.is-active { color: var(--ink); padding-left: 10px; }
/* The active filter gets a short accent bar, like the case-study side nav */
.pj__filter::before {
  content: '';
  position: absolute;
  left: 0;
  top: 7px;
  bottom: 7px;
  width: 2px;
  border-radius: 1px;
  background: var(--accent);
  opacity: 0;
  transition: opacity 200ms var(--ease);
}
.pj__filter.is-active::before { opacity: 1; }
.pj__count { font-variant-numeric: tabular-nums; }

.pj__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 20px; }
/* Projects without a case study yet: the card opens the live site */
.tag--soon { border-color: transparent; background: var(--accent-soft); color: var(--accent-ink); font-weight: 500; }
.pj__grid .case.is-hidden { display: none; }
.pj__grid .case.is-entering { animation: pj-in 500ms var(--ease) both; animation-delay: var(--stagger, 0ms); }
@keyframes pj-in { from { opacity: 0; transform: translateY(12px); } }

@media (max-width: 860px) {
  .pj { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .pj__side { position: static; }
  /* The filters sit in a row and wrap onto a second line if they need to */
  .pj__filters { flex-direction: row; flex-wrap: wrap; gap: 0 20px; margin-top: 14px; }
  .pj__filters li { flex: none; }
}

@media (max-width: 640px) {
  .pj__grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  .pj__grid .case.is-entering { animation: none; }
}
