/* ==========================================================================
   Projects page — anchor menu + one section per project
   ========================================================================== */
.pj-nav { position: sticky; top: var(--header-h, 84px); z-index: 20; padding-block: 1rem; background: rgba(246, 247, 249, 0.9); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-bottom: 1px solid rgba(16, 36, 58, 0.06); }
.pj-nav ul { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.pj-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 1.25rem; border-radius: 999px; background: #fff; color: var(--navy); font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.06em; text-decoration: none; box-shadow: 0 0 0 1px rgba(16, 36, 58, 0.08); transition: background-color 0.25s, color 0.25s; }
.pj-nav a:hover, .pj-nav a:focus-visible { background: var(--navy); color: #fff; }
.pj { scroll-margin-top: calc(var(--header-h, 84px) + 5rem); }
.pj__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(2rem, 1rem + 4vw, 5rem); align-items: center; }
.pj--flip .pj__copy { order: 2; }
.pj--flip .pj__grid { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); }
.pj__logo-wrap { margin-bottom: 1.75rem; }
.pj__logo { display: block; width: auto; max-width: 260px; max-height: 96px; object-fit: contain; }
.pj__logo--uw { max-height: 64px; }
.pj__wordmark { font-family: var(--font-serif); font-size: 2.5rem; font-style: italic; color: var(--blue); }
.pj__copy .band__text { margin-top: 1rem; max-width: 36rem; }
.pj__meta { display: flex; flex-wrap: wrap; gap: 1rem 2.5rem; margin: 1.75rem 0 2rem; }
.pj__meta dt { font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--blue); }
.pj__meta dd { margin-top: 0.3rem; font-family: var(--font-serif); font-size: 1.1875rem; color: var(--navy); }
.pj-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: clamp(140px, 13vw, 220px); gap: 0.75rem; }
.pj-gallery li { overflow: hidden; border-radius: 16px; }
.pj-gallery li:first-child { grid-column: 1 / -1; grid-row: span 2; }
.pj-gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1); }
.pj-gallery li:hover img { transform: scale(1.04); }
.pj__media--5 .pj-gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pj__media--5 .pj-gallery li:first-child { grid-column: span 2; }
.pj__media--1 .pj-gallery { grid-auto-rows: auto; }
.pj__media--1 .pj-gallery li:first-child { aspect-ratio: 4 / 3; grid-row: auto; }
@media (max-width: 1023px) {
  .pj__grid, .pj--flip .pj__grid { grid-template-columns: 1fr; }
  .pj__copy, .pj--flip .pj__copy { order: 2; }
}
@media (max-width: 639px) { .pj-gallery, .pj__media--5 .pj-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 130px; } .pj__media--5 .pj-gallery li:first-child { grid-column: 1 / -1; } }
@media (prefers-reduced-motion: reduce) { .pj-gallery img { transition: none; } .pj-gallery li:hover img { transform: none; } }
/* Galleries: one large photo, the rest in a single even row */
.pj-gallery, .pj__media--5 .pj-gallery { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); grid-auto-rows: auto; }
.pj-gallery li, .pj__media--5 .pj-gallery li:first-child { grid-row: auto; aspect-ratio: 1; }
.pj-gallery li:first-child, .pj__media--5 .pj-gallery li:first-child { grid-column: 1 / -1; aspect-ratio: 16 / 10; }
.pj__media--4 { --cols: 3; } .pj__media--5 { --cols: 4; } .pj__media--1 { --cols: 1; }
@media (max-width: 639px) { .pj-gallery, .pj__media--5 .pj-gallery { grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); grid-auto-rows: auto; } }
/* Uniform project sections: same logo slot, one photo of the same size */
.pj__logo-wrap { display: flex; align-items: center; height: 72px; margin-bottom: 1.5rem; }
.pj__logo, .pj__logo--uw { width: auto; height: 100%; max-height: 72px; max-width: 240px; }
.pj__wordmark { font-family: var(--font-sans); font-style: normal; font-size: 1.75rem; font-weight: 800; letter-spacing: 0.08em; color: var(--navy); }
.pj__photo { margin: 0; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 18px; box-shadow: 0 24px 48px -24px rgba(16, 36, 58, 0.3); }
.pj__photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1); }
.pj__photo:hover img { transform: scale(1.03); }
.pj { scroll-margin-top: calc(var(--header-h, 84px) + 1rem); }
@media (prefers-reduced-motion: reduce) { .pj__photo img { transition: none; } .pj__photo:hover img { transform: none; } }
/* Same gallery for every project: one large photo, three small below */
.pj__photo { aspect-ratio: 16 / 10; box-shadow: none; }
.pj__thumbs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; margin-top: 0.75rem; }
.pj__thumbs li { aspect-ratio: 4 / 3; overflow: hidden; border-radius: 14px; }
.pj__thumbs img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1); }
.pj__thumbs li:hover img { transform: scale(1.05); }
@media (prefers-reduced-motion: reduce) { .pj__thumbs img { transition: none; } .pj__thumbs li:hover img { transform: none; } }

/* Photo switcher: a thumbnail or an arrow puts that photo into the big card */
.pj__photo { position: relative; }
.pj__photo img { transition: opacity 0.25s ease, transform 0.9s cubic-bezier(0.22, 1, 0.36, 1); }
.pj__photo img.is-fading { opacity: 0; }
.pj__thumbs img { cursor: pointer; }
.pj__thumbs img:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.pj__arrow { position: absolute; top: 50%; z-index: 1; display: grid; place-items: center; width: 44px; height: 44px; margin-top: -22px; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.18); color: #fff; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3); cursor: pointer; transition: background-color 0.25s, color 0.25s; }
.pj__arrow:hover { background: rgba(255, 255, 255, 0.32); }
.pj__arrow:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.pj__arrow svg { width: 20px; height: 20px; }
.pj__arrow--prev { left: 0.875rem; }
.pj__arrow--next { right: 0.875rem; }
@media (prefers-reduced-motion: reduce) { .pj__photo img { transition: none; } }
