/* =============================================================
   Portfolio — CORE STYLESHEET  (SHARED ENGINE)

   Everything here is written in design tokens, so a person's
   people/<slug>/theme.css — loaded AFTER this file — can change the
   whole look by redefining the tokens, and restructure the layout by
   hanging rules off html[data-variant="…"].

   Do not put a person's colours or fonts in this file.
   ============================================================= */

/* ---------- Design tokens ---------- */
:root {
  /* Brand palette (from CV) */
  --navy-900: #253340;
  --navy-800: #2c3d4c;
  --navy-700: #34465a;   /* CV header base */
  --navy-600: #3d4f61;
  --steel:    #5c7d9c;
  --gold:     #c8a24c;
  --gold-soft:#e0c583;

  /* --- Theme seams -----------------------------------------------
     The six tokens below are what a person's theme.css normally
     changes. They exist so a theme never has to re-declare a rule:

       --brand-grad  every solid "brand" block: the primary button,
                     the initials mark, numbered badges, the round
                     icon tiles. Set it to a flat colour for a
                     matte look, or another gradient.
       --cta-grad    the call-to-action band.
       --footer-bg   the footer slab.
       --ff-num      the face used for digits (stat counters, page
                     numbers, dates, percentages).
     The --navy-* / --steel / --gold names above are the brand ramp:
     a theme redefines their VALUES and keeps the names.
     -------------------------------------------------------------- */
  --brand-grad: linear-gradient(145deg, var(--navy-600), var(--navy-900));
  --cta-grad:   linear-gradient(135deg, var(--navy-700), var(--navy-900));
  /* Text ON a brand surface — the primary button, the initials mark, the
     numbered badges, the footer. A token because a brand may specify its
     own near-white (this project has one whose palette has no pure white
     in it at all) and "outside the palette" is a real rule to some. */
  --on-brand:   #ffffff;

  /* The dot on the hero's status pill. A token because a brand with a
     defined semantic palette will have its own "success" green rather
     than this one. */
  --status-dot: #35c07f;

  /* Text ON the call-to-action band. Tokens, because a theme is free to
     make that band light — and then white text would vanish. */
  --cta-fg:      #ffffff;
  --cta-fg-soft: rgba(255,255,255,.82);
  --cta-fg-line: rgba(255,255,255,.4);
  --footer-bg:  var(--navy-900);
  --ff-num:     var(--ff-en);

  /* Light theme surfaces */
  --bg:        #ffffff;
  --bg-alt:    #f4f6f8;   /* CV sidebar grey */
  --surface:   #ffffff;
  --surface-2: #f7f9fb;
  --border:    #e2e7ec;
  --text:      #263038;
  --text-soft: #4a5763;
  --muted:     #7c8896;
  --shadow:    0 1px 2px rgba(37,51,64,.06), 0 8px 24px rgba(37,51,64,.08);
  --shadow-lg: 0 18px 48px rgba(37,51,64,.16);

  /* Semantic */
  --header-bg: var(--navy-700);
  --accent:    var(--steel);
  --ring:      rgba(92,125,156,.35);

  --radius:   16px;
  --radius-sm: 10px;
  --maxw:     1160px;
  --nav-h:    68px;

  --ff-ar: "Tajawal", "Segoe UI", system-ui, sans-serif;
  --ff-en: "Poppins", "Segoe UI", system-ui, sans-serif;
  --ff: var(--ff-ar);

  /* Display face — headings, the brand mark, and the big stat numbers.
     Defaults to the body face, so a theme that sets nothing looks
     exactly as it did before. A theme that wants a serif (or a
     geometric sans) for headlines sets --ff-display-ar / -en. */
  --ff-display-ar: var(--ff-ar);
  --ff-display-en: var(--ff-en);
  --ff-display: var(--ff-display-ar);

  /* Type character, so a theme can shift headline feel without
     rewriting rules: tracking + case of the small "eyebrow" labels. */
  --eyebrow-tracking: .12em;
  --eyebrow-case: uppercase;
  --h-tracking: 0;
}

