/* ===========================
   DARK THEME PORTFOLIO STYLES
   =========================== */

:root {
  /* Natural Dark Theme Colors - Slate & Deep Blue Gradation */
  --bg-primary: #0f172a;      /* Deep slate */
  --bg-secondary: #1e293b;    /* Slate 800 */
  --bg-tertiary: #334155;     /* Slate 700 */
  --bg-quaternary: #475569;   /* Slate 600 */
  --bg-card: rgba(30, 41, 59, 0.9);
  --bg-glass: rgba(51, 65, 85, 0.4);
  
  /* Enhanced Text Colors for Better Readability */
  --text-primary: #f8fafc;    /* Slate 50 - Very bright */
  --text-secondary: #e2e8f0;  /* Slate 200 - Bright */
  --text-muted: #cbd5e1;      /* Slate 300 - Medium bright */
  --text-dim: #94a3b8;        /* Slate 400 - Dimmed */
  
  /* Natural Accent Colors with Better Harmony */
  --accent-primary: #38bdf8;    /* Sky 400 - Natural cyan */
  --accent-secondary: #8b5cf6;  /* Violet 500 - Deep purple */
  --accent-tertiary: #06b6d4;  /* Cyan 500 */
  --accent-quaternary: #3b82f6; /* Blue 500 */
  --accent-hover: #0ea5e9;     /* Sky 500 */
  
  /* Natural Gradient Combinations */
  --gradient-primary: linear-gradient(135deg, #38bdf8 0%, #8b5cf6 50%, #06b6d4 100%);
  --gradient-secondary: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  --gradient-bg: linear-gradient(135deg, #0f172a 0%, #1e293b 25%, #334155 75%, #475569 100%);
  --gradient-card: linear-gradient(135deg, rgba(30, 41, 59, 0.8) 0%, rgba(51, 65, 85, 0.6) 100%);
  
  /* Enhanced Shadow Colors */
  --shadow-light: rgba(56, 189, 248, 0.15);
  --shadow-medium: rgba(56, 189, 248, 0.25);
  --shadow-heavy: rgba(56, 189, 248, 0.35);
  --shadow-glow: rgba(56, 189, 248, 0.5);
  
  /* Animation Timing */
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-medium: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ===========================
   BASE STYLES
   =========================== */

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

*:focus {
  outline: none;
  box-shadow: none;
}

/* Remove all possible focus styles */
*:focus,
*:focus-visible,
*:focus-within,
*:active {
  outline: none !important;
  box-shadow: none !important;
  border: none !important;
}

/* Specifically target common elements */
a, button, input, textarea, select, div {
  outline: none;
  border: none;
  background: none;
  text-decoration: none;
}

a:focus, button:focus, input:focus, textarea:focus, select:focus, div:focus {
  outline: none !important;
  box-shadow: none !important;
  border: none !important;
}

/* Remove any potential browser styling */
nav a {
  outline: none !important;
  border: none !important;
  box-shadow: none !important;
}

nav a:focus,
nav a:focus-visible,
nav a:focus-within,
nav a:active {
  outline: none !important;
  border: none !important;
  box-shadow: none !important;
}

/* Override Tailwind's focus styles */
.focus\\:outline-none:focus,
.focus\\:ring-0:focus,
*:focus {
  outline: 0 !important;
  box-shadow: 0 0 0 0 transparent !important;
  border: none !important;
}

/* Logo specific styling */
.logo,
.logo:focus,
.logo:active,
.logo:focus-visible {
  outline: none !important;
  border: none !important;
  box-shadow: none !important;
  text-decoration: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--gradient-bg);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
}

/* Enhanced animated background */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(ellipse at 20% 50%, rgba(56, 189, 248, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 40% 80%, rgba(6, 182, 212, 0.1) 0%, transparent 50%),
    linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 25%, var(--bg-tertiary) 75%, var(--bg-quaternary) 100%);
  z-index: -2;
  animation: backgroundShift 20s ease-in-out infinite;
}

@keyframes backgroundShift {
  0%, 100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
  33% {
    transform: scale(1.1) rotate(1deg);
    opacity: 0.8;
  }
  66% {
    transform: scale(0.95) rotate(-1deg);
    opacity: 0.9;
  }
}

/* Animated particles background */
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(2px 2px at 20px 30px, rgba(56, 189, 248, 0.3), transparent),
    radial-gradient(2px 2px at 40px 70px, rgba(139, 92, 246, 0.3), transparent),
    radial-gradient(1px 1px at 90px 40px, rgba(6, 182, 212, 0.3), transparent),
    radial-gradient(1px 1px at 130px 80px, rgba(59, 130, 246, 0.3), transparent),
    radial-gradient(2px 2px at 160px 30px, rgba(56, 189, 248, 0.2), transparent);
  background-repeat: repeat;
  background-size: 200px 100px;
  z-index: -1;
  animation: sparkle 15s linear infinite;
}

