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

/* Professional Portfolio Styles */

:root {
  /* Professional color scheme */
  --accent-gradient: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
  --primary-gradient: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
  --border-color: rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

body[data-theme="dark"] {
  --primary: #2563eb;
  --primary-dark: #1e40af;
  --primary-light: #3b82f6;
  --secondary: #64748b;
  --accent: #0ea5e9;
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-tertiary: #334155;
  --surface: #1e293b;
  --surface-hover: #334155;
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-tertiary: #94a3b8;
  --border-color: rgba(255, 255, 255, 0.1);
  --divider: rgba(255, 255, 255, 0.1);
  --card-bg: #1e293b;
  --card-border: rgba(255, 255, 255, 0.1);
}

body[data-theme="light"] {
  --primary: #2563eb;
  --primary-dark: #1e40af;
  --primary-light: #3b82f6;
  --secondary: #64748b;
  --accent: #0ea5e9;
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-tertiary: #f1f5f9;
  --surface: #ffffff;
  --surface-hover: #f8fafc;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-tertiary: #64748b;
  --border-color: rgba(0, 0, 0, 0.1);
  --divider: rgba(0, 0, 0, 0.1);
  --card-bg: #ffffff;
  --card-border: rgba(0, 0, 0, 0.1);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.6;
  background: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: hidden;
  transition: var(--transition);
  scroll-behavior: smooth;
  font-size: 16px;
}

/* Skip to content link for accessibility */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--primary);
  color: white;
  padding: 8px;
  text-decoration: none;
  z-index: 10001;
}

.skip-link:focus {
  top: 0;
}

/* Focus styles for accessibility */
*:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

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

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

.loader {
  width: 60px;
  height: 60px;
  border: 4px solid var(--border-color);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Background Animation - Subtle professional pattern */
.bg-animation {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  background: var(--bg-primary);
  overflow: hidden;
}

.bg-animation::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.03) 0%, transparent 50%),
    linear-gradient(45deg, rgba(37, 99, 235, 0.02) 0%, transparent 50%);
  opacity: 0.5;
}

/* Floating Particles - Removed for professional look */
.particles {
  display: none;
}

.particle {
  position: absolute;
  border-radius: 50%;
  opacity: 0;
  animation: float-particle 25s infinite linear;
}

.particle.small {
  width: 3px;
  height: 3px;
  background: var(--primary);
  box-shadow: 0 0 6px var(--primary);
}

.particle.medium {
  width: 6px;
  height: 6px;
  background: var(--secondary);
  box-shadow: 0 0 12px var(--secondary);
}

@keyframes float-particle {
  0% {
    transform: translateY(100vh) rotate(0deg);
    opacity: 0;
  }

  10% {
    opacity: 1;
  }

  90% {
    opacity: 1;
  }

  100% {
    transform: translateY(-10vh) rotate(360deg);
    opacity: 0;
  }
}

/* Navigation */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  background: var(--surface);
  border-bottom: 2px solid var(--border-color);
  z-index: 1000;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 2rem;
}

.logo {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--primary);
  letter-spacing: -0.5px;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2.5rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.95rem;
  transition: var(--transition);
  position: relative;
  padding: 0.5rem 0;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
  font-weight: 600;
}

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

.menu-toggle {
  display: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-primary);
  background: none;
  border: none;
  padding: 0.5rem;
  min-width: 44px;
  min-height: 44px;
}

.nav-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.language-selector {
  display: flex;
  gap: 0.5rem;
  padding: 0.25rem;
  background: var(--bg-secondary);
  border-radius: 8px;
  border: 1px solid var(--border-color);
  position: relative;
}

.language-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  transition: all 0.3s ease;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.language-btn:hover {
  background: var(--surface-hover);
  color: var(--text-primary);
  transform: translateY(-2px);
}

.language-btn.active {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* Mobile language dropdown */
@media (max-width: 768px) {
  .language-selector {
    flex-direction: column;
    padding: 0;
    background: transparent;
    border: none;
    gap: 0;
  }

  .language-selector:not(.expanded) .language-btn:not(.active) {
    display: none;
  }

  .language-selector.expanded {
    position: absolute;
    top: 100%;
    right: 60px;
    margin-top: 0.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 0.25rem;
    gap: 0.25rem;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
  }

  .language-selector.expanded .language-btn {
    display: flex;
    width: 100%;
    min-width: 60px;
  }

  .language-btn.active {
    position: relative;
  }

  .language-selector:not(.expanded) .language-btn.active::after {
    content: '\f107';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    margin-left: 0.25rem;
    font-size: 0.7rem;
  }

  body[dir="rtl"] .language-selector.expanded {
    right: auto;
    left: 60px;
  }
}

.theme-toggle,
.chatbot-toggle {
  background: var(--surface);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0.75rem;
  border-radius: 6px;
  transition: var(--transition);
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Floating Chatbot Toggle Button */
.chatbot-toggle-floating {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 60px;
  height: 60px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.4);
  z-index: 1999;
  transition: all 0.3s ease;
  animation: pulse-float 2s ease-in-out infinite;
}

.chatbot-toggle-floating:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 30px rgba(37, 99, 235, 0.6);
}

