/* Preserve normal page scrolling, but use sand instead of the browser's thumb. */
html.sand-ready { scrollbar-width:none; }
html.sand-ready::-webkit-scrollbar { display:none; }
#sand-rail{position:fixed;z-index:8;right:0;top:0;width:16px;height:100%;pointer-events:none}
.rail{right:.4rem}
@media(max-width:740px){#sand-rail{width:10px}}
@media(forced-colors:active),print{#sand-rail{display:none}html.sand-ready{scrollbar-width:auto}html.sand-ready::-webkit-scrollbar{display:revert}}
.hero-copy:focus-within,.hero-copy:focus-within > *{opacity:1!important}
.scroll-scene{display:none}
.scene-stage{isolation:isolate}
.scene-heading{display:flex;justify-content:space-between;gap:1.25rem;align-items:center;color:var(--quiet);font-size:.94rem;position:relative;padding-bottom:.85rem;border-bottom:1px solid var(--line)}
.scene-heading::after{content:"";position:absolute;left:0;bottom:-1px;height:1px;width:100%;background:#7f71ed;transform:scaleX(var(--scene-progress,0));transform-origin:left}
.scene-number{font: .86rem/1 ui-monospace,monospace;white-space:nowrap}
.scene-frame{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr);align-items:center;gap:clamp(1.5rem,5vw,5rem);flex:1;padding:1.1rem 0;min-height:0}
.scene-title{font-size:clamp(3.3rem,7.6vw,8.6rem);font-weight:750;letter-spacing:-.077em;line-height:.9;max-width:12ch;overflow-wrap:anywhere}
.scene-description{margin:.85rem 0 0;font-size:clamp(.94rem,1.65vw,1.45rem);max-width:31ch;color:var(--quiet)}
.scene-meta:not(:empty){font-size:.78rem;margin-top:1rem;text-transform:uppercase;letter-spacing:.11em;color:var(--quiet)}
.scene-visual{position:relative;border:1px solid #ffffff28;border-radius:.9rem;background:radial-gradient(ellipse at center,#211e37,#111117);aspect-ratio:1.6;overflow:hidden;contain:layout}
.scene-visual svg{position:absolute;inset:0;width:100%;height:100%;object-fit:contain}
.scene-image-label{font: .72rem/1 ui-monospace,monospace;position:absolute;z-index:1;bottom:.6rem;left:.65rem;max-width:calc(100% - 1.3rem);padding:.35rem .5rem;background:#111018df;color:#ded9f1;border:1px solid #fdfaff26;border-radius:3rem}
.scene-enter .scene-copy{animation:scene-enter 440ms cubic-bezier(.2,.75,.2,1) both}
.scene-enter .scene-ink{animation:ink-enter 620ms cubic-bezier(.2,.8,.25,1) both;transform-origin:center}
@keyframes scene-enter{from{transform:translateY(17px);filter:blur(5px);opacity:.2}to{transform:none;filter:none;opacity:1}}
@keyframes ink-enter{from{transform:scale(1.12) translateX(8px);opacity:.15}to{transform:none;opacity:1}}
.scene-open{margin-top:1.15rem}
.scene-steps{display:flex;gap:clamp(.5rem,2vw,1.5rem);width:100%}
.scene-step{border:0;border-top:2px solid var(--line);background:none;text-align:left;color:var(--quiet);padding:.58rem 0 .36rem;flex:1;min-width:0;font-size:.85rem;line-height:1.14}
.scene-step small,.scene-step span{display:block}
.scene-step small{font: .73rem/1 ui-monospace,monospace;margin-bottom:.28rem}
.scene-step[aria-pressed=true]{border-color:#9c91ff;color:#fff}
.scene-step:hover{color:#fff}
.scene-skip{width:max-content;margin:.55rem 0 0;font-size:.84rem;color:var(--quiet);text-decoration:underline;text-underline-offset:.24em}
.lab-grid.lab-accordion{display:flex;align-items:stretch;gap:clamp(.65rem,1.6vw,1.4rem);margin-bottom:1rem}
.lab-accordion .module{flex:1;min-width:0;min-height:26rem;padding:0;border-radius:.8rem;overflow:hidden;transition:flex .55s var(--ease),background-color .4s}
.lab-accordion .module[data-open=true]{flex:5.3;background:#222043;border-color:#7164d970}
.lab-toggle{position:relative;display:flex;justify-content:space-between;align-items:center;gap:.75rem;width:100%;border:0;background:none;text-align:left;padding:1.13rem 1.28rem;color:#eee}
.lab-toggle:focus-visible{outline-offset:-4px}
.lab-toggle small{font: .76rem/1 monospace;color:#aaa}
.lab-toggle span{font-weight:700;letter-spacing:-.03em}
.lab-toggle b{font-size:1.1rem;line-height:1;color:#aaa2ff;transition:transform .3s}
.lab-accordion .module[data-open=true] .lab-toggle b{transform:rotate(45deg)}
.lab-content{padding:0 clamp(1.1rem,2.7vw,2.5rem) clamp(1.1rem,2.7vw,2.5rem)}
.lab-content .module-top{margin-top:.3rem}
.lab-content h4{margin-top:1rem}
@media(min-width:850px){.lab-accordion .module[data-open=false] .lab-toggle{height:100%;justify-content:space-between;align-items:start}
.lab-accordion .module[data-open=false] .lab-toggle span{position:absolute;bottom:1.1rem;left:.6rem;writing-mode:vertical-rl;transform:rotate(180deg);font-size:clamp(1.6rem,3.6vw,3.5rem);white-space:nowrap;line-height:1;letter-spacing:-.07em}}
@media(max-width:849px){.lab-grid.lab-accordion{display:grid;grid-template-columns:1fr}.lab-accordion .module{min-height:0}.lab-toggle{padding:.94rem}.lab-content .module-top{display:none}}

/* The reference uses the scroll scenes on touch widths too. Keep each to one
   screen, with explicit step buttons and a skip link rather than trapping scroll. */
@media (min-height:620px) and (prefers-reduced-motion:no-preference) {
  .cinema-ready:not(.still) :is(#services,#work) {
    --ink:#efedeb; --quiet:#b6b4b7; --line:#ffffff24;
    color:var(--ink); background:#111; color-scheme:dark;
  }
  .cinema-ready:not(.still) :is(#services,#work).light::before {filter:none;mix-blend-mode:screen}
  .cinema-ready:not(.still) .scene-fallback {display:none}
  .cinema-ready:not(.still) .scroll-scene {display:block;height:285svh}
  .cinema-ready:not(.still) .project-scene {height:247svh}
  .cinema-ready:not(.still) .process-scene {height:252svh}
  .cinema-ready:not(.still) .scene-stage {
    position:sticky;top:12px;height:calc(100svh - 40px);max-height:58rem;
    display:flex;flex-direction:column;padding:1.15rem 0 3.45rem;
  }
  .cinema-ready:not(.still) #services .process {
    margin-top:1.1rem;padding-top:1rem;scroll-margin-top:1.2rem
  }

  .cinema-ready:not(.still) .process-scene .scene-visual {
    background:radial-gradient(ellipse at 62% 20%,#282247,#151521 70%);
  }
}
@media (max-width:849px) and (min-height:620px) and (prefers-reduced-motion:no-preference) {
  .cinema-ready:not(.still) .scroll-scene {height:276svh}
  .cinema-ready:not(.still) .project-scene {height:241svh}
  .cinema-ready:not(.still) .process-scene {height:239svh}
  .cinema-ready:not(.still) .scene-stage {top:12px;padding:.3rem .25rem 4rem 0;height:calc(100svh - 27px)}
  .scene-heading {font-size:.88rem;padding-bottom:.6rem}
  .scene-title {font-size:clamp(2.45rem,11.4vw,5.65rem);line-height:.94;max-width:none}
  .scene-description {font-size:clamp(.97rem,4.85vw,1.27rem);margin-top:.8rem;max-width:33ch}
  .scene-meta:not(:empty) {font-size:.71rem;letter-spacing:.065em;margin-top:.65rem}
  .scene-frame {display:flex;flex-direction:column;gap:.45rem;align-items:stretch;justify-content:center;padding:.7rem 0 .48rem}
  .scene-copy {order:2}
  .scene-visual {order:1;flex:0 1 auto;width:100%;min-height:0;aspect-ratio:2.5;border-color:#ffffff15}
  .project-scene .scene-visual {aspect-ratio:2.1}
  .scene-image-label {display:none}
  .scene-steps {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.12rem .65rem}
  .scene-step {font-size:.79rem;padding:.35rem 0 .38rem;min-height:2.25rem}
  .scene-step small {font-size:.64rem;margin-bottom:.15rem}
  .project-scene .scene-steps {grid-template-columns:repeat(4,minmax(0,1fr))}
  .project-scene .scene-step span {display:none}
  .project-scene .scene-step small {font-size:.8rem}
  .scene-open {margin-top:.85rem}
  .scene-skip {margin-top:.3rem}
  @media (max-height:740px) {
    .scene-visual {aspect-ratio:3.8}
    .project-scene .scene-visual {aspect-ratio:3.15}
  }
  @media (min-height:760px) {
    .service-scene .scene-steps {grid-template-columns:1fr}
    .service-scene .scene-step small {display:inline-block;margin-right:.6rem}
    .service-scene .scene-step span {display:inline}
  }
}
/* The thin ticks are useful for orientation but are not tiny tap targets. The
   mobile menu provides the same chapter links with full-size controls. */
.mobile-ticks {display:none}
@media (max-width:740px) {
  .mobile-ticks {position:fixed;right:2px;top:12%;bottom:7%;z-index:7;display:flex;flex-direction:column;justify-content:space-between;mix-blend-mode:difference;pointer-events:none}
  .mobile-ticks i {width:6px;height:1px;background:#f4f2f5;opacity:.29}
  .mobile-ticks i.is-here {width:9px;opacity:.9}
}

.scene-visual svg{scale:calc(1 + var(--scene-local,0) * .036);translate:0 calc(var(--scene-local,0) * -7px)}
.scene-visual g.scene-schematic{font:11px ui-monospace,monospace;letter-spacing:.015em}

/* Keep the breathing room between sections without stacking giant empty gaps. */
.chapter:not(.hero,.motto,.about,.contact) {
  padding-block:clamp(3rem,5.5vw,5.8rem) clamp(3.5rem,6vw,6.35rem);
}
.chapter.about{padding-top:clamp(7.5rem,20svh,12rem);padding-bottom:clamp(3rem,6vw,6rem)}
.chapter.contact{padding-top:clamp(3.1rem,5.4vw,5.6rem)}
.experience .statement{margin-top:clamp(2rem,4.1vw,4.7rem)}
.career{margin-top:clamp(2.2rem,4vw,3.45rem)}
.career-list li{min-height:39svh}
.contact-steps{margin-top:clamp(2rem,4vw,3.5rem)}
.contact-lower{margin-bottom:clamp(2.3rem,4.4vw,3.6rem)}
.signature{margin-top:clamp(1.2rem,2vw,1.7rem);height:clamp(8.1rem,18vw,17rem)}
@media(min-height:620px) and (prefers-reduced-motion:no-preference){
  .cinema-ready:not(.still) .service-scene{height:249svh}
  .cinema-ready:not(.still) .project-scene{height:219svh}
  .cinema-ready:not(.still) .process-scene{height:222svh}
}
@media(max-width:740px){
  .chapter.about{padding-top:clamp(5.6rem,12svh,7.3rem)}
  .chapter:not(.hero,.motto,.about,.contact){padding-bottom:clamp(3.2rem,6vw,5rem)}
  .career-list li{min-height:30svh}
}
.profile-links{display:flex;align-items:center;flex-wrap:wrap;gap:.85rem 1.2rem;margin-top:1.2rem}
.profile-links .under{font-size:.92rem;color:var(--quiet)}
.profile-links .under:hover{color:var(--ink)}

.figures .stat-dot{max-width:100%}

.figures{overflow:clip}
