/* Multiverse of projects: two portals that open into full-screen project worlds. */
:root {
  --mv-bg: #07070d;
  --mv-web-rgb: 255, 181, 71;
  --mv-ml-rgb: 79, 140, 255;
}
#multiverse {
  background: var(--mv-bg);
  color: #fff;
  padding: 6rem 0 7rem;
  overflow: hidden;
}
.mv-inner { max-width: 1400px; margin: 0 auto; padding: 0 1.5rem; }
@media (min-width: 768px) { .mv-inner { padding: 0 3.5rem; } }

.mv-title {
  font-size: clamp(2.4rem, 6.4vw, 6rem);
  font-weight: 800;
  line-height: .95;
  letter-spacing: -0.035em;
  text-align: center;
  max-width: 17ch;
  margin: 0 auto 1.25rem;
  text-wrap: balance;
}
.mv-lede {
  text-align: center;
  color: rgba(255, 255, 255, .6);
  font-size: 1.0625rem;
  margin-bottom: 3.5rem;
}

/* Portals */
.mv-portals {
  display: flex;
  gap: 1rem;
  height: clamp(420px, 66vh, 640px);
}
.mv-portal {
  --c: var(--mv-web-rgb);
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  border-radius: 28px;
  overflow: hidden;
  isolation: isolate;
  text-align: left;
  color: #fff;
  cursor: pointer;
  border: 1px solid rgba(var(--c), .3);
  box-shadow: inset 0 0 80px rgba(var(--c), .12), 0 0 0 rgba(var(--c), 0);
  transition:
    flex-grow 800ms cubic-bezier(.22, 1, .36, 1),
    opacity 500ms ease,
    box-shadow 600ms ease,
    border-color 600ms ease;
}
.mv-portal--web { background: radial-gradient(120% 90% at 30% 100%, #3a1d05 0%, #120a04 55%, #07070d 100%); }
.mv-portal--ml { --c: var(--mv-ml-rgb); background: radial-gradient(120% 90% at 70% 100%, #0a2150 0%, #060b1c 55%, #07070d 100%); }
.mv-portal:hover,
.mv-portal:focus-visible {
  flex-grow: 1.4;
  border-color: rgba(var(--c), .7);
  box-shadow: inset 0 0 120px rgba(var(--c), .2), 0 0 60px rgba(var(--c), .18);
}
.mv-portals:hover .mv-portal:not(:hover) { opacity: .55; }
.mv-portal:focus-visible { outline: 2px solid rgb(var(--c)); outline-offset: 4px; }

.mv-portal__text {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: .6rem;
  padding: 2rem;
  background: linear-gradient(to top, rgba(7, 7, 13, .85), rgba(7, 7, 13, 0));
}
.mv-portal__count { color: rgb(var(--c)); font-size: .875rem; font-weight: 700; }
.mv-portal__name {
  font-size: clamp(2rem, 4vw, 3.75rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
}
.mv-portal__desc { color: rgba(255, 255, 255, .7); font-size: 1rem; max-width: 34ch; }
.mv-portal__cta {
  align-self: flex-start;
  margin-top: .5rem;
  padding: .7rem 1.3rem;
  border-radius: 999px;
  border: 1px solid rgba(var(--c), .6);
  font-size: .875rem;
  font-weight: 700;
  transition: background-color 300ms ease, color 300ms ease;
}
.mv-portal:hover .mv-portal__cta { background: rgb(var(--c)); color: #07070d; }

/* Scenes (shared by portals and worlds) */
.mv-scene { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.mv-layer {
  position: absolute;
  inset: -8%;
  transform: translate3d(calc(var(--px, 0) * var(--d) * 1px), calc(var(--py, 0) * var(--d) * 1px), 0);
  transition: transform 700ms cubic-bezier(.22, 1, .36, 1);
}
.mv-layer__inner { position: absolute; inset: 0; transform-origin: 50% 50%; }

/* Web universe pieces */
.mv-grid {
  position: absolute;
  left: -20%;
  right: -20%;
  bottom: -10%;
  height: 70%;
  background-image:
    linear-gradient(rgba(var(--mv-web-rgb), .22) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--mv-web-rgb), .22) 1px, transparent 1px);
  background-size: 48px 48px;
  transform: perspective(500px) rotateX(62deg);
  transform-origin: 50% 100%;
  -webkit-mask-image: linear-gradient(to top, #000 10%, transparent 90%);
  mask-image: linear-gradient(to top, #000 10%, transparent 90%);
}
.mv-win {
  position: absolute;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 0 14px;
  border-radius: 10px;
  border: 1px solid rgba(var(--mv-web-rgb), .35);
  background: rgba(30, 16, 4, .7);
  box-shadow: 0 20px 50px rgba(0, 0, 0, .45);
  transform: rotate(var(--r, 0deg));
}
.mv-win__bar {
  display: flex;
  gap: 5px;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(var(--mv-web-rgb), .2);
}
.mv-win__bar i { width: 7px; height: 7px; border-radius: 50%; background: rgba(var(--mv-web-rgb), .55); }
.mv-win__line { height: 6px; margin: 0 12px; border-radius: 3px; background: rgba(var(--mv-web-rgb), .28); }
.mv-win__line:nth-child(2) { background: rgba(var(--mv-web-rgb), .6); }

/* AI & Data universe pieces */
.mv-dot { position: absolute; border-radius: 50%; }
.mv-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px dashed rgba(var(--mv-ml-rgb), .35);
  transform: translate(-50%, -50%);
}
.mv-curve { position: absolute; overflow: visible; }

.mv-glyph {
  position: absolute;
  font-weight: 700;
  white-space: nowrap;
  animation: mv-float 7s ease-in-out infinite alternate;
}
.mv-portal--web .mv-glyph,
.mv-world--web .mv-glyph { color: rgba(var(--mv-web-rgb), .75); }
.mv-portal--ml .mv-glyph,
.mv-world--ml .mv-glyph { color: rgba(var(--mv-ml-rgb), .85); }
@keyframes mv-float {
  from { transform: translateY(-6px); }
  to { transform: translateY(6px); }
}

/* Worlds (full-screen project windows) */
html.mv-locked { overflow: hidden; }
.mv-world {
  position: fixed;
  inset: 0;
  z-index: 48;
  overflow-y: auto;
  overscroll-behavior: contain;
  color: #fff;
}
.mv-world[hidden] { display: none; }
.mv-world--web { --c: var(--mv-web-rgb); background: radial-gradient(120% 80% at 50% 110%, #3a1d05 0%, #120a04 50%, #07070d 100%); }
.mv-world--ml { --c: var(--mv-ml-rgb); background: radial-gradient(120% 80% at 50% 110%, #0a2150 0%, #060b1c 50%, #07070d 100%); }
.mv-world .mv-scene { position: fixed; opacity: .4; }
.mv-world__content {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 5rem;
}
.mv-world__bar { display: flex; justify-content: flex-end; margin-bottom: 4rem; }
.mv-back {
  padding: .7rem 1.3rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .25);
  background: rgba(7, 7, 13, .5);
  backdrop-filter: blur(8px);
  font-size: .875rem;
  font-weight: 700;
  color: #fff;
  transition: border-color 200ms ease, background-color 200ms ease;
}
.mv-back:hover { border-color: rgb(var(--c)); background: rgba(var(--c), .15); }
.mv-world__title {
  font-size: clamp(2.6rem, 7vw, 6.5rem);
  font-weight: 800;
  line-height: .95;
  letter-spacing: -0.035em;
  margin-bottom: 1rem;
}
.mv-world__lede { color: rgba(255, 255, 255, .7); font-size: 1.125rem; max-width: 50ch; margin-bottom: 3rem; }
.mv-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 1.25rem;
}
.mv-card {
  display: flex;
  flex-direction: column;
  gap: .9rem;
  padding: 1.75rem;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, .1);
  background: rgba(10, 10, 18, .6);
  backdrop-filter: blur(10px);
  transition: border-color 300ms ease, transform 400ms cubic-bezier(.22, 1, .36, 1);
}
.mv-card:hover { border-color: rgba(var(--c), .6); transform: translateY(-4px); }
.mv-card__kind { font-size: .8125rem; font-weight: 700; color: rgb(var(--c)); margin-bottom: -.4rem; }
.mv-card h3 { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.02em; }
.mv-card p { color: rgba(255, 255, 255, .7); line-height: 1.55; }
.mv-card__stack { display: flex; flex-wrap: wrap; gap: .4rem; }
.mv-card__stack li {
  padding: .3rem .7rem;
  border-radius: 999px;
  background: rgba(var(--c), .14);
  color: rgb(var(--c));
  font-size: .8125rem;
  font-weight: 600;
}
.mv-card__open {
  margin-top: auto;
  align-self: flex-start;
  padding: .65rem 1.2rem;
  border-radius: 999px;
  background: rgb(var(--c));
  color: #07070d;
  font-size: .875rem;
  font-weight: 700;
}
.mv-back:focus-visible,
.mv-card__open:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

@media (max-width: 767px) {
  .mv-portals { flex-direction: column; height: auto; }
  .mv-portal { min-height: 340px; }
  .mv-portal:hover, .mv-portal:focus-visible { flex-grow: 1; }
  .mv-portal__text { padding: 1.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  .mv-portal, .mv-layer, .mv-card { transition: none; }
  .mv-glyph { animation: none; }
}
