/* Vyncus Lim · progressive 3D portfolio experience.
   Scoped to the homepage. No external 3D dependency or WebGL requirement. */
.hero-stage {
  perspective: 1250px;
  transform-style: preserve-3d;
  isolation: isolate;
}
.hero-stage .hero-photo {
  transform: perspective(1250px) rotateX(var(--hero-tilt-x, 0deg)) rotateY(var(--hero-tilt-y, 0deg)) rotateZ(-2deg) translateZ(28px);
  transform-style: preserve-3d;
  will-change: auto;
  transition: transform .35s cubic-bezier(.2,.7,.2,1), border-color .25s;
}
.hero-stage .hero-photo:hover {
  transform: perspective(1250px) rotateX(var(--hero-tilt-x, 0deg)) rotateY(var(--hero-tilt-y, 0deg)) rotateZ(-.5deg) translateZ(46px);
}
.hero-stage .floating-card {
  transform: translate3d(var(--hero-shift-x, 0px),var(--hero-shift-y, 0px),75px);
  transition: transform .35s ease-out;
}
.hero-stage::before { transform: translateZ(-90px); }
.hero-stage::after { transform: translateZ(-40px); }

.hero-universe-link { color: #f2c369; border-color: rgba(242,195,105,.3); }
.hero-universe-link:hover { border-color: rgba(242,195,105,.7); }
.immersive-universe {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 96px 0 112px;
  border-block: 1px solid rgba(255,255,255,.085);
  background: radial-gradient(ellipse 70% 72% at 51% 52%,rgba(29,70,102,.42),transparent 72%),
              radial-gradient(ellipse 55% 80% at 82% 60%,rgba(242,195,105,.075),transparent 75%),#070d16;
}
.immersive-universe::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: -1;
  background-image: linear-gradient(rgba(148,187,223,.035) 1px,transparent 1px),
                    linear-gradient(90deg,rgba(148,187,223,.035) 1px,transparent 1px);
  background-size: 65px 65px; mask-image: linear-gradient(180deg,transparent 1%,#000 35%,#000 65%,transparent);
}
.universe-head {
  display: flex; align-items: end; justify-content: space-between; gap: 24px;
  position: relative; z-index: 2;
}
.universe-kicker { display: block; font: 700 10px Manrope,sans-serif; letter-spacing: .2em; color: #f2c369; }
.universe-head h2 {
  font: 800 clamp(42px,5.8vw,76px)/.99 Manrope,sans-serif; letter-spacing: -.06em; margin: 14px 0 0;
}
.universe-head h2 span { color: #f2c369; }
.universe-head > p { max-width: 340px; line-height: 1.65; color: #a5b4c4; margin: 0; }
.universe-stage {
  position: relative; width: 100%; height: clamp(450px,54vw,630px); margin: 18px auto 0;
  overflow: hidden; border: 1px solid rgba(153,189,219,.12); border-radius: 32px;
  background: radial-gradient(circle at 51% 49%,rgba(72,147,192,.11),rgba(7,14,24,.4) 42%,rgba(3,9,16,.7) 82%);
  box-shadow: inset 0 0 100px rgba(0,0,0,.22),0 20px 90px rgba(0,0,0,.12);
}
.universe-stage::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1;
  background: linear-gradient(90deg,rgba(5,13,22,.2),transparent 28%,transparent 72%,rgba(5,13,22,.25));
}
.universe-canvas { display: block; width: 100%; height: 100%; cursor: grab; touch-action: pan-y; outline: none; }
.universe-canvas:active { cursor: grabbing; }
.universe-canvas:focus-visible { outline: 3px solid #f2c369; outline-offset: -5px; border-radius: 32px; }
.universe-core {
  position: absolute; z-index: 2; left: 50%; top: 50%; transform: translate(-50%,-50%);
  width: 88px; height: 88px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  border: 1px solid rgba(242,195,105,.46); border-radius: 27px;
  background: radial-gradient(circle at 30% 20%,rgba(250,213,139,.26),rgba(9,22,34,.92) 78%);
  box-shadow: 0 0 45px rgba(242,195,105,.16),inset 0 0 30px rgba(242,195,105,.08);
  pointer-events: none;
}
.universe-core strong { font: 800 30px Manrope,sans-serif; letter-spacing: -.06em; color: #ffe0a1; }
.universe-core small { font: 700 8px Manrope,sans-serif; letter-spacing: .17em; color: #8d9fb1; }
.universe-chip {
  position: absolute; z-index: 3; min-width: 140px;
  padding: 13px 16px; border: 1px solid rgba(149,183,208,.22); border-radius: 16px;
  background: rgba(8,19,32,.8); backdrop-filter: blur(14px);
  box-shadow: 0 16px 40px rgba(0,0,0,.24); transition: transform .25s,border-color .25s,background .25s;
}
.universe-chip:hover,.universe-chip:focus-visible { transform: translateY(-5px); border-color: #f2c369; background: rgba(27,40,55,.95); }
.universe-chip small { display: block; font: 700 9px Manrope,sans-serif; letter-spacing: .17em; color: #8498ac; }
.universe-chip strong { display: block; margin-top: 7px; font: 800 17px Manrope,sans-serif; }
.universe-chip span { display: block; color: #a4b1bf; margin-top: 2px; font-size: 11px; }
.chip-ai { left: 8%; top: 22%; } .chip-search { right: 8%; top: 18%; }
.chip-build { left: 9%; bottom: 18%; } .chip-global { right: 7%; bottom: 18%; }
.universe-axis {
  position: absolute; z-index: 2; bottom: 22px; left: 25px; color: #8799ac;
  font: 700 10px Manrope,sans-serif; letter-spacing: .11em; pointer-events: none;
}
.universe-axis::before { content: "●"; color: #f2c369; margin-right: 9px; }
.universe-controls { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; padding-top: 23px; }
.universe-controls p { flex: 1; color: #a5b2bf; font-size: 13px; margin: 0; }
.universe-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.universe-motion,.universe-jump {
  min-height: 43px; display: inline-flex; align-items: center; justify-content: center;
  padding: 9px 15px; border: 1px solid rgba(242,195,105,.36); border-radius: 12px;
  background: rgba(242,195,105,.075); color: #f7dca8; cursor: pointer;
  font: 700 12px Manrope,sans-serif; transition: background .2s,border-color .2s;
}
.universe-motion:hover,.universe-jump:hover { background: rgba(242,195,105,.16); border-color: #f2c369; }
.universe-motion:focus-visible,.universe-jump:focus-visible { outline: 3px solid #f2c369; outline-offset: 3px; }
.immersive-universe .section-shell { position: relative; }

@media(hover:hover) and (pointer:fine) {
  .project-card.depth-active {
    transform: perspective(1050px) rotateX(var(--card-rx,0deg)) rotateY(var(--card-ry,0deg)) translateY(-6px);
    border-color: rgba(242,195,105,.36);
    box-shadow: 0 28px 65px rgba(0,0,0,.19);
  }
  .project-card.depth-active > * { transform: translateZ(15px); }
  .project-card { transform-style: preserve-3d; }
}
@media (max-width: 900px) {
  .universe-head { align-items: start; flex-direction: column; }
  .universe-head > p { max-width: 520px; }
  .universe-stage { height: 520px; }
  .chip-ai { left: 3%; top: 14%; } .chip-search { right: 3%; top: 14%; }
  .chip-build { left: 3%; bottom: 13%; } .chip-global { right: 3%; bottom: 13%; }
}
@media (max-width: 620px) {
  .immersive-universe { padding: 72px 0 82px; }
  .universe-head h2 { font-size: clamp(43px,11vw,60px); }
  .universe-stage { height: 440px; border-radius: 22px; }
  .universe-chip { min-width: 0; max-width: 42%; padding: 10px 11px; border-radius: 13px; backdrop-filter: none; }
  .universe-chip small { font-size: 8px; }
  .universe-chip strong { font-size: 13px; }
  .universe-chip span { font-size: 9px; }
  .chip-ai { top: 9%; left: 3%; } .chip-search { top: 9%; right: 3%; }
  .chip-build { bottom: 14%; left: 3%; } .chip-global { bottom: 14%; right: 3%; }
  .universe-core { width: 66px; height: 66px; border-radius: 19px; }
  .universe-core strong { font-size: 25px; }
  .universe-axis { bottom: 13px; left: 14px; font-size: 8px; }
  .universe-controls { align-items: start; }
  .universe-controls p { flex-basis: 100%; }
  .hero-stage .hero-photo,.hero-stage .hero-photo:hover { transform: rotate(-2deg); }
  .hero-stage .floating-card { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-stage .hero-photo,.hero-stage .hero-photo:hover { transform: rotate(-2deg); transition: none; }
  .hero-stage .floating-card,.universe-chip { transform: none !important; transition: none; }
  .project-card.depth-active { transform: none !important; }
}
