/* ── Filter (closed state from the design; the open state is a proposal) ── */
.project-filter { margin-top: 40px; }
.project-filter__toggle { width: calc((100% - 40px) / 2); display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 4px 0; border-bottom: 1px solid var(--color-ink); color: var(--color-accent); font-size: 18px; font-weight: 700; line-height: 1.4; cursor: pointer; list-style: none; }
.project-filter__toggle::-webkit-details-marker { display: none; }
.project-filter__chevron { user-select: none; transition: transform var(--transition); }
.project-filter[open] .project-filter__chevron { transform: rotate(90deg); }
/* Smooth open and close: the details content animates its height. Browsers without ::details-content support just toggle. */
.project-filter { interpolate-size: allow-keywords; }
.project-filter::details-content { height: 0; overflow: clip; transition: height 0.3s ease, content-visibility 0.3s ease allow-discrete; }
.project-filter[open]::details-content { height: auto; }
/* Side and bottom padding (with a matching negative margin) keeps the chips' focus outline inside the clipped area. */
.project-filter__panel { display: grid; gap: 20px; padding: 20px 6px 6px; margin-inline: -6px; }
.project-filter__group { border: 0; }
.project-filter__legend { user-select: none; margin-bottom: 8px; font-size: 14px; font-weight: 700; }
.project-filter__options { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-chip { position: relative; }
.filter-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.filter-chip span { user-select: none; display: inline-block; padding: 4px 12px; border: 1px solid var(--color-accent); color: var(--color-accent); font-size: 14px; line-height: 1.5; cursor: pointer; transition: background var(--transition), color var(--transition); }
.filter-chip input:checked + span { background: var(--color-accent); color: var(--color-white); }
.filter-chip input:focus-visible + span { outline: 3px solid var(--color-accent); outline-offset: 2px; }

/* ── Grid (2 columns, larger cards) ─────────────────────────── */
.project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 34px 40px; margin-top: 40px; }
.project-grid .project-card__body { padding: 0 28px 20px; }
.project-grid .project-card__name { font-size: 24px; }
.project-grid .project-card__place { font-size: 17px; }

/* ── Pager and empty state ──────────────────────────────────── */
.pager { display: flex; justify-content: flex-end; gap: 8px; margin-top: 32px; }
.project-list__empty { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; margin-top: 40px; }

@media (prefers-reduced-motion: reduce) {
  .project-filter::details-content { transition: none; }
}

@media (max-width: 720px) {
  .project-filter__toggle { width: 100%; }
  .project-grid { grid-template-columns: 1fr; gap: 20px; }
  .project-grid .project-card__name { font-size: 20px; }
  .project-grid .project-card__place { font-size: 15px; }
}
