/* ============================================
   MODERN PORTFOLIO CSS
   Professional & Clean Design
   ============================================ */

/* ============================================
   CSS VARIABLES
   ============================================ */
:root {
  /* Colors - Light Theme */
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #3b82f6;
  --primary-rgb: 37, 99, 235;

  --accent: #06b6d4;
  --accent-dark: #0891b2;

  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-tertiary: #f1f5f9;

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;

  --border-color: #e2e8f0;
  --card-bg: #ffffff;
  --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);

  /* Typography */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Playfair Display', Georgia, serif;

  /* Spacing */
  --section-padding: 100px 0;
  --container-width: 1200px;

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;

  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 30px;
  --radius-full: 50%;
}

/* Dark Theme */
[data-theme="dark"] {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-tertiary: #334155;

  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #64748b;

  --border-color: #334155;
  --card-bg: #1e293b;
  --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -2px rgba(0, 0, 0, 0.2);
}

/* ============================================
   RESET & BASE STYLES
   ============================================ */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  overflow-x: hidden;
}

body {
  font-family: var(--font-primary);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

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

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

ul, ol {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* ============================================
   CUSTOM CURSOR
   ============================================ */
.cursor {
  width: 10px;
  height: 10px;
  background: var(--primary);
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  z-index: 10000;
  transition: transform 0.1s ease;
  display: none;
}

.cursor-follower {
  width: 40px;
  height: 40px;
  border: 2px solid var(--primary);
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  transition: transform 0.15s ease, width 0.3s ease, height 0.3s ease;
  display: none;
}

@media (min-width: 1024px) and (pointer: fine) {
  .cursor, .cursor-follower {
    display: block;
  }

  body {
    cursor: none;
  }

  a, button {
    cursor: none;
  }
}

.cursor.hover {
  transform: scale(0);
}

.cursor-follower.hover {
  width: 60px;
  height: 60px;
  background: rgba(var(--primary-rgb), 0.1);
}

/* ============================================
   LOADER
   ============================================ */
.loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader-inner {
  position: relative;
  width: 100px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loader-circle {
  position: absolute;
  width: 100%;
  height: 100%;
  border: 3px solid transparent;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.loader-text {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--primary);
}

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

/* ============================================
   NAVIGATION
   ============================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 20px 0;
  transition: all var(--transition-normal);
}

.navbar.scrolled {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px);
  padding: 15px 0;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .navbar.scrolled {
  background: rgba(15, 23, 42, 0.9);
}

.nav-container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-text {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--primary);
}

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

.nav-link {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  position: relative;
  padding: 5px 0;
  white-space: nowrap;
}

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

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

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

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.theme-toggle, .lang-toggle {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-size: 16px;
  transition: all var(--transition-fast);
}

/* Nav CTA Button - Compact */
.nav-cta {
  padding: 10px 18px !important;
  font-size: 13px !important;
  gap: 6px !important;
}

.nav-cta i {
  font-size: 16px;
}

.theme-toggle:hover, .lang-toggle:hover {
  background: var(--primary);
  color: white;
}

.lang-toggle span {
  font-size: 12px;
  font-weight: 600;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
  cursor: pointer;
  background: transparent;
  border: none;
  z-index: 1002;
  position: relative;
}

.nav-toggle span {
  width: 28px;
  height: 3px;
  background: var(--text-primary);
  transition: all var(--transition-fast);
  border-radius: 2px;
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* Large screens - tighter spacing */
@media (max-width: 1400px) {
  .nav-menu {
    gap: 18px;
  }

  .nav-link {
    font-size: 12px;
  }
}

/* Medium screens - even tighter */
@media (max-width: 1280px) {
  .nav-menu {
    gap: 12px;
  }

  .nav-cta span {
    display: none;
  }

  .nav-cta {
    padding: 10px 12px !important;
  }
}

/* Mobile Navigation - Hamburger menu */
@media (max-width: 1100px) {
  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100vh;
    background: var(--bg-primary);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 30px;
    transition: right var(--transition-normal);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.2);
    z-index: 1001;
    padding: 20px;
  }

  .nav-menu.active {
    right: 0;
  }

  .nav-menu li {
    width: 100%;
    text-align: center;
    position: relative;
    z-index: 1;
  }

  .nav-link {
    font-size: 18px;
    display: block;
    padding: 15px 20px;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    position: relative;
    z-index: 1;
  }

  .nav-link:hover,
  .nav-link.active {
    background: rgba(var(--primary-rgb), 0.1);
    color: var(--primary);
  }

  .nav-toggle {
    display: flex;
  }

  .nav-cta {
    display: none;
  }
}

/* Mobile menu overlay - separate element */
.nav-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
}

.nav-overlay.active {
  display: block;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: var(--radius-lg);
  font-size: 15px;
  font-weight: 600;
  transition: all var(--transition-normal);
  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 ease;
}

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

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.4);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(var(--primary-rgb), 0.5);
}

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

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(var(--primary-rgb), 0.05);
}

.btn-icon {
  width: 45px;
  height: 45px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  font-size: 20px;
  backdrop-filter: blur(10px);
  transition: all var(--transition-fast);
}

.btn-icon:hover {
  background: var(--primary);
  transform: scale(1.1);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  padding: 120px 0 80px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

.hero-gradient {
  position: absolute;
  top: -50%;
  right: -20%;
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(var(--primary-rgb), 0.15) 0%, transparent 70%);
  border-radius: 50%;
  animation: float 8s ease-in-out infinite;
}

.hero-grid {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(rgba(var(--primary-rgb), 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--primary-rgb), 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
}

.floating-shapes .shape {
  position: absolute;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.1), rgba(6, 182, 212, 0.1));
  animation: float 6s ease-in-out infinite;
  pointer-events: none;
}

