:root {
  /* Core futuristic palette */
  --bg-color: #0a0a0f;
  --text-color: #e8f6ff;
  --primary-color: #22d3ee; /* cyan-400 */
  --secondary-color: #7dd3fc; /* sky-300 */
  --accent-blue: #22d3ee;
  --accent-green: #00ffb3;
  --accent-red: #ff6b6b;
  --card-bg: rgba(17, 24, 39, 0.65);
  --card-border: rgba(34, 211, 238, 0.12);
  --shadow-color: rgba(34, 211, 238, 0.15);

  /* Backward-compat aliases (do not remove) */
  --bg: var(--bg-color);
  --text: var(--text-color);
  --card: var(--card-bg);
  --shadow: 0 8px 32px var(--shadow-color);
  --shadow-glow: 0 0 40px rgba(34, 211, 238, 0.3);
  --radius: 20px;
  --nav-height: 70px;
  --avatar-size: 120px;
  --accent: var(--accent-blue);
  --accent2: var(--accent-green);
  --accent3: var(--accent-red);
  --gradient-1: linear-gradient(135deg, #22d3ee 0%, #00ffb3 50%, #ff6b6b 100%);
  --gradient-2: linear-gradient(45deg, #22d3ee 0%, #00ffb3 100%);
  --gradient-3: linear-gradient(135deg, rgba(34, 211, 238, 0.1) 0%, rgba(0, 255, 179, 0.1) 100%);

  /* Background */
  --background-gradient: radial-gradient(1000px 600px at 10% 10%, rgba(34,211,238,0.06), transparent 60%),
    radial-gradient(800px 500px at 80% 20%, rgba(0,255,179,0.06), transparent 60%),
    linear-gradient(135deg, #0b0b12, #0a0a0f 60%, #0c1222);
}



/* Background application */
body {
  background: var(--background-gradient);
  color: var(--text-color);
}

/* Neon utility helpers */
.neon-border { box-shadow: 0 0 0 1px rgba(34,211,238,0.25), 0 0 25px rgba(34,211,238,0.15) inset; }
.glass { background: var(--card-bg); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border: 1px solid var(--card-border); }

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

html, body { 
  height: 100%; 
  scroll-behavior: smooth;
}

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

/* Animated Background */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 20% 80%, rgba(0, 230, 230, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(0, 255, 179, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(255, 107, 107, 0.05) 0%, transparent 50%);
  z-index: -1;
  animation: backgroundShift 20s ease-in-out infinite;
}

@keyframes backgroundShift {
  0%, 100% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(1.1) rotate(1deg); }
}

a { 
  color: var(--accent); 
  text-decoration: none; 
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); 
}

a:hover { 
  color: var(--accent2); 
  text-shadow: 0 0 20px var(--accent2);
}

/* Enhanced Navigation */
nav {
  position: fixed;
  top: 0; 
  left: 0; 
  right: 0;
  height: var(--nav-height);
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border-bottom: 1px solid rgba(34, 211, 238, 0.1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

nav:hover {
  background: rgba(10, 10, 15, 0.98);
  box-shadow: 0 8px 40px rgba(34, 211, 238, 0.25), 0 0 60px rgba(0, 255, 179, 0.1);
  border-bottom-color: rgba(34, 211, 238, 0.3);
  transform: translateY(-1px);
}

nav::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(34, 211, 238, 0.05), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

nav:hover::before {
  opacity: 1;
}

/* Mobile drawer */
.mobile-drawer{position:relative;}
.mobile-drawer .drawer-backdrop{
  position: fixed; inset: var(--nav-height) 0 0 0; background: rgba(0,0,0,0.35); opacity: 0; pointer-events: none; transition: opacity .25s ease; z-index: 999;
}
.mobile-drawer .drawer-panel{
  position: fixed; top: var(--nav-height); right: 0; width: 80%; max-width: 360px; height: calc(100vh - var(--nav-height));
  background: rgba(10,10,15,0.96); backdrop-filter: blur(18px); border-left: 1px solid rgba(0, 230, 230, 0.15);
  padding: 20px; box-shadow: 0 10px 40px rgba(0,0,0,0.5); z-index: 1000; transform: translateX(100%) scale(0.98);
  transition: transform .35s cubic-bezier(.22,.61,.36,1);
}
.drawer-open .drawer-panel{ transform: translateX(0) scale(1); box-shadow: 0 0 40px rgba(0, 230, 230, 0.25); }
.drawer-open .drawer-backdrop{ opacity: 1; pointer-events: auto; }
.drawer-link{ color: #d1d5db; padding: 10px 0; display: block; transition: all .3s ease; }
.drawer-link:hover{ color: #22d3ee; text-shadow: 0 0 10px rgba(34,211,238,0.6); }

.nav-list {
  display: flex;
  gap: 40px;
  list-style: none;
}

.nav-link {
  color: #d1d5db;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.4px;
  padding: 10px 18px;
  border-radius: 12px;
  border: 2px solid transparent;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(5px);
}

/* Simplify nav hover background to avoid color overlap */
.nav-link::before { display: none; }

/* Enhanced nav link background effect */
.nav-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.1), rgba(0, 255, 179, 0.1));
  border-radius: 12px;
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: -1;
}

/* Neon underline */
.nav-link::after {
  content: '';
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 6px;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  box-shadow: 0 0 15px rgba(34,211,238,0.8), 0 0 30px rgba(0,255,179,0.4);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 2px;
}

.nav-link:hover::before {
  opacity: 1;
  transform: scale(1);
}

.nav-link.active, .nav-link:focus {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(34, 211, 238, 0.12);
  box-shadow: 0 0 25px rgba(34, 211, 238, 0.4), 0 8px 30px rgba(34, 211, 238, 0.2);
  transform: translateY(-2px) scale(1.02);
  text-shadow: 0 0 10px rgba(34,211,238,0.9);
}

.nav-link:hover {
  color: var(--accent);
  transform: translateY(-3px) scale(1.05);
  text-shadow: 0 0 12px rgba(34,211,238,0.8), 0 0 24px rgba(0,255,179,0.4);
  border-color: rgba(34, 211, 238, 0.3);
  background: rgba(34, 211, 238, 0.08);
  box-shadow: 0 8px 25px rgba(34, 211, 238, 0.2), 0 0 40px rgba(0, 255, 179, 0.1);
}

.nav-link:hover::after, .nav-link.active::after {
  transform: scaleX(1);
}

/* Neon glow helper for Tailwind links */
.neon-link:hover {
  text-shadow: 0 0 6px rgba(34,211,238,0.9), 0 0 14px rgba(34,211,238,0.5);
}

/* =============================
   Resume List Styling (Ultra-clean, futuristic)
   Usage example in HTML:
   <ul class="resume-list">
     <li>
       <span class="title">Full Stack Developer – Company</span>
       <span class="meta">2023 – Present · Cairo</span>
       <p class="desc">Built X with Y; improved Z by 30%.</p>
     </li>
   </ul>
   ============================= */
.resume-list {
  list-style: none;
  margin: 20px 0 0 0;
  padding: 0;
  display: grid;
  gap: 18px;
}

.resume-list li {
  position: relative;
  padding: 14px 16px 14px 44px;
  border: 1px solid var(--card-border);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.00));
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.resume-list li::before {
  content: '';
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 14px rgba(34,211,238,0.9), 0 0 26px rgba(34,211,238,0.4);
}

.resume-list li:hover {
  transform: translateY(-3px);
  border-color: rgba(34,211,238,0.35);
  box-shadow: 0 12px 32px rgba(34,211,238,0.15);
}

.resume-list .title {
  display: block;
  color: var(--text);
  font-weight: 700;
  letter-spacing: 0.3px;
}

.resume-list .meta {
  display: block;
  margin-top: 4px;
  color: var(--secondary-color);
  font-size: 0.9rem;
}

.resume-list .desc {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.6;
}

.resume-list a {
  color: var(--accent);
}
.resume-list a:hover {
  color: var(--accent2);
  text-shadow: 0 0 10px rgba(0,255,179,0.6);
}

/* =============================
   Custom Animated Cursor Blob
   ============================= */
.cursor-blob {
  position: fixed;
  left: 0; top: 0;
  width: 28px; height: 28px;
  border-radius: 9999px;
  pointer-events: none;
  z-index: 1002;
  transform: translate(-100px, -100px) scale(1);
  will-change: transform, background, box-shadow;
  mix-blend-mode: screen;
  --cursor-color: rgba(34,211,238,0.45);
  background: radial-gradient(circle at 30% 30%, var(--cursor-color), rgba(34,211,238,0) 60%);
  box-shadow: 0 0 24px rgba(34,211,238,0.45);
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.cursor-blob.interactive {
  --cursor-color: rgba(0,255,179,0.55);
  box-shadow: 0 0 28px rgba(0,255,179,0.5);
}

.cursor-blob.clicking {
  --cursor-color: rgba(255,107,107,0.6);
  box-shadow: 0 0 32px rgba(255,107,107,0.55);
}

@media (hover: none) {
  .cursor-blob { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .cursor-blob { display: none; }
}

/* Enhanced Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  background: linear-gradient(135deg, #0a0a0f 0%, #1a1a2e 50%, #16213e 100%);
  overflow: hidden;
  padding-top: var(--nav-height);
}

/* Futuristic hero grid overlay */
.hero-grid{
  position:absolute;
  inset:0;
  background:
    linear-gradient(rgba(0,230,230,0.06) 1px, transparent 1px) 0 0 / 40px 40px,
    linear-gradient(90deg, rgba(0,230,230,0.06) 1px, transparent 1px) 0 0 / 40px 40px;
  mask-image: radial-gradient(circle at 50% 50%, rgba(0,0,0,0.9), rgba(0,0,0,0) 70%);
  pointer-events:none;
  z-index:1;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.floating-icon {
  position: absolute;
  opacity: 0.15;
  font-size: 4rem;
  animation: float 8s ease-in-out infinite alternate;
  color: var(--accent2);
  filter: blur(0.5px);
  text-shadow: 0 0 20px var(--accent2);
}

.floating-icon.i1 { 
  left: 8vw; 
  top: 18vh; 
  animation-delay: 0s; 
  animation-duration: 6s;
}

.floating-icon.i2 { 
  right: 10vw; 
  top: 12vh; 
  animation-delay: 1.2s; 
  animation-duration: 7s;
}

.floating-icon.i3 { 
  left: 18vw; 
  bottom: 10vh; 
  animation-delay: 2.1s; 
  animation-duration: 8s;
}

.floating-icon.i4 { 
  right: 16vw; 
  bottom: 14vh; 
  animation-delay: 0.7s; 
  animation-duration: 9s;
}

@keyframes float {
  0% { 
    transform: translateY(0) scale(1) rotate(0deg); 
    opacity: 0.15;
  }
  50% {
    opacity: 0.25;
  }
  100% { 
    transform: translateY(-30px) scale(1.1) rotate(5deg); 
    opacity: 0.15;
  }
}

.hero-content { 
  position: relative; 
  z-index: 2; 
  animation: fadeInUp 1s ease-out;
}

/* Enhanced glowing hero avatar */
.hero-avatar{
  width: 350px;
  height: 350px;
  border-radius: 9999px;
  border: 3px solid transparent;
  background: linear-gradient(45deg, var(--accent), var(--accent2), var(--accent)) padding-box,
              linear-gradient(45deg, var(--accent), var(--accent2), var(--accent)) border-box;
  box-shadow: 
    0 0 60px rgba(34, 211, 238, 0.5),
    0 0 120px rgba(0, 255, 179, 0.3),
    0 0 180px rgba(34, 211, 238, 0.1),
    inset 0 0 30px rgba(34, 211, 238, 0.15);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  animation: avatarFloat 8s ease-in-out infinite, avatarGlow 4s ease-in-out infinite alternate;
  transform-style: preserve-3d;
}

.hero-avatar::before{
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: inherit;
  background: linear-gradient(45deg, var(--accent), var(--accent2), var(--accent), var(--accent2));
  filter: blur(1px);
  opacity: 0.3;
  z-index: 0;
  animation: borderRotate 10s linear infinite;
}

.hero-avatar::after {
  content: '';
  position: absolute;
  inset: -6px;
  background: linear-gradient(45deg, 
    rgba(34, 211, 238, 0.2), 
    rgba(0, 255, 179, 0.2), 
    rgba(34, 211, 238, 0.2)
  );
  border-radius: inherit;
  z-index: -1;
  animation: borderRotate 15s linear infinite reverse;
  filter: blur(2px);
  opacity: 0.5;
}

.hero-avatar:hover {
  transform: scale(1.1) rotateY(15deg) rotateX(5deg);
  box-shadow: 
    0 0 80px rgba(34, 211, 238, 0.7),
    0 0 160px rgba(0, 255, 179, 0.5),
    0 0 240px rgba(34, 211, 238, 0.3),
    inset 0 0 40px rgba(34, 211, 238, 0.25);
  filter: brightness(1.1) contrast(1.05);
}

.hero-avatar img{ 
  width: 86%; 
  height: 86%; 
  object-fit: cover; 
  border-radius: 9999px; 
  position: relative; 
  z-index: 1; 
  filter: brightness(1.05) contrast(1.02);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-avatar:hover img {
  transform: scale(1.15) rotate(2deg);
  filter: brightness(1.2) contrast(1.1) saturate(1.1);
}

@keyframes avatarFloat {
  0%, 100% { 
    transform: translateY(0px) rotateZ(0deg) scale(1); 
  }
  25% { 
    transform: translateY(-15px) rotateZ(2deg) scale(1.02); 
  }
  50% { 
    transform: translateY(-8px) rotateZ(0deg) scale(1.01); 
  }
  75% { 
    transform: translateY(-20px) rotateZ(-2deg) scale(1.02); 
  }
}

@keyframes avatarGlow {
  0% {
    box-shadow: 
      0 0 60px rgba(34, 211, 238, 0.5),
      0 0 120px rgba(0, 255, 179, 0.3),
      0 0 180px rgba(34, 211, 238, 0.1);
  }
  100% {
    box-shadow: 
      0 0 80px rgba(34, 211, 238, 0.7),
      0 0 160px rgba(0, 255, 179, 0.5),
      0 0 240px rgba(34, 211, 238, 0.2);
  }
}

@keyframes borderRotate {
  0% { 
    transform: rotate(0deg) scale(1);
    opacity: 0.8;
  }
  50% {
    transform: rotate(180deg) scale(1.05);
    opacity: 1;
  }
  100% { 
    transform: rotate(360deg) scale(1);
    opacity: 0.8;
  }
}

@media (max-width: 768px){
  .hero-avatar{ width: 280px; height: 280px; }
}

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

.hero h1 {
  font-size: 3.5rem;
  font-weight: 800;
  letter-spacing: 2px;
  margin-bottom: 20px;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 30px rgba(0, 230, 230, 0.5);
  animation: glow 3s ease-in-out infinite alternate;
}

@keyframes glow {
  from { filter: drop-shadow(0 0 20px rgba(0, 230, 230, 0.5)); }
  to { filter: drop-shadow(0 0 40px rgba(0, 230, 230, 0.8)); }
}

.hero .typing {
  color: var(--accent);
  font-size: 1.8rem;
  font-weight: 700;
  min-height: 2.5rem;
  letter-spacing: 1px;
  margin-bottom: 25px;
  display: inline-block;
  text-shadow: 0 0 20px var(--accent);
}

.hero .subtitle {
  color: var(--muted);
  font-size: 1.3rem;
  max-width: 600px;
  margin: 0 auto 40px auto;
  line-height: 1.6;
  animation: fadeInUp 1s ease-out 0.5s both;
}

.scroll-down {
  position: absolute;
  left: 50%;
  bottom: 40px;
  transform: translateX(-50%);
  cursor: pointer;
  animation: bounce 2s infinite;
  z-index: 2;
  background: rgba(0, 230, 230, 0.1);
  border-radius: 50%;
  padding: 15px;
  border: 2px solid var(--accent);
  transition: all 0.3s ease;
}

.scroll-down:hover {
  background: rgba(0, 230, 230, 0.2);
  transform: translateX(-50%) scale(1.1);
  box-shadow: 0 0 30px rgba(0, 230, 230, 0.4);
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(15px); }
}

.scroll-down svg {
  width: 40px;
  height: 40px;
  fill: var(--accent);
  filter: drop-shadow(0 0 10px var(--accent));
  transition: fill 0.3s;
}

.scroll-down:hover svg { 
  fill: var(--accent2); 
  filter: drop-shadow(0 0 15px var(--accent2));
}

/* Enhanced Section Base */
section:not(.hero) {
  max-width: 1000px;
  margin: 0 auto 80px auto;
  background: var(--card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 50px 40px;
  border: 1px solid rgba(0, 230, 230, 0.1);
  opacity: 0;
  transform: translateY(60px);
  transition: all 1s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-2);
  transform: scaleX(0);
  transition: transform 0.6s ease;
}

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

section.visible::before {
  transform: scaleX(1);
}

section h2 {
  color: var(--accent);
  font-size: 2.5rem;
  margin-bottom: 30px;
  font-weight: 800;
  letter-spacing: 1px;
  text-align: center;
  position: relative;
}

section h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--gradient-2);
  border-radius: 2px;
}

/* Enhanced About Me */
.about-flex {
  display: flex;
  align-items: center;
  gap: 50px;
  flex-wrap: wrap;
  justify-content: center;
}

.avatar {
  width: var(--avatar-size);
  height: var(--avatar-size);
  border-radius: 50%;
  background: var(--gradient-1);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-glow);
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
  animation: avatarGlow 3s ease-in-out infinite alternate;
}

@keyframes avatarGlow {
  0% { box-shadow: 0 0 30px rgba(0, 230, 230, 0.3); }
  100% { box-shadow: 0 0 50px rgba(0, 230, 230, 0.6); }
}

.avatar::before {
  content: '';
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: var(--bg);
  z-index: 1;
}

.avatar {
  position: relative;
  cursor: pointer;
}

.avatar img {
  width: 100%; 
  height: 100%; 
  object-fit: cover; 
  border-radius: 50%; 
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  filter: brightness(1.05) contrast(1.02);
}

.avatar.has-custom-image img {
  filter: brightness(1.1) contrast(1.15) saturate(1.1) drop-shadow(0 0 10px rgba(0, 230, 230, 0.3));
  border-color: var(--accent);
  box-shadow: 0 0 25px rgba(0, 230, 230, 0.3);
  animation: imageLoaded 0.5s ease-out;
  transition: all 0.3s ease;
  position: relative;
  z-index: 2;
}

.avatar.has-custom-image:hover img {
  filter: brightness(1.15) contrast(1.2) saturate(1.2) drop-shadow(0 0 15px rgba(0, 230, 230, 0.5));
  transform: scale(1.02);
  box-shadow: 0 0 35px rgba(0, 230, 230, 0.4);
  animation: imageHover 0.3s ease-out;
}

@keyframes imageHover {
  0% {
    transform: scale(1) rotate(0deg);
  }
  50% {
    transform: scale(1.05) rotate(1deg);
  }
  100% {
    transform: scale(1.02) rotate(0deg);
  }
}

/* Enhanced avatar container */
.avatar.has-custom-image {
  animation: avatarGlow 2s ease-in-out infinite alternate;
}

.avatar.has-custom-image::before {
  content: '';
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  background: linear-gradient(45deg, var(--accent), var(--accent2), var(--accent));
  opacity: 0.3;
  z-index: -1;
  animation: borderGlow 3s ease-in-out infinite alternate;
}

@keyframes avatarGlow {
  0% { 
    box-shadow: 0 0 30px rgba(0, 230, 230, 0.3);
  }
  100% { 
    box-shadow: 0 0 50px rgba(0, 230, 230, 0.6);
  }
}

@keyframes borderGlow {
  0% { 
    opacity: 0.2;
    transform: rotate(0deg);
  }
  100% { 
    opacity: 0.4;
    transform: rotate(360deg);
  }
}

/* Enhanced avatar for mobile */
@media (max-width: 768px) {
  .avatar.has-custom-image {
    animation: avatarGlow 3s ease-in-out infinite alternate;
  }
  
  .avatar.has-custom-image img {
    filter: brightness(1.05) contrast(1.1) saturate(1.05) drop-shadow(0 0 8px rgba(0, 230, 230, 0.3));
  }
  
  .avatar-options {
    flex-direction: row;
    gap: 8px;
  }
  
  .avatar-option {
    font-size: 0.75rem;
    padding: 8px 12px;
  }
}

@keyframes imageLoaded {
  0% {
    transform: scale(0.8) rotate(-5deg);
    opacity: 0.5;
    filter: blur(2px);
  }
  50% {
    transform: scale(1.05) rotate(2deg);
    opacity: 0.8;
    filter: blur(1px);
  }
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
    filter: blur(0px);
  }
}