html[data-theme="dark"] {
  --bg:        #161d24;
  --bg-alt:    #1b232c;
  --surface:   #1f2831;
  --surface-2: #232d38;
  --border:    #303d49;
  --text:      #e8edf2;
  --text-soft: #b8c2cc;
  --muted:     #8b97a3;
  --header-bg: #1b232c;
  --accent:    #7ba0c0;
  --ring:      rgba(123,160,192,.4);
  --shadow:    0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.35);
  --shadow-lg: 0 18px 48px rgba(0,0,0,.5);
}

html[lang="en"] { --ff: var(--ff-en); --ff-display: var(--ff-display-en); }
html[lang="ar"] { --ff-display: var(--ff-display-ar); }

/* One place decides what "a heading" is, so themes only pick the face. */
h1, h2, h3, h4,
.brand .btxt, .brand .mono,
.stat .num, .card-title, .section-head h2 {
  font-family: var(--ff-display);
  letter-spacing: var(--h-tracking);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--ff);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
  transition: background .35s ease, color .35s ease;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
ul { list-style: none; padding: 0; }
:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; border-radius: 6px; }

/* ---------- Layout helpers ---------- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 22px; }
.section { padding: 76px 0; }
.section-head { text-align: center; margin-bottom: 48px; }
.section-head .eyebrow {
  display: inline-block; color: var(--accent); font-weight: 700;
  letter-spacing: var(--eyebrow-tracking); text-transform: var(--eyebrow-case);
  font-size: .78rem; margin-bottom: 10px;
}
.section-head h2 { font-size: clamp(1.7rem, 4vw, 2.5rem); font-weight: 800; color: var(--text); }
.section-head p { color: var(--muted); max-width: 620px; margin: 14px auto 0; }

/* A secondary heading inside a page (Training & Development under Education).
   Its size is a custom property so a theme can resize it without hunting
   for the rule. */
.section-head-sub { margin: 52px 0 28px; }
.section-head-sub h2 { font-size: var(--sub-h-size, 1.5rem); }
.section-head .rule { width: 64px; height: 4px; border-radius: 4px; background: linear-gradient(90deg,var(--accent),var(--gold)); margin: 16px auto 0; }

/* ============================================================
   NAVBAR
   ============================================================ */
.nav {
  position: sticky; top: 0; z-index: 60;
  height: var(--nav-h);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(150%) blur(14px);
  border-bottom: 1px solid var(--border);
  transition: background .3s, box-shadow .3s;
}
.nav.scrolled { box-shadow: var(--shadow); }
.nav-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 800; letter-spacing: .01em; }
.brand .mono {
  width: 40px; height: 40px; border-radius: 11px; flex: none;
  display: grid; place-items: center; color: var(--on-brand); font-weight: 800; font-size: .95rem;
  background: var(--brand-grad);
  box-shadow: 0 6px 16px rgba(37,51,64,.28);
}
.brand .btxt { line-height: 1.15; }
.brand .btxt small { display: block; font-weight: 600; font-size: .68rem; color: var(--muted); }

.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  padding: 9px 14px; border-radius: 10px; font-weight: 600; font-size: .93rem; color: var(--text-soft);
  position: relative; transition: color .2s, background .2s;
}
.nav-links a:hover { color: var(--text); background: var(--surface-2); }
.nav-links a.active { color: var(--accent); }
.nav-links a.active::after {
  content: ""; position: absolute; inset-inline: 14px; bottom: 2px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--gold));
}

.nav-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center;
  color: var(--text-soft); border: 1px solid var(--border); background: var(--surface);
  transition: .2s;
}
.icon-btn:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-1px); }
.icon-btn svg { width: 20px; height: 20px; }
/* .icon-btn is a single-column grid, so an icon + a label would stack into two
   rows (and `gap` would become vertical). The language button is the only
   icon-btn with a label, so it switches to a row. */
.lang-btn {
  width: auto; padding-inline: 14px; gap: 7px;
  display: flex; flex-direction: row; align-items: center; justify-content: center;
  font-weight: 800; font-size: .9rem; line-height: 1; white-space: nowrap;
}
.lang-btn svg { flex: none; }
/* Poppins carries no Arabic glyph, so the "ع" label needs the Arabic face or it
   falls back to whatever the system offers and sits off the baseline. */
.lang-btn [lang="ar"] { font-family: var(--ff-ar); font-size: 1.05rem; }