.shape-1 {
  width: 100px;
  height: 100px;
  top: 20%;
  left: 10%;
  animation-delay: 0s;
}

.shape-2 {
  width: 60px;
  height: 60px;
  top: 60%;
  left: 5%;
  animation-delay: 1s;
}

.shape-3 {
  width: 80px;
  height: 80px;
  top: 30%;
  right: 10%;
  animation-delay: 2s;
}

.shape-4 {
  width: 50px;
  height: 50px;
  bottom: 20%;
  right: 20%;
  animation-delay: 3s;
}

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

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-greeting {
  display: inline-block;
  font-size: 18px;
  font-weight: 500;
  color: var(--primary);
  margin-bottom: 15px;
  padding: 8px 20px;
  background: rgba(var(--primary-rgb), 0.1);
  border-radius: var(--radius-xl);
}

.hero-name {
  font-family: var(--font-display);
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 20px;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-title-wrapper {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 25px;
  min-height: 35px;
}

.hero-title {
  font-size: 24px;
  font-weight: 500;
  color: var(--text-secondary);
}

.typed-cursor {
  font-size: 24px;
  color: var(--primary);
  animation: blink 1s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.hero-description {
  font-size: 17px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 35px;
  max-width: 500px;
}

.hero-cta {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.hero-image {
  position: relative;
}

.hero-image-wrapper {
  position: relative;
  width: 400px;
  height: 400px;
  margin: 0 auto;
}

.hero-image-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  height: 90%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: var(--radius-xl);
  filter: blur(40px);
  opacity: 0.3;
  animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.3; }
  50% { transform: translate(-50%, -50%) scale(1.05); opacity: 0.4; }
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-xl);
  position: relative;
  z-index: 2;
}

.hero-image-border {
  position: absolute;
  top: 20px;
  left: 20px;
  width: 100%;
  height: 100%;
  border: 3px solid var(--primary);
  border-radius: var(--radius-xl);
  z-index: 1;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-top: 40px;
}

.stat-item {
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 36px;
  font-weight: 700;
  color: var(--primary);
}

.stat-number::after {
  content: '+';
}

.stat-label {
  font-size: 14px;
  color: var(--text-muted);
}

.hero-scroll {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
}

.scroll-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: 14px;
  animation: bounce 2s infinite;
}

.scroll-indicator i {
  font-size: 24px;
}

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

.hero-social {
  position: fixed;
  left: 40px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 20px;
  z-index: 100;
  pointer-events: auto;
}

.hero-social a {
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-size: 20px;
  transition: all var(--transition-fast);
}

.hero-social a:hover {
  background: var(--primary);
  color: white;
  transform: translateX(5px);
}

/* Mobile Hero */
@media (max-width: 1024px) {
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-description {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-cta {
    justify-content: center;
  }

  .hero-image-wrapper {
    width: 300px;
    height: 300px;
  }

  .hero-social {
    display: none;
  }

  .hero-scroll {
    display: none;
  }
}

/* ============================================
   SECTIONS
   ============================================ */
.section {
  padding: var(--section-padding);
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-subtitle {
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 15px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 700;
  color: var(--text-primary);
}

/* ============================================
   ABOUT SECTION
   ============================================ */
.about {
  background: var(--bg-primary);
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 80px;
  align-items: center;
}

.about-image-wrapper {
  position: relative;
}

.about-image-wrapper img {
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
}

.about-experience-badge {
  position: absolute;
  bottom: -20px;
  right: -20px;
  background: var(--primary);
  color: white;
  padding: 25px;
  border-radius: var(--radius-lg);
  text-align: center;
  box-shadow: 0 10px 30px rgba(var(--primary-rgb), 0.4);
}

.badge-number {
  display: block;
  font-size: 36px;
  font-weight: 700;
}

.badge-text {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.about-text h3 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.about-description {
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.8;
}

.about-info {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 25px;
  margin: 35px 0;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 15px;
}

.info-item i {
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(var(--primary-rgb), 0.1);
  color: var(--primary);
  border-radius: var(--radius-md);
  font-size: 20px;
}

.info-label {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
}

.info-value {
  font-weight: 600;
  color: var(--text-primary);
}

@media (max-width: 900px) {
  .about-content {
    grid-template-columns: 1fr;
    gap: 50px;
  }

  .about-image-wrapper {
    max-width: 400px;
    margin: 0 auto;
  }

  .about-info {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   EXPERIENCE SECTION
   ============================================ */
.experience {
  background: var(--bg-primary);
}

.experience-tabs {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 50px;
  flex-wrap: wrap;
}

.tab-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 30px;
  border-radius: var(--radius-lg);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  transition: all var(--transition-normal);
}

.tab-btn:hover, .tab-btn.active {
  background: var(--primary);
  color: white;
  box-shadow: 0 5px 20px rgba(var(--primary-rgb), 0.3);
}

.tab-btn i {
  font-size: 20px;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.5s ease;
}

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

.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 2px;
  height: 100%;
  background: linear-gradient(to bottom, var(--primary), var(--accent));
}

.timeline-item {
  position: relative;
  padding-left: 40px;
  padding-bottom: 40px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-marker {
  position: absolute;
  left: -6px;
  top: 5px;
  width: 14px;
  height: 14px;
  background: var(--primary);
  border-radius: 50%;
  border: 3px solid var(--bg-primary);
  box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.2);
}

.timeline-content {
  background: var(--card-bg);
  padding: 30px;
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
  transition: all var(--transition-normal);
}

.timeline-content:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.timeline-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

.timeline-date {
  font-size: 14px;
  color: var(--primary);
  font-weight: 600;
}

.timeline-badge {
  padding: 4px 12px;
  background: rgba(var(--primary-rgb), 0.1);
  color: var(--primary);
  border-radius: var(--radius-xl);
  font-size: 12px;
  font-weight: 600;
}

.timeline-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 5px;
}

.timeline-company {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 15px;
}

.timeline-list {
  padding-left: 20px;
}

.timeline-list li {
  position: relative;
  color: var(--text-secondary);
  margin-bottom: 10px;
  padding-left: 15px;
}

.timeline-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 6px;
  background: var(--primary);
  border-radius: 50%;
}

.timeline-role {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px dashed var(--border-color);
}

.timeline-role:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.role-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.role-period {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 13px;
}

/* ============================================
   SKILLS SECTION
   ============================================ */
.skills {
  background: var(--bg-secondary);
}

.skills-categories {
  margin-bottom: 80px;
}

.skills-category {
  margin-bottom: 50px;
}

.category-title {
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 30px;
}

.category-title i {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: white;
  border-radius: var(--radius-md);
  font-size: 24px;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 20px;
}

.skill-item {
  background: var(--card-bg);
  padding: 25px 15px;
  border-radius: var(--radius-lg);
  text-align: center;
  transition: all var(--transition-normal);
  box-shadow: var(--card-shadow);
}

.skill-item:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.skill-item img {
  width: 50px;
  height: 50px;
  object-fit: contain;
  margin: 0 auto 15px;
}

.skill-item span {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.soft-skills-grid {
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

.soft-skills-grid .skill-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 20px 25px;
  text-align: left;
}

.soft-skills-grid .skill-item img {
  margin: 0;
  flex-shrink: 0;
}

/* Services */
.services-title {
  text-align: center;
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 40px;
  color: var(--text-primary);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 30px;
}

.service-card {
  background: var(--card-bg);
  padding: 40px 30px;
  border-radius: var(--radius-lg);
  text-align: center;
  transition: all var(--transition-normal);
  box-shadow: var(--card-shadow);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transform: scaleX(0);
  transition: transform var(--transition-normal);
}

.service-card:hover {
  transform: translateY(-10px);
}

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

.service-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 25px;
  background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.1), rgba(6, 182, 212, 0.1));
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.service-icon i {
  font-size: 36px;
  color: var(--primary);
}

