/* ==========================================================================
   HERO (HOME)
   ========================================================================== */
/* базовая видимость #home управляется из base.css (единая точка правды) */
#home {
  align-items: center; justify-content: center; text-align: center;
  padding: 90px 24px 60px;
  overflow: hidden;
}

.badge {
  position: relative;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 22px;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  backdrop-filter: blur(10px);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 12px; font-weight: 600; letter-spacing: 0.06em;
  margin-bottom: 36px;
  box-shadow: var(--glow-violet);
  overflow: hidden;
}
.badge::after {
  content: '';
  position: absolute; top: 0; bottom: 0; width: 40%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.18), transparent);
  animation: badgeSweep 4s ease-in-out infinite;
}
@keyframes badgeSweep {
  0%   { transform: translateX(-160%); }
  60%, 100% { transform: translateX(320%); }
}
.badge::before {
  content: '';
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 10px 2px var(--accent-2);
  animation: pulseDot 1.8s ease-in-out infinite;
}
@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .5; transform: scale(1.3); }
}

.hero-title {
  font-size: clamp(48px, 7vw, 88px);
  font-weight: 800; line-height: 1.05;
  margin-bottom: 18px; letter-spacing: -0.02em;
}
.hero-title .accent {
  background: var(--grad-neon);
  background-size: 200% auto;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 24px rgba(139, 92, 246, 0.4));
}
.hero-sub {
  font-size: clamp(24px, 3vw, 38px);
  font-weight: 700; margin-bottom: 28px;
  color: var(--text-dim);
}
.hero-desc {
  max-width: 620px; font-size: 17px; line-height: 1.6;
  color: var(--text-dim); margin: 0 auto 44px;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}
.hero-social {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 22px;
}

/* искорки на главной */
.sparkle {
  position: absolute; color: var(--accent-2);
  opacity: 0.5; pointer-events: none;
  animation: float 6s ease-in-out infinite;
  filter: drop-shadow(0 0 6px rgba(139, 92, 246, 0.6));
}
.sparkle:nth-child(1){ top: 18%; left: 10%; font-size: 24px; }
.sparkle:nth-child(2){ top: 30%; right: 12%; font-size: 18px; animation-delay: 1s; }
.sparkle:nth-child(3){ bottom: 25%; left: 14%; font-size: 22px; animation-delay: 2s; }
.sparkle:nth-child(4){ bottom: 18%; right: 16%; font-size: 28px; animation-delay: 3s; }
@keyframes float {
  0%,100% { transform: translateY(0) rotate(0deg); }
  50%     { transform: translateY(-14px) rotate(8deg); }
}

/* ===== ЗВЁЗДОЧКИ НА ФОНЕ PROJECTS / RESOURCES / HOME =====
   position: fixed — привязаны к окну, не к высоте страницы,
   поэтому видны всегда и не "прыгают" при фильтрации. */
.stars-bg {
  position: fixed; inset: 0;
  overflow: hidden; pointer-events: none; z-index: 0;
}
.stars-bg .star {
  position: absolute; color: var(--accent-2);
  opacity: 0; user-select: none;
  animation: starFloat linear infinite;
  filter: drop-shadow(0 0 4px rgba(139, 92, 246, 0.5));
}
@keyframes starFloat {
  0%   { transform: translateY(0)      rotate(0deg)   scale(1);   opacity: 0; }
  10%  { opacity: var(--star-opacity, 0.5); }
  90%  { opacity: var(--star-opacity, 0.5); }
  100% { transform: translateY(-120vh) rotate(360deg) scale(1.1); opacity: 0; }
}
#projects .container,
#resources .container { position: relative; z-index: 1; }

/* контент Home должен быть над звёздочками/авророй */
#home .badge,
#home .hero-title,
#home .hero-sub,
#home .hero-desc,
#home .hero-buttons,
#home .hero-social { position: relative; z-index: 1; }
