/* ==========================================================================
   OSAMAH (أسامة) • Personal Portfolio & Brand Identity Stylesheet
   Design Style: Clean Bordered Minimalist Editorial (No Shadows)
   Theme: Royal Cobalt Blue (#1E3A8A) & Radiant Orange (#FF6B00 / #F97316)
   Typography: Thmanyah Serif Display + Inter / Outfit
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Outfit:wght@400;500;600;700;800;900&family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400;1,600&display=swap');

/* ==========================================================================
   Font Declarations: Thmanyah Sans (Light, Regular, Medium, Bold, Black)
   ========================================================================== */
@font-face {
  font-family: 'Thmanyah Sans';
  src: url('fonts/thmanyahsans-Light.otf') format('opentype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+0660-0669;
}

@font-face {
  font-family: 'Thmanyah Sans';
  src: url('fonts/thmanyahsans-Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+0660-0669;
}

@font-face {
  font-family: 'Thmanyah Sans';
  src: url('fonts/thmanyahsans-Medium.otf') format('opentype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+0660-0669;
}

@font-face {
  font-family: 'Thmanyah Sans';
  src: url('fonts/thmanyahsans-Bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+0660-0669;
}

@font-face {
  font-family: 'Thmanyah Sans';
  src: url('fonts/thmanyahsans-Black.otf') format('opentype');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+0660-0669;
}

/* Alias for 'thmanyahsans' */
@font-face {
  font-family: 'thmanyahsans';
  src: url('fonts/thmanyahsans-Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'thmanyahsans';
  src: url('fonts/thmanyahsans-Bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* Font Declarations: Thmanyah Serif Display (Fallback / Display Variant) */
@font-face {
  font-family: 'Thmanyah Serif Display';
  src: url('fonts/thmanyahserifdisplay-Light.otf') format('opentype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+0660-0669;
}

@font-face {
  font-family: 'Thmanyah Serif Display';
  src: url('fonts/thmanyahserifdisplay-Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+0660-0669;
}

@font-face {
  font-family: 'Thmanyah Serif Display';
  src: url('fonts/thmanyahserifdisplay-Medium.otf') format('opentype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+0660-0669;
}

@font-face {
  font-family: 'Thmanyah Serif Display';
  src: url('fonts/thmanyahserifdisplay-Bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+0660-0669;
}

@font-face {
  font-family: 'Thmanyah Serif Display';
  src: url('fonts/thmanyahserifdisplay-Black.otf') format('opentype');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+0660-0669;
}

/* ==========================================================================
   Design Tokens & CSS Variables (Clean Bordered Theme - No Shadows)
   ========================================================================== */
:root {
  /* Brand Palette: Electric Indigo (#4f46e5) & Vibrant Rose (#FF3366) */
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-dark: #3730a3;
  --primary-light: #6366f1;
  --primary-subtle: rgba(79, 70, 229, 0.08);

  --secondary: #FF3366;
  --secondary-hover: #e61e53;
  --secondary-dark: #be123c;
  --secondary-light: #fff1f4;
  --secondary-subtle: rgba(255, 51, 102, 0.10);

  /* Light Theme Surfaces */
  --bg-page: #FFFFFF;
  --bg-surface: #FFFFFF;
  --bg-surface-elevated: #F8FAFC;
  --bg-card: #FFFFFF;
  --bg-glass: rgba(255, 255, 255, 0.94);
  --bg-badge: #F1F5F9;

  /* Text & Ink */
  --text-main: #0F172A;
  --text-secondary: #475569;
  --text-muted: #94A3B8;
  --text-inverse: #FFFFFF;

  /* Crisp Borders */
  --border-subtle: #E2E8F0;
  --border-card: #E2E8F0;
  --border-active: #94A3B8;
  --border-primary: #4f46e5;
  --border-primary-subtle: rgba(79, 70, 229, 0.20);
  --border-secondary: #FF3366;
  --border-secondary-subtle: rgba(255, 51, 102, 0.25);

  /* Geometry & Typography */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  --font-arabic-heading: 'Thmanyah Serif Display', 'Thmanyah Sans', 'Plus Jakarta Sans', 'Inter', 'Noto Sans Arabic', sans-serif;
  --font-arabic-body: 'Thmanyah Sans', 'thmanyahsans', 'Plus Jakarta Sans', 'Inter', 'Noto Sans Arabic', sans-serif;
  --font-arabic: var(--font-arabic-body);
  --font-latin: 'Plus Jakarta Sans', 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display-en: 'Plus Jakarta Sans', 'Outfit', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'SF Mono', Consolas, Menlo, Monaco, monospace;

  --max-w: 1200px;
  --nav-height: 80px;
  --transition-smooth: all 0.2s ease;
}

/* Dark Theme Variables (Extracted & Balanced for #4f46e5 & #FF3366) */
[data-theme="dark"] {
  --primary: #818cf8;
  --primary-hover: #a5b4fc;
  --primary-dark: #4f46e5;
  --primary-light: #c7d2fe;
  --primary-subtle: rgba(129, 140, 248, 0.15);

  --secondary: #FF3366;
  --secondary-hover: #ff5580;
  --secondary-dark: #be123c;
  --secondary-light: rgba(255, 51, 102, 0.18);
  --secondary-subtle: rgba(255, 51, 102, 0.22);

  --bg-page: #0B0F19;
  --bg-surface: #111827;
  --bg-surface-elevated: #161F33;
  --bg-card: #111827;
  --bg-glass: rgba(17, 24, 39, 0.92);
  --bg-badge: #1E293B;

  --text-main: #F8FAFC;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  --text-inverse: #0F172A;

  --border-subtle: #1E293B;
  --border-card: #1E293B;
  --border-active: #334155;
  --border-primary: #818cf8;
  --border-primary-subtle: rgba(129, 140, 248, 0.30);
  --border-secondary: #FF3366;
  --border-secondary-subtle: rgba(255, 51, 102, 0.40);
}

/* ==========================================================================
   Base & Reset Styles
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-latin);
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.25s ease, color 0.25s ease;
  overflow-x: hidden;
}

/* Arabic Mode: Sans for text & content, Serif Display for titles & headings */
[dir="rtl"] body {
  font-family: var(--font-arabic-body);
}

[dir="rtl"] h1,
[dir="rtl"] h2,
[dir="rtl"] h3,
[dir="rtl"] h4,
[dir="rtl"] h5,
[dir="rtl"] h6,
[dir="rtl"] .hero-title-greeting,
[dir="rtl"] .hero-greeting-text,
[dir="rtl"] .hero-name-text,
[dir="rtl"] .section-eyebrow,
[dir="rtl"] .project-title,
[dir="rtl"] .skill-cat-title,
[dir="rtl"] .timeline-role,
[dir="rtl"] .edu-subcol-title,
[dir="rtl"] .edu-degree,
[dir="rtl"] .cert-name,
[dir="rtl"] .footer-col-title,
[dir="rtl"] .contact-highlight-card h3,
[dir="rtl"] .story-card h3 {
  font-family: var(--font-arabic-heading);
}

[dir="rtl"] p,
[dir="rtl"] .hero-description,
[dir="rtl"] .hero-tagline,
[dir="rtl"] .hero-status-pill,
[dir="rtl"] .section-subtitle,
[dir="rtl"] .section-title,
[dir="rtl"] .about-lead,
[dir="rtl"] .about-body-text,
[dir="rtl"] .project-desc,
[dir="rtl"] .timeline-desc,
[dir="rtl"] .timeline-company,
[dir="rtl"] .timeline-period,
[dir="rtl"] .skill-tag,
[dir="rtl"] .stat-label,
[dir="rtl"] .nav-link,
[dir="rtl"] .btn-primary,
[dir="rtl"] .btn-secondary,
[dir="rtl"] .filter-btn,
[dir="rtl"] .footer-social-text,
[dir="rtl"] .footer-link,
[dir="rtl"] .footer-copyright,
[dir="rtl"] .toast-notice {
  font-family: var(--font-arabic-body);
}

[dir="ltr"] body,
[lang="en"] body {
  font-family: var(--font-latin);
}

/* Ensure all headings & prominent texts in English mode use the English font stack */
[dir="ltr"] .hero-title-greeting,
[lang="en"] .hero-title-greeting,
[dir="ltr"] .section-title,
[lang="en"] .section-title,
[dir="ltr"] .hero-tagline,
[lang="en"] .hero-tagline,
[dir="ltr"] .contact-highlight-card h3,
[lang="en"] .contact-highlight-card h3,
[dir="ltr"] .timeline-role,
[lang="en"] .timeline-role,
[dir="ltr"] .project-title,
[lang="en"] .project-title,
[dir="ltr"] .story-card h3,
[lang="en"] .story-card h3,
[dir="ltr"] .filter-btn,
[lang="en"] .filter-btn,
[dir="ltr"] .nav-link,
[lang="en"] .nav-link {
  font-family: var(--font-latin);
  letter-spacing: -0.015em;
}

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

img, svg {
  display: block;
  max-width: 100%;
}

button, input, textarea, select {
  font-family: inherit;
  border: none;
  background: none;
  outline: none;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-page);
}
::-webkit-scrollbar-thumb {
  background: var(--border-active);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* ==========================================================================
   Header & Glass Navbar (Redesigned)
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height, 76px);
  z-index: 1000;
  display: flex;
  align-items: center;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  transition: all 0.3s ease;
}

.site-header.scrolled {
  background: var(--bg-glass-scrolled, rgba(255, 255, 255, 0.94));
  box-shadow: 0 4px 24px rgba(79, 70, 229, 0.06);
  border-bottom-color: var(--border-subtle);
}

[data-theme="dark"] .site-header.scrolled {
  background: rgba(11, 18, 30, 0.95);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

.nav-container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

/* Standalone Logo in Navbar */
.nav-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  transition: transform 0.2s ease, opacity 0.2s ease;
  flex-shrink: 0;
}

.nav-brand:hover {
  transform: scale(1.02);
  opacity: 0.95;
}

.nav-logo-img {
  height: 48px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
  display: block;
}

[data-theme="dark"] .nav-logo-img {
  filter: brightness(1.1) drop-shadow(0 2px 10px rgba(129, 140, 248, 0.22));
}

/* Navigation Links */
.nav-main {
  display: flex;
  align-items: center;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  position: relative;
  padding: 0.45rem 0.15rem;
  text-decoration: none;
  transition: color 0.2s ease;
}

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

[data-theme="dark"] .nav-link:hover, [data-theme="dark"] .nav-link.active {
  color: var(--primary);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--secondary);
  transition: width 0.25s ease;
  border-radius: 2px;
}

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

/* Actions in Navbar */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.btn-pill-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1.5px solid var(--border-subtle);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-pill-icon:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--bg-surface-elevated);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.08);
}

[data-theme="dark"] .btn-pill-icon:hover {
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.lang-text-label {
  font-family: var(--font-latin);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.btn-studio-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-surface);
  color: var(--primary);
  border: none;
  padding: 0.5rem 1.15rem;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 700;
  transition: var(--transition-smooth);
}

[data-theme="dark"] .btn-studio-cta {
  background: var(--bg-surface);
  color: #8ec4ee;
}

.btn-studio-cta:hover {
  background: var(--primary);
  color: #FFFFFF;
}

/* ==========================================================================
   Hero Section & Tech/AI Background Pattern
   ========================================================================== */
.hero-section {
  position: relative;
  background: var(--bg-surface);
  min-height: 90vh;
  padding-top: calc(var(--nav-height) + 3rem);
  padding-bottom: 5rem;
  display: flex;
  align-items: center;
  overflow: hidden;
}

/* ==========================================================================
   Interactive Neural Network Canvas Background (Positioned at Flex-End)
   ========================================================================== */
.hero-neural-canvas-wrap {
  position: absolute;
  top: 0;
  bottom: 0;
  inset-inline-end: 0;
  width: 58%;
  max-width: 820px;
  height: 100%;
  pointer-events: auto;
  z-index: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  opacity: 0.10;
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s ease;
  overflow: hidden;
  mask-image: radial-gradient(ellipse 85% 75% at 75% 50%, black 40%, transparent 85%);
  -webkit-mask-image: radial-gradient(ellipse 85% 75% at 75% 50%, black 40%, transparent 85%);
}

[dir="rtl"] .hero-neural-canvas-wrap {
  mask-image: radial-gradient(ellipse 85% 75% at 25% 50%, black 40%, transparent 85%);
  -webkit-mask-image: radial-gradient(ellipse 85% 75% at 25% 50%, black 40%, transparent 85%);
}

[data-theme="dark"] .hero-neural-canvas-wrap {
  opacity: 0.14;
}

.hero-neural-canvas-wrap:hover,
.hero-neural-canvas-wrap.is-hovered {
  opacity: 0.45;
}

.hero-neural-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.hero-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.75rem;
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  gap: 3rem;
  align-items: center;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

/* Live Availability Status Chip - Clean Bordered Style */
.hero-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 0.32rem 0.95rem 0.32rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 500;
  margin-bottom: 1.85rem;
  box-shadow: none;
  transition: border-color 0.25s ease, background-color 0.25s ease, color 0.25s ease;
  user-select: none;
}

[data-theme="dark"] .hero-status-pill {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.15);
  color: var(--text-secondary);
  box-shadow: none;
}

.hero-status-pill:hover {
  border-color: rgba(16, 185, 129, 0.55);
  color: var(--text-main);
  background: rgba(16, 185, 129, 0.04);
}

/* Pulsing Status Dot */
.status-pulse-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 9px;
  height: 9px;
  flex-shrink: 0;
}

.status-pulse-ping {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #10b981;
  opacity: 0.75;
  animation: statusPing 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.status-pulse-dot {
  position: relative;
  width: 6.5px;
  height: 6.5px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.7);
}

@keyframes statusPing {
  0% {
    transform: scale(0.95);
    opacity: 0.8;
  }
  70%, 100% {
    transform: scale(2.4);
    opacity: 0;
  }
}

.hero-title-greeting {
  font-family: var(--font-arabic-heading);
  font-size: clamp(2.25rem, 5vw, 3.8rem);
  font-weight: 900;
  line-height: 1.2;
  color: var(--text-main);
  margin-bottom: 1.35rem;
  letter-spacing: -0.02em;
}

.hero-title-greeting .hero-greeting-text,
.hero-title-greeting [data-i18n="heroGreeting"] {
  color: var(--text-main);
}

.hero-title-greeting .hero-name-text,
.hero-title-greeting [data-i18n="heroName"] {
  color: var(--primary);
}

[data-theme="dark"] .hero-title-greeting .hero-greeting-text,
[data-theme="dark"] .hero-title-greeting [data-i18n="heroGreeting"] {
  color: var(--text-main);
}

[data-theme="dark"] .hero-title-greeting .hero-name-text,
[data-theme="dark"] .hero-title-greeting [data-i18n="heroName"] {
  color: var(--primary);
}

/* Role Badges (Positions / Specialties) */
.hero-roles-group {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 1.85rem;
}

.hero-role-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.28rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 700;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s ease, border-color 0.2s ease;
  user-select: none;
}

.hero-role-badge svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

.hero-role-badge.badge-software {
  background: var(--primary-subtle);
  color: var(--primary);
  border: 1.5px solid var(--border-primary-subtle);
}

.hero-role-badge.badge-ai {
  background: var(--secondary-subtle);
  color: var(--secondary);
  border: 1.5px solid var(--border-secondary-subtle);
}

.hero-role-badge:hover {
  transform: translateY(-2px);
}

.hero-role-badge.badge-software:hover {
  background: rgba(79, 70, 229, 0.14);
  border-color: var(--primary);
}

.hero-role-badge.badge-ai:hover {
  background: rgba(255, 51, 102, 0.16);
  border-color: var(--secondary);
}

[data-theme="dark"] .hero-role-badge.badge-software {
  background: rgba(129, 140, 248, 0.14);
  color: var(--primary-light);
  border-color: rgba(129, 140, 248, 0.35);
}

[data-theme="dark"] .hero-role-badge.badge-ai {
  background: rgba(255, 51, 102, 0.18);
  color: #ff8099;
  border-color: rgba(255, 51, 102, 0.45);
}

.hero-tagline {
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  font-weight: 600;
  color: var(--secondary);
  margin-bottom: 1.5rem;
  line-height: 1.4;
}

.hero-description {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.95;
  max-width: 580px;
  margin-bottom: 2.85rem;
}

/* CTA Buttons */
.hero-cta-group {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-bottom: 3.25rem;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  background: var(--secondary);
  color: #FFFFFF;
  border: none;
  padding: 0.9rem 1.95rem;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 700;
  transition: var(--transition-smooth);
}

.btn-primary svg {
  transition: transform 0.25s ease;
}

[dir="rtl"] .btn-primary svg {
  transform: scaleX(-1);
}

.btn-primary:hover {
  background: var(--secondary-hover);
}

.btn-primary:hover svg {
  transform: translate(3px, -3px);
}

[dir="rtl"] .btn-primary:hover svg {
  transform: scaleX(-1) translate(3px, -3px);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  background: var(--bg-surface);
  color: var(--text-main);
  border: none;
  padding: 0.9rem 1.85rem;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 600;
  transition: var(--transition-smooth);
}

.btn-secondary:hover {
  background: var(--bg-surface-elevated);
  color: var(--primary);
}

/* Quick Metrics Row */
.hero-stats-row {
  display: flex;
  align-items: center;
  gap: 3.25rem;
  margin-top: 1.25rem;
  padding-top: 2.5rem;
  width: 100%;
  border-top: 1px solid var(--border-subtle);
}

.hero-stat-item {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.stat-number {
  font-family: var(--font-latin);
  font-size: 1.95rem;
  font-weight: 900;
  color: var(--primary);
  line-height: 1.1;
}

[data-theme="dark"] .stat-number {
  color: var(--primary);
}

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

/* ==========================================================================
   Hero Visual: Software, Programming & AI Architecture Vector
   ========================================================================== */
.hero-tech-visual {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  user-select: none;
}

.tech-visual-stage {
  position: relative;
  width: 100%;
  max-width: 480px;
  height: 440px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Ambient Radial Glow */
.tech-ambient-glow {
  position: absolute;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.18) 0%, rgba(255, 107, 0, 0.08) 55%, transparent 75%);
  filter: blur(40px);
  z-index: 0;
  pointer-events: none;
  animation: auraBreathe 6s ease-in-out infinite alternate;
}

[data-theme="dark"] .tech-ambient-glow {
  background: radial-gradient(circle, rgba(59, 130, 246, 0.28) 0%, rgba(255, 107, 0, 0.15) 55%, transparent 75%);
  filter: blur(50px);
}

@keyframes auraBreathe {
  0% { transform: scale(0.9) translate(-10px, -10px); opacity: 0.7; }
  100% { transform: scale(1.15) translate(10px, 10px); opacity: 1; }
}

/* Vector Canvas & SVG Core */
.tech-vector-canvas {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tech-core-svg {
  width: 100%;
  height: 100%;
  max-width: 480px;
  overflow: visible;
  filter: drop-shadow(0 15px 35px rgba(30, 58, 138, 0.08));
}

[data-theme="dark"] .tech-core-svg {
  filter: drop-shadow(0 15px 40px rgba(0, 0, 0, 0.45));
}

/* Vector SVG Animations */
.orbit-ring-outer {
  transform-origin: 270px 250px;
  animation: orbitRotateClockwise 28s linear infinite;
}

.orbit-ring-inner {
  transform-origin: 270px 250px;
  animation: orbitRotateCounterClockwise 18s linear infinite;
}

.ai-core-unit {
  transform-origin: 270px 250px;
  animation: coreFloat 4.5s ease-in-out infinite alternate;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hero-tech-visual:hover .ai-core-unit {
  transform: scale(1.06);
}

@keyframes orbitRotateClockwise {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes orbitRotateCounterClockwise {
  from { transform: rotate(360deg); }
  to { transform: rotate(0deg); }
}

@keyframes coreFloat {
  0% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-7px) rotate(1deg); }
  100% { transform: translateY(5px) rotate(-1deg); }
}

/* Circuit Flows */
.circuit-flow-1 {
  animation: circuitFlow1 4s linear infinite;
}

.circuit-flow-2 {
  animation: circuitFlow2 3.5s linear infinite;
}

@keyframes circuitFlow1 {
  0% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: -56; }
}

@keyframes circuitFlow2 {
  0% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: 56; }
}