.avatar:hover img {
  transform: scale(1.05);
  border-color: var(--accent);
  box-shadow: 0 0 30px rgba(0, 230, 230, 0.4);
}

.avatar-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 3;
}

.avatar:hover .avatar-overlay {
  opacity: 1;
}

.avatar-upload {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--text);
  text-align: center;
}

.upload-icon {
  width: 30px;
  height: 30px;
  fill: var(--accent);
  margin-bottom: 8px;
  filter: drop-shadow(0 0 10px var(--accent));
}

.avatar-upload span {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 15px;
  text-shadow: 0 0 10px rgba(0, 230, 230, 0.5);
}

.avatar-tip {
  margin-top: 10px;
  text-align: center;
}

.avatar-tip span {
  font-size: 0.7rem;
  color: var(--muted);
  font-style: italic;
  opacity: 0.8;
  animation: tipGlow 2s ease-in-out infinite alternate;
  cursor: help;
}

.avatar-tip:hover span {
  color: var(--accent);
  opacity: 1;
  text-shadow: 0 0 8px rgba(0, 230, 230, 0.5);
  transform: scale(1.05);
  transition: all 0.3s ease;
}

@keyframes tipGlow {
  0% {
    opacity: 0.6;
    text-shadow: 0 0 5px rgba(0, 230, 230, 0.3);
  }
  100% {
    opacity: 0.9;
    text-shadow: 0 0 10px rgba(0, 230, 230, 0.5);
  }
}

