/* ====================================================================
 * MAHMOUD ADLY IBRAHIM - MODERN SOCIAL PORTFOLIO STYLES
 * Clean, Human-Designed, Mobile-First, Bilingual (RTL/LTR)
 * ==================================================================== */

/* --------------------------------------------------------------------
 * CSS TOKENS & VARIABLES (MATERIAL DESIGN 3 / M3 YOU)
 * -------------------------------------------------------------------- */
:root {
  /* Light Mode Palette (Material Design 3 Surface & Tone) */
  --bg-main: #f4f6fb;
  --bg-card: #ffffff;
  --bg-card-secondary: #f0f3fa;
  --bg-input: #ffffff;
  --text-primary: #191c20;
  --text-secondary: #43474e;
  --text-muted: #73777f;
  --border-color: #e0e4eb;
  --border-subtle: #edf0f7;
  
  /* M3 Primary & Accents */
  --primary: #1a56db;
  --primary-hover: #1347ba;
  --primary-light: #edf2fe;
  --primary-border: #bfdbfe;
  --primary-container: #dbeafe;
  --on-primary-container: #1e3a8a;
  --whatsapp: #25d366;
  --whatsapp-hover: #20bd5a;
  --accent-gold: #d97706;
  --badge-bg: #e0e7ff;
  --badge-text: #3730a3;

  /* Material Design 3 Elevation Levels */
  --elevation-1: 0 1px 3px 1px rgba(0, 0, 0, 0.06), 0 1px 2px 0 rgba(0, 0, 0, 0.04);
  --elevation-2: 0 2px 6px 2px rgba(0, 0, 0, 0.06), 0 1px 2px 0 rgba(0, 0, 0, 0.04);
  --elevation-3: 0 4px 14px 3px rgba(0, 0, 0, 0.07), 0 1px 3px 0 rgba(0, 0, 0, 0.04);
  --elevation-4: 0 8px 24px 6px rgba(0, 0, 0, 0.08), 0 2px 6px 0 rgba(0, 0, 0, 0.05);

  --shadow-sm: var(--elevation-1);
  --shadow-md: var(--elevation-2);
  --shadow-lg: var(--elevation-3);
  --shadow-xl: var(--elevation-4);

  /* Material 3 Shapes & Radiuses */
  --max-width: 1080px;
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-full: 9999px;

  /* Fonts (Inter & Almarai from Google Fonts) */
  --font-en: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-ar: 'Almarai', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Transitions */
  --transition: all 0.25s cubic-bezier(0.2, 0, 0, 1);
  --transition-spring: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Dark Mode Palette (M3 Dark Surface) */
body.dark {
  --bg-main: #0f1117;
  --bg-card: #171a22;
  --bg-card-secondary: #202430;
  --bg-input: #1c202a;
  --text-primary: #e2e5ec;
  --text-secondary: #c3c7d2;
  --text-muted: #8d92a0;
  --border-color: #292e3d;
  --border-subtle: #222634;
  
  --primary: #3b82f6;
  --primary-hover: #60a5fa;
  --primary-light: rgba(59, 130, 246, 0.14);
  --primary-border: rgba(59, 130, 246, 0.28);
  --primary-container: rgba(59, 130, 246, 0.2);
  --on-primary-container: #93c5fd;
  --badge-bg: rgba(99, 102, 241, 0.22);
  --badge-text: #a5b4fc;

  --elevation-1: 0 1px 3px 1px rgba(0, 0, 0, 0.4), 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --elevation-2: 0 2px 6px 2px rgba(0, 0, 0, 0.45), 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --elevation-3: 0 4px 14px 3px rgba(0, 0, 0, 0.55), 0 1px 3px 0 rgba(0, 0, 0, 0.35);
  --elevation-4: 0 8px 24px 6px rgba(0, 0, 0, 0.65), 0 2px 6px 0 rgba(0, 0, 0, 0.4);
}

/* --------------------------------------------------------------------
 * BASE & TYPOGRAPHY
 * -------------------------------------------------------------------- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-en);
  background-color: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
  min-height: 100vh;
  padding-bottom: 75px; /* Space for mobile bottom bar */
}

