/* Home and About are fixed scenes. Only an opened portfolio tab scrolls. */
html{height:100%;overflow:hidden;overscroll-behavior:none;scrollbar-gutter:auto}
body{position:fixed;inset:0;width:100%;height:100%;overflow:hidden;overscroll-behavior:none}
#home{height:100dvh;min-height:0;overflow:hidden;touch-action:pinch-zoom}
#projects{padding-bottom:0}
:root{--top:clamp(24px,calc((100dvh - 460px)/2.5),160px);--hero-top:clamp(40px,17dvh,180px)}
.intro{margin-bottom:clamp(24px,5vh,56px)}
dialog{height:100dvh;overflow-x:hidden;overscroll-behavior:none;touch-action:pan-y pinch-zoom;scrollbar-width:none;scrollbar-gutter:auto}
dialog::-webkit-scrollbar,.social-scroll::-webkit-scrollbar,.collection-scroll::-webkit-scrollbar,.x-timeline-scroll::-webkit-scrollbar{display:none}
.social-scroll,.collection-scroll,.x-timeline-scroll{scrollbar-width:none;overscroll-behavior:none}
.scroll-ruler{position:fixed;z-index:30;top:22px;right:clamp(24px,5vw,96px);left:auto;display:flex;align-items:center;justify-content:center;width:243px;height:40px;padding:10px 0;gap:8px;border-radius:12px;touch-action:none;user-select:none;-webkit-user-select:none;cursor:ew-resize}
.scroll-ruler[hidden]{display:none}
.scroll-ruler span{display:block;width:1px;height:8px;flex:0 0 1px;background:var(--primary);transform-origin:center;opacity:.3;pointer-events:none}
.scroll-ruler:focus-visible{outline:1px solid var(--tertiary);outline-offset:3px}
.music-card{display:block}.music-card:focus-visible{outline:2px solid var(--primary);outline-offset:5px}
.gallery-top-fade{position:fixed;inset:0 0 auto;height:80px;z-index:3;pointer-events:none;opacity:0;background:linear-gradient(var(--bg),transparent);transition:opacity .25s ease}
dialog.visible:not(.transitioning):not(.social-project):not(.x-project):not(.collection-project) .gallery-top-fade{opacity:1}

/* A single desktop scroll surface per feed, including gestures beside the content. */
@media(min-width:1024px){
 dialog.x-project,dialog.social-project,dialog.collection-project{overflow-y:hidden}
 .x-project .hero-host,.social-project .hero-host,.collection-project .hero-host{min-height:0;max-height:none}
 .workstation{transform:translateX(-50px)}
}

