/* Connection Weave — original folded strands, section-local and text-safe. */
main section>.section-atmosphere:has(.section-weave){display:block;inset:0;mask-image:none;contain:paint;pointer-events:none;overflow:hidden}
main section>.section-atmosphere:has(.section-weave):before{content:none}
.section-weave{position:absolute;right:-100px;top:0;width:75%;max-width:980px;height:440px;overflow:visible;opacity:.9;mask-image:linear-gradient(90deg,transparent,#000 35%,#000 85%,transparent),linear-gradient(180deg,transparent,#000 15%,#000 80%,transparent);mask-composite:intersect;--weave-tone:var(--accent-cyan)}
.weave-strands{stroke:var(--fg);stroke-opacity:.13;stroke-width:1;transform-origin:center}
.section-weave path{vector-effect:non-scaling-stroke}
.weave-currents{stroke:var(--weave-tone);stroke-width:1.6;stroke-linecap:round}
.weave-current{stroke-dasharray:.075 .925;stroke-dashoffset:0;opacity:0;animation:weave-travel 10s linear infinite;animation-play-state:paused}
.current-1{stroke:var(--accent-pink);animation-delay:-3.3s;animation-duration:13s}
.current-2{stroke:var(--accent-yellow);animation-delay:-6.6s;animation-duration:11s}
.weave-strands{animation:weave-unfold 18s ease-in-out infinite alternate;animation-play-state:paused}
.section-weave.weave-active .weave-current,.section-weave.weave-active .weave-strands{animation-play-state:running}
.weave-1{transform:scaleY(-1);top:20px;--weave-tone:var(--accent-green)}
.weave-2{transform:rotate(-14deg);right:-60px;--weave-tone:var(--accent-yellow)}
.hero>.section-atmosphere .section-weave{top:50px;right:-80px;width:85%;height:560px;opacity:.75}
.work-section>.section-atmosphere .section-weave{top:12px}
.about-section>.section-atmosphere .section-weave{right:-180px;opacity:.7}
.contact-section>.section-atmosphere .section-weave{--weave-tone:var(--accent-green);width:90%;height:520px}
@keyframes weave-travel{0%{stroke-dashoffset:.08;opacity:0}8%,82%{opacity:.8}100%{stroke-dashoffset:-1;opacity:0}}
@keyframes weave-unfold{from{transform:translateY(-8px) scaleY(.96)}to{transform:translateY(10px) scaleY(1.04)}}
@media(max-width:760px){.section-weave{width:125%;height:320px;right:-32%;opacity:.65}.hero>.section-atmosphere .section-weave{top:120px;width:150%;right:-55%;height:480px;opacity:.5}.about-section>.section-atmosphere .section-weave{right:-45%}.contact-section>.section-atmosphere .section-weave{width:150%;right:-55%;height:360px}.weave-strands{stroke-opacity:.1}}
@media(prefers-reduced-motion:reduce){.section-weave .weave-current{display:none}.section-weave .weave-strands{animation:none;transform:none}}

/* Three chapters of the same connection language: fold, gather, assemble. */
.kinetic-ribbon{--ribbon-color:var(--accent-cyan);transform-origin:55% 50%;animation:ribbon-float 16s cubic-bezier(.45,0,.55,1) infinite alternate;animation-delay:calc(var(--ribbon-index) * -5s);animation-play-state:paused}
.ribbon-1{--ribbon-color:var(--accent-pink);animation-duration:21s}
.ribbon-2{--ribbon-color:var(--accent-yellow);animation-duration:25s}
.ribbon-body{fill:color-mix(in srgb,var(--ribbon-color) 12%,transparent);stroke:color-mix(in srgb,var(--ribbon-color) 20%,transparent);stroke-width:.7}
.ribbon-edge{stroke:var(--ribbon-color);stroke-opacity:.45;stroke-width:1}
.kinetic-ribbon .ribbon-edge{stroke-dasharray:140 900;animation:ribbon-edge-flow 12s linear infinite;animation-delay:calc(var(--ribbon-index) * -4s);animation-play-state:paused}
.kinetic-ribbon:nth-child(2) .ribbon-body{fill-opacity:.55}
.magnetic-strands{stroke:var(--weave-tone);stroke-width:.7;stroke-opacity:.24;transform-origin:60% 50%;animation:magnetic-breathe 12s ease-in-out infinite alternate;animation-play-state:paused}
.kinetic-field{height:500px}
.module-guides{stroke:var(--fg);stroke-width:.6;stroke-opacity:.08;stroke-dasharray:2 10}
.kinetic-module{--module-color:var(--accent-cyan);transform-box:fill-box;transform-origin:center;animation:module-assemble 10s cubic-bezier(.45,0,.2,1) infinite;animation-delay:var(--phase);animation-play-state:paused}
.module-1{--module-color:var(--accent-pink)}.module-2{--module-color:var(--accent-green)}.module-3{--module-color:var(--accent-yellow)}
.kinetic-module rect{fill:color-mix(in srgb,var(--module-color) 8%,transparent);stroke:var(--module-color);stroke-opacity:.4;stroke-width:1}
.kinetic-module path{stroke:var(--module-color);stroke-opacity:.5;stroke-width:1}
.section-weave.weave-active :is(.kinetic-ribbon,.ribbon-edge,.magnetic-strands,.kinetic-module){animation-play-state:running}
.kinetic-modules{top:0;width:85%;height:420px}
/* Smaller counterpoint at the lower-left of every module-backed section. */
.section-atmosphere .section-weave.module-cluster-echo{top:auto;bottom:-48px;left:-80px;right:auto;width:clamp(280px,34%,440px);max-width:none;height:320px;opacity:.44;transform:rotate(var(--echo-angle,14deg));mask-image:linear-gradient(90deg,#000 8%,#000 46%,transparent 95%),linear-gradient(180deg,transparent,#000 25%,#000 76%,transparent);mask-composite:intersect}
.module-cluster-echo .kinetic-module{animation-duration:16s}
.module-cluster-echo.echo-variant-1{--echo-angle:-10deg}
.module-cluster-echo.echo-variant-2{--echo-angle:22deg}
@media(max-width:760px){.section-atmosphere .section-weave.module-cluster-echo{left:-92px;bottom:-50px;width:280px;height:250px;opacity:.3}.module-cluster-echo .kinetic-module:nth-child(n+7){display:none}}
.hero>.section-atmosphere .kinetic-ribbon{--ribbon-color:var(--accent-cyan)}
.hero>.section-atmosphere .ribbon-1{--ribbon-color:var(--accent-pink)}
.hero>.section-atmosphere .ribbon-2{--ribbon-color:var(--accent-green)}
.about-section>.section-atmosphere .ribbon-0{--ribbon-color:var(--accent-yellow)}
.contact-section>.section-atmosphere .ribbon-0{--ribbon-color:var(--accent-green)}
@keyframes ribbon-float{0%{transform:translate(-22px,-18px) rotate(-7deg) scaleY(.84)}100%{transform:translate(26px,22px) rotate(7deg) scaleY(1.12)}}
@keyframes ribbon-edge-flow{to{stroke-dashoffset:-1040}}
@keyframes magnetic-breathe{from{transform:translateX(-14px) skewY(-4deg) scaleY(.86)}to{transform:translateX(16px) skewY(4deg) scaleY(1.12)}}
@keyframes module-assemble{0%,100%{transform:translate(var(--dx),var(--dy)) rotate(var(--turn));opacity:.35}38%,62%{transform:translate(0,0) rotate(0);opacity:1}}
@media(max-width:760px){.kinetic-modules{width:155%;right:-60%;height:340px}.kinetic-ribbon .ribbon-body{fill-opacity:.65}.magnetic-strands{stroke-opacity:.2}}
@media(prefers-reduced-motion:reduce){.section-weave :is(.kinetic-ribbon,.ribbon-edge,.magnetic-strands,.kinetic-module){animation:none!important;transform:none}.ribbon-edge{stroke-dasharray:none;stroke-opacity:.2}.kinetic-module{opacity:.65}}

/* Orbital arcs: approved replacement for Hero, About and Contact only. */
.section-weave.kinetic-orbits{transform:none}
.orbital-assembly{transform-origin:450px 220px;animation:orbital-precession 24s ease-in-out infinite alternate;animation-play-state:paused}
.orbital-rail{stroke:var(--fg);stroke-opacity:.16;stroke-width:1;stroke-dasharray:.78 .22;stroke-linecap:round}
.orbital-trace{stroke:var(--accent-cyan);stroke-width:1.8;stroke-linecap:round;stroke-dasharray:.07 .93;animation:orbital-transit 14s linear infinite;animation-play-state:paused}
.orbital-trace.orbit-color-1{stroke:var(--accent-pink);animation-duration:19s;animation-delay:-8s}
.orbital-trace.orbit-color-2{stroke:var(--accent-green);animation-duration:23s;animation-delay:-13s}
.orbital-center{fill:var(--accent-cyan)}
.orbital-hub{stroke:var(--accent-cyan);stroke-width:.8;stroke-opacity:.25}
.section-weave.weave-active :is(.orbital-assembly,.orbital-trace){animation-play-state:running}
.about-section .orbital-trace.orbit-color-2{stroke:var(--accent-yellow)}
.contact-section .orbital-trace.orbit-color-0{stroke:var(--accent-green)}
@keyframes orbital-precession{from{transform:translateY(-10px) rotate(-4deg)}to{transform:translateY(14px) rotate(4deg)}}
@keyframes orbital-transit{to{stroke-dashoffset:-1}}
@media(max-width:760px){.kinetic-orbits .orbital-rail{stroke-opacity:.13}.kinetic-orbits .orbital-trace{stroke-width:1.4}.hero>.section-atmosphere .kinetic-orbits{top:170px}}
@media(prefers-reduced-motion:reduce){.section-weave :is(.orbital-assembly,.orbital-trace){animation:none!important;transform:none}.orbital-trace{stroke-dasharray:.16 .84;stroke-opacity:.45}}

/* Stars cover the three orbital sections independently of the faded arc art. */
.orbital-starfield{position:absolute;inset:0;overflow:hidden;pointer-events:none;opacity:.55;mask-image:linear-gradient(90deg,rgba(0,0,0,.4),#000 65%),linear-gradient(180deg,transparent,#000 8%,#000 90%,transparent);mask-composite:intersect}
.star-point{position:absolute;display:block;width:var(--star-size);height:var(--star-size);border-radius:50%;--star-color:var(--star-neutral,var(--fg));background:var(--star-color);color:var(--star-color);opacity:var(--star-alpha)}
:root[data-theme=dark] .orbital-starfield{--star-neutral:#d8d6cf}
.star-point:nth-child(14n+4){--star-color:color-mix(in srgb,var(--accent-cyan) 75%,var(--star-neutral,var(--fg)))}
.star-point:nth-child(14n+8){--star-color:color-mix(in srgb,var(--accent-green) 75%,var(--star-neutral,var(--fg)))}
.star-point:nth-child(13){--star-color:color-mix(in srgb,var(--accent-pink) 75%,var(--star-neutral,var(--fg)))}
.star-point:nth-child(27){--star-color:color-mix(in srgb,var(--accent-yellow) 75%,var(--star-neutral,var(--fg)))}
.star-spark:before,.star-spark:after{content:'';position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);background:currentColor;opacity:.6;border-radius:1px}
.star-spark:before{width:7px;height:1px}.star-spark:after{width:1px;height:7px}
@media(max-width:760px){.orbital-starfield{opacity:.5}.star-point:nth-child(3n){display:none}.star-spark:before{width:5px}.star-spark:after{height:5px}}

/* The hero's outer field spans the viewport; its reading area stays quiet. */
.hero.shell{width:100%;padding-inline:max(var(--space),calc((100% - 1280px)/2))}
.hero>.section-atmosphere:has(.orbital-starfield){left:0;right:0;width:100%;max-width:none}
.hero>.section-atmosphere .hero-orbit-horizon{inset:0;width:100%;max-width:none;height:min(100%,740px);opacity:.7;transform:none;mask-image:linear-gradient(90deg,#000,rgba(0,0,0,.65) 12%,transparent 29%,transparent 72%,#000 91%),linear-gradient(180deg,transparent,#000 15%,#000 85%,transparent);mask-composite:intersect}
.hero-orbit-horizon .orbital-rail{stroke-opacity:.18;stroke-dasharray:none}
.hero-orbit-horizon .orbital-trace{stroke-width:1.2;stroke-opacity:.55;animation-duration:30s}
.hero .orbital-starfield{mask-image:linear-gradient(90deg,#000,rgba(0,0,0,.22) 23%,rgba(0,0,0,.22) 51%,#000 76%),linear-gradient(180deg,transparent,#000 10%,#000 86%,transparent);mask-composite:intersect}
@media(max-width:760px){.hero>.section-atmosphere .hero-orbit-horizon{height:100%;opacity:.45;mask-image:linear-gradient(90deg,#000,transparent 18%,transparent 82%,#000),linear-gradient(180deg,transparent,#000 20%,#000 85%,transparent)}.hero .orbital-starfield{mask-image:linear-gradient(180deg,transparent 12%,rgba(0,0,0,.2) 35%,#000 60%,#000 85%,transparent)}}

/* Small spheres travel on the exact rail paths, without a per-frame JS loop. */
.orbital-atom{--atom-color:var(--accent-cyan);offset-distance:22%;offset-rotate:0deg;offset-position:0 0;offset-anchor:0px 0px;animation:orbital-atom-travel var(--atom-duration) linear infinite;animation-delay:var(--atom-phase);animation-play-state:paused}
.orbital-atom.orbit-color-1{--atom-color:var(--accent-pink)}
.orbital-atom.orbit-color-2{--atom-color:var(--accent-green)}
.about-section .orbital-atom.orbit-color-2{--atom-color:var(--accent-yellow)}
.contact-section .orbital-atom.orbit-color-0{--atom-color:var(--accent-green)}
.orbital-atom-body{fill:var(--atom-color);stroke:color-mix(in srgb,var(--atom-color) 55%,var(--fg));stroke-width:.7}
.orbital-atom-shine{fill:var(--bg);fill-opacity:.65}
.section-weave.weave-active .orbital-atom{animation-play-state:running}
@keyframes orbital-atom-travel{from{offset-distance:0%}to{offset-distance:100%}}
@media(prefers-reduced-motion:reduce){.section-weave .orbital-atom{animation:none!important}}
