:root {
  --bg: #080812;
  --panel: rgba(17, 18, 38, 0.92);
  --panel-soft: rgba(255, 255, 255, 0.08);
  --text: #f7f3ff;
  --muted: #b9b4d6;
  --cyan: #4dfcff;
  --pink: #ff4fd8;
  --purple: #8b5cf6;
  --gold: #f7c873;
  --dark: #0d0d1a;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(255, 79, 216, 0.25), transparent 35%),
    radial-gradient(circle at bottom right, rgba(77, 252, 255, 0.2), transparent 35%),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

.background-glow {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 45px 45px;
  pointer-events: none;
  z-index: -1;
}

.hero {
  min-height: 100vh;
  padding: 24px;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid rgba(77, 252, 255, 0.25);
  background: rgba(10, 10, 24, 0.75);
  padding: 16px 22px;
  border-radius: 22px;
  backdrop-filter: blur(12px);
}

.logo {
  margin: 0;
  letter-spacing: 2px;
  color: var(--cyan);
}

.logo span {
  color: var(--pink);
}

.nav-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

button {
  border: none;
  cursor: pointer;
  font-weight: bold;
}

.nav-links button,
.main-buttons button {
  background: linear-gradient(135deg, var(--cyan), var(--pink));
  color: #080812;
  padding: 11px 16px;
  border-radius: 999px;
  transition: 0.3s;
}
.main-buttons a,
.main-buttons .nav-button,
.nav-button {
  display: inline-block;
  background: linear-gradient(135deg, var(--cyan), var(--pink));
  color: #080812;
  padding: 11px 16px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: bold;
  transition: 0.3s;
}

.main-buttons a:hover,
.main-buttons .nav-button:hover,
.nav-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 22px rgba(77, 252, 255, 0.45);
}

.main-buttons a:visited,
.nav-button:visited {
  color: #080812;
}
.nav-links button:hover,
.main-buttons button:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 22px rgba(77, 252, 255, 0.45);
}

.hero-content {
  max-width: 1150px;
  margin: 110px auto 0;
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 40px;
  align-items: center;
}

.eyebrow {
  color: var(--gold);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-size: 0.85rem;
}

.hero h1 {
  font-size: clamp(3rem, 8vw, 6.5rem);
  line-height: 0.95;
  margin: 10px 0;
  text-shadow:
    0 0 15px rgba(255, 79, 216, 0.45),
    0 0 30px rgba(77, 252, 255, 0.35);
}

.intro {
  color: var(--muted);
  max-width: 650px;
  font-size: 1.15rem;
  line-height: 1.7;
}

.main-buttons {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.hero-card {
  background: var(--panel-soft);
  border: 1px solid rgba(255, 79, 216, 0.35);
  border-radius: 28px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 0 35px rgba(139, 92, 246, 0.22);
}

.hero-card img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  border-radius: 22px;
  border: 1px solid rgba(77, 252, 255, 0.35);
}

.hero-card h3 {
  color: var(--cyan);
  margin-bottom: 4px;
}

.hero-card p {
  color: var(--muted);
}

.dashboard {
  max-width: 1150px;
  margin: 0 auto 70px;
  padding: 0 24px;
}

.portal-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.portal-card {
  background: var(--panel-soft);
  border: 1px solid rgba(77, 252, 255, 0.25);
  border-radius: 24px;
  padding: 26px;
  transition: 0.3s;
  cursor: pointer;
}

.portal-card:hover {
  transform: translateY(-8px);
  border-color: var(--pink);
  box-shadow: 0 0 30px rgba(255, 79, 216, 0.25);
}

.portal-card h3 {
  color: var(--cyan);
}

.portal-card p {
  color: var(--muted);
  line-height: 1.6;
}

/* SLIDE-OUT PANELS */
.side-panel {
  position: fixed;
  top: 0;
  right: -100%;
  width: min(560px, 100%);
  height: 100vh;
  overflow-y: auto;
  background: var(--panel);
  border-left: 1px solid rgba(77, 252, 255, 0.35);
  box-shadow: -20px 0 50px rgba(0, 0, 0, 0.5);
  padding: 40px;
  z-index: 10;
  transition: 0.4s ease;
}

.side-panel.active {
  right: 0;
}

.wide-panel {
  width: min(900px, 100%);
}

.close-btn {
  position: sticky;
  top: 0;
  float: right;
  background: var(--pink);
  color: white;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 1.6rem;
}