.burger { display: none; }

/* Mobile drawer */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(15,22,29,.5); opacity: 0; visibility: hidden; transition: .3s; z-index: 70; }
.drawer-backdrop.open { opacity: 1; visibility: visible; }
.drawer {
  position: fixed; top: 0; inset-inline-end: 0; height: 100%; width: min(320px, 84vw);
  background: var(--bg); z-index: 80; padding: 22px; transform: translateX(-100%);
  transition: transform .32s cubic-bezier(.4,0,.2,1); box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; gap: 6px;
}
/* RTL: drawer sits on the left (inline-end), so hide it to the left; LTR: hide to the right */
html[dir="ltr"] .drawer { transform: translateX(100%); }
.drawer.open { transform: translateX(0) !important; }
.drawer .drawer-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; flex: none; }
/* The list scrolls; the drawer itself does not, so the close button is
   always reachable however many routes there are. overscroll-behavior
   stops a flick at the end of the list from scrolling the page behind. */
.drawer-links {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  gap: 6px;
  /* room for a scrollbar without the labels shifting */
  margin-inline-end: -6px;
  padding-inline-end: 6px;
}
.drawer-links > * { flex: none; }
.drawer a { padding: 13px 14px; border-radius: 11px; font-weight: 700; color: var(--text-soft); display: flex; align-items: center; gap: 12px; }
.drawer a:hover, .drawer a.active { background: var(--surface-2); color: var(--accent); }
.drawer a svg { width: 20px; height: 20px; opacity: .8; }

/* ============================================================
   HERO
   ============================================================ */
.hero { position: relative; padding: 60px 0 40px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background:
    radial-gradient(1100px 520px at 85% -10%, color-mix(in srgb, var(--steel) 20%, transparent), transparent 60%),
    radial-gradient(900px 480px at 0% 0%, color-mix(in srgb, var(--gold) 12%, transparent), transparent 55%);
}
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
/* No portrait was supplied, so there is no second column to leave room for. */
.hero-grid.no-portrait { grid-template-columns: minmax(0, 1fr); }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border); color: var(--accent);
  font-weight: 700; font-size: .82rem; box-shadow: var(--shadow); margin-bottom: 20px;
}
.hero-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--status-dot); box-shadow: 0 0 0 4px color-mix(in srgb, var(--status-dot) 20%, transparent); }
.hero h1 { font-size: clamp(2.1rem, 5.4vw, 3.5rem); line-height: 1.12; font-weight: 800; letter-spacing: -.01em; }
.hero h1 .accent { color: var(--accent); }
.hero .role { font-size: clamp(1.05rem, 2.4vw, 1.35rem); font-weight: 700; color: var(--gold); margin-top: 12px; }
.hero .lead { color: var(--text-soft); font-size: 1.06rem; margin-top: 18px; max-width: 56ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

.btn {
  display: inline-flex; align-items: center; gap: 9px; padding: 13px 24px; border-radius: 12px;
  font-weight: 700; font-size: .96rem; transition: .2s; border: 1px solid transparent;
}
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--brand-grad); color: var(--on-brand); box-shadow: 0 10px 24px rgba(37,51,64,.28); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(37,51,64,.36); }
.btn-ghost { background: var(--surface); border-color: var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }

/* Hero portrait */
.hero-portrait { position: relative; justify-self: center; }
.portrait-ring {
  width: min(340px, 74vw); aspect-ratio: 1; border-radius: 50%;
  background: var(--brand-grad);
  padding: 12px; box-shadow: var(--shadow-lg); position: relative;
}
.portrait-ring::after {
  content: ""; position: absolute; inset: -8px; border-radius: 50%;
  border: 2px dashed color-mix(in srgb, var(--gold) 55%, transparent); animation: spin 40s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.portrait-inner { width: 100%; height: 100%; border-radius: 50%; overflow: hidden; background: var(--bg-alt); position: relative; z-index: 0; }
.portrait-inner img { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: cover; }
.portrait-inner .placeholder { position: absolute; inset: 0; z-index: 0; display: grid; place-items: center; color: var(--navy-600); }
.portrait-inner .placeholder svg { width: 55%; height: 55%; opacity: .55; }
html[data-theme="dark"] .portrait-inner .placeholder { color: var(--steel); }

.float-chip {
  position: absolute; z-index: 5; background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 12px 16px; box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 11px;
}
.float-chip .fi { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 15%, transparent); color: var(--accent); }
.float-chip .fi svg { width: 20px; height: 20px; }
.float-chip b { display: block; font-size: 1.1rem; line-height: 1; }
.float-chip span { font-size: .74rem; color: var(--muted); }
.float-chip.c1 { top: 14%; inset-inline-start: -8%; }
.float-chip.c2 { bottom: 12%; inset-inline-end: -6%; animation-delay: 1s; }
.float-chip.c1, .float-chip.c2 { animation: floaty 5s ease-in-out infinite; }
@keyframes floaty { 0%,100%{ transform: translateY(0); } 50%{ transform: translateY(-10px); } }

