:root {
  --bg: #0C0C0E;
  --surface: #141416;
  --surface-2: #1C1C20;
  --border: #2A2A2F;
  --text: #E8E6E1;
  --text-muted: #B4B4BA;
  --text-label: #C4C4CA;
  --accent: #C8FF73;
  --accent-dim: rgba(200, 255, 115, 0.08);
  --negative: #FF6B6B;
  --serif: 'Instrument Serif', Georgia, serif;
  --sans: 'Instrument Sans', -apple-system, sans-serif;
  --mono: 'Geist Mono', 'JetBrains Mono', monospace;
  --arabic: 'Tajawal', sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* === ACCESSIBILITY === */
/* Skip link — the nav is position:fixed, so keyboard users hit it on every page. */
.skip-link {
  position: absolute;
  inset-inline-start: 16px;
  top: -100px;
  z-index: 200;
  background: var(--accent);
  color: #0C0C0E;
  font-size: 15px; font-weight: 600;
  padding: 12px 20px;
  border-radius: 0 0 10px 10px;
  text-decoration: none;
  transition: top 0.2s;
}
.skip-link:focus { top: 0; }
html.ar .skip-link { font-family: var(--arabic); }

#main:focus { outline: none; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

a { color: inherit; }

/* === ARABIC MODE OVERRIDES === */
html.ar {
  font-family: var(--arabic);
  direction: rtl;
}
html.ar .hero-title,
html.ar .section-content h2,
html.ar .metrics-header h2,
html.ar .takeaway-quote {
  font-family: var(--arabic);
  font-weight: 800;
  font-style: normal;
  letter-spacing: 0;
}
html.ar .hero-title em,
html.ar .takeaway-quote em {
  font-style: normal;
  font-weight: 800;
}
html.ar .metric-number {
  font-family: var(--arabic);
  font-weight: 800;
}
.step-number { font-family: var(--serif); }
html.ar .step-number { font-family: var(--arabic); }
html.ar .nav-tag,
html.ar .hero-label,
html.ar .section-label,
html.ar .meta-label,
html.ar .metrics-header p,
html.ar .chart-title,
html.ar .process-card-q,
html.ar .visual-placeholder span,
html.ar .footer-text,
html.ar .metric-comparison {
  font-family: var(--arabic);
  font-weight: 500;
  letter-spacing: 0;
}
html.ar .takeaway-quote { font-weight: 700; }

/* Tajawal sits visually smaller than the Latin faces at the same px, and the
   uppercase/letter-spacing treatment that carries the micro-labels in English
   does nothing in Arabic — so the label family gets one more step in ع. */
html.ar .nav-tag,
html.ar .lang-toggle button,
html.ar .meta-label,
html.ar .section-label,
html.ar .role-card-label,
html.ar .process-card-q,
html.ar .work-card-tag,
html.ar .visual-badge,
html.ar .skill-group-title,
html.ar .cta-tagline { font-size: 15px; }
html.ar .hero-label,
html.ar .section-sub,
html.ar .chart-title,
html.ar .metrics-header p,
html.ar .timeline-period,
html.ar .metric-comparison,
html.ar .footer-text { font-size: 16px; }
html.ar .skill-tag,
html.ar .impact-label,
html.ar .work-card-desc,
html.ar .timeline-desc,
html.ar .process-card-a { font-size: 17px; }

/* language visibility */
.lang-ar { display: none; }
html.ar .lang-en { display: none; }
html.ar .lang-ar { display: inline; }
html.ar .lang-ar.block { display: block; }

/* Tajawal runs visually small — ensure Arabic inline spans never render below 16px.
   max(16px, 1em) preserves large heading sizes while lifting tiny mono-label text. */
html.ar .lang-ar { font-size: max(16px, 1em); }

/* === LANGUAGE TOGGLE === */
.lang-toggle {
  display: flex; align-items: center;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 4px;
  gap: 2px;
  cursor: pointer;
}
.lang-toggle button {
  font-family: var(--mono);
  font-size: 14px; letter-spacing: 0.05em;
  background: none; border: none; color: var(--text-muted);
  padding: 6px 14px; border-radius: 100px;
  cursor: pointer; transition: all 0.25s;
  font-weight: 500;
}
html.ar .lang-toggle button { font-family: var(--arabic); }
.lang-toggle button.active {
  background: var(--accent); color: #0C0C0E;
}

/* === NAV === */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 20px 48px;
  display: flex; justify-content: space-between; align-items: center;
  background: rgba(12,12,14,0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.nav-name { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 16px; letter-spacing: -0.01em; text-decoration: none; }
html.ar .nav-name { font-family: var(--arabic); font-weight: 700; }
.nav-avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent); color: #0C0C0E;
  font-size: 13px; font-weight: 700; flex-shrink: 0;
}
html.ar .nav-avatar { font-family: var(--arabic); }
.nav-brand { display: flex; align-items: center; gap: 32px; }
.nav-right  { display: flex; align-items: center; gap: 32px; }
.nav-links { display: flex; align-items: center; gap: 24px; }
.nav-links a {
  font-size: 15px; color: var(--text-muted); text-decoration: none;
  transition: color 0.2s; font-weight: 500;
}
.nav-links a:hover { color: var(--text); }
.nav-links a.active {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 5px;
  text-decoration-thickness: 1.5px;
}
html.ar .nav-links a { font-family: var(--arabic); }
.nav-tag {
  font-family: var(--mono);
  font-size: 14px; color: var(--text-label); letter-spacing: 0.04em;
  border: 1px solid var(--border); padding: 6px 14px; border-radius: 100px;
}

