#projects .pg-cover{position:relative;display:block;width:100%;padding:0;border:0;border-radius:16px;overflow:hidden;background:#eee;cursor:zoom-in;text-align:left}
#projects .pg-cover>img{display:block;width:100%;height:auto;aspect-ratio:460/260;object-fit:cover;transition:transform .2s}
#projects .pg-cover:hover>img{transform:scale(1.025)}
#projects .pg-badge{position:absolute;right:12px;bottom:12px;padding:8px 12px;border-radius:30px;background:rgba(36,28,23,.85);color:#fff;font:500 13px/1.3 Arial,sans-serif}
.pg-cover:focus-visible,#project-gallery button:focus-visible{outline:3px solid #c99250;outline-offset:3px}
#project-gallery{box-sizing:border-box;width:min(1100px,calc(100% - 32px));max-width:none;max-height:calc(100dvh - 32px);padding:20px;border:0;border-radius:20px;background:#faf7f2;color:#341f13;overflow:auto}
#project-gallery::backdrop{background:rgba(16,12,10,.85)}
#project-gallery button{font-family:inherit;cursor:pointer}
#project-gallery .pg-header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
#project-gallery h2{margin:0;font-size:clamp(18px,2.3vw,28px);line-height:1.2}
#project-gallery .pg-close{flex-shrink:0;width:44px;height:44px;padding:0;border:0;border-radius:50%;background:#e8e0d6;color:#341f13;font-size:32px;line-height:1}
#project-gallery .pg-stage{position:relative;background:#fff;border-radius:12px;overflow:hidden;touch-action:pan-y}
#project-gallery .pg-image{display:block;width:100%;height:min(60dvh,620px);object-fit:contain}
#project-gallery .pg-prev,#project-gallery .pg-next{position:absolute;top:50%;transform:translateY(-50%);width:44px;height:48px;padding:0;border:0;border-radius:12px;color:#fff;background:rgba(36,28,23,.8);font-size:36px;line-height:1}
#project-gallery .pg-prev{left:10px}#project-gallery .pg-next{right:10px}
#project-gallery [hidden]{display:none!important}
#project-gallery .pg-count{text-align:center;margin:10px 0;font-size:14px}
#project-gallery .pg-error{text-align:center;font-size:14px}
#project-gallery .pg-thumbs{display:flex;gap:8px;overflow-x:auto;padding:4px;position:relative}
#project-gallery .pg-thumbs button{flex:0 0 84px;height:60px;padding:2px;border:2px solid transparent;border-radius:8px;background:#fff;overflow:hidden}
#project-gallery .pg-thumbs button[aria-pressed=true]{border-color:#8e542e}
#project-gallery .pg-thumbs img{width:100%;height:100%;object-fit:cover;border-radius:4px}
@media(max-width:600px){#project-gallery{width:calc(100% - 16px);max-height:calc(100dvh - 16px);padding:12px;border-radius:14px}#project-gallery .pg-image{height:52dvh}#project-gallery .pg-thumbs button{flex-basis:70px;height:52px}}
@media(prefers-reduced-motion:reduce){#projects .pg-cover>img{transition:none}}