.side-panel h2 {
  font-size: 2.5rem;
  color: var(--cyan);
  margin-top: 40px;
}

.side-panel p {
  color: var(--muted);
  line-height: 1.7;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-top: 24px;
}

.detail-grid div,
.project-card {
  background: var(--panel-soft);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 22px;
  border-radius: 20px;
}

li {
  margin-bottom: 10px;
  color: var(--muted);
}

.image-feature {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 20px;
  align-items: center;
  margin-top: 25px;
  background: var(--panel-soft);
  padding: 18px;
  border-radius: 22px;
}

.image-feature img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 18px;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.project-card img {
  width: 100%;
  height: 170px;
  object-fit: cover;
  border-radius: 16px;
}

.project-card h3 {
  color: var(--gold);
}

.project-card span {
  color: var(--cyan);
  font-weight: bold;
  font-size: 0.9rem;
}

.skill-tree {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 25px;
}

.skill-tree span {
  background: linear-gradient(135deg, rgba(77, 252, 255, 0.2), rgba(255, 79, 216, 0.2));
  border: 1px solid rgba(77, 252, 255, 0.35);
  padding: 12px 16px;
  border-radius: 999px;
  color: var(--text);
}

/* MOBILE */
@media (max-width: 850px) {
  .hero-content {
    grid-template-columns: 1fr;
    margin-top: 60px;
  }

  .portal-grid,
  .project-grid,
  .detail-grid,
  .image-feature {
    grid-template-columns: 1fr;
  }

  .navbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
  }

  .hero-card img {
    height: 240px;
  }
}
/* 
  CREATIVE ADD-ONS
*/

.expansion-section {
  margin-top: 70px;
  padding: 34px;
  border: 1px solid rgba(77, 252, 255, 0.18);
  border-radius: 28px;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.06),
    rgba(77, 252, 255, 0.04)
  );
  box-shadow: 0 0 45px rgba(139, 92, 246, 0.14);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 28px;
}

.section-heading h2 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  margin: 8px 0;
  color: var(--cyan);
  text-shadow: 0 0 18px rgba(77, 252, 255, 0.35);
}

.section-heading p {
  color: var(--muted);
  line-height: 1.7;
}

.unlock-grid,
.world-grid,
.video-grid,
.case-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.unlock-grid {
  grid-template-columns: repeat(4, 1fr);
}

.unlock-card,
.world-card,
.video-card,
.case-card {
  text-align: left;
  color: var(--text);
  background: rgba(8, 8, 18, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  padding: 22px;
  transition: 0.3s ease;
  box-shadow: inset 0 0 20px rgba(77, 252, 255, 0.03);
}

.unlock-card:hover,
.world-card:hover,
.video-card:hover,
.case-card:hover {
  transform: translateY(-6px);
  border-color: var(--pink);
  box-shadow: 0 0 30px rgba(255, 79, 216, 0.18);
}

.unlock-card span,
.status-tag {
  display: inline-block;
  color: var(--gold);
  font-size: 0.8rem;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.unlock-card h3,
.world-card h3,
.video-card h3,
.case-card h3 {
  color: var(--cyan);
  margin-top: 0;
}

.unlock-card p,
.world-card p,
.video-card p,
.case-card p {
  color: var(--muted);
  line-height: 1.6;
}

.reveal-text {
  display: none;
  margin-top: 14px;
  border-top: 1px solid rgba(77, 252, 255, 0.2);
  padding-top: 14px;
}

.reveal-text.show {
  display: block;
}

.world-card button,
.case-card button {
  margin-top: 14px;
  background: transparent;
  color: var(--cyan);
  border: 1px solid rgba(77, 252, 255, 0.45);
  padding: 10px 14px;
  border-radius: 999px;
  transition: 0.3s;
}

.world-card button:hover,
.case-card button:hover {
  color: #080812;
  background: var(--cyan);
  box-shadow: 0 0 20px rgba(77, 252, 255, 0.35);
}

.video-placeholder {
  display: grid;
  place-items: center;
  height: 170px;
  border-radius: 18px;
  margin-bottom: 16px;
  background:
    linear-gradient(135deg, rgba(255, 79, 216, 0.22), rgba(77, 252, 255, 0.14)),
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.04) 0 1px,
      transparent 1px 16px
    );
  border: 1px solid rgba(77, 252, 255, 0.25);
  color: var(--gold);
  font-weight: bold;
  letter-spacing: 2px;
}