/* === HERO === */
.hero {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 0 48px 80px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; top: -200px; inset-inline-end: -200px;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(200,255,115,0.04) 0%, transparent 70%);
  pointer-events: none;
}
.hero-tagline {
  font-family: var(--mono);
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.22em;
  color: var(--accent); opacity: 0.7; margin-bottom: 40px;
  min-height: 1.4em;
  padding-bottom: 24px; border-bottom: 1px solid var(--border);
}
html.ar .hero-tagline { font-family: var(--arabic); letter-spacing: 0.05em; font-size: 13px; }
.js-tw-cursor {
  display: inline-block; margin-inline-start: 2px;
  animation: tw-blink 0.75s step-end infinite;
}
.js-tw-cursor.tw-done { opacity: 0; transition: opacity 0.4s; }
@keyframes tw-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}
.hero-label {
  display: inline-flex; align-items: center; gap: 8px;
  align-self: flex-start;
  font-family: var(--mono);
  font-size: 14px; letter-spacing: 0.04em;
  color: var(--text); font-weight: 400;
  border: 1px solid var(--border); padding: 6px 14px; border-radius: 100px;
  margin-bottom: 24px;
}
html.ar .hero-tagline::before { content: '•'; margin-inline-end: 6px; }
.hero-title {
  font-family: var(--serif); font-size: clamp(42px, 5.5vw, 76px);
  line-height: 1.06; font-weight: 400; max-width: 980px;
  margin-bottom: 36px; letter-spacing: -0.01em;
}
html.ar .hero-title { line-height: 1.3; font-size: clamp(34px, 4.5vw, 60px); }
.hero-title em {
  font-style: normal; color: var(--accent);
}
.hero-meta {
  display: flex; gap: 48px; flex-wrap: wrap;
  padding-top: 32px; border-top: 1px solid var(--border);
}
.meta-item { display: flex; flex-direction: column; gap: 6px; }
.meta-label {
  font-family: var(--mono);
  font-size: 14px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-label);
}
.meta-value { font-size: 16px; font-weight: 500; letter-spacing: -0.005em; }
html.ar .meta-value { font-family: var(--arabic); font-weight: 500; }

/* === SECTIONS === */
.section {
  padding: 100px 48px;
  border-top: 1px solid var(--border);
}
.section-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 80px;
  max-width: 1200px;
}
.section-label {
  font-family: var(--mono);
  font-size: 14px; text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--text-label); font-weight: 400;
  position: sticky; top: 100px; align-self: start;
}
.section-content h2 {
  font-family: var(--serif); font-size: 34px; margin-bottom: 20px;
  font-weight: 400; letter-spacing: -0.005em; line-height: 1.2;
}
html.ar .section-content h2 { line-height: 1.4; }
.section-content p {
  color: var(--text-muted); font-size: 17px; line-height: 1.8;
  max-width: 640px;
}
html.ar .section-content p { font-family: var(--arabic); line-height: 2; color: var(--text); font-weight: 500; font-size: 18px; }
.section-content p + p { margin-top: 16px; }

/* === ROLE & TEAM (leadership framing) === */
.role-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
  margin-top: 8px;
}
.role-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px 20px;
}
.role-card-label {
  font-family: var(--mono);
  font-size: 14px; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--accent); margin-bottom: 10px; font-weight: 500;
}
html.ar .role-card-label { font-family: var(--arabic); }
.role-card-value { font-size: 16px; color: var(--text-muted); line-height: 1.6; }
html.ar .role-card-value { font-family: var(--arabic); line-height: 1.8; color: var(--text); font-weight: 500; }

/* === METRICS HERO === */
.metrics-section {
  padding: 120px 48px;
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, var(--accent-dim) 0%, transparent 60%);
}
.metrics-header {
  text-align: center; margin-bottom: 80px;
}
.metrics-header h2 {
  font-family: var(--serif); font-size: 44px; font-weight: 400; letter-spacing: -0.005em;
}
.metrics-header p {
  font-family: var(--mono);
  color: var(--text-label); margin-top: 14px; font-size: 15px;
  text-transform: uppercase; letter-spacing: 0.08em;
}
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 1000px;
  margin: 0 auto;
}
.metric-card {
  background: var(--surface-2);
  border: 1px solid transparent;
  border-radius: 16px;
  padding: 40px 32px;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s;
}
.metric-card:hover { border-color: var(--accent); }
.metric-card.hero-metric {
  grid-column: 1 / -1;
  background: var(--surface);
  border-color: var(--accent);
  padding: 56px 32px;
}
.metric-number {
  font-family: var(--serif); font-weight: 400;
  letter-spacing: -0.02em; line-height: 1;
  margin-bottom: 14px;
}
.metric-card.hero-metric .metric-number {
  font-size: 112px; color: var(--accent);
}
.metric-card:not(.hero-metric) .metric-number {
  font-size: 52px; color: var(--text);
}
.metric-label {
  font-size: 16px; color: var(--text-muted); line-height: 1.5;
}
html.ar .metric-label { font-family: var(--arabic); color: var(--text); font-weight: 500; }
.metric-comparison {
  display: inline-block; margin-top: 18px;
  font-family: var(--mono);
  font-size: 15px; color: var(--text-label);
  background: var(--surface-2); padding: 7px 16px; border-radius: 100px;
}
.metric-comparison span { color: var(--accent); font-weight: 500; }
.metrics-note {
  max-width: 1000px; margin: 32px auto 0;
  font-size: 14px; color: var(--text-label);
  line-height: 1.6; text-align: center;
}
html.ar .metrics-note { font-family: var(--arabic); }