.service-card h4 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 15px;
  color: var(--text-primary);
}

.service-card p {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.7;
}

/* ============================================
   PORTFOLIO SECTION - MODERN CARD GRID
   ============================================ */
.portfolio {
  background: var(--bg-secondary);
}

.portfolio-filter {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 50px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 12px 28px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--card-bg);
  border: 2px solid var(--border-color);
  transition: all var(--transition-normal);
  cursor: pointer;
}

.filter-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.filter-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.3);
}

/* Masonry Column Layout - No gaps between cards */
.portfolio-grid {
  column-count: 3;
  column-gap: 25px;
}

.portfolio-item {
  break-inside: avoid;
  margin-bottom: 25px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.portfolio-item.hidden {
  display: none;
}

/* Modern Card Design */
.portfolio-card {
  background: var(--card-bg);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-color);
  height: 100%;
}

.portfolio-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  border-color: var(--primary);
}

/* Card Header with Logo */
.portfolio-image {
  position: relative;
  width: 100%;
  height: 180px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--border-color);
}

.portfolio-image img {
  max-width: 60%;
  max-height: 60%;
  object-fit: contain;
  transition: all 0.4s ease;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.1));
}

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

/* Overlay with Actions */
.portfolio-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.92), rgba(6, 182, 212, 0.92));
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.3s ease;
}

.portfolio-card:hover .portfolio-overlay {
  opacity: 1;
}

.overlay-content {
  text-align: center;
  color: white;
}

.overlay-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.overlay-actions .btn-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
  transition: all var(--transition-fast);
  border: 2px solid rgba(255,255,255,0.3);
}

.overlay-actions .btn-icon:hover {
  background: white;
  color: var(--primary);
  transform: scale(1.1);
}

/* Card Content */
.portfolio-info {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.portfolio-info h4 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-primary);
  line-height: 1.3;
  display: flex;
  align-items: center;
  gap: 10px;
}

.portfolio-info h4::before {
  content: '';
  width: 4px;
  height: 24px;
  background: linear-gradient(180deg, var(--primary), #06b6d4);
  border-radius: 2px;
  flex-shrink: 0;
}

/* Portfolio Description Styles */
.portfolio-description {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.8;
}

.portfolio-description .project-headline {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--border-color);
}

.portfolio-description .features-intro {
  font-weight: 600;
  color: var(--primary);
  margin: 16px 0 10px 0;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.portfolio-description .features-section-title {
  margin: 18px 0 8px 0;
  font-size: 13px;
  color: var(--primary);
  padding: 8px 12px;
  background: rgba(var(--primary-rgb), 0.08);
  border-radius: 8px;
  display: inline-block;
}

.portfolio-description .project-description-list,
.portfolio-description .project-features-list {
  list-style: none;
  padding: 0;
  margin: 0 0 12px 0;
}

.portfolio-description .project-description-list li,
.portfolio-description .project-features-list li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 10px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-secondary);
}

.portfolio-description .project-description-list li::before,
.portfolio-description .project-features-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 6px;
  background: var(--primary);
  border-radius: 50%;
}

.portfolio-description .project-features-list li strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* RTL Support */
.rtl .portfolio-info h4::before {
  display: none;
}

