.project-gallery-open { overflow: hidden; }
.content-page .page-filter-section, .content-page .page-project-section { padding-inline: clamp(20px, 4vw, 104px); }
.content-page .page-filter-section > .inner, .content-page .page-project-section > .inner { width: 100%; }
.content-page .page-gallery { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px clamp(20px, 1.6vw, 32px); }
.content-page .page-gallery figure { display: flex; flex-direction: column; background: #fbf9f5; box-shadow: 0 8px 28px rgba(37, 33, 29, .05); }
.content-page .page-gallery figure:nth-child(3n + 1) { grid-column: auto; }
.content-page .page-gallery .gallery-photo img, .content-page .page-gallery figure:nth-child(3n + 1) img { aspect-ratio: 1 / 1; }
.content-page .page-gallery figcaption { display: flex; flex: 1; padding: 22px 18px 26px; text-align: center; }
.content-page .page-gallery .gallery-project-name { display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 16px; width: 100%; text-align: center; }
.content-page .page-gallery .gallery-project-title { margin: 0; color: inherit; font: 400 clamp(1.05rem, 1.15vw, 1.3rem)/1.4 var(--font-display); letter-spacing: 0; text-transform: none; }
.content-page .page-gallery .gallery-project-action { display: inline-block; margin: 0; padding: 13px 18px; border: 1px solid #b6a18c; color: #62584a; font: 500 .65rem/1.4 var(--font-body); letter-spacing: .12em; text-transform: uppercase; }
.content-page .gallery-project-name:hover .gallery-project-action, .content-page .gallery-project-name:focus-visible .gallery-project-action { border-color: var(--color-brand); color: var(--color-brand); }
@media (max-width: 1280px) {
  .content-page .page-gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .content-page .page-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 20px; }
}
@media (max-width: 560px) {
  .content-page .page-gallery { grid-template-columns: 1fr; gap: 28px; }
  .content-page .page-gallery figcaption { padding: 20px 18px 24px; }
}
.content-page .portfolio-hero { padding-top: 140px; padding-bottom: 36px; }
.content-page .portfolio-hero h1 { font-size: clamp(2.3rem, 3.2vw, 3.3rem); margin-bottom: 20px; }
.content-page .portfolio-hero .page-breadcrumb { margin-bottom: 20px; }
.content-page .portfolio-hero .page-photo img { height: 300px; min-height: 0; max-height: 300px; aspect-ratio: 16 / 9; }
.content-page .portfolio-hero .page-photo::after { content: none; }
.content-page .page-filter-section { padding-top: 32px; padding-bottom: 16px; }
.content-page .page-filter-section .page-section-heading { margin-bottom: 20px; }
.content-page .page-filter-section .gallery-filters { margin-top: 20px; }
.content-page .page-project-section { padding-top: 24px; }
.project-intro { padding: 30px 5vw 0; }
.project-intro .project-eyebrow { margin: 0 0 10px; color: #756d61; font-size: .65rem; text-transform: uppercase; letter-spacing: .18em; }
.project-intro h2 { margin: 0; color: #25211d; font: 400 clamp(2rem, 3vw, 3rem)/1.15 var(--font-display); }
.project-intro > p:last-child { margin: 12px 0 0; color: #756d61; font-size: .75rem; }
.content-page .project-dialog, .content-page .gallery-dialog { position: fixed; inset: 0; width: 100%; height: 100vh; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; box-sizing: border-box; }
.content-page .project-dialog { background: #f6f3ed; color: #25211d; overflow: auto; overscroll-behavior: contain; }
.project-dialog::backdrop { background: #181715; }
.project-dialog-header { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px 5vw; background: #20211e; color: #eee6d8; }
.project-wordmark { font: 400 1.7rem/1 var(--font-display); }
.project-wordmark span { margin-left: 10px; font: 400 .65rem/1 var(--font-body); text-transform: uppercase; letter-spacing: .2em; }
.project-dialog-header button { display: flex; align-items: center; gap: 14px; min-height: 44px; padding: 0 4px; border: 0; background: transparent; color: inherit; font: 400 .75rem/1 var(--font-body); letter-spacing: .06em; cursor: pointer; }
.project-dialog-header button span { font-size: 1.4rem; }
.project-media-section { padding: 34px 5vw 60px; }
.project-media-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.project-media-heading p { margin: 0; font: 400 1.35rem/1.3 var(--font-display); }
.project-media-heading > span { color: #756d61; font-size: .72rem; }
.project-media-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 24px; }
.project-media-grid button { position: relative; display: block; min-width: 0; padding: 0; border: 0; background: #e4ddd2; overflow: hidden; cursor: zoom-in; }
.project-media-grid img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; transition: transform .35s ease, filter .35s ease; }
.project-media-grid button:hover img { transform: scale(1.035); filter: brightness(.75); }
.project-media-mark { position: absolute; top: 50%; left: 50%; display: grid; place-items: center; width: 48px; height: 48px; border: 1px solid rgba(255,255,255,.8); border-radius: 50%; transform: translate(-50%, -50%); color: #fff; background: rgba(0,0,0,.3); font: 300 1.6rem/1 var(--font-body); opacity: 0; transition: opacity .2s ease; }
.project-media-grid button:hover .project-media-mark, .project-media-grid button:focus-visible .project-media-mark { opacity: 1; }
.project-media-label { position: absolute; bottom: 0; left: 0; right: 0; padding: 30px 16px 14px; color: white; background: linear-gradient(transparent, rgba(0,0,0,.6)); text-align: left; font-size: .7rem; letter-spacing: .06em; }
.content-page .gallery-dialog { overflow: hidden; background: rgba(23,23,22,.94); color: #fff; }
.gallery-dialog::backdrop { background: rgba(0,0,0,.45); }
.gallery-toolbar { position: absolute; z-index: 2; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; height: 62px; padding: 0 14px 0 24px; }
.gallery-toolbar > p { margin: 0; font: 400 .75rem/1 var(--font-body); color: #c4c2bd; letter-spacing: .12em; }
.gallery-tools { display: flex; gap: 4px; }
.gallery-dialog button { display: grid; place-items: center; width: 44px; height: 44px; padding: 10px; border: 0; background: transparent; color: #d4d2ce; cursor: pointer; }
.gallery-dialog button:hover, .gallery-dialog button[aria-pressed="true"], .gallery-dialog button[aria-expanded="true"] { color: #fff; background: rgba(255,255,255,.09); }
.gallery-dialog svg { display: block; width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.gallery-stage { position: absolute; inset: 62px 70px 50px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.gallery-stage img { display: block; width: 100%; height: 100%; max-width: 100%; max-height: 100%; min-height: 0; object-fit: contain; }
.gallery-stage img { width: auto; height: auto; cursor: zoom-in; touch-action: pan-y; }
.gallery-stage.is-zoomed { display: block; overflow: auto; overscroll-behavior: contain; }
.gallery-stage.is-zoomed img { width: auto; height: auto; max-width: none; max-height: none; margin: auto; cursor: grab; touch-action: none; }
.gallery-stage.is-zoomed img:active { cursor: grabbing; }
.gallery-stage > p { padding: 20px; text-align: center; }
.gallery-dialog .gallery-arrow { position: absolute; top: calc(50% - 22px); width: 52px; height: 52px; }
.gallery-arrow--previous { left: 8px; }
.gallery-arrow--next { right: 8px; }
.gallery-dialog > h2 { position: absolute; left: 70px; right: 70px; bottom: 17px; margin: 0; color: #c4c2bd; font: 400 .8rem/1.3 var(--font-body); text-align: center; letter-spacing: .03em; }
.gallery-thumbnails { position: absolute; bottom: 0; left: 0; right: 0; display: flex; justify-content: safe center; align-items: center; gap: 12px; height: 116px; padding: 14px 24px; overflow-x: auto; background: rgba(0,0,0,.24); box-sizing: border-box; }
.gallery-thumbnails button { position: relative; flex: 0 0 100px; width: 100px; height: 78px; padding: 3px; border: 1px solid transparent; opacity: .6; }
.gallery-thumbnails button[aria-pressed="true"] { border-color: #c7a979; opacity: 1; }
.gallery-thumbnails button:hover { opacity: 1; }
.gallery-thumbnails img { display: block; width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbnails .project-media-mark { width: 28px; height: 28px; font-size: .8rem; }
.gallery-dialog.has-thumbnails .gallery-stage { bottom: 166px; }
.gallery-dialog.has-thumbnails > h2 { bottom: 133px; }
.project-dialog button:focus-visible, .gallery-dialog button:focus-visible, .content-page .gallery-project-name:focus-visible, .content-page .gallery-photo:focus-visible { outline: 2px solid #c7a979; outline-offset: 3px; }
.project-dialog [hidden], .gallery-dialog [hidden] { display: none; }
@media (max-width: 600px) {
  .content-page .portfolio-hero { padding-top: 116px; padding-bottom: 26px; }
  .content-page .portfolio-hero > .inner { gap: 24px; }
  .content-page .portfolio-hero .page-photo img { height: 190px; max-height: 190px; }
  .project-intro { padding: 24px 20px 0; }
  .project-dialog-header { padding: 12px 20px; }
  .project-wordmark span { display: none; }
  .project-media-section { padding: 26px 20px 40px; }
  .project-media-heading { display: block; }
  .project-media-heading > span { display: block; margin-top: 8px; }
  .project-media-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .project-media-label { padding: 24px 10px 10px; }
  .gallery-toolbar { height: 56px; padding-left: 16px; padding-right: 6px; }
  .gallery-stage { inset: 60px 40px 52px; }
  .gallery-dialog .gallery-arrow { width: 36px; height: 48px; padding: 8px; }
  .gallery-arrow--previous { left: 0; }
  .gallery-arrow--next { right: 0; }
  .gallery-dialog > h2 { left: 24px; right: 24px; }
  .gallery-thumbnails { justify-content: flex-start; padding-inline: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .project-media-grid img, .project-media-mark { transition: none; }
}