/* === CHART === */
.chart-section {
  padding: 100px 48px;
  border-top: 1px solid var(--border);
}
.chart-container {
  max-width: 1000px; margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 48px;
}
.chart-title {
  font-family: var(--mono);
  font-size: 15px; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--text-label); margin-bottom: 32px; font-weight: 400;
}
.chart-note {
  margin-top: 28px; padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 14px; color: var(--text-label); line-height: 1.6;
}
html.ar .chart-note { font-family: var(--arabic); }
.chart-svg { width: 100%; height: auto; }
.chart-label { font-family: var(--mono); fill: var(--text-label); font-size: 14px; }
.chart-line-main { stroke: var(--accent); stroke-width: 2.5; fill: none; }
.chart-area {
  fill: url(#accentGradient); opacity: 0.15;
}
.chart-dot { fill: var(--accent); }
.chart-grid { stroke: var(--border); stroke-width: 0.5; }
.launch-line { stroke: var(--accent); stroke-width: 1; stroke-dasharray: 6 4; opacity: 0.6; }
.launch-label {
  font-family: var(--mono); fill: var(--accent); font-size: 13px; font-weight: 500;
  letter-spacing: 0.05em;
}

/* === PROCESS === */
.process-cards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px;
  margin-top: 40px;
}
.process-card {
  background: var(--surface-2);
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 24px 20px;
}
.process-card-q {
  font-family: var(--mono);
  font-size: 14px; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--accent); margin-bottom: 10px; font-weight: 500;
}
.process-card-a {
  font-size: 15px; color: var(--text-muted); line-height: 1.6;
}
html.ar .process-card-a { font-family: var(--arabic); line-height: 1.8; }

/* === VISUAL PLACEHOLDER === */
.visual-section {
  padding: 100px 48px;
  border-top: 1px solid var(--border);
}
.visual-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px;
  max-width: 1000px; margin: 0 auto;
}
.visual-real { margin: 0; }
.visual-img-wrap {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  line-height: 0;
}
.visual-img-wrap img {
  width: 100%; height: auto;
  display: block;
}
/* annotation markers */
.annotation { position: absolute; z-index: 3; width: 0; height: 0; pointer-events: none; }
.anno-dot {
  position: absolute; left: 0; top: 0;
  transform: translate(-50%, -50%);
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(12,12,14,0.55), 0 0 10px rgba(200,255,115,0.85);
}
.anno-dot::after {
  content: ""; position: absolute; inset: -3px; border-radius: 50%;
  border: 2px solid var(--accent); opacity: 0.55;
  animation: annoPulse 2.2s ease-out infinite;
}
@keyframes annoPulse { 0% { transform: scale(1); opacity: 0.55; } 100% { transform: scale(2.6); opacity: 0; } }
.anno-label {
  position: absolute; top: 0; transform: translateY(-50%);
  font-family: var(--mono); font-size: 13px; line-height: 1.2;
  color: #0C0C0E; background: var(--accent);
  padding: 5px 9px; border-radius: 6px;
  white-space: nowrap; font-weight: 500;
  box-shadow: 0 4px 14px rgba(0,0,0,0.4);
}
html.ar .anno-label { font-family: var(--arabic); }
.anno-right-label .anno-label { left: 17px; }
.anno-left-label .anno-label { right: 17px; }
.visual-badge {
  position: absolute; bottom: 16px; inset-inline-start: 16px;
  font-family: var(--mono);
  font-size: 14px; font-weight: 500; letter-spacing: 0.1em;
  padding: 6px 14px; border-radius: 100px;
  backdrop-filter: blur(8px);
}
html.ar .visual-badge { font-family: var(--arabic); }
.before-badge {
  background: rgba(255, 107, 107, 0.15);
  color: #FF9B9B;
  border: 1px solid rgba(255, 107, 107, 0.3);
}
.after-badge {
  background: rgba(200, 255, 115, 0.15);
  color: var(--accent);
  border: 1px solid rgba(200, 255, 115, 0.3);
}
.visual-real figcaption {
  margin-top: 16px;
  font-size: 15px; color: var(--text-muted); line-height: 1.6;
  padding: 0 4px;
}
html.ar .visual-real figcaption { font-family: var(--arabic); line-height: 1.9; }

