/* Shared effects for every page: animated background, theme toggle, theme-switch reveal, tick particles */
:root{--ao:.15;interpolate-size:allow-keywords}
:root[data-theme="dark"]{--ao:.07}

.aurora{position:fixed;inset:0;z-index:-2;overflow:hidden;pointer-events:none}
.aurora i{position:absolute;width:50vmax;height:50vmax;border-radius:50%;filter:blur(90px);opacity:var(--ao);will-change:transform;animation:drift 28s ease-in-out infinite alternate}
.aurora i:nth-child(1){background:var(--accent);top:-18vmax;left:-12vmax}
.aurora i:nth-child(2){background:#8b5cf6;bottom:-22vmax;right:-16vmax;animation-duration:34s;animation-delay:-9s}
.aurora i:nth-child(3){background:var(--M);top:35%;left:35%;width:32vmax;height:32vmax;opacity:calc(var(--ao)*.7);animation-duration:40s;animation-delay:-18s}
@keyframes drift{
  0%{transform:translate(0,0) scale(1)}
  50%{transform:translate(12vw,8vh) scale(1.15)}
  100%{transform:translate(-6vw,14vh) scale(.95)}}
#bg{position:fixed;inset:0;z-index:-1;width:100%;height:100%;pointer-events:none}

.themebtn{display:inline-grid;place-items:center;width:34px;height:34px;flex:none;padding:0;margin:0;border-radius:50%;border:1px solid var(--border);background:var(--surface);color:var(--fg);cursor:pointer;backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);transition:border-color .2s,color .2s,transform .3s}
.themebtn:hover{border-color:var(--accent);color:var(--accent);transform:rotate(-20deg)}
.themebtn svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
:root[data-theme="dark"] .i-moon,:root:not([data-theme="dark"]) .i-sun{display:none}

::view-transition-old(root),::view-transition-new(root){animation:none;mix-blend-mode:normal}
::view-transition-new(root){animation:reveal .6s cubic-bezier(.4,0,.2,1)}
@keyframes reveal{
  from{clip-path:circle(0 at var(--vx,50%) var(--vy,0))}
  to{clip-path:circle(150vmax at var(--vx,50%) var(--vy,0))}}

.burst{position:fixed;width:6px;height:6px;border-radius:50%;pointer-events:none;z-index:50;background:var(--c);animation:burst .65s cubic-bezier(.2,.7,.3,1) forwards}
@keyframes burst{to{transform:translate(var(--dx),var(--dy)) scale(.2);opacity:0}}

@media (prefers-reduced-motion:reduce){.aurora i{animation:none}}