@media (min-width: 769px) {
  body {
    padding-bottom: 0;
  }
}

/* Arabic Direction and Typography */
html[lang="ar"],
body.ar-lang {
  font-family: var(--font-ar);
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, select, textarea {
  font-family: inherit;
}

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

.container {
  width: 100%;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 16px;
  padding-right: 16px;
}

/* --------------------------------------------------------------------
 * TOP NAVIGATION BAR (DESKTOP & HEADER)
 * -------------------------------------------------------------------- */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background-color: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition);
}

body.dark .top-nav {
  background-color: rgba(22, 26, 32, 0.88);
}

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

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--text-primary);
}

.brand-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  border: 1px solid var(--primary-border);
}

.brand-badge {
  color: var(--primary);
  font-size: 0.95rem;
}

.nav-links {
  display: none;
  align-items: center;
  gap: 6px;
}

@media (min-width: 860px) {
  .nav-links {
    display: flex;
  }
}

.nav-item {
  padding: 6px 12px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.nav-item:hover,
.nav-item.active {
  color: var(--primary);
  background-color: var(--primary-light);
}

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

.btn-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.btn-icon:hover {
  color: var(--primary);
  border-color: var(--primary-border);
  transform: translateY(-1px);
}

.lang-btn {
  padding: 6px 12px;
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

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

/* --------------------------------------------------------------------
 * PROFILE HEADER (SOCIAL PROFILE STYLE)
 * -------------------------------------------------------------------- */
.profile-section {
  padding-top: 24px;
  padding-bottom: 20px;
}

.profile-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.profile-header-main {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

@media (min-width: 680px) {
  .profile-header-main {
    flex-direction: row;
    align-items: flex-start;
  }
}

.avatar-wrapper {
  position: relative;
  align-self: center;
}

.avatar-container {
  width: 104px;
  height: 104px;
  border-radius: var(--radius-full);
  padding: 3px;
  background: linear-gradient(135deg, #2563eb, #38bdf8, #818cf8);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
}

.avatar-inner {
  width: 100%;
  height: 100%;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 2.5rem;
  font-weight: 800;
  overflow: hidden;
  border: 2px solid var(--bg-card);
}

.avatar-badge {
  position: absolute;
  bottom: 4px;
  right: 4px;
  width: 26px;
  height: 26px;
  background: #10b981;
  border: 3px solid var(--bg-card);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.7rem;
  box-shadow: var(--shadow-sm);
}

html[dir="rtl"] .avatar-badge {
  right: auto;
  left: 4px;
}

.profile-details {
  flex: 1;
  text-align: center;
}

@media (min-width: 680px) {
  .profile-details {
    text-align: left;
  }
  html[dir="rtl"] .profile-details {
    text-align: right;
  }
}

.profile-name-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

@media (min-width: 680px) {
  .profile-name-row {
    justify-content: flex-start;
  }
}

.profile-name {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.verified-icon {
  color: #0284c7;
  font-size: 1.15rem;
}

.profile-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
}

.profile-bio {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 14px;
}

.profile-meta-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 18px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

@media (min-width: 680px) {
  .profile-meta-tags {
    justify-content: flex-start;
  }
}

.meta-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card-secondary);
  padding: 4px 12px 4px 6px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  font-weight: 600;
  color: var(--text-secondary);
  transition: var(--transition);
}

html[dir="rtl"] .meta-tag {
  padding: 4px 6px 4px 12px;
}

.meta-tag:hover {
  border-color: var(--primary-border);
  transform: translateY(-2px);
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
  color: var(--text-primary);
}

/* Facebook / iOS Settings-Style Meta Icon Badges */
.meta-icon-badge {
  width: 26px;
  height: 26px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  flex-shrink: 0;
  transition: var(--transition);
}

.meta-tag:hover .meta-icon-badge {
  transform: scale(1.1);
}

.meta-badge-red {
  background-color: #fee2e2;
  color: #ef4444;
}
body.dark .meta-badge-red {
  background-color: rgba(239, 68, 68, 0.2);
  color: #f87171;
}

.meta-badge-green {
  background-color: #d1fae5;
  color: #10b981;
}
body.dark .meta-badge-green {
  background-color: rgba(16, 185, 129, 0.2);
  color: #34d399;
}

.meta-badge-amber {
  background-color: #fef3c7;
  color: #d97706;
}
body.dark .meta-badge-amber {
  background-color: rgba(217, 119, 6, 0.2);
  color: #fbbf24;
}

.meta-badge-blue {
  background-color: #dbeafe;
  color: #2563eb;
}
body.dark .meta-badge-blue {
  background-color: rgba(37, 99, 235, 0.2);
  color: #60a5fa;
}

.profile-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

@media (min-width: 680px) {
  .profile-actions {
    justify-content: flex-start;
  }
}

/* Action Buttons */
.btn-primary {
  background-color: var(--primary);
  color: #ffffff;
  padding: 9px 18px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
  transition: var(--transition);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.35);
}

.btn-secondary {
  background-color: var(--bg-card-secondary);
  color: var(--text-primary);
  padding: 9px 18px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: var(--transition);
}

.btn-secondary:hover {
  background-color: var(--border-color);
  transform: translateY(-1px);
}

.btn-whatsapp {
  background-color: var(--whatsapp);
  color: #ffffff;
  padding: 9px 18px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(37, 211, 102, 0.2);
  transition: var(--transition);
}

.btn-whatsapp:hover {
  background-color: var(--whatsapp-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(37, 211, 102, 0.35);
}

/* --------------------------------------------------------------------
 * SOCIAL PROFILE STATS ROW
 * -------------------------------------------------------------------- */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--border-color);
}