/* ============================================================
   STATS
   ============================================================ */
.stats { background: var(--bg-alt); border-block: 1px solid var(--border); }
.stats-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 22px; }
.stat { text-align: center; padding: 26px 14px; }
.stat .num { font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; color: var(--accent); font-family: var(--ff-num); line-height: 1; }
.stat .num .suffix { color: var(--gold); }
.stat .lbl { margin-top: 10px; color: var(--text-soft); font-weight: 600; font-size: .95rem; }

/* ============================================================
   CARDS / GRIDS
   ============================================================ */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow); transition: transform .25s, box-shadow .25s, border-color .25s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 22px; }
.about-grid { display: grid; grid-template-columns: 1.4fr .9fr; gap: 32px; align-items: start; }

.card-title { display: flex; align-items: center; gap: 12px; font-size: 1.2rem; font-weight: 800; margin-bottom: 18px; }
/* A second card-title further down the same card needs air above it. */
.card-title-next { margin-top: 26px; }
.about-summary { color: var(--text-soft); font-size: 1.05rem; }
.card-title .ci { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex: none;
  background: var(--brand-grad); color: var(--on-brand); }
.card-title .ci svg { width: 22px; height: 22px; }

/* Profile facts list */
.facts { display: grid; gap: 4px; }
.fact { display: flex; align-items: center; gap: 14px; padding: 12px 8px; border-bottom: 1px dashed var(--border); }
.fact:last-child { border-bottom: none; }
.fact .fi { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; flex: none;
  background: color-mix(in srgb, var(--accent) 13%, transparent); color: var(--accent); }
.fact .fi svg { width: 19px; height: 19px; }
.fact .fx small { display: block; color: var(--muted); font-size: .78rem; }
.fact .fx b { font-weight: 700; font-size: .98rem; }

/* Language bars */
.lang-row { margin-bottom: 18px; }
.lang-row:last-child { margin-bottom: 0; }
.lang-row .top { display: flex; justify-content: space-between; margin-bottom: 7px; font-weight: 700; }
.lang-row .top span:last-child { color: var(--muted); font-weight: 600; font-size: .85rem; }
.bar { height: 9px; border-radius: 999px; background: var(--surface-2); overflow: hidden; border: 1px solid var(--border); }
.bar > i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--steel), var(--gold)); width: 0; transition: width 1.1s cubic-bezier(.2,.7,.2,1); }

/* ============================================================
   TIMELINE (experience + education)
   ============================================================ */
/* The card a timeline sits in. Its own class (not an inline style) so a
   layout can strip the card away and let the timeline run full width. */
.tl-card { padding: 34px 30px; }