.avatar-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.avatar-option {
  background: rgba(0, 230, 230, 0.2);
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
  position: relative;
  overflow: hidden;
  text-shadow: 0 0 5px rgba(0, 230, 230, 0.3);
}

.avatar-option::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 ease;
}

.avatar-option:hover::before {
  left: 100%;
}

.avatar-option:hover {
  background: var(--accent);
  color: var(--bg);
  transform: scale(1.05);
  box-shadow: 0 0 15px rgba(0, 230, 230, 0.4);
  text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

/* Enhanced avatar for when image is loaded */
.avatar.has-custom-image .avatar-overlay {
  opacity: 0;
  pointer-events: none;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
}

.avatar.has-custom-image:hover .avatar-overlay {
  opacity: 1;
  pointer-events: auto;
  animation: overlayFadeIn 0.3s ease-out;
}

@keyframes overlayFadeIn {
  0% {
    opacity: 0;
    transform: scale(0.9);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.avatar.has-custom-image .avatar-upload span {
  font-size: 0.8rem;
  color: var(--accent2);
  text-shadow: 0 0 8px rgba(0, 255, 179, 0.5);
  animation: textPulse 2s ease-in-out infinite alternate;
}

@keyframes textPulse {
  0% {
    text-shadow: 0 0 8px rgba(0, 255, 179, 0.5);
  }
  100% {
    text-shadow: 0 0 15px rgba(0, 255, 179, 0.8);
  }
}

/* Enhanced avatar for touch devices */
@media (hover: none) {
  .avatar.has-custom-image .avatar-overlay {
    opacity: 0.3;
    pointer-events: auto;
  }
  
  .avatar.has-custom-image .avatar-overlay:hover {
    opacity: 1;
  }
  
  .avatar-option {
    min-height: 44px; /* Better touch target */
  }
  
  .avatar-tip span {
    font-size: 0.8rem; /* Larger text for touch */
  }
  
  .avatar.has-custom-image img {
    filter: brightness(1.05) contrast(1.1) saturate(1.05) drop-shadow(0 0 6px rgba(0, 230, 230, 0.3));
  }
  
  .avatar.has-custom-image {
    animation: avatarGlow 4s ease-in-out infinite alternate;
  }
  
  .avatar-upload span {
    font-size: 0.85rem; /* Slightly larger for touch */
  }
  
  .avatar-tip span {
    font-size: 0.75rem; /* Better for mobile */
  }
  
  .avatar-options {
    gap: 6px; /* Tighter spacing for mobile */
  }
  
  .avatar-option {
    min-width: 60px; /* Better touch targets */
  }
  
  .avatar-upload {
    padding: 10px; /* More space for touch */
  }
  
  .avatar-overlay {
    backdrop-filter: blur(8px); /* Enhanced blur for mobile */
  }
  
  .avatar.has-custom-image::before {
    animation: borderGlow 4s ease-in-out infinite alternate;
  }
  
  .avatar-tip span {
    animation: tipGlow 3s ease-in-out infinite alternate;
  }
  
  .avatar-option:hover {
    transform: scale(1.08); /* Slightly larger for touch */
  }
  
  .avatar.has-custom-image img {
    filter: brightness(1.08) contrast(1.12) saturate(1.08) drop-shadow(0 0 8px rgba(0, 230, 230, 0.4));
  }
  
  .avatar-upload span {
    font-size: 0.8rem; /* Better for mobile */
  }
  
  .avatar-options {
    margin-top: 8px; /* Better spacing for mobile */
  }
  
  .avatar-tip {
    margin-top: 12px; /* Better spacing for mobile */
  }
  
  .avatar.has-custom-image {
    animation: avatarGlow 5s ease-in-out infinite alternate;
  }
  
  .avatar-upload {
    padding: 12px; /* More space for mobile */
  }
  
  .avatar-overlay {
    backdrop-filter: blur(10px); /* Enhanced blur for mobile */
  }
  
  .avatar.has-custom-image img {
    filter: brightness(1.1) contrast(1.15) saturate(1.1) drop-shadow(0 0 10px rgba(0, 230, 230, 0.5));
  }
  
  .avatar-option {
    transition: all 0.4s ease; /* Smoother transitions for mobile */
  }
  
  .avatar.has-custom-image {
    animation: avatarGlow 6s ease-in-out infinite alternate;
  }
  
  .avatar-upload span {
    font-size: 0.85rem; /* Better for mobile */
  }
  
  .avatar-tip span {
    font-size: 0.75rem; /* Better for mobile */
  }
  
  .avatar.has-custom-image::before {
    animation: borderGlow 5s ease-in-out infinite alternate;
  }
}

.about-text {
  color: var(--muted);
  font-size: 1.2rem;
  line-height: 1.8;
  max-width: 600px;
  text-align: center;
}

/* Enhanced Skills Section */
.skills-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  margin-top: 30px;
  justify-content: center;
}

.skills-cat {
  min-width: 200px;
  flex: 1 1 250px;
  background: rgba(24, 26, 32, 0.6);
  border-radius: 16px;
  padding: 25px;
  border: 1px solid rgba(0, 230, 230, 0.1);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.skills-cat:hover {
  border-color: var(--accent);
  box-shadow: 0 0 30px rgba(0, 230, 230, 0.2);
  transform: translateY(-5px);
}

.skills-cat h3 {
  color: var(--accent2);
  font-size: 1.3rem;
  margin-bottom: 20px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-align: center;
  position: relative;
}

.skills-cat h3::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 2px;
  background: var(--accent2);
  border-radius: 1px;
}

.skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}

.skill-card {
  background: rgba(24, 26, 32, 0.8);
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 230, 230, 0.1);
  padding: 20px 16px 15px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 80px;
  min-height: 80px;
  font-size: 1.1rem;
  color: var(--text);
  opacity: 0;
  transform: translateY(40px) scale(0.9);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
}