@media (min-width: 600px) {
  .stats-bar {
    grid-template-columns: repeat(4, 1fr);
  }
}

.stat-item {
  text-align: center;
  padding: 8px;
  background: var(--bg-card-secondary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.stat-value {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.2;
}

.stat-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 2px;
}

/* --------------------------------------------------------------------
 * STORIES SECTION (INSTAGRAM / SOCIAL MEDIA STYLE)
 * -------------------------------------------------------------------- */
.stories-section {
  padding: 10px 0 20px 0;
}

.stories-scroll-container {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 8px 4px 12px 4px;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE */
  scroll-snap-type: x mandatory;
}

.stories-scroll-container::-webkit-scrollbar {
  display: none; /* Chrome & Safari */
}

.story-circle-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  flex-shrink: 0;
  scroll-snap-align: start;
  transition: var(--transition);
  background: none;
  border: none;
}

.story-circle-item:hover {
  transform: translateY(-2px);
}

.story-ring {
  width: 68px;
  height: 68px;
  border-radius: var(--radius-full);
  padding: 2.5px;
  background: linear-gradient(45deg, #2563eb, #38bdf8, #818cf8, #a855f7);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.2);
}

.story-ring-inner {
  width: 100%;
  height: 100%;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 2px solid var(--bg-main);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 1.4rem;
  transition: var(--transition);
}

.story-circle-item:hover .story-ring-inner {
  background: var(--primary-light);
}

.story-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-primary);
  max-width: 72px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* --------------------------------------------------------------------
 * FULL-SCREEN STORY VIEWER MODAL
 * -------------------------------------------------------------------- */
.story-modal {
  position: fixed;
  inset: 0;
  background-color: rgba(10, 12, 16, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.story-modal.active {
  display: flex;
}

.story-player-card {
  width: 100%;
  max-width: 420px;
  height: 85vh;
  max-height: 720px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-xl);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.story-progress-bars {
  position: absolute;
  top: 10px;
  left: 12px;
  right: 12px;
  display: flex;
  gap: 4px;
  z-index: 20;
}

.story-progress-segment {
  height: 3px;
  flex: 1;
  background: rgba(150, 150, 150, 0.35);
  border-radius: 2px;
  overflow: hidden;
}

.story-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--primary);
  transition: width 0.1s linear;
}

.story-player-header {
  position: absolute;
  top: 22px;
  left: 14px;
  right: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 20;
}

.story-author-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.story-author-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 800;
}

.story-author-text {
  display: flex;
  flex-direction: column;
}

.story-author-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.story-category-tag {
  font-size: 0.72rem;
  color: var(--primary);
  font-weight: 600;
}

