.hero-art {
  min-height: 460px;
  isolation: isolate;
  perspective: 850px;
  background: radial-gradient(ellipse at 52% 50%, #41336f, #1b1830 61%, #141422);
}
.hero-art::before { mask-image: radial-gradient(ellipse, #000 5%, transparent 76%); }
.portrait-scene {
  position: relative;
  display: grid;
  place-items: center;
  width: 91%;
  max-width: 425px;
  aspect-ratio: 1;
  transform-style: preserve-3d;
  transform: rotateX(var(--tilt-x, 3deg)) rotateY(var(--tilt-y, -6deg));
  transition: transform 240ms ease-out;
}
.portrait-layer {
  width: 63%;
  transform: translateZ(44px);
  border-radius: 50%;
  box-shadow: 0 0 64px #9d75ef65, 0 24px 60px #090713a0;
}
.portrait {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  border-radius: 50%;
}
.orbit {
  position: absolute;
  inset: 7%;
  border-radius: 50%;
  pointer-events: none;
  border: 1px solid #ad8bea85;
  transform: rotateZ(-28deg) rotateX(59deg) translateZ(-27px);
  box-shadow: inset 0 0 12px #997bff35, 0 0 15px #997bff42;
}
.orbit.secondary {
  transform: rotateZ(39deg) rotateX(55deg) translateZ(-39px);
  border-color: #78d9ff85;
}
.orbit-track { position: absolute; inset: 0; animation: orbit-spin 10s linear infinite; }
.secondary .orbit-track { animation-duration: 14s; animation-direction: reverse; }
.orbit-track::after {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: #e7d5ff;
  box-shadow: 0 0 18px 4px #a47aff;
}
.secondary .orbit-track::after { background: #b6f0ff; box-shadow: 0 0 18px 4px #53c8f0; }
.mock { perspective: 850px; }
.mock-depth {
  display: grid;
  place-items: center;
  width: 100%;
  transform-style: preserve-3d;
  transform: rotateX(var(--tilt-x, 5deg)) rotateY(var(--tilt-y, -9deg));
  transition: transform 240ms ease-out;
}
.mock-depth > * { animation: preview-float 5s ease-in-out infinite; }
.khoj .mock-depth > * { animation-delay: -2s; }
.game .mock-depth > * { animation-delay: -1s; }
.entering { animation: enter-project 550ms cubic-bezier(.2,.7,.2,1) both; }
@keyframes orbit-spin { to { transform: rotate(360deg); } }
@keyframes preview-float { 0%, 100% { transform: translate3d(0, 0, 14px); } 50% { transform: translate3d(0, -8px, 28px); } }
@keyframes enter-project {
  from { opacity: .3; transform: translateY(18px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@media (max-width: 730px) { .hero-art { min-height: 0; } .portrait-scene { width: 86%; } }
@media (prefers-reduced-motion: reduce) {
  .portrait-scene, .mock-depth { transform: none; transition: none; }
  .portrait-layer { transform: none; }
}

body {
  background: radial-gradient(ellipse at 84% 12%, #261e3a 0, transparent 37rem), #101018;
}
header { box-shadow: 0 7px 24px #07060c55; }
nav { perspective: 700px; }
.navlinks a, .button {
  transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}
.navlinks a { border-radius: 7px; }
.navlinks a:is(:hover, :focus-visible) {
  transform: translateY(-3px) rotateX(12deg);
  background: #29213e;
  box-shadow: 0 4px 0 #12101c;
}
.button { box-shadow: 0 4px 0 #0b0913; }
.button.primary { box-shadow: 0 4px 0 #68508f; }
.button:is(:hover, :focus-visible) { transform: translateY(-3px) scale(1.025); }
.button:active { transform: translateY(2px); }
.hero-copy { perspective: 850px; }
.hero h1 {
  text-shadow: 0 2px #b39bd2, 0 4px #695686, 0 7px 21px #ad7aff4d;
}
.project {
  box-shadow: 0 8px 0 #100d17, 0 15px 32px #07060c70;
}
.project-copy .tags, .depth-panel .tags { perspective: 650px; }
.tags span {
  background: #242033;
  box-shadow: 0 3px 0 #11101b;
  transition: transform 200ms ease;
}
.tags span:hover { transform: translateY(-3px) rotateX(12deg); }
.depth-panel {
  position: relative;
  border: 1px solid #4d4163;
  border-radius: 21px;
  padding: clamp(22px, 4vw, 42px);
  background: radial-gradient(ellipse at 85% 0, #3c2e57, transparent 70%), #1b1828;
  box-shadow: 0 7px 0 #100d19, 0 21px 42px #09070e80;
  perspective: 800px;
}
.depth-panel > :is(h2, h3, p, .tags, .actions) {
  transform: rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg)) translateZ(10px);
  transition: transform 240ms ease-out;
}
.contact-panel {
  background: radial-gradient(ellipse at 83% 20%, #493364, transparent 70%), #1b1828;
}
footer .wrap { text-shadow: 0 2px 7px #b28de975; }
@keyframes enter-project {
  from { opacity: .3; transform: perspective(900px) translateY(18px) rotateX(-7deg) scale(.985); }
  to { opacity: 1; transform: perspective(900px) translateY(0) rotateX(0deg) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .depth-panel > :is(h2, h3, p, .tags, .actions),
  .navlinks a:is(:hover, :focus-visible),
  .button:is(:hover, :focus-visible, :active),
  .tags span:hover { transform: none; transition: none; }
}
