.collection-section {
  padding-bottom: 96px;
}
.v5 .project-topics { display: flex; flex-wrap: wrap; gap: 6px 14px; list-style: none; padding: 0; margin: 16px 0 0; font-size: 12px; color: var(--teal); }
.project-topics li { border-bottom: 1px solid var(--border); padding-bottom: 3px; }
.project-card > .project-stack { font-size: 12px; margin-top: 12px; }
.project-stack > span { color: var(--body); font-weight: 500; margin-right: 6px; }
.cover-placeholder { display: flex; height: 100%; flex-direction: column; justify-content: center; gap: 12px; padding: 40px; color: var(--muted); font-size: 13px; }
.cover-placeholder strong { font-size: 28px; color: var(--ink); font-weight: 500; }
.v5 .draft-preview-note { background: var(--accent-soft); color: var(--ink); padding: 16px 20px; margin-top: 24px; border-left: 3px solid var(--accent); border-radius: 0 8px 8px 0; font-size: 14px; max-width: 760px; }
@media (max-width: 700px) { .filter-main-row > label:first-child { min-width: 100%; } .filter-main-row > label:nth-child(2) { flex: 1; } .collection-filters .topic-filters label:first-child { width: auto; min-width: 0; } }
.collection-filters {
  display: flex;
  align-items: end;
  gap: 16px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 24px 0;
}
.collection-filters label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}
.collection-filters label:first-child {
  flex: 1;
}
.collection-filters input,
.collection-filters select {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--body);
  padding: 11px 14px;
  min-height: 48px;
  font-size: 14px;
  max-width: 100%;
  min-width: 0;
}
.collection-filters input {
  width: 100%;
}
.collection-filters select {
  min-width: 180px;
}
.collection-filters input::placeholder {
  color: var(--muted);
}
.collection-filters .button {
  min-height: 48px;
  gap: 28px;
}
.collection-filters .text-link {
  font-size: 13px;
}
.collection-summary {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 0 32px;
  font-size: 12px;
  color: var(--muted);
}
.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 48px 32px;
}
.project-card {
  display: block;
  min-width: 0;
}
.project-image {
  position: relative;
  background: var(--soft);
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 16/10;
  border: 1px solid #e0cdb866;
}
.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
  transition: transform 0.2s ease-out;
}
.project-card:hover .project-image img {
  transform: scale(1.015);
}
.project-arrow {
  position: absolute;
  right: 16px;
  bottom: 16px;
  background: var(--surface);
  color: var(--body);
  width: 44px;
  height: 44px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  border: 1px solid var(--border);
}
.cover-initial {
  display: flex;
  height: 100%;
  align-items: center;
  justify-content: center;
  font-size: 80px;
  color: var(--muted);
}
.project-meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin: 20px 0 12px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}
.project-card h2,
.project-card h3 {
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: -0.035em;
  text-wrap: initial;
}
.project-card > p {
  font-size: 16px;
  line-height: 1.65;
  color: var(--muted);
  margin-top: 14px;
  max-width: 540px;
}
.project-read {
  display: inline-flex;
  gap: 24px;
  align-items: center;
  min-height: 44px;
  margin-top: 16px;
  color: var(--teal);
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 6px;
  text-decoration-color: #2c5a6d55;
}
.project-card:hover .project-read {
  text-decoration-color: var(--teal);
}
.album-grid .project-image {
  aspect-ratio: 4/3;
}
.album-grid .project-image img {
  object-position: 50% 40%;
}
.album-grid h2 {
  font-size: 26px;
}
.category-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 48px;
}
.category-grid > a {
  padding: 32px 0;
  border-top: 1px solid var(--border);
}
.category-grid > a > span {
  font-size: 12px;
  color: var(--muted);
}
.category-grid h2 {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  font-size: 28px;
  margin-top: 16px;
}
.category-grid h2 > span {
  font-size: 23px;
  color: var(--teal);
}
.category-grid > a:hover h2 {
  text-decoration: underline;
  text-underline-offset: 6px;
  text-decoration-thickness: 1px;
}
@media (max-width: 900px) {
  .collection-filters {
    flex-wrap: wrap;
  }
  .collection-filters label:first-child {
    min-width: 40%;
  }
  .collection-filters select {
    min-width: 160px;
  }
  .collection-filters .button {
    gap: 18px;
  }
  .project-grid {
    gap: 40px 24px;
  }
  .project-card h2,
  .project-card h3 {
    font-size: 25px;
  }
  .project-card > p {
    font-size: 15px;
  }
}
@media (max-width: 700px) {
  .collection-section {
    padding-bottom: 64px;
  }
  .collection-filters {
    gap: 16px;
    padding: 20px 0;
  }
  .collection-filters label:first-child {
    width: 100%;
    flex: auto;
  }
  .collection-filters label:nth-child(2) {
    flex: 1;
  }
  .collection-filters select {
    min-width: 0;
    width: 100%;
  }
  .collection-filters input {
    font-size: 16px;
  }
  .collection-filters .button {
    padding: 11px 16px;
    font-size: 13px;
  }
  .collection-summary {
    padding: 20px 0 24px;
    font-size: 11px;
    gap: 16px;
  }
  .project-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .project-meta {
    margin-top: 16px;
    font-size: 12px;
  }
  .project-card h2,
  .project-card h3 {
    font-size: 26px;
  }
  .project-card > p {
    font-size: 16px;
    margin-top: 12px;
  }
  .project-read {
    font-size: 13px;
    margin-top: 12px;
  }
  .project-image {
    border-radius: 8px;
  }
  .project-arrow {
    right: 12px;
    bottom: 12px;
  }
  .category-grid {
    grid-template-columns: 1fr;
  }
  .category-grid > a {
    padding: 24px 0;
  }
  .category-grid h2 {
    font-size: 26px;
  }
  .album-grid h2 {
    font-size: 25px;
  }
}