.skill-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--gradient-2);
  transition: left 0.3s ease;
  z-index: -1;
}

.skill-card.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.skill-card:hover {
  border-color: var(--accent2);
  box-shadow: 0 0 30px rgba(0, 255, 179, 0.3);
  color: var(--text);
  z-index: 2;
  transform: scale(1.1) translateY(-5px);
}

.skill-card:hover::before {
  left: 0;
}

.skill-icon {
  width: 2.5rem;
  height: 2.5rem;
  margin-bottom: 10px;
  filter: drop-shadow(0 0 15px var(--accent));
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 1;
}

.skill-card:hover .skill-icon {
  filter: drop-shadow(0 0 25px var(--accent2));
  transform: scale(1.1);
}

.skill-icon-group {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}

.knowledge-icon-group {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
}

.skill-label {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  position: relative;
  z-index: 1;
}

/* Enhanced Knowledge Section */
.knowledge-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  margin-top: 30px;
  justify-content: center;
}

.knowledge-card {
  background: rgba(24, 26, 32, 0.8);
  border-radius: 16px;
  box-shadow: 0 6px 20px rgba(0, 230, 230, 0.1);
  padding: 30px 25px 25px 25px;
  min-width: 250px;
  max-width: 350px;
  flex: 1 1 280px;
  color: var(--text);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  opacity: 0;
  transform: translateY(40px) scale(0.95);
  transition: all 0.7s cubic-bezier(0.4, 0, 0.2, 1);
  border: 2px solid transparent;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.knowledge-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-2);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.knowledge-card.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.knowledge-card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 40px rgba(0, 230, 230, 0.2);
  color: var(--text);
  z-index: 2;
  transform: scale(1.05) translateY(-8px);
}

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

