/* ==========================================================================
   KNApps.in - Modern Static Design System & Stylesheet
   ========================================================================== */

/* 1. CSS Custom Properties / Design Tokens */
:root {
  --bg-dark: #030712;
  --bg-card: rgba(15, 23, 42, 0.65);
  --color-primary: #6D5BFF;
  --color-[#6D5BFF]: #6D5BFF;
  --color-[#00E5FF]: #00E5FF;
  --color-[#A855F7]: #A855F7;
  --color-[#22C55E]: #22C55E;
  
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-heading: 'Outfit', sans-serif;

  --neon-glow-primary: 0 0 25px rgba(109, 91, 255, 0.45);
  --neon-glow-secondary: 0 0 25px rgba(0, 229, 255, 0.45);
  --neon-glow-accent: 0 0 25px rgba(168, 85, 247, 0.45);
}

/* 2. Global Reset & Base Typography */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-sans);
  background-color: var(--bg-dark);
  color: #f8fafc;
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6, .font-heading {
  font-family: var(--font-heading);
}

/* 3. Gradient Text Utilities */
.gradient-text-primary {
  background: linear-gradient(135deg, #00E5FF 0%, #A855F7 50%, #6D5BFF 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* 4. Glassmorphism Card System */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
  border-color: rgba(0, 229, 255, 0.35);
  box-shadow: 0 25px 50px rgba(0, 229, 255, 0.15);
}

.glow-border {
  position: relative;
}

.glow-border::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.3), rgba(168, 85, 247, 0.2), transparent);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* 5. Custom Shadow & Glow Utilities */
.shadow-neonPrimary {
  box-shadow: var(--neon-glow-primary);
}

.shadow-neonSecondary {
  box-shadow: var(--neon-glow-secondary);
}

.shadow-neonAccent {
  box-shadow: var(--neon-glow-accent);
}

/* 6. Header Glass State on Scroll */
header#navbar.scrolled {
  background-color: rgba(3, 7, 18, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

/* Nav Link Active State */
.nav-link.active {
  color: #00E5FF !important;
  background-color: rgba(0, 229, 255, 0.1);
  border: 1px solid rgba(0, 229, 255, 0.3);
}

/* 7. Keyframe Floating Animations */
@keyframes floating {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
  100% {
    transform: translateY(0px);
  }
}

@keyframes floatingDelayed {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(10px);
  }
  100% {
    transform: translateY(0px);
  }
}

.floating-anim {
  animation: floating 4s ease-in-out infinite;
}

.floating-anim-delayed {
  animation: floatingDelayed 5s ease-in-out infinite;
}

/* 8. Project Category Filter Tabs */
.project-tab {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
}

.project-tab.active {
  background: linear-gradient(135deg, #6D5BFF, #00E5FF);
  color: #ffffff !important;
  border-color: transparent;
  box-shadow: var(--neon-glow-secondary);
}

.project-card {
  display: block;
  opacity: 1;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.project-card.hidden {
  display: none !important;
  opacity: 0;
  transform: scale(0.95);
}

/* 9. Custom Scrollbar Styling */
::-webkit-scrollbar {
  width: 10px;
}

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

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 5px;
  border: 2px solid #030712;
}

::-webkit-scrollbar-thumb:hover {
  background: #00E5FF;
}

/* 10. Toast Notifications */
.toast-msg {
  pointer-events: auto;
  animation: slideInRight 0.3s ease forwards;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