.chatbot-toggle-floating:active {
  transform: scale(0.95);
}

@keyframes pulse-float {
  0%, 100% {
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.4);
  }
  50% {
    box-shadow: 0 6px 30px rgba(37, 99, 235, 0.6);
  }
}

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

/* Hero Section - Split Layout */
.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  padding: 0 2rem;
  max-width: 1400px;
  margin: 0 auto;
  padding-top: 120px;
  gap: 4rem;
}

.hero-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 6px;
  padding: 3rem;
  box-shadow: var(--shadow-md);
}

.hero-avatar {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
  border: 4px solid var(--primary);
  box-shadow: var(--shadow-lg);
}

.hero-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.hero-left h1 {
  font-family: 'Inter', sans-serif;
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-primary);
  line-height: 1.2;
  letter-spacing: -0.5px;
}

.hero-left .subtitle {
  font-size: clamp(1.1rem, 3vw, 1.4rem);
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  font-weight: 500;
}

.hero-left .description {
  color: var(--text-tertiary);
  margin-bottom: 2rem;
  line-height: 1.8;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  padding: 1rem 2rem;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  transition: var(--transition);
  font-size: 1rem;
  position: relative;
  overflow: hidden;
  min-height: 44px;
}

.btn-primary {
  background: var(--primary-gradient);
  color: white;
  box-shadow: var(--shadow-elevation-3);
}

.btn-primary:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: var(--shadow-xl);
}

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

.btn-secondary:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-secondary:hover {
  background: var(--surface-hover);
  transform: translateY(-4px) scale(1.05);
  box-shadow: var(--shadow-elevation-3);
}

