/* ==========================================================================
   موقع أحمد بشر الشخصي - ملف الستايل الرئيسي
   MBC Studios - تصميم احترافي بوضعين (داكن/فاتح)
   ========================================================================== */

/* ===== متغيرات الألوان (CSS Variables) ===== */
:root {
  /* الألوان الأساسية - الوضع الداكن (الافتراضي) */
  --bg-primary: #0a0e1a;
  --bg-secondary: #111726;
  --bg-card: #161e30;
  --bg-elevated: #1d2740;
  --text-primary: #e8edf5;
  --text-secondary: #9aa8c0;
  --text-muted: #6b7a96;
  --accent-primary: #00e5ff;
  --accent-secondary: #00ff9d;
  --accent-tertiary: #7c5cff;
  --accent-warm: #ffb347;
  --border-color: rgba(0, 229, 255, 0.15);
  --border-hover: rgba(0, 229, 255, 0.4);
  --shadow-glow: 0 0 40px rgba(0, 229, 255, 0.15);
  --shadow-card: 0 10px 40px rgba(0, 0, 0, 0.4);
  --gradient-primary: linear-gradient(135deg, #00e5ff 0%, #00ff9d 100%);
  --gradient-secondary: linear-gradient(135deg, #7c5cff 0%, #00e5ff 100%);
  --gradient-bg: radial-gradient(ellipse at top, #161e30 0%, #0a0e1a 70%);
  --gradient-text: linear-gradient(135deg, #00e5ff 0%, #00ff9d 50%, #7c5cff 100%);
}

/* الوضع الفاتح */
[data-theme="light"] {
  --bg-primary: #f7f9fc;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-elevated: #f0f4fa;
  --text-primary: #1a2332;
  --text-secondary: #4a5a75;
  --text-muted: #7a8aa3;
  --accent-primary: #0099b8;
  --accent-secondary: #00a878;
  --accent-tertiary: #5b3fd6;
  --accent-warm: #e8941a;
  --border-color: rgba(0, 153, 184, 0.15);
  --border-hover: rgba(0, 153, 184, 0.4);
  --shadow-glow: 0 0 40px rgba(0, 153, 184, 0.1);
  --shadow-card: 0 10px 40px rgba(0, 50, 100, 0.08);
  --gradient-primary: linear-gradient(135deg, #0099b8 0%, #00a878 100%);
  --gradient-secondary: linear-gradient(135deg, #5b3fd6 0%, #0099b8 100%);
  --gradient-bg: radial-gradient(ellipse at top, #ffffff 0%, #f0f4fa 70%);
  --gradient-text: linear-gradient(135deg, #0099b8 0%, #00a878 50%, #5b3fd6 100%);
}

/* ===== إعادة الضبط (Reset) ===== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  font-family: 'Cairo', 'Tajawal', 'Segoe UI', system-ui, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.8;
  font-size: 16px;
  overflow-x: hidden;
  transition: background-color 0.4s ease, color 0.4s ease;
}

/* خلفية متدرجة خفيفة */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--gradient-bg);
  z-index: -2;
  opacity: 0.6;
}

/* شبكة خفيفة في الخلفية */
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(var(--border-color) 1px, transparent 1px),
    linear-gradient(90deg, var(--border-color) 1px, transparent 1px);
  background-size: 50px 50px;
  z-index: -1;
  opacity: 0.3;
  pointer-events: none;
}

a {
  color: var(--accent-primary);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--accent-secondary);
}

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

ul {
  list-style: none;
}

/* ===== الحاوية ===== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== أزرار التمرير للأعلى ===== */
.scrollTop {
  position: fixed;
  bottom: 30px;
  left: 30px;
  width: 50px;
  height: 50px;
  background: var(--gradient-primary);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s ease;
  z-index: 100;
  box-shadow: var(--shadow-glow);
}

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

.scrollTop:hover {
  transform: translateY(-5px);
}

.scrollTop svg {
  width: 24px;
  height: 24px;
  fill: var(--bg-primary);
}

/* ===== الهيدر ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(10, 14, 26, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  transition: all 0.3s ease;
}

[data-theme="light"] .header {
  background: rgba(255, 255, 255, 0.85);
}

.header.scrolled {
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--text-primary);
}

.logo-mark {
  width: 42px;
  height: 42px;
  background: var(--gradient-primary);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--bg-primary);
  font-weight: 900;
  box-shadow: var(--shadow-glow);
  transition: transform 0.3s ease;
}

.logo:hover .logo-mark {
  transform: rotate(360deg);
}

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

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

.nav-menu a {
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 10px 16px;
  border-radius: 10px;
  position: relative;
  transition: all 0.3s ease;
}

.nav-menu a:hover,
.nav-menu a.active {
  color: var(--accent-primary);
  background: rgba(0, 229, 255, 0.08);
}

.nav-menu a.active::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 2px;
  background: var(--gradient-primary);
  border-radius: 2px;
}

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

/* زر تبديل الوضع */
.theme-toggle {
  width: 42px;
  height: 42px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  transition: all 0.3s ease;
}

.theme-toggle:hover {
  border-color: var(--border-hover);
  transform: scale(1.05);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
}

.theme-toggle .sun {
  display: none;
}

[data-theme="light"] .theme-toggle .sun {
  display: block;
}

[data-theme="light"] .theme-toggle .moon {
  display: none;
}

/* زر القائمة للموبايل */
.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.menu-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.menu-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

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

.menu-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ===== الأزرار ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 1rem;
  font-family: inherit;
  cursor: pointer;
  border: none;
  transition: all 0.3s ease;
  text-align: center;
  white-space: nowrap;
}

.btn-primary {
  background: var(--gradient-primary);
  color: var(--bg-primary);
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
  color: var(--bg-primary);
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(0, 229, 255, 0.3);
}

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

.btn-outline:hover {
  background: rgba(0, 229, 255, 0.1);
  transform: translateY(-3px);
}

.btn-large {
  padding: 18px 40px;
  font-size: 1.1rem;
}

/* ===== قسم Hero ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 0 60px;
  position: relative;
  overflow: hidden;
}

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

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 229, 255, 0.08);
  border: 1px solid var(--border-color);
  color: var(--accent-secondary);
  padding: 8px 18px;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 24px;
}

.hero-badge::before {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--accent-secondary);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(0, 255, 157, 0.5); }
  50% { opacity: 0.7; box-shadow: 0 0 0 8px rgba(0, 255, 157, 0); }
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 24px;
}

.hero h1 .gradient-text {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.typewriter {
  display: block;
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  color: var(--accent-primary);
  font-weight: 700;
  margin-bottom: 20px;
  min-height: 1.6em;
}

.typewriter::after {
  content: '|';
  animation: blink 1s infinite;
  color: var(--accent-secondary);
}

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

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin-bottom: 36px;
  max-width: 540px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.hero-stats {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
}

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

.stat-number {
  font-size: 2.2rem;
  font-weight: 900;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-label {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 600;
}

/* صورة الهيرو - إطار احترافي */
.hero-image {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-image-frame {
  position: relative;
  width: 380px;
  height: 380px;
  max-width: 100%;
}

.hero-image-frame::before {
  content: '';
  position: absolute;
  inset: -20px;
  background: var(--gradient-primary);
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.4;
  z-index: 0;
  animation: rotate-bg 10s linear infinite;
}

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

.hero-photo {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 30px;
  background: var(--bg-card);
  border: 3px solid var(--border-hover);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform 0.5s ease;
}

.hero-image-frame:hover .hero-photo img {
  transform: scale(1.04);
}

.hero-photo-placeholder {
  text-align: center;
  color: var(--text-muted);
  padding: 20px;
}

.hero-photo-placeholder .avatar-icon {
  width: 120px;
  height: 120px;
  margin: 0 auto 16px;
  opacity: 0.5;
}

/* جسيمات عائمة حول الصورة */
.floating-tech {
  position: absolute;
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  padding: 12px 16px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 0.85rem;
  box-shadow: var(--shadow-card);
  animation: float 4s ease-in-out infinite;
  z-index: 2;
}

.floating-tech:nth-child(2) { top: 10%; right: -10px; animation-delay: 0s; color: var(--accent-primary); }
.floating-tech:nth-child(3) { top: 45%; left: -30px; animation-delay: 1s; color: var(--accent-secondary); }
.floating-tech:nth-child(4) { bottom: 15%; right: -20px; animation-delay: 2s; color: var(--accent-tertiary); }
.floating-tech:nth-child(5) { bottom: 40%; left: -10px; animation-delay: 1.5s; color: var(--accent-warm); }

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

/* ===== عناوين الأقسام ===== */
.section {
  padding: 100px 0;
}

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

.section-tag {
  display: inline-block;
  color: var(--accent-primary);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 900;
  margin-bottom: 16px;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

/* ===== بطاقات الخدمات ===== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 32px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--gradient-primary);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s ease;
}

.service-card:hover {
  transform: translateY(-8px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-glow);
}

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

.service-icon {
  width: 60px;
  height: 60px;
  background: rgba(0, 229, 255, 0.1);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--accent-primary);
}

.service-icon svg {
  width: 30px;
  height: 30px;
}

.service-card h3 {
  font-size: 1.35rem;
  margin-bottom: 12px;
}

.service-card p {
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.service-card ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.service-card ul li {
  color: var(--text-secondary);
  font-size: 0.9rem;
  padding-right: 24px;
  position: relative;
}

.service-card ul li::before {
  content: '✓';
  position: absolute;
  right: 0;
  color: var(--accent-secondary);
  font-weight: 700;
}

/* ===== شبكة المهارات ===== */
.skills-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  margin-bottom: 60px;
}

.skill-chip {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 12px 22px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
  transition: all 0.3s ease;
  cursor: default;
}

.skill-chip:hover {
  border-color: var(--border-hover);
  color: var(--accent-primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow-glow);
}

.skills-bars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
}

.skill-bar {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 24px;
}

.skill-bar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.skill-bar-header h4 {
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.skill-percent {
  color: var(--accent-primary);
  font-weight: 700;
}

.skill-progress {
  height: 8px;
  background: var(--bg-elevated);
  border-radius: 10px;
  overflow: hidden;
}

.skill-progress-fill {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: 10px;
  width: 0;
  transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== معرض الأعمال ===== */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.portfolio-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.4s ease;
}

.portfolio-card:hover {
  transform: translateY(-8px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-glow);
}

.portfolio-thumb {
  height: 200px;
  background: var(--gradient-secondary);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.portfolio-thumb-placeholder {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 800;
  font-size: 1.3rem;
  text-align: center;
}

.portfolio-info {
  padding: 24px;
}

.portfolio-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.portfolio-tag {
  background: rgba(0, 229, 255, 0.1);
  color: var(--accent-primary);
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
}

.portfolio-info h3 {
  font-size: 1.2rem;
  margin-bottom: 8px;
}

.portfolio-info p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* ===== قسم المؤهلات/الإحصائيات ===== */
.stats-band {
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  padding: 60px 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 30px;
  text-align: center;
}

.stat-item .stat-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 16px;
  background: rgba(0, 229, 255, 0.1);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-primary);
}

.stat-item .stat-value {
  font-size: 2.8rem;
  font-weight: 900;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-item .stat-desc {
  color: var(--text-secondary);
  font-weight: 600;
  margin-top: 8px;
}

/* ===== قسم الـ CTA ===== */
.cta-section {
  padding: 80px 0;
}

.cta-box {
  background: var(--gradient-secondary);
  border-radius: 30px;
  padding: 60px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-box::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(255,255,255,0.15), transparent 70%);
}

.cta-box h2 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  color: #fff;
  margin-bottom: 16px;
  position: relative;
}

.cta-box p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.15rem;
  margin-bottom: 32px;
  position: relative;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.cta-box .btn {
  background: #fff;
  color: var(--accent-tertiary);
  position: relative;
}

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

/* ===== محتوى الصفحات الداخلية (about, articles) ===== */
.page-hero {
  padding: 140px 0 60px;
  text-align: center;
  position: relative;
}

.breadcrumb {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.breadcrumb a {
  color: var(--text-secondary);
}

.breadcrumb a:hover {
  color: var(--accent-primary);
}

.breadcrumb span {
  color: var(--text-muted);
}

.page-hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  margin-bottom: 20px;
}

.page-hero p {
  color: var(--text-secondary);
  font-size: 1.2rem;
  max-width: 700px;
  margin: 0 auto;
}

/* ===== تخطيط صفحة about ===== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 50px;
  align-items: start;
}

.about-sidebar {
  position: sticky;
  top: 100px;
}

.about-photo {
  border-radius: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 20px;
  text-align: center;
  margin-bottom: 24px;
}

.about-photo .avatar-large {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 14px;
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.about-photo .avatar-large svg {
  width: 80px;
  height: 80px;
  opacity: 0.5;
  color: var(--accent-primary);
}

.about-photo h3 {
  font-size: 1.3rem;
  margin-bottom: 4px;
}

.about-photo .role {
  color: var(--accent-primary);
  font-weight: 600;
  margin-bottom: 16px;
}

.about-quick-info {
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: right;
}

.about-quick-info li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  padding: 8px 0;
  border-bottom: 1px solid var(--border-color);
}

.about-quick-info li:last-child {
  border-bottom: none;
}

.about-quick-info svg {
  width: 18px;
  height: 18px;
  color: var(--accent-primary);
  flex-shrink: 0;
}

.about-content article {
  margin-bottom: 50px;
}

.about-content h2 {
  font-size: 1.8rem;
  margin-bottom: 20px;
  padding-right: 16px;
  border-right: 4px solid var(--accent-primary);
}

.about-content h3 {
  font-size: 1.3rem;
  margin: 28px 0 14px;
  color: var(--accent-primary);
}

.about-content p {
  color: var(--text-secondary);
  margin-bottom: 16px;
  font-size: 1.05rem;
}

.about-content strong {
  color: var(--text-primary);
}

/* ===== شريط زمني (Timeline) ===== */
.timeline {
  position: relative;
  padding-right: 30px;
}

.timeline::before {
  content: '';
  position: absolute;
  right: 7px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border-color);
}

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

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

.timeline-item .year {
  color: var(--accent-primary);
  font-weight: 800;
  font-size: 0.95rem;
  margin-bottom: 6px;
}

.timeline-item h4 {
  font-size: 1.15rem;
  margin-bottom: 6px;
}

.timeline-item p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* ===== تخطيط المدونة ===== */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
}

