/* ATOMIK OCEAN — "ENTER IF YOU DARE" transition: a brief photo-spiral
   flicker, then a smooth open into the portfolio page.
   Built and injected entirely by enter-portal.js; index.html's markup is
   untouched. Scoped to its own file so it never bleeds into the sitewide
   styles.css other pages load. GPU-friendly only: transform, opacity,
   filter — no animated layout properties. */

.enter-portal {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  overflow: hidden;
  background: #050106;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 480ms ease;
  isolation: isolate;
}
.enter-portal.is-active { opacity: 1; }
.enter-portal.is-leaving { opacity: 0; }

.enter-portal-stage {
  position: absolute;
  inset: 0;
  transform-origin: 50% 50%;
  will-change: transform;
}

.portal-frame {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40vmin;
  max-width: 62vw;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.6);
  will-change: transform, opacity, filter;
  backface-visibility: hidden;
}
.portal-frame--spiral {
  border-radius: 3px;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.65), 0 0 18px rgba(246, 169, 214, 0.12);
}
.portal-frame--split {
  filter: drop-shadow(-2px 0 0 rgba(255, 40, 110, 0.55)) drop-shadow(2px 0 0 rgba(60, 220, 255, 0.5));
}

/* vignette "hole" — a huge ring whose spread never changes, only its own
   scale does, so the edge stays crisp. Rests closed (a pinprick) behind
   the flicker; the open phase grows it past the viewport, which is what
   makes the reveal read as an iris opening rather than a flat fade. */
.enter-portal-hole {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 140vmax;
  height: 140vmax;
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0.05);
  box-shadow: 0 0 0 9999px rgba(4, 1, 6, 0.95);
  will-change: transform;
}

.enter-portal-flash {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 45%, rgba(255, 255, 255, 0.9), rgba(246, 169, 214, 0.35) 55%, transparent 75%);
  opacity: 0;
  will-change: opacity;
}

.enter-portal-grain {
  position: absolute;
  inset: 0;
  opacity: 0.08;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* reduced-motion fallback: a short, elegant crossfade montage, no spiral */
.enter-portal.is-reduced .portal-frame {
  position: absolute;
  inset: 0;
  margin: auto;
  top: 0; left: 0; right: 0; bottom: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  aspect-ratio: auto;
  border-radius: 0;
  box-shadow: none;
}