.story-close-btn {
  background: rgba(0, 0, 0, 0.1);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  color: var(--text-primary);
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

body.dark .story-close-btn {
  background: rgba(255, 255, 255, 0.1);
}

.story-content-body {
  flex: 1;
  padding: 70px 24px 30px 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  position: relative;
  z-index: 10;
}

.story-icon-big {
  width: 76px;
  height: 76px;
  border-radius: var(--radius-full);
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 20px auto;
  border: 1px solid var(--primary-border);
}

.story-card-headline {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 12px;
  line-height: 1.3;
}

.story-card-text {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 18px;
}

.story-highlight-pill {
  background: var(--badge-bg);
  color: var(--badge-text);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  margin-top: auto;
  border: 1px solid var(--primary-border);
}

/* Tap Zones */
.story-tap-zone {
  position: absolute;
  top: 60px;
  bottom: 0;
  width: 50%;
  z-index: 15;
  cursor: pointer;
}

.story-tap-left {
  left: 0;
}

.story-tap-right {
  right: 0;
}

.story-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  font-size: 1.2rem;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 25;
  transition: var(--transition);
}

@media (min-width: 600px) {
  .story-nav-btn {
    display: flex;
  }
}

.story-nav-prev {
  left: -60px;
}

.story-nav-next {
  right: -60px;
}

html[dir="rtl"] .story-nav-prev {
  left: auto;
  right: -60px;
}

html[dir="rtl"] .story-nav-next {
  right: auto;
  left: -60px;
}

/* --------------------------------------------------------------------
 * SECTION HEADINGS & FACEBOOK-STYLE ICON BADGES
 * -------------------------------------------------------------------- */
.section-wrapper {
  padding: 24px 0;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.section-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}

/* Facebook / iOS Style Section Icon Badges */
.section-icon-badge {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.section-title-wrap:hover .section-icon-badge {
  transform: rotate(-8deg) scale(1.1);
}

.badge-blue {
  background-color: #eff6ff;
  color: #2563eb;
  border: 1px solid rgba(37, 99, 235, 0.15);
}
body.dark .badge-blue {
  background-color: rgba(37, 99, 235, 0.2);
  color: #60a5fa;
  border-color: rgba(37, 99, 235, 0.3);
}

.badge-purple {
  background-color: #f5f3ff;
  color: #8b5cf6;
  border: 1px solid rgba(139, 92, 246, 0.15);
}
body.dark .badge-purple {
  background-color: rgba(139, 92, 246, 0.2);
  color: #a78bfa;
  border-color: rgba(139, 92, 246, 0.3);
}

.badge-crimson {
  background-color: #fff1f2;
  color: #e11d48;
  border: 1px solid rgba(225, 29, 72, 0.15);
}
body.dark .badge-crimson {
  background-color: rgba(225, 29, 72, 0.2);
  color: #fb7185;
  border-color: rgba(225, 29, 72, 0.3);
}

.badge-amber {
  background-color: #fffbeb;
  color: #d97706;
  border: 1px solid rgba(217, 119, 6, 0.15);
}
body.dark .badge-amber {
  background-color: rgba(217, 119, 6, 0.2);
  color: #fcd34d;
  border-color: rgba(217, 119, 6, 0.3);
}

.badge-green {
  background-color: #ecfdf5;
  color: #059669;
  border: 1px solid rgba(5, 150, 105, 0.15);
}
body.dark .badge-green {
  background-color: rgba(5, 150, 105, 0.2);
  color: #34d399;
  border-color: rgba(5, 150, 105, 0.3);
}

.badge-cyan {
  background-color: #ecfeff;
  color: #0891b2;
  border: 1px solid rgba(8, 145, 178, 0.15);
}
body.dark .badge-cyan {
  background-color: rgba(8, 145, 178, 0.2);
  color: #22d3ee;
  border-color: rgba(8, 145, 178, 0.3);
}

/* Timeline Title Header Badge */
.timeline-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.timeline-icon-badge {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  flex-shrink: 0;
}

/* --------------------------------------------------------------------
 * PROJECTS & PORTFOLIO SECTION
 * -------------------------------------------------------------------- */
.project-filters {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 12px;
  margin-bottom: 16px;
  scrollbar-width: none;
}

.project-filters::-webkit-scrollbar {
  display: none;
}

.filter-btn {
  padding: 7px 16px;
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 680px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: var(--transition);
}

.project-card:hover {
  border-color: var(--primary-border);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.project-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.project-name {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
}

.project-category-pill {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  background: var(--badge-bg);
  color: var(--badge-text);
  white-space: nowrap;
}

.project-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 14px;
}

.project-tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.tech-tag {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  background: var(--bg-card-secondary);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
}

.project-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
}