/* === TAKEAWAY === */
.takeaway-section {
  padding: 120px 48px;
  border-top: 1px solid var(--border);
  text-align: center;
}
.takeaway-quote {
  font-family: var(--serif); font-size: clamp(26px, 3.2vw, 40px);
  font-style: italic; max-width: 780px; margin: 0 auto;
  line-height: 1.45; letter-spacing: -0.005em;
  color: var(--text); font-weight: 400;
}
html.ar .takeaway-quote { line-height: 1.7; font-size: clamp(22px, 2.8vw, 34px); }
.takeaway-quote em { color: var(--accent); font-style: italic; }

/* === FOOTER === */
.footer {
  padding: 48px; border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
}
.footer-text {
  font-family: var(--mono);
  font-size: 14px; color: var(--text-label); letter-spacing: 0.02em;
}
.footer-next {
  font-size: 15px; color: var(--accent); text-decoration: none;
  display: flex; align-items: center; gap: 8px; font-weight: 500;
}
html.ar .footer-next { font-family: var(--arabic); }
.footer-next:hover { text-decoration: underline; }

/* === CLOSING CTA === */
.cta-closing {
  padding: 120px 48px;
  border-top: 1px solid var(--border);
  text-align: center;
  background: linear-gradient(180deg, var(--accent-dim) 0%, transparent 60%);
}
.cta-title {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(32px, 4vw, 48px); letter-spacing: -0.005em;
  line-height: 1.15; max-width: 720px; margin: 0 auto;
}
html.ar .cta-title { font-family: var(--arabic); line-height: 1.4; }
.cta-sub {
  color: var(--text-muted); font-size: clamp(16px, 1.6vw, 19px);
  max-width: 620px; margin: 22px auto 0; line-height: 1.7;
}
html.ar .cta-sub { font-family: var(--arabic); line-height: 2; }
.cta-actions {
  display: flex; justify-content: center; gap: 16px;
  flex-wrap: wrap; margin-top: 36px;
}
.cta-tagline {
  font-family: var(--mono);
  font-size: 14px; color: var(--text-label); letter-spacing: 0.06em;
  margin-top: 44px;
}
html.ar .cta-tagline { font-family: var(--arabic); letter-spacing: 0; }

/* ============================================================
   HOME PAGE COMPONENTS
   ============================================================ */

/* home hero sits below fixed nav, centered */
.home-hero {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 120px 48px 80px;
  position: relative; overflow: hidden;
}
.home-hero::before {
  content: '';
  position: absolute; top: -150px; inset-inline-end: -150px;
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(200,255,115,0.05) 0%, transparent 70%);
  pointer-events: none;
}
.home-hero::after {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 160px 140px;
  pointer-events: none;
}
.home-hero .hero-title { max-width: 1040px; }
.home-hero-sub {
  color: var(--text-muted); font-size: clamp(16px, 1.6vw, 20px);
  max-width: 800px; line-height: 1.7; margin-bottom: 40px;
}
html.ar .home-hero-sub { font-family: var(--arabic); line-height: 2; max-width: 620px; }
.hero-cta-row { display: flex; gap: 16px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 16px; font-weight: 600; text-decoration: none;
  padding: 13px 26px; border-radius: 100px; transition: all 0.25s;
  cursor: pointer; border: 1px solid transparent;
}
html.ar .btn { font-family: var(--arabic); }
.btn-primary { background: var(--accent); color: #0C0C0E; }
.btn-primary:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn-ghost { border-color: var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* logos strip */
.logos-strip {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 32px 48px;
  display: flex; flex-direction: column; align-items: center; gap: 24px;
}
.logos-label {
  font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-muted);
}
html.ar .logos-label { font-family: var(--arabic); letter-spacing: 0; }
.logos-row {
  display: flex; align-items: center; justify-content: center;
  gap: 40px; flex-wrap: wrap;
}
.company-logo {
  height: 40px; width: auto;
}

/* impact grid */
.impact-section { border-bottom: 1px solid var(--border); }
.impact-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  max-width: 1440px; margin: 0 auto;
}
.impact-item {
  text-align: center; padding: 64px 40px;
  border-right: 1px solid var(--border);
}
.impact-item:last-child { border-right: none; }
html.ar .impact-item:first-child { border-right: none; }
html.ar .impact-item:last-child { border-right: 1px solid var(--border); }
.impact-number {
  font-family: var(--sans); font-size: clamp(72px, 7vw, 112px);
  font-weight: 700; color: var(--accent); line-height: 1; margin-bottom: 16px;
}
html.ar .impact-number { font-family: var(--arabic); font-weight: 800; }
.impact-label {
  font-size: 16px; color: var(--text-muted); line-height: 1.5;
  max-width: 200px; margin: 0 auto;
}
html.ar .impact-label { font-family: var(--arabic); }

