body {
  margin: 0;
  overflow: hidden; /* Hide scrollbars */
  background-color: #000; /* Dark background for the sky */
}

#starfieldCanvas {
  display: block; /* Remove extra space below canvas */
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1; /* Place stars below the horizon if desired */
}

.home-btn{
  position: absolute;
  bottom: 25%;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  z-index: 6; /* furthest forward to ensure visibility */
}

.button-group {
  position: absolute;
  bottom: 30%;
  /* slightly below horizon (40% - this = gap) */
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  z-index: 5;
  /* above the ground, below stars if desired */
}

.home-btn button {
  font-weight: bold;
  font-size: 1.4rem;
  letter-spacing: 1px;
  padding: 1rem 2rem;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  box-shadow: 0 0 25px rgba(255, 255, 255, 0.4);
  transition: 0.3s ease;
}

.button-group button {
  width: 90px;
  height: 40px;
  border: none;
  border-radius: 10px;
  background: radial-gradient(ellipse at top, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.05) 60%);
  border-top: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  font-size: 1rem;
  cursor: pointer;
  transition: 0.3s;
}

/* Enlarging hover for variation */
.home-btn button:hover {
  box-shadow: 0 0 35px rgba(255, 255, 255, 0.8);
  transform: scale(1.05);
}

/* Simple hover glow for style */
.button-group button:hover {
  background: rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.6);
}

/* U shape curve using transformations */
.button-group button:nth-child(1) {
  transform: translateX(-140px) translateY(80px);
}

.button-group button:nth-child(2) {
  transform: translateX(-70px) translateY(135px);
}

.button-group button:nth-child(3) {
  transform: translateY(165px);
}

.button-group button:nth-child(4) {
  transform: translateX(70px) translateY(135px);
}

.button-group button:nth-child(5) {
  transform: translateX(140px) translateY(80px);
}

/* --- Horizon line (the glowing edge) --- */
.horizon-line {
  position: absolute;
  bottom: 40%;
  /* raise the line upward */
  left: 0;
  width: 100%;
  height: 2px;
  /* thickness of the actual hard line */
  background: white;
  /* main line color */
  z-index: 3;
  /* Creates the glow only above the line */
  box-shadow: 0 -10px 30px 20px rgba(255, 255, 255, 0.5);
  background: linear-gradient(to top, #fff 60%, #ccc 100%);
  overflow: visible;
}

/* Glow gradient */
.horizon-line::before {
  content: '';
  position: absolute;
  top: -140px;
  /* how far the glow extends upward */
  left: 0;
  width: 100%;
  height: 140px;
  background: linear-gradient(to top, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0));
  pointer-events: none;
  z-index: 2;
}

/* --- Ground (solid black area below the line) --- */
.ground {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 40%;
  /* matches the horizon-line’s bottom offset */
  background-color: #000;
  /* solid black, hides stars beneath */
  z-index: 2;
  /* sits below the horizon-line but above the stars */
}

.twinkle-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  /* Let clicks pass through */
  overflow: hidden;
}

/* Each star is just a glowing dot */
.twinkle-layer::before,
.twinkle-layer::after,
.twinkle-layer span {
  position: absolute;
  content: '';
  width: 1px;
  height: 1px;
  border-radius: 50%;
  background: white;
  opacity: 0.7;
  filter: blur(0.5px);
  animation: twinkle 3s infinite ease-in-out;
}

/* Randomize their twinkle timings */
.twinkle-layer span:nth-child(odd) {
  animation-delay: calc(-1s * var(--delay, 0));
  animation-duration: calc(5s + (var(--speed, 1) * 2s));
  opacity: 0.5;
}

@keyframes twinkle {

  0%,
  100% {
    opacity: 0.1;
    transform: scale(1);
  }

  40% {
    opacity: 1;
    transform: scale(1.5);
  }

  60% {
    opacity: 0.4;
    transform: scale(1.2);
  }
}

