/* ─── Landing Page CSS ────────────────────────────────── */
/* 50/50 Top/Bottom Split Portal · Retro Synthwave (artist) */
/* Cyber/Programming (developer) · Portal-zoom transition.   */

.landing {
  position: relative;
  width: 100%;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #000;
}

/* ── Portal Base ── */
.portal {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: default;
  transition: flex 0.5s var(--ease-out), opacity 0.5s var(--ease-out);
  will-change: flex, transform, opacity, filter;
}

.portal-content {
  position: relative;
  z-index: 3;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s var(--ease-out);
}

.landing.ready .portal-content {
  opacity: 1;
  transform: translateY(0);
}

.portal-icon {
  font-size: 2rem;
  margin-bottom: 4px;
  transition: transform 0.4s var(--ease-out), text-shadow 0.4s var(--ease-out);
}

.portal-title {
  font-family: 'Audiowide', 'Orbitron', sans-serif;
  font-size: clamp(1.6rem, 4.4vw, 2.8rem);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin: 0;
}

.portal-subtitle {
  font-family: 'VT323', 'Fira Code', monospace;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

/* ── Enter Button (shared) ── */
.portal-enter-btn {
  margin-top: 18px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 32px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s var(--ease-out);
  position: relative;
  overflow: hidden;
}

.enter-arrow {
  transition: transform 0.3s var(--ease-out);
  font-size: 1rem;
}

.portal-enter-btn:hover .enter-arrow {
  transform: translateX(6px);
}

/* Developer Enter Button — terminal-style square button */
.dev-enter {
  background: linear-gradient(180deg, rgba(0, 212, 255, 0.06), rgba(0, 212, 255, 0.02));
  border: 1px solid rgba(0, 212, 255, 0.45);
  border-radius: 3px;
  color: #00d4ff;
  font-family: 'Fira Code', monospace;
  text-shadow: 0 0 8px rgba(0, 212, 255, 0.4);
  position: relative;
}
.dev-enter::before,
.dev-enter::after {
  content: '';
  position: absolute;
  width: 6px;
  height: 6px;
  border-color: #00d4ff;
  pointer-events: none;
}
.dev-enter::before {
  top: -1px; left: -1px;
  border-top: 1px solid; border-left: 1px solid;
}
.dev-enter::after {
  bottom: -1px; right: -1px;
  border-bottom: 1px solid; border-right: 1px solid;
}
.dev-enter:hover {
  background: rgba(0, 212, 255, 0.12);
  border-color: #00d4ff;
  color: #ffffff;
  box-shadow:
    0 0 24px rgba(0, 212, 255, 0.3),
    inset 0 0 14px rgba(0, 212, 255, 0.08);
}

/* Artist Enter Button — sunset gradient pill */
.art-enter {
  background: linear-gradient(135deg, rgba(255, 45, 138, 0.10), rgba(255, 122, 24, 0.06));
  border: 1px solid rgba(255, 45, 138, 0.55);
  border-radius: 999px;
  color: #ffd23f;
  font-family: 'Audiowide', 'Orbitron', sans-serif;
  text-shadow: 0 0 12px rgba(255, 45, 138, 0.5);
}
.art-enter:hover {
  background: linear-gradient(135deg, rgba(255, 45, 138, 0.22), rgba(255, 122, 24, 0.16));
  border-color: #ff7a18;
  color: #ffffff;
  box-shadow:
    0 0 28px rgba(255, 45, 138, 0.45),
    0 0 60px rgba(255, 122, 24, 0.25),
    inset 0 0 16px rgba(255, 210, 63, 0.12);
}

/* ── Portal Divider Edge ── */
.portal-edge {
  position: absolute;
  z-index: 4;
}

.portal-developer .portal-edge {
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent,
    rgba(0, 212, 255, 0.45) 25%,
    rgba(0, 255, 136, 0.45) 50%,
    rgba(0, 212, 255, 0.45) 75%,
    transparent
  );
  box-shadow: 0 0 16px rgba(0, 212, 255, 0.35);
}

.portal-artist .portal-edge {
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent,
    rgba(255, 45, 138, 0.55) 25%,
    rgba(255, 122, 24, 0.65) 50%,
    rgba(255, 210, 63, 0.55) 75%,
    transparent
  );
  box-shadow: 0 0 18px rgba(255, 45, 138, 0.4);
}

