.photo-map-layout { display: grid; grid-template-columns: minmax(0, 2.55fr) minmax(160px, 1fr); align-items: start; gap: clamp(17px, 4vw, 53px); }
.photo-map-plot { background: var(--white); border: 1px solid var(--line); }
.photo-map-controls { display: flex; flex-wrap: wrap; gap: 7px; padding: 11px 11px 0; }
.photo-map-controls button { min-height: 38px; padding: 3px 10px; color: var(--ink); background: var(--white); border: 1px solid var(--line); border-radius: 3px; font-size: .84rem; }
.photo-map-controls button[aria-pressed="true"] { background: var(--tint); }
.photo-map-plot svg { display: block; width: 100%; height: auto; }
.map-land { fill: var(--tint); stroke: var(--muted); stroke-width: 1; }
.map-pin circle { fill: var(--accent); stroke: var(--white); stroke-width: 2; }
.map-pin text { fill: var(--accent-dark); stroke: var(--white); stroke-width: 5; paint-order: stroke; stroke-linejoin: round; font: 600 23px/1 var(--sans); }
.map-pin:hover circle, .map-pin:focus-visible circle { fill: var(--accent-dark); }
.photo-map-total { margin: 2px 0 8px; color: var(--accent); font-size: .87rem; }
.photo-map-summary ul { list-style: none; margin: 0; padding: 0; }
.photo-map-summary a { display: flex; gap: 10px; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--line); }
.photo-map-summary a:hover { color: var(--accent); }
.photo-map-summary a span { color: var(--muted); font-size: .82rem; }
.photo-map-credit { margin: 9px 0 0; color: var(--muted); font-size: .72rem; }


.portfolio { min-height: 68vh; }
.photo-masthead {
  display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap;
  gap: 12px 30px; padding: clamp(31px, 5.4vw, 68px) 0 17px; border-bottom: 1px solid var(--line);
}
.photo-masthead h1, .photo-index-label {
  margin: 0; color: var(--accent); font: 500 clamp(2.65rem, 6.3vw, 5.1rem)/1.12 var(--serif);
  letter-spacing: -.055em;
}
.photo-index-label { font-size: clamp(1.38rem, 3vw, 2rem); letter-spacing: -.035em; }
.photo-index-label:hover { text-decoration: underline; text-underline-offset: 5px; }
.photo-nav { display: flex; gap: clamp(19px, 4vw, 38px); align-items: center; }
.photo-nav a { display: grid; min-height: 36px; align-items: center; color: var(--muted); font-size: .89rem; }
.photo-nav a[aria-current], .photo-nav a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 5px; }

.frame.photo-gallery-frame { width: min(1440px, calc(100% - clamp(34px, 6vw, 96px))); }
.portfolio-inner { padding-block: clamp(35px, 5.5vw, 69px) 79px; }
.photo-works { padding-block: 16px clamp(48px, 6vw, 79px); }
.photo-works > .portfolio-detail-heading { margin-top: 19px; }
.portfolio-detail-heading { margin-bottom: 23px; }
.portfolio-detail-heading :is(h1, h2) {
  margin: 0;
  color: var(--accent);
  font: 500 clamp(2rem, 4.2vw, 3.8rem)/1.18 var(--serif);
  letter-spacing: -.03em;
  overflow-wrap: anywhere;
}
.portfolio-detail-heading h2 { font-size: clamp(1.8rem, 3.6vw, 2.65rem); }
.portfolio-back { display: inline-block; margin-bottom: 12px; color: var(--muted); font-size: .82rem; }
.portfolio-back:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }
.photo-categories { display: flex; flex-wrap: wrap; gap: 4px clamp(16px, 3vw, 34px); margin-top: 14px; }
.photo-categories a { padding-block: 8px; color: var(--muted); font-size: .91rem; }
.photo-categories a:is(:hover, [aria-current]) { color: var(--accent); text-decoration: underline; text-underline-offset: 5px; }

.photo-gallery-tools { display: flex; align-items: start; justify-content: end; gap: 8px 20px; flex-wrap: wrap; }
.photo-filter-panel { flex: 1; min-width: 0; }
.photo-filter-panel summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  color: var(--accent);
  font-size: .87rem;
  list-style: none;
}
.photo-filter-panel summary::-webkit-details-marker { display: none; }
.photo-filter-panel summary span { font-size: 1.18rem; }
.photo-filter-panel[open] summary span { transform: rotate(45deg); }
.photo-filters { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; margin: 0 0 14px; }
.photo-filters label { display: grid; gap: 4px; color: var(--muted); font-size: .78rem; }
.photo-filters :is(input:not([type="hidden"]), select, button) {
  max-width: 100%;
  min-height: 39px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-size: .86rem;
}
.photo-filters input:not([type="hidden"]) { width: min(185px, 100%); }
.photo-filters button { border-color: var(--accent); color: var(--white); background: var(--accent); }
.photo-filters a { padding-bottom: 8px; color: var(--accent); font-size: .82rem; text-underline-offset: 3px; }
.photo-filters button:hover { background: var(--accent-dark); }
.photo-filters a:hover { text-decoration: underline; }