.neon-link {
  display: inline-block;
  color: var(--cyan);
  text-decoration: none;
  border-bottom: 1px solid var(--cyan);
  margin-top: 10px;
  transition: 0.3s;
}

.neon-link:hover {
  color: var(--pink);
  border-bottom-color: var(--pink);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(10px);
  z-index: 30;
}

.modal-overlay.active {
  display: flex;
}

.modal-box {
  width: min(720px, 100%);
  background: var(--panel);
  border: 1px solid rgba(77, 252, 255, 0.35);
  border-radius: 28px;
  padding: 32px;
  box-shadow: 0 0 60px rgba(77, 252, 255, 0.18);
}

.modal-box h2 {
  color: var(--cyan);
  font-size: 2.2rem;
  margin-top: 20px;
}

.modal-box p {
  color: var(--muted);
  line-height: 1.7;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 20px;
}

.floating-menu {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  padding: 10px;
  border-radius: 999px;
  background: rgba(8, 8, 18, 0.82);
  border: 1px solid rgba(77, 252, 255, 0.25);
  backdrop-filter: blur(12px);
  z-index: 8;
}

.floating-menu button {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 9px 13px;
}

.floating-menu button:hover {
  color: #080812;
  background: var(--cyan);
}

@media (max-width: 1000px) {
  .unlock-grid,
  .world-grid,
  .video-grid,
  .case-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 650px) {
  .unlock-grid,
  .world-grid,
  .video-grid,
  .case-grid {
    grid-template-columns: 1fr;
  }

  .expansion-section {
    padding: 22px;
  }

  .floating-menu {
    width: calc(100% - 24px);
    overflow-x: auto;
    justify-content: flex-start;
    border-radius: 18px;
  }
}
/*PORTAL */

.cyber-portal-section {
  width: min(1100px, 92%);
  margin: 90px auto;
  padding: 56px 34px;
  border: 1px solid rgba(77, 252, 255, 0.32);
  border-radius: 32px;
  background:
    radial-gradient(circle at 50% 0%, rgba(77, 252, 255, 0.2), transparent 36%),
    radial-gradient(circle at 85% 80%, rgba(255, 79, 216, 0.2), transparent 38%),
    radial-gradient(circle at 15% 90%, rgba(139, 92, 246, 0.18), transparent 35%),
    rgba(5, 5, 18, 0.88);
  box-shadow:
    0 0 45px rgba(77, 252, 255, 0.2),
    0 0 90px rgba(255, 79, 216, 0.08),
    inset 0 0 45px rgba(77, 252, 255, 0.06);
  position: relative;
  overflow: hidden;
}

.cyber-portal-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(77, 252, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(77, 252, 255, 0.06) 1px, transparent 1px);
  background-size: 36px 36px;
  opacity: 0.38;
  pointer-events: none;
}

.cyber-portal-section::after {
  content: "";
  position: absolute;
  inset: -40%;
  background:
    conic-gradient(
      from 180deg,
      transparent,
      rgba(77, 252, 255, 0.08),
      transparent,
      rgba(255, 79, 216, 0.08),
      transparent
    );
  animation: portalSectionAura 16s linear infinite;
  pointer-events: none;
}

.portal-header {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 760px;
  margin: 0 auto 46px;
}

.portal-kicker,
.portal-label {
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: 3px;
  font-size: 0.78rem;
  font-weight: 800;
}

.portal-header h2 {
  font-size: clamp(2.2rem, 5vw, 4.2rem);
  margin: 10px 0;
  color: white;
  text-shadow:
    0 0 10px rgba(77, 252, 255, 0.95),
    0 0 25px rgba(255, 79, 216, 0.65),
    0 0 55px rgba(139, 92, 246, 0.45);
}

.portal-header p {
  color: rgba(247, 243, 255, 0.78);
  line-height: 1.7;
}

.portal-shell {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(300px, 470px) 1fr;
  gap: 48px;
  align-items: center;
}

.portal-frame {
  position: relative;
  width: min(470px, 100%);
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  display: grid;
  place-items: center;
  isolation: isolate;
}

.portal-frame::before {
  content: "";
  position: absolute;
  inset: -34px;
  border-radius: 50%;
  background:
    repeating-conic-gradient(
      from 0deg,
      rgba(77, 252, 255, 0.95) 0deg 8deg,
      transparent 8deg 18deg,
      rgba(255, 79, 216, 0.75) 18deg 24deg,
      transparent 24deg 36deg
    );
  filter: blur(0.5px);
  opacity: 0.55;
  animation: portalOuterSpin 18s linear infinite;
  z-index: -3;
}