/* featured work cards */
.work-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 24px; max-width: 1120px; margin: 0 auto;
}
.work-card {
  display: flex; flex-direction: column;
  background: var(--surface-2);
  border: 1px solid transparent;
  border-radius: 16px; overflow: hidden;
  text-decoration: none; color: inherit;
  transition: border-color 0.3s, transform 0.3s;
}
.work-card:hover { border-color: var(--accent); transform: translateY(-3px); }
.work-card-body { padding: 28px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.work-card-tag {
  font-family: var(--mono); font-size: 13px; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--accent);
}
html.ar .work-card-tag { font-family: var(--arabic); }
.work-card-title {
  font-family: var(--sans); font-size: clamp(22px, 2.2vw, 30px);
  line-height: 1.15; font-weight: 700; letter-spacing: -0.02em;
}
html.ar .work-card-title { font-family: var(--arabic); font-weight: 800; letter-spacing: 0; }
.work-card-desc { font-size: 15px; color: var(--text-muted); line-height: 1.65; }
html.ar .work-card-desc { font-family: var(--arabic); line-height: 1.9; font-size: 16px; }
.work-card-cta { font-size: 15px; color: var(--accent); font-weight: 500; margin-top: auto; padding-top: 8px; }
html.ar .work-card-cta { font-family: var(--arabic); }
.work-card--extra { display: none; }
.more-cases-wrap { text-align: center; margin-top: 32px; }
.btn-more-cases {
  background: none; border: none; cursor: pointer;
  font-size: 15px; font-weight: 500; color: var(--accent);
  padding: 0; display: inline-flex; align-items: center; gap: 6px;
  opacity: 0.85; transition: opacity 0.2s;
}
.btn-more-cases:hover { opacity: 1; }
html.ar .btn-more-cases { font-family: var(--arabic); }

/* leadership principles */
.principles-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 24px; max-width: 1000px; margin: 0 auto;
}
.principle-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 32px;
}
.principle-num {
  font-family: var(--serif); font-size: 32px; font-weight: 700; color: var(--accent); margin-bottom: 12px;
}
.principle-title {
  font-size: 18px; font-weight: 600; margin-bottom: 10px; letter-spacing: -0.01em;
}
html.ar .principle-num { font-family: var(--mono); }
html.ar .principle-title { font-family: var(--arabic); font-weight: 700; }
.principle-desc { font-size: 16px; color: var(--text-muted); line-height: 1.7; }
html.ar .principle-desc { font-family: var(--arabic); line-height: 1.9; }

.section-heading {
  font-family: var(--serif); font-size: clamp(30px, 3.5vw, 44px);
  font-weight: 400; text-align: center; margin-bottom: 16px; letter-spacing: -0.005em;
}
html.ar .section-heading { font-family: var(--arabic); font-weight: 800; }
.section-sub {
  font-family: var(--mono); font-size: 15px; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--text-label); text-align: center; margin-bottom: 56px;
}
html.ar .section-sub { font-family: var(--arabic); }

/* ============================================================
   ABOUT / CV PAGE COMPONENTS
   ============================================================ */

.about-intro {
  padding: 160px 48px 80px; max-width: 860px; margin: 0 auto;
}
.about-intro .hero-title { font-size: clamp(36px, 4.5vw, 60px); margin-bottom: 28px; }
.about-intro p {
  color: var(--text-muted); font-size: 18px; line-height: 1.8; max-width: 700px;
}
html.ar .about-intro p { font-family: var(--arabic); line-height: 2; }
.about-intro p + p { margin-top: 18px; }

/* experience timeline */
.timeline { display: flex; flex-direction: column; gap: 0; }
.timeline-item {
  display: grid; grid-template-columns: 180px 1fr; gap: 40px;
  padding: 32px 0; border-top: 1px solid var(--border);
}
.timeline-period {
  font-family: var(--mono); font-size: 15px; color: var(--text-label);
  letter-spacing: 0.04em; padding-top: 4px;
}
html.ar .timeline-period { font-family: var(--arabic); }
.timeline-role { font-size: 20px; font-weight: 600; margin-bottom: 4px; letter-spacing: -0.01em; }
html.ar .timeline-role { font-family: var(--arabic); font-weight: 700; }
.timeline-company { font-size: 16px; color: var(--accent); margin-bottom: 14px; }
html.ar .timeline-company { font-family: var(--arabic); }
.timeline-desc { font-size: 16px; color: var(--text-muted); line-height: 1.7; }
html.ar .timeline-desc { font-family: var(--arabic); line-height: 1.9; }
.timeline-desc li { margin-left: 18px; margin-top: 6px; }
html.ar .timeline-desc { padding-right: 0; }
html.ar .timeline-desc li { margin-left: 0; margin-right: 18px; }

/* skills */
.skills-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px;
}
.skill-group {
  background: var(--surface-2); border: 1px solid transparent;
  border-radius: 16px; padding: 28px;
}
.skill-group-title {
  font-family: var(--mono); font-size: 14px; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--accent); margin-bottom: 16px;
}
html.ar .skill-group-title { font-family: var(--arabic); }
.skill-tags { display: flex; flex-wrap: wrap; gap: 10px; }
.skill-tag {
  font-size: 15px; color: var(--text-muted);
  background: var(--surface-2); border: 1px solid var(--border);
  padding: 7px 14px; border-radius: 100px;
}
html.ar .skill-tag { font-family: var(--arabic); }