.blog-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.4s ease;
  display: flex;
  flex-direction: column;
}

.blog-card:hover {
  transform: translateY(-8px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-glow);
}

.blog-card-thumb {
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}

.blog-card-body {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 12px;
}

.blog-card-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.blog-card h3 {
  font-size: 1.25rem;
  margin-bottom: 12px;
  line-height: 1.4;
}

.blog-card h3 a {
  color: var(--text-primary);
}

.blog-card h3 a:hover {
  color: var(--accent-primary);
}

.blog-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 16px;
  flex: 1;
}

.read-more {
  color: var(--accent-primary);
  font-weight: 700;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ===== صفحة المقال ===== */
.article-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 50px;
  align-items: start;
}

.article-body {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 50px;
}

.article-body h2 {
  font-size: 1.7rem;
  margin: 40px 0 18px;
  padding-right: 16px;
  border-right: 4px solid var(--accent-primary);
}

.article-body h2:first-child {
  margin-top: 0;
}

.article-body h3 {
  font-size: 1.3rem;
  margin: 28px 0 14px;
  color: var(--accent-primary);
}

.article-body p {
  color: var(--text-secondary);
  margin-bottom: 18px;
  font-size: 1.05rem;
  line-height: 1.9;
}

.article-body ul,
.article-body ol {
  margin: 0 16px 20px 0;
  padding-right: 20px;
}