.portal-frame::after {
  content: "";
  position: absolute;
  inset: -18px;
  border-radius: 50%;
  border: 1px solid rgba(77, 252, 255, 0.45);
  box-shadow:
    0 0 30px rgba(77, 252, 255, 0.45),
    inset 0 0 30px rgba(255, 79, 216, 0.18);
  animation: portalPulse 2.6s ease-in-out infinite;
  z-index: -2;
}

.portal-energy-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    conic-gradient(
      from 0deg,
      var(--cyan),
      var(--pink),
      var(--purple),
      var(--cyan),
      var(--pink),
      var(--cyan)
    );
  filter: blur(1px);
  animation: portalSpin 6s linear infinite;
  box-shadow:
    0 0 28px rgba(77, 252, 255, 0.75),
    0 0 65px rgba(255, 79, 216, 0.35),
    0 0 120px rgba(139, 92, 246, 0.22);
}

.portal-energy-ring::before {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 50%;
  background:
    repeating-conic-gradient(
      from 45deg,
      rgba(255, 255, 255, 0.18) 0deg 4deg,
      transparent 4deg 12deg
    );
  mix-blend-mode: screen;
}

.portal-energy-ring::after {
  content: "";
  position: absolute;
  inset: 24px;
  border-radius: 50%;
  background: #050512;
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.95);
}

.portal-viewer {
  --mouse-x: 50%;
  --mouse-y: 50%;
  width: 82%;
  height: 82%;
  border-radius: 50%;
  position: relative;
  overflow: hidden;
  cursor: crosshair;
  border: 2px solid rgba(247, 243, 255, 0.26);
  background: #000;
  box-shadow:
    inset 0 0 35px rgba(0, 0, 0, 0.95),
    inset 0 0 65px rgba(77, 252, 255, 0.1),
    0 0 35px rgba(77, 252, 255, 0.42),
    0 0 75px rgba(255, 79, 216, 0.16);
}

.portal-viewer::before {
  content: "";
  position: absolute;
  inset: -25%;
  background:
    linear-gradient(
      115deg,
      transparent 30%,
      rgba(255, 255, 255, 0.2) 48%,
      transparent 58%
    );
  transform: translateX(-80%) rotate(10deg);
  animation: portalLightSweep 3.5s ease-in-out infinite;
  z-index: 2;
  pointer-events: none;
}

.portal-viewer::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.45), transparent 18%),
    radial-gradient(circle, rgba(77, 252, 255, 0.35), transparent 48%);
  opacity: 0;
  transform: scale(0.1);
  z-index: 6;
  pointer-events: none;
}

.portal-viewer.shield-burst::after {
  animation: shieldBurstFlash 0.65s ease-out forwards;
}

.portal-viewer img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.28) contrast(1.12) brightness(0.85);
  transform: scale(1.07);
  transition:
    transform 0.65s ease,
    filter 0.65s ease;
}

.portal-viewer:hover img {
  transform: scale(1.13);
  filter: saturate(1.5) contrast(1.18) brightness(1);
}

#portalCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 7;
  pointer-events: none;
}

.portal-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 50%, rgba(77, 252, 255, 0.24), rgba(0, 0, 0, 0.88) 68%),
    linear-gradient(135deg, rgba(255, 79, 216, 0.28), rgba(77, 252, 255, 0.18));
  backdrop-filter: blur(7px);
  transition:
    opacity 0.45s ease,
    transform 0.45s ease,
    filter 0.45s ease;
}
.portal-overlay.is-rebuilding {
  animation: shieldRebuild 1.6s ease-out forwards;
}

@keyframes shieldRebuild {
  0% {
    opacity: 0;
    transform: scale(1.35) rotate(10deg);
    filter: blur(10px);
  }

  45% {
    opacity: 0.55;
    transform: scale(1.08) rotate(-3deg);
    filter: blur(5px);
  }

  100% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
    filter: blur(0);
  }
}
.portal-overlay .mouse-glow {
  position: absolute;
  left: var(--mouse-x);
  top: var(--mouse-y);
  width: 230px;
  height: 230px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background:
    radial-gradient(
      circle,
      rgba(77, 252, 255, 0.55) 0%,
      rgba(255, 79, 216, 0.28) 35%,
      rgba(139, 92, 246, 0.12) 55%,
      transparent 72%
    );
  filter: blur(3px);
  opacity: 3;
  mix-blend-mode: screen;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 1;
}

