/* ============================================================
   TAREK HAIDAR: PORTFOLIO DESIGN SYSTEM
   Premium consultant aesthetic · Warm monochrome · Deep sage accent
   ============================================================ */

/* ----- Reset ----- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; }
ul, ol { list-style: none; }

/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
  /* --- Colors: Light Mode --- */
  --color-bg:             #FAFAF8;
  --color-bg-alt:         #F3F2EF;
  --color-surface:        #FFFFFF;
  --color-text-primary:   #1A1A1A;
  --color-text-secondary: #4A4A4A;
  --color-text-tertiary:  #7A7A7A;
  --color-accent:         #2C5545;
  --color-accent-hover:   #1E3D31;
  --color-accent-light:   #E8F0EC;
  --color-border:         #E8E7E4;
  --color-border-strong:  #D0CFCC;
  --color-whatsapp:       #25D366;
  --color-whatsapp-hover: #1DA851;
  --color-overlay:        rgba(0, 0, 0, 0.04);

  /* --- Typography --- */
  --font-display: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* --- Spacing --- */
  --section-py:    clamp(80px, 10vw, 140px);
  --container-max: 1200px;
  --container-px:  clamp(20px, 5vw, 40px);

  /* --- Radii --- */
  --radius-xs:   4px;
  --radius-sm:   8px;
  --radius-md:   12px;
  --radius-lg:   20px;
  --radius-xl:   28px;
  --radius-full: 9999px;

  /* --- Shadows --- */
  --shadow-xs:  0 1px 2px rgba(0,0,0,0.04);
  --shadow-sm:  0 2px 8px rgba(0,0,0,0.06);
  --shadow-md:  0 4px 20px rgba(0,0,0,0.08);
  --shadow-lg:  0 8px 40px rgba(0,0,0,0.10);
  --shadow-xl:  0 16px 64px rgba(0,0,0,0.12);

  /* --- Transitions --- */
  --ease-out:   cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --t-fast:     0.15s;
  --t-normal:   0.3s;
  --t-slow:     0.5s;

  /* --- Header --- */
  --header-height: 72px;
}

/* ============================================================
   DARK MODE
   ============================================================ */
[data-theme="dark"] {
  --color-bg:             #0E0E0E;
  --color-bg-alt:         #161616;
  --color-surface:        #1C1C1C;
  --color-text-primary:   #EBEBEB;
  --color-text-secondary: #A8A8A8;
  --color-text-tertiary:  #6A6A6A;
  --color-accent:         #5BA88C;
  --color-accent-hover:   #73C4A6;
  --color-accent-light:   #1A2E25;
  --color-border:         #2A2A2A;
  --color-border-strong:  #3A3A3A;
  --color-overlay:        rgba(255, 255, 255, 0.03);

  --shadow-xs:  0 1px 2px rgba(0,0,0,0.20);
  --shadow-sm:  0 2px 8px rgba(0,0,0,0.30);
  --shadow-md:  0 4px 20px rgba(0,0,0,0.35);
  --shadow-lg:  0 8px 40px rgba(0,0,0,0.40);
  --shadow-xl:  0 16px 64px rgba(0,0,0,0.50);
}

/* ============================================================
   BASE TYPOGRAPHY
   ============================================================ */
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-text-primary);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--color-text-primary);
}

h1 { font-size: clamp(2.4rem, 4.5vw, 3.6rem); }
h2 { font-size: clamp(2rem, 3.5vw, 2.8rem); }
h3 { font-size: clamp(1.35rem, 2vw, 1.65rem); }
h4 { font-size: clamp(1.1rem, 1.5vw, 1.25rem); }

p {
  color: var(--color-text-secondary);
  max-width: 640px;
}

/* ============================================================
   LAYOUT
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: var(--container-px);
  padding-right: var(--container-px);
}

.section {
  padding-top: var(--section-py);
  padding-bottom: var(--section-py);
}

.section-alt {
  background-color: var(--color-bg-alt);
}

/* --- Section Headers --- */
.section-label {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 16px;
}

.section-title {
  margin-bottom: 20px;
}

.section-subtitle {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--color-text-secondary);
  max-width: 600px;
}

.section-header {
  margin-bottom: clamp(48px, 6vw, 72px);
}

.section-header--center {
  text-align: center;
}

.section-header--center .section-subtitle {
  margin-left: auto;
  margin-right: auto;
}

