/* ---------- Base polish ---------- */
::selection { background: #5B5FEF; color: #fff; }
html { scroll-padding-top: 90px; }
body { overflow-x: hidden; }

/* ---------- Loading screen ---------- */
#loading-screen { transition: opacity .5s ease, visibility .5s ease; }
#loading-screen.hide { opacity: 0; visibility: hidden; pointer-events: none; }
#loop-path { stroke-dasharray: 300; stroke-dashoffset: 300; animation: draw 1.4s ease forwards infinite; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ---------- Hero background: animated aurora gradient + particles ---------- */
.hero-bg {
  position: absolute; inset: 0; overflow: hidden; background: #0B0F1A;
}
.hero-bg::before, .hero-bg::after {
  content: ""; position: absolute; border-radius: 50%; filter: blur(90px); opacity: .55;
  animation: float-blob 16s ease-in-out infinite;
}
.hero-bg::before {
  width: 520px; height: 520px; background: #5B5FEF; top: -120px; left: -100px;
}
.hero-bg::after {
  width: 460px; height: 460px; background: #14C8B4; bottom: -140px; right: -80px;
  animation-delay: -8s;
}
@keyframes float-blob {
  0%, 100% { transform: translate(0,0) scale(1); }
  50% { transform: translate(40px,-30px) scale(1.12); }
}
.hero-grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black, transparent 90%);
}
#particles { position: absolute; inset: 0; }

/* ---------- Glassmorphism ---------- */
.glass {
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.12);
}
.glass-light {
  background: rgba(255,255,255,0.65);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(11,15,26,0.06);
}

/* ---------- Signature infinity-loop divider ---------- */
.loop-divider { height: 40px; opacity: .5; }

/* ---------- Cards ---------- */
.tilt-card { transition: transform .35s ease, box-shadow .35s ease; }
.tilt-card:hover { transform: translateY(-6px); box-shadow: 0 20px 50px -20px rgba(91,95,239,.35); }

.gradient-text {
  background: linear-gradient(90deg, #5B5FEF, #14C8B4);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- Marquee for tech stack ---------- */
.marquee-track { display: flex; width: max-content; animation: marquee 30s linear infinite; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.marquee-track:hover { animation-play-state: paused; }

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #F7F8FB; }
::-webkit-scrollbar-thumb { background: linear-gradient(#5B5FEF,#14C8B4); border-radius: 10px; }

/* ---------- Dark mode ---------- */
html.dark body { background:#0B0F1A; color: #E7E9F5; }
html.dark .bg-paper { background:#0B0F1A; }
html.dark .text-ink { color:#E7E9F5; }
html.dark .text-ink-700 { color:#B8BCD6; }
html.dark .bg-white { background:#121729 !important; }
html.dark .border-ink\/5 { border-color: rgba(255,255,255,.08) !important; }

/* ---------- Utility ---------- */
.section-pad { padding-top: 6rem; padding-bottom: 6rem; }
@media (max-width: 640px) { .section-pad { padding-top: 3.5rem; padding-bottom: 3.5rem; } }