/* recommendations */
.rec-grid { columns: 2; column-gap: 24px; max-width: 1000px; margin: 0 auto; }
.rec-card {
  break-inside: avoid; margin: 0 0 24px;
  background: var(--surface-2); border: 1px solid transparent;
  border-radius: 16px; padding: 28px;
}
.rec-quote { font-size: 16px; color: var(--text-muted); line-height: 1.7; }
.rec-quote p + p { margin-top: 14px; }
/* Scope the Arabic face off [lang="ar"], NOT off html.ar — an html.ar rule would
   render the four English quotes in Tajawal whenever the page is in AR mode. */
.rec-quote[lang="ar"] { font-family: var(--arabic); line-height: 1.9; }

.rec-person { display: flex; align-items: center; gap: 14px; margin-top: 22px; }
.rec-avatar {
  position: relative; flex: none; width: 48px; height: 48px;
  border-radius: 50%; overflow: hidden;
  background: var(--surface-2); border: 1px solid var(--border);
  display: grid; place-items: center;
}
/* The monogram sits underneath and the photo paints over it via ::after. A missing
   avatar file just leaves ::after transparent and the initials show through — so the
   section ships correctly before the photos are added, with no broken-image icon
   and no JS. Dropping the file into assets/img/ is the only step needed. */
.rec-avatar::before {
  content: attr(data-initials);
  font-family: var(--mono); font-size: 15px; color: var(--accent);
}
.rec-avatar::after {
  content: ""; position: absolute; inset: 0;
  background: var(--photo, none) center / cover no-repeat;
}
.rec-name { font-size: 16px; font-weight: 600; font-style: normal; letter-spacing: -0.01em; }
.rec-role { display: block; font-size: 15px; color: var(--accent); }
.rec-rel  { display: block; font-family: var(--mono); font-size: 13px; color: var(--text-label); }
html.ar .rec-name, html.ar .rec-role, html.ar .rec-rel { font-family: var(--arabic); }
html.ar .rec-rel { font-size: 14px; }

/* strengths */
.strengths-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; max-width: 720px; }
.strength-item { display: grid; grid-template-columns: 40px 1fr; gap: 20px; align-items: baseline; padding: 18px 0; border-bottom: 1px solid var(--border); }
.strength-item:first-child { border-top: 1px solid var(--border); }
.strength-num { font-family: var(--mono); font-size: 12px; color: var(--text-label); padding-top: 3px; }
.strength-body { display: flex; flex-direction: column; gap: 5px; }
.strength-name { font-size: 17px; font-weight: 600; letter-spacing: -0.02em; color: var(--text); }
html.ar .strength-name { font-family: var(--arabic); font-size: 18px; }
.strength-desc { font-size: 15px; color: var(--text-muted); line-height: 1.5; }
html.ar .strength-desc { font-family: var(--arabic); line-height: 1.8; }

/* contact */
.contact-section { text-align: center; }
.contact-links { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; margin-top: 32px; }

/* === RESPONSIVE === */
@media (max-width: 900px) {
  .nav { padding: 16px 24px; }
  .nav-brand { gap: 20px; }
  .nav-right  { gap: 20px; }
  .nav-tag { display: none; }
  /* Keep the 3 nav links on mobile (tighter) instead of hiding them —
     hiding them left the site with no navigation at all below 900px. */
  .nav-links { gap: 14px; }
  .nav-links a { font-size: 14px; }
  .nav-name { font-size: 15px; }
  .hero { padding: 0 24px 60px; }
  .home-hero { padding: 110px 24px 60px; }
  .section { padding: 60px 24px; }
  .section-grid { grid-template-columns: 1fr; gap: 24px; }
  .section-label { position: static; }
  .role-grid { grid-template-columns: 1fr; }
  .metrics-section { padding: 80px 24px; }
  .metrics-grid { grid-template-columns: 1fr; }
  .metric-card.hero-metric .metric-number { font-size: 72px; }
  .chart-section { padding: 60px 24px; }
  .chart-container { padding: 24px; }
  .process-cards { grid-template-columns: 1fr; }
  .visual-grid { grid-template-columns: 1fr; }
  .visual-section { padding: 60px 24px; }
  .takeaway-section { padding: 80px 24px; }
  .cta-closing { padding: 80px 24px; }
  .footer { padding: 32px 24px; flex-direction: column; gap: 16px; }
  .logos-strip { padding: 28px 24px; }
  .impact-grid { grid-template-columns: 1fr; }
  .impact-item { border-right: none; border-bottom: 1px solid var(--border); padding: 40px 24px; }
  .impact-item:last-child { border-bottom: none; }
  html.ar .impact-item:last-child { border-right: none; border-bottom: none; }
  .work-grid { grid-template-columns: 1fr; }
  .principles-grid { grid-template-columns: 1fr; }
  .about-intro { padding: 130px 24px 60px; }
  .timeline-item { grid-template-columns: 1fr; gap: 8px; }
  .skills-grid { grid-template-columns: 1fr; }
  .rec-grid { columns: 1; }
}