/* Pulse Nodes */
.pulse-node-1 { animation: nodePulse 2.2s ease-in-out infinite alternate; }
.pulse-node-2 { animation: nodePulse 2.8s ease-in-out 0.6s infinite alternate; }
.pulse-node-3 { animation: nodePulse 2.4s ease-in-out 1.2s infinite alternate; }

@keyframes nodePulse {
  0% { r: 5; opacity: 0.6; }
  100% { r: 7.5; opacity: 1; filter: drop-shadow(0 0 6px currentColor); }
}

/* Floating Glass Cards */
.floating-tech-card {
  position: absolute;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08), 0 2px 6px rgba(15, 23, 42, 0.03);
  z-index: 2;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

[data-theme="dark"] .floating-tech-card {
  background: rgba(17, 24, 39, 0.86);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45), 0 2px 6px rgba(0, 0, 0, 0.2);
}

.floating-tech-card:hover {
  transform: translateY(-4px) scale(1.02);
}

/* Code Terminal Card (Top Left) */
.tech-card-code {
  top: 15px;
  left: 5px;
  width: 220px;
  padding: 0.85rem 1rem;
  direction: ltr;
  text-align: left;
  animation: cardFloatLeft 5s ease-in-out infinite alternate;
}

[dir="rtl"] .tech-card-code {
  left: auto;
  right: 5px;
  direction: ltr;
  text-align: left;
}

