.project-gallery{min-width:0}
.gallery-stage{position:relative;isolation:isolate}
.gallery-track{display:flex;width:100%;overflow-x:auto;overflow-y:hidden;scroll-snap-type:x mandatory;scrollbar-width:none;border:1px solid #a492dc45;border-radius:13px;background:#080d17;overscroll-behavior-x:contain;touch-action:pan-x pan-y pinch-zoom;cursor:grab}
.gallery-track::-webkit-scrollbar{display:none}
.gallery-slide{display:flex;align-items:center;justify-content:center;flex:0 0 100%;width:100%;min-width:0;aspect-ratio:1.98;scroll-snap-align:start;scroll-snap-stop:always;padding:0;margin:0;border:0;border-radius:0;background:transparent;color:inherit;overflow:hidden;cursor:inherit}
.portfolio-case-media .gallery-slide img{display:block;width:100%;height:100%;max-height:none;object-fit:contain;user-select:none;-webkit-user-drag:none;pointer-events:none}
.gallery-open:focus-visible{outline:3px solid var(--blue);outline-offset:-4px}
.gallery-track.is-dragging{scroll-snap-type:none;cursor:grabbing;user-select:none}
.gallery-arrow{position:absolute;z-index:2;top:50%;transform:translateY(-50%);display:grid;place-items:center;width:36px;height:44px;padding:0;border:1px solid #c9a1f180;border-radius:12px;background:#0b1027db;color:#fff;font-size:29px;line-height:1;backdrop-filter:blur(12px);box-shadow:0 4px 18px #0006;transition:background .2s,border-color .2s}
.gallery-arrow:hover{background:#613da5;border-color:#d9b6ff}.gallery-prev{left:10px}.gallery-next{right:10px}
.gallery-zoom{position:absolute;right:10px;top:10px;display:grid;place-items:center;width:29px;height:27px;border:1px solid #ac9ce14d;border-radius:8px;background:#0b1027c9;color:#eee4ff;pointer-events:none;font-size:21px}
.gallery-meta{display:flex;justify-content:space-between;align-items:start;gap:12px;margin-top:12px;font-size:11px;color:var(--muted);line-height:1.5}
.gallery-caption{min-width:0}.gallery-count{flex-shrink:0;font-variant-numeric:tabular-nums;color:#d9c5ff}
.gallery-progress{height:3px;overflow:hidden;background:#8d77ad26;border-radius:4px;margin-top:12px}
.gallery-progress>span{display:block;height:100%;width:100%;background:linear-gradient(90deg,#bc7bff,#54c8ff);border-radius:inherit;transition:transform .3s,width .3s}
.gallery-help{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-top:10px;font-size:10px;color:#a4afca}
.gallery-expand{font-size:11px;padding:5px 0;border:0;background:transparent;color:#d3b3ff;text-align:right}
.gallery-expand:hover{color:#79d7ff}
html.gallery-modal-open{overflow:hidden}
.project-lightbox{position:fixed;inset:0;width:min(1400px,calc(100vw - 48px));max-width:none;max-height:calc(100dvh - 40px);margin:auto;padding:0;color:var(--text);border:1px solid #a78ad575;border-radius:22px;background:linear-gradient(130deg,#18213a,#0b1221);box-shadow:0 30px 100px #000b;overflow:auto}
.project-lightbox::backdrop{background:#040711d9;backdrop-filter:blur(12px)}
.project-lightbox[open]{animation:gallery-arrive .22s ease-out}
.lightbox-shell{padding:20px 24px 16px}
.lightbox-header{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:18px}
.lightbox-header>div>span{display:block;font-size:8px;letter-spacing:1.8px;color:#c49bf4;margin-bottom:6px}
.lightbox-header h2{font-size:22px;letter-spacing:-.5px;line-height:1.2}
.lightbox-close{display:grid;place-items:center;flex-shrink:0;width:42px;height:42px;border:1px solid #bc9ce659;border-radius:12px;background:#ffffff08;color:#eadcfa;font-size:19px}
.lightbox-close:hover{background:#9c5cdb40}
.lightbox-gallery .gallery-track{border-color:#9d91cb45;background:#050910}
.lightbox-gallery .gallery-slide{height:min(62dvh,calc(100dvh - 210px));aspect-ratio:auto}
.lightbox-gallery .gallery-slide img{display:block;width:100%;height:100%;object-fit:contain;user-select:none;pointer-events:none}
.lightbox-gallery .gallery-arrow{width:44px;height:56px;font-size:36px}
.lightbox-gallery .gallery-meta{font-size:12px}
.lightbox-hint{font-size:10px;text-align:center;color:#a5a9c0;margin-top:14px}
@keyframes gallery-arrive{from{opacity:0;transform:translateY(10px) scale(.985)}to{opacity:1;transform:none}}
@media(max-width:700px){.gallery-arrow{width:32px;height:40px}.gallery-prev{left:7px}.gallery-next{right:7px}.gallery-meta{font-size:10px}.project-lightbox{width:calc(100vw - 16px);max-height:calc(100dvh - 20px);border-radius:16px}.lightbox-shell{padding:14px 10px}.lightbox-header{margin-bottom:14px;gap:10px}.lightbox-header h2{font-size:19px}.lightbox-gallery .gallery-slide{height:min(62vw,calc(100dvh - 200px))}.lightbox-gallery .gallery-arrow{width:34px;height:44px;font-size:29px}.lightbox-hint{font-size:9px;line-height:1.6}.lightbox-gallery .gallery-meta{font-size:11px}.lightbox-close{width:38px;height:38px}}
@media(prefers-reduced-motion:reduce){.project-lightbox[open]{animation:none}.gallery-progress>span,.gallery-arrow{transition:none}}
