/* Portrait and scroll-driven decorative transitions. */
.profile-photo {
  display: block;
  width: clamp(148px, 18vw, 190px);
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: center;
  border-radius: 50%;
  margin-top: 28px;
}
.parallax-divider {
  position: relative;
  isolation: isolate;
  height: clamp(108px, 13vw, 168px);
  overflow: hidden;
  background: #E1ECF8;
  border-radius: 6px;
  margin-top: 22px;
  margin-bottom: 4px;
}
.parallax-divider[data-direction="-1"] { background: #D9E7F5; }
.parallax-pattern {
  position: absolute;
  inset: -150px -300px;
  background: repeating-linear-gradient(115deg, transparent 0 29px, #0E4D9236 30px 31px, transparent 32px 60px);
  transform: translate3d(var(--pattern-x, 0px), var(--pattern-y, 0px), 0);
}
.parallax-rings {
  position: absolute;
  width: clamp(440px, 54vw, 720px);
  height: clamp(440px, 54vw, 720px);
  border-radius: 50%;
  top: 50%;
  left: 9%;
  margin-top: clamp(-360px, -27vw, -220px);
  background: repeating-radial-gradient(circle, transparent 0 20px, #0E4D9291 21px 23px, transparent 24px 48px);
  transform: translate3d(var(--rings-x, 0px), var(--rings-y, 0px), 0);
}
.parallax-divider[data-direction="-1"] .parallax-rings {
  left: auto;
  right: 9%;
}
.parallax-orb {
  position: absolute;
  right: 5%;
  top: 50%;
  width: clamp(210px, 26vw, 380px);
  height: clamp(210px, 26vw, 380px);
  margin-top: clamp(-190px, -13vw, -105px);
  border-radius: 50%;
  background: #0E4D92;
  opacity: .28;
  transform: translate3d(var(--orb-x, 0px), var(--orb-y, 0px), 0);
}
.parallax-divider[data-direction="-1"] .parallax-orb {
  right: auto;
  left: 5%;
  background: #4E80B6;
}
@media (max-width: 760px) {
  .profile-photo { width: 140px; margin-top: 20px; }
  .parallax-divider { height: 110px; margin-top: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  .parallax-pattern, .parallax-rings, .parallax-orb { transform: none; }
}

.profile-photo { border: 4px solid #fff; box-sizing: border-box; }

button.coin { padding:0; border:0; background:transparent; perspective:800px; cursor:pointer; overflow:visible; aspect-ratio:1; }
.coin-disc { position:relative; display:block; width:100%; aspect-ratio:1; transform-style:preserve-3d; transition:transform .75s cubic-bezier(.35,.05,.2,1); }
.coin-disc img { position:absolute; inset:0; width:100%; height:100%; border:4px solid white; border-radius:50%; object-fit:cover; backface-visibility:hidden; }
.coin-back { transform:rotateY(180deg); }
.coin.revealed .coin-disc { transform:rotateY(540deg); }
@media(prefers-reduced-motion:reduce){.coin-disc{transition:none}}

@media (prefers-reduced-motion: no-preference) {
  #roles > .career-enter-pending {
    opacity: 0;
    transform: translateX(-24px);
  }
  #roles > .career-enter-visible {
    animation: career-enter 600ms cubic-bezier(.2,.75,.25,1) .5s both;
  }
  #roles > .career-enter-pending:focus-within {
    opacity: 1;
    transform: none;
  }
  @keyframes career-enter {
    from { opacity: 0; transform: translateX(-24px); }
    to { opacity: 1; transform: translateX(0); }
  }
}

@media (prefers-reduced-motion: no-preference) {
  .case-grow-pending {
    opacity: 0;
    transform: scale(.92);
  }
  .case-grow-visible {
    animation: case-grow 600ms cubic-bezier(.2,.75,.25,1) .5s both;
  }
  .case-grow-pending:focus-within {
    opacity: 1;
    transform: none;
  }
  @keyframes case-grow {
    from { opacity: 0; transform: scale(.92); }
    to { opacity: 1; transform: scale(1); }
  }
}