@keyframes sparkle {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(-100px);
  }
}

/* ===========================
   RESPONSIVE NAVIGATION FIXES
   =========================== */

/* Desktop: Hide mobile menu button, show desktop nav */
@media (min-width: 1025px) {
  .mobile-menu-btn {
    display: none !important;
  }
  
  .desktop-nav {
    display: flex !important;
  }
  
  .mobile-menu {
    display: none !important;
  }
}

/* Tablet and Mobile: Show mobile menu button, hide desktop nav */
@media (max-width: 1024px) {
  .desktop-nav {
    display: none !important;
  }
  
  .mobile-menu-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border-radius: 8px;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: background-color var(--transition-fast);
  }
  
  .mobile-menu-btn:hover {
    background-color: rgba(248, 250, 252, 0.1);
  }
  
  .hamburger-line {
    display: block;
  }
}

/* ===========================
   GLASS MORPHISM EFFECTS
   =========================== */

.glass-effect {
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(248, 250, 252, 0.1);
  border-radius: 16px;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(56, 189, 248, 0.1);
  transition: all var(--transition-medium);
}

.glass-card {
  background: var(--gradient-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(248, 250, 252, 0.1);
  border-radius: 20px;
  box-shadow: 
    0 10px 40px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(56, 189, 248, 0.08);
  transition: all var(--transition-medium);
  position: relative;
  overflow: hidden;
}

.glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity var(--transition-medium);
}

.glass-card:hover {
  transform: translateY(-8px);
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.4),
    0 0 40px var(--shadow-medium),
    0 0 0 1px rgba(56, 189, 248, 0.2);
  border-color: rgba(56, 189, 248, 0.3);
}

.glass-card:hover::before {
  opacity: 1;
}

/* ===========================
   SCROLL PROGRESS INDICATOR
   =========================== */

.scroll-indicator {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--gradient-primary);
  transform-origin: left;
  transform: scaleX(0) translateZ(0);
  z-index: 9999;
  box-shadow: 0 0 10px var(--accent-primary);
  /* Optimized for smooth scrolling on mobile */
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  -webkit-transform-style: preserve-3d;
  transform-style: preserve-3d;
  /* Prevent subpixel rendering issues on mobile */
  -webkit-font-smoothing: subpixel-antialiased;
  -moz-osx-font-smoothing: auto;
  contain: layout style paint;
}

/* Mobile-specific optimizations */
@media (max-width: 768px) {
  .scroll-indicator {
    height: 3px;
    /* Reduce visual complexity on mobile */
    box-shadow: 0 0 5px var(--accent-primary);
  }
}

/* ===========================
   NAVIGATION STYLES
   =========================== */

.navbar {
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(15, 23, 42, 0.85);
  border-bottom: 1px solid rgba(248, 250, 252, 0.08);
  transition: all var(--transition-smooth);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.navbar.scrolled {
  background: rgba(15, 23, 42, 0.95);
  box-shadow: 
    0 4px 30px rgba(0, 0, 0, 0.2),
    0 0 40px rgba(56, 189, 248, 0.05);
  border-bottom-color: rgba(56, 189, 248, 0.1);
}

.nav-link {
  position: relative;
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: all var(--transition-medium);
  padding: 10px 16px;
  display: block;
  overflow: hidden;
  outline: none;
  border: none;
  background: none;
}

.nav-link:focus {
  outline: none;
  border: none;
  box-shadow: none;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 6px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  border-radius: 1px;
  transition: all var(--transition-medium);
  transform: translateX(-50%);
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-primary);
}

.nav-link:focus-visible {
  outline: none;
  border: none;
  box-shadow: none;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: calc(100% - 32px);
}

/* ===========================
   LOGO & BRANDING
   =========================== */

.logo {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 800;
  transition: all var(--transition-medium);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  outline: none;
  border: none;
}

