/* project photo galleries (V117) */
.pgx{padding-top:10px}.pgx-head{display:flex;flex-wrap:wrap;align-items:baseline;gap:6px 18px;margin:0 0 26px;border-bottom:1px solid #d8c9ae;padding-bottom:16px}
.pgx-head .section-kicker{flex:1 0 100%}.pgx-head h2{margin:0;font:700 clamp(26px,3.2vw,40px)/1.1 Manrope,sans-serif;letter-spacing:-.03em;flex:1}.pgx-count{color:#a37c3a;font-size:11px;font-weight:800;letter-spacing:.2em}
.pgx-grid{columns:3;column-gap:16px}
.pgx-item{display:block;width:100%;margin:0 0 16px;padding:0;border:0;border-radius:10px;overflow:hidden;cursor:zoom-in;break-inside:avoid;background:#e4ddd0;box-shadow:0 8px 24px rgba(60,40,10,.14);transition:transform .3s,box-shadow .3s}
.pgx-item img{display:block;width:100%;height:auto;transition:transform .6s}.pgx-item:hover{transform:translateY(-4px);box-shadow:0 16px 36px rgba(60,40,10,.26)}.pgx-item:hover img{transform:scale(1.04)}
.pgx-more{text-align:center;margin-top:24px}.pgx-more[hidden]{display:none}
.pgx-dark{background:#14110e;color:#fff;padding:90px 6vw}.pgx-dark>*{max-width:1180px;margin-left:auto;margin-right:auto}.pgx-dark .pgx-head{border-color:rgba(255,255,255,.2)}.pgx-dark .pgx-head h2{color:#fff}.pgx-dark .pgx-count{color:#d7c19c}.pgx-dark .pgx-item{background:#1d1812;box-shadow:0 10px 28px rgba(0,0,0,.5)}
.pgx-box{position:fixed;inset:0;z-index:10000;display:flex;align-items:center;justify-content:center;background:rgba(10,8,6,.95);padding:56px 64px}.pgx-box[hidden]{display:none}
.pgx-box figure{margin:0;max-width:100%;max-height:100%;display:flex;flex-direction:column;align-items:center}.pgx-box img{max-width:100%;max-height:calc(100vh - 150px);max-height:calc(100dvh - 150px);object-fit:contain;border-radius:8px;box-shadow:0 20px 60px rgba(0,0,0,.6)}
.pgx-box figcaption{margin-top:14px;color:#f1e6d2;font-size:13px;font-weight:700;letter-spacing:.08em;text-align:center}
.pgx-box button{position:absolute;border:1px solid #e0b872;background:rgba(15,12,9,.7);color:#e0b872;width:46px;height:46px;border-radius:50%;font-size:18px;cursor:pointer}.pgx-box button:hover{background:#e0b872;color:#1a140d}.pgx-x{top:14px;right:14px}.pgx-p{left:12px;top:50%;margin-top:-23px}.pgx-n{right:12px;top:50%;margin-top:-23px}
html.pgx-lock,html.pgx-lock body{overflow:hidden}
@media(max-width:900px){.pgx-grid{columns:2;column-gap:10px}.pgx-item{margin-bottom:10px;border-radius:8px}.pgx-dark{padding:64px 5vw}}
@media(max-width:560px){.pgx-box{padding:56px 10px 72px}.pgx-p,.pgx-n{top:auto;bottom:12px;margin:0}.pgx-p{left:calc(50% - 56px)}.pgx-n{right:calc(50% - 56px)}.pgx-box img{max-height:calc(100dvh - 190px)}}
.content-wrap.pgx{max-width:1240px;margin-left:auto;margin-right:auto;padding-left:clamp(16px,4vw,48px);padding-right:clamp(16px,4vw,48px)}
@media(min-width:1200px){.pgx-grid{columns:4}}

/* gallery-only pages (V118) */
.gx-bar{background:var(--dark,#24221e);height:94px}
.gx-h1{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
.pgx.gx-only{padding-top:44px;padding-bottom:70px}
.pgx-dark.gx-only{padding-top:60px;padding-bottom:90px}
.gx-title{margin:0 0 26px;font:700 clamp(28px,3.4vw,44px)/1.1 Manrope,sans-serif;letter-spacing:-.03em;padding-bottom:16px;border-bottom:1px solid #d8c9ae}
.pgx-dark .gx-title{color:#fff;border-color:rgba(255,255,255,.2)}

/* Short introductory copy for each project gallery */
.pgx-description{max-width:820px;margin:0 0 24px;color:#655b4e;font-size:clamp(14px,1.15vw,16px);line-height:1.8;letter-spacing:.005em}
.pgx-description::selection{background:#d8bd98;color:#241c13}
@media(max-width:560px){.pgx-description{font-size:14px;line-height:1.7;margin-bottom:18px}}


/* Gallery layout consistency fix: keep title and description above images. */
.pgx.gx-only{display:flex;flex-direction:column;align-items:stretch}
.pgx.gx-only .gx-title{order:1;display:block;width:100%;margin:0 0 14px}
.pgx.gx-only .pgx-description{order:2;display:block;width:100%;margin:0 0 24px}
.pgx.gx-only .pgx-grid{order:3;display:block;width:100%}
.pgx.gx-only .pgx-more{order:4}
.all-projects-intro{max-width:1240px;margin:0 auto;padding:38px clamp(16px,4vw,48px) 4px;color:#292621}
.all-projects-intro .all-projects-kicker{margin:0 0 10px;font-size:10px;letter-spacing:.2em;font-weight:700;color:#a37c3a}
.all-projects-intro h1{margin:0 0 12px;font:700 clamp(30px,4vw,48px)/1.08 Manrope,sans-serif;letter-spacing:-.035em}
.all-projects-intro>p:last-child{max-width:820px;margin:0;color:#655b4e;font-size:clamp(14px,1.15vw,16px);line-height:1.8}
@media(max-width:560px){.all-projects-intro{padding-top:28px}.all-projects-intro h1{font-size:30px}}


/* Final gallery cleanup: keep category navigation in the header only. */
body.projects-page main a[href^="all-projects"],
body.projects-page main a[href*="/all-projects"],
body.projects-page main .all-projects-button,
body.projects-page main .all-projects-link,
body.projects-page main .back-to-projects { display:none !important; }
body.projects-page main .pgx.gx-only { display:flex !important; flex-direction:column !important; }
body.projects-page main .pgx.gx-only > .gx-title { order:1 !important; }
body.projects-page main .pgx.gx-only > .pgx-description { order:2 !important; }
body.projects-page main .pgx.gx-only > .pgx-grid { order:3 !important; }
body.projects-page main .pgx.gx-only > .pgx-more { order:4 !important; }
body.projects-page main .pgx.gx-only > .pgx-grid img { display:block; }