.timeline { position: relative; padding-inline-start: 34px; }
.timeline::before { content: ""; position: absolute; inset-inline-start: 9px; top: 6px; bottom: 6px; width: 2px; background: linear-gradient(var(--border), transparent); }
.tl-item { position: relative; margin-bottom: 26px; }
.tl-item:last-child { margin-bottom: 0; }
.tl-dot { position: absolute; inset-inline-start: -34px; top: 6px; width: 20px; height: 20px; border-radius: 50%; background: var(--surface); border: 3px solid var(--accent); display: grid; place-items: center; }
.tl-dot.current { border-color: var(--gold); box-shadow: 0 0 0 5px color-mix(in srgb, var(--gold) 22%, transparent); }
.tl-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 16px; }
.tl-head h3 { font-size: 1.16rem; font-weight: 800; }
.tl-period { font-size: .82rem; font-weight: 700; color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); padding: 4px 11px; border-radius: 999px; white-space: nowrap; }
.tl-period.current { color: var(--gold); background: color-mix(in srgb, var(--gold) 15%, transparent); }
.tl-org { color: var(--gold); font-weight: 700; margin-top: 3px; }
.tl-intro { color: var(--text-soft); margin-top: 10px; }
.tl-points { margin-top: 12px; display: grid; gap: 8px; }
.tl-points li { position: relative; padding-inline-start: 22px; color: var(--text-soft); font-size: .96rem; }
.tl-points li::before { content: ""; position: absolute; inset-inline-start: 2px; top: 11px; width: 7px; height: 7px; border-radius: 2px; background: var(--accent); transform: rotate(45deg); }
.tl-note { margin-top: 10px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--border); color: var(--text-soft); font-size: .93rem; }

/* ============================================================
   SKILLS
   ============================================================ */
.skill-card .card-title .ci { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.skill { margin-bottom: 16px; }
.skill:last-child { margin-bottom: 0; }
.skill .top { display: flex; justify-content: space-between; font-weight: 600; font-size: .93rem; margin-bottom: 6px; }
.skill .top .pv { color: var(--muted); font-family: var(--ff-num); font-size: .82rem; }

/* Training chips */
.chip-list { display: flex; flex-wrap: wrap; gap: 12px; }
.chip {
  display: flex; align-items: center; gap: 11px; padding: 13px 18px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); font-weight: 600;
  transition: .2s;
}
.chip:hover { border-color: var(--accent); transform: translateY(-2px); }
.chip .ci { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: color-mix(in srgb, var(--gold) 18%, transparent); color: var(--gold); flex: none; }
.chip .ci svg { width: 17px; height: 17px; }
/* The "this one opens a file" mark on a training chip that has a
   certificate behind it. Sized, because an ICONS.* svg has no intrinsic
   size and will otherwise take the whole row. */
.chip-go { flex: none; margin-inline-start: auto; opacity: .55; transition: opacity .2s; }
.chip-go svg { width: 17px; height: 17px; }
.chip:hover .chip-go { opacity: 1; }

/* ============================================================
   PUBLICATIONS
   ============================================================ */
.pub { display: flex; gap: 16px; align-items: flex-start; }
.pub .pn { width: 44px; height: 44px; border-radius: 12px; flex: none; display: grid; place-items: center; font-family: var(--ff-num); font-weight: 800; color: var(--on-brand); background: var(--brand-grad); }
.pub h3 { font-size: 1.02rem; font-weight: 700; line-height: 1.5; }
.pub .tag { margin-top: 8px; display: inline-flex; align-items: center; gap: 6px; font-size: .76rem; color: var(--accent); font-weight: 700; }
.pub .tag svg { width: 14px; height: 14px; }

/* ============================================================
   COMMUNITY
   ============================================================ */
.comm-card { text-align: center; }
.comm-card .ci { width: 62px; height: 62px; border-radius: 18px; margin: 0 auto 16px; display: grid; place-items: center; color: var(--on-brand); background: var(--brand-grad); }
.comm-card .ci svg { width: 30px; height: 30px; }
.comm-card h3 { font-size: 1.12rem; font-weight: 800; }
.comm-card .org { color: var(--gold); font-weight: 700; margin: 4px 0 12px; }
.comm-card p { color: var(--text-soft); font-size: .95rem; }

/* ============================================================
   CONTACT
   ============================================================ */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.contact-card { display: flex; align-items: center; gap: 16px; }
.contact-card .ci { width: 54px; height: 54px; border-radius: 15px; flex: none; display: grid; place-items: center; color: var(--on-brand); background: var(--brand-grad); }
.contact-card .ci svg { width: 26px; height: 26px; }
.contact-card small { color: var(--muted); font-size: .8rem; display: block; }
.contact-card b { font-size: 1.02rem; font-weight: 700; word-break: break-word; }
.contact-card b[dir] { unicode-bidi: plaintext; }

/* The single action at the foot of the contact page. Its own class
   rather than the old .cta-band, which was a filled panel. */