.logo:focus,
.logo:focus-visible,
.logo:focus-within {
  outline: none !important;
  border: none !important;
  box-shadow: none !important;
}

.logo:hover {
  transform: scale(1.05);
  filter: drop-shadow(0 0 10px var(--accent-primary));
}

.logo img {
  transition: all var(--transition-medium);
  filter: drop-shadow(0 0 5px var(--accent-primary));
}

.logo:hover img {
  transform: rotate(360deg);
  filter: drop-shadow(0 0 15px var(--accent-primary));
}

/* ===========================
   HERO SECTION
   =========================== */

.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background: var(--gradient-bg);
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(ellipse at 25% 25%, rgba(56, 189, 248, 0.2) 0%, transparent 50%),
    radial-gradient(ellipse at 75% 75%, rgba(139, 92, 246, 0.2) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(6, 182, 212, 0.15) 0%, transparent 70%);
  animation: pulseBackground 8s ease-in-out infinite;
}

/* Floating geometric shapes */
.hero-bg::before {
  content: '';
  position: absolute;
  top: 10%;
  left: 10%;
  width: 100px;
  height: 100px;
  background: linear-gradient(45deg, rgba(56, 189, 248, 0.1), rgba(139, 92, 246, 0.1));
  border-radius: 50% 20% 50% 20%;
  animation: float1 12s ease-in-out infinite;
}

.hero-bg::after {
  content: '';
  position: absolute;
  bottom: 15%;
  right: 15%;
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.15), rgba(59, 130, 246, 0.15));
  border-radius: 30% 70% 70% 30%;
  animation: float2 10s ease-in-out infinite reverse;
}

@keyframes float1 {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg) scale(1);
  }
  33% {
    transform: translate(30px, -30px) rotate(120deg) scale(1.1);
  }
  66% {
    transform: translate(-20px, 20px) rotate(240deg) scale(0.9);
  }
}

@keyframes float2 {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg) scale(1);
  }
  50% {
    transform: translate(-40px, -40px) rotate(180deg) scale(1.2);
  }
}

@keyframes pulseBackground {
  0%, 100% {
    opacity: 0.8;
    transform: scale(1);
  }
  25% {
    opacity: 1;
    transform: scale(1.05);
  }
  75% {
    opacity: 0.6;
    transform: scale(0.98);
  }
}

.hero-content {
  text-align: center;
  z-index: 2;
  max-width: 900px;
  padding: 2rem;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 900;
  margin-bottom: 1.5rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: slideInFromTop 1s ease-out;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.hero-subtitle {
  font-size: clamp(1.1rem, 2.2vw, 1.6rem);
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  animation: slideInFromBottom 1s ease-out 0.3s both;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

.typing-container {
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 3rem;
}

#typed-text {
  font-size: clamp(1.3rem, 2.8vw, 2.2rem);
  font-weight: 700;
  color: var(--accent-primary);
  font-family: 'JetBrains Mono', monospace;
  text-shadow: 0 0 20px rgba(56, 189, 248, 0.3);
}

/* ===========================
   BUTTONS
   =========================== */

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  border: none;
  padding: 12px 32px;
  border-radius: 50px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all var(--transition-medium);
  box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
  position: relative;
  overflow: hidden;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 212, 255, 0.4);
}

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

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

.btn-secondary {
  background: transparent;
  color: var(--accent-primary);
  border: 2px solid var(--accent-primary);
  padding: 10px 30px;
  border-radius: 50px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all var(--transition-medium);
  position: relative;
  overflow: hidden;
}

.btn-secondary:hover {
  background: var(--accent-primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 212, 255, 0.3);
}

/* ===========================
   CARDS & SECTIONS
   =========================== */

.section {
  padding: 6rem 0;
  position: relative;
  background: var(--bg-primary);
  overflow: hidden;
}

.section:nth-child(even) {
  background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

.section:nth-child(odd) {
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
}

/* Add animated background elements to sections */
.section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-primary);
  opacity: 0.4;
}

.section::after {
  content: '';
  position: absolute;
  top: 20%;
  right: -50px;
  width: 100px;
  height: 100px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.1) 0%, transparent 70%);
  border-radius: 50%;
  animation: sectionFloat 15s linear infinite;
}