.portal-viewer:hover .mouse-glow {
  opacity: 3;
}

.portal-overlay.is-broken .mouse-glow {
  opacity: 0;
}
}

.portal-overlay::before {
  content: "";
  position: absolute;
  inset: 16px;
  border-radius: 50%;
  border: 1px solid rgba(77, 252, 255, 0.5);
  box-shadow:
    inset 0 0 22px rgba(77, 252, 255, 0.3),
    0 0 22px rgba(255, 79, 216, 0.24);
  animation: shieldBreath 1.9s ease-in-out infinite;
}

.portal-overlay::after {
  content: "";
  position: absolute;
  inset: 30px;
  border-radius: 50%;
  border: 1px dashed rgba(255, 79, 216, 0.55);
  animation: portalSpinReverse 8s linear infinite;
}

.portal-overlay.is-broken {
  opacity: 0;
  transform: scale(1.35) rotate(10deg);
  filter: blur(8px);
  pointer-events: none;
}

.scan-line {
  position: absolute;
  left: 14%;
  top: -12px;
  width: 72%;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(77, 252, 255, 0.45) 25%,
    rgba(255, 255, 255, 0.95) 50%,
    rgba(77, 252, 255, 0.75) 70%,
    transparent 100%
  );
  box-shadow:
    0 0 8px rgba(77, 252, 255, 0.95),
    0 0 16px rgba(77, 252, 255, 0.65),
    0 0 24px rgba(255, 79, 216, 0.35);
  opacity: 0.95;
  mix-blend-mode: screen;
  pointer-events: none;
  z-index: 3;
  animation: portalScannerDown 2.4s linear infinite;
}

.shield-text {
  position: relative;
  z-index: 2;
  text-align: center;
  color: white;
  padding: 18px;
  text-shadow:
    0 0 12px rgba(77, 252, 255, 0.95),
    0 0 26px rgba(255, 79, 216, 0.55);
}

.shield-text span {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 4px;
  color: var(--cyan);
  margin-bottom: 8px;
}

.shield-text strong {
  display: block;
  font-size: clamp(1.1rem, 3vw, 1.75rem);
  letter-spacing: 2px;
}

.portal-info {
  color: white;
  padding: 22px;
  border-left: 1px solid rgba(77, 252, 255, 0.2);
}

.portal-info h3 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  margin: 8px 0 16px;
  color: white;
  text-shadow:
    0 0 14px rgba(255, 79, 216, 0.62),
    0 0 25px rgba(77, 252, 255, 0.25);
}

.portal-info p {
  color: rgba(247, 243, 255, 0.78);
  line-height: 1.75;
  max-width: 560px;
}

.portal-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.portal-controls button {
  border: 1px solid rgba(77, 252, 255, 0.48);
  background:
    linear-gradient(135deg, rgba(77, 252, 255, 0.18), rgba(255, 79, 216, 0.14)),
    rgba(0, 0, 0, 0.48);
  color: white;
  padding: 12px 18px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 800;
  letter-spacing: 1px;
  box-shadow: 0 0 14px rgba(77, 252, 255, 0.18);
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease,
    background 0.25s ease;
}

.portal-controls button:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 79, 216, 0.78);
  box-shadow:
    0 0 20px rgba(77, 252, 255, 0.38),
    0 0 34px rgba(255, 79, 216, 0.28);
}
@keyframes portalScannerDown {
  0% {
    transform: translateY(0);
    opacity: 0;
  }

  8% {
    opacity: 1;
  }

  92% {
    opacity: 1;
  }

  100% {
    transform: translateY(360px);
    opacity: 0;
  }
}

@keyframes portalSectionAura {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes portalSpin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes portalSpinReverse {
  from {
    transform: rotate(360deg);
  }

  to {
    transform: rotate(0deg);
  }
}

@keyframes portalOuterSpin {
  from {
    transform: rotate(0deg) scale(1);
  }

  to {
    transform: rotate(-360deg) scale(1);
  }
}

@keyframes portalPulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.65;
  }

  50% {
    transform: scale(1.04);
    opacity: 1;
  }
}

@keyframes shieldBreath {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.65;
  }

  50% {
    transform: scale(1.06);
    opacity: 1;
  }
}