@media(max-width:1023px){
 :root{--padding:24px}
 #home .layout{width:calc(100% - 48px);max-width:440px;height:calc(100% - 60px - env(safe-area-inset-bottom,0px));display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(0,1fr) auto;gap:10px}
 #home .layout>*{min-width:0}
 #home .intro{grid-row:1;width:100%;height:auto;min-height:0;margin:0;padding-top:clamp(20px,4.5dvh,40px)}
 .intro-eyebrow{font-size:24px;font-weight:700;margin-bottom:8px}.intro-cursor{width:2px;height:0.85em;margin-left:2px}
 .intro-headline{font-size:clamp(19px,4.8vw,24px);line-height:1.2;margin-bottom:8px;column-gap:0.24em}
 .intro-sub{font-size:clamp(13px,3.2vw,15px);line-height:1.35;margin-top:0}
 .intro h2{font-size:inherit;line-height:inherit}
 #home .display-column{grid-row:2;position:relative;inset:auto;width:100%;height:100%;min-height:0;pointer-events:auto}
 .display-sticky{position:relative;top:auto;padding:0;height:100%;display:flex;align-items:center;justify-content:center}
 .workstation{align-self:center;width:calc(100vw - 10px);max-width:calc((100dvh - 360px)*16/9);min-width:180px;margin:8px 0 0}
 #home #projects{grid-row:3;position:relative;width:100%;margin:0;padding:0;touch-action:pinch-zoom;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
 #projects.is-gliding .project-button{transform:none}
 #projects.is-gliding .selection{box-shadow:var(--glass-shadow),0 5px 20px #00000009}
 .project-button{height:clamp(34px,5.8dvh,46px);padding:8px 14px;font-size:clamp(16px,2.5dvh,18px)}
 .selection{top:3px;height:calc(clamp(34px,5.8dvh,46px) - 6px)}
 footer{top:calc(16px + env(safe-area-inset-top,0px));right:16px;bottom:auto;z-index:20}footer:before{display:none!important}
 .about-open #home .layout{display:block}
 .about-open #home .intro{z-index:6}
 .about-open #home #projects,.about-open #home .display-column{display:none}
 .about-open .biography{font-size:clamp(16px,2.75dvh,22px);line-height:1.27;max-width:100%;letter-spacing:-.35px}
 .collaborations{margin-top:clamp(18px,3.5dvh,30px);max-width:100%}
 .brand-heading{margin-bottom:12px}.brand-logo{height:38px}
 .about-open .portrait{position:absolute;left:50%;bottom:0;margin:0;width:min(calc(100% - 24px),540px);height:min(var(--portrait-space,48dvh),52dvh);max-width:none;transform:translateX(-50%)}
 .portrait img{height:100%;width:100%;max-width:100%;object-fit:contain;object-position:center bottom}
 /* One native scroll area per tab eliminates inner/outer scroll handoffs. */
 .gallery-layout,.social-project .gallery-layout,.x-project .gallery-layout,.collection-project .gallery-layout{display:block;width:100%;max-width:700px}
 .gallery-nav,.social-project .gallery-nav,.x-project .gallery-nav,.collection-project .gallery-nav{padding:76px 34px 26px}
 #gallery,.social-project #gallery,.x-project #gallery,.collection-project #gallery{width:100%;max-width:100%;padding:0 0 calc(36px + env(safe-area-inset-bottom,0px));gap:22px}
 .social-project .hero-host,.x-project .hero-host,.collection-project .hero-host{height:auto;min-height:0;max-height:none;aspect-ratio:auto}
 .hero-host>.preview.native-scrollview{position:relative;inset:auto;width:100%;height:auto;overflow:visible;mask-image:none;-webkit-mask-image:none}
 .native-scrollview>.social-stage,.native-scrollview>.collection-stage,.native-scrollview>.x-preview-stage{position:relative;inset:auto;transform:none!important;width:100%!important;height:auto!important}
 .native-scrollview .social-scroll,.native-scrollview .collection-scroll,.native-scrollview .x-timeline-scroll{height:auto;min-height:0;max-height:none;overflow:visible;mask-image:none;-webkit-mask-image:none}
 #back{top:18px;right:14px}.scroll-ruler{top:20px;width:min(220px,calc(100% - 100px));gap:7px;right:70px;left:auto}
 .social-end,.music-stack,.preview-films .films-grid{padding-bottom:28px}
 .collection-project .hero-host>.preview{border-radius:0}
 .music-card{-webkit-touch-callout:none;user-select:none;-webkit-user-select:none;touch-action:pan-y pinch-zoom}
}
@media(max-width:1023px) and (max-height:540px) and (orientation:landscape){
 #home .layout{max-width:850px;width:calc(100% - 56px);height:100%;display:grid;grid-template-columns:46% 54%;grid-template-rows:auto 1fr;gap:4px 12px;padding-bottom:14px}
 #home .intro{grid-column:1;grid-row:1;padding-top:12px}.intro h2{font-size:17px}h1{font-size:22px;line-height:26px}
 #home .display-column{grid-column:2;grid-row:1/3}.workstation{width:100%;max-width:none;min-width:0}
 #home #projects{grid-column:1;grid-row:2;align-self:center}.project-button{height:31px;font-size:16px;padding:5px 12px}.selection{height:27px;top:2px}
 .about-open #home .layout{display:block}.about-open #home .intro{max-width:60%}.about-open .biography{font-size:16px;line-height:1.2}
 .about-open .portrait{left:auto;right:0;width:40vw;height:75dvh;transform:none;max-width:40vw}.collaborations{margin-top:16px}.brand-heading{margin-bottom:8px}.brand-logo{height:30px}
}
@media(prefers-reduced-motion:reduce){
 .gallery-top-fade{transition:none}
 .brand-group{gap:8px}.brand-logo{flex-basis:calc(33.33% - 6px);width:calc(33.33% - 6px);height:26px}
}

@media(min-width:1024px) and (max-height:700px){.biography{font-size:24px;line-height:30px}.collaborations{margin-top:24px}.brand-logo{height:34px}.intro{margin-bottom:24px}.project-button{height:46px}.selection{height:40px}}
@media(max-height: 560px) and (max-width: 1023px) and (orientation: portrait){
 html,body{height:auto;position:static;overflow-y:auto}
 #home{height:auto;min-height:100dvh;overflow:visible}
}