/* ============================================================
   COMPONENTS: BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 14px 28px;
  border-radius: var(--radius-full);
  transition: all var(--t-normal) var(--ease-out);
  white-space: nowrap;
  position: relative;
}

.btn-primary {
  background-color: var(--color-text-primary);
  color: var(--color-bg);
}
.btn-primary:hover {
  background-color: var(--color-accent);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.btn-secondary {
  background-color: transparent;
  color: var(--color-text-primary);
  border: 1.5px solid var(--color-border-strong);
}
.btn-secondary:hover {
  border-color: var(--color-text-primary);
  transform: translateY(-1px);
}

.btn-whatsapp {
  background-color: var(--color-whatsapp);
  color: #FFFFFF;
  font-weight: 600;
}
.btn-whatsapp:hover {
  background-color: var(--color-whatsapp-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.3);
}

.btn-whatsapp svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.btn-outline-accent {
  background-color: transparent;
  color: var(--color-accent);
  border: 1.5px solid var(--color-accent);
}
.btn-outline-accent:hover {
  background-color: var(--color-accent);
  color: #FFFFFF;
}

/* ============================================================
   COMPONENTS: CARDS
   ============================================================ */
.card {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: clamp(28px, 3vw, 40px);
  transition: all var(--t-normal) var(--ease-out);
}
.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--color-border-strong);
}

/* --- Service Card --- */
.service-card {
  position: relative;
}
.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 32px;
  right: 32px;
  height: 2px;
  background-color: var(--color-accent);
  border-radius: 0 0 2px 2px;
  opacity: 0;
  transition: opacity var(--t-normal) var(--ease-out);
}
.service-card:hover::before {
  opacity: 1;
}
.service-card h3 {
  margin-bottom: 12px;
}
.service-card p {
  font-size: 0.95rem;
  line-height: 1.65;
}

/* --- Project Card --- */
.project-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.project-card__tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.project-card h3 {
  font-family: var(--font-display);
}
.project-card p {
  font-size: 0.95rem;
}

/* --- Cert Card --- */
.cert-card {
  padding: clamp(20px, 2.5vw, 28px);
  border-radius: var(--radius-md);
}
.cert-card h4 {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.92rem;
  line-height: 1.4;
  margin-bottom: 6px;
  color: var(--color-text-primary);
}
.cert-card span {
  font-size: 0.82rem;
  color: var(--color-text-tertiary);
}
.cert-card:hover {
  transform: translateY(-1px);
}

/* --- Testimonial Card --- */
.testimonial-card {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.testimonial-card__quote {
  font-family: var(--font-body);
  font-size: 1.1rem;
  font-style: italic;
  line-height: 1.7;
  color: var(--color-text-primary);
}
.testimonial-card__quote::before {
  content: '\201C';
  font-size: 2.5rem;
  line-height: 0;
  vertical-align: -0.5em;
  color: var(--color-accent);
  margin-right: 4px;
}
.testimonial-card__author {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.testimonial-card__name {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-text-primary);
}
.testimonial-card__role {
  font-size: 0.82rem;
  color: var(--color-text-tertiary);
}

/* --- Badges / Tags --- */
.badge {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  background-color: var(--color-accent-light);
  color: var(--color-accent);
}
.badge--confidential {
  background-color: #FEF3E2;
  color: #9A6C2E;
}
[data-theme="dark"] .badge--confidential {
  background-color: #2E2518;
  color: #D4A054;
}
.badge--ongoing {
  background-color: #E8F0FE;
  color: #3367D6;
}
[data-theme="dark"] .badge--ongoing {
  background-color: #1A2238;
  color: #6B9AEE;
}

/* ============================================================
   HEADER / NAVIGATION
   ============================================================ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-height);
  background-color: var(--color-bg);
  transition: box-shadow var(--t-normal) var(--ease-out),
              background-color var(--t-normal) var(--ease-out);
}
.header.scrolled {
  box-shadow: var(--shadow-xs);
}
[data-theme="dark"] .header.scrolled {
  background-color: rgba(14, 14, 14, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
[data-theme="light"] .header.scrolled {
  background-color: rgba(250, 250, 248, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

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

/* --- Logo --- */
.nav-logo {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--color-text-primary);
  letter-spacing: -0.01em;
  flex-shrink: 0;
}

/* --- Nav Links --- */
.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
}
.nav-links a {
  font-size: 0.88rem;
  font-weight: 450;
  color: var(--color-text-secondary);
  transition: color var(--t-fast) ease;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1.5px;
  background-color: var(--color-accent);
  transition: width var(--t-normal) var(--ease-out);
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--color-text-primary);
}
.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

/* --- Nav Actions --- */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* --- Theme Toggle --- */
.theme-toggle {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  color: var(--color-text-secondary);
  transition: background-color var(--t-fast) ease, color var(--t-fast) ease;
}
.theme-toggle:hover {
  background-color: var(--color-overlay);
  color: var(--color-text-primary);
}
.theme-toggle svg {
  width: 20px;
  height: 20px;
}

