/* ===== CSS Variables ===== */
:root {
  /* Colors */
  --primary-color: #00B4D8;
  --primary-dark: #0077B6;
  --primary-light: #48CAE4;
  --accent-color: #90E0EF;
  --bg-color: #0d0d1a;
  --bg-secondary: #1a1a2e;
  --text-color: #f0f0f5;
  --text-secondary: #a0a0b0;
  
  /* Enhanced Glassmorphism */
  --glass-bg: rgba(255, 255, 255, 0.08);
  --glass-bg-hover: rgba(255, 255, 255, 0.12);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-border-hover: rgba(0, 180, 216, 0.3);
  --glass-shadow: 0 8px 32px rgba(2, 2, 8, 0.4);
  --glass-shadow-hover: 0 16px 48px rgba(2, 2, 8, 0.6);
  --glass-backdrop: blur(12px);
  --glass-backdrop-strong: blur(20px);
  
  /* Spacing */
  --section-padding: 5rem 0;
  --container-padding: 0 1.5rem;
  
  /* Enhanced Transitions */
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-long: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  --transition-smooth: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ===== Base Styles ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* Mouse-following gradient background */
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(0, 180, 216, 0.15) 0%,
    rgba(72, 202, 228, 0.1) 20%,
    rgba(144, 224, 239, 0.05) 40%,
    transparent 70%);
  pointer-events: none;
  z-index: -1;
  transition: background 0.3s ease;
}

/* Animated Background Particles */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    radial-gradient(2px 2px at 20px 30px, rgba(0, 180, 216, 0.3), transparent),
    radial-gradient(2px 2px at 40px 70px, rgba(72, 202, 228, 0.2), transparent),
    radial-gradient(1px 1px at 90px 40px, rgba(144, 224, 239, 0.4), transparent),
    radial-gradient(1px 1px at 130px 80px, rgba(0, 180, 216, 0.2), transparent),
    radial-gradient(2px 2px at 160px 30px, rgba(72, 202, 228, 0.3), transparent);
  background-repeat: repeat;
  background-size: 200px 100px;
  animation: float 20s ease-in-out infinite;
  pointer-events: none;
  z-index: -1;
}

@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  33% { transform: translateY(-30px) rotate(0.5deg); }
  66% { transform: translateY(-20px) rotate(-0.5deg); }
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

a {
  text-decoration: none;
  color: var(--primary-color);
  transition: var(--transition);
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

/* Glorious glowing mouse effect */
.glowing-circle {
  position: fixed;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 180, 216, 0.8) 0%, rgba(0, 180, 216, 0.4) 10%, rgba(0, 180, 216, 0) 100%);
  box-shadow: 0 0 30px rgba(0, 180, 216, 0.8),
              0 0 60px rgba(0, 180, 216, 0.6),
              0 0 90px rgba(0, 180, 216, 0.4),
              0 0 120px rgba(0, 180, 216, 0.2);
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 9999;
  transition: all 0.2s ease-out;
  mix-blend-mode: screen;
}

.glowing-circle.active {
  width: 50px;
  height: 50px;
  background: radial-gradient(circle, rgba(0, 180, 216, 1) 0%, rgba(0, 180, 216, 0.6) 70%, rgba(0, 180, 216, 0) 100%);
  box-shadow: 0 0 40px rgba(0, 180, 216, 1),
              0 0 80px rgba(0, 180, 216, 0.8),
              0 0 120px rgba(0, 180, 216, 0.6),
              0 0 160px rgba(0, 180, 216, 0.4);
}

.glowing-circle.pulse {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 30px rgba(0, 180, 216, 0.8),
                0 0 60px rgba(0, 180, 216, 0.6),
                0 0 90px rgba(0, 180, 216, 0.4),
                0 0 120px rgba(0, 180, 216, 0.2);
  }
  50% {
    box-shadow: 0 0 40px rgba(0, 180, 216, 1),
                0 0 80px rgba(0, 180, 216, 0.8),
                0 0 120px rgba(0, 180, 216, 0.6),
                0 0 160px rgba(0, 180, 216, 0.4);
  }
  100% {
    box-shadow: 0 0 30px rgba(0, 180, 216, 0.8),
                0 0 60px rgba(0, 180, 216, 0.6),
                0 0 90px rgba(0, 180, 216, 0.4),
                0 0 120px rgba(0, 180, 216, 0.2);
  }
}