.knowledge-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 15px;
  color: var(--accent2);
  line-height: 1.4;
}

.knowledge-desc {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

/* Enhanced Contact Section */
.contact-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
}

.contact-icons {
  display: flex;
  gap: 50px;
  justify-content: center;
  margin-bottom: 20px;
}

.contact-link {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(24, 26, 32, 0.8);
  border-radius: 50%;
  width: 80px;
  height: 80px;
  box-shadow: 0 4px 20px rgba(0, 230, 230, 0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 2.5rem;
  color: var(--accent);
  border: 3px solid transparent;
  position: relative;
  overflow: hidden;
}

.contact-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--gradient-2);
  transform: scale(0);
  transition: transform 0.3s ease;
  border-radius: 50%;
}

.contact-link svg {
  width: 2.5em;
  height: 2.5em;
  fill: var(--accent);
  transition: all 0.3s ease;
  position: relative;
  z-index: 1;
}

.contact-link:hover {
  border-color: var(--accent2);
  transform: scale(1.15) translateY(-5px);
  box-shadow: 0 0 40px rgba(0, 255, 179, 0.4);
}

.contact-link:hover::before {
  transform: scale(1);
}

.contact-link:hover svg {
  fill: var(--text);
  filter: drop-shadow(0 0 10px var(--text));
}