.photo-layout-options { display: flex; gap: 12px; }
.photo-layout-options button {
  min-height: 36px; padding: 3px 0; border: 0; border-bottom: 1px solid transparent;
  color: var(--muted); background: transparent; font: inherit; font-size: .83rem;
}
.photo-layout-options button[aria-pressed="true"], .photo-layout-options button:hover {
  border-color: var(--accent); color: var(--accent);
}
.photo-gallery-tools:has(> :not([hidden])) { margin-bottom: 16px; }
.photo-grid { column-count: 3; column-gap: clamp(14px, 2vw, 28px); }
.photo-work { break-inside: avoid; margin: 0 0 clamp(20px, 2.7vw, 38px); }
.photo-link, .album-cover-image { display: block; overflow: hidden; }
.photo-link img { width: 100%; height: auto; }
.photo-caption {
  margin-top: 7px; color: var(--muted); font-size: .83rem; line-height: 1.5;
  font-variant-numeric: tabular-nums; overflow-wrap: anywhere;
}
.photo-grid:is([data-layout="story"], :has(> .photo-work:only-child)) { column-count: 1; }
.photo-grid:is([data-layout="story"], :has(> .photo-work:only-child)) .photo-work { width: fit-content; margin-inline: auto; }
.photo-grid:is([data-layout="story"], :has(> .photo-work:only-child)) img {
  width: auto; max-width: min(100%, 1080px); max-height: 82vh; object-fit: contain;
}
.portfolio-empty { margin: 36px 0; color: var(--muted); }
.portfolio .pagination a { color: var(--accent); border-color: var(--line); }

.album-covers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 34px 27px; }
.album-cover { min-width: 0; }
.album-cover a { display: block; }
.album-cover-image { aspect-ratio: 1.61; background: var(--tint); }
.album-cover-image img { width: 100%; height: 100%; object-fit: cover; object-position: center 35%; }
.album-caption { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; padding-block: 12px; border-bottom: 1px solid var(--line); }
.album-cover a:hover .album-caption { border-color: var(--accent); }
.album-caption h2 { margin: 0; color: var(--accent); font: 500 clamp(1.22rem, 3vw, 1.9rem)/1.35 var(--serif); }
.album-caption span { flex: none; color: var(--muted); font-size: .82rem; }

.photo-viewer {
  position: fixed; inset: 0; width: 100%; max-width: none; height: 100%; max-height: none;
  margin: 0; padding: 54px 74px 31px; border: 0;
  color: var(--ink); background: var(--paper);
}
.photo-viewer[open] { display: grid; align-items: center; }
.photo-viewer figure { margin: auto; min-width: 0; text-align: center; }
.photo-viewer img { margin-inline: auto; max-width: 100%; width: auto; max-height: calc(100dvh - 205px); object-fit: contain; }
.photo-viewer figcaption { margin-top: 12px; color: var(--muted); font-size: .87rem; }
.photo-viewer figcaption:empty { margin-top: 0; }
.photo-viewer button { position: absolute; z-index: 1; display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 50%; color: var(--ink); background: var(--white); font-size: 1.1rem; }
.photo-viewer button:hover { border-color: var(--accent); }
.viewer-close { top: 14px; right: 16px; }
.viewer-prev { top: calc(50% - 22px); left: 13px; }
.viewer-next { top: calc(50% - 22px); right: 13px; }

@keyframes photo-rise {
  from { opacity: .6; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: no-preference) {
  html:has(.portfolio) { scroll-behavior: smooth; }
  .portfolio [data-revealed] { animation: photo-rise .52s ease-out both; }
  .album-cover-image img { transition: transform .55s ease; }
  .album-cover a:hover img { transform: scale(1.03); }
}

@media (max-width: 990px) {
  .photo-grid { column-count: 2; }
}
@media (max-width: 680px) {
  .photo-masthead { align-items: center; padding-block: 26px 12px; }
  .photo-nav a { min-height: 40px; }
  .portfolio-inner { padding-bottom: 52px; }
  .album-covers, .photo-map-layout { grid-template-columns: 1fr; }
  .photo-viewer { padding-inline: 14px; }
  .viewer-prev, .viewer-next { top: auto; bottom: 12px; }
  .map-pin text { font-size: 29px; }
}
@media (max-width: 560px) {
  .photo-grid { column-count: 1; }
  .photo-filter-panel[open] { flex-basis: 100%; }
}
