* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scrollbar-color: #4f46e5 #1a1a24;
}

body {
  font-family: 'Inter', sans-serif;
  background: #0a0a0f;
  color: #e2e8f0;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

::selection {
  background: rgba(99, 102, 241, 0.3);
  color: #e2e8f0;
}

.font-display {
  font-family: 'Space Grotesk', sans-serif;
}

.font-mono {
  font-family: 'JetBrains Mono', monospace;
}

/* ============================
   Animations
   ============================ */

/* Gradient Shift */
@keyframes gradient-shift {

  0%,
  100% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }
}

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

/* Fade In Up */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeInUp 0.8s ease-out forwards;
}

/* Scroll-triggered animation: elements start hidden */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-on-scroll.fade-in {
  opacity: 1;
  transform: translateY(0);
}

/* Floating Animation */
@keyframes float {

  0%,
  100% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-10px);
  }
}

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

/* Page Load */
@keyframes pageLoad {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.page-content {
  animation: pageLoad 0.6s ease-out;
}

/* Pulse glow for availability dot */
@keyframes pulseGlow {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5);
  }

  50% {
    box-shadow: 0 0 0 6px rgba(34, 197, 94, 0);
  }
}

.pulse-glow {
  animation: pulseGlow 2s ease-in-out infinite;
}

/* Fade In (for project filter) */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.project-card {
  transition: all 0.3s ease;
}

.filter-btn.active {
  background: rgba(99, 102, 241, 0.1);
  border-color: #6366f1;
  color: #818cf8;
}

/* ============================
   Components
   ============================ */

/* Card Hover Effects */
.card-hover {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.3);
}

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

/* Smooth Transitions on interactive elements */
a,
button {
  transition: all 0.3s ease;
  cursor: pointer;
}

/* ============================
   Scrollbar
   ============================ */

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #1a1a24;
}

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

::-webkit-scrollbar-thumb:hover {
  background: #6366f1;
}

/* ============================
   Backgrounds
   ============================ */

.mesh-gradient {
  background:
    radial-gradient(at 27% 37%, hsla(215, 98%, 61%, 0.15) 0px, transparent 50%),
    radial-gradient(at 97% 21%, hsla(125, 98%, 72%, 0.1) 0px, transparent 50%),
    radial-gradient(at 52% 99%, hsla(354, 98%, 61%, 0.1) 0px, transparent 50%),
    radial-gradient(at 10% 29%, hsla(256, 96%, 67%, 0.15) 0px, transparent 50%),
    radial-gradient(at 97% 96%, hsla(38, 60%, 74%, 0.1) 0px, transparent 50%),
    radial-gradient(at 33% 50%, hsla(222, 67%, 73%, 0.15) 0px, transparent 50%),
    radial-gradient(at 79% 53%, hsla(343, 68%, 79%, 0.1) 0px, transparent 50%);
}

/* ============================
   Tech Stack Icons
   ============================ */

.tech-icon {
  position: relative;
  overflow: hidden;
}

.tech-icon::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.15), transparent);
  transition: left 0.5s;
}

.tech-icon:hover::before {
  left: 100%;
}

/* ============================
   Utility Classes
   ============================ */

.section-padding {
  padding: 6rem 0;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ============================
   Buttons
   ============================ */

.btn-primary {
  background: #4f46e5;
  color: white;
  padding: 1rem 2rem;
  border-radius: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  font-size: 1rem;
}

.btn-primary:hover {
  background: #4338ca;
  box-shadow: 0 15px 40px rgba(99, 102, 241, 0.5);
  transform: translateY(-2px);
}

.btn-secondary {
  border: 2px solid #334155;
  color: white;
  padding: 1rem 2rem;
  border-radius: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  cursor: pointer;
  background: transparent;
  font-size: 1rem;
}

.btn-secondary:hover {
  border-color: #4f46e5;
  background: rgba(79, 70, 229, 0.1);
  transform: translateY(-2px);
}

/* ============================
   Form Elements
   ============================ */

input,
textarea {
  font-family: 'Inter', sans-serif;
  color: #e2e8f0;
  font-size: 1rem;
}

input::placeholder,
textarea::placeholder {
  color: #64748b;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: #6366f1 !important;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

/* ============================
   Responsive Fixes
   ============================ */

@media (max-width: 768px) {
  .footer-social {
    justify-content: center !important;
  }

  h1 {
    word-break: break-word;
  }
}

/* Fix for code snippet overflow on small screens */
pre {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}