.section-title {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: var(--primary-color);
  border-radius: 2px;
}

.highlight {
  color: var(--primary-color);
}

.btn {
  display: inline-block;
  padding: 0.8rem 1.8rem;
  border-radius: 30px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: var(--transition-bounce);
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

/* Ripple effect for buttons */
.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transition: width 0.6s, height 0.6s;
  transform: translate(-50%, -50%);
  z-index: -1;
}

.btn:active::before {
  width: 300px;
  height: 300px;
}

/* Enhanced button animations */
.btn:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.btn:active {
  transform: translateY(-1px) scale(1.02);
}

.primary-btn {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  color: var(--bg-color);
  box-shadow: 0 4px 15px rgba(0, 180, 216, 0.3);
  position: relative;
}

.primary-btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
  border-radius: inherit;
  opacity: 0;
  transition: var(--transition);
  z-index: -1;
}

.primary-btn:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 15px 30px rgba(0, 180, 216, 0.4), 0 0 20px rgba(0, 180, 216, 0.3);
}

.primary-btn:hover::after {
  opacity: 1;
}

/* Shimmer effect for download CV button */
.primary-btn.shimmer::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: 0.5s;
}

.primary-btn.shimmer:hover::before {
  animation: shimmer 2s infinite;
}

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

/* Heartbeat effect for download CV button */
@keyframes heartbeat {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(0, 180, 216, 0.7);
  }
  14% {
    transform: scale(1.1);
    box-shadow: 0 0 0 10px rgba(0, 180, 216, 0.3);
  }
  28% {
    transform: scale(1);
    box-shadow: 0 0 0 20px rgba(0, 180, 216, 0.1);
  }
  42% {
    transform: scale(1.1);
    box-shadow: 0 0 0 30px rgba(0, 180, 216, 0.05);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 10px rgba(0, 180, 216, 0);
  }
}

.primary-btn.heartbeat {
  animation: heartbeat 2s infinite;
}

.primary-btn.heartbeat:hover {
  animation: none;
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.secondary-btn {
  background: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.secondary-btn:hover {
  background: var(--primary-color);
  color: var(--bg-color);
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.glass-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-backdrop);
  -webkit-backdrop-filter: var(--glass-backdrop);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  box-shadow: var(--glass-shadow);
  transition: var(--transition-long);
  overflow: hidden;
  position: relative;
}

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

.glass-card:hover {
  transform: translateY(-8px) scale(1.02);
  background: var(--glass-bg-hover);
  border-color: var(--glass-border-hover);
  box-shadow: var(--glass-shadow-hover), 0 0 30px rgba(0, 180, 216, 0.2);
}

.glass-card:hover::before {
  left: 100%;
  transition: var(--transition-smooth);
}

/* Enhanced glass card with shimmer */
.glass-card.shimmer {
  overflow: hidden;
}

.glass-card.shimmer::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg,
    transparent 30%,
    rgba(255, 255, 255, 0.1) 50%,
    transparent 70%);
  transform: rotate(45deg);
  animation: shimmer-rotate 3s linear infinite;
}

@keyframes shimmer-rotate {
  0% { transform: rotate(45deg) translate(-100%, -100%); }
  100% { transform: rotate(45deg) translate(100%, 100%); }
}

/* ===== Navigation ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 1.2rem 0;
  transition: var(--transition);
  background: rgba(10, 10, 20, 0.8);
  backdrop-filter: var(--glass-backdrop);
  -webkit-backdrop-filter: var(--glass-backdrop);
  border-bottom: 1px solid var(--glass-border);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

.nav-logo a {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-color);
}

.nav-logo span {
  color: var(--primary-color);
}

.nav-menu {
  display: flex;
  align-items: center;
}

.nav-item {
  margin: 0 1rem;
}

.nav-link {
  color: var(--text-color);
  font-weight: 500;
  position: relative;
  padding: 0.5rem 0;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* Download CV button in navigation */
.nav-link.btn {
  padding: 0.5rem 1rem;
  margin-left: 1rem;
  display: inline-block;
}

.nav-link.btn:hover::after {
  display: none;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
}

.bar {
  width: 25px;
  height: 3px;
  background: var(--text-color);
  margin: 3px 0;
  transition: var(--transition);
}

