:root {
  --bg-1: #0b1220;
  --bg-2: #071227;
  --card: #0f1724;
  --muted: #94a3b8;
  --accent: #06b6d4;
}

html, body {
  height: 100%;
}

body {
  background: radial-gradient(1200px 600px at 10% 10%, rgba(6,182,212,0.06), transparent);
  background: radial-gradient(1000px 500px at 90% 90%, rgba(79,70,229,0.03), transparent), linear-gradient(180deg, var(--bg-1), var(--bg-2));
  color: #e6eef8;
  overflow-x: hidden;
}

/* Particle container */
#particles-js {
  position: fixed;
  width: 100%;
  height: 100%;
  z-index: -10;
  top: 0;
  left: 0;
}

/* Moving animated background */
.bg-anim {
  position: fixed;
  inset: 0;
  z-index: -9;
  overflow: hidden;
}

.blob {
  position: absolute;
  filter: blur(60px);
  opacity: 0.35;
  mix-blend-mode: screen;
  animation: float 12s ease-in-out infinite;
}

.blob.b1 {
  width: 520px;
  height: 520px;
  background: linear-gradient(90deg, #06b6d4, #7c3aed);
  left: -10%;
  top: -10%;
}

.blob.b2 {
  width: 420px;
  height: 420px;
  background: linear-gradient(90deg, #ef4444, #f97316);
  right: -5%;
  bottom: -5%;
  animation-duration: 16s;
}

.floating-element {
  position: fixed;
  z-index: -5;
  opacity: 0.1;
  animation: float-element 20s infinite linear;
  transition: all 0.5s ease;
}

.floating-element:hover {
  opacity: 0.4;
  transform: scale(1.5);
  animation-duration: 5s;
}

.floating-element.code {
  font-size: 24px;
  color: var(--accent);
}

.floating-element.bracket {
  font-size: 40px;
  color: #7c3aed;
}

.floating-element.gear {
  font-size: 30px;
  color: #f97316;
}

/* Keyframes */
@keyframes float {
  0% { transform: translateY(0) translateX(0) scale(1); }
  50% { transform: translateY(-30px) translateX(20px) scale(1.05); }
  100% { transform: translateY(0) translateX(0) scale(1); }
}

@keyframes float-element {
  0% { transform: translateY(0) translateX(0) rotate(0deg); }
  25% { transform: translateY(-20px) translateX(20px) rotate(90deg); }
  50% { transform: translateY(-40px) translateX(0) rotate(180deg); }
  75% { transform: translateY(-20px) translateX(-20px) rotate(270deg); }
  100% { transform: translateY(0) translateX(0) rotate(360deg); }
}

@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
  animation: fade-in-up 0.6s ease-out forwards;
}

/* Glass cards */
.card {
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
  border: 1px solid rgba(255,255,255,0.04);
  backdrop-filter: blur(8px);
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(6,182,212,0.15);
  border-color: rgba(6,182,212,0.2);
}

/* Project slider */
.slider {
  scroll-snap-type: x mandatory;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.slide {
  scroll-snap-align: center;
  flex: 0 0 80%;
}

.slider::-webkit-scrollbar {
  height: 8px;
}

.slider::-webkit-scrollbar-thumb {
  background: linear-gradient(90deg, var(--accent), #7c3aed);
  border-radius: 999px;
}

/* Skill icons */
.skill-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.skill-icon::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(6,182,212,0.2), transparent);
  transition: left 0.5s;
}

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

.skill-icon:hover {
  transform: translateY(-5px) scale(1.05);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 10px 20px rgba(6,182,212,0.2);
}

.skill-icon i {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  background: linear-gradient(90deg, var(--accent), #7c3aed);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transition: all 0.3s ease;
}

.skill-icon:hover i {
  transform: scale(1.2);
}

/* Moving gradient border */
.moving-border {
  position: relative;
  border-radius: 10px;
  padding: 2px;
  background: linear-gradient(90deg, #0850c2, #6a5af9, #e6eef8, #ebaee7);
  background-size: 300% 300%;
  animation: move-border 3s linear infinite;
  transition: all 0.3s ease;
}

.moving-border:hover {
  animation-duration: 1s;
  transform: scale(1.02);
}

.moving-border > * {
  background: #0b1220;
  border-radius: inherit;
  width: 100%;
  height: 100%;
}

@keyframes move-border {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Buttons */
.btn-gradient {
  background: linear-gradient(90deg, var(--accent), #7c3aed);
  color: black;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

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

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

.btn-gradient:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(6,182,212,0.4);
}

/* Text highlight */
.text-highlight {
  position: relative;
  display: inline-block;
}

.text-highlight::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), #7c3aed);
  transition: width 0.3s ease;
}

.text-highlight:hover::after {
  width: 100%;
}

/* Links hover */
a {
  transition: all 0.3s ease;
}

a:hover {
  color: var(--accent);
}

/* Section animations */
section {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

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

/* Responsive tweaks */
@media(min-width:1024px) {
  .slide { flex: 0 0 45%; }
  .skill-icon i { font-size: 3rem; }
}

/* Mouse follower */
.mouse-follower {
  position: fixed;
  width: 20px;
  height: 20px;
  background: radial-gradient(circle, rgba(6,182,212,0.5) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: screen;
  transition: transform 0.1s;
}

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

::-webkit-scrollbar-track {
  background: var(--bg-1);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--accent), #7c3aed);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #7c3aed, var(--accent));
}