/* Enhanced Contact Form */
.contact-form {
  margin-top: 20px;
  width: 100%;
  max-width: 450px;
  background: rgba(24, 26, 32, 0.8);
  border-radius: 16px;
  box-shadow: 0 6px 25px rgba(0, 230, 230, 0.1);
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  border: 2px solid rgba(0, 230, 230, 0.1);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.contact-form:hover {
  border-color: var(--accent);
  box-shadow: 0 0 40px rgba(0, 230, 230, 0.2);
}

.contact-form input, .contact-form textarea {
  background: rgba(35, 38, 47, 0.8);
  border: 2px solid rgba(35, 38, 47, 0.8);
  color: var(--text);
  border-radius: 10px;
  padding: 15px 18px;
  font-size: 1.1rem;
  font-family: inherit;
  transition: all 0.3s ease;
  resize: none;
  backdrop-filter: blur(5px);
}

.contact-form input:focus, .contact-form textarea:focus {
  border-color: var(--accent2);
  box-shadow: 0 0 20px rgba(0, 255, 179, 0.2);
  outline: none;
  transform: translateY(-2px);
}

.contact-form button {
  background: var(--gradient-2);
  color: var(--bg);
  border: none;
  border-radius: 10px;
  padding: 15px 0;
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.contact-form button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, var(--accent2), var(--accent));
  transition: left 0.3s ease;
}

.contact-form button:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 230, 230, 0.4);
}

.contact-form button:hover::before {
  left: 0;
}

.contact-form button span {
  position: relative;
  z-index: 1;
}

.form-success {
  color: var(--accent2);
  font-size: 1.1rem;
  margin-top: 10px;
  text-align: center;
  padding: 10px;
  background: rgba(0, 255, 179, 0.1);
  border-radius: 8px;
  border: 1px solid rgba(0, 255, 179, 0.2);
}

/* Enhanced Back to Top Button */
#backToTop {
  position: fixed;
  right: 30px;
  bottom: 40px;
  background: var(--gradient-2);
  color: var(--bg);
  border: none;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0, 230, 230, 0.3);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  z-index: 100;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
}

#backToTop.visible {
  opacity: 1;
  pointer-events: auto;
}

#backToTop:hover {
  transform: scale(1.1) translateY(-5px);
  box-shadow: 0 8px 30px rgba(0, 230, 230, 0.5);
}

#backToTop svg {
  width: 30px;
  height: 30px;
  fill: var(--bg);
  transition: transform 0.3s ease;
}

#backToTop:hover svg {
  transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 900px) {
  section:not(.hero) { 
    padding: 35px 20px; 
    margin: 0 auto 60px auto;
  }
  .about-flex { 
    flex-direction: column; 
    gap: 30px; 
    align-items: center; 
  }
  .skills-cats { 
    gap: 25px; 
  }
  .knowledge-grid { 
    gap: 20px; 
  }
  .contact-icons {
    gap: 30px;
  }
  .contact-link {
    width: 70px;
    height: 70px;
  }
}

@media (max-width: 600px) {
  .hero h1 { 
    font-size: 2.5rem; 
  }
  .hero .typing { 
    font-size: 1.3rem; 
  }
  section h2 { 
    font-size: 2rem; 
  }
  .skills-cat { 
    min-width: 150px; 
  }
  .knowledge-card { 
    min-width: 200px; 
    padding: 20px 15px; 
  }
  #backToTop { 
    right: 15px; 
    bottom: 20px; 
    width: 50px; 
    height: 50px; 
  }
  #backToTop svg { 
    width: 25px; 
    height: 25px; 
  }
  nav { 
    height: 60px; 
  }
  .nav-list { 
    gap: 20px; 
  }
  .nav-link {
    font-size: 1rem;
    padding: 6px 12px;
  }
}

/* Loading Animation */
.loading {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease;
}