.project-url-preview {
  font-size: 0.82rem;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 170px;
}

.project-visit-btn {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

.project-visit-btn:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

/* Developer Accounts Buttons */
.developer-accounts-wrap {
  margin-top: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.dev-apps-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 12px;
}

@media (min-width: 600px) {
  .dev-apps-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.app-store-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  color: white;
  font-weight: 700;
  text-decoration: none;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.app-store-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.card-googleplay {
  background: linear-gradient(135deg, #0f9d58, #1a73e8);
}

.card-appstore {
  background: linear-gradient(135deg, #007aff, #5856d6);
}

.app-store-icon {
  font-size: 2rem;
}

.app-store-texts {
  display: flex;
  flex-direction: column;
}

.app-store-subtitle {
  font-size: 0.75rem;
  opacity: 0.9;
  font-weight: 500;
}

.app-store-title {
  font-size: 1.1rem;
  font-weight: 800;
}

/* --------------------------------------------------------------------
 * EXPERIENCE & EDUCATION TIMELINE
 * -------------------------------------------------------------------- */
.timeline-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
}

.timeline-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.timeline-card:hover {
  border-color: var(--primary-border);
}

.timeline-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
}

@media (min-width: 600px) {
  .timeline-header {
    flex-direction: row;
    justify-content: space-between;
    align-items: baseline;
  }
}

.timeline-company {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
}

.timeline-date-pill {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-light);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  display: inline-block;
  align-self: flex-start;
}

.timeline-role {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.timeline-location {
  font-size: 0.82rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
}

.timeline-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.timeline-list li {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.55;
  position: relative;
  padding-left: 20px;
}

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

.timeline-list li::before {
  content: "•";
  color: var(--primary);
  font-weight: bold;
  font-size: 1.2rem;
  position: absolute;
  left: 4px;
  top: -2px;
}

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

/* Certifications Grid */
.certs-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 14px;
}

@media (min-width: 600px) {
  .certs-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.cert-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.cert-card:hover {
  border-color: var(--primary-border);
  box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.08);
  transform: translateY(-3px);
}

.cert-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.cert-card:hover .cert-icon-wrap {
  transform: scale(1.1) rotate(6deg);
}

.cert-info {
  flex: 1;
}

.cert-name {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.35;
  margin-bottom: 4px;
}

.cert-source {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.cert-link {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

.cert-link:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

/* --------------------------------------------------------------------
 * SKILLS SECTION (FACEBOOK/IOS COLORFUL BADGES)
 * -------------------------------------------------------------------- */
.skills-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

@media (min-width: 680px) {
  .skills-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

.skills-category-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

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

.skills-cat-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-subtle);
}

.skills-cat-icon-badge {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

.skills-category-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0;
}

.skills-badges-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.skill-badge {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 5px 12px 5px 6px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow-sm);
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: default;
}

html[dir="rtl"] .skill-badge {
  padding: 5px 6px 5px 12px;
}

.skill-icon-badge {
  width: 26px;
  height: 26px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  flex-shrink: 0;
  transition: var(--transition);
}

.skill-badge:hover {
  transform: translateY(-3px) scale(1.03);
  border-color: var(--primary-border);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.08);
}

.skill-badge:hover .skill-icon-badge {
  transform: rotate(12deg) scale(1.1);
}

/* --------------------------------------------------------------------
 * ANIMATIONS & SCROLL REVEAL (Interactive & Smooth)
 * -------------------------------------------------------------------- */
