/* ==================== ROOT VARIABLES ==================== */
:root {
  /* Light Mode Colors */
  --primary-color: #007bff;
  --secondary-color: #6c757d;
  --success-color: #28a745;
  --danger-color: #dc3545;
  --warning-color: #ffc107;
  --info-color: #17a2b8;
  --light-color: #f8f9fa;
  --dark-color: #343a40;
  
  /* Background Colors */
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --bg-tertiary: #e9ecef;
  
  /* Text Colors */
  --text-primary: #212529;
  --text-secondary: #6c757d;
  --text-muted: #868e96;
  
  /* Border Colors */
  --border-color: #dee2e6;
  --border-light: #e9ecef;
  
  /* Shadow */
  --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  --shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
  
  /* Fonts */
  --font-primary: 'Poppins', sans-serif;
  --font-arabic: 'Cairo', sans-serif;
  
  /* Transitions */
  --transition: all 0.3s ease;
  --transition-fast: all 0.2s ease;
}

/* Dark Mode Variables */
[data-theme="dark"] {
  --bg-primary: #1a1a1a;
  --bg-secondary: #2d2d2d;
  --bg-tertiary: #404040;
  
  --text-primary: #ffffff;
  --text-secondary: #e0e0e0;
  --text-muted: #b0b0b0;
  
  --border-color: #404040;
  --border-light: #505050;
  
  --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.3);
  --shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.5);
}

/* Dark mode additional improvements */
[data-theme="dark"] .bg-light {
  background-color: var(--bg-secondary) !important;
}

[data-theme="dark"] .section-subtitle {
  color: var(--text-secondary);
}

[data-theme="dark"] .hero-description {
  color: var(--text-secondary);
}

[data-theme="dark"] .about-content p {
  color: var(--text-secondary);
}

[data-theme="dark"] .competency-item p {
  color: var(--text-secondary);
}

[data-theme="dark"] .project-content p {
  color: var(--text-secondary);
}

[data-theme="dark"] .contact-info p {
  color: var(--text-secondary);
}

[data-theme="dark"] .stat-item p {
  color: var(--text-secondary);
}

[data-theme="dark"] .copyright {
  color: var(--text-secondary);
}

/* ==================== ICON FIXES FOR RTL ==================== */
/* Force Font Awesome icons to display correctly in RTL */
[dir="rtl"] .fa,
[dir="rtl"] .fab,
[dir="rtl"] .fal,
[dir="rtl"] .far,
[dir="rtl"] .fas {
  font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands" !important;
  font-weight: 900;
  font-style: normal;
  display: inline-block;
  text-rendering: auto;
  -webkit-font-smoothing: antialiased;
  direction: ltr;
  unicode-bidi: bidi-override;
}

/* Specific fixes for brand icons */
[dir="rtl"] .fab {
  font-family: "Font Awesome 6 Brands" !important;
  font-weight: 400;
}

/* Ensure icons maintain proper sizing */
.skill-icon,
.category-icon,
.tech-icon {
  width: 1.5rem !important;
  height: 1.5rem !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 1.5rem !important;
  color: var(--primary-color) !important;
  transition: all 0.3s ease !important;
  direction: ltr !important;
  unicode-bidi: bidi-override !important;
}

/* Fix for floating element icons */
.floating-element .tech-icon {
  font-size: 1.5rem !important;
  color: var(--primary-color) !important;
  display: inline-block !important;
  direction: ltr !important;
  unicode-bidi: bidi-override !important;
}

/* Specific icon fixes */
.floating-element .fa-mobile-alt {
  color: #02569B !important;
}

.floating-element .fa-react {
  color: #61DAFB !important;
}

.floating-element .fa-laravel {
  color: #FF2D20 !important;
}

.floating-element .fa-js-square {
  color: #F7DF1E !important;
}

/* Arabic RTL Support with Cairo Font */
[dir="rtl"] {
  font-family: var(--font-arabic), var(--font-primary);
}

[dir="rtl"] * {
  font-family: var(--font-arabic), var(--font-primary);
}

/* But keep icons in LTR direction */
[dir="rtl"] i {
  direction: ltr;
  unicode-bidi: bidi-override;
}

/* ==================== GLOBAL STYLES ==================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  transition: var(--transition);
  overflow-x: hidden;
}

/* ==================== LOADER ==================== */
.loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, var(--bg-primary), var(--bg-secondary));
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.5s ease;
}

.loader.hidden {
  opacity: 0;
  pointer-events: none;
}

.loader-content {
  text-align: center;
  animation: pulse 2s ease-in-out infinite;
}

.loader-content p {
  color: var(--text-secondary);
  margin-top: 1rem;
  font-weight: 500;
}

.loader-content .spinner-border {
  animation: rotate360 1s linear infinite;
  width: 4rem;
  height: 4rem;
}

/* ==================== NAVIGATION ==================== */
.custom-navbar {
  background-color: var(--bg-primary);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-light);
  transition: all 0.3s ease;
  padding: 1rem 0;
  animation: slideInFromTop 0.8s ease;
}