.loading.hidden {
  opacity: 0;
  pointer-events: none;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 3px solid rgba(0, 230, 230, 0.3);
  border-top: 3px solid var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Enhanced Hero Buttons */
.hero-buttons {
  display: flex;
  gap: 20px;
  margin-top: 30px;
  animation: fadeInUp 1s ease-out 0.8s both;
}

.hero-btn {
  padding: 15px 30px;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  border: 2px solid transparent;
}

.hero-btn.primary {
  background: var(--gradient-2);
  color: var(--bg);
  box-shadow: 0 4px 20px rgba(0, 230, 230, 0.3);
}

.hero-btn.secondary {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}

.hero-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0, 230, 230, 0.4);
}

.hero-btn.primary:hover {
  background: var(--accent2);
  color: var(--bg);
}

.hero-btn.secondary:hover {
  background: var(--accent);
  color: var(--bg);
}

/* Enhanced About Stats */
.about-stats {
  display: flex;
  gap: 30px;
  margin-top: 25px;
  justify-content: center;
  flex-wrap: wrap;
}

.stat {
  text-align: center;
  padding: 15px;
  background: rgba(0, 230, 230, 0.1);
  border-radius: 12px;
  border: 1px solid rgba(0, 230, 230, 0.2);
  transition: all 0.3s ease;
}

.stat:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 230, 230, 0.2);
}

.stat-number {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 5px;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 500;
}

/* Enhanced Skill Levels */
.skill-level {
  width: 100%;
  height: 4px;
  background: rgba(0, 230, 230, 0.2);
  border-radius: 2px;
  margin-top: 8px;
  overflow: hidden;
}

.skill-progress {
  height: 100%;
  background: var(--gradient-2);
  border-radius: 2px;
  transition: width 1s ease;
  position: relative;
}

.skill-progress::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Enhanced Knowledge Icons and Tags */
.knowledge-icon {
  font-size: 2.5rem;
  margin-bottom: 15px;
  filter: drop-shadow(0 0 15px var(--accent));
}

.knowledge-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 15px;
}

.tag {
  background: rgba(0, 230, 230, 0.1);
  color: var(--accent);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  border: 1px solid rgba(0, 230, 230, 0.2);
  transition: all 0.3s ease;
}

.tag:hover {
  background: rgba(0, 230, 230, 0.2);
  transform: scale(1.05);
}

/* Enhanced Projects Section */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 30px;
  margin-top: 30px;
  perspective: 1000px;
}

.project-card {
  background: rgba(24, 26, 32, 0.8);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3), 0 0 20px rgba(34, 211, 238, 0.1);
  border: 2px solid rgba(34, 211, 238, 0.1);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  transform-style: preserve-3d;
  position: relative;
  backdrop-filter: blur(15px);
  opacity: 0;
  transform: translateY(50px) scale(0.9);
  animation: projectCardReveal 0.8s ease-out forwards;
}

.project-card:nth-child(1) { animation-delay: 0.1s; }
.project-card:nth-child(2) { animation-delay: 0.2s; }
.project-card:nth-child(3) { animation-delay: 0.3s; }
.project-card:nth-child(4) { animation-delay: 0.4s; }

@keyframes projectCardReveal {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.1), rgba(0, 255, 179, 0.1));
  opacity: 0;
  transition: opacity 0.4s ease;
  border-radius: 20px;
  z-index: -1;
}

.project-card::after {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, var(--accent), var(--accent2), var(--accent));
  border-radius: 22px;
  opacity: 0;
  z-index: -2;
  transition: opacity 0.4s ease;
  animation: borderGlow 3s ease-in-out infinite alternate;
}

.project-card:hover {
  transform: translateY(-20px) rotateX(8deg) rotateY(-5deg) scale(1.05);
  border-color: var(--accent);
  box-shadow: 
    0 25px 50px rgba(0, 0, 0, 0.5),
    0 0 80px rgba(34, 211, 238, 0.4),
    0 0 120px rgba(0, 255, 179, 0.3),
    inset 0 0 30px rgba(34, 211, 238, 0.15);
  filter: brightness(1.1) contrast(1.05);
}

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

.project-card:hover::after {
  opacity: 0.3;
}

.project-image {
  height: 220px;
  background: var(--gradient-3);
  position: relative;
  overflow: hidden;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-image::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, rgba(34, 211, 238, 0.1), rgba(0, 255, 179, 0.1));
  opacity: 0;
  transition: opacity 0.4s ease;
}

.project-card:hover .project-image {
  transform: scale(1.15) rotate(2deg);
  filter: brightness(1.2) contrast(1.1) saturate(1.2);
}

.project-card:hover .project-image::before {
  opacity: 1;
}

.project-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.9));
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card:hover .project-overlay {
  opacity: 1;
  transform: scale(1);
}

.project-links {
  display: flex;
  gap: 15px;
}

.project-link {
  padding: 12px 24px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: var(--bg);
  text-decoration: none;
  border-radius: 12px;
  font-weight: 700;
  font-size: 1rem;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  border: 2px solid transparent;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  letter-spacing: 0.5px;
}

.project-link::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 ease;
}

.project-link:hover {
  transform: scale(1.15) translateY(-4px) rotate(1deg);
  box-shadow: 
    0 12px 35px rgba(34, 211, 238, 0.6),
    0 0 50px rgba(0, 255, 179, 0.4),
    0 0 80px rgba(34, 211, 238, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
  background: linear-gradient(135deg, var(--accent2), var(--accent));
  animation: linkPulse 1.5s ease-in-out infinite alternate;
}

@keyframes linkPulse {
  0% {
    box-shadow: 
      0 12px 35px rgba(34, 211, 238, 0.6),
      0 0 50px rgba(0, 255, 179, 0.4);
  }
  100% {
    box-shadow: 
      0 15px 45px rgba(34, 211, 238, 0.8),
      0 0 70px rgba(0, 255, 179, 0.6);
  }
}

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

.project-content {
  padding: 30px;
  position: relative;
  background: rgba(24, 26, 32, 0.6);
  backdrop-filter: blur(10px);
  transition: all 0.4s ease;
}

.project-card:hover .project-content {
  background: rgba(24, 26, 32, 0.9);
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 10px 30px rgba(34, 211, 238, 0.2);
}

.project-content h3 {
  color: var(--accent2);
  font-size: 1.4rem;
  margin-bottom: 12px;
  font-weight: 800;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  position: relative;
}

.project-content h3::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent2), var(--accent));
  transition: width 0.4s ease;
}

