/* Constellation-style layout - Dark theme for all pages */
body {
  position: relative;
  background:
    radial-gradient(ellipse at center, rgba(15, 23, 42, 0.5) 0%, rgba(10, 10, 10, 0.9) 50%, #000000 100%),
    linear-gradient(to bottom right, #000000, #0a0a0a, #000000) !important;
  background-attachment: scroll !important;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Multi-colored grid mesh with sporadic color accents */
body::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  min-height: 100vh;
  background-image:
    /* Mostly purple/indigo grid */
    linear-gradient(rgba(99, 102, 241, 0.4) 1px, transparent 1px),
    linear-gradient(90deg, rgba(139, 92, 246, 0.35) 1px, transparent 1px),
    linear-gradient(45deg, rgba(168, 85, 247, 0.25) 1px, transparent 1px),
    /* Occasional cyan accent line */
    linear-gradient(rgba(6, 182, 212, 0.5) 1px, transparent 1px),
    /* Occasional blue accent line */
    linear-gradient(-45deg, rgba(59, 130, 246, 0.4) 1px, transparent 1px),
    /* Occasional green-cyan accent */
    linear-gradient(90deg, rgba(16, 185, 129, 0.3) 1px, transparent 1px);
  background-size:
    60px 60px,
    60px 60px,
    80px 80px,
    240px 240px,  /* sparse cyan */
    180px 180px,  /* sparse blue */
    300px 300px;  /* very sparse green */
  opacity: 1;
  pointer-events: none;
  z-index: 0;
  /* Gradual fade with larger void areas */
  mask-image:
    radial-gradient(ellipse 600px 500px at 35% 40%, black 5%, rgba(0,0,0,0.7) 20%, rgba(0,0,0,0.3) 40%, transparent 60%),
    radial-gradient(circle 300px at 70% 25%, black 0%, rgba(0,0,0,0.5) 30%, transparent 50%),
    radial-gradient(circle 250px at 20% 75%, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.2) 35%, transparent 55%),
    radial-gradient(circle 200px at 85% 70%, rgba(0,0,0,0.4) 0%, transparent 45%);
  -webkit-mask-image:
    radial-gradient(ellipse 600px 500px at 35% 40%, black 5%, rgba(0,0,0,0.7) 20%, rgba(0,0,0,0.3) 40%, transparent 60%),
    radial-gradient(circle 300px at 70% 25%, black 0%, rgba(0,0,0,0.5) 30%, transparent 50%),
    radial-gradient(circle 250px at 20% 75%, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.2) 35%, transparent 55%),
    radial-gradient(circle 200px at 85% 70%, rgba(0,0,0,0.4) 0%, transparent 45%);
  mask-composite: add;
  -webkit-mask-composite: source-over;
}

/* Highlighted grid intersection points with glow */
body::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  min-height: 100vh;
  background:
    /* Bright focal point */
    radial-gradient(circle at 40% 35%, rgba(139, 92, 246, 0.4) 0%, rgba(139, 92, 246, 0.2) 5%, transparent 15%),
    /* Secondary glow points */
    radial-gradient(circle at 60% 50%, rgba(59, 130, 246, 0.3) 0%, rgba(59, 130, 246, 0.15) 5%, transparent 12%),
    radial-gradient(circle at 30% 60%, rgba(168, 85, 247, 0.25) 0%, rgba(168, 85, 247, 0.12) 5%, transparent 10%),
    radial-gradient(circle at 70% 30%, rgba(99, 102, 241, 0.2) 0%, rgba(99, 102, 241, 0.1) 5%, transparent 8%);
  pointer-events: none;
  z-index: 1;
  animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* Content layer above background */
#__next,
main,
article {
  position: relative;
  z-index: 2;
}

/* Enhance text contrast on dark background */
body h1, body h2, body h3 {
  color: #ffffff !important;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

body p, body li {
  color: #e2e8f0 !important;
}

body a {
  color: #818cf8 !important;
}