.article-body ul li,
.article-body ol li {
  color: var(--text-secondary);
  margin-bottom: 10px;
  padding-right: 8px;
  line-height: 1.8;
}

.article-body ul li::marker {
  color: var(--accent-primary);
}

.article-body ol li::marker {
  color: var(--accent-primary);
  font-weight: 700;
}

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

.article-body blockquote {
  border-right: 4px solid var(--accent-secondary);
  background: rgba(0, 255, 157, 0.05);
  padding: 20px 24px;
  border-radius: 12px;
  margin: 24px 0;
  color: var(--text-primary);
  font-style: italic;
}

.article-body .info-box {
  background: rgba(0, 229, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 20px;
  margin: 24px 0;
}

.article-body .info-box h4 {
  color: var(--accent-primary);
  margin-bottom: 10px;
  font-size: 1.05rem;
}

.article-toc {
  position: sticky;
  top: 100px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 28px;
}

.article-toc h4 {
  font-size: 1.1rem;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.article-toc ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.article-toc a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  display: block;
  padding: 6px 12px;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.article-toc a:hover {
  color: var(--accent-primary);
  background: rgba(0, 229, 255, 0.05);
}

.article-meta-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}

.article-meta-bar .tag {
  background: rgba(0, 229, 255, 0.1);
  color: var(--accent-primary);
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
}

/* ===== صفحة التواصل ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
}

.contact-info-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 36px;
}

.contact-method {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  margin-bottom: 16px;
  transition: all 0.3s ease;
}

.contact-method:hover {
  border-color: var(--border-hover);
  transform: translateY(-6px);
  box-shadow: var(--shadow-glow);
}

.contact-method-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #fff;
}

.contact-method-icon.whatsapp { background: #25d366; }
.contact-method-icon.phone { background: var(--gradient-primary); }

.contact-method-icon svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

.contact-method-info h4 {
  font-size: 1.05rem;
  margin-bottom: 4px;
}

.contact-method-info p {
  color: var(--text-secondary);
  font-size: 1rem;
  direction: ltr;
  text-align: right;
}

/* نموذج التواصل */
.contact-form {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 36px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 14px 18px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.1);
}

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