/* ═══════════════════════════════════════════════════════ */
/*  PORTAL FOCUS (hover/keyboard between portals)          */
/* ═══════════════════════════════════════════════════════ */
.landing.focus-dev .portal-developer { flex: 1.3; }
.landing.focus-dev .portal-artist    { flex: 0.7; opacity: 0.5; }

.landing.focus-art .portal-artist    { flex: 1.3; }
.landing.focus-art .portal-developer { flex: 0.7; opacity: 0.5; }

/* ═══════════════════════════════════════════════════════ */
/*  CENTER BRAND MARK + RIFT                               */
/* ═══════════════════════════════════════════════════════ */
.landing-brand {
  position: absolute;
  top: 50%;
  left: 50%;
  transform:
    translate(
      calc(-50% + var(--bx, 0px)),
      calc(-50% + var(--by, 0px))
    )
    rotate(var(--brot, 0deg));
  z-index: 10;
  pointer-events: none;
  opacity: 0;
  transition:
    opacity 0.8s ease 0.4s,
    top 0.5s var(--ease-out),
    transform 0.18s ease-out;
  will-change: transform;
}

.landing.ready .landing-brand { opacity: 1; }

.brand-name {
  font-family: 'Audiowide', 'Orbitron', sans-serif;
  font-size: clamp(0.7rem, 1.5vw, 0.95rem);
  font-weight: 700;
  letter-spacing: 0.4em;
  background: linear-gradient(180deg, #ffffff 0%, #ffd23f 45%, #ff2d8a 70%, #00d4ff 100%);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  text-transform: uppercase;
  padding: 8px 22px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  background-color: rgba(7, 9, 15, 0.92);
  backdrop-filter: blur(10px);
  text-shadow: 0 0 30px rgba(255, 255, 255, 0.06);
}

.brand-prompt {
  display: block;
  margin-top: 6px;
  font-family: 'VT323', 'Fira Code', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.4em;
  color: rgba(255, 255, 255, 0.4);
  text-align: center;
  text-transform: uppercase;
  animation: prompt-pulse 2.4s ease-in-out infinite;
}
@keyframes prompt-pulse {
  0%, 100% { opacity: 0.35; }
  50%      { opacity: 0.85; }
}

/* Animated divider between portals */
.landing-rift {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  transform: translateY(-50%);
  z-index: 5;
  pointer-events: none;
  transition: top 0.5s var(--ease-out);
}

.landing.focus-dev .landing-rift,
.landing.focus-dev .landing-brand { top: 65%; }
.landing.focus-art .landing-rift,
.landing.focus-art .landing-brand { top: 35%; }

.landing-rift .rift-line {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(0, 212, 255, 0.55) 30%,
    rgba(255, 255, 255, 0.85) 50%,
    rgba(255, 45, 138, 0.55) 70%,
    transparent 100%
  );
  filter: blur(0.5px);
}
.landing-rift .rift-beam {
  position: absolute;
  top: -3px;
  width: 12%;
  height: 8px;
  background: radial-gradient(ellipse at center, rgba(255,255,255,0.95), rgba(0,212,255,0.6) 40%, transparent 80%);
  border-radius: 50%;
  filter: blur(2px);
  animation: rift-scan 5.5s ease-in-out infinite;
}
@keyframes rift-scan {
  0%   { left: -15%; opacity: 0; }
  10%  { opacity: 1; }
  50%  { left: 50%; opacity: 1; }
  90%  { opacity: 1; }
  100% { left: 115%; opacity: 0; }
}

.portal-keyhint {
  margin-top: 14px;
  font-family: 'VT323', 'Fira Code', monospace;
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.3);
  text-transform: uppercase;
}

/* ═══════════════════════════════════════════════════════ */
/*  DEVELOPER PORTAL  (Top) — Cyber / Terminal             */
/* ═══════════════════════════════════════════════════════ */
.portal-developer {
  background:
    radial-gradient(ellipse 80% 60% at 50% 100%, rgba(0, 212, 255, 0.10), transparent 70%),
    linear-gradient(180deg, #050810 0%, #07101c 70%, #0a1422 100%);
}

/* Hex/circuit grid faint overlay */
.portal-developer::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image:
    linear-gradient(0deg,  rgba(0, 212, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 212, 255, 0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 60%, #000 30%, transparent 90%);
          mask-image: radial-gradient(ellipse 80% 70% at 50% 60%, #000 30%, transparent 90%);
  opacity: 0.7;
}

/* CRT scanlines on the dev portal */
.portal-developer::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 212, 255, 0.04) 0px,
    rgba(0, 212, 255, 0.04) 1px,
    transparent 1px,
    transparent 3px
  );
  mix-blend-mode: screen;
  opacity: 0.6;
}

