* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Space Grotesk', sans-serif;
  color: #ffffff;
  min-height: 100vh;
  background: #000;
  background-image: url('../images/backgrounds/starfield.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

/* --- LOGO (responsive + fixed vertical spacing) --- */
.site-logo {
  width: clamp(600px, 90vw, 1400px);
  max-width: 95%;
  display: block;
  margin: 0 auto 10px;
  filter: drop-shadow(0 0 22px rgba(150, 90, 255, 0.55));
  transition: opacity 0.8s ease-in;
}

/* --- COSMIC OVERLAY --- */
.cosmic-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at top center,
    rgba(181, 127, 255, 0.55) 0%,
    rgba(0, 0, 0, 0.2) 40%,
    rgba(0, 0, 0, 0.9) 100%);
  mix-blend-mode: screen;
  z-index: 0;
}

/* --- HEADER (tightened vertically) --- */
header {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 18px 20px 0;
  padding-top: 28px; /* nav bar clearance */
}

/* remove old h1 */
header h1 {
  display: none;
}

/* tagline (if used) */
header p {
  font-size: clamp(0.9rem, 1.6vw, 1.2rem);
  color: #e0e0ff;
  opacity: 0.9;
  margin: 4px 0 0;
}

.tagline {
  font-size: clamp(1rem, 1.8vw, 1.3rem);
  color: #e0e0ff;
  opacity: 0.9;
  margin-top: 6px;
  margin-bottom: 0;
  letter-spacing: 0.02rem;
}

/* --- MAIN CONTENT --- */
main {
  position: relative;
  z-index: 1;
}

/* --- PORTAL CONTAINER --- */
.portal-container {
  display: flex;
  justify-content: center;
  gap: 40px;
  padding: 20px 20px 60px;
  flex-wrap: wrap;
  margin-top: 10px;
}

/* --- PORTAL BOXES (entire box is link) --- */
.portal {
  width: 340px;
  height: 200px;
  border-radius: 18px;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  display: block;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

/* --- UNIVERSE (cyan glow) --- */
.portal-universe {
  background:
    linear-gradient(rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.55)),
    url('../images/portals/universe_bg.png');
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(0, 174, 239, 0.8);
  box-shadow:
    0 0 25px rgba(0, 174, 239, 0.6),
    0 0 45px rgba(0, 174, 239, 0.4);
}

.portal-universe:hover {
  transform: translateY(-4px);
  box-shadow:
    0 0 35px rgba(0, 174, 239, 0.9),
    0 0 60px rgba(0, 174, 239, 0.7);
}

/* --- AIVERSE (purple glow) --- */
.portal-aiverse {
  background:
    linear-gradient(rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.55)),
    url('../images/portals/aiverse_bg.png');
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(123, 97, 255, 0.85);
  box-shadow:
    0 0 25px rgba(123, 97, 255, 0.7),
    0 0 45px rgba(123, 97, 255, 0.5);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.portal-aiverse:hover {
  transform: translateY(-4px);
  box-shadow:
    0 0 35px rgba(123, 97, 255, 0.95),
    0 0 60px rgba(123, 97, 255, 0.75);
}

/* --- INNER CONTENT (centered heading) --- */
.portal-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.portal h2 {
  font-size: 1.6rem;
  letter-spacing: 0.12rem;
  color: #ffffff;
  text-shadow:
    0 0 12px rgba(255, 255, 255, 0.6),
    0 0 20px rgba(0, 0, 0, 0.9);
  margin: 0;
}

/* --- RESPONSIVE --- */
@media (max-width: 800px) {
  header {
    padding-top: 40px;
  }

  .portal-container {
    gap: 24px;
  }

  .portal {
    width: 90%;
    max-width: 360px;
  }
}

@media (max-width: 480px) {
  .site-logo {
    width: 75%;
  }

  header {
    padding-top: 30px;
  }
}