.form-status {
  padding: 14px;
  border-radius: 12px;
  margin-top: 16px;
  text-align: center;
  font-weight: 600;
  display: none;
}

.form-status.success {
  display: block;
  background: rgba(0, 255, 157, 0.1);
  color: var(--accent-secondary);
  border: 1px solid var(--accent-secondary);
}

/* ===== الأسئلة الشائعة (FAQ) ===== */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  overflow: hidden;
  transition: border-color 0.3s ease;
}

.faq-item.open {
  border-color: var(--border-hover);
}

.faq-question {
  width: 100%;
  background: none;
  border: none;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 1.1rem;
  font-weight: 700;
  text-align: right;
  padding: 22px 24px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.faq-question .faq-icon {
  width: 28px;
  height: 28px;
  background: rgba(0, 229, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-primary);
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.faq-item.open .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
  padding: 0 24px;
  color: var(--text-secondary);
}

.faq-item.open .faq-answer {
  max-height: 400px;
  padding-bottom: 24px;
}

/* ===== الفوتر ===== */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 70px 0 30px;
  margin-top: 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 50px;
}

.footer-brand .logo {
  margin-bottom: 16px;
}

.footer-brand p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 20px;
  max-width: 320px;
}

.footer-col h4 {
  font-size: 1.1rem;
  margin-bottom: 20px;
}

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