@keyframes sectionFloat {
  0% {
    transform: translateY(0) scale(0.8);
    opacity: 0.3;
  }
  50% {
    transform: translateY(-50px) scale(1);
    opacity: 0.6;
  }
  100% {
    transform: translateY(-100px) scale(0.8);
    opacity: 0.3;
  }
}

.section-title {
  font-size: clamp(2.2rem, 4.5vw, 3.5rem);
  font-weight: 900;
  text-align: center;
  margin-bottom: 4rem;
  color: var(--text-primary);
  position: relative;
  letter-spacing: -0.02em;
}

.section-title::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: var(--gradient-primary);
  border-radius: 2px;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-primary), transparent);
  border-radius: 1px;
}

.card {
  background: var(--gradient-card);
  border: 1px solid rgba(248, 250, 252, 0.08);
  border-radius: 20px;
  padding: 2.5rem;
  transition: all var(--transition-medium);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-primary);
  transform: scaleX(0);
  transition: transform var(--transition-medium);
}

.card:hover::before {
  transform: scaleX(1);
}

.card:hover {
  transform: translateY(-10px);
  border-color: rgba(56, 189, 248, 0.2);
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.4),
    0 0 40px var(--shadow-medium);
}

/* ===========================
   PROJECT CARDS
   =========================== */

.project-card {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  overflow: hidden;
  transition: all var(--transition-medium);
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 32rem;
  z-index: 1;
  pointer-events: auto;
}

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

.project-card:hover::before {
  left: 100%;
}

.project-card:hover {
  transform: translateY(-10px);
  border-color: rgba(0, 212, 255, 0.5);
  box-shadow: 0 20px 50px rgba(0, 212, 255, 0.3);
  z-index: 10;
}

.project-image-container {
  width: 100%;
  height: 220px;
  position: relative;
  overflow: hidden;
  background-color: var(--bg-secondary);
}

.project-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  object-position: center;
  transition: transform var(--transition-slow);
  background-color: var(--bg-secondary);
}

.project-card:hover .project-image {
  transform: scale(1.1);
}

.project-content {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.project-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
  line-height: 1.3;
}

.project-description {
  color: var(--text-secondary);
  line-height: 1.6;
  flex: 1;
  margin-bottom: 1rem;
}

/* Tech Tags */
.tech-tag {
  padding: 0.375rem 0.75rem;
  background: rgba(0, 212, 255, 0.1);
  color: var(--accent-primary);
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 0.5rem;
  border: 1px solid rgba(0, 212, 255, 0.2);
  transition: all var(--transition-fast);
}

.tech-tag:hover {
  background: rgba(0, 212, 255, 0.2);
  transform: translateY(-1px);
}

.project-content {
  padding: 1.5rem;
}

.project-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.project-description {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  line-height: 1.6;
}

.tech-tag {
  background: rgba(0, 212, 255, 0.1);
  color: var(--accent-primary);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 500;
  margin: 0.25rem;
  display: inline-block;
  border: 1px solid rgba(0, 212, 255, 0.3);
  transition: all var(--transition-fast);
}

.tech-tag:hover {
  background: rgba(0, 212, 255, 0.2);
  transform: translateY(-2px);
}

/* ===========================
   PROFILE SECTION
   =========================== */

.profile-image {
  width: 300px;
  height: 300px;
  border-radius: 50%;
  border: 4px solid var(--accent-primary);
  box-shadow: 0 0 30px rgba(0, 212, 255, 0.5);
  transition: all var(--transition-medium);
  position: relative;
}

.profile-image::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: var(--gradient-primary);
  z-index: -1;
  animation: rotate 3s linear infinite;
}

.profile-image:hover {
  transform: scale(1.05);
  box-shadow: 0 0 50px rgba(0, 212, 255, 0.8);
}

/* ===========================
   SKILLS & TECHNOLOGIES
   =========================== */

.skill-icon {
  width: 60px;
  height: 60px;
  transition: all var(--transition-medium);
  filter: grayscale(0.5);
}

.skill-item:hover .skill-icon {
  transform: scale(1.2) rotate(5deg);
  filter: grayscale(0) drop-shadow(0 5px 15px var(--accent-primary));
}

.skill-item {
  background: var(--bg-card);
  padding: 1.5rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all var(--transition-medium);
  text-align: center;
}

.skill-item:hover {
  transform: translateY(-5px);
  border-color: rgba(0, 212, 255, 0.5);
  box-shadow: 0 10px 30px rgba(0, 212, 255, 0.2);
}

