/* ===== Base & Resets ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
}

/* ===== Animated Gradient Background for Hero ===== */
.hero-gradient {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 25%, #0f172a 50%, #1a1a2e 75%, #0f172a 100%);
  background-size: 400% 400%;
  animation: gradientShift 12s ease infinite;
  position: relative;
  overflow: hidden;
}

.hero-gradient::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 50%, rgba(59, 130, 246, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(139, 92, 246, 0.12) 0%, transparent 50%),
    radial-gradient(circle at 60% 80%, rgba(6, 182, 212, 0.1) 0%, transparent 50%);
  z-index: 0;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* ===== Circuit Board Grid Pattern ===== */
.circuit-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.04;
  background-image:
    linear-gradient(rgba(59, 130, 246, 0.5) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59, 130, 246, 0.5) 1px, transparent 1px);
  background-size: 60px 60px;
  z-index: 0;
}

/* ===== Floating Particles ===== */
.particle {
  position: absolute;
  border-radius: 50%;
  background: rgba(59, 130, 246, 0.3);
  animation: float 6s ease-in-out infinite;
}
.particle:nth-child(1) { width: 6px; height: 6px; top: 20%; left: 10%; animation-delay: 0s; animation-duration: 8s; }
.particle:nth-child(2) { width: 4px; height: 4px; top: 60%; left: 80%; animation-delay: 2s; animation-duration: 6s; }
.particle:nth-child(3) { width: 8px; height: 8px; top: 40%; left: 50%; animation-delay: 4s; animation-duration: 10s; }
.particle:nth-child(4) { width: 3px; height: 3px; top: 80%; left: 30%; animation-delay: 1s; animation-duration: 7s; }
.particle:nth-child(5) { width: 5px; height: 5px; top: 10%; left: 70%; animation-delay: 3s; animation-duration: 9s; }
.particle:nth-child(6) { width: 4px; height: 4px; top: 70%; left: 15%; animation-delay: 5s; animation-duration: 11s; }

@keyframes float {
  0%, 100% { transform: translateY(0) translateX(0); opacity: 0.3; }
  25% { transform: translateY(-20px) translateX(10px); opacity: 0.8; }
  50% { transform: translateY(-10px) translateX(-5px); opacity: 0.5; }
  75% { transform: translateY(-30px) translateX(15px); opacity: 0.7; }
}

/* ===== Glassmorphism Cards ===== */
.glass-card {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08), 0 0 30px rgba(59, 130, 246, 0.08);
  border-color: rgba(59, 130, 246, 0.2);
}

.glass-card-dark {
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== Section Background Pattern ===== */
.section-pattern {
  position: relative;
  overflow: hidden;
}

.section-pattern::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.03;
  background-image:
    linear-gradient(rgba(59, 130, 246, 0.4) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59, 130, 246, 0.4) 1px, transparent 1px);
  background-size: 40px 40px;
  z-index: 0;
}

/* ===== Skill Badge ===== */
.skill-badge {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.skill-badge::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.1));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.skill-badge:hover::before {
  opacity: 1;
}

.skill-badge:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 16px 32px rgba(59, 130, 246, 0.15);
}

/* ===== Glow Button ===== */
.glow-btn {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.glow-btn::before {
  content: '';
  position: absolute;
  inset: -2px;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6, #06b6d4);
  border-radius: inherit;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.glow-btn:hover::before {
  opacity: 1;
}

.glow-btn:hover {
  box-shadow: 0 0 30px rgba(59, 130, 246, 0.4), 0 0 60px rgba(139, 92, 246, 0.2);
  transform: translateY(-2px);
}

/* ===== Contact Card Hover ===== */
.contact-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.contact-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.contact-card:hover .contact-icon {
  transform: scale(1.15);
}

.contact-icon {
  transition: transform 0.3s ease;
}

/* ===== Client Logo ===== */
.client-logo {
  transition: all 0.3s ease;
  filter: grayscale(100%);
  opacity: 0.6;
}

.client-logo:hover {
  filter: grayscale(0%);
  opacity: 1;
  transform: scale(1.05);
}

/* ===== Navbar ===== */
.nav-link {
  position: relative;
  transition: color 0.3s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #3b82f6, #8b5cf6);
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

/* ===== Profile Image Ring ===== */
.profile-ring {
  background: linear-gradient(135deg, #3b82f6, #8b5cf6, #06b6d4);
  padding: 4px;
  border-radius: 50%;
  animation: ringGlow 3s ease-in-out infinite alternate;
}

@keyframes ringGlow {
  0% { box-shadow: 0 0 20px rgba(59, 130, 246, 0.3); }
  100% { box-shadow: 0 0 40px rgba(139, 92, 246, 0.4); }
}

/* ===== Section Title Underline ===== */
.section-title-line {
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, #3b82f6, #8b5cf6);
  border-radius: 2px;
}

/* ===== Typing Cursor ===== */
.typing-cursor::after {
  content: '|';
  animation: blink 1s step-end infinite;
  color: #3b82f6;
  font-weight: 300;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* ===== Scroll Reveal ===== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Mobile Menu ===== */
.mobile-menu {
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu.open {
  transform: translateX(0);
}

/* ===== Publication Card ===== */
.pub-card {
  border-left: 4px solid transparent;
  border-image: linear-gradient(to bottom, #3b82f6, #8b5cf6) 1;
  transition: all 0.3s ease;
}

.pub-card:hover {
  transform: translateX(4px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

/* ===== Custom Scrollbar ===== */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(to bottom, #3b82f6, #8b5cf6);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(to bottom, #2563eb, #7c3aed);
}