.custom-navbar.scrolled {
  background-color: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .custom-navbar.scrolled {
  background-color: rgba(26, 26, 26, 0.95);
}

.navbar-brand {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary) !important;
}

.brand-text {
  background: linear-gradient(45deg, var(--primary-color), #0056b3);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.navbar-nav .nav-link {
  color: var(--text-primary) !important;
  font-weight: 500;
  margin: 0 0.5rem;
  position: relative;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  color: var(--primary-color) !important;
  transform: translateY(-2px);
}

.navbar-nav .nav-link::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(45deg, var(--primary-color), #0056b3);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
  width: 100%;
  animation: glow 1s ease;
}

.navbar-controls {
  display: flex;
  align-items: center;
}

#themeToggle,
#langToggle {
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  background-color: transparent;
  transition: var(--transition);
}

#themeToggle:hover,
#langToggle:hover {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

/* ==================== ENHANCED HERO SECTION ANIMATIONS ==================== */
.hero-section {
  background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 2rem 0;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    radial-gradient(circle at 20% 50%, rgba(0, 123, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(0, 123, 255, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 40% 80%, rgba(0, 123, 255, 0.06) 0%, transparent 50%);
  z-index: 1;
}

/* Animated Background Elements */
.hero-bg-animation {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  overflow: hidden;
}

.bg-circle {
  position: absolute;
  border-radius: 50%;
  background: linear-gradient(45deg, rgba(0, 123, 255, 0.1), rgba(0, 123, 255, 0.05));
  animation: float 8s ease-in-out infinite;
}

.bg-circle-1 {
  width: 200px;
  height: 200px;
  top: 10%;
  left: 10%;
  animation-delay: 0s;
}

.bg-circle-2 {
  width: 150px;
  height: 150px;
  top: 60%;
  right: 15%;
  animation-delay: 2s;
  animation-direction: reverse;
}

.bg-circle-3 {
  width: 100px;
  height: 100px;
  bottom: 20%;
  left: 60%;
  animation-delay: 4s;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
  animation: fadeInUp 1s ease;
  position: relative;
}

.hero-greeting {
  display: inline-block;
  animation: fadeInLeft 1s ease 0.2s both;
}

.hero-name {
  display: inline-block;
  background: linear-gradient(45deg, var(--primary-color), #0056b3, #007bff);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradient 3s ease infinite, fadeInRight 1s ease 0.4s both;
}

.hero-subtitle {
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  animation: fadeInUp 1s ease 0.6s both;
}

.hero-description {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  animation: fadeInUp 1s ease 0.8s both;
}

.hero-buttons {
  margin-bottom: 2rem;
  animation: fadeInUp 1s ease 1s both;
}

/* Enhanced Button with Background Animation */
.magnetic-btn {
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.magnetic-btn .btn-bg {
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  z-index: -1;
  transition: left 0.5s ease;
}

.magnetic-btn:hover .btn-bg {
  left: 100%;
}

/* Enhanced Social Links */
.social-links {
  display: flex;
  gap: 1rem;
  animation: fadeInUp 1s ease 1.2s both;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  background-color: var(--bg-secondary);
  color: var(--text-secondary);
  border-radius: 50%;
  text-decoration: none;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
}

.social-link::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;
}

.social-link:hover::before {
  left: 100%;
}

.social-link:hover {
  background-color: var(--primary-color);
  color: white;
  transform: translateY(-10px) scale(1.1);
  border-color: var(--primary-color);
  box-shadow: 0 15px 30px rgba(0, 123, 255, 0.4);
}

.social-link:active {
  transform: translateY(-5px) scale(1.05);
}

.magnetic-element {
  position: relative;
}

.social-tooltip {
  position: absolute;
  top: -40px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-primary);
  color: var(--text-primary);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow);
  z-index: 1000;
}

.social-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--bg-primary);
}

.magnetic-element:hover .social-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(-5px);
}

/* Hero Image */
.hero-image {
  position: relative;
  animation: fadeInRight 1s ease 0.5s both;
}

.image-container {
  position: relative;
  width: 300px;
  height: 300px;
  margin: 0 auto;
}

/* Profile Image Styles */
.profile-image-container {
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 2;
}

.profile-image {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--primary-color);
  box-shadow: var(--shadow-lg);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  animation: float 6s ease-in-out infinite;
}

.profile-image:hover {
  transform: scale(1.05) rotate(2deg);
  box-shadow: 0 20px 40px rgba(0, 123, 255, 0.4);
  animation: heartbeat 1.5s ease-in-out infinite;
}

.profile-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--primary-color), #0056b3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 8rem;
  position: relative;
  z-index: 2;
}

.profile-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition);
  z-index: 3;
  cursor: pointer;
}

.profile-image-container:hover .profile-overlay {
  opacity: 1;
}

.upload-btn {
  text-align: center;
  color: white;
  padding: 1rem;
}

.upload-btn i {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  display: block;
}

.upload-btn span {
  font-size: 0.9rem;
  font-weight: 500;
}

/* Profile image loading state */
.profile-image-loading {
  position: relative;
}

.profile-image-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top: 3px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  z-index: 4;
}

.floating-elements {
  position: absolute;
  width: 100%;
  height: 100%;
  z-index: 1;
}