@keyframes cardFloatLeft {
  0% { transform: translateY(0px); }
  100% { transform: translateY(-8px); }
}

.tech-card-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
}

.tech-card-dots {
  display: flex;
  gap: 4px;
}

.tech-card-dots .dot {
  width: 7.5px;
  height: 7.5px;
  border-radius: 50%;
}

.dot-red { background: #EF4444; }
.dot-yellow { background: #F59E0B; }
.dot-green { background: #10B981; }

.tech-card-title {
  font-family: var(--font-latin);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
}

.tech-card-body code {
  font-family: 'JetBrains Mono', 'Fira Code', ui-monospace, SFMono-Regular, monospace;
  font-size: 0.72rem;
  line-height: 1.5;
  color: var(--text-secondary);
  display: block;
  direction: ltr;
  text-align: left;
}

.token-kw { color: #8B5CF6; font-weight: 600; }
.token-var { color: #2563EB; }
.token-fn { color: #D97706; }
.token-prop { color: var(--text-main); }
.token-str { color: #059669; }
.token-val { color: #DC2626; font-weight: 600; }

[data-theme="dark"] .token-kw { color: #C084FC; }
[data-theme="dark"] .token-var { color: var(--primary); }
[data-theme="dark"] .token-fn { color: #FBBF24; }
[data-theme="dark"] .token-prop { color: #F1F5F9; }
[data-theme="dark"] .token-str { color: #34D399; }
[data-theme="dark"] .token-val { color: #F87171; }

/* Status / Beacon Card (Bottom Right) */
.tech-card-status {
  bottom: 25px;
  right: 10px;
  padding: 0.75rem 1.15rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  animation: cardFloatRight 5.5s ease-in-out 0.8s infinite alternate;
}

[dir="rtl"] .tech-card-status {
  right: auto;
  left: 10px;
}

@keyframes cardFloatRight {
  0% { transform: translateY(0px); }
  100% { transform: translateY(7px); }
}

.status-beacon-wrap {
  position: relative;
  width: 12px;
  height: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.beacon-pulse {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--secondary);
  opacity: 0.6;
  animation: beaconWave 1.8s ease-out infinite;
}

.beacon-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--secondary);
}

@keyframes beaconWave {
  0% { transform: scale(0.8); opacity: 0.8; }
  100% { transform: scale(2.4); opacity: 0; }
}

.status-details {
  display: flex;
  flex-direction: column;
}

.status-headline {
  font-family: var(--font-latin);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
}

.status-subline {
  font-family: var(--font-latin);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--secondary);
}

/* Micro Hologram Badges */
.tech-pill-badge {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--text-main);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  font-family: var(--font-latin);
  font-size: 0.75rem;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
  z-index: 2;
  transition: transform 0.25s ease;
}

[data-theme="dark"] .tech-pill-badge {
  background: rgba(30, 41, 59, 0.85);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.tech-pill-badge:hover {
  transform: scale(1.06);
  color: var(--primary);
}

.pill-top-left {
  top: 15px;
  right: 25px;
  color: var(--primary);
}

[dir="rtl"] .pill-top-left {
  right: auto;
  left: 25px;
}

[data-theme="dark"] .pill-top-left {
  color: var(--primary);
}

.pill-bottom-right {
  bottom: 25px;
  left: 20px;
  color: var(--secondary);
}

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

/* ==========================================================================
   Section Headers & Common Layout
   ========================================================================== */
section {
  position: relative;
  padding: 3rem 0 4.75rem 0;
  border-bottom: none;
}

.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.75rem;
}

/* ==========================================================================
   Section Header: Innovative Engineering & AI Telemetry Architecture
   ========================================================================== */
.section-header {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  width: 100%;
  margin-bottom: 3.85rem;
  position: relative;
}

/* System Telemetry Rail (Hairline Structural Beam) */
.tech-rail-top {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 1.15rem;
}

/* Engineering ID Chip (Solid, Zero Gradient) */
.tech-id-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--primary);
  background: var(--bg-surface-elevated);
  border: 1.5px solid var(--border-subtle);
  padding: 0.26rem 0.7rem;
  border-radius: var(--radius-sm);
  user-select: none;
  flex-shrink: 0;
  transition: var(--transition-smooth);
}

[data-theme="dark"] .tech-id-chip {
  background: #111827;
  border-color: rgba(255, 255, 255, 0.1);
  color: #818CF8;
}

.section-header:hover .tech-id-chip {
  border-color: var(--secondary);
}

/* Pulse Node (Solid Secondary Status Pixel, Zero Gradient) */
.tech-chip-pulse {
  width: 7px;
  height: 7px;
  background: var(--secondary);
  border-radius: 1.5px;
  display: inline-block;
  flex-shrink: 0;
  transition: transform 0.2s ease, background 0.2s ease;
}

.section-header:hover .tech-chip-pulse {
  transform: scale(1.2);
  background: var(--primary);
}

.tech-chip-id {
  color: var(--text-main);
  font-weight: 800;
}

.tech-chip-sep {
  color: var(--text-muted);
}

.tech-chip-namespace {
  color: var(--primary);
  text-transform: uppercase;
}

[data-theme="dark"] .tech-chip-namespace {
  color: #818CF8;
}

/* Center Hairline Structural Rule */
.tech-rail-rule {
  flex: 1;
  height: 1.5px;
  background: var(--border-subtle);
  min-width: 25px;
}

/* Telemetry Status Flag at Rail End */
.tech-status-flag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  user-select: none;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.tech-flag-bracket {
  color: var(--secondary);
  font-weight: 800;
}

/* Content Tier (Headline & Lead Subtitle) */
.tech-header-content {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem 2.5rem;
}

/* Main Display Title (Bold, High Contrast, Solid Color) */
.tech-main-title {
  font-family: var(--font-arabic-heading);
  font-size: 1.85rem;
  font-weight: 900;
  color: var(--text-main);
  line-height: 1.25;
  margin: 0;
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  letter-spacing: -0.01em;
}

[dir="ltr"] .tech-main-title {
  font-family: var(--font-latin);
  letter-spacing: -0.02em;
}

/* Terminal Cursor (Solid Accent, Gentle Blink) */
.tech-title-cursor {
  color: var(--secondary);
  font-family: var(--font-mono);
  font-weight: 900;
  display: inline-block;
  animation: techCursorBlink 1.2s infinite;
  user-select: none;
}

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

/* Technical Lead Subtitle */
.tech-sub-lead {
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
  max-width: 580px;
}

/* Mobile Responsiveness */
@media (max-width: 640px) {
  .tech-status-flag {
    display: none;
  }

  .tech-main-title {
    font-size: 1.5rem;
  }

  .tech-sub-lead {
    font-size: 0.95rem;
  }

  .tech-header-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
  }
}

/* ==========================================================================
   Featured Works & Portfolio Section (Bordered)
   ========================================================================== */
.portfolio-section,
.works-section {
  background: var(--bg-surface);
}

/* ==========================================================================
   Works & Projects Section (Modern Minimal Architecture)
   ========================================================================== */

/* Modern Minimal Category Filter Toolbar */
.works-filter-wrapper {
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
}

.works-filter-bar {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 9999px;
  flex-wrap: wrap;
  justify-content: center;
}

[data-theme="dark"] .works-filter-bar {
  background: rgba(15, 23, 42, 0.6);
  border-color: rgba(255, 255, 255, 0.08);
}

.filter-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.15rem;
  border-radius: 9999px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.filter-tab-btn:hover {
  color: var(--text-main);
  background: var(--bg-surface-elevated);
}

.filter-tab-btn.active {
  background: var(--primary);
  color: #FFFFFF;
  border-color: var(--primary);
}

[data-theme="dark"] .filter-tab-btn.active {
  background: var(--primary);
}

.filter-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 0.4rem;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(0, 0, 0, 0.06);
  color: inherit;
  transition: background 0.2s ease;
}

[data-theme="dark"] .filter-tab-count {
  background: rgba(255, 255, 255, 0.1);
}

.filter-tab-btn.active .filter-tab-count {
  background: rgba(255, 255, 255, 0.25);
  color: #FFFFFF;
}

/* Expand Works Section Container for wider cards */
.portfolio-section .container {
  max-width: 1400px;
}

/* Projects Responsive Grid (3 columns desktop, 2 tablet, 1 mobile) */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

@media (max-width: 1180px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
}

@media (max-width: 768px) {
  .projects-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* Project Card (Clean Modern Minimal) */
.project-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.28s ease,
              box-shadow 0.28s ease;
  position: relative;
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: 0 16px 36px -10px rgba(79, 70, 229, 0.12);
}

[data-theme="dark"] .project-card {
  background: #0d1527;
  border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .project-card:hover {
  border-color: rgba(99, 102, 241, 0.6);
  box-shadow: 0 16px 40px -10px rgba(99, 102, 241, 0.2);
}


/* Screenshot Image Frame — tall, full-bleed */
.project-img-frame {
  position: relative;
  height: 290px;
  overflow: hidden;
  border-bottom: none;
  background: #0a1120;
  flex-shrink: 0;
}

.project-screenshot {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  transition: transform 0.75s cubic-bezier(0.25, 1, 0.5, 1);
}

.project-card:hover .project-screenshot {
  transform: scale(1.06);
}

/* Gradient overlay — smooth depth enhancement on hover */
.project-img-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.3) 0%,
    rgba(0, 0, 0, 0.05) 25%,
    rgba(0, 0, 0, 0.2) 50%,
    rgba(0, 0, 0, 0.76) 82%,
    rgba(0, 0, 0, 0.9) 100%
  );
  pointer-events: none;
  z-index: 1;
  transition: opacity 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

.project-card:hover .project-img-overlay {
  opacity: 0.96;
}

/* Top overlay: status badge (flex-start) + client (always visible) */
.project-img-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 0.85rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  z-index: 2;
  transition: transform 0.45s cubic-bezier(0.25, 1, 0.5, 1);
}

.project-img-top .preview-status-pill {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.project-img-top .project-client-tag {
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
  background: rgba(0, 0, 0, 0.3);
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

/* Bottom overlay: title always + desc expands on hover */
.project-img-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0 1.15rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  z-index: 2;
  transition: transform 0.45s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Title — always visible on top of description, clickable to open details */
.project-img-bottom .project-card-title,
.clickable-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #FFFFFF;
  margin: 0;
  line-height: 1.35;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.65);
  cursor: pointer !important;
  outline: none;
  user-select: none;
  -webkit-user-select: none;
  display: inline-block;
  width: fit-content;
  transition: transform 0.45s cubic-bezier(0.25, 1, 0.5, 1),
              color 0.25s ease,
              text-shadow 0.25s ease;
}

.project-img-bottom .project-card-title:hover,
.project-img-bottom .project-card-title:focus-visible,
.clickable-title:hover {
  color: #c7d2fe;
  text-shadow: 0 2px 14px rgba(99, 102, 241, 0.85);
  cursor: pointer !important;
}

.project-img-bottom .project-card-title:active,
.clickable-title:active {
  cursor: pointer !important;
  transform: translateY(0) scale(0.98) !important;
}

.project-card:hover .project-img-bottom .project-card-title {
  transform: translateY(-2px);
}

/* Description — below title, buttery smooth expansion & fade-in */
.project-img-bottom .project-card-desc {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.6;
  margin: 0;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.8);
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateY(8px);
  transition: max-height 0.45s cubic-bezier(0.25, 1, 0.5, 1),
              opacity 0.4s cubic-bezier(0.25, 1, 0.5, 1) 0.04s,
              transform 0.4s cubic-bezier(0.25, 1, 0.5, 1) 0.04s;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.project-card:hover .project-img-bottom .project-card-desc {
  max-height: 90px;
  opacity: 1;
  transform: translateY(0);
}



/* Status Pill */
.preview-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.22rem 0.6rem;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(10, 10, 20, 0.55);
  color: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.preview-status-pill .pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 8px #10B981;
  display: inline-block;
  animation: pulseLiveDot 1.8s infinite;
}

.status-live .pulse-dot     { background: #10B981; box-shadow: 0 0 8px #10B981; }
.status-academic .pulse-dot  { background: #38BDF8; box-shadow: 0 0 8px #38BDF8; }
.status-enterprise .pulse-dot{ background: #818CF8; box-shadow: 0 0 8px #818CF8; }
.status-mobile .pulse-dot    { background: #F43F5E; box-shadow: 0 0 8px #F43F5E; }
.status-event .pulse-dot     { background: #FB923C; box-shadow: 0 0 8px #FB923C; }
.status-bootcamp .pulse-dot  { background: #A78BFA; box-shadow: 0 0 8px #A78BFA; }

@keyframes pulseLiveDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(0.85); }
}


/* Project Card Content Body — compact tech chips row */
.project-card-body {
  padding: 0.85rem 1rem 0.95rem;
  display: flex;
  flex-direction: column;
}

/* Modern Tech Tags — compact badge chips */
.project-tech-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0;
}

.project-tech-tags .tech-tag {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.70rem;
  font-weight: 600;
  padding: 0.18rem 0.52rem;
  border-radius: 5px;
  transition: all 0.2s ease;
}

.project-tech-tags .tech-tag.primary-tag {
  background: var(--primary-subtle);
  border-color: rgba(79, 70, 229, 0.25);
  color: var(--primary);
}

/* Animation for filtered card entry */
@keyframes fadeInUpCard {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   Project Case Study Modal (Modern Minimal Lightbox)
   ========================================================================== */
.project-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(10, 16, 29, 0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.project-modal-backdrop.active {
  opacity: 1;
  visibility: visible;
}

body.modal-open {
  overflow: hidden;
}

.project-modal-dialog {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  max-width: 740px;
  width: 100%;
  max-height: 88vh;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  position: relative;
  display: flex;
  flex-direction: column;
  transform: scale(0.95) translateY(12px);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.project-modal-backdrop.active .project-modal-dialog {
  transform: scale(1) translateY(0);
}

[data-theme="dark"] .project-modal-dialog {
  background: #0d1527;
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 25px 60px -12px rgba(0, 0, 0, 0.55);
}

.project-modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 10;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.project-modal-close:hover {
  background: var(--primary);
  color: #FFFFFF;
  border-color: var(--primary);
}

[dir="rtl"] .project-modal-close {
  right: auto;
  left: 1.25rem;
}

.project-modal-header {
  padding: 2rem 2.25rem 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

[data-theme="dark"] .project-modal-header {
  border-color: rgba(255, 255, 255, 0.08);
}

.modal-badge-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.75rem;
}

.modal-category-chip {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-subtle);
  padding: 0.2rem 0.65rem;
  border-radius: 9999px;
  border: 1px solid rgba(79, 70, 229, 0.2);
}

.modal-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: #10B981;
  background: rgba(16, 185, 129, 0.08);
  padding: 0.2rem 0.65rem;
  border-radius: 9999px;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.status-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 6px #10B981;
  display: inline-block;
}

.modal-project-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 0 0 0.35rem;
  line-height: 1.35;
}

.modal-project-subtitle {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin: 0;
}

.project-modal-body {
  padding: 1.75rem 2.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.65rem;
  overflow-y: auto;
  max-height: calc(88vh - 180px);
}

.modal-section {
  display: flex;
  flex-direction: column;
}

.modal-section-title {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0 0 0.75rem;
}

.modal-section-title svg {
  color: var(--primary);
}

.modal-text {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin: 0;
}

/* Two-column Callouts for Challenge & Solution */
.modal-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 680px) {
  .modal-two-col {
    grid-template-columns: 1fr;
  }
}

.modal-callout {
  padding: 1.15rem;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.callout-challenge {
  background: rgba(244, 63, 94, 0.04);
  border: 1px solid rgba(244, 63, 94, 0.18);
}

.callout-challenge .callout-title {
  color: #F43F5E;
}

.callout-solution {
  background: rgba(79, 70, 229, 0.04);
  border: 1px solid rgba(79, 70, 229, 0.2);
}

.callout-solution .callout-title {
  color: var(--primary);
}

.callout-title {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.85rem;
  font-weight: 700;
  margin: 0;
}

.callout-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

/* Architecture Breakdown Grid */
.modal-arch-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

@media (max-width: 600px) {
  .modal-arch-container {
    grid-template-columns: 1fr;
  }
}

.modal-arch-item {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 0.7rem 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

[data-theme="dark"] .modal-arch-item {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.07);
}

.arch-layer-name {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.arch-layer-tech {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-main);
}

/* Features List */
.modal-features-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.modal-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.feature-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--primary-subtle);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

/* Metrics Grid */
.modal-metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
}

@media (max-width: 600px) {
  .modal-metrics-grid {
    grid-template-columns: 1fr;
  }
}

.modal-metric-card {
  text-align: center;
  padding: 0.9rem 0.6rem;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
}

[data-theme="dark"] .modal-metric-card {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.07);
}

.metric-val {
  display: block;
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--primary);
  font-family: Outfit, sans-serif;
  line-height: 1.1;
}

.metric-lbl {
  display: block;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* Modal Footer */
.project-modal-footer {
  padding: 1.15rem 2.25rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.85rem;
  background: var(--bg-surface-elevated);
  border-bottom-left-radius: 20px;
  border-bottom-right-radius: 20px;
  flex-shrink: 0;
}

[data-theme="dark"] .project-modal-footer {
  background: #090e1b;
  border-color: rgba(255, 255, 255, 0.08);
}

.modal-contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

[dir="rtl"] .modal-contact-btn svg {
  transform: scaleX(-1);
}

/* ==========================================================================
   Skills & Tech Arsenal Section (Modern Bento Grid)
   ========================================================================== */
.skills-section {
  position: relative;
  overflow: hidden;
}

/* Category Filter Bar */
.skills-filter-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 2.75rem;
}

.skill-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.6rem 1.25rem;
  border-radius: 9999px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-family: var(--font-base);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.skill-filter-btn svg {
  flex-shrink: 0;
  opacity: 0.75;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.skill-filter-btn:hover {
  background: var(--bg-surface-elevated);
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
}

.skill-filter-btn:hover svg {
  opacity: 1;
  transform: scale(1.15);
}

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

.skill-filter-btn.active svg {
  opacity: 1;
  color: #ffffff;
}

.filter-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.35rem;
  height: 1.35rem;
  padding: 0 0.35rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.2);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
}