@keyframes portalLightSweep {
  0% {
    transform: translateX(-90%) rotate(10deg);
    opacity: 0;
  }

  35% {
    opacity: 0.9;
  }

  65% {
    opacity: 0.55;
  }

  100% {
    transform: translateX(90%) rotate(10deg);
    opacity: 0;
  }
}

@keyframes shieldBurstFlash {
  0% {
    opacity: 0.95;
    transform: scale(0.05);
  }

  55% {
    opacity: 0.7;
    transform: scale(1.45);
  }

  100% {
    opacity: 0;
    transform: scale(2);
  }
}

@keyframes scanMove {
  from {
    transform: translateY(-18px);
  }

  to {
    transform: translateY(18px);
  }
}

@media (max-width: 850px) {
  .cyber-portal-section {
    padding: 38px 20px;
  }

  .portal-shell {
    grid-template-columns: 1fr;
  }

  .portal-info {
    text-align: center;
    border-left: none;
    border-top: 1px solid rgba(77, 252, 255, 0.2);
  }

  .portal-info p {
    margin-left: auto;
    margin-right: auto;
  }

  .portal-controls {
    justify-content: center;
  }
}
/* 
   SHORT LOADING SCREEN
 */

.loading-screen {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at top left, rgba(255, 79, 216, 0.24), transparent 35%),
    radial-gradient(circle at bottom right, rgba(77, 252, 255, 0.2), transparent 35%),
    #050511;
  transition: opacity 0.65s ease, visibility 0.65s ease;
}

.loading-screen.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loading-box {
  width: min(680px, calc(100% - 40px));
  padding: 34px;
  border-radius: 30px;
  background: rgba(8, 8, 18, 0.86);
  border: 1px solid rgba(77, 252, 255, 0.3);
  box-shadow:
    0 0 45px rgba(77, 252, 255, 0.18),
    0 0 70px rgba(255, 79, 216, 0.08);
  text-align: center;
}

.loading-kicker {
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 3px;
  font-size: 0.8rem;
}

.loading-box h1 {
  color: var(--cyan);
  font-size: clamp(2rem, 6vw, 4rem);
  margin: 10px 0 24px;
  text-shadow:
    0 0 18px rgba(77, 252, 255, 0.55),
    0 0 30px rgba(255, 79, 216, 0.2);
}

.loading-lines {
  display: grid;
  gap: 8px;
  color: var(--muted);
  margin-bottom: 24px;
}

.loading-lines span {
  opacity: 0;
  animation: loadingText 1.8s ease forwards;
}

.loading-lines span:nth-child(1) { animation-delay: 0.15s; }
.loading-lines span:nth-child(2) { animation-delay: 0.35s; }
.loading-lines span:nth-child(3) { animation-delay: 0.55s; }
.loading-lines span:nth-child(4) { animation-delay: 0.75s; }
.loading-lines span:nth-child(5) { animation-delay: 0.95s; color: var(--gold); }

.loading-bar {
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.loading-bar span {
  display: block;
  height: 100%;
  width: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--pink), var(--gold));
  box-shadow: 0 0 18px rgba(77, 252, 255, 0.55);
  transform-origin: left center;
  animation: loadingFill 1.75s ease forwards;
}

