.portfolio-featured .work-sticky{height:min(var(--gallery-height),100svh);min-height:0}.portfolio-featured .gallery-grid{gap:var(--gallery-gap)}.portfolio-featured .project{width:var(--gallery-card-width);min-width:var(--gallery-card-width);flex:0 0 var(--gallery-card-width)}
.portfolio-compact{background:var(--bg,#0a0e14);padding:32px 0;overflow:hidden}.portfolio-compact .section-head{height:auto;min-height:0;align-items:center;padding-top:12px;padding-bottom:22px}.portfolio-compact .section-head h2{font-size:clamp(26px,3vw,44px);margin:8px 0}.portfolio-compact .gallery-viewport{overflow-x:auto;overscroll-behavior-x:contain;scroll-snap-type:x proximity;scrollbar-width:thin;padding:0 max(24px,4vw) 12px;height:auto}.portfolio-compact .gallery-grid{display:flex;width:max-content;gap:var(--gallery-gap);transform:none!important;padding:0;height:auto}.portfolio-compact .project{display:flex;flex-direction:column;position:relative;flex:0 0 var(--gallery-card-width);width:var(--gallery-card-width);height:var(--gallery-height);min-height:0;max-width:80vw;scroll-snap-align:start;background:#121922;border:1px solid #283746;text-align:left;padding:0;overflow:hidden;text-decoration:none;color:inherit}.portfolio-compact .project img{position:static;width:100%;height:calc(100% - 90px);min-height:60px;object-fit:cover;transition:transform .3s}.portfolio-compact .project-overlay{position:static;display:flex;flex-direction:column;justify-content:center;gap:8px;min-height:90px;margin:0;padding:16px;background:linear-gradient(120deg,#111923,#192431);opacity:1;transform:none}.portfolio-compact .project-no{font-size:10px;letter-spacing:1.5px;color:var(--accent,#8cecff)}.portfolio-compact .project-name{font-size:17px;line-height:1.2;text-transform:uppercase;font-weight:700;display:flex;justify-content:space-between;gap:12px}.portfolio-compact .project:hover{border-color:var(--accent,#8cecff)}.portfolio-compact .project:hover img{transform:scale(1.03)}.portfolio-arrows{display:flex;gap:8px}.portfolio-arrows button{color:var(--text,#edf5f9);background:#14212b;border:1px solid #345060;width:42px;height:36px;cursor:pointer}.portfolio-arrows button:disabled{opacity:.3;cursor:default}
@media(max-width:680px){.portfolio-featured .work-sticky{height:min(max(var(--gallery-height),420px),100svh);min-height:0}.portfolio-featured .project{max-width:85vw}.portfolio-compact .section-head{align-items:flex-start}.portfolio-compact .section-count{font-size:11px}}
.game-update{display:flex;gap:12px;align-items:center;flex-wrap:wrap;font:10px/1.4 monospace;letter-spacing:1px;margin-top:6px;color:#b8cbd3}.game-version{display:inline-flex;gap:7px;align-items:center;color:var(--accent,#8cecff)}.game-version i{width:5px;height:5px;border-radius:50%;background:currentColor;box-shadow:0 0 7px currentColor}.game-update-date{color:#c2c9cc}.portfolio-compact .is-game-link img{min-height:40px;height:calc(100% - 130px)}.portfolio-compact .is-game-link .project-overlay{min-height:130px}.portfolio-compact .game-update{gap:3px;flex-direction:column;align-items:flex-start;font-size:9px;margin-top:3px}

@media(prefers-reduced-motion:reduce){.portfolio-featured .work-sticky{height:auto;min-height:0}.portfolio-featured .gallery-viewport{flex:none}.portfolio-featured .gallery-grid{height:55vh}}

/* Featured homepage images: keep titles clear over bright artwork. */
.portfolio-featured .project::after{content:"";position:absolute;inset:0;z-index:1;pointer-events:none;background:linear-gradient(180deg,rgba(0,0,0,.32),rgba(0,0,0,.42) 45%,rgba(0,0,0,.78));opacity:1}
.portfolio-featured .project .project-overlay{z-index:2}
.portfolio-featured .project:hover::after,.portfolio-featured .project:focus-visible::after{opacity:1}

/* Keep featured headings below the navigation, with compact title spacing. */
.portfolio-featured{--gallery-nav-height:96px;scroll-margin-top:var(--gallery-nav-height)}
.portfolio-featured .work-sticky{top:var(--gallery-nav-height);height:min(var(--gallery-height),calc(100svh - var(--gallery-nav-height)));min-height:0}
.portfolio-featured .section-head{height:auto;min-height:0;align-items:center;padding-top:20px;padding-bottom:20px;gap:18px}
.portfolio-featured .section-head .kicker{display:block;font-size:11px;line-height:1.4;margin:0;letter-spacing:.12em}
.portfolio-featured .section-head h2{font-size:clamp(34px,5.5vw,72px);line-height:1.02;margin:7px 0 0;overflow-wrap:anywhere}
.portfolio-featured .gallery-foot{height:44px}
@media(max-width:680px){
 .work.portfolio-featured{height:auto;overflow:hidden;--gallery-nav-height:72px}
 .portfolio-featured .work-sticky{position:relative;top:auto;height:auto;min-height:0;overflow:visible}
 .portfolio-featured .section-head{padding-top:22px;padding-bottom:18px;align-items:flex-end}
 .portfolio-featured .section-head h2{font-size:clamp(32px,10vw,48px);margin-top:6px}
 .portfolio-featured .section-count{flex-shrink:0;font-size:10px}
 .portfolio-featured .gallery-viewport{flex:none;overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:contain;scroll-snap-type:x proximity;-webkit-overflow-scrolling:touch}
 .portfolio-featured .gallery-grid{height:clamp(260px,52svh,460px);will-change:auto;padding:0 20px}
 .portfolio-featured .project{scroll-snap-align:center;max-width:85vw}
 .portfolio-featured .gallery-foot{height:38px}
}

/* 1.0.550: featured gallery layout only; navigation remains unchanged. */
.portfolio-featured{--gallery-nav-height:110px}
.portfolio-featured .work-sticky .section-head{height:auto;min-height:0;flex:0 0 auto;padding-top:24px;padding-bottom:14px;gap:14px}
.portfolio-featured .work-sticky .section-head .kicker{font-size:10px;line-height:1.2;margin:0;letter-spacing:.1em}
.portfolio-featured .work-sticky .section-head h2{font-size:clamp(32px,4.5vw,60px);line-height:1;margin:4px 0 0}
@media(max-width:680px){
 .work.portfolio-featured{height:auto;min-height:0!important;margin-bottom:0;padding-bottom:0;overflow:hidden}
 .portfolio-featured .work-sticky{height:auto;min-height:0!important;padding-bottom:0;margin-bottom:0;top:auto}
 .portfolio-featured .work-sticky .section-head{padding-top:24px;padding-bottom:14px;gap:10px}
 .portfolio-featured .work-sticky .section-head h2{font-size:clamp(30px,9vw,44px);margin-top:4px;line-height:1.02}
 .portfolio-featured .gallery-viewport{height:auto;min-height:0;flex:0 0 auto;padding-bottom:0;margin-bottom:0}
 .portfolio-featured .gallery-grid{height:clamp(340px,70svh,760px);padding-bottom:0;margin-bottom:0}
 .portfolio-featured .gallery-grid .project{height:100%;min-height:0;aspect-ratio:auto;width:86vw;min-width:86vw;max-width:86vw;flex:0 0 86vw}
 .portfolio-featured .project img{width:100%;height:100%;object-fit:cover}
 .portfolio-featured .gallery-foot{height:32px;min-height:0;flex:0 0 32px;margin:0;padding-top:0;padding-bottom:0}
}

/* 1.0.555: a little breathing room above the mobile footer content. */
@media(max-width:680px){
 .site-footer{padding-top:28px}
}

/* 1.0.556: mobile vertical scrolling drives the pinned featured gallery. */
@media(max-width:680px) and (prefers-reduced-motion:no-preference){
 .work.portfolio-featured{height:300svh;overflow:clip;--gallery-nav-height:72px}
 .portfolio-featured .work-sticky{position:sticky;top:72px;height:calc(100svh - 72px);min-height:0!important;overflow:hidden;display:flex;flex-direction:column}
 .portfolio-featured .gallery-viewport{flex:1 1 0;min-height:0;height:auto;overflow:hidden;scroll-snap-type:none}
 .portfolio-featured .gallery-grid{height:100%;transform:translate3d(0,0,0);will-change:transform}
 .portfolio-featured .gallery-grid .project{scroll-snap-align:none}
}

/* 1.0.603: Mobile featured gallery tracks the actual visible browser viewport. */
@media (max-width:680px) and (prefers-reduced-motion:no-preference){
 .work.portfolio-featured{--ev2n-visible-height:100dvh}
 .portfolio-featured .work-sticky{height:calc(var(--ev2n-visible-height) - 72px);max-height:none}
 .portfolio-featured .gallery-foot{height:44px;flex:0 0 44px;display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:9px;letter-spacing:.09em;white-space:nowrap}
 .portfolio-featured .gallery-foot span:last-child{display:inline-flex;align-items:center;gap:5px;color:#a1f4f4}
 .portfolio-featured .gallery-foot span:last-child span{font-size:15px;margin-left:2px}
}
