/* ============================================================
   Photography — Beyond the Lab: 35mm Film
   Alternating feature rows + Flickr link
   Palette: #1d3557 | #457b9d | #a8dadc
   ============================================================ */

.photo-features {
  display: flex;
  flex-direction: column;
  gap: 3.75rem;
  margin: 2.5rem 0 3rem;
}

/* In-page viewer (replaces fullscreen lightbox) */
.photo-viewer[hidden] {
  display: none !important;
}

.photo-viewer {
  margin-bottom: 1rem;
  padding: 1.35rem 1.5rem 1.5rem;
  background: rgba(29, 53, 87, 0.035);
  border: 1px solid rgba(29, 53, 87, 0.1);
  border-left: 4px solid #a8dadc;
  border-radius: 0 14px 14px 0;
  box-shadow: 0 10px 28px rgba(29, 53, 87, 0.08);
  scroll-margin-top: 5.5rem;
}

.photo-viewer.is-open {
  animation: photoViewerIn 0.35s ease both;
}

@keyframes photoViewerIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.photo-viewer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.photo-viewer__close {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid rgba(29, 53, 87, 0.12);
  background: rgba(255, 255, 255, 0.7);
  color: #1d3557;
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.photo-viewer__close:hover {
  border-color: rgba(69, 123, 157, 0.35);
  background: #fff;
}

.photo-viewer__counter {
  font-family: "DM Sans", "Inter", system-ui, sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(45, 62, 80, 0.65);
}

.photo-viewer__stage {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.photo-viewer__figure {
  margin: 0;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(29, 53, 87, 0.06);
  border: 1px solid rgba(29, 53, 87, 0.08);
}

.photo-viewer__img {
  display: block;
  width: 100%;
  max-height: min(72vh, 720px);
  object-fit: contain;
  margin: 0 auto;
}

.photo-viewer__nav {
  flex: 0 0 auto;
  width: 2.35rem;
  height: 2.35rem;
  border: 1px solid rgba(29, 53, 87, 0.12);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  color: #457b9d;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.photo-viewer__nav:hover {
  border-color: rgba(69, 123, 157, 0.35);
  background: #fff;
  transform: scale(1.04);
}

.photo-viewer__meta .photo-feature__frame {
  margin-bottom: 0.45rem;
}

.photo-viewer__meta .photo-feature__title {
  font-size: 1.5rem;
  margin-bottom: 0.55rem;
}

.photo-feature__trigger {
  cursor: zoom-in;
  display: block;
  line-height: 0;
}

.photo-feature.is-active .photo-feature__media,
.digital-card.is-active .digital-card__media {
  border-color: rgba(69, 123, 157, 0.45);
  box-shadow: 0 0 0 3px rgba(168, 218, 220, 0.35);
}

body:has(.photo-viewer.is-open) .photo-gallery-item:not(.is-active) {
  opacity: 0.72;
  transition: opacity 0.25s ease;
}

/* Page sections */
.photo-section {
  margin-bottom: 3.5rem;
}

.photo-section__title {
  font-family: "DM Sans", "Inter", system-ui, sans-serif;
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #1d3557;
  margin: 0 0 0.75rem;
  padding-top: 0;
  border: none;
}

.photo-section__title::before,
.photo-section__title::after {
  display: none !important;
}

.photo-section__lead {
  font-size: 0.98rem;
  line-height: 1.65;
  color: rgba(45, 62, 80, 0.82);
  margin: 0 0 1.75rem;
  max-width: 42rem;
}

/* Digital edits — compact card grid */
.digital-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.35rem 1.5rem;
}

.digital-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.85rem;
  background: rgba(29, 53, 87, 0.025);
  border: 1px solid rgba(29, 53, 87, 0.08);
  border-radius: 12px;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.digital-card:hover {
  border-color: rgba(69, 123, 157, 0.2);
  box-shadow: 0 6px 18px rgba(29, 53, 87, 0.07);
}

.digital-card__media {
  border-radius: 8px;
  overflow: hidden;
  background: rgba(29, 53, 87, 0.06);
  border: 1px solid rgba(29, 53, 87, 0.08);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.digital-card__media img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.digital-card__media:hover img {
  transform: scale(1.02);
}

.digital-card__label {
  display: none;
}

.digital-card__title {
  font-family: "DM Sans", "Inter", system-ui, sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: #1d3557;
  margin: 0 0 0.5rem;
  letter-spacing: -0.01em;
}

.digital-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.55rem;
  margin-bottom: 0.55rem;
}

.digital-card__tag {
  font-size: 0.75rem;
  font-weight: 500;
  color: rgba(45, 62, 80, 0.78);
  background: rgba(168, 218, 220, 0.18);
  border: 1px solid rgba(69, 123, 157, 0.12);
  border-radius: 999px;
  padding: 0.18rem 0.55rem;
}

.digital-card__tag i {
  margin-right: 0.28rem;
  font-size: 0.68rem;
}

.digital-card__desc {
  font-size: 0.88rem;
  line-height: 1.55;
  color: rgba(45, 62, 80, 0.75);
  margin: 0;
}

.photo-viewer__meta .digital-card__title {
  font-size: 1.5rem;
  margin-bottom: 0.55rem;
}

.photo-feature {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 2rem 2.75rem;
  align-items: center;
}

.photo-feature--reverse .photo-feature__media {
  grid-column: 2;
  grid-row: 1;
}

.photo-feature--reverse .photo-feature__text {
  grid-column: 1;
  grid-row: 1;
}

.photo-feature__media {
  border-radius: 12px;
  overflow: hidden;
  background: rgba(29, 53, 87, 0.06);
  border: 1px solid rgba(29, 53, 87, 0.08);
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.photo-feature__media:hover {
  border-color: rgba(69, 123, 157, 0.28);
  box-shadow: 0 12px 32px rgba(29, 53, 87, 0.12);
}

.photo-feature__media a {
  display: block;
  line-height: 0;
}

.photo-feature__media img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.4s ease;
}

.photo-feature__media:hover img {
  transform: scale(1.02);
}

.photo-feature__text {
  padding: 0.25rem 0;
}

.photo-feature__frame {
  display: inline-block;
  font-family: "DM Sans", "Inter", system-ui, sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #457b9d;
  margin-bottom: 0.55rem;
}

.photo-feature__title {
  font-family: "DM Sans", "Inter", system-ui, sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: #1d3557;
  margin: 0 0 0.65rem;
}

.photo-feature__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.65rem;
  margin-bottom: 0.85rem;
}

