html {
  scroll-behavior: smooth;
}


/* Fade-in for section entrance */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.8s ease-out;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Light-following cursor */
#light::before {
  content: '';
  position: fixed;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(255,255,255,0.12) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: top 0.1s ease, left 0.1s ease;
}

/* Active nav link styling */
.nav-link.active {
  color: white;
  font-weight: 700;
}

.nav-link.active .nav-line {
  background-color: white;
  width: 32px;
}
/* Add to your <style> */
.nav-link {
  position: relative;
}

.nav-link .nav-line {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 6px;
  background-color: #6b7280; /* gray-600 */
  transition: width 0.3s ease, background-color 0.3s ease;
}

.nav-link.active .nav-line {
  width: 100%; /* full width behind the text */
  background-color: #ffffff;
}

.nav-link span {
  transition: color 0.3s ease;
}

.nav-link.active span {
  color: #ffffff; /* highlights the text */
}
/* ---- Cursor Glow ---- */
#light {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(circle at var(--x, 50%) var(--y, 50%),
    rgba(255, 255, 255, 0.05), transparent 80%);
  transition: background 0.1s ease;
}

/* ---- Sidebar Link Highlight ---- */
.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  letter-spacing: 0.05em;
}

.nav-link .nav-line {
  position: absolute;
  left: 0;
  bottom: -2px;
  height: 1px;
  width: 0;
  background-color: #94a3b8; /* slate-400 */
  transition: width 0.4s ease, background-color 0.4s ease;
}

.nav-link.active .nav-line {
  width: 100%;
  background-color: #ffffff;
}

.nav-link span {
  transition: color 0.3s ease;
}

.nav-link.active span {
  color: #ffffff;
}