.rtl .portfolio-info h4::after {
  content: '';
  width: 4px;
  height: 24px;
  background: linear-gradient(180deg, var(--primary), #06b6d4);
  border-radius: 2px;
  flex-shrink: 0;
}

.rtl .portfolio-description .project-description-list li,
.rtl .portfolio-description .project-features-list li {
  padding-left: 0;
  padding-right: 20px;
}

.rtl .portfolio-description .project-description-list li::before,
.rtl .portfolio-description .project-features-list li::before {
  left: auto;
  right: 0;
}

/* Featured Projects - Special Styling */
.portfolio-item.featured .portfolio-card {
  background: linear-gradient(135deg, var(--card-bg) 0%, rgba(var(--primary-rgb), 0.03) 100%);
  border: 2px solid rgba(var(--primary-rgb), 0.2);
}

.portfolio-item.featured .portfolio-image {
  height: 200px;
  background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.05) 0%, var(--bg-tertiary) 100%);
}

.portfolio-item.featured .portfolio-info h4 {
  font-size: 22px;
}

/* GitHub Projects - Distinct Style */
.portfolio-item.github .portfolio-card {
  border-top: 3px solid #333;
}

[data-theme="dark"] .portfolio-item.github .portfolio-card {
  border-top-color: #fff;
}

.portfolio-cta {
  text-align: center;
  margin-top: 50px;
}

.portfolio-cta .btn-outline {
  padding: 16px 32px;
  font-size: 16px;
  border-radius: 50px;
}

/* Responsive Grid */
@media (max-width: 1200px) {
  .portfolio-grid {
    column-count: 2;
  }
}

@media (max-width: 768px) {
  .portfolio-grid {
    column-count: 1;
  }

  .portfolio-item {
    margin-bottom: 20px;
  }

  .portfolio-filter {
    gap: 8px;
  }

  .filter-btn {
    padding: 10px 20px;
    font-size: 13px;
  }

  .portfolio-image {
    height: 160px;
  }

  .portfolio-info {
    padding: 20px;
  }

  .portfolio-info h4 {
    font-size: 18px;
  }
}

/* Touch Device Support - Show overlays on tap */
@media (hover: none) and (pointer: coarse) {
  /* Portfolio overlays always visible on touch devices */
  .portfolio-overlay {
    opacity: 1;
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.85), rgba(6, 182, 212, 0.85));
  }

  .portfolio-card:hover {
    transform: none;
  }

  .portfolio-card:hover .portfolio-image img {
    transform: none;
  }

  /* Reference cards - show actions */
  .ref-contact-actions {
    opacity: 1;
  }

  /* Certificate cards - subtle tap feedback */
  .certificate-card:active {
    transform: scale(0.98);
  }

  /* Contact cards - tap feedback */
  .contact-card:active {
    transform: scale(0.98);
  }

  /* Social cards - tap feedback */
  .social-card:active {
    transform: scale(0.95);
  }

  /* Skill items - tap feedback */
  .skill-item:active {
    transform: scale(0.95);
  }

  /* Disable hover transforms on touch */
  .portfolio-card:hover,
  .certificate-card:hover,
  .reference-card:hover,
  .contact-card:hover,
  .ref-stat:hover {
    transform: none;
  }

  /* Add active state transforms instead */
  .portfolio-card:active,
  .reference-card:active {
    transform: scale(0.98);
  }
}

/* ============================================
   CERTIFICATES SECTION - MODERN DESIGN
   ============================================ */
.certificates {
  background: var(--bg-primary);
}

.section-description {
  text-align: center;
  color: var(--text-secondary);
  font-size: 16px;
  max-width: 600px;
  margin: 15px auto 0;
  line-height: 1.7;
}

/* Stats Summary */
.certificates-stats {
  display: flex;
  justify-content: center;
  gap: 60px;
  margin-bottom: 50px;
  padding: 30px;
  background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.05) 0%, rgba(6, 182, 212, 0.05) 100%);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-color);
}

.cert-stat {
  text-align: center;
}

.cert-stat .stat-number {
  display: block;
  font-size: 42px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary) 0%, #06b6d4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}

.cert-stat .stat-label {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Filter Buttons */
.certificates-filter {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.cert-filter-btn {
  padding: 10px 24px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--card-bg);
  border: 2px solid var(--border-color);
  transition: all var(--transition-normal);
  cursor: pointer;
}

.cert-filter-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.cert-filter-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.3);
}

/* Certificates Grid */
.certificates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 25px;
}

/* Certificate Card - Modern Design */
.certificate-card {
  background: var(--card-bg);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid var(--border-color);
  position: relative;
  display: flex;
  flex-direction: column;
}

.certificate-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), #06b6d4);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.certificate-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
  border-color: var(--primary);
}

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

.certificate-card.hidden {
  display: none;
}

/* Card Header with Icon */
.cert-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 24px 24px 0;
}

.cert-icon {
  width: 50px;
  height: 50px;
  min-width: 50px;
  background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.1) 0%, rgba(6, 182, 212, 0.1) 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: var(--primary);
}