/* very narrow phones — keep the nav on one line without overflowing */
@media (max-width: 420px) {
  .nav { padding: 14px 16px; }
  .nav-brand { gap: 14px; }
  .nav-right  { gap: 14px; }
  .nav-links { gap: 10px; }
  .nav-links a { font-size: 14px; }
  .nav-name { font-size: 14px; }
  .lang-toggle button { padding: 5px 10px; font-size: 12px; }
  .hero { padding: 0 16px 48px; }
  .home-hero { padding: 100px 16px 48px; }
  .section, .visual-section, .chart-section { padding: 48px 16px; }
  .metrics-section, .takeaway-section, .cta-closing { padding: 64px 16px; }
  .about-intro { padding: 120px 16px 48px; }
  .footer { padding: 28px 16px; }
}

/* ─── ARTICLE CARDS (writing list on home) ─── */
.articles-list {
  max-width: 1120px; margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.article-card {
  display: flex; flex-direction: column;
  background: var(--surface-2);
  border: 1px solid transparent;
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none; color: inherit;
  transition: border-color 0.3s, transform 0.3s;
}
.article-card:hover { border-color: var(--accent); transform: translateY(-3px); }
.article-card:hover .article-card-cover img { transform: scale(1.03); }
.article-card-cover {
  margin: 0;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.article-card-cover img {
  width: 100%; height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.article-card-body {
  display: flex; flex-direction: column;
  gap: 16px;
  padding: 28px 32px 32px;
}
.article-card-side {
  display: inline-flex; align-items: center; flex-wrap: wrap;
  gap: 10px;
}
.article-card-side .dot { color: var(--border); font-size: 12px; }
.article-card-eyebrow {
  font-family: var(--mono);
  font-size: 13px; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--accent); font-weight: 500;
}
html.ar .article-card-eyebrow { font-family: var(--arabic); }
.article-card-readtime {
  font-family: var(--mono);
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-label);
}
html.ar .article-card-readtime { font-family: var(--arabic); letter-spacing: 0; text-transform: none; font-size: 13px; }
.article-card-main { display: flex; flex-direction: column; gap: 12px; }
.article-card-title {
  font-family: var(--sans);
  font-size: clamp(22px, 2vw, 26px);
  font-weight: 700; line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 0;
}
html.ar .article-card-title { font-family: var(--arabic); font-weight: 800; letter-spacing: 0; line-height: 1.4; }
.article-card-desc {
  font-size: 15px; color: var(--text-muted); line-height: 1.65;
  margin: 0;
}
html.ar .article-card-desc { font-family: var(--arabic); font-size: 16px; line-height: 1.9; }
.article-card-cta {
  font-size: 15px; color: var(--accent); font-weight: 500;
  margin-top: 4px;
}
html.ar .article-card-cta { font-family: var(--arabic); }
@media (max-width: 1024px) {
  .articles-list { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 700px) {
  .articles-list { grid-template-columns: 1fr; }
  .article-card-body { padding: 24px 22px 26px; }
}

/* ─── ARTICLE READING PAGE ─── */
.article-hero {
  padding: 160px 24px 72px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.article-hero-meta {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono);
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--text-label);
  margin-bottom: 32px;
}
html.ar .article-hero-meta { font-family: var(--arabic); letter-spacing: 0; text-transform: none; font-size: 14px; }
.article-hero-meta .tag { color: var(--accent); font-weight: 500; }
.article-hero-meta .dot { color: var(--border); }
.article-hero-title {
  font-family: var(--serif);
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 400; line-height: 1.1;
  letter-spacing: -0.015em;
  max-width: 820px; margin: 0 auto;
  color: var(--text);
}
html.ar .article-hero-title { font-family: var(--arabic); font-weight: 800; letter-spacing: 0; line-height: 1.3; }
.article-hero-title em { font-style: italic; color: var(--accent); }

.article-reading {
  max-width: 680px; margin: 0 auto; padding: 72px 24px 120px;
}
.article-reading p {
  font-size: 18px; line-height: 1.75; color: var(--text);
  margin-bottom: 24px;
}
.article-reading p.lead {
  font-size: 20px; line-height: 1.6; color: var(--text);
  margin-bottom: 32px;
}
html.ar .article-reading p { font-family: var(--arabic); font-size: 19px; line-height: 2; }
html.ar .article-reading p.lead { font-family: var(--arabic); font-size: 21px; line-height: 1.9; }

.article-section-label {
  font-family: var(--mono);
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--accent);
  margin: 56px 0 24px;
  display: flex; align-items: center; gap: 14px;
}
.article-section-label::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}
html.ar .article-section-label { font-family: var(--arabic); letter-spacing: 0; text-transform: none; font-size: 14px; }