/* --- Mobile Menu Button --- */
.mobile-menu-btn {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  color: var(--color-text-primary);
}
.mobile-menu-btn:hover {
  background-color: var(--color-overlay);
}
.mobile-menu-btn .bar {
  display: block;
  width: 20px;
  height: 1.5px;
  background-color: currentColor;
  transition: all var(--t-normal) var(--ease-out);
  position: relative;
}
.mobile-menu-btn .bar::before,
.mobile-menu-btn .bar::after {
  content: '';
  position: absolute;
  left: 0;
  width: 100%;
  height: 1.5px;
  background-color: currentColor;
  transition: all var(--t-normal) var(--ease-out);
}
.mobile-menu-btn .bar::before { top: -6px; }
.mobile-menu-btn .bar::after  { top:  6px; }

/* Hamburger → X */
.mobile-menu-btn.active .bar { background-color: transparent; }
.mobile-menu-btn.active .bar::before {
  top: 0;
  transform: rotate(45deg);
}
.mobile-menu-btn.active .bar::after {
  top: 0;
  transform: rotate(-45deg);
}

/* --- Mobile Nav --- */
.mobile-nav {
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--color-bg);
  padding: 40px var(--container-px);
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-10px);
  transition: opacity var(--t-normal) var(--ease-out),
              transform var(--t-normal) var(--ease-out),
              visibility var(--t-normal);
}
.mobile-nav.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}
.mobile-nav a {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--color-text-primary);
  padding: 12px 0;
  border-bottom: 1px solid var(--color-border);
  transition: color var(--t-fast) ease;
}
.mobile-nav a:hover {
  color: var(--color-accent);
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: calc(var(--header-height) + 40px);
  padding-bottom: 60px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
}

.hero-content {
  max-width: 560px;
}

.hero-eyebrow {
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.hero-eyebrow span {
  display: inline-block;
  width: 28px;
  height: 1.5px;
  background-color: var(--color-accent);
}

.hero h1 {
  margin-bottom: 24px;
  letter-spacing: -0.01em;
}

.hero-text {
  font-size: 1.1rem;
  line-height: 1.75;
  margin-bottom: 40px;
  color: var(--color-text-secondary);
}

.hero-ctas {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-image {
  display: flex;
  justify-content: center;
  align-items: center;
}
.hero-image img {
  width: 100%;
  max-width: 480px;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  object-fit: cover;
}

/* ============================================================
   ABOUT
   ============================================================ */
.about-grid {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: start;
}

.about-image img {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  object-fit: cover;
  aspect-ratio: 4 / 5;
}

.about-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.about-content p {
  font-size: 1.05rem;
  line-height: 1.75;
}

.about-highlight {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--color-text-primary);
  line-height: 1.65;
  border-left: 3px solid var(--color-accent);
  padding-left: 24px;
  margin: 8px 0;
  max-width: none;
}

.about-location {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--color-text-tertiary);
  margin-top: 8px;
}
.about-location svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* ============================================================
   SERVICES
   ============================================================ */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* Make 7th card span center of a 3-col grid */
.services-grid .service-card:nth-child(7) {
  grid-column: 2;
}

/* ============================================================
   AI EDUCATION
   ============================================================ */
.education-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
}

.education-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.education-content h2 {
  margin-bottom: 4px;
}

.education-content p {
  font-size: 1.05rem;
  line-height: 1.75;
}

.education-image img {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  object-fit: cover;
  aspect-ratio: 4 / 3;
}