.cert-icon.tech { color: #3b82f6; background: rgba(59, 130, 246, 0.1); }
.cert-icon.humanitarian { color: #ef4444; background: rgba(239, 68, 68, 0.1); }
.cert-icon.language { color: #10b981; background: rgba(16, 185, 129, 0.1); }
.cert-icon.skills { color: #f59e0b; background: rgba(245, 158, 11, 0.1); }

.cert-title-wrap {
  flex: 1;
}

.certificate-card h4 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
  line-height: 1.4;
}

.cert-category {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  color: var(--primary);
  background: rgba(var(--primary-rgb), 0.1);
  padding: 3px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Card Body */
.cert-body {
  padding: 20px 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.cert-institution {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 12px;
}

.cert-institution i {
  color: var(--primary);
  font-size: 16px;
}

.cert-date {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
}

.cert-date i {
  color: var(--text-muted);
  font-size: 14px;
}

/* Card Footer */
.cert-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
  background: rgba(var(--primary-rgb), 0.02);
}

.cert-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--primary);
  font-size: 14px;
  font-weight: 600;
  transition: all var(--transition-fast);
}

.cert-link:hover {
  gap: 12px;
  color: var(--primary-dark);
}

.cert-link i {
  font-size: 18px;
  transition: transform 0.3s ease;
}

.cert-link:hover i {
  transform: translateX(4px);
}

/* CTA Button */
.certificates-cta {
  text-align: center;
  margin-top: 40px;
}

.certificates-cta .btn-outline {
  padding: 14px 32px;
  font-size: 15px;
  border-radius: 50px;
}

.certificates-cta .btn-outline.hidden {
  display: none;
}

/* Category Colors */
.cert-category.tech { color: #3b82f6; background: rgba(59, 130, 246, 0.1); }
.cert-category.humanitarian { color: #ef4444; background: rgba(239, 68, 68, 0.1); }
.cert-category.language { color: #10b981; background: rgba(16, 185, 129, 0.1); }
.cert-category.skills { color: #f59e0b; background: rgba(245, 158, 11, 0.1); }

/* Responsive */
@media (max-width: 992px) {
  .certificates-stats {
    gap: 40px;
    padding: 25px;
  }

  .cert-stat .stat-number {
    font-size: 36px;
  }
}

@media (max-width: 768px) {
  .certificates-stats {
    flex-direction: column;
    gap: 25px;
  }

  .certificates-filter {
    gap: 8px;
  }

  .cert-filter-btn {
    padding: 8px 16px;
    font-size: 13px;
  }

  .certificates-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .cert-header {
    flex-direction: column;
    gap: 12px;
  }

  .cert-icon {
    width: 44px;
    height: 44px;
    font-size: 20px;
  }
}

/* RTL Support */
.rtl .cert-link i {
  transform: rotate(180deg);
}

.rtl .cert-link:hover i {
  transform: rotate(180deg) translateX(4px);
}

/* ============================================
   REFERENCES SECTION - MODERN DESIGN
   ============================================ */
.references-section {
  background: var(--bg-secondary);
}

/* References Stats */
.references-stats {
  display: flex;
  justify-content: center;
  gap: 50px;
  margin-bottom: 50px;
}

.ref-stat {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 30px;
  background: var(--card-bg);
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  border: 1px solid var(--border-color);
  transition: all var(--transition-normal);
}

.ref-stat:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  border-color: var(--primary);
}

.ref-stat .stat-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.1) 0%, rgba(6, 182, 212, 0.1) 100%);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: var(--primary);
}

.ref-stat .stat-content {
  display: flex;
  flex-direction: column;
}

.ref-stat .stat-number {
  font-size: 32px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.1;
}

.ref-stat .stat-label {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* References Grid */
.references-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

/* Reference Card - Modern Design */
.reference-card {
  background: var(--card-bg);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid var(--border-color);
  position: relative;
}

.reference-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), #06b6d4);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.reference-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
  border-color: var(--primary);
}

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

/* Card Header with Image */
.ref-header {
  position: relative;
  padding: 30px 30px 20px;
  text-align: center;
  background: linear-gradient(180deg, rgba(var(--primary-rgb), 0.03) 0%, transparent 100%);
}

.ref-image-wrapper {
  position: relative;
  width: 100px;
  height: 100px;
  margin: 0 auto 20px;
}

.ref-image {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--card-bg);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease;
}

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

.ref-badge {
  position: absolute;
  bottom: 5px;
  right: 5px;
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, var(--primary), #06b6d4);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 14px;
  box-shadow: 0 4px 10px rgba(var(--primary-rgb), 0.4);
}

.ref-name {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.ref-position {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-secondary);
}

.ref-position .company {
  color: var(--primary);
  font-weight: 600;
}

/* Card Body - Contact Actions */
.ref-body {
  padding: 0 30px 30px;
}

.ref-contact-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.ref-contact-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: rgba(var(--primary-rgb), 0.08);
  border-radius: 12px;
  color: var(--primary);
  font-size: 14px;
  font-weight: 600;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
}

.ref-contact-btn i {
  font-size: 18px;
}

.ref-contact-btn:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.3);
}

.ref-contact-btn.phone:hover {
  background: #10b981;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

/* Quote decoration */
.ref-quote-icon {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 40px;
  color: rgba(var(--primary-rgb), 0.1);
}

/* References CTA */
.references-cta {
  text-align: center;
  margin-top: 50px;
  padding: 40px;
  background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.05) 0%, rgba(6, 182, 212, 0.05) 100%);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-color);
}

.references-cta p {
  font-size: 18px;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.references-cta .btn-primary {
  padding: 14px 32px;
  font-size: 15px;
  border-radius: 50px;
}

/* Responsive */
@media (max-width: 1200px) {
  .references-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 992px) {
  .references-stats {
    flex-wrap: wrap;
    gap: 20px;
  }

  .ref-stat {
    flex: 1 1 calc(33% - 20px);
    min-width: 200px;
  }
}

@media (max-width: 768px) {
  .references-stats {
    flex-direction: column;
    align-items: center;
  }

  .ref-stat {
    width: 100%;
    max-width: 300px;
    justify-content: center;
  }

  .references-grid {
    grid-template-columns: 1fr;
  }

  .ref-contact-actions {
    flex-direction: column;
  }

  .ref-contact-btn {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .ref-header {
    padding: 25px 20px 15px;
  }

  .ref-body {
    padding: 0 20px 25px;
  }

  .ref-image-wrapper {
    width: 80px;
    height: 80px;
  }

  .ref-image {
    width: 80px;
    height: 80px;
  }

  .ref-name {
    font-size: 18px;
  }
}

/* RTL Support */
.rtl .ref-badge {
  right: auto;
  left: 5px;
}

.rtl .ref-quote-icon {
  right: auto;
  left: 20px;
}

/* ============================================
   CONTACT SECTION - Modern Redesign
   ============================================ */
.contact {
  background: var(--bg-primary);
  position: relative;
  overflow: hidden;
}

.contact::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 400px;
  background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.03) 0%, transparent 60%);
  pointer-events: none;
}