.project-card:hover .project-content h3 {
  color: var(--accent);
  text-shadow: 0 0 20px rgba(34, 211, 238, 0.8), 0 0 40px rgba(0, 255, 179, 0.4);
  transform: translateX(8px) scale(1.05);
  animation: titlePulse 2s ease-in-out infinite alternate;
}

@keyframes titlePulse {
  0% { text-shadow: 0 0 20px rgba(34, 211, 238, 0.8), 0 0 40px rgba(0, 255, 179, 0.4); }
  100% { text-shadow: 0 0 30px rgba(34, 211, 238, 1), 0 0 60px rgba(0, 255, 179, 0.6); }
}

.project-card:hover .project-content h3::after {
  width: 60px;
}

.project-content p {
  color: #b0b7c3;
  line-height: 1.7;
  margin-bottom: 18px;
  font-size: 1.05rem;
  transition: all 0.3s ease;
}

.project-card:hover .project-content p {
  color: var(--text);
  transform: translateX(5px) translateY(-2px);
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  transition: all 0.3s ease;
}

.project-card:hover .project-tech {
  transform: translateX(8px) translateY(-3px);
}

.tech-tag {
  background: rgba(0, 255, 179, 0.1);
  color: var(--accent2);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid rgba(0, 255, 179, 0.3);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(5px);
}

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

.project-card:hover .tech-tag {
  background: rgba(0, 255, 179, 0.25);
  border-color: var(--accent2);
  transform: translateY(-4px) scale(1.08) rotate(2deg);
  box-shadow: 0 6px 20px rgba(0, 255, 179, 0.3);
  text-shadow: 0 0 12px rgba(0, 255, 179, 0.7);
}

.project-card:hover .tech-tag:nth-child(odd) {
  animation: techTagFloatAdvanced 2.5s ease-in-out infinite alternate;
  animation-delay: 0.1s;
}

.project-card:hover .tech-tag:nth-child(even) {
  animation: techTagFloatAdvanced 2.5s ease-in-out infinite alternate-reverse;
  animation-delay: 0.2s;
}

.project-card:hover .tech-tag:nth-child(3n) {
  animation: techTagSpin 3s ease-in-out infinite;
  animation-delay: 0.3s;
}

@keyframes techTagFloatAdvanced {
  0% { 
    transform: translateY(-4px) scale(1.08) rotate(2deg);
    box-shadow: 0 6px 20px rgba(0, 255, 179, 0.3);
  }
  50% {
    transform: translateY(-8px) scale(1.12) rotate(-1deg);
    box-shadow: 0 10px 30px rgba(0, 255, 179, 0.4);
  }
  100% { 
    transform: translateY(-6px) scale(1.1) rotate(3deg);
    box-shadow: 0 8px 25px rgba(0, 255, 179, 0.35);
  }
}

@keyframes techTagSpin {
  0%, 100% { 
    transform: translateY(-4px) scale(1.08) rotate(2deg);
  }
  25% {
    transform: translateY(-6px) scale(1.1) rotate(8deg);
  }
  50% {
    transform: translateY(-8px) scale(1.12) rotate(-2deg);
  }
  75% {
    transform: translateY(-6px) scale(1.1) rotate(-8deg);
  }
}

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

/* Enhanced Contact Info */
.contact-info {
  text-align: center;
  margin-bottom: 20px;
}

.contact-info h3 {
  color: var(--accent2);
  font-size: 1.5rem;
  margin-bottom: 10px;
  font-weight: 700;
}

.contact-info p {
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.6;
  max-width: 500px;
  margin: 0 auto;
}

/* Enhanced Form Groups */
.form-group {
  position: relative;
}

.form-group input,
.form-group textarea {
  width: 100%;
  background: rgba(35, 38, 47, 0.8);
  border: 2px solid rgba(35, 38, 47, 0.8);
  color: var(--text);
  border-radius: 10px;
  padding: 15px 18px;
  font-size: 1.1rem;
  font-family: inherit;
  transition: all 0.3s ease;
  resize: none;
  backdrop-filter: blur(5px);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent2);
  box-shadow: 0 0 20px rgba(0, 255, 179, 0.2);
  outline: none;
  transform: translateY(-2px);
}

/* Additional Floating Icons */
.floating-icon.i5 { 
  left: 25vw; 
  top: 25vh; 
  animation-delay: 1.5s; 
  animation-duration: 10s;
}

.floating-icon.i6 { 
  right: 25vw; 
  bottom: 25vh; 
  animation-delay: 2.3s; 
  animation-duration: 11s;
}

/* Responsive Enhancements */
@media (max-width: 768px) {
  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .about-stats {
    gap: 20px;
  }
  
  .projects-grid {
    grid-template-columns: 1fr;
  }
  
  .knowledge-tags {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 2rem;
  }
  
  .hero .typing {
    font-size: 1.1rem;
  }
  
  .hero .subtitle {
    font-size: 1rem;
  }
  
  .about-stats {
    flex-direction: column;
    align-items: center;
  }
  
  .stat {
    width: 100%;
    max-width: 200px;
  }
  
  .avatar-options {
    flex-direction: row;
    gap: 5px;
  }
  
  .avatar-option {
    font-size: 0.7rem;
    padding: 4px 8px;
  }
  
  .avatar-upload span {
    font-size: 0.8rem;
  }
}