.collection-section {
  padding: 64px 0 100px;
  border-top: 1px solid var(--hair);
  background: #080809;
}

.collection-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 28px;
  margin-bottom: 36px;
}

.collection-heading h2 {
  font-size: 48px;
  line-height: 1.06;
  letter-spacing: 0;
  margin: 12px 0 0;
}

.collection-heading p {
  color: var(--soft);
  line-height: 1.6;
  margin: 0 0 4px;
}

.collection-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--hair);
  border-bottom: 1px solid var(--hair);
  padding: 10px 0;
}

.collection-filters,
.collection-views {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
}

.collection-toolbar button {
  appearance: none;
  background: none;
  border: 0;
  padding: 12px 0;
  color: var(--dim);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.collection-toolbar button:hover,
.collection-toolbar button[aria-pressed="true"] {
  color: var(--orange);
}

.collection-toolbar button[aria-pressed="true"] {
  box-shadow: inset 0 -2px var(--orange);
}

.collection-filters span {
  font-size: 10px;
  margin-left: 3px;
}

.collection-views {
  flex-wrap: nowrap;
  border-left: 1px solid var(--hair);
  padding-left: 20px;
}

.collection-count {
  color: var(--dim);
  font-size: 12px;
  margin: 18px 0 24px;
}

.collection-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 42px 28px;
}

.collection-project {
  min-width: 0;
}

.collection-grid.reveal-ready .collection-project {
  opacity: 0;
  transition: opacity 650ms ease;
  transition-delay: var(--collection-fade-delay, 0ms);
}

.collection-grid.reveal-ready .collection-project.is-visible,
.collection-grid.reveal-ready .collection-project:focus-within {
  opacity: 1;
}

.collection-grid.reveal-ready .collection-project:focus-within {
  transition-delay: 0ms;
}

@media (prefers-reduced-motion: reduce) {
  .collection-grid.reveal-ready .collection-project {
    opacity: 1;
    transition: none;
  }
}

.collection-project[hidden] {
  display: none;
}

.collection-image {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--hair);
  border-radius: 4px;
  transition: transform 180ms ease;
}

.collection-image:hover,
.collection-image:focus-visible {
  transform: translateY(-2px);
}

.collection-image:hover + .collection-caption h3,
.collection-image:focus-visible + .collection-caption h3 {
  color: var(--orange);
}

@media (prefers-reduced-motion: reduce) {
  .collection-image {
    transition: none;
  }

  .collection-image:hover,
  .collection-image:focus-visible {
    transform: none;
  }
}

.collection-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.collection-preview-label {
  position: absolute;
  right: 12px;
  bottom: 12px;
  color: var(--white);
  background: #080809;
  border: 1px solid var(--hair);
  padding: 8px 12px;
  font-size: 12px;
  opacity: 0;
  transition: opacity 180ms ease;
}

.collection-image:hover .collection-preview-label,
.collection-image:focus-visible .collection-preview-label {
  opacity: 1;
}

.collection-caption {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-top: 16px;
}

.collection-industry {
  color: var(--dim);
  font-size: 12px;
}

.collection-caption h3 {
  font-size: 20px;
  line-height: 1.3;
  letter-spacing: 0;
  margin: 5px 0 0;
  transition: color 180ms ease;
}

.collection-visit {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  display: grid;
  place-items: center;
  color: var(--orange);
  font-size: 26px;
  border: 1px solid var(--hair);
  border-radius: 50%;
}

.collection-visit:hover {
  color: var(--black);
  background: var(--orange);
}

.collection-grid.is-index {
  grid-template-columns: 1fr;
  gap: 0;
}

.is-index .collection-project {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 28px;
  align-items: center;
  padding: 24px 0;
  border-bottom: 1px solid var(--hair);
}

.is-index .collection-project[hidden] {
  display: none;
}

.is-index .collection-caption {
  padding-top: 0;
}

.collection-dialog {
  width: min(1120px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  padding: 20px;
  border: 1px solid var(--hair);
  border-radius: 6px;
  color: var(--white);
  background: var(--ink);
}

.collection-dialog::backdrop {
  background: rgba(0, 0, 0, 0.86);
}

.collection-dialog-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.collection-dialog-bar h2 {
  font-size: 20px;
  line-height: 1.3;
  letter-spacing: 0;
  margin: 0;
}

.collection-close {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border: 1px solid var(--hair);
  background: none;
  color: var(--white);
  font-size: 28px;
  cursor: pointer;
}

.collection-dialog-image {
  display: block;
  width: 100%;
  height: auto;
}

.collection-browser-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 14px;
  background: var(--panel-2);
  border: 1px solid var(--hair);
  border-radius: 4px 4px 0 0;
}

.collection-dialog-address {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--soft);
  font-size: 13px;
}

.collection-dialog-address:hover {
  color: var(--orange);
}

.collection-browser-viewport {
  height: min(65dvh, 640px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  background: var(--panel);
  border: 1px solid var(--hair);
  border-top: 0;
}

.collection-browser-viewport:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

.collection-dialog-page {
  display: block;
}

.collection-dialog-link {
  display: grid;
  place-items: center;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  color: var(--orange);
  font-size: 26px;
  font-weight: 700;
}

@media (max-width: 1000px) {
  .collection-toolbar {
    align-items: flex-start;
  }

  .collection-heading h2 {
    font-size: 40px;
  }
}

@media (max-width: 600px) {
  .collection-section {
    padding: 40px 0 60px;
  }

  .collection-heading {
    display: block;
  }

  .collection-heading h2 {
    font-size: 32px;
  }

  .collection-heading p {
    margin-top: 18px;
    font-size: 14px;
  }

  .collection-toolbar {
    flex-wrap: wrap;
    gap: 6px;
  }

  .collection-filters {
    gap: 0 18px;
  }

  .collection-views {
    padding-left: 0;
    border-left: 0;
  }

  .collection-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .collection-caption h3 {
    font-size: 18px;
  }

  .is-index .collection-project {
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 14px;
    padding: 20px 0;
  }

  .is-index .collection-caption {
    gap: 8px;
  }

  .is-index .collection-caption h3 {
    font-size: 14px;
  }

  .is-index .collection-industry {
    font-size: 11px;
  }

  .is-index .collection-visit {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
    font-size: 22px;
  }
}