/* ===== Hero Section ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 8rem 0 5rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(0, 180, 216, 0.1) 0%, rgba(10, 10, 20, 0) 70%);
  z-index: -1;
}

.hero-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

.hero-content {
  flex: 1;
  padding-bottom: 1rem;
}

.hero-title {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  line-height: 1.2;
  opacity: 0;
  animation: slideInUp 1s ease-out 0.5s forwards;
}

.hero-subtitle {
  font-size: 1.8rem;
  color: var(--primary-light);
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: slideInUp 1s ease-out 0.8s forwards;
}

/* Typing animation for hero text */
.typing-text {
  border-right: 3px solid var(--primary-color);
  animation: typing 3s steps(20) 1.5s forwards, blink 1s infinite 1.5s;
  white-space: nowrap;
  overflow: hidden;
  width: 0;
}

@keyframes typing {
  from { width: 0; }
  to { width: 100%; }
}

@keyframes blink {
  0%, 50% { border-color: var(--primary-color); }
  51%, 100% { border-color: transparent; }
}

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

.hero-description {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  max-width: 600px;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
}

.hero-image {
  flex: 1;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Portrait over circle layout */
.portrait-container {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.circle-background {
  width: 350px;
  height: 350px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2a2a4e, #1a1a2e);
  box-shadow:
    0 0 50px rgba(0, 0, 0, 0.5),
    inset 0 0 50px rgba(0, 180, 216, 0.1);
  position: relative;
  z-index: 1;
  animation: float-gentle 6s ease-in-out infinite;
}

.portrait-image {
  position: absolute;
  z-index: 2;
  width: 280px;
  height: 350px;
  object-fit: cover;
  /* left: 50%; */
  bottom:  10%;
  transform: translate(-50%,-20%);
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.3));
  animation: float-gentle 6s ease-in-out infinite reverse;
}

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

/* Floating elements around hero */
.hero::after {
  content: '';
  position: absolute;
  width: 100px;
  height: 100px;
  background: radial-gradient(circle, rgba(0, 180, 216, 0.1), transparent);
  border-radius: 50%;
  top: 20%;
  right: 10%;
  animation: float-slow 8s ease-in-out infinite;
  z-index: -1;
}

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

/* Portrait over circle layout */
.portrait-container {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* .circle-background {
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: #1a1a2e;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
  position: relative;
  z-index: 1;
} */

/* .portrait-image {
  position: absolute;
  z-index: 2;
  width: 280px;
  height: 350px;
  object-fit: cover;
  /* filter: grayscale(30%) contrast(110%) brightness(90%); */
  /* border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
} */ 

/* ===== About Section ===== */
.about {
  padding: var(--section-padding);
  background: var(--bg-secondary);
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.about-text p {
  margin-bottom: 1.5rem;
  color: var(--text-secondary);
  font-size: 1rem;
}

.skills h3 {
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
}

.skill-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.skill {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.5rem;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-backdrop);
  -webkit-backdrop-filter: var(--glass-backdrop);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  transition: var(--transition-bounce);
  position: relative;
  overflow: hidden;
}

.skill::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg,
    transparent,
    rgba(0, 180, 216, 0.1),
    transparent);
  transition: var(--transition-smooth);
}

.skill:hover {
  transform: translateY(-8px) scale(1.05);
  border-color: var(--primary-color);
  box-shadow: 0 10px 25px rgba(0, 180, 216, 0.2);
}

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

/* Staggered animation for skills */
.skill:nth-child(1) { animation: slideInUp 0.6s ease-out 0.2s both; }
.skill:nth-child(2) { animation: slideInUp 0.6s ease-out 0.4s both; }
.skill:nth-child(3) { animation: slideInUp 0.6s ease-out 0.6s both; }
.skill:nth-child(4) { animation: slideInUp 0.6s ease-out 0.8s both; }
.skill:nth-child(5) { animation: slideInUp 0.6s ease-out 1.0s both; }
.skill:nth-child(6) { animation: slideInUp 0.6s ease-out 1.2s both; }
.skill:nth-child(7) { animation: slideInUp 0.6s ease-out 1.4s both; }
.skill:nth-child(8) { animation: slideInUp 0.6s ease-out 1.6s both; }
.skill:nth-child(9) { animation: slideInUp 0.6s ease-out 1.8s both; }