.portal-developer .portal-title {
  color: #e6f7ff;
  text-shadow: 0 0 24px rgba(0, 212, 255, 0.35);
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.2em;
}
/* Add code-tag brackets around developer title */
.portal-developer .portal-title::before {
  content: '<';
  color: #00d4ff;
  font-family: 'Fira Code', monospace;
  font-weight: 400;
  margin-right: 0.15em;
  text-shadow: 0 0 12px rgba(0, 212, 255, 0.6);
}
.portal-developer .portal-title::after {
  content: '/>';
  color: #00d4ff;
  font-family: 'Fira Code', monospace;
  font-weight: 400;
  margin-left: 0.15em;
  text-shadow: 0 0 12px rgba(0, 212, 255, 0.6);
}

.portal-developer .portal-icon {
  color: #00d4ff;
  font-family: 'Fira Code', monospace;
  font-size: 1.8rem;
  text-shadow:
    0 0 16px rgba(0, 212, 255, 0.55),
    0 0 32px rgba(0, 212, 255, 0.25);
  animation: dev-icon-pulse 3.2s ease-in-out infinite;
}
@keyframes dev-icon-pulse {
  0%, 100% { text-shadow: 0 0 16px rgba(0, 212, 255, 0.55), 0 0 32px rgba(0, 212, 255, 0.25); }
  50%      { text-shadow: 0 0 22px rgba(0, 212, 255, 0.85), 0 0 50px rgba(0, 255, 136, 0.30); }
}

.portal-developer .portal-subtitle {
  color: rgba(0, 212, 255, 0.6);
  font-family: 'Fira Code', monospace;
}
/* Render subtitle as a comment */
.portal-developer .portal-subtitle::before {
  content: '// ';
  color: rgba(0, 255, 136, 0.7);
}

.portal-developer .portal-keyhint {
  color: rgba(0, 212, 255, 0.45);
}

.portal-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
}