@keyframes loadingText {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes loadingFill {
  from {
    transform: scaleX(0);
  }

  to {
    transform: scaleX(1);
  }
}
/* 
   CYBERPUNK CUSTOM CURSOR
 */

body {
  cursor: none;
}

button,
a,
.portal-card,
.unlock-card,
.world-card,
.case-card,
.video-card,
.skill-pill,
.branch-btn,
.tv-shell,
.book-cover {
  cursor: none;
}

.custom-cursor {
  position: fixed;
  left: 0;
  top: 0;
  width: 18px;
  height: 18px;
  border: 1px solid var(--cyan);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  box-shadow:
    0 0 12px rgba(77, 252, 255, 0.9),
    0 0 24px rgba(255, 79, 216, 0.35);
  mix-blend-mode: screen;
}

.cursor-trail {
  position: fixed;
  left: 0;
  top: 0;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  background:
    radial-gradient(
      circle,
      rgba(77, 252, 255, 0.18),
      rgba(255, 79, 216, 0.12) 45%,
      transparent 70%
    );
  filter: blur(2px);
  mix-blend-mode: screen;
}

.custom-cursor.cursor-hover {
  width: 34px;
  height: 34px;
  border-color: var(--pink);
  box-shadow:
    0 0 14px rgba(255, 79, 216, 0.95),
    0 0 28px rgba(77, 252, 255, 0.4);
}

.cursor-trail.cursor-hover {
  width: 70px;
  height: 70px;
  background:
    radial-gradient(
      circle,
      rgba(255, 79, 216, 0.2),
      rgba(77, 252, 255, 0.13) 45%,
      transparent 72%
    );
}

@media (max-width: 850px) {
  body,
  button,
  a {
    cursor: auto;
  }

  .custom-cursor,
  .cursor-trail {
    display: none;
  }
}
.cursor-spark {
  position: fixed;
  width: 10px;
  height: 10px;
  left: 0;
  top: 0;
  pointer-events: none;
  border-radius: 50%;
  z-index: 9997;
  transform: translate(-50%, -50%);
  background: var(--gold);
  box-shadow:
    0 0 12px rgba(247, 200, 115, 0.95),
    0 0 24px rgba(77, 252, 255, 0.45);
  animation: cursorSpark 0.6s ease-out forwards;
}

@keyframes cursorSpark {
  from {
    opacity: 1;
    transform: translate(-50%, -50%) scale(0.4);
  }

  to {
    opacity: 0;
    transform: translate(-50%, -50%) scale(4);
  }
}
/*
   CYBER BINARY BACKGROUND
 */

body {
  position: relative;
  background: #050511;
  overflow-x: hidden;
}

/* Main background image */
.cyber-bg {
  position: fixed;
  inset: 0;
  z-index: -4;
  background:
    linear-gradient(rgba(5, 5, 17, 0.62), rgba(5, 5, 17, 0.78)),
    url("images/binary-bg.jpg") center center / cover no-repeat;
  filter: brightness(0.75) saturate(1.1);
}

/* Optional extra glow tint */
.cyber-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top left, rgba(255, 79, 216, 0.14), transparent 35%),
    radial-gradient(circle at bottom right, rgba(77, 252, 255, 0.1), transparent 35%),
    linear-gradient(180deg, rgba(138, 43, 226, 0.08), rgba(0, 0, 0, 0.18));
  pointer-events: none;
}

/* Moving binary numbers layer */
.binary-overlay {
  position: fixed;
  inset: 0;
  z-index: -3;
  overflow: hidden;
  pointer-events: none;
  opacity: 0.72;
}

/* Each number column */
.binary-column {
  position: absolute;
  top: -20%;
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: #c05cff;
  font-family: "Courier New", monospace;
  font-weight: bold;
  text-shadow:
    0 0 8px rgba(192, 92, 255, 0.9),
    0 0 18px rgba(192, 92, 255, 0.45);
  user-select: none;
  animation: floatBinary linear infinite;
  opacity: 0.7;
}

/* Individual digits */
.binary-column span {
  font-size: 1.3rem;
  display: block;
  line-height: 1;
  filter: blur(0.2px);
}

/* Slight variation classes */
.binary-column.small span {
  font-size: 0.8rem;
  opacity: 0.75;
}

.binary-column.large span {
  font-size: 2rem;
  opacity: 0.55;
  filter: blur(1px);
}

.binary-column.blur span {
  filter: blur(2px);
  opacity: 0.35;
}

@keyframes floatBinary {
  from {
    transform: translateY(0);
  }

  to {
    transform: translateY(130vh);
  }
}

/*stays above the background */
header,
main,
section,
footer,
nav,
.panel,
.dashboard,
.hero,
.portal-grid,
.expansion-section {
  position: relative;
  z-index: 2;
}
.nav-button {
  display: inline-block;
  background: linear-gradient(135deg, var(--cyan), var(--pink));
  color: #080812;
  padding: 11px 16px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: bold;
  transition: 0.3s;
}

.nav-button:hover,
.nav-button:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 0 22px rgba(77, 252, 255, 0.45);
  outline: 2px solid var(--gold);
  outline-offset: 4px;
}
body.panel-open {
  overflow: hidden;
}

.side-panel {
  z-index: 100;
}

.side-panel.active {
  right: 0;
}

.floating-menu {
  z-index: 90;
}

.modal-overlay {
  z-index: 200;
}

.case-terminal-modal {
  z-index: 300;
}
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
  box-shadow: 0 0 18px rgba(247, 200, 115, 0.45);
}
