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

::selection {
  background: rgba(59, 130, 246, 0.3);
  color: #93c5fd;
}

::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: #000;
}
::-webkit-scrollbar-thumb {
  background: rgba(59, 130, 246, 0.4);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(59, 130, 246, 0.6);
}

body {
  background: #000000;
  color: #ffffff;
  font-family: "Inter", sans-serif;
  overflow-x: hidden;
}

/* ===== NOISE TEXTURE ===== */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  opacity: 0.04;
  z-index: 50;
  pointer-events: none;
}

/* ===== PARTICLES CANVAS ===== */
#particles-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ===== GLASSMORPHISM ===== */
.glass {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.glass-strong {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* ===== GRADIENT TEXT ===== */
.gradient-text {
  background: linear-gradient(135deg, #60a5fa, #a78bfa, #22d3ee, #60a5fa);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 6s ease infinite;
}

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

/* ===== GLOWING BORDER ===== */
.glow-border {
  position: relative;
  border-radius: 9999px;
  overflow: visible;
}

.glow-border::before {
  content: "";
  position: absolute;
  top: -3px;
  left: -3px;
  right: -3px;
  bottom: -3px;
  border-radius: 9999px;
  background: conic-gradient(from 0deg, #3b82f6, #8b5cf6, #06b6d4, #3b82f6);
  animation: glowSpin 4s linear infinite;
  z-index: -1;
}

.glow-border::after {
  content: "";
  position: absolute;
  top: -3px;
  left: -3px;
  right: -3px;
  bottom: -3px;
  border-radius: 9999px;
  background: conic-gradient(from 0deg, #3b82f6, #8b5cf6, #06b6d4, #3b82f6);
  animation: glowSpin 4s linear infinite;
  filter: blur(16px);
  opacity: 0.5;
  z-index: -2;
}

@keyframes glowSpin {
  to {
    transform: rotate(360deg);
  }
}

/* ===== FLOATING ANIMATION ===== */
@keyframes float {
  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
  }
  33% {
    transform: translateY(-12px) rotate(1deg);
  }
  66% {
    transform: translateY(6px) rotate(-1deg);
  }
}

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

/* ===== TYPING CURSOR ===== */
.typing-cursor {
  display: inline-block;
  width: 3px;
  height: 1.1em;
  background: linear-gradient(to bottom, #60a5fa, #a78bfa);
  margin-left: 4px;
  vertical-align: text-bottom;
  animation: blink 0.8s step-end infinite;
}

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

/* ===== SCROLL REVEAL ===== */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-60px);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(60px);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-right.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.85);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-scale.visible {
  opacity: 1;
  transform: scale(1);
}

/* ===== PROGRESS BAR ANIMATION ===== */
.progress-fill {
  width: 0%;
  transition: width 1.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.progress-fill.animated {
  /* width set via inline style */
}

/* ===== CARD HOVER ===== */
.hover-lift {
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.hover-lift:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 60px -15px rgba(59, 130, 246, 0.15);
}

.hover-glow:hover {
  box-shadow:
    0 0 30px rgba(59, 130, 246, 0.15),
    0 0 60px rgba(139, 92, 246, 0.08);
}

/* ===== BUTTON GLOW ===== */
.btn-glow {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.btn-glow::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.15),
    transparent
  );
  transition: left 0.5s ease;
}

.btn-glow:hover::before {
  left: 100%;
}

.btn-glow:hover {
  box-shadow:
    0 0 25px rgba(59, 130, 246, 0.4),
    0 0 50px rgba(139, 92, 246, 0.2);
  transform: translateY(-2px);
}

/* ===== INPUT GLOW ===== */
.input-glow {
  transition: all 0.3s ease;
}

.input-glow:focus {
  box-shadow:
    0 0 0 2px rgba(59, 130, 246, 0.3),
    0 0 20px rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.5);
}

/* ===== MOBILE MENU ===== */
.mobile-menu {
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-menu.open {
  transform: translateX(0);
}

/* ===== HAMBURGER ===== */
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  transition: all 0.3s ease;
  border-radius: 2px;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ===== ABSTRACT SHAPES ===== */
@keyframes morphBlob {
  0%,
  100% {
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
  }
  25% {
    border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
  }
  50% {
    border-radius: 50% 60% 30% 60% / 30% 50% 70% 60%;
  }
  75% {
    border-radius: 60% 30% 50% 40% / 70% 40% 50% 60%;
  }
}

.morph-blob {
  animation: morphBlob 8s ease-in-out infinite;
}

/* ===== STATS COUNTER ===== */
@keyframes countPulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

/* ===== PROJECT IMAGE OVERLAY ===== */
.project-overlay {
  opacity: 0;
  transition: opacity 0.4s ease;
}

.project-card:hover .project-overlay {
  opacity: 1;
}

.project-card:hover .project-img {
  transform: scale(1.08);
}

.project-img {
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ===== SECTION DIVIDER ===== */
.section-glow {
  position: relative;
}

.section-glow::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(59, 130, 246, 0.3),
    rgba(139, 92, 246, 0.3),
    transparent
  );
}

/* ===== SKILL ICON GLOW ===== */
.skill-icon-wrap {
  transition: all 0.3s ease;
}

.skill-card:hover .skill-icon-wrap {
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
}

/* ===== TOAST ===== */
.toast {
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* ===== BACKGROUND GRADIENT BLOBS ===== */
.bg-blob-1 {
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(
    circle,
    rgba(59, 130, 246, 0.08),
    transparent 70%
  );
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
}

.bg-blob-2 {
  position: absolute;
  width: 500px;
  height: 500px;
  background: radial-gradient(
    circle,
    rgba(139, 92, 246, 0.06),
    transparent 70%
  );
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
}

.bg-blob-3 {
  position: absolute;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.06), transparent 70%);
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
}