/* ===========================
   CERTIFICATE SECTION
   =========================== */

.filter-btn {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0.5rem 1rem;
  border-radius: 25px;
  font-weight: 500;
  transition: all var(--transition-medium);
  cursor: pointer;
}

.filter-btn.active,
.filter-btn:hover {
  background: rgba(0, 212, 255, 0.2);
  color: var(--accent-primary);
  border-color: var(--accent-primary);
  transform: translateY(-2px);
}

.certificate-card {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  overflow: hidden;
  transition: all var(--transition-medium);
  position: relative;
}

.certificate-card:hover {
  transform: translateY(-8px);
  border-color: rgba(0, 212, 255, 0.3);
  box-shadow: 0 16px 40px rgba(0, 212, 255, 0.2);
}

.certificate-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.certificate-card:hover .certificate-image {
  transform: scale(1.05);
}

/* ===========================
   CONTACT SECTION
   =========================== */

.contact-card {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
  transition: all var(--transition-medium);
  position: relative;
  overflow: hidden;
}

/* Small Contact Cards for Social Media */
.contact-card-small {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 1.5rem 1rem;
  text-align: center;
  transition: all var(--transition-medium);
  position: relative;
  overflow: hidden;
  text-decoration: none;
  display: block;
}

.contact-card::before,
.contact-card-small::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-primary);
}

.contact-card:hover,
.contact-card-small:hover {
  transform: translateY(-5px);
  border-color: rgba(0, 212, 255, 0.3);
  box-shadow: 0 15px 35px rgba(0, 212, 255, 0.2);
}

.contact-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 1rem;
  color: var(--accent-primary);
}

/* Small Contact Icons */
.contact-icon-small {
  width: 36px;
  height: 36px;
  margin: 0 auto 0.75rem;
  color: var(--accent-primary);
}

/* ===========================
   SWIPER CUSTOMIZATION
   =========================== */

.swiper-pagination {
  position: relative !important;
  margin-top: 2rem;
}

.swiper-pagination-bullet {
  background: var(--accent-primary) !important;
  opacity: 0.3;
  transition: all var(--transition-medium);
}

.swiper-pagination-bullet-active {
  opacity: 1;
  transform: scale(1.2);
  box-shadow: 0 0 10px var(--accent-primary);
}

.projectSwiper {
  padding: 20px 0 40px 0;
  overflow: visible;
}

.projectSwiper .swiper-wrapper {
  pointer-events: auto;
}

.swiper-slide {
  height: auto;
  display: flex;
  padding: 20px 10px;
  pointer-events: auto; /* Ensure hover events work */
}

/* Override any swiper interference with hover */
.swiper-slide-active .project-card,
.swiper-slide .project-card {
  pointer-events: auto !important;
  position: relative;
  z-index: 2;
}

.swiper-slide-active .project-card:hover,
.swiper-slide .project-card:hover {
  z-index: 10 !important;
}

.project-card {
  pointer-events: auto; /* Ensure hover events reach cards */
}

/* Swiper Responsive */
@media (max-width: 640px) {
  .swiper-slide {
    width: 300px !important;
    min-width: 300px;
  }
  
  .project-card {
    width: 100%;
    max-width: 300px;
  }
}

@media (max-width: 480px) {
  .swiper-slide {
    width: 280px !important;
    min-width: 280px;
  }
  
  .project-card {
    max-width: 280px;
  }
  
  .swiper {
    padding: 0 10px;
  }
}

/* ===========================
   BACK TO TOP BUTTON
   =========================== */

.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--gradient-primary);
  color: white;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-medium);
  box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
  z-index: 1000;
}

.back-to-top:hover {
  transform: translateY(-3px) scale(1.1);
  box-shadow: 0 8px 25px rgba(0, 212, 255, 0.5);
}