.photo-feature__tag {
  font-size: 0.78rem;
  font-weight: 500;
  color: rgba(45, 62, 80, 0.78);
  background: rgba(168, 218, 220, 0.22);
  border: 1px solid rgba(69, 123, 157, 0.15);
  border-radius: 999px;
  padding: 0.2rem 0.65rem;
}

.photo-feature__tag i {
  margin-right: 0.3rem;
  font-size: 0.75rem;
  color: #457b9d;
}

.photo-feature__desc {
  font-size: 0.98rem;
  line-height: 1.7;
  color: rgba(45, 62, 80, 0.82);
  margin: 0;
}

.photo-gallery-hint {
  font-size: 0.88rem;
  color: rgba(45, 62, 80, 0.6);
  font-style: italic;
  margin: 0 0 0.5rem;
}

.photo-flickr-link {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 2.5rem;
  padding: 0.65rem 1rem 0.65rem 0.65rem;
  text-decoration: none !important;
  color: inherit;
  background: linear-gradient(135deg, rgba(255, 0, 132, 0.06) 0%, rgba(29, 53, 87, 0.04) 100%);
  border: 1px solid rgba(255, 0, 132, 0.18);
  border-radius: 999px;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.photo-flickr-link:hover {
  border-color: rgba(255, 0, 132, 0.38);
  box-shadow: 0 6px 18px rgba(255, 0, 132, 0.12);
  transform: translateY(-1px);
}

.photo-flickr-link__brand {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  background: #ff0084;
  color: #fff;
  font-size: 1.15rem;
  line-height: 1;
}

.photo-flickr-link__label {
  font-family: "DM Sans", "Inter", system-ui, sans-serif;
  font-size: 0.92rem;
  font-weight: 600;
  color: #1d3557;
}

.photo-flickr-link__arrow {
  color: #ff0084;
  font-size: 0.85rem;
  transition: transform 0.25s ease;
}

.photo-flickr-link:hover .photo-flickr-link__arrow {
  transform: translateX(3px);
}

@media (max-width: 768px) {
  .photo-features {
    gap: 3rem;
  }

  .photo-viewer {
    padding: 1rem 1rem 1.15rem;
  }

  .photo-viewer__stage {
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }

  .photo-viewer__nav {
    width: 2.1rem;
    height: 2.1rem;
  }

  .photo-viewer__nav--prev {
    grid-row: 2;
    justify-self: start;
  }

  .photo-viewer__nav--next {
    grid-row: 2;
    justify-self: end;
  }

  .photo-viewer__figure {
    grid-row: 1;
  }

  .photo-feature,
  .photo-feature--reverse {
    grid-template-columns: 1fr;
    gap: 1.15rem;
  }

  .photo-feature--reverse .photo-feature__media,
  .photo-feature--reverse .photo-feature__text {
    grid-column: 1;
    grid-row: auto;
  }

  .photo-feature__title {
    font-size: 1.2rem;
  }

  .digital-grid {
    grid-template-columns: 1fr;
  }
}

/* Dark mode */
body.quarto-dark .photo-viewer {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
  border-left-color: rgba(168, 218, 220, 0.5);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.25);
}

