/* Retain the same noise motion with a viewport-sized compositor layer,
   rather than the previous layer covering four times the viewport area. */
.grain{inset:-5%;animation-name:grain-bounded}
@keyframes grain-bounded{0%{transform:translate(0,0)}25%{transform:translate(-4vw,2vh)}50%{transform:translate(2vw,-4vh)}75%{transform:translate(4vw,4vh)}100%{transform:translate(-2vw,0)}}
html.portfolio-page-hidden .grain,html.portfolio-dialog-open .grain{animation-play-state:paused}
html[data-performance-tier="balanced"] .grain{animation-duration:2.2s}
@media(prefers-reduced-motion:reduce){.grain{animation:none}}/* Suspend the interactive lens compositor while scrolling. */.is-scroll-performance .yarn-fluid-glass-root{visibility:hidden}

/* The cursor is still at rest; only pending network/media work enables its spin. */
.is-site-loading .target-cursor__idle-rotor{animation:target-cursor-idle-spin 2s linear infinite;will-change:transform}
/* Both edges share one visibility owner and the same shallow blur bands. */
.scroll-edge-blur{position:fixed;z-index:25;right:0;bottom:0;left:0;height:clamp(140.4px,22.815vh,252.72px);pointer-events:none;contain:paint}
.scroll-edge-blurs[hidden]{display:none}
.scroll-edge-blur--top{top:0;bottom:auto;--edge-direction:to top}
.scroll-edge-blur>span{position:absolute;inset:0;pointer-events:none;backdrop-filter:blur(var(--edge-radius));-webkit-backdrop-filter:blur(var(--edge-radius));mask-image:linear-gradient(var(--edge-direction,to bottom),transparent var(--edge-start),#000 100%);-webkit-mask-image:linear-gradient(var(--edge-direction,to bottom),transparent var(--edge-start),#000 100%)}
.scroll-edge-blur>span:nth-child(1){--edge-radius:1.5px;--edge-start:0%}
.scroll-edge-blur>span:nth-child(2){--edge-radius:4px;--edge-start:38%}
.scroll-edge-blur>span:nth-child(3){--edge-radius:8px;--edge-start:68%}
html[data-performance-tier="balanced"] .scroll-edge-blur{height:clamp(112.32px,19.305vh,196.56px)}
html[data-performance-tier="balanced"] .scroll-edge-blur>span:nth-child(3){display:none}
@media (any-pointer:coarse), (max-width:720px) {
  .scroll-edge-blurs .scroll-edge-blur--bottom {
    --edge-depth: clamp(112px, 19svh, 196px);
    --edge-extension: max(env(safe-area-inset-bottom, 0px), calc(100lvh - 100dvh));
    top: calc(100dvh - var(--edge-depth));
    bottom: auto;
    height: calc(var(--edge-depth) + var(--edge-extension) + 1px);
    contain: none;
  }
  .scroll-edge-blurs .scroll-edge-blur--bottom>span:first-child {
    --edge-radius: 6px;
    --edge-mask: linear-gradient(transparent, #0002 calc(var(--edge-depth) * .3), #0009 calc(var(--edge-depth) * .7), #000 var(--edge-depth));
    -webkit-mask-image: var(--edge-mask);
    mask-image: var(--edge-mask);
    background: color-mix(in srgb, var(--bg) 16%, transparent);
  }
  .scroll-edge-blurs .scroll-edge-blur--bottom>span:not(:first-child) { display: none; }
}
@media(prefers-reduced-motion:reduce){.scroll-edge-blur{display:none}}
@supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))){.scroll-edge-blur{display:none}}