/* ═══════════════════════════════════════════════════════ */
/*  ARTIST PORTAL  (Bottom) — Retro Synthwave              */
/* ═══════════════════════════════════════════════════════ */
.portal-artist {
  background:
    radial-gradient(ellipse 70% 90% at 50% 110%, rgba(255, 45, 138, 0.30), transparent 60%),
    radial-gradient(ellipse 60% 70% at 50% 0%,   rgba(125, 44, 255, 0.30), transparent 70%),
    linear-gradient(180deg, #1a0a2e 0%, #2a0a4a 50%, #4a0e6f 90%, #6a1a8c 100%);
}

/* Twinkling stars top of artist portal */
.portal-artist::before {
  content: '';
  position: absolute;
  inset: 0 0 50% 0;
  z-index: 1;
  pointer-events: none;
  background-image:
    radial-gradient(1px 1px at 12% 28%, rgba(255,255,255,0.7), transparent 2px),
    radial-gradient(1px 1px at 28% 52%, rgba(255,255,255,0.5), transparent 2px),
    radial-gradient(1.5px 1.5px at 47% 18%, rgba(255,255,255,0.85), transparent 2px),
    radial-gradient(1px 1px at 65% 40%, rgba(255,255,255,0.6), transparent 2px),
    radial-gradient(1px 1px at 82% 62%, rgba(255,255,255,0.7), transparent 2px),
    radial-gradient(1.5px 1.5px at 92% 30%, rgba(255,255,255,0.5), transparent 2px),
    radial-gradient(1px 1px at 8% 70%, rgba(255,255,255,0.4), transparent 2px),
    radial-gradient(1px 1px at 38% 12%, rgba(255,255,255,0.6), transparent 2px),
    radial-gradient(1px 1px at 73% 8%, rgba(255,255,255,0.55), transparent 2px),
    radial-gradient(1px 1px at 18% 80%, rgba(255,255,255,0.45), transparent 2px),
    radial-gradient(1px 1px at 56% 76%, rgba(255,255,255,0.5), transparent 2px);
  opacity: 0.8;
  animation: stars-twinkle 6s ease-in-out infinite alternate;
}
@keyframes stars-twinkle {
  0%   { opacity: 0.4; }
  100% { opacity: 0.9; }
}

/* Slotted sun behind the artist portal title */
.portal-artist .portal-grid {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.portal-artist .portal-grid::before {
  /* Retro sun disc */
  content: '';
  position: absolute;
  bottom: 38%;
  left: 50%;
  transform: translateX(-50%);
  width: clamp(220px, 30vw, 380px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: linear-gradient(180deg,
    #ffd23f 0%,
    #ff7a18 55%,
    #ff2d8a 100%);
  -webkit-mask-image: linear-gradient(180deg,
    #000 0%, #000 55%,
    transparent 57%, #000 60%,
    transparent 64%, #000 67%,
    transparent 72%, #000 76%,
    transparent 82%, #000 87%,
    transparent 95%);
          mask-image: linear-gradient(180deg,
    #000 0%, #000 55%,
    transparent 57%, #000 60%,
    transparent 64%, #000 67%,
    transparent 72%, #000 76%,
    transparent 82%, #000 87%,
    transparent 95%);
  filter: drop-shadow(0 0 50px rgba(255, 45, 138, 0.55))
          drop-shadow(0 0 90px rgba(255, 122, 24, 0.35));
  animation: portal-sun-glow 4s ease-in-out infinite alternate;
}
@keyframes portal-sun-glow {
  0%   { filter: drop-shadow(0 0 50px rgba(255, 45, 138, 0.55)) drop-shadow(0 0 90px rgba(255, 122, 24, 0.35)); }
  100% { filter: drop-shadow(0 0 70px rgba(255, 45, 138, 0.85)) drop-shadow(0 0 120px rgba(255, 210, 63, 0.45)); }
}

/* Glowing horizon seam under the sun */
.portal-artist .portal-grid::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  bottom: 38%;
  height: 2px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(255, 122, 24, 0.6) 20%,
    rgba(255, 45, 138, 1)   50%,
    rgba(125, 44, 255, 0.6) 80%,
    transparent 100%);
  filter: blur(1px);
  box-shadow:
    0 0 18px rgba(255, 45, 138, 0.6),
    0 0 36px rgba(255, 122, 24, 0.35);
}

/* Running perspective grid floor — drawn via CSS gradients */
.portal-artist .portal-glow {
  position: absolute;
  left: -10%;
  right: -10%;
  bottom: 0;
  height: 38%;
  z-index: 1;
  pointer-events: none;
  background-image:
    /* Horizontal lines (perspective) */
    repeating-linear-gradient(
      180deg,
      transparent 0px,
      transparent 28px,
      rgba(255, 45, 138, 0.55) 28px,
      rgba(255, 45, 138, 0.55) 30px
    ),
    /* Vertical lines */
    repeating-linear-gradient(
      90deg,
      transparent 0px,
      transparent 36px,
      rgba(255, 122, 24, 0.45) 36px,
      rgba(255, 122, 24, 0.45) 38px
    );
  background-size: 100% 30px, 38px 100%;
  transform: perspective(420px) rotateX(62deg);
  transform-origin: bottom center;
  animation: portal-grid-run 1.6s linear infinite;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 35%, #000 100%);
          mask-image: linear-gradient(180deg, transparent 0%, #000 35%, #000 100%);
}
@keyframes portal-grid-run {
  0%   { background-position: 0 0,    0 0; }
  100% { background-position: 0 30px, 0 0; }
}

/* The .grid-line elements injected by JS aren't needed for the new
   retro look — hide them so they don't paint over the sun/grid. */
.portal-artist .grid-line { display: none; }

.portal-artist .portal-title {
  color: #ffffff;
  background: linear-gradient(180deg, #ffffff 0%, #ffd23f 45%, #ff7a18 70%, #ff2d8a 100%);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 36px rgba(255, 45, 138, 0.4);
  filter: drop-shadow(0 2px 8px rgba(255, 45, 138, 0.35));
}

.portal-artist .portal-icon {
  color: #ffd23f;
  font-size: 2.2rem;
  text-shadow:
    0 0 14px rgba(255, 210, 63, 0.65),
    0 0 32px rgba(255, 45, 138, 0.4);
  animation: art-icon-pulse 3s ease-in-out infinite;
}
@keyframes art-icon-pulse {
  0%, 100% { transform: scale(1);    text-shadow: 0 0 14px rgba(255, 210, 63, 0.6), 0 0 32px rgba(255, 45, 138, 0.4); }
  50%      { transform: scale(1.08); text-shadow: 0 0 24px rgba(255, 210, 63, 0.9), 0 0 56px rgba(255, 45, 138, 0.6); }
}

.portal-artist .portal-subtitle {
  color: rgba(255, 210, 63, 0.7);
  font-family: 'VT323', 'Fira Code', monospace;
  font-size: 1.05rem;
  letter-spacing: 0.32em;
}

.portal-artist .portal-keyhint {
  color: rgba(255, 210, 63, 0.5);
}

/* Neon particles (kept) — recolor to retro palette */
.neon-particle {
  position: absolute;
  width: 3px;
  height: 3px;
  background: #ff2d8a;
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(255, 45, 138, 0.7);
  animation: neon-float ease-in-out infinite;
  z-index: 1;
}
.neon-particle:nth-child(3n)   { background: #ff7a18; box-shadow: 0 0 6px rgba(255, 122, 24, 0.7); }
.neon-particle:nth-child(3n+1) { background: #ffd23f; box-shadow: 0 0 6px rgba(255, 210, 63, 0.7); }

@keyframes neon-float {
  0%, 100% { opacity: 0; transform: translateY(0) scale(0); }
  30%      { opacity: 0.85; transform: scale(1); }
  70%      { opacity: 0.5; }
  100%     { opacity: 0; transform: translateY(-50px) translateX(20px) scale(0.3); }
}

/* Retro waveform across artist portal bottom */
.portal-waveform {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 80px;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.6s var(--ease-out);
  overflow: hidden;
}
.landing.ready .portal-artist .portal-waveform { opacity: 0.55; }
.landing.focus-art .portal-artist .portal-waveform { opacity: 0.95; }

.wf-bar {
  position: absolute;
  bottom: 0;
  width: 3px;
  background: linear-gradient(to top,
    rgba(255, 210, 63, 0.95),
    rgba(255, 122, 24, 0.7) 50%,
    rgba(255, 45, 138, 0.4) 80%,
    transparent);
  border-radius: 2px 2px 0 0;
  box-shadow: 0 0 6px rgba(255, 45, 138, 0.45);
  transform: translateX(-50%);
  transition: height 0.06s linear;
}

/* Binary rain (developer) — recolor to electric cyan */
.portal-rain {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.6s var(--ease-out);
  mix-blend-mode: screen;
}
.landing.ready .portal-developer .portal-rain    { opacity: 0.55; }
.landing.focus-dev .portal-developer .portal-rain { opacity: 0.9; }

/* ═══════════════════════════════════════════════════════ */
/*  PORTAL ZOOM — departure transition                     */
/*  Triggered by .landing.zooming (+ .zooming-dev/-art).   */
/*  Chosen portal grows huge while content recedes,        */
/*  dismissed portal collapses, brand fades.               */
/* ═══════════════════════════════════════════════════════ */
.landing.zooming { pointer-events: none; }

/* Dismissed portal collapses + fades */
.landing.zooming .portal-recede {
  flex: 0.05;
  opacity: 0;
  filter: blur(6px);
  transition:
    flex   0.5s cubic-bezier(0.7, 0, 0.84, 0),
    opacity 0.5s ease-in,
    filter  0.5s ease-in;
}

/* Chosen portal dominates + warps forward */
.landing.zooming .portal-zoom {
  flex: 5;
  z-index: 5;
  transform-origin: center center;
  animation: portal-zoom-warp 0.7s cubic-bezier(0.7, 0, 0.84, 0) forwards;
}

/* Content within chosen portal recedes (camera moves through it) */
.landing.zooming .portal-zoom .portal-content {
  animation: portal-zoom-content 0.65s cubic-bezier(0.7, 0, 0.84, 0) forwards;
}

/* Brand + rift fade out */
.landing.zooming .landing-brand,
.landing.zooming .landing-rift {
  animation: brand-warp 0.4s ease-out forwards;
}

/* Light flash from center toward edges as we punch through */
.landing.zooming::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle at 50% 50%,
    var(--zoom-flash, rgba(255,255,255,0.6)) 0%,
    transparent 35%,
    transparent 100%);
  mix-blend-mode: screen;
  animation: zoom-flash 0.7s cubic-bezier(0.7, 0, 0.84, 0) forwards;
}
.landing.zooming-dev { --zoom-flash: rgba(0, 212, 255, 0.65); }
.landing.zooming-art { --zoom-flash: rgba(255, 122, 24, 0.7); }

@keyframes portal-zoom-warp {
  0%   { transform: scale(1);    filter: brightness(1)   blur(0); }
  60%  { transform: scale(1.45); filter: brightness(1.2) blur(1px); }
  100% { transform: scale(2.6);  filter: brightness(1.5) blur(4px); }
}
@keyframes portal-zoom-content {
  0%   { transform: scale(1)   translateZ(0);    opacity: 1; filter: blur(0); }
  60%  { transform: scale(1.6) translateZ(50px); opacity: 0.7; filter: blur(2px); }
  100% { transform: scale(2.6) translateZ(150px); opacity: 0;  filter: blur(10px); }
}
@keyframes brand-warp {
  0%   { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(0.6) rotate(var(--brot, 0deg)); }
}
@keyframes zoom-flash {
  0%   { opacity: 0;   transform: scale(0.4); }
  60%  { opacity: 0.9; transform: scale(1); }
  100% { opacity: 0;   transform: scale(2.2); }
}

/* ═══════════════════════════════════════════════════════ */
/*  PORTAL ARRIVAL  (played on the destination page)       */
/*  Hooked by theme.js when sessionStorage.portalZoomFrom  */
/*  matches the active identity.                           */
/* ═══════════════════════════════════════════════════════ */
.portal-arriving #identity-bg {
  animation: arrive-bg 0.7s ease-out;
}
.portal-arriving .layout-main,
.portal-arriving .page-content,
.portal-arriving #app {
  animation: arrive-content 0.7s ease-out;
}
.portal-arriving::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  background: radial-gradient(circle at 50% 50%,
    transparent 0%,
    transparent 18%,
    var(--arrive-tint, rgba(0,0,0,0.85)) 60%,
    var(--arrive-tint, rgba(0,0,0,0.85)) 100%);
  animation: arrive-iris 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transform-origin: center;
}
.portal-arriving-developer { --arrive-tint: rgba(5, 8, 16, 0.92); }
.portal-arriving-artist    { --arrive-tint: rgba(13, 1, 25, 0.92); }

@keyframes arrive-iris {
  0%   { transform: scale(0.25); opacity: 1; }
  100% { transform: scale(2.6);  opacity: 0; }
}
@keyframes arrive-bg {
  0%   { transform: scale(1.18); opacity: 0.5; filter: blur(8px); }
  100% { transform: scale(1);    opacity: 1;   filter: blur(0); }
}
@keyframes arrive-content {
  0%   { transform: scale(1.04); opacity: 0; }
  100% { transform: scale(1);    opacity: 1; }
}

/* ── Reduced-motion: skip the whole zoom show ── */
@media (prefers-reduced-motion: reduce) {
  .landing.zooming .portal-zoom,
  .landing.zooming .portal-zoom .portal-content,
  .landing.zooming .landing-brand,
  .landing.zooming .landing-rift,
  .landing.zooming::after,
  .portal-arriving #identity-bg,
  .portal-arriving .layout-main,
  .portal-arriving .page-content,
  .portal-arriving #app,
  .portal-arriving::after {
    animation: none !important;
  }
  .portal-developer .portal-icon,
  .portal-artist .portal-icon,
  .portal-artist .portal-grid::before,
  .portal-waveform { animation: none !important; }
}

/* ── Mobile ── */
@media (max-width: 640px) {
  .portal-icon { font-size: 1.5rem; }
  .portal-subtitle { font-size: 0.8rem; }
  .portal-enter-btn { padding: 10px 24px; font-size: 0.75rem; }
  .portal-artist .portal-grid::before { width: clamp(180px, 50vw, 260px); }
}

/* Slight enhancement: focused portal gets brighter */
.landing.focus-dev .portal-developer .portal-content { transform: scale(1.02); }
.landing.focus-art .portal-artist .portal-content    { transform: scale(1.02); }
.portal-content { transition: transform 0.4s var(--ease-out); }
