/* A cinematic portrait with subtle motion and warm studio light. */
.about-section .about-image {
  max-width: 380px;
}
.portrait-frame.avatar-frame {
  display: block;
  padding: 13px;
  aspect-ratio: auto;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid #b9ac6f42;
  border-radius: 21px;
  background: linear-gradient(145deg, #37382a, #181b16 48%, #0c100d);
  box-shadow: 0 25px 60px #03070470, inset 0 1px 0 #f2e8bd15;
}
.portrait-frame.avatar-frame::before,
.portrait-frame.avatar-frame::after {
  top: 13px;
  background: #d4cb9820;
}
.portrait-frame.avatar-frame::after {
  top: auto;
  bottom: 13px;
}
.avatar-frame .portrait-cross {
  z-index: 3;
  top: 9px;
  right: 11px;
  font-size: 16px;
  color: #e0d4a3a8;
}
.avatar-live {
  --avatar-x: 0px;
  --avatar-y: 0px;
  --avatar-yaw: 0deg;
  --avatar-pitch: 0deg;
  position: relative;
  width: 100%;
  aspect-ratio: 1136 / 1385;
  transform: perspective(900px) translate(var(--avatar-x), var(--avatar-y)) rotateX(var(--avatar-pitch)) rotateY(var(--avatar-yaw));
  transition: transform .7s cubic-bezier(.2, .65, .2, 1);
}
.avatar-live::before {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 18px;
  background: radial-gradient(ellipse at 25% 7%, #ead28c42, transparent 52%), radial-gradient(ellipse at 88% 56%, #88905228, transparent 62%);
  filter: blur(10px);
  opacity: .65;
  animation: avatar-halo 10s ease-in-out infinite;
  animation-play-state: paused;
  pointer-events: none;
}
.avatar-live::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  border: 1px solid #d5c89235;
  border-radius: 14px;
  box-shadow: inset 0 1px 0 #fff2c31a;
  pointer-events: none;
}
.avatar-layers {
  position: relative;
  width: 100%;
  aspect-ratio: 1136 / 1385;
  overflow: hidden;
  border-radius: 14px;
  background: radial-gradient(ellipse at 48% 18%, #79784d55, transparent 53%), radial-gradient(ellipse at 88% 53%, #464e3240, transparent 58%), linear-gradient(155deg, #282d21, #111813 64%, #0a100c);
  box-shadow: 0 15px 35px #03070466;
  transform-origin: 50% 74%;
  animation: avatar-breathe 7.8s ease-in-out infinite;
  animation-play-state: paused;
}
.avatar-frame .avatar-layers img {
  position: absolute;
  inset: 12px 8px 0;
  display: block;
  width: calc(100% - 16px);
  height: calc(100% - 12px);
  max-width: none;
  aspect-ratio: auto;
  object-fit: contain;
  object-position: center bottom;
  border-radius: 0;
  filter: drop-shadow(0 12px 18px #00000048);
  box-shadow: none;
  outline: 0;
  margin: 0;
}
.avatar-frame .avatar-base { z-index: 1; }
.avatar-frame.avatar-running .avatar-layers,
.avatar-frame.avatar-running .avatar-live::before {
  animation-play-state: running;
}
.about-image:has(.avatar-frame) .portrait-caption {
  color: #9eab8d;
}
.about-image:has(.avatar-frame) .portrait-caption span:first-child {
  color: #d1d7ba;
}
@keyframes avatar-breathe {
  0%, 100% { transform: translateY(0); }
  45% { transform: translateY(-2px); }
  75% { transform: translateY(-.5px); }
}
@keyframes avatar-halo {
  0%, 100% { opacity: .5; }
  50% { opacity: .8; }
}
@media (max-width: 640px) {
  .about-section .about-image { max-width: 300px; }
  .portrait-frame.avatar-frame { padding: 10px; border-radius: 18px; }
  .portrait-frame.avatar-frame::before { top: 10px; }
  .portrait-frame.avatar-frame::after { bottom: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .avatar-live, .avatar-layers { transform: none !important; transition: none !important; }
  .avatar-live::before, .avatar-layers { animation: none !important; }
}
