/* URSU v7: project archive and dedicated photographic galleries. */
.works-view {
  width: calc(100% - var(--gutter) * 2);
  max-width: 1120px;
  min-height: calc(100svh - var(--header) - var(--footer));
  margin: 0 auto;
  padding: 20px 0 90px;
}
.works-topline { display: flex; justify-content: flex-end; margin-bottom: 30px; }
.selected-work-link, .project-back {
  display: inline-block;
  font-style: italic;
  font-size: 17px;
  line-height: 1.5;
  padding-block: 6px;
}
.works-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 76px 80px;
}
.works-grid--single { width: min(100%, 390px); margin: 0 auto; grid-template-columns: 1fr; }
.work-card { display: block; min-width: 0; }
.work-card figure { margin: 0; }
.work-cover { display: flex; justify-content: center; align-items: center; width: 100%; aspect-ratio: 2 / 3; }
.work-cover img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 100%;
  object-fit: contain;
  animation: none;
  transition: opacity .2s ease;
}
.work-card:hover img { opacity: .87; }
.work-card-caption { padding-top: 17px; }
.work-card-title {
  font-weight: 400;
  font-style: italic;
  font-size: 19px;
  line-height: 1.45;
  letter-spacing: -.02em;
}
.work-card-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted);
}
.work-open { font-size: 20px; color: var(--ink); }
.project-gallery-view {
  width: calc(100% - var(--gutter) * 2);
  max-width: 1060px;
  margin: 0 auto;
  padding: 18px 0 74px;
}
.project-intro { margin-bottom: 38px; }
.project-title-row { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; margin-top: 24px; }
.project-title {
  font-family: var(--font-editorial);
  font-size: clamp(23px, 2.2vw, 32px);
  font-weight: 400;
  font-style: italic;
  line-height: 1.35;
  letter-spacing: -.028em;
  text-wrap: balance;
}
.project-count { font-size: 14px; color: var(--muted); white-space: nowrap; flex-shrink: 0; }
.project-photo-gallery { display: flex; flex-direction: column; gap: 72px; }
.project-photo-row { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: clamp(28px,6vw,82px); align-items: start; }
.project-figure { margin: 0; min-width: 0; scroll-margin-top: calc(var(--header) + 22px); }
.project-figure .photo-button { display: block; width: 100%; height: auto; }
.project-figure .hero-photo { display: block; width: 100%; height: auto; max-height: none; object-fit: contain; animation: none; }
.project-figure .image-error { position: static; margin: auto; padding: 50px 15px; }
.project-photo-caption { margin-top: 10px; font-size: 11px; color: var(--muted); font-style: normal; letter-spacing: .04em; font-variant-numeric: lining-nums tabular-nums; }
.project-photo-row--single, .project-photo-row--landscape { grid-template-columns: 1fr; justify-items: center; }
.project-photo-row--single .project-figure { width: min(100%, 510px); }
.project-photo-row--landscape .project-figure { width: 100%; }
.project-end { margin-top: 64px; }
.work-project-page .index-view > .project-back { margin-bottom: 24px; }
@media (min-width: 1650px) {
  .works-grid--single { width: 440px; }
  .project-gallery-view { max-width: 1180px; }
}
@media (max-width: 760px) {
  .works-view { padding-top: 8px; padding-bottom: 56px; }
  .works-topline { margin-bottom: 22px; }
  .works-grid { grid-template-columns: 1fr; gap: 50px; max-width: 440px; margin-inline: auto; }
  .work-card-title { font-size: 18px; }
  .project-gallery-view { padding-top: 10px; padding-bottom: 45px; }
  .project-title-row { flex-direction: column; align-items: flex-start; gap: 10px; margin-top: 18px; }
  .project-title { font-size: 25px; line-height: 1.35; max-width: 24em; }
  .project-count { font-size: 13px; }
  .project-intro { margin-bottom: 30px; }
  .project-photo-gallery { gap: 36px; }
  .project-photo-row { gap: 28px; }
  .project-photo-caption { margin-top: 8px; }
  .project-end { margin-top: 36px; }
}
@media (max-width: 540px) {
  .project-photo-row { grid-template-columns: 1fr; gap: 36px; }
  .project-photo-row--single .project-figure { width: 100%; }
  .project-title { font-size: 24px; }
  .selected-work-link, .project-back { font-size: 16px; }
}

/* Consistent spacing across project archives and galleries. */
.works-grid { gap: clamp(48px, 6vw, 76px) clamp(28px, 6vw, 80px); }
@media (min-width: 1000px) {
  .works-grid--archive:not(.works-grid--single) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: clamp(28px, 4vw, 56px);
  }
}
.project-photo-gallery { gap: clamp(36px, 5.5vw, 72px); }
.project-photo-row { row-gap: clamp(36px, 5.5vw, 72px); }
.project-figure { scroll-margin-top: 24px; }
.biophilia-view { min-height: 0; padding-bottom: clamp(40px, 5vw, 72px); }
.biophilia-view + .works-view { min-height: 0; padding-top: 0; }
/* Preserve PDF image boxes regardless of project-gallery defaults. */
.pdf-gallery-page > .project-figure > .photo-button { height: 100%; }
.pdf-gallery-page > .project-figure > .photo-button > .hero-photo {
  width: 100%; height: 100%; max-height: none; object-fit: fill;
}

.project-intro-note {
  max-width: 68ch;
  margin: 18px 0 0;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 16px;
  font-weight: 300;
  font-style: normal;
  letter-spacing: .035em;
  line-height: 1.7;
  color: var(--muted);
}

/* Keep three Works covers across tablet and desktop windows. */
@media (min-width: 761px) {
  .works-view--expanded { width: 96%; max-width: none; }
  .works-view--expanded > .works-grid--archive:not(.works-grid--single) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: clamp(22px, 3vw, 48px);
  }
}

/* Draw diagonal arrows consistently instead of relying on emoji fonts. */
.diagonal-arrow-wrap { display: inline-block; width: 1.15em; height: 1.15em; vertical-align: -.15em; line-height: 1; }
.diagonal-arrow { display: block; width: 100%; height: 100%; }
.work-open { line-height: 1; flex-shrink: 0; }