.contact .section-description {
  max-width: 600px;
  margin: 0 auto 50px;
  color: var(--text-secondary);
  font-size: 17px;
  line-height: 1.7;
  text-align: center;
}

/* Contact Cards Grid */
.contact-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
  margin-bottom: 60px;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 28px 25px;
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
  text-decoration: none;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
  border: 1px solid transparent;
}

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

.contact-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
  border-color: rgba(var(--primary-rgb), 0.2);
}

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

.contact-card-icon {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  font-size: 26px;
  flex-shrink: 0;
  transition: all var(--transition-normal);
}

.contact-card-icon.email {
  background: rgba(234, 67, 53, 0.1);
  color: #EA4335;
}

.contact-card-icon.phone {
  background: rgba(52, 168, 83, 0.1);
  color: #34A853;
}

.contact-card-icon.whatsapp {
  background: rgba(37, 211, 102, 0.1);
  color: #25D366;
}

.contact-card-icon.location {
  background: rgba(var(--primary-rgb), 0.1);
  color: var(--primary);
}

.contact-card:hover .contact-card-icon.email {
  background: #EA4335;
  color: white;
}

.contact-card:hover .contact-card-icon.phone {
  background: #34A853;
  color: white;
}

.contact-card:hover .contact-card-icon.whatsapp {
  background: #25D366;
  color: white;
}

.contact-card:hover .contact-card-icon.location {
  background: var(--primary);
  color: white;
}

.contact-card-content {
  flex: 1;
  min-width: 0;
}

