@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Fira+Code:wght@400;500&display=swap');

html {
  scroll-behavior: smooth;
}

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

/* Glassmorphism Cards */
.glass-card {
  background-color: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(226, 232, 240, 0.5);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
}

.dark .glass-card {
  background-color: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(30, 41, 59, 0.4);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.3);
}

/* Custom Glow effect */
.glow-effect {
  position: relative;
}

.glow-effect::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -10;
  border-radius: 1rem;
  background-color: rgba(99, 102, 241, 0.15);
  filter: blur(24px);
  opacity: 0;
  transition: opacity 0.5s ease;
}

.dark .glow-effect::after {
  background-color: rgba(99, 102, 241, 0.08);
}

.glow-effect:hover::after {
  opacity: 1;
}

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

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

.dark ::-webkit-scrollbar-track {
  background: #020617;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 9999px;
  transition: background-color 0.2s;
}

.dark ::-webkit-scrollbar-thumb {
  background: #1e293b;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.dark ::-webkit-scrollbar-thumb:hover {
  background: #334155;
}

/* Cursor blink for typing effect */
.cursor-blink {
  animation: blink 0.8s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* Floating animation for blobs */
@keyframes float {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(30px, -30px) rotate(90deg); }
  50% { transform: translate(-20px, 20px) rotate(180deg); }
  75% { transform: translate(20px, 30px) rotate(270deg); }
}

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

/* Loader styling */
#loader-overlay {
  transition: opacity 0.5s ease-in-out;
}

/* Modal details fade-in */
.modal-fade-in {
  animation: modalFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Tooltip for github contribution graph */
.contrib-tooltip {
  position: relative;
}

.contrib-tooltip::before {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 10px;
  background-color: #0f172a;
  color: #fff;
  font-size: 11px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
  z-index: 50;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.contrib-tooltip:hover::before {
  opacity: 1;
  visibility: visible;
}

/* Scrollspy Active Classes */
.nav-active {
  color: rgb(79, 70, 229) !important; /* text-indigo-600 */
}
.dark .nav-active {
  color: rgb(129, 140, 248) !important; /* text-indigo-400 */
}

/* Dynamic Entrance Animations on Scroll */
.reveal-element {
  opacity: 0;
  transform: translateY(25px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-element.active {
  opacity: 1;
  transform: translateY(0);
}