/* =========================
   LIGHTBALL
========================= */
#lightball {
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%) scale(0.3); /* start small = far away */
  width: 16px;
  height: 16px;
  border-radius: 50%;
  z-index: 1;

  /* glow */
  box-shadow: 0 0 10px currentColor,
              0 0 20px currentColor,
              0 0 40px currentColor;
}

/* visible state */
.visible {
  opacity: 1;
}

.hidden {
  opacity: 0;
  pointer-events: none;
}

/* pulsing aura */
.visible::after {
  content: '';
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  background: radial-gradient(circle, currentColor 0%, transparent 70%);
  opacity: 0.6;
  animation: pulse 1.2s infinite ease-in-out;
}

@keyframes pulse {
  0%   { transform: scale(0.8); opacity: 0.6; }
  50%  { transform: scale(1.3); opacity: 0.3; }
  100% { transform: scale(0.8); opacity: 0.6; }
}

.dropStar {
  animation: dropStar 3s forwards ease-in;
}

@keyframes dropStar {
  0% {
    top: -30px;
    transform: translateX(-50%) scale(0.8);
  }
  100% {
    transform: translateX(-50%) scale(0.2);
  }
}

/* =========================
   EXPLOSION FILL
========================= */
#color-fill {
  position: absolute;
  top: 60%;
  left: 50%;
  width: 20px;
  height: 20px;
  transform: translate(-50%, -50%) scale(0);
  border-radius: 50%;
  z-index: 1;
  pointer-events: none;
}

/* true radial explosion */
.fillExpand {
  animation: explodeFill 1s forwards ease-out;
}

@keyframes explodeFill {
  0% {
    transform: translate(-50%, -50%) scale(0.1);
    border-radius: 50%;
  }

  100% {
    transform: translate(-50%, -50%) scale(125);
    border-radius: 50%;
  }
}

/* =========================
   BUTTON ANIMATION
========================= */
.animate {
  animation: flyUp 2s forwards ease-in-out;
}

@keyframes flyUp {
  to {
    transform: translateY(-150vh);
    opacity: 0;
  }
}

/* =========================
   HORIZON DROP
========================= */
.horizon-drop {
  animation: horizonDrop 3s forwards ease-in-out;
}

@keyframes horizonDrop {
  to { bottom: 20%; }
}

.ground-drop {
  animation: groundDrop 3s forwards ease-in-out;
}

@keyframes groundDrop {
  to { height: 20%; }
}

/* =========================
   FIX FOOTER
========================= */
footer {
  position: fixed;
  bottom: 10px;
  width: 100%;
  text-align: center;
  color: white;
  z-index: 20;
}

/* =========================
   HTML CONTENT VISIBILITY
========================= */
.content {
  opacity: 0;
}

.content-visible {
  opacity: 1;
}

/* =========================
   SECTIONS CONTENT
========================= */
.home-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: white;
  font-size: 3rem;
  z-index: 4;
}

.about-section {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: white;
  font-size: 2rem;
  z-index: 4;
}

.projects-section {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: white;
  font-size: 2rem;
  z-index: 4;
}

.resume-section {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: white;
  font-size: 2rem;
  z-index: 4;
}

.blog-section {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: white;
  font-size: 2rem;
  z-index: 4;
}

.contact-section {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: black;
  font-size: 2rem;
  z-index: 4;
}

/* =========================
   MENU LOWERING
========================= */
/* Second set of buttons for menu lowering */
.menu.lowered .button-group button:nth-child(1) {
  transform: translateX(-140px) translateY(180px);
  transition: transform 3s ease;
}

.menu.lowered .button-group button:nth-child(2) {
  transform: translateX(-70px) translateY(180px);
  transition: transform 3s ease;
}

.menu.lowered .button-group button:nth-child(3) {
  transform: translateY(180px);
  transition: transform 3s ease;
}

.menu.lowered .button-group button:nth-child(4) {
  transform: translateX(70px) translateY(180px);
  transition: transform 3s ease;
}

.menu.lowered .button-group button:nth-child(5) {
  transform: translateX(140px) translateY(180px);
  transition: transform 3s ease;
}