body.quarto-dark .photo-viewer__close,
body.quarto-dark .photo-viewer__nav {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.14);
  color: #a8dadc;
}

body.quarto-dark .photo-viewer__close:hover,
body.quarto-dark .photo-viewer__nav:hover {
  background: rgba(255, 255, 255, 0.1);
}

body.quarto-dark .photo-viewer__counter {
  color: rgba(232, 234, 240, 0.6);
}

body.quarto-dark .photo-viewer__figure {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
}

body.quarto-dark .photo-section__title {
  color: var(--bs-body-color);
}

body.quarto-dark .photo-section__lead {
  color: rgba(232, 234, 240, 0.78);
}

body.quarto-dark .digital-card {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.1);
}

body.quarto-dark .digital-card:hover {
  border-color: rgba(168, 218, 220, 0.25);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
}

body.quarto-dark .digital-card__media {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
}

body.quarto-dark .digital-card__label {
  color: #a8dadc;
}

body.quarto-dark .digital-card__title {
  color: var(--bs-body-color);
}

body.quarto-dark .digital-card__tag {
  color: rgba(232, 234, 240, 0.78);
  background: rgba(168, 218, 220, 0.1);
  border-color: rgba(168, 218, 220, 0.18);
}

body.quarto-dark .digital-card__desc {
  color: rgba(232, 234, 240, 0.72);
}

body.quarto-dark .photo-feature__media {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
}

body.quarto-dark .photo-feature__media:hover {
  border-color: rgba(168, 218, 220, 0.35);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
}

body.quarto-dark .photo-feature__frame {
  color: #a8dadc;
}

body.quarto-dark .photo-feature__title {
  color: var(--bs-body-color);
}

body.quarto-dark .photo-feature__tag {
  color: rgba(232, 234, 240, 0.78);
  background: rgba(168, 218, 220, 0.1);
  border-color: rgba(168, 218, 220, 0.2);
}

body.quarto-dark .photo-feature__desc {
  color: rgba(232, 234, 240, 0.78);
}

body.quarto-dark .photo-gallery-hint {
  color: rgba(232, 234, 240, 0.55);
}

body.quarto-dark .photo-flickr-link {
  background: linear-gradient(135deg, rgba(255, 0, 132, 0.1) 0%, rgba(255, 255, 255, 0.04) 100%);
  border-color: rgba(255, 0, 132, 0.28);
}

body.quarto-dark .photo-flickr-link:hover {
  border-color: rgba(255, 0, 132, 0.45);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
}

body.quarto-dark .photo-flickr-link__label {
  color: var(--bs-body-color);
}
