@font-face {
  font-family: "Universe Instrument";
  src: url("demos/cv/assets/instrument-serif.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

.shot[data-id="personal-universe"] {
  isolation: isolate;
  background: #080909;
  -webkit-tap-highlight-color: transparent;
}
.universe-open { position: absolute; inset: 0; }
.shot[data-id="personal-universe"] .shot-cover {
  --centre: 40%;
  --portrait-size: 25%;
  --orbit-width: 62%;
  --orbit-height: 53%;
  --moon-unit: 1cqw;
  pointer-events: none;
  overflow: hidden;
  border-radius: var(--screen-radius);
}
.shot[data-id="personal-universe"] .tasha-starfield { z-index: -1; }
.shot[data-id="personal-universe"] .shot-cover::before {
  content: "";
  position: absolute;
  inset: var(--centre) auto auto 50%;
  width: calc(var(--portrait-size) * 1.9);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  pointer-events: none;
  border-radius: 50%;
  background: radial-gradient(closest-side, #fffe 51%, #ffffff9c 53%,
    #ffffff5e 55%, #ffffff30 59%, #ffffff13 68%, #ffffff05 82%, transparent 100%);
}
.shot[data-id="personal-universe"] picture {
  z-index: 0;
  inset: var(--centre) auto auto 50%;
  transform: translate(-50%, -50%);
  width: var(--portrait-size);
  height: auto;
  aspect-ratio: 1;
  padding: 0;
  overflow: hidden;
  border-radius: 50%;
  background: #141616;
  box-shadow: 0 0 1px #fffb;
}
.shot[data-id="personal-universe"] picture img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.09);
  filter: grayscale(1);
}
.shot[data-id="personal-universe"] picture::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 1px 1px 2px #ffffff48, inset -2px -3px 9px #0006;
}
.universe-open:focus-visible { outline: none; }
.universe-open:focus-visible + .shot-cover picture {
  outline: 2px solid var(--hot);
  outline-offset: 5px;
}

.universe-orbit {
  position: absolute;
  top: var(--centre);
  left: 50%;
  width: var(--orbit-width);
  height: var(--orbit-height);
  transform: translate(-50%, -50%) rotate(-8deg);
}
.universe-orbit::before, .universe-orbit::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid #d2d1ce2c;
}
.universe-orbit::after {
  inset: 5% -4%;
  transform: rotate(13deg);
  border-color: #d2d1ce13;
}
.universe-moon {
  --diameter: calc(3.55 * var(--moon-unit));
  position: absolute;
  z-index: 1;
  left: var(--rest-x);
  top: var(--rest-y);
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  width: max(44px, calc(var(--diameter) + 12px));
  height: max(44px, calc(var(--diameter) + 12px));
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  pointer-events: auto;
}
.universe-moon:nth-child(3n + 2) { --diameter: calc(2.9 * var(--moon-unit)); }
.universe-moon:nth-child(3n) { --diameter: calc(4.25 * var(--moon-unit)); }
.universe-moon > .lava-orb {
  width: max(18px, var(--diameter));
  aspect-ratio: 1;
}
@supports (offset-path: ellipse(50% 50% at 50% 50%)) {
  @media (prefers-reduced-motion: no-preference) {
    .universe-moon {
      left: 0;
      top: 0;
      transform: none;
      offset-path: ellipse(50% 50% at 50% 50%);
      offset-rotate: 0deg;
      animation: mylincs-orbit 56s linear infinite;
      animation-delay: calc(var(--phase) * -56s);
    }
    .shot-cover[data-glimpse] .universe-moon,
    .universe-orbit:has(.universe-moon:focus-visible) .universe-moon,
    #work[data-door-state]:not([data-door-state="open"]) .universe-moon,
    .shot[inert] .universe-moon { animation-play-state: paused; }
  }
}
@keyframes mylincs-orbit {
  from { offset-distance: 0%; }
  to { offset-distance: 100%; }
}
.shot:is([hidden],[inert]) .star-plane,
#work[data-door-state]:not([data-door-state="open"]) .star-plane {
  animation-play-state: paused;
}

.universe-billing, .universe-glimpse {
  position: absolute;
  inset-inline: 0;
  display: grid;
  justify-items: center;
  text-align: center;
}
.universe-billing {
  bottom: 3.8%;
  gap: .8cqw;
  color: #f6f4ee;
}
.universe-billing > :first-child {
  font: 400 8.4cqw/.9 "Universe Instrument", Georgia, serif;
  letter-spacing: -.035em;
}
.universe-billing > :last-child {
  color: #d6d7d2;
  font: 400 clamp(.8rem, 1.65cqw, 1.2rem)/1.3 var(--mono);
  letter-spacing: .05em;
}
.universe-glimpse {
  top: 70.5%;
  margin: 0 auto;
  max-width: 92%;
  color: #e8e8e1;
  font: 400 clamp(.77rem, 1.65cqw, 1.1rem)/1.3 system-ui, sans-serif;
  text-wrap: balance;
}
.universe-glimpse strong {
  color: var(--hot);
  font-weight: 600;
}

@media (max-width: 1024px) and (orientation: portrait) {
  .shot[data-id="personal-universe"] .shot-cover {
    --centre: 42%;
    --portrait-size: 45%;
    --orbit-width: 78%;
    --orbit-height: 40%;
    --moon-unit: 1.9cqw;
    --phone-stamp-top: 7%;
  }
  .universe-billing { bottom: 10%; gap: 2.1cqw; }
  .universe-billing > :first-child { font-size: 13.5cqw; }
  .universe-billing > :last-child { font-size: clamp(.85rem, 3.7cqw, 1.12rem); }
  .universe-glimpse { top: 66%; font-size: clamp(.8rem, 3.6cqw, 1.05rem); }
}
@media (forced-colors: active) {
  .universe-moon:focus-visible, .universe-open:focus-visible + .shot-cover picture { outline-color: Highlight; }
}