[data-theme="dark"] .skill-filter-btn {
  background: rgba(21, 34, 56, 0.6);
  border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .skill-filter-btn:hover {
  background: rgba(21, 34, 56, 0.95);
  border-color: var(--primary);
}

/* ==========================================================================
   Skills Section (Interactive Tech Chips Arsenal)
   ========================================================================== */
.skills-section {
  background: var(--bg-surface-elevated);
}

.skills-section .container {
  max-width: 1240px;
}

/* Chips Wrap Container */
.skills-chips-wrapper {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0.5rem 0;
}

/* Individual Tech Chip */
.skill-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.48rem 0.95rem 0.48rem 0.65rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 9999px;
  color: var(--text-main);
  text-decoration: none;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.22s ease,
              background 0.22s ease;
  user-select: none;
  cursor: default;
  position: relative;
}

[dir="rtl"] .skill-chip {
  padding: 0.48rem 0.65rem 0.48rem 0.95rem;
}

/* Hover State */
.skill-chip:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  background: var(--bg-surface);
}

[data-theme="dark"] .skill-chip {
  background: #1E293B;
  border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .skill-chip:hover {
  border-color: rgba(129, 140, 248, 0.5);
}

/* Logo Box Inside Chip */
.skill-chip-logo {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.skill-chip:hover .skill-chip-logo {
  transform: scale(1.12);
}

.skill-chip-logo svg {
  display: block;
}

/* Name and Role Tag */
.skill-chip-name {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
}

.skill-chip-tag {
  font-size: 0.70rem;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.04);
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  white-space: nowrap;
  transition: color 0.2s ease, background 0.2s ease;
}

[data-theme="dark"] .skill-chip-tag {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
}

.skill-chip:hover .skill-chip-tag {
  color: var(--primary);
  background: var(--primary-subtle);
}

/* Filter Dimming / Visibility States */
.skill-chip.is-hidden {
  display: none !important;
}

.skill-chip.is-matched {
  animation: chipFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes chipFadeIn {
  0% {
    opacity: 0;
    transform: scale(0.92);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* Responsive adjustment for Mobile */
@media (max-width: 640px) {
  .skills-chips-wrapper {
    gap: 0.6rem;
  }

  .skill-chip {
    padding: 0.42rem 0.8rem 0.42rem 0.55rem;
  }

  [dir="rtl"] .skill-chip {
    padding: 0.42rem 0.55rem 0.42rem 0.8rem;
  }

  .skill-chip-name {
    font-size: 0.82rem;
  }

  .skill-chip-tag {
    font-size: 0.66rem;
  }

  .skills-filter-bar {
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
  }

  .skill-filter-btn {
    white-space: nowrap;
    flex-shrink: 0;
  }
}

/* ==========================================================================
   Experience Timeline Section (Alternating Center-Spine Timeline)
   ========================================================================== */
.timeline-section {
  background: var(--bg-surface-elevated);
}

.timeline-section .container {
  max-width: 1160px;
}

/* Alternating Timeline Container */
.alternating-timeline {
  position: relative;
  max-width: 1040px;
  margin: 0 auto;
  padding: 1.5rem 0 0.5rem;
}

/* Central glowing vertical timeline spine */
.alternating-timeline::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  background: linear-gradient(180deg, var(--primary) 0%, var(--border-primary-subtle) 50%, var(--border-subtle) 95%, transparent 100%);
  z-index: 1;
}

/* Individual Timeline Row Entry */
.timeline-entry {
  position: relative;
  width: 50%;
  padding-bottom: 2rem;
  z-index: 2;
  box-sizing: border-box;
}

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

/* RTL Layout (Default for Arabic) */
[dir="rtl"] .timeline-entry:nth-child(odd) {
  margin-inline-start: 0;
  margin-inline-end: auto;
  padding-inline-end: 2.5rem;
}

[dir="rtl"] .timeline-entry:nth-child(even) {
  margin-inline-start: auto;
  margin-inline-end: 0;
  padding-inline-start: 2.5rem;
}

/* LTR Layout (For English) */
[dir="ltr"] .timeline-entry:nth-child(odd) {
  margin-left: 0;
  margin-right: auto;
  padding-right: 2.5rem;
}

[dir="ltr"] .timeline-entry:nth-child(even) {
  margin-left: auto;
  margin-right: 0;
  padding-left: 2.5rem;
}

/* Timeline Node Marker on Central Spine */
.timeline-node-marker {
  position: absolute;
  top: 1.25rem;
  width: 18px;
  height: 18px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Position Node exactly over the center line */
[dir="rtl"] .timeline-entry:nth-child(odd) .timeline-node-marker {
  inset-inline-end: -9px;
}

[dir="rtl"] .timeline-entry:nth-child(even) .timeline-node-marker {
  inset-inline-start: -9px;
}

[dir="ltr"] .timeline-entry:nth-child(odd) .timeline-node-marker {
  right: -9px;
}

[dir="ltr"] .timeline-entry:nth-child(even) .timeline-node-marker {
  left: -9px;
}

.timeline-node-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 3px solid var(--primary);
  transition: all 0.25s ease;
  box-shadow: 0 0 8px rgba(79, 70, 229, 0.25);
}

.timeline-entry:hover .timeline-node-dot {
  transform: scale(1.3);
  border-color: var(--secondary);
  box-shadow: 0 0 12px var(--secondary);
}

/* Active current role node (iRAMA) */
.timeline-entry.active-entry .timeline-node-dot {
  background: #10B981;
  border-color: #A7F3D0;
  box-shadow: 0 0 10px #10B981, 0 0 20px rgba(16, 185, 129, 0.4);
}

[data-theme="dark"] .timeline-entry.active-entry .timeline-node-dot {
  border-color: rgba(16, 185, 129, 0.4);
}

/* Timeline Card */
.timeline-entry-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 1.25rem 1.35rem;
  box-shadow: 0 4px 18px -4px rgba(0, 0, 0, 0.05);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.25s ease,
              box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  position: relative;
}

.timeline-entry-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: 0 10px 25px -5px rgba(79, 70, 229, 0.12);
}

[data-theme="dark"] .timeline-entry-card {
  background: #111827;
  border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .timeline-entry-card:hover {
  border-color: rgba(129, 140, 248, 0.5);
  box-shadow: 0 10px 25px -5px rgba(129, 140, 248, 0.16);
}

/* Active current role highlight */
.timeline-entry.active-entry .timeline-entry-card {
  border-color: rgba(16, 185, 129, 0.4);
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.04) 0%, var(--bg-surface) 100%);
}