/* ===========================
   ANIMATIONS
   =========================== */

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInFromTop {
  from {
    opacity: 0;
    transform: translateY(-50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInFromBottom {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInFromLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInFromRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.6;
  }
}

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

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}

@keyframes glow {
  0%, 100% {
    box-shadow: 0 0 20px var(--shadow-light);
  }
  50% {
    box-shadow: 0 0 30px var(--shadow-medium), 0 0 50px var(--shadow-heavy);
  }
}

/* Animation Classes */
.animate-fade-in {
  animation: fadeIn 0.8s ease-out forwards;
}

.animate-slide-up {
  animation: slideInFromBottom 0.8s ease-out forwards;
}

.animate-slide-down {
  animation: slideInFromTop 0.8s ease-out forwards;
}

.animate-slide-left {
  animation: slideInFromLeft 0.8s ease-out forwards;
}

.animate-slide-right {
  animation: slideInFromRight 0.8s ease-out forwards;
}

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

.animate-bounce-slow {
  animation: bounceSlow 4s ease-in-out infinite;
}

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

.animate-glow {
  animation: glow 2s ease-in-out infinite alternate;
}

/* Enhanced animations for background elements */
@keyframes bounceSlow {
  0%, 100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-30px) scale(1.1);
  }
}

/* ===========================
   MOBILE MENU
   =========================== */

.mobile-menu {
  background: rgba(15, 23, 42, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(248, 250, 252, 0.1);
  max-height: 0;
  overflow: hidden;
  transition: all var(--transition-smooth);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.mobile-menu.active {
  box-shadow: 
    0 10px 40px rgba(0, 0, 0, 0.4),
    0 0 20px rgba(56, 189, 248, 0.1);
}

.mobile-nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  padding: 16px 24px;
  display: block;
  border-bottom: 1px solid rgba(248, 250, 252, 0.05);
  transition: all var(--transition-fast);
  position: relative;
  font-weight: 500;
}

.mobile-nav-link::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 100%;
  background: rgba(56, 189, 248, 0.1);
  transition: width var(--transition-medium);
}

.mobile-nav-link:hover {
  background: rgba(56, 189, 248, 0.08);
  color: var(--text-primary);
  padding-left: 32px;
  border-left: 3px solid var(--accent-primary);
}

.mobile-nav-link:hover::before {
  width: 100%;
}

.hamburger-line {
  width: 25px;
  height: 2px;
  background: var(--text-primary);
  margin: 5px 0;
  transition: all var(--transition-medium);
  border-radius: 2px;
  transform-origin: center;
}

/* Enhanced Mobile Menu Animation */
@media (max-width: 1024px) {
  .nav-link {
    padding: 12px 20px;
    font-size: 1rem;
  }
  
  .mobile-nav-link {
    font-size: 1.1rem;
    padding: 20px 24px;
  }
}

/* ===========================
   RESPONSIVE DESIGN
   =========================== */

/* ===========================
   RESPONSIVE DESIGN
   =========================== */

@media (max-width: 1024px) {
  .section {
    padding: 4rem 0;
  }
  
  .hero-content {
    padding: 1.5rem;
  }
  
  .profile-image {
    width: 250px;
    height: 250px;
  }
  
  .typing-container {
    height: 70px;
    margin-bottom: 2.5rem;
  }
  
  .card {
    padding: 2rem;
  }
}

/* ===========================
   RESPONSIVE HERO SECTION
   =========================== */

/* Mobile Hero Adjustments */
@media (max-width: 1023px) {
  .hero-section {
    padding: 6rem 0 4rem;
    text-align: center;
  }
  
  .hero-section .flex-col {
    align-items: center;
  }
  
  .profile-image {
    position: relative;
    width: 280px;
    height: 280px;
    margin: 0 auto 2rem;
  }
  
  /* Hide some floating icons on mobile to reduce clutter */
  .hero-section .absolute:nth-child(n+4) {
    display: none;
  }
  
  /* Adjust remaining floating icons for mobile */
  .hero-section .absolute:nth-child(2) {
    top: 10px;
    right: -10px;
    width: 40px;
    height: 40px;
  }
  
  .hero-section .absolute:nth-child(3) {
    bottom: -10px;
    left: -10px;
    width: 40px;
    height: 40px;
  }
}