/* Enhanced Floating Elements */
.floating-element {
  position: absolute;
  width: 60px;
  height: 60px;
  background-color: var(--bg-primary);
  border: 2px solid var(--primary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
  font-size: 1.5rem;
  animation: float 3s ease-in-out infinite;
  animation-delay: var(--delay);
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
}

.floating-element:hover {
  animation: wiggle 0.5s ease-in-out;
  transform: scale(1.2);
  box-shadow: 0 10px 25px rgba(0, 123, 255, 0.3);
}

.floating-element:nth-child(odd) {
  animation: float 3s ease-in-out infinite;
}

.floating-element:nth-child(even) {
  animation: floatReverse 3s ease-in-out infinite;
}

.floating-element:nth-child(1) {
  top: 10%;
  right: 10%;
}

.floating-element:nth-child(2) {
  bottom: 10%;
  left: 10%;
}

.floating-element:nth-child(3) {
  top: 50%;
  left: -10%;
}

.floating-element:nth-child(4) {
  top: 50%;
  right: -10%;
}

.interactive-float {
  position: relative;
}

.tech-tooltip {
  position: absolute;
  top: -50px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary-color);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  white-space: nowrap;
  z-index: 1000;
}

.tech-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--primary-color);
}

.interactive-float:hover .tech-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(-5px);
}

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 2;
  animation: fadeInUp 1s ease 1.5s both;
}

.scroll-arrow {
  width: 40px;
  height: 40px;
  border: 2px solid var(--primary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
  animation: bounce 2s infinite;
  cursor: pointer;
  transition: all 0.3s ease;
}

.scroll-arrow:hover {
  background-color: var(--primary-color);
  color: white;
  transform: scale(1.1);
}

.scroll-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ==================== SECTIONS ==================== */
.section-padding {
  padding: 5rem 0;
  margin-bottom: 0;
}

.section-padding:last-of-type {
  margin-bottom: 0;
}

#skills.section-padding {
  margin-bottom: 0;
}

#contact.section-padding {
  margin-bottom: 0;
  padding-bottom: 3rem;
}

.section-header {
  margin-bottom: 3rem;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1rem;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: linear-gradient(45deg, var(--primary-color), #0056b3);
  border-radius: 2px;
  animation: gradient 2s ease infinite;
}

.section-subtitle {
  font-size: 1.2rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* ==================== ABOUT SECTION ==================== */
.about-content h3 {
  color: var(--text-primary);
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.about-content p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  text-align: justify;
}

.stats-row {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.stat-item {
  text-align: center;
  min-width: 120px;
}

.stat-item h4 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.stat-item p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin: 0;
  font-weight: 500;
}

.about-skills h3 {
  color: var(--text-primary);
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.competency-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.competency-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.5rem;
  background-color: var(--bg-secondary);
  border-radius: 10px;
  border: 1px solid var(--border-light);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
}

.competency-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 123, 255, 0.1), transparent);
  transition: left 0.5s;
}

.competency-item:hover::before {
  left: 100%;
}

.competency-item:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 15px 30px rgba(0, 123, 255, 0.15);
}

.competency-item i {
  font-size: 1.5rem;
  color: var(--primary-color);
  margin-top: 0.25rem;
  transition: all 0.3s ease;
  width: 1.5rem;
  height: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.competency-item:hover i {
  animation: bounce 0.6s ease;
  color: var(--primary-color);
}

.competency-item h5 {
  color: var(--text-primary);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.competency-item p {
  color: var(--text-secondary);
  margin: 0;
}

/* ==================== SKILLS SECTION ==================== */
#skills {
  margin-bottom: 0;
}

.skill-category {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: 15px;
  padding: 2rem;
  height: 100%;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
  margin-bottom: 2rem;
}

.skill-category::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(from 0deg, transparent, rgba(0, 123, 255, 0.1), transparent);
  animation: rotate360 4s linear infinite;
  z-index: 0;
}

.skill-category::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  right: 3px;
  bottom: 3px;
  background: var(--bg-primary);
  border-radius: 12px;
  z-index: 1;
}

.skill-category > * {
  position: relative;
  z-index: 2;
}

.skill-category:hover {
  transform: translateY(-15px) rotateX(5deg);
  box-shadow: 0 25px 50px rgba(0, 123, 255, 0.2);
}

.category-header {
  text-align: center;
  margin-bottom: 2rem;
}

.category-header .category-icon {
  font-size: 2.5rem !important;
  color: var(--primary-color) !important;
  margin-bottom: 1rem;
  display: inline-block !important;
  width: auto !important;
  height: auto !important;
}

.category-header h4 {
  color: var(--text-primary);
  font-weight: 600;
}

.skills-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.skill-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem;
  background-color: var(--bg-secondary);
  border-radius: 8px;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  color: var(--text-primary);
  border: 1px solid var(--border-light);
  position: relative;
  overflow: hidden;
}

.skill-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 123, 255, 0.1), transparent);
  transition: left 0.5s;
}

.skill-item:hover::before {
  left: 100%;
}

.skill-item:hover {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
  transform: translateX(10px) scale(1.02);
  box-shadow: 0 8px 20px rgba(0, 123, 255, 0.3);
}