.contact-action { margin-top: 34px; }

.cta-band {
  margin-top: 40px; border-radius: var(--radius); padding: 40px; text-align: center;
  color: var(--cta-fg);
  background: var(--cta-grad);
  position: relative; overflow: hidden;
}
.cta-band::before { content: ""; position: absolute; inset: 0; background: radial-gradient(500px 240px at 80% -20%, rgba(200,162,76,.35), transparent 60%); }
.cta-band h3 { font-size: clamp(1.4rem, 3.5vw, 2rem); font-weight: 800; position: relative; }
.cta-band p { color: var(--cta-fg-soft); margin: 10px auto 22px; max-width: 520px; position: relative; }
/* The two secondary buttons on the band. Used to be inline white. */
.cta-band .btn-on-cta {
  color: var(--cta-fg); border-color: var(--cta-fg-line); background: transparent;
}
.cta-band .btn-on-cta:hover {
  color: var(--cta-fg); border-color: var(--cta-fg);
  background: color-mix(in srgb, var(--cta-fg) 12%, transparent);
}
.cta-band .btn-primary { background: var(--on-brand); color: var(--navy-900); position: relative; }
.cta-band .btn-primary:hover { background: var(--gold-soft); }

/* ============================================================
   FOOTER
   ============================================================ */
.footer { background: var(--footer-bg); color: rgba(255,255,255,.75); padding: 44px 0 30px; margin-top: 20px; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; align-items: center; }
.footer .brand .btxt { color: var(--on-brand); }
.footer .brand .btxt small { color: rgba(255,255,255,.6); }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.footer-links a { color: rgba(255,255,255,.72); font-weight: 600; font-size: .92rem; }
.footer-links a:hover { color: var(--gold-soft); }
.footer-bottom { margin-top: 26px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.12); text-align: center; font-size: .85rem; color: rgba(255,255,255,.55); }

/* ============================================================
   ROUTING / PAGE TRANSITIONS
   ============================================================ */
.page { display: none; animation: fade .45s ease; }
.page.active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* Scroll-to-top */
.to-top { position: fixed; inset-inline-end: 22px; bottom: 22px; z-index: 50; opacity: 0; visibility: hidden; transform: translateY(12px); transition: .3s; }
.to-top.show { opacity: 1; visibility: visible; transform: none; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
/* The header carries far more than the reading column does: brand + 10 links +
   3 action buttons. Measured need is ~1250px in English and ~1215px in Arabic,
   both wider than --maxw (1160px), so the nav gets its own wider track and
   slightly tighter links; below that it hands over to the drawer. */
.nav .container { max-width: 1360px; }
.nav-links a { padding: 8px 11px; font-size: .9rem; }

@media (max-width: 1300px) {
  .nav-links { display: none; }
  .burger { display: grid; }
}
/* …and the brand must hold one line instead of collapsing into a column
   when those extra links tighten the header. */
.nav .brand { flex: none; }
.nav .brand .btxt { white-space: nowrap; }
.nav .brand .btxt small {
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 26ch;
}
@media (max-width: 1420px) {
  .nav .brand .btxt small { display: none; }
}
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; gap: 34px; }
  .hero .lead { margin-inline: auto; }
  .hero-cta { justify-content: center; }
  .about-grid { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .nav-links { display: none; }
  .burger { display: grid; }
  .section { padding: 56px 0; }
  .grid-2, .grid-3, .contact-grid { grid-template-columns: 1fr; }
  .float-chip.c1 { inset-inline-start: 0; }
  .float-chip.c2 { inset-inline-end: 0; }
  .cta-band { padding: 30px 22px; }
}
@media (max-width: 420px) {
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .brand .btxt small { display: none; }
}

/* Print */
@media print {
  .nav, .to-top, .hero-cta, .drawer, .drawer-backdrop, .cta-band { display: none !important; }
  .page { display: block !important; }
  body { color: #000; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  html { scroll-behavior: auto; }
  /* Scroll reveals start at opacity 0 and are switched on by an observer.
     With motion turned off there is nothing to reveal, and making the
     content wait on JS would be a real cost for no benefit — so show it. */
  .reveal { opacity: 1; transform: none; }
}