[data-theme="dark"] .timeline-entry.active-entry .timeline-entry-card {
  border-color: rgba(16, 185, 129, 0.35);
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.06) 0%, #111827 100%);
}

/* Card Header: Logo + Titles + Period Chip */
.timeline-entry-header {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  flex-wrap: wrap;
}

/* Organization Logo Container */
.timeline-org-logo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #FFFFFF;
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: transform 0.25s ease;
}

.timeline-entry:hover .timeline-org-logo {
  transform: scale(1.06);
}

.timeline-org-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 2px;
  display: block;
}

/* Logo Placeholder */
.timeline-org-logo.logo-placeholder {
  background: var(--bg-surface-elevated);
  color: var(--primary);
  border: 1.5px dashed var(--border-primary-subtle);
}

[data-theme="dark"] .timeline-org-logo.logo-placeholder {
  background: #1e293b;
  color: var(--primary-light, #c7d2fe);
}

/* Role & Company title box */
.timeline-entry-titlebox {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1;
  min-width: 160px;
}

.timeline-entry-titlebox .timeline-role {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.35;
  margin: 0;
}

.timeline-entry-titlebox .timeline-company {
  font-size: 0.80rem;
  font-weight: 600;
  color: var(--secondary);
  line-height: 1.35;
  margin: 0;
}

/* Period Tag */
.timeline-entry-header .timeline-period {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-secondary);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  white-space: nowrap;
  align-self: flex-start;
  margin-inline-start: auto;
}

