/* Photo portfolio — keeps the site’s quiet typography, no card chrome */

.photos-empty {
  color: #555;
  margin: 1.5em 0;
}

.photos-order-note {
  color: #777;
  font-size: 0.9rem;
  margin: 0 0 1rem;
}

.photos-back {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
}

.photos-back a {
  color: #666;
  text-decoration: none;
}

.photos-back a:hover {
  color: #111;
  text-decoration: underline;
}

.photos-album-meta {
  color: #777;
  font-size: 0.95rem;
  margin: -0.35rem 0 1.25rem;
}

.photos-albums {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.35rem 1.1rem;
  margin: 0 0 2.5rem;
}

.photos-album {
  display: block;
  color: inherit;
  text-decoration: none;
}

.photos-album:visited {
  color: inherit;
}

.photos-album-cover {
  display: block;
  background: #eceae4;
  overflow: hidden;
  line-height: 0;
}

.photos-album-cover img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  vertical-align: middle;
  transition: transform 0.35s ease, opacity 0.2s ease;
}

.photos-album:hover .photos-album-cover img,
.photos-album:focus-visible .photos-album-cover img {
  transform: scale(1.03);
  opacity: 0.92;
}

.photos-album:focus-visible {
  outline: 2px solid #333;
  outline-offset: 3px;
}

.photos-album-info {
  display: block;
  margin-top: 0.5rem;
  line-height: 1.35;
}

.photos-album-title {
  display: block;
  font-size: 1.05rem;
  color: #222;
}

.photos-album-info .photos-album-meta {
  display: block;
  margin: 0.15rem 0 0;
  font-size: 0.85rem;
}

.photos-empty code {
  font-size: 0.92em;
}

.photos-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.5rem;
  margin: 0 0 1.25rem;
}

.photos-filter {
  appearance: none;
  border: 1px solid #ccc;
  background: #fff;
  color: #333;
  font: inherit;
  font-size: 0.9rem;
  padding: 0.2rem 0.65rem;
  cursor: pointer;
  border-radius: 2px;
}

.photos-filter:hover {
  border-color: #888;
}

.photos-filter.is-active {
  border-color: #333;
  background: #333;
  color: #fff;
}

.photos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem 1rem;
  margin: 0 0 2rem;
}

.photos-item {
  margin: 0;
}

.photos-item.is-hidden {
  display: none;
}

.photos-thumb {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: #f0f0f0;
  cursor: zoom-in;
  overflow: hidden;
  line-height: 0;
}

.photos-thumb img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  vertical-align: middle;
  transition: opacity 0.2s ease, transform 0.35s ease;
}

.photos-thumb:hover img,
.photos-thumb:focus-visible img {
  opacity: 0.92;
  transform: scale(1.02);
}

.photos-thumb:focus-visible {
  outline: 2px solid #333;
  outline-offset: 2px;
}

.photos-item figcaption {
  margin-top: 0.45rem;
  line-height: 1.35;
}

.photos-caption-title {
  display: block;
  font-size: 0.95rem;
  color: #222;
}

.photos-caption-meta {
  display: block;
  font-size: 0.85rem;
  color: #777;
  margin-top: 0.1rem;
}

/* Lightbox — centered in the viewport */
.photos-lightbox {
  padding: 0;
  border: 0;
  width: max-content;
  max-width: min(96vw, 1100px);
  max-height: 94vh;
  background: #111;
  color: #eee;
  overflow: hidden;
  position: fixed;
  inset: 0;
  margin: auto;
}

.photos-lightbox::backdrop {
  background: rgba(0, 0, 0, 0.72);
}

.photos-lightbox[open] {
  display: flex;
  flex-direction: column;
}

.photos-lightbox-close-wrap {
  margin: 0;
  position: absolute;
  top: 0.35rem;
  right: 0.35rem;
  z-index: 2;
}

.photos-lightbox-close {
  appearance: none;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 1.75rem;
  line-height: 1;
  width: 2.25rem;
  height: 2.25rem;
  cursor: pointer;
  opacity: 0.85;
}

.photos-lightbox-close:hover {
  opacity: 1;
}

.photos-lightbox img {
  display: block;
  max-width: 96vw;
  max-height: calc(94vh - 7rem);
  width: auto;
  height: auto;
  margin: 0 auto;
  object-fit: contain;
}

.photos-lightbox-caption {
  padding: 0.65rem 1rem 0.95rem;
  font-size: 0.9rem;
}

#photos-lightbox-title {
  color: #fff;
}

#photos-lightbox-meta {
  color: #aaa;
  font-size: 0.85rem;
  margin-top: 0.15rem;
}

#photos-lightbox-desc {
  color: #ddd;
  font-size: 0.9rem;
  line-height: 1.45;
  margin: 0.55rem 0 0;
  max-width: 42em;
  white-space: pre-wrap;
}

@media (max-width: 560px) {
  .photos-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.85rem 0.65rem;
  }

  .photos-caption-title {
    font-size: 0.85rem;
  }

  .photos-caption-meta {
    font-size: 0.75rem;
  }
}
