.solar-cursor { display: none; }
.solar-button-body { display: inline-flex; align-items: center; gap: .6rem; }

.portrait-atmosphere {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.portrait-atmosphere::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 18% 30%,
    color-mix(in srgb, var(--portrait-color) 8%, transparent), transparent 55%);
  opacity: .35;
}
.portrait-atmosphere i {
  position: absolute;
  top: var(--dust-y);
  left: var(--dust-x);
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: color-mix(in srgb, #ffd28e, var(--portrait-color) 45%);
  box-shadow: 0 0 5px #ffbc6866;
  opacity: .16;
  animation: drifting-dust var(--dust-time, 25s) ease-in-out var(--dust-delay, 0s) infinite alternate;
}
.portrait-atmosphere i:nth-child(1) { --dust-x: 9%; --dust-y: 28%; --dust-delay: -10s; }
.portrait-atmosphere i:nth-child(2) { --dust-x: 25%; --dust-y: 70%; --dust-time: 31s; }
.portrait-atmosphere i:nth-child(3) { --dust-x: 42%; --dust-y: 19%; --dust-delay: -15s; }
.portrait-atmosphere i:nth-child(4) { --dust-x: 63%; --dust-y: 76%; --dust-time: 36s; --dust-delay: -6s; }
.portrait-atmosphere i:nth-child(5) { --dust-x: 81%; --dust-y: 32%; --dust-time: 28s; --dust-delay: -18s; }
.portrait-atmosphere i:nth-child(6) { --dust-x: 92%; --dust-y: 61%; --dust-time: 33s; --dust-delay: -12s; }
@keyframes drifting-dust {
  from { transform: translate3d(-8px, 12px, 0); opacity: .10; }
  to { transform: translate3d(20px, -34px, 0); opacity: .25; }
}

@media (prefers-reduced-motion: reduce) {
  .portrait-atmosphere i { animation: none; display: none; }
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  html.solar-active, html.solar-active * { cursor: none !important; }
  .solar-cursor {
    display: block;
    position: fixed;
    z-index: 70;
    inset: 0;
    pointer-events: none;
  }
  .solar-core, .solar-corona {
    position: absolute;
    top: 0;
    left: 0;
    transform: translate3d(var(--sun-x, 0px), var(--sun-y, 0px), 0);
    opacity: 0;
  }
  .solar-core {
    width: 5px;
    height: 5px;
    margin: -2.5px;
    border-radius: 50%;
    background: #fffbdf;
    box-shadow: 0 0 3px 1px #ffe6a6ba, 0 0 8px #ffb85f;
    transition: opacity .1s ease-out;
  }
  .solar-corona {
    width: 26px;
    height: 26px;
    margin: -13px;
    transition: transform .19s cubic-bezier(.18,.72,.28,1), opacity .3s ease-out;
  }
  .solar-corona::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: radial-gradient(circle, #ffdb9ed9, #ffc16773 28%, #f775363d 51%, #ff33221d 68%, transparent 76%);
    animation: solar-corona-breathe 3.8s ease-in-out infinite alternate paused;
    transition: scale .25s ease-out;
  }
  .solar-active :is(.solar-core,.solar-corona) { opacity: 1; }
  .solar-active .solar-corona::before { animation-play-state: running; }
  .solar-hovering .solar-corona::before { scale: 1.13; }
  @keyframes solar-corona-breathe {
    from { opacity: .86; }
    to { opacity: 1; }
  }

  :is(.site-header,.hero,main section,.site-footer) a:not(.button):not(.swarm-pending) {
    transition: scale .2s cubic-bezier(.2,.75,.3,1), color .2s, text-shadow .2s;
  }
  :is(.site-header,.hero,main section,.site-footer) a:not(.button):not(.swarm-pending):hover {
    color: #ffdc98;
    text-shadow: 0 0 11px #ffb75842;
    scale: 1.045;
  }
  .site-header nav a:not(.button):not(.swarm-pending):hover { scale: 1.10; }
  a .brand-icon { transition: filter .2s; }
  a:hover .brand-icon { filter: brightness(1.18) drop-shadow(0 0 4px #ffc46562); }
  .project-feature:not(.swarm-pending) { transition: scale .25s ease, border-color .25s ease; }
  .project-feature:not(.swarm-pending):hover { scale: 1.012; border-color: #ffcb774f; }

  .button.solar-button {
    position: relative;
    isolation: isolate;
    background: transparent;
    border-color: transparent;
  }
  .solar-button::before {
    content: '';
    position: absolute;
    z-index: -1;
    inset: -1px;
    border: 1px solid var(--accent);
    background: var(--accent);
    transition: background .22s, box-shadow .22s, border-color .22s, transform .26s cubic-bezier(.2,.8,.3,1);
  }
  .solar-button::before, .solar-button-body { pointer-events: none; }
  .solar-button-body { transition: transform .26s cubic-bezier(.2,.8,.3,1); }
  .solar-button:not(.swarm-pending):hover :is(.solar-button-body),
  .solar-button:not(.swarm-pending):hover::before {
    transform: translate3d(var(--magnet-x, 0px), var(--magnet-y, 0px), 0) scale(1.035);
  }
  .solar-button:not(.swarm-pending):hover::before {
    background: #ff9c69;
    border-color: #ffd183;
    box-shadow: 0 0 20px #ffb25646;
  }
}