.timeline-entry-header .timeline-period.current-badge {
  color: #10B981;
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.3);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.15);
}

/* Description */
.timeline-entry-card .timeline-desc {
  font-size: 0.83rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

/* Mobile Responsiveness (<= 768px): Single side spine */
@media (max-width: 768px) {
  .alternating-timeline::before {
    left: auto;
    right: 18px;
    transform: none;
  }

  [dir="ltr"] .alternating-timeline::before {
    left: 18px;
    right: auto;
  }

  .timeline-entry {
    width: 100%;
    padding-bottom: 1.5rem;
  }

  [dir="rtl"] .timeline-entry:nth-child(odd),
  [dir="rtl"] .timeline-entry:nth-child(even) {
    margin: 0;
    padding-right: 48px;
    padding-left: 0;
  }

  [dir="ltr"] .timeline-entry:nth-child(odd),
  [dir="ltr"] .timeline-entry:nth-child(even) {
    margin: 0;
    padding-left: 48px;
    padding-right: 0;
  }

  [dir="rtl"] .timeline-entry:nth-child(odd) .timeline-node-marker,
  [dir="rtl"] .timeline-entry:nth-child(even) .timeline-node-marker {
    right: 9px;
    left: auto;
  }

  [dir="ltr"] .timeline-entry:nth-child(odd) .timeline-node-marker,
  [dir="ltr"] .timeline-entry:nth-child(even) .timeline-node-marker {
    left: 9px;
    right: auto;
  }

  .timeline-entry-header {
    flex-direction: column;
    gap: 0.65rem;
  }

  .timeline-entry-header .timeline-period {
    margin-inline-start: 0;
  }
}

/* ==========================================================================
   Education & Certifications Section (Clean Bordered)
   ========================================================================== */
.education-section {
  background: var(--bg-surface);
}

.edu-cert-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
}