.reveal-card,
.reveal-item {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s cubic-bezier(0.16, 1, 0.3, 1), transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-card.is-visible,
.reveal-item.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes storyGlowPulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.35);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(37, 99, 235, 0);
  }
}

.story-circle-item:hover .story-ring {
  animation: storyGlowPulse 1.8s infinite;
}

.stat-item {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}

.stat-item:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-border);
}

.project-card {
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 30px -8px rgba(37, 99, 235, 0.16);
  border-color: var(--primary-border);
}

body.dark .project-card:hover {
  box-shadow: 0 16px 30px -8px rgba(0, 0, 0, 0.6);
}

/* --------------------------------------------------------------------
 * CONTACT FORM & SAUDI ARABIA SPECIAL SUPPORT
 * -------------------------------------------------------------------- */
.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.contact-intro {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 18px;
}

.saudi-friendly-box {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(37, 99, 235, 0.08));
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-bottom: 20px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--text-primary);
}

.saudi-friendly-box i {
  color: #10b981;
  font-size: 1.2rem;
  margin-top: 2px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 600px) {
  .form-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .form-group-full {
    grid-column: span 2;
  }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
}

.form-label .required {
  color: #ef4444;
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background-color: var(--bg-input);
  color: var(--text-primary);
  font-size: 0.92rem;
  outline: none;
  transition: var(--transition);
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

textarea.form-control {
  resize: vertical;
  min-height: 110px;
}

.phone-input-combo {
  display: flex;
  gap: 8px;
}

.phone-code-select {
  width: 130px;
  flex-shrink: 0;
}

.form-submit-row {
  margin-top: 8px;
}

.btn-submit-whatsapp {
  width: 100%;
  background: var(--whatsapp);
  color: #ffffff;
  border: none;
  padding: 14px;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  box-shadow: 0 4px 6px rgba(37, 211, 102, 0.25);
  transition: var(--transition);
}

.btn-submit-whatsapp:hover {
  background: var(--whatsapp-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(37, 211, 102, 0.4);
}

/* --------------------------------------------------------------------
 * FOOTER
 * -------------------------------------------------------------------- */
.site-footer {
  margin-top: 40px;
  padding: 30px 0;
  border-top: 1px solid var(--border-color);
  background: var(--bg-card);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
}

.footer-logo-img {
  height: 48px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.footer-name {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-primary);
}

.footer-title {
  font-size: 0.88rem;
  color: var(--primary);
  font-weight: 600;
}

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

.footer-social-link {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  background: var(--bg-card-secondary);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: var(--transition);
}

.footer-social-link:hover {
  background: var(--primary);
  color: #ffffff;
  transform: translateY(-2px);
}

.footer-copyright {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------
 * MOBILE APP BOTTOM NAVIGATION BAR
 * -------------------------------------------------------------------- */
.mobile-bottom-nav {
  display: flex;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 62px;
  background-color: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--border-color);
  z-index: 45;
  justify-content: space-around;
  align-items: center;
  padding: 0 8px;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

body.dark .mobile-bottom-nav {
  background-color: rgba(22, 26, 32, 0.94);
}

@media (min-width: 769px) {
  .mobile-bottom-nav {
    display: none;
  }
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  flex: 1;
  height: 100%;
  transition: var(--transition);
}

.mobile-nav-item i {
  font-size: 1.2rem;
}

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

/* --------------------------------------------------------------------
 * CV MODAL (LANGUAGE SELECTOR)
 * -------------------------------------------------------------------- */
.cv-modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  z-index: 90;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.cv-modal-backdrop.active {
  display: flex;
}

.cv-modal-box {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  max-width: 440px;
  width: 100%;
  padding: 24px;
  box-shadow: var(--shadow-xl);
  text-align: center;
}

.cv-modal-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.cv-modal-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 20px;
}

.cv-modal-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cv-modal-close {
  margin-top: 14px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
}

/* --------------------------------------------------------------------
 * FLOATING TOAST NOTIFICATION
 * -------------------------------------------------------------------- */
.toast-notice {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #0f172a;
  color: #ffffff;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 700;
  box-shadow: var(--shadow-lg);
  z-index: 99;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  gap: 8px;
}

.toast-notice.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}