.contact-card-content h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.contact-card-content p {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.contact-card-arrow {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  border-radius: var(--radius-full);
  color: var(--text-muted);
  font-size: 20px;
  flex-shrink: 0;
  transition: all var(--transition-normal);
}

.contact-card:hover .contact-card-arrow {
  background: var(--primary);
  color: white;
  transform: translateX(5px);
}

/* Location Card Special Styling */
.location-card {
  cursor: default;
}

.location-card:hover {
  transform: translateY(-8px);
}

.contact-card-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(52, 168, 83, 0.1);
  color: #34A853;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}

.contact-card-badge i {
  font-size: 14px;
}

/* Social Connect Section */
.contact-social-section {
  text-align: center;
  margin-bottom: 60px;
}

.social-section-header {
  margin-bottom: 30px;
}

.social-section-header h3 {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.social-section-header p {
  color: var(--text-secondary);
  font-size: 16px;
}

.contact-social-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.social-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 25px 35px;
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
  text-decoration: none;
  transition: all var(--transition-normal);
  min-width: 120px;
  border: 2px solid transparent;
}

.social-card i {
  font-size: 32px;
  transition: all var(--transition-normal);
}

.social-card span {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  transition: all var(--transition-normal);
}

.social-card.linkedin i { color: #0077b5; }
.social-card.github i { color: #333; }
.social-card.facebook i { color: #1877f2; }
.social-card.instagram i { color: #e1306c; }

[data-theme="dark"] .social-card.github i { color: #f0f0f0; }

.social-card:hover {
  transform: translateY(-8px);
}

.social-card.linkedin:hover {
  border-color: #0077b5;
  background: rgba(0, 119, 181, 0.05);
}

.social-card.github:hover {
  border-color: #333;
  background: rgba(51, 51, 51, 0.05);
}

[data-theme="dark"] .social-card.github:hover {
  border-color: #f0f0f0;
  background: rgba(255, 255, 255, 0.05);
}

.social-card.facebook:hover {
  border-color: #1877f2;
  background: rgba(24, 119, 242, 0.05);
}

.social-card.instagram:hover {
  border-color: #e1306c;
  background: rgba(225, 48, 108, 0.05);
}

/* Contact CTA Section */
.contact-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  padding: 40px 50px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: var(--radius-lg);
  color: white;
}

.cta-content {
  display: flex;
  align-items: center;
  gap: 25px;
}

.cta-icon {
  width: 70px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-md);
  font-size: 32px;
  flex-shrink: 0;
}

.cta-text h3 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
}

.cta-text p {
  font-size: 16px;
  opacity: 0.9;
  margin: 0;
}

.btn-cta {
  padding: 16px 32px;
  font-size: 16px;
  font-weight: 600;
  background: white;
  color: var(--primary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  transition: all var(--transition-normal);
  text-decoration: none;
}

.btn-cta:hover {
  background: rgba(255, 255, 255, 0.9);
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.btn-cta i {
  font-size: 18px;
  transition: transform var(--transition-normal);
}

.btn-cta:hover i {
  transform: translateX(5px);
}

/* Contact Section Responsive */
@media (max-width: 1200px) {
  .contact-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .contact-cta {
    flex-direction: column;
    text-align: center;
    padding: 35px;
  }

  .cta-content {
    flex-direction: column;
  }

  .btn-cta {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .contact-cards-grid {
    grid-template-columns: 1fr;
  }

  .contact-card {
    padding: 22px 20px;
  }

  .contact-social-links {
    gap: 15px;
  }

  .social-card {
    padding: 20px 25px;
    min-width: 100px;
  }

  .social-card i {
    font-size: 28px;
  }
}

@media (max-width: 480px) {
  .contact .section-description {
    font-size: 15px;
  }

  .contact-card-icon {
    width: 50px;
    height: 50px;
    font-size: 22px;
  }

  .contact-card-content h4 {
    font-size: 12px;
  }

  .contact-card-content p {
    font-size: 14px;
  }

  .contact-card-badge {
    display: none;
  }

  .contact-social-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }

  .social-card {
    padding: 18px 15px;
    min-width: unset;
  }

  .cta-icon {
    width: 60px;
    height: 60px;
    font-size: 28px;
  }

  .cta-text h3 {
    font-size: 20px;
  }

  .cta-text p {
    font-size: 14px;
  }
}

/* RTL Support for Contact Section */
.rtl .contact-card-arrow {
  transform: rotate(180deg);
}

.rtl .contact-card:hover .contact-card-arrow {
  transform: rotate(180deg) translateX(5px);
}

.rtl .btn-cta i {
  transform: rotate(180deg);
}

.rtl .btn-cta:hover i {
  transform: rotate(180deg) translateX(-5px);
}

/* ============================================
   FOOTER - Modern Design
   ============================================ */
.footer {
  background: linear-gradient(180deg, var(--bg-tertiary) 0%, var(--bg-primary) 100%);
  padding: 80px 0 0;
  position: relative;
  overflow: hidden;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), #06b6d4, var(--primary));
}

/* Footer Main Grid */
.footer-main {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.2fr;
  gap: 60px;
  padding-bottom: 50px;
  border-bottom: 1px solid var(--border-color);
}

/* Brand Column */
.footer-brand {
  max-width: 350px;
}

.footer-logo-wrapper {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
}

.footer-logo {
  width: 55px;
  height: 55px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary) 0%, #06b6d4 100%);
  color: white;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  border-radius: 14px;
  box-shadow: 0 8px 25px rgba(var(--primary-rgb), 0.3);
}

.footer-name {
  display: flex;
  flex-direction: column;
}

.footer-name .name {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.footer-name .title {
  font-size: 13px;
  color: var(--primary);
  font-weight: 500;
}

.footer-tagline {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.8;
  margin-bottom: 25px;
}

/* Social Links in Footer */
.footer-social {
  display: flex;
  gap: 12px;
}

.footer-social .social-link {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border-radius: 12px;
  font-size: 18px;
  transition: all var(--transition-normal);
  border: 1px solid var(--border-color);
}

.footer-social .social-link:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.footer-social .social-link.linkedin:hover {
  background: #0077b5;
  color: white;
  border-color: #0077b5;
}

.footer-social .social-link.github:hover {
  background: #333;
  color: white;
  border-color: #333;
}

[data-theme="dark"] .footer-social .social-link.github:hover {
  background: #f0f0f0;
  color: #333;
  border-color: #f0f0f0;
}

.footer-social .social-link.facebook:hover {
  background: #1877f2;
  color: white;
  border-color: #1877f2;
}

.footer-social .social-link.instagram:hover {
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
  color: white;
  border-color: transparent;
}

/* Quick Links Column */
.footer-links-group h4,
.footer-contact h4 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 25px;
  position: relative;
  padding-bottom: 12px;
}

.footer-links-group h4::after,
.footer-contact h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), #06b6d4);
  border-radius: 2px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links a {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  transition: all var(--transition-fast);
}

.footer-links a i {
  font-size: 14px;
  color: var(--primary);
  opacity: 0;
  transform: translateX(-5px);
  transition: all var(--transition-fast);
}

.footer-links a:hover {
  color: var(--primary);
  transform: translateX(5px);
}

.footer-links a:hover i {
  opacity: 1;
  transform: translateX(0);
}

/* Contact Column */
.contact-items {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-secondary);
  font-size: 14px;
  transition: all var(--transition-fast);
  text-decoration: none;
}

a.contact-item:hover {
  color: var(--primary);
}

.contact-item i {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(var(--primary-rgb), 0.1);
  color: var(--primary);
  border-radius: 10px;
  font-size: 16px;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

a.contact-item:hover i {
  background: var(--primary);
  color: white;
}

.contact-item.location {
  cursor: default;
}

/* Footer Bottom */
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 25px 0;
}

.footer-bottom-content {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.footer-bottom .copyright {
  color: var(--text-muted);
  font-size: 14px;
  margin: 0;
}

.footer-bottom .made-with {
  color: var(--text-muted);
  font-size: 13px;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 5px;
}

.footer-bottom .made-with i {
  color: #ef4444;
  animation: heartbeat 1.5s ease infinite;
}

@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

/* Back to Top in Footer */
.back-to-top-inline {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary) 0%, #06b6d4 100%);
  color: white;
  border-radius: 14px;
  font-size: 22px;
  transition: all var(--transition-normal);
  box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.3);
}

.back-to-top-inline:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(var(--primary-rgb), 0.4);
}

/* Footer Responsive */
@media (max-width: 992px) {
  .footer-main {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }

  .footer-brand {
    grid-column: span 2;
    max-width: 100%;
    text-align: center;
  }

  .footer-logo-wrapper {
    justify-content: center;
  }

  .footer-social {
    justify-content: center;
  }

  .footer-links-group,
  .footer-contact {
    text-align: center;
  }

  .footer-links-group h4::after,
  .footer-contact h4::after {
    left: 50%;
    transform: translateX(-50%);
  }

  .footer-links {
    align-items: center;
  }

  .footer-links a:hover {
    transform: translateX(0);
  }

  .contact-items {
    align-items: center;
  }
}

@media (max-width: 768px) {
  .footer {
    padding: 60px 0 0;
  }

  .footer-main {
    grid-template-columns: 1fr;
    gap: 40px;
    padding-bottom: 40px;
  }

  .footer-brand {
    grid-column: span 1;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 20px;
    text-align: center;
    padding: 20px 0;
  }

  .footer-bottom-content {
    align-items: center;
  }
}

@media (max-width: 480px) {
  .footer-logo-wrapper {
    flex-direction: column;
    text-align: center;
  }

  .footer-name {
    align-items: center;
  }

  .footer-tagline {
    font-size: 13px;
  }

  .contact-item span {
    font-size: 13px;
  }
}