@media (max-width: 900px) {
  .edu-cert-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

.edu-subcol-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-arabic-heading);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1.5px solid var(--border-subtle);
}

[dir="ltr"] .edu-subcol-title {
  font-family: var(--font-latin);
}

.edu-cards-list, .cert-cards-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.edu-card, .cert-card {
  background: var(--bg-surface);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem 1.75rem;
  transition: var(--transition-smooth);
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}

.edu-card:hover, .cert-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}

.edu-icon-badge, .cert-icon-badge {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--primary-subtle);
  border: 1px solid var(--border-primary-subtle);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

[data-theme="dark"] .edu-icon-badge, [data-theme="dark"] .cert-icon-badge {
  color: #8ec4ee;
}

.cert-icon-badge.cert-nvidia {
  background: rgba(118, 185, 0, 0.12);
  border-color: rgba(118, 185, 0, 0.3);
  color: #76B900;
}

.cert-icon-badge.cert-kaust {
  background: var(--primary-subtle);
  border-color: var(--border-primary-subtle);
  color: var(--primary);
}

[data-theme="dark"] .cert-icon-badge.cert-kaust {
  color: #8ec4ee;
}

.cert-icon-badge.cert-kaggle {
  background: rgba(32, 190, 255, 0.12);
  border-color: rgba(32, 190, 255, 0.3);
  color: #20BEFF;
}

.edu-info, .cert-info {
  flex-grow: 1;
}

.edu-degree, .cert-name {
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.35rem;
  line-height: 1.35;
}

.edu-institution, .cert-issuer {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

[data-theme="dark"] .edu-institution, [data-theme="dark"] .cert-issuer {
  color: #8ec4ee;
}

.edu-meta-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.edu-period-badge, .cert-badge-tag {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-secondary);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-sm);
}

.edu-period-badge.active-badge {
  color: var(--secondary);
  background: var(--secondary-subtle);
  border-color: var(--border-secondary-subtle);
}

/* Contact Info Items & Badges */
.contact-badges-group {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  max-width: 440px;
  width: 100%;
}

.contact-action-badge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: rgba(255, 255, 255, 0.08);
  border: 1.5px solid rgba(255, 255, 255, 0.22);
  color: #FFFFFF;
  padding: 0.65rem 0.85rem 0.65rem 1.15rem;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-smooth);
  box-sizing: border-box;
}

[dir="rtl"] .contact-action-badge {
  padding: 0.65rem 1.15rem 0.65rem 0.85rem;
}