.article-questions {
  display: flex; flex-direction: column; gap: 28px;
  margin: 0 0 40px;
  counter-reset: aq;
}
.article-q-item {
  display: grid; grid-template-columns: 44px 1fr; gap: 18px;
  align-items: baseline;
}
.article-q-num {
  font-family: var(--serif);
  font-size: 28px; font-weight: 400;
  color: var(--accent);
  line-height: 1;
}
html.ar .article-q-num { font-family: var(--mono); font-size: 22px; }
.article-q-body { display: flex; flex-direction: column; gap: 8px; }
.article-q-title {
  font-family: var(--sans);
  font-size: 19px; font-weight: 600;
  line-height: 1.35; letter-spacing: -0.01em;
  color: var(--text);
}
html.ar .article-q-title { font-family: var(--arabic); font-weight: 700; font-size: 20px; }
.article-q-note {
  font-size: 16px; line-height: 1.65;
  color: var(--text-muted);
}
html.ar .article-q-note { font-family: var(--arabic); font-size: 17px; line-height: 1.9; }

.article-steps { margin: 20px 0 32px; padding: 0; list-style: none; }
.article-steps li {
  position: relative; padding-inline-start: 24px;
  margin-bottom: 12px; font-size: 17px; line-height: 1.7;
  color: var(--text);
}
.article-steps li::before {
  content: '—'; position: absolute; inset-inline-start: 0;
  color: var(--accent); font-weight: 500;
}
html.ar .article-steps li { font-family: var(--arabic); font-size: 18px; line-height: 1.9; }

.article-pullquote {
  font-family: var(--serif);
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 400; line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 56px 0 24px;
  padding-inline-start: 20px;
  border-inline-start: 2px solid var(--accent);
}
html.ar .article-pullquote { font-family: var(--arabic); font-weight: 700; line-height: 1.6; }

.article-closing {
  font-style: italic;
  font-size: 17px; color: var(--text-muted); line-height: 1.7;
  margin-top: 16px;
}
html.ar .article-closing { font-family: var(--arabic); font-style: normal; font-size: 18px; line-height: 1.9; }

.article-cover {
  margin: 0 0 56px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
}
.article-cover img { display: block; width: 100%; height: auto; }

.article-example {
  background: var(--surface);
  border: 1px solid var(--border);
  border-inline-start: 3px solid var(--accent);
  padding: 20px 24px;
  border-radius: 8px;
  margin: 24px 0 32px;
  font-size: 16px;
  color: var(--text);
  line-height: 1.75;
}
.article-example-label {
  display: block;
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 8px;
}
.article-example strong { color: var(--text); }
html.ar .article-example { font-family: var(--arabic); font-size: 17px; line-height: 1.95; }
html.ar .article-example-label { font-family: var(--arabic); letter-spacing: 0; text-transform: none; font-size: 13px; }

.article-table-wrap { margin: 28px 0 32px; overflow-x: auto; }
.article-table {
  width: 100%; border-collapse: collapse;
  border: 1px solid var(--border);
  border-radius: 8px; overflow: hidden;
  font-size: 15px;
  color: var(--text);
}
.article-table th, .article-table td {
  padding: 14px 18px;
  text-align: start;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  line-height: 1.6;
}
.article-table th {
  background: var(--surface);
  font-family: var(--mono);
  font-weight: 500;
  color: var(--text-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.article-table tr:last-child td { border-bottom: none; }
html.ar .article-table { font-family: var(--arabic); font-size: 16px; line-height: 1.85; }
html.ar .article-table th { font-family: var(--arabic); font-size: 13px; letter-spacing: 0; text-transform: none; font-weight: 700; }

.article-checklist { margin: 20px 0 32px; padding: 0; list-style: none; }
.article-checklist li {
  position: relative; padding-inline-start: 32px;
  margin-bottom: 14px; font-size: 17px; line-height: 1.7;
  color: var(--text);
}
.article-checklist li::before {
  content: ''; position: absolute; inset-inline-start: 0; top: 4px;
  width: 18px; height: 18px;
  border: 1.5px solid var(--border);
  border-radius: 4px;
}
html.ar .article-checklist li { font-family: var(--arabic); font-size: 18px; line-height: 1.9; }

.article-back {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono);
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--text-muted); text-decoration: none;
  margin-bottom: 48px;
  transition: color 0.2s;
}
.article-back:hover { color: var(--accent); }
html.ar .article-back { font-family: var(--arabic); letter-spacing: 0; text-transform: none; font-size: 14px; }

@media (max-width: 700px) {
  .article-card { padding: 28px 24px; }
  .article-hero { padding: 120px 20px 56px; }
  .article-reading { padding: 48px 20px 80px; }
  .article-q-item { grid-template-columns: 36px 1fr; gap: 14px; }
  .article-q-num { font-size: 24px; }
}

/* Annotation callouts are positioned as % against a fixed bitmap, so at phone
   widths the long nowrap labels ran past the image and got clipped by
   .visual-img-wrap's overflow:hidden. Let them wrap and shrink instead of
   truncating — the label text carries the before/after argument. */
@media (max-width: 600px) {
  .anno-label {
    white-space: normal;
    max-width: 38vw;
    font-size: 12px;
    line-height: 1.25;
    padding: 4px 6px;
  }
  .anno-dot { width: 9px; height: 9px; }
  .anno-right-label .anno-label { left: 13px; }
  .anno-left-label .anno-label { right: 13px; }
}
