.project-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: 1.25rem;
}
.project-card {
  overflow: hidden;
  scroll-margin-top: 6rem;
}
.project-card-link {
  display: grid;
  gap: .75rem;
  height: 100%;
  align-content: start;
  color: inherit;
  text-decoration: none;
}
.project-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.project-card#montazure-phuket img {
  object-position: center 25%;
}
.project-card-copy {
  display: grid;
  gap: .3rem;
  padding: 0 1rem 1.1rem;
}
.project-card-copy h3 {
  margin: 0;
  font-size: clamp(1.03rem, 2vw, 1.25rem);
  line-height: 1.38;
}
.project-card-link:hover h3,
.project-card-link:focus-visible h3 {
  text-decoration: underline;
  text-underline-offset: .2em;
}
.project-card-link:focus-visible {
  outline: 2px solid var(--olive, #464c32);
  outline-offset: -2px;
}
.project-card-copy p,
.project-detail-location {
  margin: 0;
  color: #58594d;
  font-size: .9rem;
}
.project-detail-header h1 {
  margin: .3rem 0 .65rem;
}
.project-detail-header p {
  max-width: 65ch;
}
.project-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: 1.2rem;
  margin-top: 1.6rem;
}
.project-photo {
  overflow: hidden;
  margin: 0;
  border: 1px solid var(--border, #d7d5cc);
  border-radius: .4rem;
  background: var(--paper, #fff);
}
.project-photo-link {
  display: block;
  cursor: zoom-in;
}
.project-photo-link:focus-visible {
  outline: 2px solid var(--olive, #464c32);
  outline-offset: -2px;
}
.project-photo img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  background: #efede7;
}
.project-photo figcaption {
  padding: .8rem .9rem 1rem;
}
.project-photo figcaption strong {
  display: block;
  margin-bottom: .25rem;
}
.project-lightbox {
  box-sizing: border-box;
  width: min(70rem, calc(100% - 1.5rem));
  max-height: calc(100vh - 1.5rem);
  max-height: calc(100dvh - 1.5rem);
  margin: auto;
  padding: .8rem;
  border: 0;
  border-radius: .55rem;
  background: #faf9f5;
  color: #222;
  overscroll-behavior: contain;
}
.project-lightbox::backdrop {
  background: rgb(8 8 7 / .82);
}
.project-lightbox header {
  display: flex;
  justify-content: flex-end;
  margin-bottom: .5rem;
}
.project-lightbox button {
  padding: .45rem .75rem;
  min-height: 44px;
  border: 1px solid #b2afa5;
  border-radius: .35rem;
  background: white;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.project-lightbox img {
  display: block;
  margin: auto;
  width: 100%;
  height: auto;
  max-height: 70vh;
  max-height: 70dvh;
  object-fit: contain;
}
.project-lightbox p {
  margin: .65rem .25rem .15rem;
}