.contact-action-badge:hover {
  border-color: var(--secondary);
  transform: translateY(-2px);
}

.contact-badge-main {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.contact-badge-main span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.contact-phone-val {
  direction: ltr !important;
  unicode-bidi: isolate;
  display: inline-block;
  text-align: left;
}

.badge-copy-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid transparent;
  color: #FFFFFF;
  flex-shrink: 0;
  transition: all 0.2s ease;
  margin-inline-start: 0.75rem;
}

.contact-action-badge:hover .badge-copy-icon {
  border-color: var(--secondary);
  color: var(--secondary);
  background: rgba(255, 51, 102, 0.15);
  transform: scale(1.06);
}

.phone-wa-icons {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.contact-location-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: #CBD5E1;
  font-size: 0.88rem;
  font-weight: 600;
  margin-top: 0.5rem;
}

/* ==========================================================================
   Contact & Inquiry Section (Bordered)
   ========================================================================== */
.contact-section,
#contact {
  background: var(--bg-surface-elevated);
}

.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 3.5rem;
  align-items: flex-start;
}

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

.contact-highlight-card {
  background: var(--primary-dark);
  color: #FFFFFF;
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--primary);
  padding: 2.25rem 2rem;
}

.contact-highlight-card h3 {
  font-family: var(--font-arabic-heading);
  font-size: 1.75rem;
  font-weight: 900;
  margin-bottom: 0.75rem;
}

.contact-highlight-card p {
  color: #CBD5E1;
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.btn-email-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  color: #FFFFFF;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-email-badge:hover {
  background: var(--secondary);
  border-color: var(--secondary);
}

/* Social Channels Row */
.social-links-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.social-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  background: var(--bg-surface);
  border: 1.5px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 0.6rem 1.15rem;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  transition: var(--transition-smooth);
}

.social-btn:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: var(--bg-surface-elevated);
}

/* Interactive Form (Bordered) */
.contact-form-card {
  background: var(--bg-surface);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

@media (max-width: 640px) {
  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

.form-group {
  margin-bottom: 1.35rem;
}

.form-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.45rem;
}

.form-input, .form-textarea, .form-select {
  width: 100%;
  padding: 0.85rem 1.15rem;
  border-radius: var(--radius-sm);
  background: var(--bg-surface-elevated);
  border: 1.5px solid var(--border-subtle);
  color: var(--text-main);
  font-size: 0.95rem;
  transition: var(--transition-smooth);
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
  background: var(--bg-surface);
  border-color: var(--secondary);
}

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

.btn-form-submit {
  width: 100%;
  background: var(--secondary);
  color: #FFFFFF;
  border: 1.5px solid var(--secondary);
  padding: 1rem;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-form-submit:hover {
  background: var(--secondary-hover);
  border-color: var(--secondary-hover);
}

/* ==========================================================================
   Footer (Redesigned)
   ========================================================================== */
.site-footer {
  background: var(--bg-surface);
  border-top: none;
  padding: 4.5rem 0 2.25rem 0;
  position: relative;
}

.footer-main-grid {
  display: grid;
  grid-template-columns: 1.5fr 1.3fr 1fr;
  gap: 3.5rem;
  padding-bottom: 3.5rem;
}

.footer-brand-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.footer-brand {
  display: inline-block;
  text-decoration: none;
  margin-bottom: 1.25rem;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.footer-brand:hover {
  transform: scale(1.02);
  opacity: 0.95;
}

.footer-logo-img {
  height: 60px;
  width: auto;
  max-width: 210px;
  object-fit: contain;
  display: block;
}

[data-theme="dark"] .footer-logo-img {
  filter: brightness(1.1) drop-shadow(0 2px 10px rgba(129, 140, 248, 0.22));
}

.footer-bio {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
  max-width: 440px;
  margin-bottom: 1.5rem;
}

.footer-contact-pills {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.footer-contact-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

[data-theme="dark"] a.footer-contact-pill:hover {
  color: var(--primary);
}

.footer-nav-col, .footer-social-col {
  display: flex;
  flex-direction: column;
}

.footer-col-title {
  font-family: var(--font-arabic-heading);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 1.25rem;
  position: relative;
  padding-bottom: 0.5rem;
}

.footer-col-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 24px;
  height: 2px;
  background: var(--secondary);
  border-radius: 2px;
}

[dir="ltr"] .footer-col-title {
  font-family: var(--font-latin);
}

[dir="ltr"] .footer-col-title::after {
  right: auto;
  left: 0;
}

.footer-nav-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem 2rem;
}

.footer-link {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.2s ease;
  display: inline-block;
  width: fit-content;
}

.footer-link:hover {
  color: var(--primary);
  transform: translateX(-4px);
}

[dir="ltr"] .footer-link:hover {
  transform: translateX(4px);
}

[data-theme="dark"] .footer-link:hover {
  color: var(--primary);
}

.footer-social-text {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.footer-social-icons {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.footer-social-btn {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-subtle);
  background: var(--bg-surface-elevated);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
  text-decoration: none;
}

.footer-social-btn:hover {
  border-color: var(--secondary);
  color: #FFFFFF;
  background: var(--secondary);
  transform: translateY(-3px);
  box-shadow: 0 4px 14px var(--border-secondary-subtle);
}

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

.footer-copyright {
  font-weight: 500;
}

.btn-back-to-top {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-surface-elevated);
  border: 1.5px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-back-to-top:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.08);
}

[data-theme="dark"] .btn-back-to-top:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* ==========================================================================
   Toast Notification (Bordered)
   ========================================================================== */
.toast-notice {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: #0F172A;
  color: #FFFFFF;
  border: 1.5px solid #334155;
  border-radius: var(--radius-sm);
  padding: 0.85rem 1.35rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  z-index: 9999;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.25s ease;
  pointer-events: none;
}

[dir="rtl"] .toast-notice {
  right: auto;
  left: 2rem;
}

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

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 1024px) {
  .hero-neural-canvas-wrap {
    inset-inline-end: 0;
    width: 100%;
    max-width: 100%;
    mask-image: radial-gradient(circle at center, black 45%, transparent 85%);
    -webkit-mask-image: radial-gradient(circle at center, black 45%, transparent 85%);
  }

  [dir="rtl"] .hero-neural-canvas-wrap {
    mask-image: radial-gradient(circle at center, black 45%, transparent 85%);
    -webkit-mask-image: radial-gradient(circle at center, black 45%, transparent 85%);
  }

  .hero-container {
    grid-template-columns: 1fr;
    gap: 3.5rem;
    text-align: center;
  }

  .hero-content {
    align-items: center;
  }

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

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

  .hero-tech-visual {
    max-width: 440px;
    margin: 0 auto;
  }

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

@media (max-width: 768px) {
  .nav-links, .btn-studio-cta {
    display: none;
  }

  .hero-section {
    padding-top: calc(var(--nav-height) + 1.5rem);
  }

  .tech-visual-stage {
    max-width: 330px;
    height: 310px;
  }

  .tech-card-code {
    width: 165px;
    padding: 0.55rem 0.75rem;
    top: 5px;
  }

  .tech-card-body code {
    font-size: 0.62rem;
  }

  .tech-card-status {
    padding: 0.5rem 0.85rem;
    bottom: 10px;
  }

  .status-headline {
    font-size: 0.72rem;
  }

  .status-subline {
    font-size: 0.62rem;
  }

  .tech-pill-badge {
    display: none;
  }

  .hero-stats-row {
    flex-wrap: wrap;
    gap: 1.5rem;
  }

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

  .footer-main-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .footer-bottom-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
}