.skill i {
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 0.8rem;
}

.skill:not(.no-filter) img {
  width: 2rem;
  height: 2rem;
  margin-bottom: 0.8rem;
  filter: brightness(0) saturate(100%) invert(54%) sepia(92%) saturate(2446%) hue-rotate(151deg) brightness(99%) contrast(101%);
}

/* Or target only the Bloc Pattern to remove filter */
.skill.no-filter img {
    width: 3rem;
  height: 3rem;
  filter: none;
}

.skill span {
  font-weight: 500;
}

.about-stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.stat-card {
  padding: 2rem;
  text-align: center;
}

.stat-card h3 {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

/* ===== Education Section ===== */
.education {
  padding: var(--section-padding);
  background: var(--bg-secondary);
}

.education-content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  max-width: 800px;
  margin: 0 auto;
}

.education-item {
  padding: 2rem;
  transition: var(--transition-bounce);
  animation: fadeInUp 0.8s ease-out both;
  position: relative;
  overflow: hidden;
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.education-item:nth-child(1) { animation-delay: 0.1s; }
.education-item:nth-child(2) { animation-delay: 0.2s; }

.education-badge {
  background: var(--primary-color);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 5px 15px rgba(0, 180, 216, 0.3);
}

.education-badge i {
  font-size: 1.8rem;
  color: var(--bg-color);
}

.education-header {
  flex: 1;
}

.education-header h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--text-color);
}

.education-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.education-meta .institution,
.education-meta .location,
.education-meta .duration {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.education-meta .institution {
  font-weight: 600;
  color: var(--primary-color);
}

.education-meta .location {
  color: var(--accent-color);
}

.education-meta .duration {
  color: var(--text-secondary);
}

.education-details ul {
  padding-left: 1.5rem;
  margin: 1rem 0 0;
}

.education-details li {
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.education-details li i {
  color: var(--primary-color);
  margin-top: 0.3rem;
}

.education-item:hover .education-badge {
  transform: scale(1.1);
  box-shadow: 0 8px 20px rgba(0, 180, 216, 0.5);
}

.education-item:hover .education-badge i {
  transform: rotate(10deg);
  transition: var(--transition);
}

/* ===== Projects Section ===== */
.projects {
  padding: var(--section-padding);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 1.5rem;
}

.project-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: var(--transition-bounce);
  animation: fadeInUp 0.8s ease-out both;
}

.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; }
.project-card:nth-child(5) { animation-delay: 0.5s; }
.project-card:nth-child(6) { animation-delay: 0.6s; }

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

.project-image {
  height: 200px;
  overflow: hidden;
}

.project-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 1rem;
  background: linear-gradient(45deg, rgba(0, 180, 216, 0.2), rgba(0, 119, 182, 0.2)), var(--glass-bg);
  transition: var(--transition);
  backdrop-filter: blur(5px);
}

.project-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, var(--primary-dark), var(--primary-light));
  opacity: 0.7;
  position: relative;
}

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

.project-content h3 {
  margin-bottom: 0.5rem;
  font-size: 1.4rem;
}

.project-content p {
  color: var(--text-secondary);
  margin-bottom: 0.8rem;
  flex: 1;
}

.project-buttons {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
}

.project-buttons .btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
}

.project-links {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
}

.project-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary-color);
  font-weight: 500;
  font-size: 0.9rem;
}

.project-link:hover {
  color: var(--primary-light);
}

/* ===== Contact Section ===== */
.contact {
  padding: var(--section-padding);
  background: var(--bg-secondary);
}

.contact-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.contact-card {
  padding: 2.5rem;
}

.contact-card h3 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

.contact-card p {
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.contact-details {
  margin-bottom: 2rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.contact-item i {
  color: var(--primary-color);
  font-size: 1.2rem;
  width: 24px;
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-links a {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--glass-bg);
  color: var(--text-color);
  font-size: 1.2rem;
  transition: var(--transition-bounce);
  position: relative;
  overflow: hidden;
}

.social-links a::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--primary-color);
  border-radius: 50%;
  transform: scale(0);
  transition: var(--transition-bounce);
  z-index: -1;
}

.social-links a:hover {
  color: var(--bg-color);
  transform: translateY(-5px) scale(1.1);
}

.social-links a:hover::before {
  transform: scale(1);
}