.education-industries {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

/* ============================================================
   PROJECTS
   ============================================================ */
.projects-intro {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  align-items: end;
  margin-bottom: clamp(48px, 6vw, 72px);
}

.projects-intro-image img {
  width: 280px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  object-fit: cover;
  aspect-ratio: 4 / 3;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

/* ============================================================
   CERTIFICATIONS
   ============================================================ */
.certs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

/* ============================================================
   TESTIMONIALS
   ============================================================ */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact {
  text-align: center;
}

.contact-inner {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}

.contact h2 {
  margin-bottom: 8px;
}

.contact-text {
  font-size: 1.05rem;
  text-align: center;
}

.contact-ctas {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.social-links {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 8px;
}

.social-link {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  transition: color var(--t-fast) ease;
}
.social-link:hover {
  color: var(--color-accent);
}
.social-link svg {
  width: 20px;
  height: 20px;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  padding: 40px 0;
  border-top: 1px solid var(--color-border);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

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

.footer-links {
  display: flex;
  gap: 20px;
}
.footer-links a {
  font-size: 0.82rem;
  color: var(--color-text-tertiary);
  transition: color var(--t-fast) ease;
}
.footer-links a:hover {
  color: var(--color-accent);
}

/* ============================================================
   SCROLL REVEAL ANIMATIONS
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--t-slow) var(--ease-out),
              transform var(--t-slow) var(--ease-out);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered children */
.reveal-group > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s var(--ease-out),
              transform 0.4s var(--ease-out);
}
.reveal-group.visible > *:nth-child(1)  { transition-delay: 0.05s; }
.reveal-group.visible > *:nth-child(2)  { transition-delay: 0.10s; }
.reveal-group.visible > *:nth-child(3)  { transition-delay: 0.15s; }
.reveal-group.visible > *:nth-child(4)  { transition-delay: 0.20s; }
.reveal-group.visible > *:nth-child(5)  { transition-delay: 0.25s; }
.reveal-group.visible > *:nth-child(6)  { transition-delay: 0.30s; }
.reveal-group.visible > *:nth-child(7)  { transition-delay: 0.35s; }
.reveal-group.visible > *:nth-child(8)  { transition-delay: 0.40s; }
.reveal-group.visible > *:nth-child(9)  { transition-delay: 0.45s; }
.reveal-group.visible > *:nth-child(10) { transition-delay: 0.50s; }
.reveal-group.visible > *:nth-child(11) { transition-delay: 0.55s; }
.reveal-group.visible > *:nth-child(12) { transition-delay: 0.60s; }
.reveal-group.visible > * {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   RESPONSIVE: TABLET (≤ 1024px)
   ============================================================ */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 48px;
    text-align: center;
  }
  .hero-content {
    max-width: 100%;
    order: 2;
  }
  .hero-eyebrow {
    justify-content: center;
  }
  .hero h1 { font-size: clamp(2rem, 5vw, 2.8rem); }
  .hero-text { margin-left: auto; margin-right: auto; }
  .hero-ctas { justify-content: center; }
  .hero-image {
    order: 1;
  }
  .hero-image img {
    max-width: 360px;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .about-image {
    max-width: 340px;
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .services-grid .service-card:nth-child(7) {
    grid-column: auto;
  }

  .education-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .education-image { order: -1; }
  .education-image img {
    max-width: 500px;
  }

  .projects-intro {
    grid-template-columns: 1fr;
  }
  .projects-intro-image {
    display: none;
  }

  .certs-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .testimonials-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ============================================================
   RESPONSIVE: MOBILE (≤ 768px)
   ============================================================ */
@media (max-width: 768px) {
  :root {
    --header-height: 64px;
  }

  .nav-links { display: none; }
  .mobile-menu-btn { display: flex; }

  .hero {
    min-height: auto;
    padding-top: calc(var(--header-height) + 32px);
    padding-bottom: 48px;
  }
  .hero-image img { max-width: 280px; }

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

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

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

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

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

  .social-links {
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* ============================================================
   SMALL MOBILE (≤ 480px)
   ============================================================ */
@media (max-width: 480px) {
  .hero-ctas {
    flex-direction: column;
    width: 100%;
  }
  .hero-ctas .btn {
    width: 100%;
  }
}

/* ============================================================
   UTILITIES
   ============================================================ */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Prevent layout shift from scrollbar */
html {
  scrollbar-gutter: stable;
}

/* Selection styling */
::selection {
  background-color: var(--color-accent-light);
  color: var(--color-accent);
}

/* Focus visible for accessibility */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: var(--radius-xs);
}

/* Smooth image loading */
img {
  background-color: var(--color-bg-alt);
}

/* ============================================================
   LANGUAGE TOGGLE
   ============================================================ */
.lang-switch {
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  color: var(--color-text-secondary);
  border: 1.5px solid var(--color-border-strong);
  transition: all var(--t-normal) var(--ease-out);
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
}
.lang-switch:hover {
  color: var(--color-text-primary);
  border-color: var(--color-text-primary);
  background-color: var(--color-overlay);
  transform: translateY(-1px);
}

/* ============================================================
   RTL (RIGHT-TO-LEFT) SPECIFIC OVERRIDES
   ============================================================ */
[dir="rtl"] {
  --font-display: 'Cairo', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'Cairo', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

[dir="rtl"] body {
  font-family: var(--font-body);
}

[dir="rtl"] h1, 
[dir="rtl"] h2, 
[dir="rtl"] h3, 
[dir="rtl"] h4,
[dir="rtl"] .section-label,
[dir="rtl"] .btn,
[dir="rtl"] .lang-switch,
[dir="rtl"] .cert-card h4,
[dir="rtl"] .testimonial-card__quote,
[dir="rtl"] .testimonial-card__name {
  font-family: var(--font-display);
}

[dir="rtl"] .about-highlight {
  border-left: none;
  border-right: 3px solid var(--color-accent);
  padding-left: 0;
  padding-right: 24px;
}

[dir="rtl"] .testimonial-card__quote::before {
  margin-right: 0;
  margin-left: 8px;
}

[dir="rtl"] .nav-links a::after {
  left: auto;
  right: 0;
}

