/* A compact photographic gallery. Homepage preview styles remain separate. */
.photo-page { --photo-ink: #222f35; color: var(--photo-ink); background: #fcfcfa; }
.photo-header, .photo-main, .photo-footer { max-width: 1600px; margin: auto; padding-left: 32px; padding-right: 32px; }
.photo-header { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding-top: 25px; padding-bottom: 25px; border-bottom: 1px solid var(--line); }
.photo-header a { color: var(--photo-ink); }
.photo-wordmark { font-size: 15px; font-weight: 650; }
.photo-wordmark span { font-weight: 400; color: var(--muted); margin-left: 10px; }
.photo-home { font-size: 12px; }
.photo-main { padding-top: 40px; min-height: 70vh; }
.photo-main:focus { outline: none; }
.photo-intro { display: flex; justify-content: space-between; gap: 24px; align-items: end; margin-bottom: 38px; }
.photo-kicker { font-size: 10px; font-weight: 650; letter-spacing: .18em; margin: 0 0 12px; color: var(--muted); }
.photo-page h1 { font: 400 clamp(40px, 5vw, 64px)/1.1 Georgia, serif; letter-spacing: -.045em; margin: 0; }
.photo-intro-note { font-size: 13px; color: var(--muted); margin: 0 0 5px; }
.photo-collections { scroll-margin-top: 20px; }
.collections-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); padding-bottom: 14px; }
.collections-heading h2 { border: 0; padding: 0; margin: 0; font: 400 26px/1.2 Georgia, serif; }
.collections-heading > span { color: var(--muted); font-size: 12px; }
.gallery-controls { display: grid; gap: 8px; padding: 18px 0 22px; }
.photo-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.filter-label { width: 46px; color: var(--muted); font-size: 11px; }
.photo-filters button { cursor: pointer; border: 1px solid var(--line); border-radius: 20px; background: transparent; color: var(--muted); font: inherit; font-size: 11px; padding: 5px 14px; min-height: 34px; }
.photo-filters button[aria-pressed="true"] { background: var(--photo-ink); color: white; border-color: var(--photo-ink); }
.photo-filters button:hover { border-color: var(--photo-ink); }
.photo-wall { display: flex; flex-wrap: wrap; align-content: start; gap: 10px; }
.wall-photo { position: relative; display: block; flex: none; max-width: 100%; padding: 0; border: 0; background: #e9eeef; overflow: hidden; cursor: zoom-in; }
.wall-photo img { width: 100%; height: 100%; display: block; object-fit: contain; }
.wall-caption { position: absolute; inset: auto 0 0; display: flex; justify-content: space-between; align-items: end; gap: 12px; padding: 28px 14px 12px; color: white; background: linear-gradient(transparent, rgba(0,0,0,.7)); text-align: left; opacity: 0; transition: opacity .2s; pointer-events: none; }
.collection-cover { cursor: pointer; }
.collection-cover .wall-caption { opacity: 1; padding-top: 48px; flex-wrap: wrap; gap: 6px 12px; }
.collection-cover .wall-caption strong { font: 400 23px/1.2 Georgia, serif; }
.collection-local { display: block; font: 400 11px/1.5 sans-serif; margin-top: 5px; letter-spacing: .08em; }
.collection-cover .wall-caption > span { white-space: nowrap; }
.wall-caption strong { font-size: 12px; font-weight: 500; }
.wall-caption > span { font-size: 10px; }
.wall-photo:hover .wall-caption, .wall-photo:focus-visible .wall-caption { opacity: 1; }
.photo-page a:focus-visible, .photo-page button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.photo-footer { display: flex; justify-content: space-between; gap: 20px; margin-top: 50px; padding-top: 25px; padding-bottom: 30px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.album-back { font-size: 12px; color: var(--muted); }
.album-intro { margin: 24px 0 30px; }
.album-description, .album-total, .photo-notice, .photo-empty { color: var(--muted); font-size: 13px; }
.photo-skip { position: absolute; top: -100px; left: 15px; background: white; padding: 12px; z-index: 10; }
.photo-skip:focus { top: 0; }
.viewer-open { overflow: hidden; }
.photo-lightbox { border: 0; padding: 22px 32px; width: 100vw; max-width: none; height: 100dvh; max-height: none; box-sizing: border-box; color: #f5f5f2; background: #111719; }
.photo-lightbox[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 16px; }
.photo-lightbox::backdrop { background: #111719; }
.viewer-bar { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #bfc9cd; }
.photo-lightbox button { color: #fff; border: 1px solid #526066; background: transparent; padding: 9px 14px; cursor: pointer; min-width: 44px; min-height: 44px; font: inherit; font-size: 13px; }
.photo-lightbox button:disabled { opacity: .25; cursor: default; }
.photo-lightbox button:hover:not(:disabled) { background: #293337; }
.viewer-close span { font-size: 22px; line-height: 1; margin-left: 15px; }
.viewer-stage { position: relative; min-height: 0; display: grid; grid-template-columns: 48px minmax(0, 1fr) 48px; align-items: center; gap: 20px; }
.viewer-loading { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); color: #bfc9cd; font-size: 13px; text-align: center; }
.viewer-image { width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.viewer-caption { text-align: center; padding: 8px 0; }
.viewer-caption strong { font-weight: 500; font-size: 16px; }
.viewer-local-title { display: inline-block; margin-left: 14px; font-size: 13px; color: #bcc5c8; }
.viewer-meta { display: block; color: #aab8be; font-size: 12px; margin-top: 7px; }
/* Only the preview styles are shared with the academic homepage. */
.photo-preview-heading { display: flex; justify-content: space-between; gap: 20px; align-items: baseline; }
.photo-preview-heading h2 { margin-bottom: 8px; }
.photo-preview-heading > a { font-size: 13px; }
.photo-preview-intro { font-size: 14px; color: var(--muted); margin: 0 0 22px; }
.photo-preview-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
.photo-preview-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.photo-preview-card { color: var(--text); }
.photo-preview-frame { position: relative; display: block; overflow: hidden; isolation: isolate; aspect-ratio: 3 / 2; margin-bottom: 10px; border-radius: 3px; background: var(--soft); }
.photo-preview-frame img, .photo-preview-frame video, .photo-preview-canvas { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-preview-frame video, .photo-preview-canvas { position: absolute; inset: 0; opacity: 0; pointer-events: none; transition: opacity .45s ease; }
.photo-preview-frame.has-video video, .photo-preview-frame.has-motion .photo-preview-canvas { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .photo-preview-frame video, .photo-preview-canvas { display: none; transition: none; }
}
.preview-place { font-size: 14px; display: block; }
.preview-year { display: block; font-size: 11px; color: var(--muted); }

@media (max-width: 680px) {
  .photo-header, .photo-main, .photo-footer { padding-left: 16px; padding-right: 16px; }
  .photo-header { gap: 12px; padding-top: 18px; padding-bottom: 18px; }
  .photo-wordmark { font-size: 13px; }
  .photo-wordmark span { display: block; font-size: 11px; margin-left: 0; }
  .photo-home { max-width: 110px; text-align: right; font-size: 11px; }
  .photo-main { padding-top: 28px; }
  .photo-intro { flex-direction: column; align-items: start; gap: 14px; margin-bottom: 28px; }
  .photo-filters { gap: 6px; }
  .filter-label { width: 100%; }
  .photo-filters button { min-height: 36px; }
  .photo-footer { flex-direction: column; gap: 7px; }
  .photo-lightbox { padding: 14px; }
  .viewer-stage { position: relative; display: flex; flex-wrap: wrap; align-content: center; gap: 12px; justify-content: space-between; }
  .viewer-image { order: -1; height: calc(100% - 56px); flex: 0 0 100%; }
  .viewer-local-title { display: block; margin: 4px 0 0; }
  .viewer-caption strong { font-size: 14px; }
  .photo-preview-grid { gap: 12px; }
}
@media (max-width: 600px) { .photo-wall { gap: 6px; } }
@media (max-width: 480px) {
  .photo-preview-grid { grid-template-columns: 1fr; gap: 24px; }
  .photo-preview-heading { flex-wrap: wrap; gap: 0 15px; margin-bottom: 12px; }
}
@media (prefers-reduced-motion: reduce) { .wall-caption { transition: none; } }