/* Pulse animation for social links */
.social-links a:nth-child(1) { animation: pulse-gentle 2s ease-in-out infinite; }
.social-links a:nth-child(2) { animation: pulse-gentle 2s ease-in-out infinite 0.2s; }
.social-links a:nth-child(3) { animation: pulse-gentle 2s ease-in-out infinite 0.4s; }
.social-links a:nth-child(4) { animation: pulse-gentle 2s ease-in-out infinite 0.6s; }
.social-links a:nth-child(5) { animation: pulse-gentle 2s ease-in-out infinite 0.8s; }

@keyframes pulse-gentle {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0, 180, 216, 0.4); }
  50% { box-shadow: 0 0 0 10px rgba(0, 180, 216, 0); }
}

.contact-form {
  padding: 2.5rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-backdrop);
  -webkit-backdrop-filter: var(--glass-backdrop);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  color: var(--text-color);
  font-family: inherit;
  font-size: 1rem;
  transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0, 180, 216, 0.2);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

/* ===== Footer ===== */
.footer {
  background: var(--bg-secondary);
  padding: 3rem 0;
  border-top: 1px solid var(--glass-border);
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.footer-logo a {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-color);
  margin-bottom: 1.5rem;
}

.footer-logo span {
  color: var(--primary-color);
}