/* Compact native filters: checkbox styling stays isolated from text inputs. */
.collection-filters.work-filters { display: block; padding: 20px 0; }
.filter-main-row { display: grid; grid-template-columns: minmax(180px,1fr) minmax(210px,.65fr) auto auto; gap: 12px; align-items: end; }
.collection-filters.work-filters label { min-width: 0; width: auto; }
.collection-filters.work-filters input[type="search"], .collection-filters.work-filters select { min-height: 44px; padding: 9px 12px; width: 100%; }
.collection-filters.work-filters .button { min-height: 44px; gap: 14px; }
.tag-disclosure { margin-top: 16px; }
.tag-disclosure > summary { cursor: pointer; font-size: 13px; color: var(--teal); min-height: 44px; display: flex; align-items: center; gap: 10px; width: fit-content; }
.tag-disclosure > summary::before { content: "+"; font-size: 18px; }
.tag-disclosure[open] > summary::before { content: "−"; }
.tag-disclosure > summary::-webkit-details-marker { display: none; }
.topic-filters { display: flex; flex-wrap: wrap; gap: 8px; border: 0; padding: 4px 0; margin: 0; }
.collection-filters.work-filters .topic-filters label { display: inline-flex; flex: none; flex-direction: row; align-items: center; gap: 7px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 20px; min-height: 44px; font-size: 13px; cursor: pointer; }
.collection-filters.work-filters .topic-filters input[type="checkbox"] { flex: 0 0 14px; width: 14px; height: 14px; min-height: 0; margin: 0; padding: 0; accent-color: var(--teal); }
.topic-filters label:has(:checked) { background: var(--teal-soft); border-color: var(--teal); color: var(--teal); }
.topic-filters label:focus-within { outline: 2px solid var(--teal); outline-offset: 3px; }
@media(max-width:700px) { .filter-main-row { grid-template-columns: minmax(0,1fr) auto; } .filter-main-row > label:first-child { grid-column: 1/-1; } .collection-filters.work-filters input[type="search"], .collection-filters.work-filters select { font-size: 16px; } }

.topic-filters legend.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