@media (max-width: 768px) {
  .section {
    padding: 3rem 0;
  }
  
  .section-title {
    margin-bottom: 3rem;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
  }
  
  .hero-content {
    padding: 1rem;
    text-align: center;
  }
  
  .profile-image {
    width: 240px;
    height: 240px;
    margin: 0 auto;
  }
  
  .typing-container {
    height: 60px;
    margin-bottom: 2rem;
    text-align: center;
  }
  
  .card {
    padding: 1.5rem;
  }
  
  .project-content {
    padding: 1.5rem;
  }
  
  .contact-card {
    padding: 2rem;
  }
  
  .back-to-top {
    bottom: 1.5rem;
    right: 1.5rem;
    width: 48px;
    height: 48px;
  }
  
  /* Force mobile menu visibility */
  .desktop-nav {
    display: none !important;
  }
  
  .mobile-menu-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 8px;
    border-radius: 8px;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: background-color var(--transition-fast);
  }
  
  .mobile-menu-btn:hover {
    background-color: rgba(248, 250, 252, 0.1);
  }
  
  .hamburger-line {
    width: 25px;
    height: 2px;
    background: var(--text-primary);
    margin: 4px 0;
    transition: all var(--transition-medium);
    border-radius: 2px;
    transform-origin: center;
    display: block;
  }
  
  /* Mobile Navigation Improvements */
  .mobile-menu {
    transition: max-height 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  }
  
  .mobile-nav-link {
    padding: 18px 20px;
    font-size: 1.05rem;
  }
}


@media (max-width: 640px) {
  :root {
    font-size: 14px;
  }
  
  .section {
    padding: 2.5rem 0;
  }
  
  .hero-content {
    padding: 0.5rem;
  }
  
  /* Ensure Hello I'm text is visible on mobile */
  .hero-content p {
    font-size: 0.95rem !important;
    margin-bottom: 2rem !important;
    opacity: 1 !important;
    display: block !important;
  }
  
  .hero-title {
    margin-bottom: 1rem;
    font-size: clamp(2rem, 8vw, 2.5rem) !important;
  }
  
  .typing-container {
    height: 50px;
    margin-bottom: 1.5rem;
  }
  
  .btn-primary,
  .btn-secondary {
    padding: 12px 28px;
    font-size: 0.95rem;
  }
  
  .tech-tag {
    font-size: 0.8rem;
    padding: 0.25rem 0.7rem;
  }
  
  .skill-icon {
    width: 50px;
    height: 50px;
  }
  
  .contact-icon {
    width: 40px;
    height: 40px;
  }
  
  .card {
    padding: 1.25rem;
  }
  
  .profile-image {
    width: 180px;
    height: 180px;
  }
}

@media (max-width: 480px) {
  .section {
    padding: 2rem 0;
  }
  
  .section-title {
    margin-bottom: 2.5rem;
  }
  
  .hero-content {
    padding: 0;
  }
  
  .mobile-nav-link {
    padding: 16px 18px;
    font-size: 1rem;
  }
}

/* ===========================
   ACCESSIBILITY
   =========================== */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus styles for better accessibility */
button:focus,
a:focus,
input:focus,
textarea:focus {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --bg-primary: #000000;
    --bg-secondary: #111111;
    --text-primary: #ffffff;
    --accent-primary: #00ffff;
  }
}

/* ===========================
   MISSING ANIMATIONS
   =========================== */

/* Float Reverse Animation */
@keyframes float-reverse {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(15px) rotate(-10deg);
  }
}

/* Spin Slow Animation */
@keyframes spin-slow {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Additional Animation Classes */
.animate-float-reverse {
  animation: float-reverse 5s ease-in-out infinite;
}

.animate-spin-slow {
  animation: spin-slow 8s linear infinite;
}

/* ===========================
   FINAL MOBILE MENU FIXES
   =========================== */

/* Force hamburger menu visibility on all mobile devices */
@media (max-width: 1023px) {
  .desktop-nav {
    display: none !important;
  }
  
  .mobile-menu-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 8px;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    border-radius: 8px;
    position: relative;
    z-index: 1001;
  }
  
  .mobile-menu-btn:hover {
    background-color: rgba(248, 250, 252, 0.1);
    transform: scale(1.05);
  }
  
  .hamburger-line {
    display: block;
    width: 25px;
    height: 2px;
    background: var(--text-primary);
    margin: 3px 0;
    transition: all var(--transition-medium);
    border-radius: 2px;
    transform-origin: center;
  }
  
  /* Hamburger animation states */
  .mobile-menu-btn.active .hamburger-line:first-child {
    transform: rotate(45deg) translate(6px, 6px);
  }
  
  .mobile-menu-btn.active .hamburger-line:nth-child(2) {
    opacity: 0;
    transform: rotate(0deg) scale(0.2);
  }
  
  .mobile-menu-btn.active .hamburger-line:last-child {
    transform: rotate(-45deg) translate(6px, -6px);
  }
}