/*
 * Motion Edition 02 · Sajid Ali Abbasi
 * Distinct, original interaction language inspired by modern motion portfolios.
 * Preserves the PDF-specified visual identity, editorial drafts, and existing IA.
 */
:root { --motion-ease: cubic-bezier(.16,1,.3,1); --motion-out: cubic-bezier(.76,0,.24,1); }
html { scroll-padding-top: 91px; }
.site-header {position:sticky;top:0;background:rgba(247,245,239,.94);backdrop-filter:blur(20px);-webkit-backdrop-filter:blur(20px);transition:background .5s,box-shadow .5s;}
.site-header.is-scrolled {background:rgba(247,245,239,.97);box-shadow:0 12px 35px rgba(14,31,20,.06);}
.desktop-nav a.is-current::after {right:0;background:var(--gold);}
.desktop-nav a.is-current {color:var(--forest);}

/* Full-screen chapter wipe bridges navigation without obscuring content permanently. */
.chapter-wipe {position:fixed;z-index:1390;inset:0;background:var(--forest);display:grid;place-items:center;color:var(--paper);pointer-events:none;transform:translate3d(0,102%,0);will-change:transform;}
.chapter-wipe>span {font-size:clamp(85px,12vw,190px);line-height:1;letter-spacing:-.1em;font-weight:850;opacity:.85;}
.chapter-wipe>span span{color:#bca781;}
.chapter-wipe.is-entering{transition:transform .38s var(--motion-out);transform:translate3d(0,0,0)}
.chapter-wipe.is-leaving{transition:transform .47s var(--motion-ease);transform:translate3d(0,-103%,0)}
.chapter-wipe.is-resetting{transition:none!important;transform:translate3d(0,103%,0)}

/* Floating navigation, visually tied to progress. */
.chapter-dock{position:fixed;right:23px;bottom:23px;z-index:1250;display:flex;align-items:center;gap:13px;background:rgba(247,245,239,.97);border:1px solid rgba(33,78,61,.20);box-shadow:0 17px 44px rgba(13,36,22,.11);backdrop-filter:blur(17px);border-radius:45px;padding:7px 7px 7px 18px;transform:translateY(115px);opacity:0;transition:transform .75s var(--motion-ease),opacity .65s;pointer-events:none}
.chapter-dock.is-visible{opacity:1;transform:translateY(0);pointer-events:auto}
.dock-index{font-family:var(--editorial);font-size:30px;font-style:italic;color:var(--forest);font-weight:500;line-height:1;min-width:42px}
.dock-details{display:flex;flex-direction:column;gap:4px;max-width:160px;min-width:125px}
.dock-label{font-size:7px;letter-spacing:.22em;font-weight:850;color:#7c867b}
.dock-name{font-size:10px;letter-spacing:.055em;font-weight:850;white-space:nowrap;color:var(--ink)}
.dock-next{display:grid;place-items:center;flex:0 0 44px;width:44px;height:44px;border-radius:50%;background:var(--ink);color:var(--paper);font-size:20px;transition:transform .4s var(--motion-ease),background .2s}
.dock-next:hover{transform:rotate(-45deg);background:var(--forest)}
body.is-locked .chapter-dock{opacity:0;pointer-events:none;}

/* Kinetic letterpress: opt-in at runtime only so content is never hidden if JS fails. */
.kinetic-word{display:inline-block;vertical-align:baseline;overflow:clip;margin-block:-.09em;padding-block:.09em;white-space:nowrap;}
.kinetic-word-inner{display:inline-block;}
html.motion-v2-ready .kinetic-heading .kinetic-word-inner{opacity:.05;transform:translate3d(0,114%,0) rotate(7deg);filter:blur(3px);transition:opacity 1.05s var(--motion-ease),transform 1.15s var(--motion-ease),filter 1.05s var(--motion-ease);transition-delay:calc(var(--word-step,0) * 48ms)}
html.motion-v2-ready .kinetic-heading.is-inview .kinetic-word-inner{opacity:1;transform:translate3d(0,0,0) rotate(0);filter:blur(0)}

/* A calm, tactile tilt on the original sculptural artwork. */
.hero-art-inner{transform:perspective(1200px) translate3d(0,var(--art-scroll,0px),0) rotateX(var(--art-rx,0deg)) rotateY(var(--art-ry,0deg));transform-style:preserve-3d;transition:transform .35s cubic-bezier(.21,.8,.2,1);will-change:transform}
.hero-art-inner::after{content:"";position:absolute;inset:0;background:radial-gradient(ellipse at var(--art-light-x,35%) var(--art-light-y,22%),rgba(247,245,239,.16),transparent 44%);pointer-events:none;mix-blend-mode:screen}
.work-art .work-art-circles{transition:transform 1.2s var(--motion-ease),opacity 1.2s;}
.work-feature.is-inview .work-art-circles{transform:scale(1.055)}
.work-art-mono{transition:transform .8s var(--motion-ease);}
.work-feature:hover .work-art-mono{transform:translate(-8px,-15px) scale(1.04)}

/* Mike-style gallery interactions added to the existing pinned 4-theme rail. */
@media(min-width:761px){
 .horizontal-rail{cursor:grab;touch-action:pan-y;user-select:none;-webkit-user-select:none;}
 .horizontal-rail.is-dragging{cursor:grabbing;}
 .horizontal-rail.is-dragging *{cursor:grabbing!important;}
 .theme-card{transition:transform .65s var(--motion-ease),box-shadow .65s var(--motion-ease);}
 .theme-card:hover{transform:translateY(-13px) rotate(-.55deg);box-shadow:0 25px 65px rgba(0,0,0,.17);}
 .theme-art:after{content:"";position:absolute;inset:0;background:radial-gradient(circle at var(--hover-x,50%) var(--hover-y,50%),rgba(255,255,255,.24),transparent 53%);opacity:0;transition:opacity .4s;pointer-events:none}
 .theme-card:hover .theme-art:after{opacity:1;}
}
/* Spotlight: large editorial browsing experience, no autoplay or invented imagery. */
.spotlight-shell{margin:clamp(52px,7.5vw,118px) 0 72px;border:1px solid #bcc8b9;background:var(--paper);}
.spotlight-topline,.spotlight-footline{display:flex;justify-content:space-between;gap:20px;padding:17px 24px;color:var(--sage);font-size:9px;letter-spacing:.12em;font-weight:750}
.spotlight-topline{border-bottom:1px solid var(--line)}.spotlight-footline{border-top:1px solid var(--line)}
.spotlight-led{display:inline-block;width:6px;height:6px;border-radius:50%;background:var(--gold);margin:0 7px 2px}
.spotlight-stage{display:grid;grid-template-columns:1.02fr .98fr;min-height:565px;position:relative;outline-offset:5px}
.spotlight-poster{position:relative;background:#254b38;display:flex;align-items:center;justify-content:center;min-height:555px;overflow:hidden;color:#f2ecd8;isolation:isolate;}
.spotlight-poster::before{content:"";position:absolute;inset:0;background:linear-gradient(135deg,rgba(241,235,202,.1),transparent 42%),repeating-linear-gradient(0deg,rgba(255,255,255,.045) 0 1px,transparent 1px 46px),repeating-linear-gradient(90deg,rgba(255,255,255,.045) 0 1px,transparent 1px 46px);z-index:-1}
.spotlight-poster:after{content:"";position:absolute;left:-20%;bottom:-40%;width:120%;aspect-ratio:1;border:1px solid rgba(246,237,216,.2);border-radius:50%;box-shadow:0 0 0 67px rgba(255,255,255,.028),0 0 0 134px rgba(255,255,255,.02);}
.spotlight-poster-top,.spotlight-poster-bottom{position:absolute;z-index:2;font-size:10px;font-weight:750;letter-spacing:.17em;}
.spotlight-poster-top{top:27px;left:27px}.spotlight-poster-bottom{bottom:27px;left:27px}
.spotlight-poster-ring{width:60%;max-width:360px;aspect-ratio:1;border:1px solid rgba(245,238,217,.34);border-radius:50%;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%) rotate(24deg);box-shadow:inset 0 0 0 45px rgba(255,255,255,.045),0 0 0 38px rgba(255,255,255,.03)}
.spotlight-poster-ring:before{content:"";position:absolute;top:50%;left:-25%;right:-25%;height:1px;background:rgba(246,238,214,.3);transform:rotate(-36deg)}
.spotlight-poster-ghost{position:absolute;font-size:clamp(290px,31vw,540px);line-height:1;letter-spacing:-.17em;font-weight:850;opacity:.07;top:47%;left:44%;transform:translate(-50%,-50%);z-index:0}
.spotlight-poster-index{font-family:var(--editorial);font-style:italic;font-size:clamp(200px,23vw,390px);line-height:1;letter-spacing:-.16em;transform:translateX(-.055em);position:relative;z-index:1;text-shadow:18px 17px 42px rgba(11,31,18,.17)}
.spotlight-copy{padding:clamp(31px,5vw,78px);display:flex;flex-direction:column;align-items:start;justify-content:space-between;min-width:0;}
.spotlight-eyebrow{font-size:10px;letter-spacing:.13em;font-weight:750;color:var(--gold);line-height:1.5}
.spotlight-copy-core{width:100%;padding:40px 0 50px;}
.spotlight-copy-core h3{font-size:clamp(34px,3.8vw,61px);font-weight:760;letter-spacing:-.085em;line-height:1.075;margin:0 0 28px;max-width:540px;}
.spotlight-copy-core p{font-size:clamp(15px,1.25vw,19px);color:var(--sage);line-height:1.65;max-width:475px;margin:0}
.spotlight-lower{display:flex;justify-content:space-between;align-items:end;gap:22px;width:100%;}
.spotlight-read{border:0;border-bottom:1px solid var(--ink);background:transparent;padding:0 0 12px;text-align:left;color:var(--ink);font-size:10px;font-weight:850;letter-spacing:.1em;white-space:nowrap;}
.spotlight-read span{display:inline-block;margin-left:14px;font-size:21px;line-height:0;vertical-align:middle;transition:transform .4s var(--motion-ease)}
.spotlight-read:hover span{transform:translate(5px,-4px)}
.spotlight-controls{display:flex;align-items:center;gap:10px;white-space:nowrap;}
.spotlight-controls>span{font-size:10px;letter-spacing:.08em;font-weight:750;color:var(--sage);margin-right:8px}
.spotlight-controls button{width:47px;height:47px;border:1px solid var(--line);background:transparent;border-radius:50%;font-size:21px;display:grid;place-items:center;color:var(--ink);transition:background .3s,color .3s,border-color .3s,transform .35s}
.spotlight-controls button:hover{background:var(--forest);border-color:var(--forest);color:var(--paper);transform:scale(1.07)}
.spotlight-stage.is-switching .spotlight-poster-index{animation:spotlightGlyph .75s var(--motion-ease) both}
.spotlight-stage.is-switching .spotlight-poster-ring{animation:spotlightRing .85s var(--motion-ease) both}
.spotlight-stage.is-switching .spotlight-copy-core,.spotlight-stage.is-switching .spotlight-eyebrow{animation:spotlightCopy .76s var(--motion-ease) both}
@keyframes spotlightGlyph{0%{transform:translate(-.19em,30px) rotate(-12deg) scale(.82);opacity:0}100%{transform:translateX(-.055em) scale(1);opacity:1}}
@keyframes spotlightRing{0%{opacity:0;transform:translate(-50%,-50%) scale(.83) rotate(0)}100%{opacity:1;transform:translate(-50%,-50%) scale(1) rotate(24deg)}}
@keyframes spotlightCopy{0%{opacity:0;transform:translateY(22px);filter:blur(4px)}100%{opacity:1;transform:translateY(0);filter:blur(0)}}
.spotlight-stage[data-theme="2"] .spotlight-poster{background:#4e6456}
.spotlight-stage[data-theme="3"] .spotlight-poster{background:#344e56}
.spotlight-stage[data-theme="4"] .spotlight-poster{background:#605b48}
.spotlight-stage[data-theme="5"] .spotlight-poster{background:#36573f}
.spotlight-stage[data-theme="6"] .spotlight-poster{background:#575344}
.spotlight-stage.is-grabbing{cursor:grabbing;}

/* More emphatic yet editorial content transitions. */
.section-marker{position:relative;overflow:hidden;padding-bottom:15px!important;}
.section-marker::after{content:"";position:absolute;bottom:0;left:0;width:100%;height:1px;background:currentColor;opacity:.28;transform-origin:left;transform:scaleX(.001);transition:transform 1.35s var(--motion-ease);}
.section-marker.is-inview::after{transform:scaleX(1)}
.media-disc{transition:transform .9s var(--motion-ease);}
.media-visual:hover .media-disc{transform:rotate(0deg) scale(1.04)}
.speaking-item{position:relative;isolation:isolate;overflow:hidden}
.speaking-item:before{content:"";position:absolute;inset:0;background:#e3e9e0;transform:translate3d(-102%,0,0);transition:transform .65s var(--motion-ease);z-index:-1}
.speaking-item:hover:before{transform:translate3d(0,0,0)}
.speaking-item:hover{background:transparent}
.speaking-item .si-arrow{transition:transform .5s var(--motion-ease)}
.speaking-item:hover .si-arrow{transform:translate(5px,-6px) rotate(45deg)}
.idea-cover{isolation:isolate}
.idea-cover:after{content:"";position:absolute;inset:0;background:linear-gradient(125deg,transparent 32%,rgba(255,255,255,.2) 47%,transparent 60%);transform:translateX(-130%);transition:transform .85s var(--motion-ease);pointer-events:none;z-index:2}
.idea-card:hover .idea-cover:after{transform:translateX(130%)}
.article-dialog.open .dialog-scroll{animation:dialogContents .7s var(--motion-ease) .15s both}
@keyframes dialogContents{from{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}

/* Pause affects decorative/ambient movement; interaction cues remain usable. */

@media(max-width:1130px){
 .spotlight-copy{padding:clamp(28px,4vw,50px)}
 .spotlight-copy-core h3{font-size:clamp(32px,3.8vw,52px)}
 .spotlight-lower{align-items:start;flex-direction:column}
}
@media(max-width:760px){
 html{scroll-padding-top:76px;}
 .chapter-dock{right:11px;bottom:10px;padding:6px 6px 6px 13px;gap:6px;}
 .dock-index{font-size:22px;min-width:32px}
 .dock-details{min-width:83px;max-width:105px}.dock-label{font-size:6px}.dock-name{font-size:8px}
 .dock-next{width:36px;height:36px;flex-basis:36px;font-size:17px}
 .spotlight-shell{margin:55px 0 55px}
 .spotlight-topline,.spotlight-footline{padding:13px 14px;font-size:8px;line-height:1.6;}
 .spotlight-topline>span:last-child,.spotlight-footline>span:last-child{display:none}
 .spotlight-stage{grid-template-columns:1fr;}
 .spotlight-poster{min-height:320px;height:320px}
 .spotlight-poster-index{font-size:200px}
 .spotlight-poster-ghost{font-size:290px}
 .spotlight-poster-top,.spotlight-poster-bottom{font-size:8px;left:18px}
 .spotlight-copy{padding:27px 23px 30px;min-height:360px}
 .spotlight-copy-core{padding:40px 0 35px}
 .spotlight-copy-core h3{font-size:clamp(31px,8.4vw,49px)}
 .spotlight-copy-core p{font-size:15px}
 .spotlight-lower{flex-direction:row;align-items:center;gap:5px;}
 .spotlight-read{font-size:8px;letter-spacing:.04em}.spotlight-read span{margin-left:3px;font-size:16px}
 .spotlight-controls{gap:5px}.spotlight-controls button{width:33px;height:33px;font-size:17px}.spotlight-controls>span{font-size:9px;margin-right:2px}
 .hero-art-inner{transform:none!important}
}
@media(max-width:400px){
 .spotlight-poster{height:260px;min-height:260px}.spotlight-poster-index{font-size:162px}.spotlight-copy-core h3{font-size:30px}
 .spotlight-copy{padding:22px 16px;min-height:335px}.spotlight-read{font-size:7px}.spotlight-controls button{height:29px;width:29px;font-size:15px}.spotlight-controls>span{font-size:8px}
 .chapter-dock .dock-details{display:none}
}
@media(prefers-reduced-motion:reduce){
 .chapter-wipe{display:none!important}
 .chapter-dock{transition:none!important}
 .kinetic-word,.kinetic-word-inner{filter:none!important;transform:none!important;opacity:1!important;}
 .hero-art-inner{transform:none!important;transition:none!important}
 .spotlight-stage.is-switching *{animation:none!important}
 .section-marker::after{transform:scaleX(1)!important}
}
