/* ========================
   Base Styles
   ======================== */
html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', sans-serif;
}

/* ========================
   Scrollbar
   ======================== */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #6366f1;
  border-radius: 4px;
}

/* ========================
   Selection
   ======================== */
::selection {
  background-color: rgba(99, 102, 241, 0.5);
  color: white;
}

/* ========================
   Gradient Text
   ======================== */
.gradient-text {
  background: linear-gradient(135deg, #6366f1, #ec4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ========================
   Glass Effect
   ======================== */
.glass {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ========================
   Glow Effects
   ======================== */
.glow {
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.3), 0 0 60px rgba(99, 102, 241, 0.1);
}

.glow-hover:hover {
  box-shadow: 0 0 30px rgba(99, 102, 241, 0.4), 0 0 80px rgba(99, 102, 241, 0.15);
}

/* ========================
   Animated Gradient BG
   ======================== */
@keyframes gradient-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.animate-gradient {
  background-size: 200% 200%;
  animation: gradient-shift 8s ease infinite;
}

/* ========================
   Navbar
   ======================== */
#navbar {
  animation: slideDown 0.6s ease-out forwards;
}

@keyframes slideDown {
  from { transform: translateY(-100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

#navbar.navbar-scrolled {
  background-color: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
}

html.dark #navbar.navbar-scrolled {
  background-color: rgba(15, 23, 42, 0.8);
  box-shadow: 0 10px 15px -3px rgba(99, 102, 241, 0.05);
}

/* ========================
   Mobile Menu
   ======================== */
#mobile-menu {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.3s ease, opacity 0.3s ease;
}

#mobile-menu.open {
  max-height: 500px;
  opacity: 1;
}

/* ========================
   Scroll Reveal Animations
   ======================== */
.animate-on-scroll {
  opacity: 0;
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.animate-on-scroll[data-animation="fade-up"],
.animate-on-scroll:not([data-animation]) {
  transform: translateY(40px);
}

.animate-on-scroll[data-animation="fade-left"] {
  transform: translateX(-50px);
}

.animate-on-scroll[data-animation="fade-right"] {
  transform: translateX(50px);
}

.animate-on-scroll[data-animation="scale"] {
  transform: scale(0.9);
}

.animate-on-scroll[data-animation="fade-down"] {
  transform: translateY(-40px);
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0) translateX(0) scale(1);
}

/* Stagger delays */
.animate-on-scroll[data-delay="1"] { transition-delay: 0.05s; }
.animate-on-scroll[data-delay="2"] { transition-delay: 0.1s; }
.animate-on-scroll[data-delay="3"] { transition-delay: 0.15s; }
.animate-on-scroll[data-delay="4"] { transition-delay: 0.2s; }
.animate-on-scroll[data-delay="5"] { transition-delay: 0.25s; }
.animate-on-scroll[data-delay="6"] { transition-delay: 0.3s; }
.animate-on-scroll[data-delay="7"] { transition-delay: 0.35s; }
.animate-on-scroll[data-delay="8"] { transition-delay: 0.4s; }
.animate-on-scroll[data-delay="9"] { transition-delay: 0.45s; }
.animate-on-scroll[data-delay="10"] { transition-delay: 0.5s; }
.animate-on-scroll[data-delay="11"] { transition-delay: 0.55s; }
.animate-on-scroll[data-delay="12"] { transition-delay: 0.6s; }
.animate-on-scroll[data-delay="13"] { transition-delay: 0.65s; }
.animate-on-scroll[data-delay="14"] { transition-delay: 0.7s; }
.animate-on-scroll[data-delay="15"] { transition-delay: 0.75s; }
.animate-on-scroll[data-delay="16"] { transition-delay: 0.8s; }
.animate-on-scroll[data-delay="17"] { transition-delay: 0.85s; }
.animate-on-scroll[data-delay="18"] { transition-delay: 0.9s; }

/* ========================
   Float Animation
   ======================== */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.animate-float {
  animation: float 3s ease-in-out infinite;
}

.animate-float-delayed {
  animation: float 4s ease-in-out infinite 1s;
}

/* ========================
   Typing Cursor Blink
   ======================== */
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.animate-blink {
  animation: blink 0.8s step-end infinite;
}

/* ========================
   Particle Float
   ======================== */
@keyframes particleFloat {
  0%, 100% {
    transform: translateY(0) translateX(0);
    opacity: 0.2;
  }
  50% {
    transform: translateY(-30px) translateX(10px);
    opacity: 0.8;
  }
}

/* ========================
   Bounce (scroll indicator)
   ======================== */
@keyframes bounce-slow {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

.animate-bounce-slow {
  animation: bounce-slow 1.5s ease-in-out infinite;
}

/* ========================
   Timeline
   ======================== */
.timeline-line {
  height: 0;
  transition: height 1.5s ease-out;
}

.timeline-line.visible {
  height: 100%;
}

.timeline-dot {
  transform: scale(0);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.timeline-dot.visible {
  transform: scale(1);
}

/* ========================
   Skill Card Hover
   ======================== */
.skill-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.skill-card:hover {
  transform: translateY(-10px) scale(1.05);
}

.skill-card .skill-glow {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.skill-card:hover .skill-glow {
  opacity: 1;
}

/* ========================
   Project Card
   ======================== */
.project-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.project-card:hover {
  transform: translateY(-8px);
}

.project-card .project-overlay {
  opacity: 0;
  background-color: rgba(0, 0, 0, 0);
  transition: all 0.3s ease;
}

.project-card:hover .project-overlay {
  opacity: 1;
  background-color: rgba(0, 0, 0, 0.3);
}

/* ========================
   Scrollbar Hide (carousel)
   ======================== */
.scrollbar-hide::-webkit-scrollbar {
  display: none;
}

.scrollbar-hide {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* ========================
   Hero initial animations
   ======================== */
.hero-animate {
  opacity: 0;
  transform: translateY(20px);
  animation: heroFadeIn 0.7s ease-out forwards;
}

.hero-animate[data-hero-delay="1"] { animation-delay: 0.2s; }
.hero-animate[data-hero-delay="2"] { animation-delay: 0.4s; }
.hero-animate[data-hero-delay="3"] { animation-delay: 0.6s; }
.hero-animate[data-hero-delay="4"] { animation-delay: 0.8s; }
.hero-animate[data-hero-delay="5"] { animation-delay: 1.0s; }
.hero-animate[data-hero-delay="6"] { animation-delay: 1.2s; }
.hero-animate[data-hero-delay="7"] { animation-delay: 1.5s; }

@keyframes heroFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========================
   Social link hover
   ======================== */
.social-link {
  transition: transform 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.social-link:hover {
  transform: scale(1.1) translateY(-2px);
}

/* ========================
   Button hover scale
   ======================== */
.btn-scale {
  transition: transform 0.2s ease, box-shadow 0.3s ease;
}

.btn-scale:hover {
  transform: scale(1.05);
}

.btn-scale:active {
  transform: scale(0.95);
}

/* ========================
   Experience card hover
   ======================== */
.exp-card {
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.exp-card:hover {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}