/* RTL Support for Footer */
.rtl .footer-links-group h4::after,
.rtl .footer-contact h4::after {
  left: auto;
  right: 0;
}

.rtl .footer-links a i {
  transform: translateX(5px) rotate(180deg);
}

.rtl .footer-links a:hover {
  transform: translateX(-5px);
}

.rtl .footer-links a:hover i {
  transform: translateX(0) rotate(180deg);
}

@media (max-width: 992px) {
  .rtl .footer-links-group h4::after,
  .rtl .footer-contact h4::after {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
  }

  .rtl .footer-links a:hover {
    transform: translateX(0);
  }
}

/* ============================================
   BACK TO TOP
   ============================================ */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: var(--primary);
  color: white;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
  z-index: 999;
  box-shadow: 0 5px 20px rgba(var(--primary-rgb), 0.4);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  transform: translateY(-5px);
}

/* ============================================
   MODALS
   ============================================ */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
  padding: 20px;
}

.modal.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: var(--card-bg);
  padding: 40px;
  border-radius: var(--radius-lg);
  max-width: 600px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  transform: scale(0.9);
  transition: transform var(--transition-normal);
}

.modal.active .modal-content {
  transform: scale(1);
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  background: var(--bg-secondary);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.modal-close:hover {
  background: var(--primary);
  color: white;
}

.modal-content h3 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.modal-subtitle {
  color: var(--primary);
  font-weight: 500;
  margin-bottom: 25px;
}

.modal-body p {
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.modal-body ul {
  padding-left: 20px;
}

.modal-body li {
  color: var(--text-secondary);
  margin-bottom: 12px;
  position: relative;
  padding-left: 15px;
}

.modal-body li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 6px;
  background: var(--primary);
  border-radius: 50%;
}

.modal-body strong {
  color: var(--text-primary);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 480px) {
  html {
    font-size: 14px;
  }

  .hero-name {
    font-size: 36px;
  }

  .hero-title {
    font-size: 18px;
  }

  .hero-image-wrapper {
    width: 250px;
    height: 250px;
  }

  .hero-stats {
    flex-direction: column;
    gap: 20px;
  }

  .portfolio-grid {
    column-count: 1;
  }

  .section {
    padding: 60px 0;
  }
}

/* ============================================
   RTL SUPPORT
   ============================================ */
[dir="rtl"] {
  direction: rtl;
  text-align: right;
}

[dir="rtl"] .hero-social {
  left: auto;
  right: 40px;
}

[dir="rtl"] .hero-social a:hover {
  transform: translateX(-5px);
}

[dir="rtl"] .timeline::before {
  left: auto;
  right: 0;
}

[dir="rtl"] .timeline-item {
  padding-left: 0;
  padding-right: 40px;
}

[dir="rtl"] .timeline-marker {
  left: auto;
  right: -6px;
}

[dir="rtl"] .timeline-list {
  padding-left: 0;
  padding-right: 20px;
}

[dir="rtl"] .timeline-list li {
  padding-left: 0;
  padding-right: 15px;
}

[dir="rtl"] .timeline-list li::before {
  left: auto;
  right: 0;
}

[dir="rtl"] .form-group label {
  left: auto;
  right: 20px;
}

[dir="rtl"] .form-group input:focus ~ label,
[dir="rtl"] .form-group input:not(:placeholder-shown) ~ label,
[dir="rtl"] .form-group textarea:focus ~ label,
[dir="rtl"] .form-group textarea:not(:placeholder-shown) ~ label {
  left: auto;
  right: 15px;
}

[dir="rtl"] .modal-close {
  right: auto;
  left: 20px;
}

[dir="rtl"] .modal-body ul {
  padding-left: 0;
  padding-right: 20px;
}

[dir="rtl"] .modal-body li {
  padding-left: 0;
  padding-right: 15px;
}

[dir="rtl"] .modal-body li::before {
  left: auto;
  right: 0;
}

/* RTL Mobile Navigation */
@media (max-width: 1100px) {
  [dir="rtl"] .nav-menu {
    right: auto;
    left: -100%;
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.2);
  }

  [dir="rtl"] .nav-menu.active {
    left: 0;
    right: auto;
  }
}

/* ============================================
   MOBILE PERFORMANCE OPTIMIZATIONS
   ============================================ */
@media (max-width: 768px) {
  /* Prevent horizontal overflow */
  html, body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
  }

  .section,
  .container {
    overflow-x: hidden;
    max-width: 100%;
  }

  /* Disable expensive animations on mobile */
  .floating-shapes .shape {
    animation: none;
    display: none;
  }

  /* Reduce animation complexity and prevent overflow */
  .hero-gradient {
    animation: none;
    opacity: 0.3;
    right: 0;
    width: 100%;
    max-width: 100%;
  }

  .hero-bg {
    overflow: hidden;
  }

  /* Simplify transitions on mobile */
  .portfolio-card,
  .certificate-card,
  .reference-card,
  .contact-card,
  .social-card {
    transition: transform 0.2s ease;
  }

  /* Hide hero social sidebar on mobile */
  .hero-social {
    display: none;
  }

  /* Reduce box-shadow complexity */
  .portfolio-card:hover,
  .certificate-card:hover,
  .reference-card:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  }

  /* Ensure all sections don't overflow */
  .hero,
  .about,
  .skills,
  .experience,
  .portfolio,
  .certificates,
  .references-section,
  .contact,
  .footer {
    overflow-x: hidden;
    max-width: 100vw;
  }
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .floating-shapes .shape {
    animation: none;
  }

  .hero-gradient {
    animation: none;
  }

  .loader-circle {
    animation: none;
  }
}