/* ===== STAGGER CHILDREN ===== */
.stagger-children > * {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.stagger-children.visible > *:nth-child(1) {
  transition-delay: 0.05s;
  opacity: 1;
  transform: translateY(0);
}
.stagger-children.visible > *:nth-child(2) {
  transition-delay: 0.1s;
  opacity: 1;
  transform: translateY(0);
}
.stagger-children.visible > *:nth-child(3) {
  transition-delay: 0.15s;
  opacity: 1;
  transform: translateY(0);
}
.stagger-children.visible > *:nth-child(4) {
  transition-delay: 0.2s;
  opacity: 1;
  transform: translateY(0);
}
.stagger-children.visible > *:nth-child(5) {
  transition-delay: 0.25s;
  opacity: 1;
  transform: translateY(0);
}
.stagger-children.visible > *:nth-child(6) {
  transition-delay: 0.3s;
  opacity: 1;
  transform: translateY(0);
}
.stagger-children.visible > *:nth-child(7) {
  transition-delay: 0.35s;
  opacity: 1;
  transform: translateY(0);
}
.stagger-children.visible > *:nth-child(8) {
  transition-delay: 0.4s;
  opacity: 1;
  transform: translateY(0);
}
.stagger-children.visible > *:nth-child(9) {
  transition-delay: 0.45s;
  opacity: 1;
  transform: translateY(0);
}
.stagger-children.visible > *:nth-child(10) {
  transition-delay: 0.5s;
  opacity: 1;
  transform: translateY(0);
}
.stagger-children.visible > *:nth-child(11) {
  transition-delay: 0.55s;
  opacity: 1;
  transform: translateY(0);
}
.stagger-children.visible > *:nth-child(12) {
  transition-delay: 0.6s;
  opacity: 1;
  transform: translateY(0);
}
.stagger-children.visible > *:nth-child(13) {
  transition-delay: 0.65s;
  opacity: 1;
  transform: translateY(0);
}
.stagger-children.visible > *:nth-child(14) {
  transition-delay: 0.7s;
  opacity: 1;
  transform: translateY(0);
}
.stagger-children.visible > *:nth-child(15) {
  transition-delay: 0.75s;
  opacity: 1;
  transform: translateY(0);
}
