/* Optional motion layer; content stays visible until its observer is ready. */
.hero-ambient{position:absolute;inset:0;z-index:-1;overflow:hidden;pointer-events:none;opacity:0;transition:opacity .8s ease}
.motion-ready .hero-ambient{opacity:1}
.ambient-orb,.ambient-ring{position:absolute;display:block;will-change:transform}
.ambient-orb{width:520px;height:520px;border-radius:50%;filter:blur(26px);opacity:.5}
.orb-one{right:-100px;top:-180px;background:radial-gradient(circle,#5cae961d 0,#5cae9607 43%,transparent 70%);animation:ambient-drift 19s ease-in-out infinite alternate}
.orb-two{left:28%;bottom:-310px;background:radial-gradient(circle,#668eba1b 0,#668eba06 43%,transparent 70%);animation:ambient-drift 23s ease-in-out -8s infinite alternate-reverse}
.ambient-ring{width:470px;height:470px;border:1px solid #a8d8c70a;border-radius:50%;right:-90px;top:-100px;animation:ambient-orbit 28s ease-in-out infinite alternate}
.ring-two{width:620px;height:620px;right:-165px;top:-175px;border-color:#93b4d408;animation-duration:36s;animation-delay:-12s}
@keyframes ambient-drift{from{transform:translate3d(-20px,10px,0) scale(.96)}to{transform:translate3d(30px,35px,0) scale(1.08)}}
@keyframes ambient-orbit{from{transform:translate3d(-10px,0,0) rotate(-12deg) scaleY(.9)}to{transform:translate3d(20px,18px,0) rotate(12deg) scaleY(1.02)}}
@supports ((-webkit-background-clip:text) or (background-clip:text)){
 .motion-ready .hero h1>span{background-image:linear-gradient(110deg,var(--accent) 20%,#d1e9e0 40%,var(--accent) 58%,#9ec7ca 80%);background-size:250% 100%;-webkit-background-clip:text;background-clip:text;color:transparent;animation:name-light 12s ease-in-out infinite alternate}
}
@keyframes name-light{from{background-position:0% 50%}to{background-position:100% 50%}}
.motion-ready [data-reveal]{opacity:.15;translate:0 16px;filter:blur(2px);transition:opacity 550ms ease var(--reveal-delay,0ms),translate 550ms cubic-bezier(.2,.65,.3,1) var(--reveal-delay,0ms),filter 550ms ease var(--reveal-delay,0ms),transform 350ms ease,border-color 300ms ease,box-shadow 350ms ease}
.motion-ready [data-reveal].is-visible{opacity:1;translate:0 0;filter:blur(0)}
.profile-panel,.project-card,.expertise-card,.education-entry{position:relative;transition:transform 350ms ease,border-color 300ms ease,box-shadow 350ms ease}
.profile-panel:before,.project-card:before,.expertise-card:before,.education-entry:before{content:'';position:absolute;inset:0;border-radius:inherit;pointer-events:none;opacity:0;background:radial-gradient(340px circle at var(--pointer-x,50%) var(--pointer-y,30%),#a8d8c70d,transparent 75%);transition:opacity 350ms ease}
.motion-ready :is(.profile-panel,.project-card,.expertise-card,.education-entry):focus-within{border-color:#6b998a;box-shadow:0 12px 30px #0000001f}
.motion-ready :is(.profile-panel,.project-card,.expertise-card,.education-entry):focus-within:before{opacity:1}
@media(hover:hover) and (pointer:fine){
 .motion-ready :is(.profile-panel,.project-card,.expertise-card,.education-entry):hover{border-color:#6b998a;box-shadow:0 15px 35px #00000024}
 .motion-ready :is(.profile-panel,.project-card,.expertise-card,.education-entry):hover:before{opacity:1}
 .motion-ready :is(.profile-panel,.project-card):hover{transform:perspective(1100px) rotateX(var(--tilt-x,0deg)) rotateY(var(--tilt-y,0deg)) translateY(-4px)}
}
.reading-progress{position:fixed;top:0;left:0;width:100%;height:2px;z-index:80;background:var(--accent);pointer-events:none;transform:scaleX(var(--reading-progress,0));transform-origin:left;transition:transform 100ms linear;opacity:.8}
.motion-control{display:none;position:fixed;bottom:18px;left:18px;z-index:60;align-items:center;gap:8px;min-height:44px;padding:10px 14px;border:1px solid #425b55;border-radius:99px;background:#131e2af2;box-shadow:0 4px 18px #00000020;color:var(--muted);font:500 12px var(--body);cursor:pointer;backdrop-filter:blur(12px)}
html.motion-ready .motion-control{display:inline-flex}
.motion-control[hidden]{display:none!important}
.motion-control .icon{width:15px;height:15px;color:var(--accent)}
.motion-control:hover,.motion-control:focus-visible{border-color:#83b3a1;color:var(--ink)}
html.motion-paused :is(.hero-ambient *,.hero h1>span),html.page-hidden :is(.hero-ambient *,.hero h1>span){animation-play-state:paused!important}
html.motion-paused [data-reveal]{opacity:1!important;translate:none!important;transform:none!important;filter:none!important;transition:none!important}
html.motion-paused :is(.profile-panel,.project-card){transform:none!important}
html.motion-paused :is(.profile-panel,.project-card,.expertise-card,.education-entry,.hero-ambient,.motion-control),html.page-hidden :is(.profile-panel,.project-card,.expertise-card,.education-entry,[data-reveal]){transition:none!important}
html.motion-paused :is(.profile-panel,.project-card,.expertise-card,.education-entry):before{transition:none!important}
html.motion-paused .reading-progress,html.page-hidden .reading-progress{transition:none}
@media(hover:none),(pointer:coarse){
 .motion-ready :is(.profile-panel,.project-card){transform:none!important}
 .profile-panel:before,.project-card:before,.expertise-card:before,.education-entry:before{display:none}
}
@media(prefers-reduced-motion:reduce){
 .hero-ambient{display:none}
 .motion-ready .hero h1>span{animation:none!important;background:none!important;color:var(--accent)!important}
 .motion-ready [data-reveal]{opacity:1!important;translate:none!important;transform:none!important;filter:none!important;transition:none!important}
 .motion-ready :is(.profile-panel,.project-card){transform:none!important}
 .profile-panel:before,.project-card:before,.expertise-card:before,.education-entry:before{display:none}
 .reading-progress{transition:none}
}
@media print{
 .hero-ambient,.reading-progress,.motion-control{display:none!important}
 .motion-ready .hero h1>span{animation:none!important;background:none!important;color:var(--accent)!important}
 .motion-ready [data-reveal]{opacity:1!important;translate:none!important;transform:none!important;filter:none!important;transition:none!important}
 .motion-ready :is(.profile-panel,.project-card){transform:none!important}
 .profile-panel:before,.project-card:before,.expertise-card:before,.education-entry:before{display:none}
}

/* Short entrance sequence; the profile remains readable after it finishes. */
.motion-ready .hero-eyebrow{animation:hero-arrive 650ms cubic-bezier(.2,.7,.3,1) 40ms backwards}
.motion-ready .hero h1{animation:hero-arrive 850ms cubic-bezier(.2,.7,.3,1) 100ms backwards}
.motion-ready .hero-summary{animation:hero-arrive 750ms cubic-bezier(.2,.7,.3,1) 200ms backwards}
.motion-ready .hero-actions{animation:hero-arrive 650ms cubic-bezier(.2,.7,.3,1) 300ms backwards}
.motion-ready .hero-socials{animation:hero-arrive 650ms cubic-bezier(.2,.7,.3,1) 380ms backwards}
.motion-ready .profile-panel{animation:hero-arrive 900ms cubic-bezier(.2,.7,.3,1) 180ms backwards}
@keyframes hero-arrive{from{opacity:0;translate:0 20px}to{opacity:1;translate:0 0}}
html.motion-paused .hero-copy>*,html.motion-paused .profile-panel{animation:none!important;opacity:1!important;translate:none!important}
html.page-hidden .hero-copy>*,html.page-hidden .profile-panel{animation-play-state:paused!important}
html:not(.motion-ready) .hero-ambient *{animation-play-state:paused}
@media(max-width:680px){.ambient-orb{width:330px;height:330px;filter:blur(18px)}.orb-one{right:-110px;top:-80px}.orb-two{bottom:-140px;left:15%}}
@media(prefers-reduced-motion:reduce),print{.motion-ready .hero-copy>*,.motion-ready .profile-panel{animation:none!important;opacity:1!important;translate:none!important}}
html.motion-paused{scroll-behavior:auto}
html.motion-paused *,html.motion-paused *:before,html.motion-paused *:after{transition:none!important;animation-play-state:paused!important}
html.motion-paused .button{transform:none!important}