.skill-item .skill-icon {
  font-size: 1.5rem !important;
  color: var(--primary-color) !important;
  transition: all 0.3s ease !important;
  width: 1.5rem !important;
  height: 1.5rem !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0;
}

.skill-item:hover .skill-icon {
  color: white !important;
  animation: bounce 0.6s ease;
}

.skill-item span {
  font-weight: 500;
  color: inherit;
  flex: 1;
}

/* Dark mode specific fixes for skills section */
[data-theme="dark"] .skill-item {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
  border-color: var(--border-color);
}

[data-theme="dark"] .skill-item span {
  color: var(--text-primary);
}

[data-theme="dark"] .skill-item:hover {
  background-color: var(--primary-color);
  color: white;
}

[data-theme="dark"] .skill-item:hover span {
  color: white;
}

/* ==================== PROJECTS SECTION ==================== */
.project-card {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: 15px;
  overflow: hidden;
  transition: var(--transition);
  height: 100%;
}

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
}

.project-image {
  height: 200px;
  background: linear-gradient(135deg, var(--primary-color), #0056b3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 3rem;
}

.project-content {
  padding: 1.5rem;
}

.project-content h4 {
  color: var(--text-primary);
  font-weight: 600;
  margin-bottom: 1rem;
}

.project-content p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.tech-tag {
  background-color: var(--bg-secondary);
  color: var(--text-secondary);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  border: 1px solid var(--border-light);
}

.project-links {
  display: flex;
  gap: 1rem;
}

/* ==================== CONTACT SECTION ==================== */
#contact {
  margin-bottom: 0;
}

.contact-form {
  background-color: var(--bg-primary);
  padding: 2rem;
  border-radius: 15px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow);
  animation: scaleIn 0.8s ease;
}