/* Hero Right - Skills and Bio */
.hero-right {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.bio-section,
.skills-preview {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 6px;
  padding: 2.5rem;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

.bio-section:hover,
.skills-preview:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.bio-section h2,
.skills-preview h2 {
  font-family: 'Inter', sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 1rem;
  border-bottom: 2px solid var(--primary);
  padding-bottom: 0.75rem;
}

.bio-text {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.highlight-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.stat-item {
  text-align: center;
  padding: 1.5rem;
  background: var(--surface);
  border-radius: 6px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.stat-number {
  font-family: 'Inter', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  display: block;
}

.stat-label {
  color: var(--text-tertiary);
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.skill-category {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 1.5rem;
  text-align: center;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.skill-category:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

.skill-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 1rem;
  background: var(--primary);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: white;
  box-shadow: var(--shadow-sm);
}

.skill-category h3 {
  margin-bottom: 1rem;
  color: var(--text-primary);
  font-size: 1.1rem;
}

.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.skill-tag {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  font-size: 0.85rem;
  border: 1px solid var(--border-color);
  font-weight: 500;
}

/* Regular sections styling */
section {
  padding: 6rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 5rem;
}

.section-title {
  font-family: 'Inter', sans-serif;
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
  letter-spacing: -0.5px;
  position: relative;
  display: inline-block;
}

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

.section-subtitle {
  font-size: clamp(1rem, 2vw, 1.3rem);
  color: var(--text-secondary);
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.7;
}

.glass-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 6px;
  padding: 2.5rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.glass-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
  transform: translateY(-4px);
}

/* Projects Section */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 2.5rem;
  margin-top: 3rem;
}

.project-card {
  cursor: pointer;
}

.project-image {
  width: 100%;
  height: 250px;
  border-radius: 6px;
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.project-card:hover .project-image {
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.project-content h3 {
  font-size: 1.4rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
  font-weight: 600;
}

.project-content p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.tech-tag {
  background: rgba(240, 147, 251, 0.1);
  color: var(--secondary);
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  font-size: 0.8rem;
  border: 1px solid rgba(240, 147, 251, 0.2);
}

/* Sensor Widget */
.sensor-widget {
  position: fixed;
  top: 50%;
  right: 20px;
  transform: translateY(-50%);
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 6px;
  padding: 1rem;
  z-index: 1000;
  min-width: 180px;
  box-shadow: var(--shadow-lg);
  transition: var(--transition);
}

.sensor-widget:hover {
  transform: translateY(-50%) scale(1.05);
}

.sensor-widget h4 {
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sensor-data {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.sensor-value {
  color: var(--text-secondary);
  font-size: 0.8rem;
  display: flex;
  justify-content: space-between;
}

.sensor-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 8px #4ade80;
  animation: pulse 2s infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.3;
  }
}

/* Board Status Widget */
.board-widget {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 6px;
  padding: 1.5rem;
  z-index: 1000;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-lg);
  min-width: 44px;
  min-height: 44px;
}

.board-widget:hover {
  transform: scale(1.05);
}

.board-illustration {
  width: 80px;
  height: 60px;
  position: relative;
  background: #2d4a2d;
  border-radius: 6px;
  border: 2px solid #1a1a1a;
  display: flex;
  align-items: center;
  justify-content: center;
}

.board-led {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff4444;
  transition: var(--transition);
  box-shadow: 0 0 4px #ff4444;
}

.board-led.active {
  background: #44ff44;
  box-shadow: 0 0 8px #44ff44;
  animation: led-blink 1s infinite;
}

.board-led.connected {
  background: #4444ff;
  box-shadow: 0 0 8px #4444ff;
  animation: led-connect 0.5s ease-in-out;
}

@keyframes led-blink {

  0%,
  50% {
    opacity: 1;
  }

  51%,
  100% {
    opacity: 0.3;
  }
}

@keyframes led-connect {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.3);
  }

  100% {
    transform: scale(1);
  }
}

.board-status {
  text-align: center;
  margin-top: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.8rem;
}

/* Chatbot */
.chatbot {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 350px;
  height: 450px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 6px;
  display: none;
  flex-direction: column;
  z-index: 2000;
  box-shadow: var(--shadow-xl);
  animation: chatbot-appear 0.3s ease-out;
}

.chatbot.active {
  display: flex;
}

@keyframes chatbot-appear {
  from {
    transform: scale(0.8) translateY(20px);
    opacity: 0;
  }

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

.chatbot-header {
  padding: 1rem;
  border-bottom: 2px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chatbot-title {
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.chatbot-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 6px;
  transition: var(--transition);
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chatbot-close:hover {
  background: var(--surface-hover);
  color: var(--text-primary);
}

.chatbot-messages {
  flex: 1;
  padding: 1rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.message {
  max-width: 80%;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  word-wrap: break-word;
}

.message.bot {
  background: var(--surface);
  color: var(--text-primary);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.message.user {
  background: var(--primary);
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.chatbot-input {
  padding: 1rem;
  border-top: 2px solid var(--border-color);
  display: flex;
  gap: 0.5rem;
}

.chatbot-input input {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 0.75rem;
  color: var(--text-primary);
  font-family: inherit;
}

.chatbot-input input:focus {
  outline: none;
  border-color: var(--primary);
}

.chatbot-input button {
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 6px;
  padding: 0.75rem 1rem;
  cursor: pointer;
  transition: var(--transition);
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chatbot-input button:hover {
  transform: translateY(-2px);
}

/* Typing indicator animation */
.typing-indicator {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 1rem !important;
  background: var(--surface) !important;
  align-self: flex-start !important;
  max-width: 60px !important;
}

.typing-indicator span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  animation: typing 1.4s infinite;
}

.typing-indicator span:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typing {
  0%, 60%, 100% {
    transform: translateY(0);
    opacity: 0.5;
  }
  30% {
    transform: translateY(-10px);
    opacity: 1;
  }
}

/* Follow-up suggestions */
.follow-up-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-self: flex-start;
  max-width: 90%;
  margin-top: -0.5rem;
  padding: 0.5rem 0;
}

.suggestion-btn {
  background: transparent;
  border: 1.5px solid var(--primary);
  color: var(--primary);
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  font-family: inherit;
}

.suggestion-btn:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Timeline for experience/education */
.timeline {
  position: relative;
  max-width: 900px;
  margin: 3rem auto;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--primary);
  transform: translateX(-50%);
  border-radius: 3px;
}

.timeline-item {
  position: relative;
  width: 50%;
  padding: 2.5rem;
  margin-bottom: 3rem;
}

.timeline-item:nth-child(odd) {
  left: 0;
  text-align: right;
}

.timeline-item:nth-child(even) {
  left: 50%;
}

.timeline-item::before {
  content: '';
  position: absolute;
  top: 3rem;
  width: 20px;
  height: 20px;
  background: var(--primary);
  border-radius: 50%;
  border: 4px solid var(--bg-primary);
  box-shadow: var(--shadow-md);
}

.timeline-item:nth-child(odd)::before {
  right: -12px;
}

.timeline-item:nth-child(even)::before {
  left: -12px;
}

/* Certifications Timeline */
.certifications-timeline {
  max-width: 1000px;
  margin: 4rem auto;
  padding: 0 2rem;
}

.timeline-heading {
  text-align: center;
  font-size: 2rem;
  color: var(--text-primary);
  margin-bottom: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.timeline-heading i {
  color: var(--primary);
  font-size: 2.5rem;
}

.cert-timeline {
  position: relative;
  padding: 2rem 0;
}

.cert-timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--primary) 0%, var(--primary-light) 100%);
  transform: translateX(-50%);
  box-shadow: 0 0 20px rgba(37, 99, 235, 0.3);
  border-radius: 4px;
}

.cert-timeline-item {
  position: relative;
  width: 50%;
  padding: 0 3rem;
  margin-bottom: 4rem;
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.cert-timeline-item.visible {
  opacity: 1;
  transform: translateY(0);
}

.cert-timeline-item:nth-child(odd) {
  left: 0;
  padding-right: 3rem;
  padding-left: 0;
}

.cert-timeline-item:nth-child(even) {
  left: 50%;
  padding-left: 3rem;
  padding-right: 0;
}

.cert-timeline-marker {
  position: absolute;
  top: 0;
  width: 60px;
  height: 60px;
  background: var(--primary);
  border-radius: 50%;
  border: 5px solid var(--bg-primary);
  box-shadow: 0 0 0 4px var(--primary-light), 0 0 20px rgba(37, 99, 235, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: all 0.4s ease;
}

.cert-timeline-marker i {
  color: white;
  font-size: 1.5rem;
}

.cert-timeline-item:nth-child(odd) .cert-timeline-marker {
  right: -30px;
}

.cert-timeline-item:nth-child(even) .cert-timeline-marker {
  left: -30px;
}

.cert-timeline-item:hover .cert-timeline-marker {
  transform: scale(1.2) rotate(360deg);
  box-shadow: 0 0 0 4px var(--primary-light), 0 0 30px rgba(37, 99, 235, 0.8);
}

.cert-timeline-content {
  background: var(--card-bg);
  border: 2px solid var(--card-border);
  border-radius: 12px;
  padding: 2rem;
  position: relative;
  transition: all 0.4s ease;
}

.cert-timeline-content::before {
  content: '';
  position: absolute;
  top: 20px;
  width: 0;
  height: 0;
  border-style: solid;
}

.cert-timeline-item:nth-child(odd) .cert-timeline-content::before {
  right: -15px;
  border-width: 15px 0 15px 15px;
  border-color: transparent transparent transparent var(--card-border);
}

.cert-timeline-item:nth-child(even) .cert-timeline-content::before {
  left: -15px;
  border-width: 15px 15px 15px 0;
  border-color: transparent var(--card-border) transparent transparent;
}

.cert-timeline-content:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(37, 99, 235, 0.2);
  border-color: var(--primary);
}

.cert-date {
  display: inline-block;
  background: var(--primary);
  color: white;
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1rem;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.cert-timeline-content h4 {
  font-size: 1.3rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.cert-issuer {
  color: var(--primary);
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cert-timeline-content p {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.cert-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  margin-top: 1rem;
  padding: 0.5rem 1rem;
  border: 2px solid var(--primary);
  border-radius: 6px;
  transition: all 0.3s ease;
}

.cert-link:hover {
  background: var(--primary);
  color: white;
  transform: translateX(5px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.cert-link i {
  transition: transform 0.3s ease;
}

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

.achievements-subtitle {
  text-align: center;
  font-size: 1.8rem;
  color: var(--text-primary);
  margin: 5rem 0 3rem 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.achievements-subtitle i {
  color: var(--primary);
  font-size: 2rem;
}

/* Contact Form */
.contact-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  margin-top: 3rem;
}

.contact-info h3 {
  font-size: 1.6rem;
  margin-bottom: 2.5rem;
  color: var(--text-primary);
  font-weight: 600;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
  color: var(--text-secondary);
  transition: var(--transition);
}

.contact-item:hover {
  color: var(--text-primary);
  transform: translateX(5px);
}

.contact-item i {
  width: 50px;
  height: 50px;
  background: var(--primary);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2rem;
  box-shadow: var(--shadow-sm);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.form-group label {
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 1rem;
  color: var(--text-primary);
  font-size: 1rem;
  transition: var(--transition);
  font-family: inherit;
}


.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
  background: var(--surface);
}

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

.social-links {
  display: flex;
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.social-link {
  width: 48px;
  height: 48px;
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 1.2rem;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.social-link:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Enhanced Skills Section */
.skills-full-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2.5rem;
  margin-top: 3rem;
}

.skill-category-full {
  text-align: center;
}

.skill-icon-full {
  width: 80px;
  height: 80px;
  margin: 0 auto 2rem;
  background: var(--primary);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: white;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

.skill-icon-full:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  background: var(--primary-dark);
}

.skill-category-full h3 {
  font-size: 1.4rem;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
  font-weight: 600;
}

.skills-list-full {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.skill-tag-full {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.9rem;
  border: 1px solid var(--border-color);
  transition: var(--transition);
  font-weight: 500;
}

.skill-tag-full:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* Blog Section */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2.5rem;
  margin-top: 3rem;
}

.blog-card {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
}

.blog-image {
  width: 64px;
  height: 64px;
  background: var(--primary);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: white;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.blog-meta {
  color: var(--text-tertiary);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.blog-title {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
  font-weight: 600;
}

.blog-excerpt {
  color: var(--text-secondary);
  line-height: 1.7;
}

/* Achievements Section */
.achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2.5rem;
  margin-top: 3rem;
}

.achievement-card {
  text-align: center;
}

.achievement-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1.5rem;
  background: var(--primary);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: white;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.achievement-card:hover .achievement-icon {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  background: var(--primary-dark);
}

.achievement-card h3 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
  font-weight: 600;
}

.achievement-card p {
  color: var(--text-secondary);
  line-height: 1.7;
}

.view-cert {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: var(--transition);
  padding: 0.5rem 1rem;
  border: 1px solid var(--primary);
  border-radius: 6px;
}

.view-cert:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

/* Footer */
footer {
  background: var(--bg-secondary);
  border-top: 2px solid var(--divider);
  padding: 3rem 2rem;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Mobile Responsiveness */
@media (max-width: 1024px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 3rem;
    text-align: center;
    padding-top: 100px;
  }

  .hero-right {
    order: -1;
  }

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

  .nav-container {
    padding: 1rem 1.5rem;
  }

  .sensor-widget {
    display: none;
  }
}

@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    flex-direction: column;
    padding: 2rem;
    border-top: 2px solid var(--border-color);
    gap: 1.5rem;
    text-align: left;
  }

  .nav-links.active {
    display: flex;
  }

  body[dir="rtl"] .nav-links {
    text-align: right;
    align-items: flex-end;
  }

  body[dir="rtl"] .logo {
    order: 2;
  }

  body[dir="rtl"] .menu-toggle {
    order: 1;
  }

  body[dir="rtl"] .nav-actions {
    order: 3;
  }

  .hero {
    padding: 1.5rem;
    padding-top: 100px;
  }

  .hero-left,
  .bio-section,
  .skills-preview {
    padding: 2rem;
  }

  .hero-avatar {
    width: 150px;
    height: 150px;
  }

  .cta-buttons {
    flex-direction: column;
    width: 100%;
  }

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

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

  .timeline::before {
    left: 30px;
  }

  .timeline-item {
    width: 100%;
    left: 0 !important;
    text-align: left !important;
    padding-left: 80px;
    padding-right: 1rem;
  }

  .timeline-item::before {
    left: 18px !important;
  }

  /* Responsive Certification Timeline */
  .cert-timeline::before {
    left: 30px;
  }

  .cert-timeline-item {
    width: 100%;
    left: 0 !important;
    padding-left: 80px !important;
    padding-right: 1rem !important;
  }

  .cert-timeline-item:nth-child(odd) .cert-timeline-marker,
  .cert-timeline-item:nth-child(even) .cert-timeline-marker {
    left: 0 !important;
    right: auto !important;
  }

  .cert-timeline-item:nth-child(odd) .cert-timeline-content::before,
  .cert-timeline-item:nth-child(even) .cert-timeline-content::before {
    left: -15px !important;
    right: auto !important;
    border-width: 15px 15px 15px 0 !important;
    border-color: transparent var(--card-border) transparent transparent !important;
  }

  .certifications-timeline {
    padding: 0 1rem;
  }

  .timeline-heading {
    font-size: 1.5rem;
  }

  .timeline-heading i {
    font-size: 2rem;
  }

  .achievements-subtitle {
    font-size: 1.4rem;
    margin: 3rem 0 2rem 0;
  }

  .skills-full-grid,
  .projects-grid,
  .blog-grid,
  .achievements-grid {
    grid-template-columns: 1fr;
  }

  .board-widget {
    bottom: 90px;
    right: 10px;
    padding: 1rem;
  }

  .board-illustration {
    width: 60px;
    height: 45px;
  }

  .chatbot {
    width: 100%;
    max-width: 350px;
    left: 50%;
    transform: translateX(-50%);
  }
}

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

  .hero-left h1 {
    font-size: 2rem;
  }

  section {
    padding: 5rem 1.5rem;
  }

  .glass-card {
    padding: 1.5rem;
  }
}

.cert-id {
  margin-top: 1rem;
  font-size: 0.8rem;
  color: var(--text-tertiary);
  font-family: monospace;
  background: var(--surface);
  padding: 0.5rem;
  border-radius: 4px;
  word-break: break-all;
}

/* Scroll Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

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

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

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

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

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

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

@keyframes glow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(37, 99, 235, 0.3);
  }
  50% {
    box-shadow: 0 0 40px rgba(37, 99, 235, 0.6);
  }
}

@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

.animate-on-scroll {
  opacity: 0;
  animation: fadeInUp 0.8s ease forwards;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Enhanced hover animations for cards */
.glass-card {
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.glass-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 20px 40px rgba(37, 99, 235, 0.2);
}

/* Button hover effects */
.btn {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
}

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

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(37, 99, 235, 0.4);
}

/* Skill tags animation */
.skill-tag,
.skill-tag-full,
.tech-tag {
  transition: all 0.3s ease;
}

.skill-tag:hover,
.skill-tag-full:hover,
.tech-tag:hover {
  transform: translateY(-3px) scale(1.1);
  box-shadow: 0 5px 15px rgba(37, 99, 235, 0.3);
}

/* Icon animations */
.skill-icon,
.skill-icon-full,
.achievement-icon {
  transition: all 0.3s ease;
}

.glass-card:hover .skill-icon i,
.glass-card:hover .skill-icon-full i,
.glass-card:hover .achievement-icon i {
  animation: pulse 1s ease infinite;
}

/* Navigation link animation */
.nav-link {
  position: relative;
  transition: all 0.3s ease;
}

.nav-link:hover {
  transform: translateY(-2px);
}

/* Project image zoom effect */
.project-image {
  overflow: hidden;
}

.project-image img {
  transition: transform 0.6s ease;
}

.project-card:hover .project-image img {
  transform: scale(1.1) rotate(2deg);
}

/* Social links animation */
.social-link {
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.social-link:hover {
  transform: translateY(-5px) rotate(360deg) scale(1.2);
}

/* Stat counter animation */
.stat-number {
  animation: scaleIn 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

/* RTL Support for Arabic */
body[dir="rtl"] {
  text-align: right;
}

body[dir="rtl"] .nav-links {
  /* Don't reverse - keep logical order, just align right */
}

body[dir="rtl"] .nav-container {
  /* Don't reverse - just swap logo and actions positions via order */
}

body[dir="rtl"] .logo {
  order: 2;
}

body[dir="rtl"] .nav-links {
  order: 1;
}

body[dir="rtl"] .nav-actions {
  order: 0;
}

body[dir="rtl"] .hero {
  flex-direction: row-reverse;
}

body[dir="rtl"] .contact-content {
  direction: rtl;
}

body[dir="rtl"] .cta-buttons {
  flex-direction: row-reverse;
}

body[dir="rtl"] .social-links {
  flex-direction: row-reverse;
}

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

body[dir="rtl"] .timeline-item {
  text-align: right;
}

body[dir="rtl"] .chatbot {
  right: auto;
  left: 20px;
}

body[dir="rtl"] .chatbot-toggle-floating {
  right: auto;
  left: 20px;
}

@media (max-width: 768px) {
  body[dir="rtl"] .timeline::before {
    right: 30px;
    left: auto;
  }

  body[dir="rtl"] .timeline-item {
    padding-right: 80px;
    padding-left: 1rem;
  }

  body[dir="rtl"] .timeline-item::before {
    right: 18px !important;
    left: auto !important;
  }
}