/* v19: a quiet, full-composition stage with controls that stay in view. */
.portfolio-grid:has(.project-slider){grid-template-columns:minmax(0,1fr);gap:76px}
.project-slider{--gallery-surface:#e9eae7;min-width:0;width:100%}
.project-slider .slider-stage{box-sizing:border-box;width:100%;max-width:100%;min-width:0;aspect-ratio:16/9;max-height:720px;background:var(--gallery-surface);isolation:isolate;border-radius:4px}
.project-slider .project-photo{display:block;width:100%;height:100%;padding:24px 72px;border:0;background:transparent;cursor:zoom-in;touch-action:pan-y pinch-zoom;user-select:none}
.project-slider .project-photo img,.inline-project:hover .project-photo img{display:block;width:100%;height:100%;aspect-ratio:auto;object-fit:contain;transform:none;max-height:100%;transition:none}
.project-slider svg,.gallery-v19 svg{display:block;width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}
.project-slider button,.gallery-v19 button{font:inherit;cursor:pointer}
.project-slider .slider-arrow,.gallery-v19 .gallery-arrow{position:absolute;top:50%;z-index:2;display:grid;place-items:center;width:48px;height:48px;min-height:48px;padding:0;border:1px solid #fff4;border-radius:50%;color:#fff;background:#202626;transform:translateY(-50%);box-shadow:0 3px 14px #0001;transition:background .15s,opacity .15s}
.project-slider .slider-previous{left:14px}.project-slider .slider-next{right:14px}
.project-slider .slider-arrow:hover,.gallery-v19 .gallery-arrow:hover{background:#3d4645}
.project-slider button:disabled,.gallery-v19 button:disabled{opacity:.3;cursor:default}
.slider-toolbar{display:flex;align-items:center;gap:22px;min-height:78px;padding:12px 0;border-bottom:1px solid #cdd0cb}
.slider-toolbar .inline-counter{min-width:65px;font-size:14px;letter-spacing:.06em;white-space:nowrap;font-variant-numeric:tabular-nums}
.slider-progress,.gallery-progress{display:block;appearance:none;flex:1;width:100%;min-width:0;height:2px;border:0;background:#c8ceca;color:var(--red);border-radius:0;overflow:hidden}
.slider-progress::-webkit-progress-bar,.gallery-progress::-webkit-progress-bar{background:#c8ceca}
.slider-progress::-webkit-progress-value,.gallery-progress::-webkit-progress-value{background:var(--red)}
.slider-progress::-moz-progress-bar,.gallery-progress::-moz-progress-bar{background:var(--red)}
.slider-tools{display:flex;gap:10px;align-items:center;margin-left:8px}
.slider-tools button{display:flex;align-items:center;justify-content:center;gap:10px;min-width:46px;min-height:46px;margin:0;padding:10px 12px;border:1px solid #cdd0cb;border-radius:3px;background:transparent;color:var(--ink);box-shadow:none;font-size:13px}
.slider-tools button:hover,.slider-tools button[aria-expanded=true]{background:#e6e8e3;border-color:#a8b0a8}
.project-slider .slider-overview,.gallery-v19 .slider-overview{display:grid;grid-template-columns:repeat(auto-fill,minmax(104px,1fr));gap:12px;width:100%;max-width:none;margin:0;padding:20px 0;background:transparent;border:0;border-radius:0;overflow-y:auto;overflow-x:hidden;backdrop-filter:none;max-height:360px;scrollbar-width:thin}
.project-slider .slider-overview button,.gallery-v19 .slider-overview button{position:relative;display:block;min-width:0;width:100%;height:86px;min-height:0;margin:0;padding:5px;overflow:hidden;background:#e2e5df;border:2px solid transparent;border-radius:3px;opacity:.66;box-shadow:none;color:var(--ink);transition:opacity .15s,border-color .15s}
.project-slider .slider-overview button[aria-pressed=true],.gallery-v19 .slider-overview button[aria-pressed=true]{opacity:1;border-color:var(--red)}
.project-slider .slider-overview button:hover,.gallery-v19 .slider-overview button:hover{opacity:1}
.project-slider .slider-overview img,#galleryDialog .slider-overview img{display:block;width:100%;height:100%;max-height:none;aspect-ratio:auto;object-fit:contain;transform:none;margin:0}
.slider-overview .frame-number{position:absolute;inset:auto 4px 4px auto;font-size:11px;line-height:1.5;color:#fff;background:#202626d9;padding:1px 5px;border-radius:2px}
.project-slider .slider-overview .video-thumbnail{position:relative!important;inset:auto;padding:0;min-height:0!important}
.portfolio-card.inline-project .portfolio-caption{display:grid;grid-template-columns:1fr;margin-top:24px}
.portfolio-card.inline-project .portfolio-caption>div{display:grid;grid-template-columns:1fr 1fr;gap:14px 50px;align-items:start}
.portfolio-card.inline-project .portfolio-caption h2{margin:0;max-width:800px;font-size:clamp(25px,2.7vw,38px);line-height:1.4}
.portfolio-card.inline-project .portfolio-caption .project-description{font-size:16px;line-height:1.8;margin:0;-webkit-line-clamp:3}
.portfolio-card.inline-project .example-note{grid-column:1/-1}
.case-slider{box-sizing:border-box;width:100%;max-width:100%;min-width:0;margin-block:18px 28px}
.case-slider .slider-stage{max-height:800px}
body.gallery-open{overflow:hidden}
#galleryDialog.gallery-v19{box-sizing:border-box;width:min(1720px,calc(100vw - 32px));height:calc(100dvh - 32px);max-width:none;max-height:none;margin:auto;padding:0 26px;border:1px solid #ffffff20;border-radius:8px;background:#131919;color:#f6f6f0;overflow:hidden;box-shadow:0 30px 100px #0008}
#galleryDialog.gallery-v19[open]{display:flex;flex-direction:column;gap:0}
#galleryDialog.gallery-v19::backdrop{background:#080d0df2;backdrop-filter:blur(12px)}
.gallery-v19 .gallery-topbar{display:flex;align-items:center;gap:16px;min-height:78px;flex:0 0 auto;border-bottom:1px solid #ffffff21}
.gallery-v19 .gallery-title{min-width:0;flex:1;margin:0;font-size:15px;line-height:1.55;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
.gallery-v19 .gallery-counter{font-size:13px;white-space:nowrap;letter-spacing:.04em;min-width:64px}
.gallery-v19 .gallery-topbar button{display:flex;align-items:center;justify-content:center;gap:10px;min-width:44px;min-height:44px;padding:10px;border:1px solid #ffffff30;border-radius:4px;color:#f6f6f0;background:transparent;font-size:12px}
.gallery-v19 .gallery-topbar button:hover,.gallery-v19 .gallery-topbar button[aria-expanded=true]{background:#ffffff15}
.gallery-v19 .gallery-close{position:static;flex-shrink:0}
.gallery-v19 .gallery-canvas{position:relative;display:flex;flex:1;min-height:0;padding:20px 66px}
#galleryDialog.gallery-v19 .gallery-stage{display:flex;align-items:center;justify-content:center;width:100%;height:100%;min-width:0;min-height:0;margin:0;touch-action:pan-y pinch-zoom;user-select:none}
#galleryDialog.gallery-v19 .gallery-stage img,#galleryDialog.gallery-v19 .gallery-stage video{display:block;width:100%;height:100%;max-width:100%;max-height:100%;aspect-ratio:auto;object-fit:contain;margin:0}
.gallery-v19 .gallery-stage video{touch-action:auto}
.gallery-v19 .gallery-previous{left:0}.gallery-v19 .gallery-next{right:0}
.gallery-v19 .gallery-bottom{flex:0 0 auto;min-height:56px;padding-block:0 14px}
.gallery-v19 .gallery-progress{background:#ffffff20;height:2px;flex:none}
.gallery-v19 .gallery-progress::-webkit-progress-bar{background:#ffffff20}
.gallery-v19 .gallery-caption{max-width:1000px;font-size:12px;line-height:1.6;color:#bcc4c0;margin:10px auto 0;text-align:center;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
#galleryDialog.gallery-v19 .gallery-filmstrip{flex:0 1 200px;min-height:90px;max-height:28dvh;padding:14px 0;border-top:1px solid #ffffff21}
.gallery-v19 .slider-overview button{background:#242e2b}
.gallery-v19 .slider-overview .video-thumbnail{min-height:0!important}
#galleryDialog.gallery-v19:fullscreen{width:100vw;height:100dvh;border:0;border-radius:0}
.project-slider [hidden],#galleryDialog.gallery-v19 [hidden]{display:none!important}
.project-slider button:focus-visible,.gallery-v19 button:focus-visible{outline:3px solid var(--red);outline-offset:3px}
@media(max-width:700px){
 .portfolio-grid:has(.project-slider){gap:50px}
 .project-slider .slider-stage{aspect-ratio:4/3;min-height:260px;max-height:65dvh}
 .project-slider .project-photo{padding:14px 10px 66px}
 .project-slider .slider-arrow{top:auto;bottom:12px;width:44px;height:44px;min-height:44px;transform:none}
 .project-slider .slider-previous{left:calc(50% - 52px)}.project-slider .slider-next{right:calc(50% - 52px)}
 .slider-toolbar{gap:12px;min-height:68px}.slider-toolbar .inline-counter{min-width:54px;font-size:12px}.slider-tools{gap:6px;margin-left:0}.slider-tools button{padding:10px;min-width:44px;min-height:44px}
 .slider-tools button>span,.gallery-v19 .gallery-overview-toggle>span{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
 .project-slider .slider-overview,.gallery-v19 .slider-overview{grid-template-columns:repeat(auto-fill,minmax(76px,1fr));gap:8px;padding-block:12px;max-height:260px}
 .project-slider .slider-overview button,.gallery-v19 .slider-overview button{height:68px}
 .portfolio-card.inline-project .portfolio-caption>div{grid-template-columns:1fr;gap:12px}
 .portfolio-card.inline-project .portfolio-caption h2{font-size:25px}.portfolio-card.inline-project .portfolio-caption .project-description{font-size:14px}
 #galleryDialog.gallery-v19{width:100vw;height:100dvh;border:0;border-radius:0;padding:0 12px;padding-top:env(safe-area-inset-top);padding-bottom:env(safe-area-inset-bottom)}
 .gallery-v19 .gallery-topbar{flex-wrap:wrap;gap:8px;padding:10px 0;min-height:0}.gallery-v19 .gallery-title{flex-basis:calc(100% - 70px);font-size:13px}.gallery-v19 .gallery-counter{min-width:62px;font-size:12px;text-align:right}.gallery-v19 .gallery-close{margin-left:auto}
 .gallery-v19 .gallery-canvas{padding:10px 0 66px}.gallery-v19 .gallery-arrow{top:auto;bottom:10px;transform:none;width:44px;height:44px;min-height:44px}.gallery-v19 .gallery-previous{left:calc(50% - 52px)}.gallery-v19 .gallery-next{right:calc(50% - 52px)}
 .gallery-v19 .gallery-bottom{min-height:40px;padding-bottom:10px}.gallery-v19 .gallery-caption{font-size:11px;margin-top:8px}#galleryDialog.gallery-v19 .gallery-filmstrip{max-height:25dvh;flex-basis:150px}
}
@media(max-height:500px) and (min-width:701px){.gallery-v19 .gallery-topbar{min-height:56px}.gallery-v19 .gallery-canvas{padding-block:8px}.gallery-v19 .gallery-bottom{min-height:32px}.gallery-v19 .gallery-caption{display:none}}
@media(prefers-reduced-motion:reduce){.project-slider *,.gallery-v19 *{transition:none!important;animation:none!important;scroll-behavior:auto!important}}