.footer-col ul a {
  color: var(--text-secondary);
  font-size: 0.95rem;
  transition: color 0.3s ease;
}

.footer-col ul a:hover {
  color: var(--accent-primary);
  padding-right: 6px;
}

.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-bottom a {
  color: var(--accent-primary);
}

/* ===== أنميشن الظهور ===== */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ===== صفحة 404 ===== */
.error-page {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 0;
}

.error-code {
  font-size: clamp(6rem, 18vw, 12rem);
  font-weight: 900;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
  margin-bottom: 20px;
}

.error-page h1 {
  font-size: 2rem;
  margin-bottom: 16px;
}

.error-page p {
  color: var(--text-secondary);
  margin-bottom: 32px;
  font-size: 1.1rem;
}

/* ===== التصميم المتجاوب (Responsive) ===== */
@media (max-width: 992px) {
  .hero-grid,
  .about-grid,
  .contact-grid,
  .article-layout {
    grid-template-columns: 1fr;
  }

  .about-sidebar {
    position: static;
  }

  .article-toc {
    position: static;
    order: -1;
  }

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

@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    top: 72px;
    right: -100%;
    width: 80%;
    max-width: 320px;
    height: calc(100vh - 72px);
    background: var(--bg-secondary);
    border-left: 1px solid var(--border-color);
    flex-direction: column;
    align-items: stretch;
    padding: 24px;
    gap: 8px;
    transition: right 0.4s ease;
    overflow-y: auto;
  }

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

  .nav-menu a {
    padding: 14px 18px;
    font-size: 1.05rem;
  }

  .menu-toggle {
    display: flex;
  }

  .hero {
    padding: 110px 0 40px;
    text-align: center;
  }

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

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

  .hero-image {
    order: -1;
    margin-bottom: 20px;
  }

  .hero-image-frame {
    width: 280px;
    height: 280px;
  }

  .floating-tech {
    font-size: 0.75rem;
    padding: 8px 12px;
  }

  .section {
    padding: 70px 0;
  }

  .article-body {
    padding: 30px 24px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .cta-box {
    padding: 40px 24px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .hero-stats {
    gap: 24px;
  }

  .stat-number {
    font-size: 1.8rem;
  }

  .btn {
    padding: 12px 24px;
    font-size: 0.95rem;
  }

  .hero-actions .btn {
    width: 100%;
  }
}

/* ===== تحسين الطباعة ===== */
@media print {
  .header, .footer, .scrollTop, .theme-toggle, .menu-toggle, .nav-actions {
    display: none;
  }
  body {
    background: #fff;
    color: #000;
  }
}