.footer-social {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.footer-social a {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: var(--glass-bg);
  color: var(--text-color);
  font-size: 1.3rem;
  transition: var(--transition);
}

.footer-social a:hover {
  background: var(--primary-color);
  color: var(--bg-color);
  transform: translateY(-5px);
}

.footer-text p {
  color: var(--text-secondary);
}

/* ===== Floating Download CV Button for Mobile ===== */
.mobile-cv-btn {
  display: none;
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 999;
  padding: 12px 20px;
  border-radius: 30px;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: 0 4px 15px rgba(0, 180, 216, 0.3);
  align-items: center;
  gap: 8px;
}

@media screen and (min-width: 993px) {
  .mobile-cv-btn {
    display: none !important;
  }
}

@media screen and (max-width: 992px) {
  .mobile-cv-btn {
    display: flex;
  }
}

/* ===== Responsive Design ===== */
@media screen and (max-width: 992px) {
  .mobile-cv-btn {
    display: flex;
  }
  
  .hero-container {
    flex-direction: column;
    text-align: center;
  }
  
  .hero-content {
    padding-right: 0;
    margin-bottom: 3rem;
  }
  
  .hero-buttons {
    justify-content: center;
  }
  
  .about-content,
  .contact-container {
    grid-template-columns: 1fr;
  }
  
  .about-stats {
    grid-template-columns: repeat(3, 1fr);
  }
  
  /* Responsive portrait layout */
  .circle-background {
    width: 250px;
    height: 250px;
  }
  
  .portrait-image {
    width: 230px;
    height: 300px;
  }
}

@media screen and (max-width: 768px) {
  .nav-menu {
    position: fixed;
    left: -100%;
    top: 70px;
    flex-direction: column;
    background: var(--bg-secondary);
    width: 100%;
    text-align: center;
    transition: var(--transition);
    box-shadow: var(--glass-shadow);
    padding: 2rem 0;
  }
  
  .nav-menu.active {
    left: 0;
  }
  
  .nav-item {
    margin: 1rem 0;
  }
  
  /* Adjust CV button for mobile */
  .nav-link.btn {
    margin: 1rem auto;
    display: inline-block;
  }
  
  .nav-toggle {
    display: flex;
  }
  
  .nav-toggle.active .bar:nth-child(2) {
    opacity: 0;
  }
  
  .nav-toggle.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  
  .nav-toggle.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }
  
  .hero-title {
    font-size: 2.8rem;
  }
  
  .hero-subtitle {
    font-size: 1.5rem;
  }
  
  .section-title {
    font-size: 2rem;
  }
  
  .skill-container {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .about-stats {
    grid-template-columns: 1fr;
  }
  
  .projects-grid {
    grid-template-columns: 1fr;
  }
  
  /* Responsive portrait layout */
  .circle-background {
    width: 200px;
    height: 200px;
  }
  
  .portrait-image {
    width: 180px;
    height: 250px;
  }
}

@media screen and (max-width: 576px) {
  .hero {
    padding: 6rem 0 3rem;
  }
  
  .hero-title {
    font-size: 2.2rem;
  }
  
  .hero-buttons {
    flex-direction: column;
    gap: 1rem;
  }
  
  .skill-container {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .contact-form,
  .contact-card {
    padding: 1.5rem;
  }
  
  /* Responsive portrait layout */
  .circle-background {
    width: 180px;
    height: 180px;
  }
  
  .portrait-image {
    width: 160px;
    height: 220px;
  }
}

/* ===== Enhanced Interactive Effects ===== */

/* Ripple effect */
.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(0, 180, 216, 0.3);
  transform: scale(0);
  animation: ripple-animation 0.6s linear;
  pointer-events: none;
}

@keyframes ripple-animation {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* Enhanced cursor effects */
/* .cursor-glow {
  position: fixed;
  width: 20px;
  height: 20px;
  background: radial-gradient(circle, rgba(0, 180, 216, 0.8), rgba(0, 180, 216, 0.2));
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: all 0.1s ease;
  mix-blend-mode: screen;
} */

.cursor-glow.cursor-hover {
  width: 40px;
  height: 40px;
  background: radial-gradient(circle, rgba(0, 180, 216, 1), rgba(0, 180, 216, 0.4));
}

.cursor-particle {
  position: fixed;
  width: 4px;
  height: 4px;
  background: var(--primary-color);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  opacity: 0;
}

/* Click effect */
.click-effect {
  position: fixed;
  width: 100px;
  height: 100px;
  border: 2px solid var(--primary-color);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9997;
  transform: translate(-50%, -50%) scale(0);
  animation: click-effect-animation 0.6s ease-out;
}

@keyframes click-effect-animation {
  0% {
    transform: translate(-50%, -50%) scale(0);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0;
  }
}

/* Element hover effects */
.element-hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 25px rgba(0, 180, 216, 0.3) !important;
}

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

.page-loader.fade-out {
  opacity: 0;
}

.loader-content {
  text-align: center;
}

.loader-spinner {
  width: 50px;
  height: 50px;
  border: 3px solid rgba(0, 180, 216, 0.3);
  border-top: 3px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}

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

.loader-text {
  color: var(--text-color);
  font-size: 1.2rem;
  animation: pulse-text 1.5s ease-in-out infinite;
}

@keyframes pulse-text {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

/* Page transition effects */
.transitioning {
  overflow: hidden;
}

.transitioning * {
  transition: all 0.3s ease !important;
}

/* Scroll animations */
.animate-in {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

/* Enhanced section titles */
.section-title {
  position: relative;
  overflow: hidden;
}

.section-title::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, 
    transparent, 
    rgba(0, 180, 216, 0.1), 
    transparent);
  animation: title-shimmer 3s ease-in-out infinite;
}

@keyframes title-shimmer {
  0% { left: -100%; }
  50% { left: 100%; }
  100% { left: 100%; }
}

/* Enhanced stat cards with counter animation */
.stat-card h3 {
  position: relative;
  overflow: hidden;
}

.stat-card h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  animation: stat-line 2s ease-out 1s forwards;
}

@keyframes stat-line {
  to { width: 100%; }
}

/* Enhanced project cards */
.project-card:hover .project-logo {
  transform: scale(1.05);
  filter: brightness(1.1);
}

.project-card:hover .project-content h3 {
  color: var(--primary-light);
}

/* Floating animation for hero elements */
.hero-content {
  animation: float-content 8s ease-in-out infinite;
}

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

/* Enhanced navbar with blur effect */
.navbar.scrolled {
  background: rgba(10, 10, 20, 0.95);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

/* Page loaded state */
.page-loaded .hero-title,
.page-loaded .hero-subtitle,
.page-loaded .hero-description {
  animation-play-state: running;
}

/* Enhanced mobile responsiveness for animations */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media screen and (max-width: 768px) {
  .cursor-glow,
  .cursor-particle {
    display: none;
  }
  
  .hero::after {
    width: 60px;
    height: 60px;
  }
  
  .float-gentle {
    animation-duration: 4s;
  }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: no-preference) {
  .skill:hover,
  .glass-card:hover,
  .btn:hover {
    transition: var(--transition-bounce);
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --glass-bg: rgba(255, 255, 255, 0.15);
    --glass-border: rgba(255, 255, 255, 0.3);
  }
}