.form-control {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.75rem 1rem;
  border-radius: 8px;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.form-control:focus {
  background-color: var(--bg-secondary);
  border-color: var(--primary-color);
  color: var(--text-primary);
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
  transform: scale(1.02);
}

.form-label {
  color: var(--text-primary);
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.contact-info {
  text-align: center;
  padding: 2rem;
  background-color: var(--bg-primary);
  border-radius: 15px;
  border: 1px solid var(--border-light);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
  margin-bottom: 2rem;
}

.contact-info::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(from 0deg, transparent, rgba(0, 123, 255, 0.05), transparent);
  animation: rotate360 8s linear infinite;
  z-index: 0;
}

.contact-info > * {
  position: relative;
  z-index: 1;
}

.contact-info:hover {
  transform: translateY(-10px) scale(1.05);
  box-shadow: 0 20px 40px rgba(0, 123, 255, 0.2);
}

.contact-icon {
  width: 60px;
  height: 60px;
  background-color: var(--primary-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 1.5rem;
  transition: all 0.3s ease;
}

.contact-info:hover .contact-icon {
  animation: pulse 1s ease infinite;
  transform: scale(1.1);
}

.contact-info h5 {
  color: var(--text-primary);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.contact-info p {
  color: var(--text-secondary);
  margin: 0;
}

/* Contact Links */
.contact-link {
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.5rem;
  border-radius: 5px;
  margin: 0.25rem;
}

.contact-link:hover {
  color: var(--primary-color);
  text-decoration: none;
  background-color: var(--bg-secondary);
  transform: translateY(-2px);
}

.contact-link i {
  margin-right: 0.25rem;
  color: var(--primary-color);
}

/* RTL support for contact links */
[dir="rtl"] .contact-link i {
  margin-right: 0;
  margin-left: 0.25rem;
}

/* X (Twitter) Icon Fix */
.social-link .fab.fa-x-twitter {
  display: none;
}

.social-link .x-icon {
  display: inline-block !important;
  font-size: 1.2em;
  font-weight: bold;
  font-family: "X", sans-serif;
}

/* ==================== FOOTER ==================== */
.footer {
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-light);
  padding: 3rem 0;
}

.footer-content {
  text-align: center;
}

.footer .social-links {
  justify-content: center;
  margin-bottom: 2rem;
}

.copyright {
  color: var(--text-secondary);
  margin: 0;
  font-size: 0.9rem;
}

/* ==================== BACK TO TOP BUTTON ==================== */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: linear-gradient(45deg, var(--primary-color), #0056b3);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 1000;
  box-shadow: 0 5px 15px rgba(0, 123, 255, 0.3);
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
  animation: bounce 2s infinite;
}

.back-to-top:hover {
  background: linear-gradient(45deg, #0056b3, var(--primary-color));
  transform: translateY(-5px) scale(1.1);
  box-shadow: 0 15px 30px rgba(0, 123, 255, 0.4);
  animation: pulse 0.5s ease;
}

/* ==================== ANIMATIONS ==================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.5);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes rotateIn {
  from {
    opacity: 0;
    transform: rotate(-180deg) scale(0.5);
  }
  to {
    opacity: 1;
    transform: rotate(0deg) scale(1);
  }
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes glow {
  0%, 100% {
    box-shadow: 0 0 10px rgba(0, 123, 255, 0.3);
  }
  50% {
    box-shadow: 0 0 20px rgba(0, 123, 255, 0.6), 0 0 30px rgba(0, 123, 255, 0.4);
  }
}

@keyframes typewriter {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

@keyframes blink {
  0%, 50% {
    opacity: 1;
  }
  51%, 100% {
    opacity: 0;
  }
}

@keyframes wiggle {
  0%, 7% {
    transform: rotateZ(0);
  }
  15% {
    transform: rotateZ(-15deg);
  }
  20% {
    transform: rotateZ(10deg);
  }
  25% {
    transform: rotateZ(-10deg);
  }
  30% {
    transform: rotateZ(6deg);
  }
  35% {
    transform: rotateZ(-4deg);
  }
  40%, 100% {
    transform: rotateZ(0);
  }
}

@keyframes flip {
  0% {
    transform: perspective(400px) rotateY(0);
  }
  40% {
    transform: perspective(400px) translateZ(150px) rotateY(-190deg);
  }
  50% {
    transform: perspective(400px) translateZ(150px) rotateY(-190deg);
  }
  80% {
    transform: perspective(400px) rotateY(0deg);
  }
  100% {
    transform: perspective(400px) rotateY(0deg);
  }
}

@keyframes heartbeat {
  0% {
    transform: scale(1);
  }
  14% {
    transform: scale(1.1);
  }
  28% {
    transform: scale(1);
  }
  42% {
    transform: scale(1.1);
  }
  70% {
    transform: scale(1);
  }
}

@keyframes slideInFromTop {
  0% {
    transform: translateY(-100%);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes slideInFromBottom {
  0% {
    transform: translateY(100%);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}

@keyframes floatReverse {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(20px);
  }
}

@keyframes rotate360 {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes shake {
  0%, 100% {
    transform: translateX(0);
  }
  10%, 30%, 50%, 70%, 90% {
    transform: translateX(-5px);
  }
  20%, 40%, 60%, 80% {
    transform: translateX(5px);
  }
}

@keyframes gradient {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

@keyframes particles {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(-800px) rotate(360deg);
    opacity: 0;
  }
}

@keyframes spin {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ==================== SCROLL ANIMATIONS ==================== */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.8s ease;
}

.animate-on-scroll.animate-in {
  opacity: 1;
  transform: translateY(0);
}

.animate-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: all 0.8s ease;
}

.animate-left.animate-in {
  opacity: 1;
  transform: translateX(0);
}

.animate-right {
  opacity: 0;
  transform: translateX(50px);
  transition: all 0.8s ease;
}

.animate-right.animate-in {
  opacity: 1;
  transform: translateX(0);
}

.animate-scale {
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.8s ease;
}

.animate-scale.animate-in {
  opacity: 1;
  transform: scale(1);
}

.animate-rotate {
  opacity: 0;
  transform: rotate(-180deg) scale(0.5);
  transition: all 1s ease;
}

.animate-rotate.animate-in {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

/* ==================== CURSOR EFFECTS ==================== */
.cursor-dot {
  width: 8px;
  height: 8px;
  background-color: var(--primary-color);
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  z-index: 10000;
  transition: transform 0.1s ease;
}

/* Remove cursor outline effect */
.cursor-outline {
  display: none;
}

/* ==================== ENHANCED BUTTON ANIMATIONS ==================== */
.btn {
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
}

.btn::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:hover::before {
  left: 100%;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.btn:active {
  transform: translateY(-1px);
}

.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  font-weight: 500;
  padding: 0.75rem 2rem;
  border-radius: 50px;
  transition: var(--transition);
}

.btn-primary:hover {
  background: linear-gradient(45deg, var(--primary-color), #0056b3);
  border-color: #0056b3;
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  animation: glow 2s infinite;
}

.btn-outline-primary {
  color: var(--primary-color);
  border-color: var(--primary-color);
  font-weight: 500;
  padding: 0.75rem 2rem;
  border-radius: 50px;
  transition: var(--transition);
}

.btn-outline-primary:hover {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

/* Loading Animation for Buttons */
.btn.loading {
  position: relative;
  color: transparent;
}

.btn.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* ==================== ENHANCED EFFECTS ==================== */
/* Particle System */
#particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

/* Text Selection Styling */
::selection {
  background: var(--primary-color);
  color: white;
}

::-moz-selection {
  background: var(--primary-color);
  color: white;
}

/* Theme Transition Effect */
.theme-transition {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: radial-gradient(circle, var(--primary-color), transparent);
  border-radius: 50%;
  z-index: 9999;
  pointer-events: none;
  transition: all 0.5s ease;
}

.theme-transition.animate {
  width: 200vw;
  height: 200vw;
  transform: translate(-50%, -50%);
}

/* Progressive Loading Animation */
.progressive-load {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.8s ease;
}

.progressive-load.loaded {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger Animation Delays */
.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }
.stagger-5 { animation-delay: 0.5s; }

/* ==================== RESPONSIVE DESIGN ==================== */
@media (max-width: 991px) {
  .navbar-nav {
    padding: 1rem 0;
  }
  
  .navbar-nav .nav-link {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-light);
  }
  
  .hero-content {
    text-align: center;
    margin-bottom: 2rem;
  }
  
  .hero-image {
    margin-top: 1rem;
  }
  
  .section-padding {
    padding: 3rem 0;
  }
  
  .hero-section {
    min-height: auto;
    padding: 6rem 0 3rem;
  }
  
  .stats-row {
    justify-content: center;
    margin-top: 2rem;
  }
  
  .skill-category {
    margin-bottom: 1.5rem;
  }
  
  .contact-info {
    margin-bottom: 1.5rem;
  }
  
  .image-container {
    width: 280px;
    height: 280px;
  }
  
  .floating-element {
    width: 45px;
    height: 45px;
    font-size: 1.1rem;
  }
}

@media (max-width: 768px) {
  /* Reset excessive spacing */
  .hero-section {
    min-height: auto;
    padding: 5rem 0 2rem;
    align-items: flex-start;
  }
  
  .section-padding {
    padding: 2.5rem 0;
  }
  
  .hero-title {
    font-size: 2.2rem;
    line-height: 1.2;
    margin-bottom: 1rem;
  }
  
  .hero-subtitle {
    font-size: 1.1rem;
    margin-bottom: 1rem;
  }
  
  .hero-description {
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    padding: 0 1rem;
  }
  
  .section-title {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
  }
  
  .section-subtitle {
    font-size: 1rem;
    margin-bottom: 1rem;
  }
  
  .section-header {
    margin-bottom: 2rem;
  }
  
  /* Fix container spacing */
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  /* Hero buttons optimization */
  .hero-buttons {
    margin-bottom: 1.5rem;
  }
  
  .hero-buttons .btn {
    display: inline-block;
    width: auto;
    margin: 0.25rem 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
  }
  
  /* Social links optimization */
  .social-links {
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
  }
  
  .social-link {
    width: 42px;
    height: 42px;
    font-size: 1.1rem;
  }
  
  /* Profile image optimization */
  .image-container {
    width: 220px;
    height: 220px;
    margin: 1rem auto 0;
  }
  
  .profile-image,
  .profile-placeholder {
    font-size: 5rem;
  }
  
  .floating-element {
    width: 35px;
    height: 35px;
    font-size: 0.9rem;
  }
  
  /* Adjust floating element positions for mobile */
  .floating-element:nth-child(1) {
    top: 5%;
    right: 5%;
  }
  
  .floating-element:nth-child(2) {
    bottom: 5%;
    left: 5%;
  }
  
  .floating-element:nth-child(3) {
    top: 45%;
    left: -5%;
  }
  
  .floating-element:nth-child(4) {
    top: 45%;
    right: -5%;
  }
  
  /* Stats optimization */
  .stats-row {
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
  }
  
  .stat-item {
    min-width: 90px;
    flex: 1 1 30%;
  }
  
  .stat-item h4 {
    font-size: 1.6rem;
  }
  
  .stat-item p {
    font-size: 0.85rem;
  }
  
  /* Competency items */
  .competency-item {
    padding: 1rem;
    margin-bottom: 1rem;
    flex-direction: row;
    text-align: left;
  }
  
  .competency-item i {
    margin-bottom: 0;
    margin-right: 1rem;
    margin-top: 0.25rem;
  }
  
  [dir="rtl"] .competency-item i {
    margin-right: 0;
    margin-left: 1rem;
  }
  
  /* Skills section */
  .skill-category {
    padding: 1.25rem;
    margin-bottom: 1.5rem;
  }
  
  .category-header .category-icon {
    font-size: 2rem !important;
    margin-bottom: 0.75rem;
  }
  
  .category-header h4 {
    font-size: 1.1rem;
  }
  
  .skill-item {
    padding: 0.6rem;
    margin-bottom: 0.5rem;
  }
  
  .skill-item span {
    font-size: 0.9rem;
  }
  
  /* Contact section */
  .contact-form {
    padding: 1.25rem;
    margin-bottom: 2rem;
  }
  
  .contact-info {
    margin-bottom: 1.5rem;
    padding: 1.25rem;
  }
  
  .contact-icon {
    width: 50px;
    height: 50px;
    font-size: 1.25rem;
  }
  
  .contact-info h5 {
    font-size: 1rem;
  }
  
  .contact-info p {
    font-size: 0.9rem;
  }
  
  /* Footer optimization */
  .footer {
    padding: 2rem 0;
  }
  
  .footer .social-links {
    margin-bottom: 1.5rem;
  }
  
  /* Remove cursor effects on mobile */
  .cursor-dot,
  .cursor-outline {
    display: none;
  }
  
  /* Navbar brand */
  .navbar-brand {
    font-size: 1.3rem;
  }
  
  /* Form improvements */
  .form-control {
    padding: 0.6rem 0.8rem;
    font-size: 0.9rem;
  }
  
  .form-label {
    font-size: 0.9rem;
    margin-bottom: 0.4rem;
  }
  
  /* Button improvements */
  .btn-lg {
    padding: 0.7rem 1.5rem;
    font-size: 0.95rem;
  }
  
  /* Upload button */
  .upload-btn i {
    font-size: 1.3rem;
    margin-bottom: 0.4rem;
  }
  
  .upload-btn span {
    font-size: 0.8rem;
  }
  
  /* Scroll indicator */
  .scroll-indicator {
    bottom: 20px;
  }
  
  .scroll-arrow {
    width: 35px;
    height: 35px;
  }
  
  .scroll-text {
    font-size: 0.8rem;
  }
  
  /* Back to top button */
  .back-to-top {
    width: 45px;
    height: 45px;
    bottom: 20px;
    right: 20px;
    font-size: 1rem;
  }
  
  /* Fix mobile viewport issues */
  html {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
  }
  
  /* Prevent zoom on form inputs */
  input[type="text"],
  input[type="email"],
  textarea {
    font-size: 16px;
  }
  
  /* Better touch targets */
  .btn,
  .social-link,
  .contact-link,
  .nav-link {
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  
  /* Fix navbar collapse spacing */
  .navbar-collapse {
    margin-top: 1rem;
  }
  
  .navbar-nav .nav-item {
    margin: 0.25rem 0;
  }
  
  /* Better hero section on mobile */
  .hero-section .row {
    margin: 0;
  }
  
  .hero-section .col-lg-6 {
    padding: 0 1rem;
  }
  
  /* Improve readability */
  .hero-content {
    max-width: 100%;
  }
  
  /* Fix social links wrapping */
  .social-links {
    flex-wrap: wrap;
  }
  
  /* Better spacing for competency items */
  .competency-list {
    gap: 1rem;
  }
}

@media (max-width: 576px) {
  /* Further reduce spacing for small screens */
  .hero-section {
    padding: 4rem 0 1.5rem;
  }
  
  .section-padding {
    padding: 2rem 0;
  }
  
  /* Typography adjustments */
  .hero-title {
    font-size: 1.9rem;
    margin-bottom: 0.75rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
    margin-bottom: 0.75rem;
  }
  
  .hero-description {
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
    padding: 0 0.5rem;
  }
  
  .section-title {
    font-size: 1.6rem;
    margin-bottom: 0.5rem;
  }
  
  .section-subtitle {
    font-size: 0.9rem;
  }
  
  .section-header {
    margin-bottom: 1.5rem;
  }
  
  /* Container and spacing */
  .container {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
  
  /* Navbar */
  .navbar-brand {
    font-size: 1.2rem;
  }
  
  .custom-navbar {
    padding: 0.75rem 0;
  }
  
  /* Hero section optimization */
  .hero-buttons {
    margin-bottom: 1.25rem;
  }
  
  .hero-buttons .btn {
    padding: 0.6rem 1.25rem;
    font-size: 0.85rem;
    margin: 0.2rem 0.25rem;
    border-radius: 25px;
  }
  
  /* Social links */
  .social-links {
    gap: 0.5rem;
    margin-bottom: 0.75rem;
  }
  
  .social-link {
    width: 38px;
    height: 38px;
    font-size: 1rem;
  }
  
  /* Profile image */
  .image-container {
    width: 180px;
    height: 180px;
    margin: 0.75rem auto 0;
  }
  
  .profile-image,
  .profile-placeholder {
    font-size: 3.5rem;
  }
  
  .floating-element {
    width: 28px;
    height: 28px;
    font-size: 0.75rem;
  }
  
  .upload-btn i {
    font-size: 1rem;
    margin-bottom: 0.25rem;
  }
  
  .upload-btn span {
    font-size: 0.7rem;
  }
  
  .profile-overlay {
    font-size: 0.8rem;
  }
  
  /* Stats section */
  .stats-row {
    gap: 0.75rem;
    margin-top: 1.25rem;
  }
  
  .stat-item {
    min-width: 75px;
    flex: 1 1 30%;
  }
  
  .stat-item h4 {
    font-size: 1.4rem;
  }
  
  .stat-item p {
    font-size: 0.8rem;
  }
  
  /* About section */
  .about-content p {
    font-size: 0.9rem;
    text-align: left;
    margin-bottom: 1rem;
  }
  
  .about-content h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
  }
  
  .about-skills h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
  }
  
  /* Competency items */
  .competency-item {
    padding: 0.75rem;
    margin-bottom: 0.75rem;
  }
  
  .competency-item h5 {
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
  }
  
  .competency-item p {
    font-size: 0.85rem;
    margin: 0;
  }
  
  /* Skills section */
  .skill-category {
    padding: 1rem;
    margin-bottom: 1.25rem;
  }
  
  .category-header .category-icon {
    font-size: 1.75rem !important;
    margin-bottom: 0.5rem;
  }
  
  .category-header h4 {
    font-size: 1rem;
  }
  
  .skill-item {
    padding: 0.5rem;
    margin-bottom: 0.4rem;
  }
  
  .skill-item span {
    font-size: 0.85rem;
  }
  
  .skill-icon {
    font-size: 1.2rem !important;
    width: 1.2rem !important;
    height: 1.2rem !important;
  }
  
  /* Contact section */
  .contact-form {
    padding: 1rem;
    margin-bottom: 1.5rem;
  }
  
  .contact-info {
    margin-bottom: 1.25rem;
    padding: 1rem;
  }
  
  .contact-icon {
    width: 45px;
    height: 45px;
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
  }
  
  .contact-info h5 {
    font-size: 0.95rem;
    margin-bottom: 0.4rem;
  }
  
  .contact-info p {
    font-size: 0.85rem;
  }
  
  /* Form elements */
  .form-control {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
  }
  
  .form-label {
    font-size: 0.85rem;
    margin-bottom: 0.3rem;
  }
  
  .btn-lg {
    padding: 0.6rem 1.25rem;
    font-size: 0.9rem;
  }
  
  /* Footer */
  .footer {
    padding: 1.5rem 0;
  }
  
  .footer .social-links {
    margin-bottom: 1.25rem;
    gap: 0.5rem;
  }
  
  .copyright {
    font-size: 0.8rem;
  }
  
  /* Utility elements */
  .scroll-indicator {
    bottom: 15px;
  }
  
  .scroll-arrow {
    width: 32px;
    height: 32px;
    font-size: 0.9rem;
  }
  
  .scroll-text {
    font-size: 0.75rem;
  }
  
  .back-to-top {
    width: 40px;
    height: 40px;
    bottom: 15px;
    right: 15px;
    font-size: 0.9rem;
  }
  
  /* Remove excessive animations on small screens */
  .floating-element {
    animation: none;
  }
  
  /* Contact links optimization */
  .contact-link {
    font-size: 0.85rem;
    padding: 0.2rem 0.4rem;
  }
  
  /* Notification positioning for mobile */
  .notification {
    top: 70px !important;
    right: 10px !important;
    left: 10px !important;
    min-width: auto !important;
  }
}

/* ==================== MOBILE UTILITY CLASSES ==================== */

/* Mobile spacing utilities */
@media (max-width: 768px) {
  .mobile-no-spacing {
    margin: 0 !important;
    padding: 0 !important;
  }
  
  .mobile-compact {
    padding: 1rem !important;
    margin: 0.5rem 0 !important;
  }
  
  .mobile-text-center {
    text-align: center !important;
  }
  
  /* Fix any remaining white space issues */
  .row {
    margin-left: 0;
    margin-right: 0;
  }
  
  .col-lg-6,
  .col-md-6,
  .col-lg-4 {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
  
  /* Ensure sections don't have extra spacing */
  section {
    margin: 0;
  }
  
  /* Fix navbar spacing */
  .navbar {
    margin-bottom: 0;
  }
  
  /* Fix footer spacing */
  .footer {
    margin-top: 0;
  }
}

/* Mobile-specific RTL fixes */
@media (max-width: 768px) {
  [dir="rtl"] .hero-buttons .btn {
    margin: 0.25rem 0.25rem 0.25rem 0;
  }
  
  [dir="rtl"] .competency-item i {
    margin-left: 1rem;
    margin-right: 0;
  }
  
  [dir="rtl"] .skill-item .skill-icon {
    margin-left: 1rem;
    margin-right: 0;
  }
  
  [dir="rtl"] .contact-link i {
    margin-left: 0.25rem;
    margin-right: 0;
  }
}

/* Fix mobile landscape orientation */
@media (max-height: 500px) and (orientation: landscape) {
  .hero-section {
    min-height: auto;
    padding: 3rem 0 2rem;
  }
  
  .section-padding {
    padding: 2rem 0;
  }
  
  .hero-title {
    font-size: 1.8rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
  }
  
  .image-container {
    width: 150px;
    height: 150px;
  }
  
  .floating-element {
    display: none;
  }
}

/* Extra small screens optimization */
@media (max-width: 320px) {
  .hero-section {
    padding: 4rem 0 1rem;
  }
  
  .container {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
  
  .hero-title {
    font-size: 1.7rem;
  }
  
  .hero-buttons .btn {
    font-size: 0.8rem;
    padding: 0.5rem 1rem;
  }
  
  .image-container {
    width: 160px;
    height: 160px;
  }
  
  .section-padding {
    padding: 1.5rem 0;
  }
  
  .skill-category,
  .contact-info,
  .contact-form {
    padding: 0.75rem;
  }
}

/* Performance Optimization */
.reduced-motion *,
.mobile-optimized * {
  animation-duration: 0.1s !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.2s !important;
}

.mobile-optimized .floating-element {
  animation: none !important;
  transform: none !important;
}

.mobile-optimized .bg-circle {
  display: none !important;
}

.mobile-optimized .particle {
  display: none !important;
}

/* RTL Specific Styles */
[dir="rtl"] .navbar-nav .nav-link::after {
  right: 50%;
  left: auto;
  transform: translateX(50%);
}

[dir="rtl"] .section-title::after {
  right: 50%;
  left: auto;
  transform: translateX(50%);
}

[dir="rtl"] .competency-item {
  flex-direction: row-reverse;
}

[dir="rtl"] .skill-item {
  flex-direction: row-reverse;
}

[dir="rtl"] .hero-buttons .btn {
  margin: 0.5rem 0 0.5rem 1rem;
}

[dir="rtl"] .stats-row {
  flex-direction: row-reverse;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #0056b3;
}