/* Adrees Ilyas — portfolio. Theme: a vintage document-control office.
   Kraft paper, ink navy, stamp red and amber. Night office (dark) with a desk-lamp glow.
   Static, no build step, no external requests. Fonts are local (SIL Open Font License). */

/* Fonts: woff2 subsets, declared in the vintage layer at the end of this file */

/* ---------- Tokens: day office ---------- */
:root {
  --bg: #EEE3CC;
  --paper: #FBF7EC;
  --paper-2: #F5EEDC;
  --text: #1B2A41;
  --text-2: #36405A;
  --text-3: #4C505E;
  --line: #D6C6A6;
  --line-strong: #AE9B78;
  --red: #B42318;
  --red-soft: rgba(180, 35, 24, 0.10);
  --amber: #D69A2D;
  --amber-ink: #85560A;
  --highlight: rgba(244, 196, 64, 0.55);
  --ok: #24694A;
  --btn-bg: #1B2A41;
  --btn-fg: #FBF7EC;
  --focus: #0B5FC7;
  --f1: #EDD6A3; --f2: #E8DDC0; --f3: #E3CC9E;
  --tab-shadow: rgba(80, 55, 15, 0.18);
  --desk: #1B2A41;
  --desk-fg: #F4EBDA;
  --desk-2: #C8BFAE;
  --desk-line: rgba(244, 235, 218, 0.12);
  --card-rule: rgba(60, 100, 170, 0.18);
  --card-red: rgba(190, 40, 30, 0.55);
  --map-land: #EFE4CB;
  --map-hatch: rgba(27, 42, 65, 0.16);
  --shadow-sm: 0 1px 1px rgba(70, 45, 10, 0.08), 0 2px 6px -2px rgba(70, 45, 10, 0.14);
  --shadow: 0 1px 2px rgba(70, 45, 10, 0.08), 0 12px 28px -12px rgba(70, 45, 10, 0.35);
  --shadow-lg: 0 2px 4px rgba(70, 45, 10, 0.08), 0 26px 50px -20px rgba(70, 45, 10, 0.45);
  --grain-opacity: 0.07;
  --lamp: radial-gradient(52vmax 38vmax at 84% 6%, rgba(255, 226, 170, 0.55), transparent 70%);
  --scrim: rgba(251, 247, 236, 0.86);
  --glow-1: rgba(251, 247, 236, 0.72); --glow-2: rgba(251, 247, 236, 0.4); --copy-shadow: 0 1px 2px rgba(251, 247, 236, 0.85);
  --tape-bg: #F6EEDA;
  --far-o: .4; --prop-o: .78;
  --cream-bg: #FBF7EC; --cream-fg: #1B2A41; --cream-bd: #1B2A41;
  --wa-bg: #2F5D50; --wa-fg: #F7F1E3;
  --fiber: url("../img/grain.png");
  --vignette: radial-gradient(ellipse 130% 95% at 50% 35%, transparent 52%, rgba(95, 62, 20, 0.22) 100%);
  --edge-shade: linear-gradient(90deg, rgba(90, 60, 20, 0.10), transparent 22%, transparent 78%, rgba(90, 60, 20, 0.10));
  --folder-lamp: none;
  --grid: rgba(43, 92, 158, 0.075);
  --binder-1: #23395B; --binder-2: #9E2A2B; --binder-3: #2F5D50; --binder-4: #A7671B; --binder-5: #4A5568; --binder-6: #6B4226;

  --font: "Plex", "IBM Plex Sans Arabic", "Segoe UI", system-ui, -apple-system, Roboto, "Noto Sans Arabic", Tahoma, sans-serif;
  --type: "Type", ui-monospace, "SFMono-Regular", Menlo, Consolas, "Courier New", monospace;
  --max: 1200px;
  --gutter: 16px;
  --radius: 10px;
  --header-h: 68px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}

/* ---------- Tokens: night office ---------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #14110D; --paper: #241F18; --paper-2: #2B251C;
    --text: #F3EAD7; --text-2: #D7CBB4; --text-3: #B1A58F;
    --line: #3B3226; --line-strong: #5A4C3A;
    --red: #F07466; --red-soft: rgba(240, 116, 102, 0.12);
    --amber: #EBA83E; --amber-ink: #F2B85A; --highlight: rgba(235, 168, 62, 0.35);
    --ok: #63D39C; --btn-bg: #F3EAD7; --btn-fg: #14110D; --focus: #7DB9FF;
    --f1: #2C2519; --f2: #262017; --f3: #30281B; --tab-shadow: rgba(0, 0, 0, 0.5);
    --desk: #0D0B08; --desk-fg: #F3EAD7; --desk-2: #C9BDA6; --desk-line: rgba(243, 234, 215, 0.08);
    --card-rule: rgba(140, 170, 230, 0.10); --card-red: rgba(240, 116, 102, 0.45);
    --map-land: #2B251C; --map-hatch: rgba(243, 234, 215, 0.10);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.45), 0 14px 30px -12px rgba(0, 0, 0, 0.7);
    --shadow-lg: 0 2px 4px rgba(0, 0, 0, 0.45), 0 28px 56px -20px rgba(0, 0, 0, 0.85);
    --grain-opacity: 0.09;
    --lamp: radial-gradient(56vmax 42vmax at 84% 8%, rgba(255, 186, 92, 0.26), transparent 70%);
    --scrim: rgba(14, 12, 9, 0.78); --glow-1: rgba(14, 12, 9, 0.6); --glow-2: rgba(14, 12, 9, 0.35); --copy-shadow: 0 1px 2px rgba(0, 0, 0, 0.6); --glow-1: rgba(14, 12, 9, 0.6); --glow-2: rgba(14, 12, 9, 0.35); --copy-shadow: 0 1px 2px rgba(0, 0, 0, 0.6); --tape-bg: #211C15; --far-o: .26; --prop-o: .62; --cream-bg: #F3EAD7; --cream-fg: #14110D; --cream-bd: #C9B998; --wa-bg: #2E6A55; --wa-fg: #F3EAD7;
    --fiber: url("../img/grain.png");
    --vignette: radial-gradient(ellipse 120% 90% at 30% 20%, transparent 40%, rgba(0, 0, 0, 0.55) 100%);
    --edge-shade: linear-gradient(90deg, rgba(0, 0, 0, 0.35), transparent 24%, transparent 76%, rgba(0, 0, 0, 0.35));
    --folder-lamp: radial-gradient(1100px 520px at 10% 0%, rgba(255, 186, 92, 0.10), transparent 70%);
    --grid: rgba(255, 214, 150, 0.045);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #14110D; --paper: #241F18; --paper-2: #2B251C;
  --text: #F3EAD7; --text-2: #D7CBB4; --text-3: #B1A58F;
  --line: #3B3226; --line-strong: #5A4C3A;
  --red: #F07466; --red-soft: rgba(240, 116, 102, 0.12);
  --amber: #EBA83E; --amber-ink: #F2B85A; --highlight: rgba(235, 168, 62, 0.35);
  --ok: #63D39C; --btn-bg: #F3EAD7; --btn-fg: #14110D; --focus: #7DB9FF;
  --f1: #2C2519; --f2: #262017; --f3: #30281B; --tab-shadow: rgba(0, 0, 0, 0.5);
  --desk: #0D0B08; --desk-fg: #F3EAD7; --desk-2: #C9BDA6; --desk-line: rgba(243, 234, 215, 0.08);
  --card-rule: rgba(140, 170, 230, 0.10); --card-red: rgba(240, 116, 102, 0.45);
  --map-land: #2B251C; --map-hatch: rgba(243, 234, 215, 0.10);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.45), 0 14px 30px -12px rgba(0, 0, 0, 0.7);
  --shadow-lg: 0 2px 4px rgba(0, 0, 0, 0.45), 0 28px 56px -20px rgba(0, 0, 0, 0.85);
  --grain-opacity: 0.09;
  --lamp: radial-gradient(56vmax 42vmax at 84% 8%, rgba(255, 186, 92, 0.26), transparent 70%);
  --scrim: rgba(14, 12, 9, 0.78); --tape-bg: #211C15; --far-o: .26; --prop-o: .62; --cream-bg: #F3EAD7; --cream-fg: #14110D; --cream-bd: #C9B998; --wa-bg: #2E6A55; --wa-fg: #F3EAD7;
  --fiber: url("../img/grain.png");
  --vignette: radial-gradient(ellipse 120% 90% at 30% 20%, transparent 40%, rgba(0, 0, 0, 0.55) 100%);
  --edge-shade: linear-gradient(90deg, rgba(0, 0, 0, 0.35), transparent 24%, transparent 76%, rgba(0, 0, 0, 0.35));
  --folder-lamp: radial-gradient(1100px 520px at 10% 0%, rgba(255, 186, 92, 0.10), transparent 70%);
  --grid: rgba(255, 214, 150, 0.045);
  color-scheme: dark;
}
@media (min-width: 640px) { :root { --gutter: 28px; } }
@media (min-width: 1024px) { :root { --gutter: 40px; } }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--header-h) + 56px); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0; color: var(--text); font-family: var(--font); font-size: 1.0625rem; line-height: 1.6;
  background-color: var(--bg); background-image: var(--fiber);
  overflow-x: hidden; -webkit-font-smoothing: antialiased;
}
html[lang="ar"] body { line-height: 1.75; }
body { position: relative; }
/* Lamp glow + vignette over the first screen; scrolls with the page (a fixed full-screen layer cost frames on scroll) */
body::before { content: ""; position: absolute; inset: 0 0 auto 0; height: max(100vh, 760px); z-index: -1; pointer-events: none; background-image: var(--lamp), var(--vignette);
  -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }
html[dir="rtl"] body::before { transform: scaleX(-1); }
/* Paper grain: a small tiled SVG noise in the page and folder backgrounds (no full-screen overlay to composite) */
img, svg { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; font-weight: 700; }
html[lang="ar"] :is(h1, h2, h3, h4) { line-height: 1.4; }
p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; }
::selection { background: var(--highlight); color: var(--text); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
/* Night office: the cream papers sit a little darker so they are not the loudest blocks */
:root[data-active-theme="dark"] { --slip-bg: #E9DFC8; }
/* Focus ring keeps 3:1 on the navy desk surfaces and on the cream transmittal slip */
.desk, .cert-total, .site-footer { --focus: #9CC8FF; }
.slip { --focus: #0B5FC7; }
@media (max-width: 319px) { .brand-name { display: none; } .header-actions { gap: 4px; } }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.no-js .js-only { display: none !important; }
bdi { unicode-bidi: isolate; }
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }
.nowrap { white-space: nowrap; }
.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.typed { font-family: var(--type); }
html[lang="ar"] .typed-ar-safe { font-family: var(--font); }

.skip { position: absolute; inset-inline-start: 16px; top: -100px; z-index: 100; background: var(--btn-bg); color: var(--btn-fg); padding: 10px 16px; border-radius: 8px; font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }
.icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
[dir="rtl"] .flip { transform: scaleX(-1); }

/* ---------- Rubber stamps ---------- */
.stamp {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px;
  border: 3px double currentColor; border-radius: 6px; color: var(--red);
  font-family: var(--type); font-weight: 800; font-size: .875rem; letter-spacing: .16em; text-transform: uppercase; line-height: 1;
  transform: rotate(-6deg); mix-blend-mode: multiply; opacity: .92;
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='m'><feTurbulence type='fractalNoise' baseFrequency='1.4' numOctaves='2'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 -2.2 2.1'/></filter><rect width='100%' height='100%' filter='url(%23m)'/></svg>");
  mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='m'><feTurbulence type='fractalNoise' baseFrequency='1.4' numOctaves='2'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 -2.2 2.1'/></filter><rect width='100%' height='100%' filter='url(%23m)'/></svg>");
}
:root[data-active-theme="dark"] .stamp { mix-blend-mode: normal; }
.stamp.navy { color: var(--text); }
.stamp.green { color: var(--ok); }
.stamp.amber { color: var(--amber-ink); }
html[lang="ar"] .stamp { font-family: var(--font); letter-spacing: normal; text-transform: none; font-size: 1rem; }
html[lang="ar"] .hero-scene .s-status { font-family: var(--font); }

/* ---------- Buttons ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 12px 22px; border-radius: 8px;
  font-weight: 600; font-size: 1rem; line-height: 1.2; text-decoration: none;
  border: 1.5px solid transparent; cursor: pointer;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background-color .2s ease, border-color .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--btn-bg); color: var(--btn-fg); box-shadow: 0 3px 0 0 color-mix(in srgb, var(--btn-bg) 60%, #000), var(--shadow-sm); }
.btn-red { background: var(--red); color: #fff; box-shadow: 0 3px 0 0 color-mix(in srgb, var(--red) 60%, #000), var(--shadow-sm); }
:root[data-active-theme="dark"] .btn-red { color: #14110D; }
.btn-cream { background: var(--cream-bg); color: var(--cream-fg); border-color: var(--cream-bd); box-shadow: 0 3px 0 0 var(--cream-bd), var(--shadow-sm); }
.btn-green { background: var(--wa-bg); color: var(--wa-fg); box-shadow: 0 3px 0 0 color-mix(in srgb, var(--wa-bg) 55%, #000), var(--shadow-sm); }
.btn-outline { background: transparent; color: var(--text); border-color: currentColor; }
.btn-outline:hover { background: color-mix(in srgb, var(--paper) 55%, transparent); }
.btn-ghost { background: var(--paper); color: var(--text); border-color: var(--line-strong); box-shadow: 0 2px 0 0 var(--line); }
.btn-ghost:hover { border-color: var(--text); }
.btn-sm { min-height: 44px; padding: 8px 14px; font-size: .9375rem; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 44px; padding: 0 12px; border-radius: 8px;
  background: var(--paper); border: 1.5px solid var(--line); cursor: pointer; font-weight: 600; font-size: .9375rem;
  box-shadow: 0 2px 0 0 var(--line); transition: border-color .2s ease;
}
.icon-btn:hover { border-color: var(--line-strong); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg);
  border-bottom: 3px double var(--line-strong);
}
.header-inner { display: flex; align-items: center; gap: 16px; min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; text-decoration: none; white-space: nowrap; margin-inline-end: auto; }
.brand-mark { width: 40px; height: 40px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-weight: 700; font-size: 1.0625rem; }
.brand-role { font-family: var(--type); font-size: max(var(--min14), .75rem); text-transform: uppercase; letter-spacing: .12em; color: var(--text-3); }
html[lang="ar"] .brand-role { font-family: var(--font); font-size: max(var(--min14), .8125rem); text-transform: none; }
.site-nav ul { display: flex; gap: 2px; }
.site-nav a { display: flex; align-items: center; min-height: 44px; padding: 8px 12px; border-radius: 6px; text-decoration: none; color: var(--text-2); font-weight: 500; font-size: .9375rem; }
.site-nav a:hover { color: var(--text); background: color-mix(in srgb, var(--paper) 70%, transparent); }
.site-nav a[aria-current="true"] { color: var(--text); background: var(--highlight); }
.header-actions { display: flex; align-items: center; gap: 8px; }
.theme-btn .moon { display: none; }
:root[data-active-theme="dark"] .theme-btn .sun { display: none; }
:root[data-active-theme="dark"] .theme-btn .moon { display: block; }
.menu-btn { display: none; }
.menu-btn .close { display: none; }
.site-header.open .menu-btn .open-i { display: none; }
.site-header.open .menu-btn .close { display: block; }
@media (max-width: 1099px) {
  .hide-md { display: none !important; }
  .js .menu-btn { display: inline-flex; }
  .js .site-nav { position: absolute; inset-inline: 0; top: 100%; background: var(--bg); border-bottom: 3px double var(--line-strong); box-shadow: var(--shadow-lg); display: none; }
  .js .site-header.open .site-nav { display: block; }
  .js .site-nav ul { flex-direction: column; padding: 10px var(--gutter) 18px; gap: 4px; }
  .js .site-nav a { padding: 12px 14px; font-size: 1.0625rem; }
  .js .site-nav li + li { border-top: 1px dashed var(--line-strong); }
  html:has(.site-header.open) { overflow: hidden; }
  .no-js .header-inner { flex-wrap: wrap; }
  .no-js .site-nav { order: 3; flex-basis: 100%; }
  .no-js .site-nav ul { flex-wrap: wrap; gap: 0 4px; }
}
@media (max-width: 479px) {
  .brand-role { display: none; }
  .brand-mark { width: 34px; height: 34px; }
  .header-inner { gap: 8px; }
  .header-actions { gap: 6px; }
}

/* ---------- Hero: a vintage document-control office in three layers ---------- */
/* far: blueprint sheet with the KSA map · middle: desk props at the page edges · near: the desk scene.
   The text column sits on a soft panel and nothing overlaps it. Three type sizes only: display, statement, body.
   Spacing on an 8-pt grid. Only stamps are tilted. */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  --ws: max(var(--gutter), (100% - var(--max)) / 2 + var(--gutter));
  --fs-display: clamp(2.25rem, 3vw + 1.5rem, 4rem);
  --fs-statement: clamp(1.375rem, .9vw + 1.05rem, 1.75rem);
  --fs-body: 1rem;
  --mono-ls: .12em;
}
.hero-wrap { position: relative; z-index: 3; padding-block: 40px 32px; }
.wall-left, .wall-right { display: none; }
/* ---------- The wall board: cork in a wooden frame, twine strung across, typed cards clipped on ---------- */
.hero {
  --cork: #B98A55; --cork-dot: rgba(92, 60, 24, 0.28); --cork-lite: rgba(255, 238, 200, 0.22); --frame-wood: #6B4627; --frame-edge: #4E321B;
  --twine: #E6D2A4; --card-paper: #FBF7EC; --card-ink: #1B2A41; --card-ink-2: #3D4A5F; --tab-manila: #E8CC8F; --tab-manila-2: #D7B36E;
  --memo-paper: #FFFDF6; --wywo-paper: #DCE8D6; --wywo-ink: #1E4D3E; --wywo-band: #2F5D50; --tag-kraft: #CFAE76;
  --wainscot: #DCCBA8; --cal-top: #A8322D; --desk-wood: #B9895A; --desk-wood-2: #8E623B; --desk-wood-3: #A87A4D;
}
:root[data-active-theme="dark"] .hero {
  --cork: #6E5335; --cork-dot: rgba(0, 0, 0, 0.35); --cork-lite: rgba(255, 210, 150, 0.08); --frame-wood: #3E2A17; --frame-edge: #2A1C0F;
  --twine: #B9A47A; --card-paper: #E9DFC8; --memo-paper: #EDE5D2; --wywo-paper: #C9D6C2; --tab-manila: #C9AE72; --tab-manila-2: #B0945A; --tag-kraft: #B69561;
  --wainscot: #1B160F; --desk-wood: #5E4329; --desk-wood-2: #3E2C1A; --desk-wood-3: #4E3720;
}
.board { position: relative; margin-top: 52px; pointer-events: auto; }
.board-face {
  position: relative; display: grid; gap: 10px; padding: 12px 22px 22px;
  background: radial-gradient(circle at 30% 40%, var(--cork-dot) 0 1px, transparent 1.6px) 0 0 / 7px 7px,
    radial-gradient(circle at 70% 70%, var(--cork-lite) 0 1px, transparent 1.6px) 0 0 / 9px 9px, var(--cork);
  border: 14px solid var(--frame-wood); border-radius: 4px;
  box-shadow: inset 0 0 0 2px var(--frame-edge), inset 0 6px 14px -6px rgba(0, 0, 0, 0.45), 0 22px 30px -22px rgba(30, 18, 6, 0.75);
}
:root[data-active-theme="dark"] .board-face { background-image: radial-gradient(ellipse 70% 90% at 100% 0%, rgba(255, 186, 92, 0.16), transparent 70%),
    radial-gradient(circle at 30% 40%, var(--cork-dot) 0 1px, transparent 1.6px), radial-gradient(circle at 70% 70%, var(--cork-lite) 0 1px, transparent 1.6px);
  background-size: auto, 7px 7px, 9px 9px; }
/* Section tabs stick up from the top of the board like file tabs */
.board-tabs { position: absolute; z-index: 1; bottom: calc(100% - 4px); inset-inline-start: 26px; display: flex; gap: 4px; }
.btab {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px 4px; border-radius: 8px 8px 0 0; border: 1px solid rgba(78, 50, 27, 0.45); border-bottom: 0;
  background: linear-gradient(var(--tab-manila), var(--tab-manila-2)); color: var(--card-ink); text-decoration: none;
  font-family: var(--type); font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4); transform-origin: 50% 100%; transition: transform .2s var(--ease);
}
.btab:hover, .btab:focus-visible { transform: translateY(-3px); }
html[lang="ar"] .btab { font-family: var(--font); font-size: .875rem; letter-spacing: normal; text-transform: none; }
/* Twine: a sagging string across the board, cards hang from it */
.string { position: relative; display: flex; align-items: flex-start; gap: 18px; padding-top: 16px; }
.string::before {
  content: ""; position: absolute; inset-inline: -22px; top: 2px; height: 14px; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 14' preserveAspectRatio='none'%3E%3Cpath d='M0 3Q50 13 100 3' fill='none' stroke='%2300000055' stroke-width='3' vector-effect='non-scaling-stroke'/%3E%3Cpath d='M0 2Q50 12 100 2' fill='none' stroke='%23E6D2A4' stroke-width='2' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat;
}
/* Typed cards (paper stays light in both themes, so the ink is dark: AA by construction) */
.card {
  position: relative; margin: 0; padding: 18px 16px 14px; background: var(--card-paper); color: var(--card-ink); border-radius: 2px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08), 0 10px 14px -10px rgba(30, 18, 6, 0.6); transform-origin: 50% 0;
  transition: transform .25s var(--ease);
}
a.card { display: block; text-decoration: none; }
.card:is(:hover, :focus-within) { transform: rotate(-1.2deg) translateY(-2px); }
[dir="rtl"] .card:is(:hover, :focus-within) { transform: rotate(1.2deg) translateY(-2px); }
/* Binder clip on the twine */
.bclip::before { content: ""; position: absolute; top: -12px; left: 50%; width: 28px; height: 18px; margin-left: -14px; border-radius: 2px 2px 5px 5px; background: linear-gradient(#3A3A3A, #121212); box-shadow: 0 2px 2px rgba(0, 0, 0, 0.35); }
.bclip::after { content: ""; position: absolute; top: -24px; left: 50%; width: 18px; height: 14px; margin-left: -9px; border: 2px solid #A7ADB5; border-bottom: 0; border-radius: 8px 8px 0 0; }
/* Wooden clothes-peg (luggage tag) */
.peg::before { content: ""; position: absolute; top: -16px; left: 50%; width: 10px; height: 30px; margin-left: -5px; border-radius: 3px; background: linear-gradient(90deg, #C79A62, #E3BC86 50%, #B98A55); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35); }
.card :focus-visible, a.card:focus-visible { outline: 3px solid #0B5FC7; outline-offset: 3px; }

.name-card { padding: 18px 24px 12px; background-image: linear-gradient(transparent 0 calc(100% - 1px), rgba(168, 50, 45, 0.22) 0) ; }
.nameplate { margin: 0; white-space: nowrap; font-family: "Typewriter", var(--type); font-size: clamp(2.25rem, 2.2vw + 1rem, 3.25rem); font-weight: 700; line-height: 1.05; letter-spacing: .02em; color: var(--card-ink); text-shadow: 1px 1px 0 rgba(27, 42, 65, 0.16); }
html[lang="ar"] .nameplate { font-family: var(--font); line-height: 1.25; letter-spacing: normal; }
.nameplate .ink::after { background: #B3261E; }
.eyebrow { display: block; margin-top: 8px; font-family: var(--type); font-size: max(var(--min14), .75rem); font-weight: 700; line-height: 1.5; letter-spacing: .04em; text-transform: uppercase; color: var(--card-ink-2); }
html[lang="ar"] .eyebrow { font-family: var(--font); font-size: .9375rem; font-weight: 600; text-transform: none; }
.type-on { display: inline; }
.type-on > span { white-space: nowrap; }
.caret { display: inline-block; width: .55em; height: 1.05em; margin-inline-start: 4px; vertical-align: -.18em; background: #B3261E; }
/* Ink-marker underline under the surname */
.ink { position: relative; display: inline-block; }
.ink::after { content: ""; position: absolute; inset-inline: -.02em -.04em; bottom: .02em; height: .08em; border-radius: 999px; background: var(--red); }
html[lang="ar"] .ink::after { bottom: -.12em; }
.statement { max-width: 400px; font-size: 1.375rem; font-weight: 700; line-height: 1.3; text-wrap: balance; }
html[lang="ar"] .statement { font-size: 1.3125rem; line-height: 1.45; }
.sub { max-width: 250px; padding-top: 16px; font-size: .875rem; line-height: 1.55; color: var(--card-ink-2); background-image: repeating-linear-gradient(transparent 0 23px, rgba(43, 92, 158, 0.16) 23px 24px); background-position: 0 14px; }
html[lang="ar"] .sub { max-width: 270px; line-height: 1.6; }
.sub2 { display: block; margin-top: 4px; font-weight: 700; color: var(--card-ink); }
.loc-tag { flex: none; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; padding: 10px 14px 10px 22px; background: var(--tag-kraft); font-family: var(--type); font-size: max(var(--min14), .8125rem); font-weight: 700; letter-spacing: .04em; clip-path: polygon(12px 0, 100% 0, 100% 100%, 12px 100%, 0 50%); }
[dir="rtl"] .loc-tag { padding: 10px 22px 10px 14px; clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 50%, calc(100% - 12px) 100%, 0 100%); }
html[lang="ar"] .loc-tag { font-family: var(--font); letter-spacing: normal; }
.loc-tag .icon { width: 16px; height: 16px; color: #8E1F17; }
.loc-tag.peg::before { top: -22px; }
/* Contact slips */
.contacts { align-items: stretch; }
.memo { min-width: 0; padding-top: 14px; background: var(--memo-paper); border-top: 6px solid #A8322D; }
.memo-h { display: block; font-family: var(--type); font-size: 1rem; font-weight: 700; letter-spacing: .3em; text-transform: uppercase; color: #8E1F17; }
.memo-to { display: block; margin-top: 6px; padding-bottom: 6px; border-bottom: 1px dashed rgba(27, 42, 65, 0.35); font-family: var(--type); font-size: max(var(--min14), .8125rem); font-weight: 700; overflow-wrap: anywhere; }
.memo-act { display: flex; align-items: center; gap: 6px; min-height: 32px; margin-top: 6px; font-weight: 700; font-size: .875rem; text-decoration: underline; text-decoration-color: rgba(168, 50, 45, 0.6); text-underline-offset: 3px; }
.memo-act .icon { width: 16px; height: 16px; }
.wywo { min-width: 0; padding: 0 0 6px; background: var(--wywo-paper); color: var(--wywo-ink); }
.wywo-h { padding: 12px 12px 5px; background: var(--wywo-band); color: #F7F1E3; font-family: var(--type); font-size: max(var(--min14), .75rem); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.wywo-ph { padding: 6px 12px 0; font-family: var(--type); font-size: max(var(--min14), .8125rem); font-weight: 700; }
.wywo-acts { display: flex; flex-wrap: wrap; gap: 0 12px; padding-inline: 8px; }
.wywo-acts a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding-inline: 4px; color: var(--wywo-ink); font-weight: 700; font-size: .875rem; text-decoration: underline; text-underline-offset: 3px; }
.wywo-acts .icon { width: 16px; height: 16px; }
html[lang="ar"] :is(.memo-h, .memo-to, .wywo-h, .wywo-ph, .fc-stamp) { font-family: var(--font); letter-spacing: normal; text-transform: none; }
.ticket-stack { display: grid; gap: 14px; align-content: start; }
.filecopy { min-height: 64px; padding: 14px 14px 10px; background: var(--tab-manila); }
.fc-stamp { display: inline-block; padding: 2px 8px; border: 2px solid #8E1F17; color: #8E1F17; font-family: var(--type); font-size: max(var(--min14), .8125rem); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; rotate: -4deg; }
.fc-t { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-weight: 700; font-size: .875rem; }
.fc-t .icon { width: 16px; height: 16px; }
.bizcard { display: flex !important; align-items: center; gap: 10px; min-height: 56px; padding: 10px 12px; background: #FFFFFF; border: 1px solid rgba(27, 42, 65, 0.15); }
:root[data-active-theme="dark"] .bizcard { background: #EDE7DA; }
.bc-in { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 3px; background: #1F4E79; color: #FFFFFF; font-weight: 700; font-family: var(--font); }
.bc-t { display: grid; font-weight: 700; font-size: .875rem; line-height: 1.25; }
.bc-t small { font-weight: 600; color: var(--card-ink-2); font-size: max(var(--min14), .75rem); }

/* Key numbers: tent calendars standing on the desk */
.calendars { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 28px; padding: 18px 16px 22px; pointer-events: auto;
  background: linear-gradient(var(--desk-wood) 0 70%, var(--desk-wood-2) 70% 78%, var(--desk-wood-3) 78%); border-radius: 3px; }
@media (min-width: 560px) { .calendars { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.cal { position: relative; display: flex; flex-direction: column; height: 100%; min-height: 104px; text-decoration: none; color: var(--card-ink); background: var(--card-paper); border-radius: 3px;
  box-shadow: 0 12px 12px -10px rgba(20, 12, 4, 0.75), 0 1px 0 rgba(0, 0, 0, 0.15); transform-origin: 50% 100%; transition: transform .2s var(--ease); }
.cal:hover, .cal:focus-visible { transform: translateY(-3px); }
.cal:focus-visible { outline: 3px solid #0B5FC7; outline-offset: 3px; }
/* two binding rings across the top */
.cal::before { content: ""; position: absolute; top: -5px; inset-inline: 22%; height: 10px; background: radial-gradient(circle, #2A2A2A 0 3px, transparent 3.5px) 0 0 / 50% 100% repeat-x; }
.cal-top { display: grid; place-items: center; min-height: 40px; padding: 8px 6px 4px; border-radius: 3px 3px 0 0; background: var(--cal-top); color: #FBF7EC; text-align: center;
  font-family: var(--type); font-size: max(var(--min14), .6875rem); font-weight: 700; line-height: 1.2; letter-spacing: .06em; text-transform: uppercase; }
html[lang="ar"] .cal-top { font-family: var(--font); font-size: max(var(--min14), .8125rem); letter-spacing: normal; text-transform: none; }
.cal-page { flex: 1; display: grid; place-items: center; padding: 6px 4px 8px; perspective: 300px; background-image: linear-gradient(transparent calc(100% - 3px), rgba(0, 0, 0, 0.06) 0); }
.cal-num { display: block; font-family: "Typewriter", var(--type); font-size: 2.25rem; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; direction: ltr; transform-origin: 50% 0; }
.cal-num .plus { color: #B3261E; }
.cal-num.flip { animation: page-flip .16s ease-in-out 6; }
@keyframes page-flip { 50% { transform: rotateX(70deg); } }

/* Teleprinter tape: one moving line (transform only), sprocket holes along the top edge */
.tape {
  position: relative; z-index: 3; height: 50px; overflow: hidden; border-block: 1px solid var(--line-strong);
  background: radial-gradient(circle at 8px 6px, var(--bg) 0 2.5px, transparent 3px) 0 0 / 16px 12px repeat-x, var(--tape-bg);
}
.tape-track { display: flex; width: max-content; padding-top: 12px; }
.tape ul { display: flex; flex: none; }
.tape li { padding-inline: 16px; font-family: var(--type); font-size: var(--fs-body); font-weight: 700; line-height: 36px; letter-spacing: var(--mono-ls); text-transform: uppercase; white-space: nowrap; color: var(--text); }
.tape li::after { content: "·"; margin-inline-start: 32px; color: var(--red); }

/* Near layer: the desk scene. Under the text on small screens, a full-height panel on wide ones. */
.hero-scene { position: relative; z-index: 1; margin: 8px 0 0; }
.desk-band { display: none; }
@media (min-width: 1100px) { .desk-band { display: block; } }
.hero-scene .ill { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; border-radius: 0; }
/* tablets: tall enough to show the whole wall (certificate, wall phone) above the desk */
@media (min-width: 640px) { .hero-scene .ill { aspect-ratio: 10 / 9; } }
@media (max-width: 639px) { .hero-scene .bot-layer.ill { aspect-ratio: auto; } }
.hero .stamp { mix-blend-mode: normal; }
.hero-scene .stamp { position: absolute; background: color-mix(in srgb, var(--paper) 72%, transparent); font-size: var(--fs-body); letter-spacing: var(--mono-ls); }
.hero-scene .s-status { inset-inline-end: 6%; bottom: 5%; }

/* Middle and far layers: only where there is room beside the text */
.props { display: none; }
@media (min-width: 1100px) {
  /* Scene units: the desk scene is 640 x 800 units, scaled to the hero height. The board and the scene share
     the header's content edges (--wsc); the board ends 40 px before the computer (scene x 170 = 470 units from its far edge). */
  .hero { height: clamp(780px, calc(100svh - var(--header-h)), 830px); container-type: size;
    --wsc: max(var(--gutter), calc((100cqw - var(--max)) / 2 + var(--gutter)));
    /* px per scene unit: fills the hero height, but shrinks on narrow desktops so the board keeps >= 640 px */
    --s: min(calc((100cqh - 50px) / 800), calc((100cqw - 2 * var(--wsc) - 680px) / 470));
    --bw: min(700px, calc(100cqw - 2 * var(--wsc) - 470 * var(--s) - 40px)); }
  .hero-wrap { position: absolute; inset: 0 0 50px; padding: 0; }
  /* left wall (window with blinds, clock, wall calendar, coat hook, plant): ends under the board's frame */
  .wall-left { display: block; position: absolute; bottom: 0; width: calc(var(--s) * 600); height: calc(var(--s) * 600); aspect-ratio: auto; border-radius: 0; inset-inline-end: calc(100% - var(--gutter) - 24px); pointer-events: none; }
  .wall-right { display: block; position: absolute; bottom: 0; width: calc(var(--s) * 500); height: calc(var(--s) * 600); aspect-ratio: auto; border-radius: 0; inset-inline-start: calc(100% - var(--gutter)); pointer-events: none; }
  html[dir="rtl"] :is(.wall-left, .wall-right) { transform: scaleX(-1); }
  .board { position: absolute; top: clamp(12px, 1.5cqh, 32px); inset-inline-start: var(--gutter); width: var(--bw); margin: 0; }
  .calendars { position: absolute; margin: 0; padding: 0; background: none; inset-inline-start: var(--gutter); bottom: calc(var(--s) * 40); width: min(560px, calc(var(--bw) - 20px)); gap: 18px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .tape { position: absolute; inset-inline: 0; bottom: 0; }
  /* desk (scene y 292-400) and the wainscot above it (y 230-292) run the full width behind everything */
  .desk-band { position: absolute; z-index: -1; bottom: 0; height: calc(var(--s) * 170); inset-inline: -100vw;
    background: linear-gradient(var(--desk-wood-2) 0 2.94%, var(--wainscot) 2.94% 36.47%, var(--desk-wood) 36.47% 69.41%, var(--desk-wood-2) 69.41% 76.47%, var(--desk-wood-3) 76.47%); }
  .hero-scene { position: absolute; margin: 0; top: auto; bottom: 50px; inset-inline-start: auto; inset-inline-end: var(--wsc); width: calc(var(--s) * 640); height: calc(var(--s) * 800); }
  /* the scene's wall is the page itself, so a scene shorter than the hero has no top edge */
  .hero-scene .ill .wall { fill: none; }
  html[lang="ar"] .board .statement { font-size: 1.25rem; }
  /* desk kept clear for the computer and the robot: the status stamp hangs on the wall; the window is behind the board */
  .hero-scene .ill .win, .ghost.g-approved { display: none; }
  /* the wall above the desk is spread out: certificate and clock high, shelf, then blueprint and phone */
  /* scene units: top row on one line (y -330): certificate x 160-296, clock x 318-414 (96 across), box shelf x 450-632;
     the blueprint centred below; the wall phone at the right edge, beside the window */
  .hero-scene .ill .hot[href="#certifications"] { transform: translate(-23px, -184px); }
  .hero-scene .ill .shelf { transform: translate(47px, -262px) scale(.85); }
  /* Fade only the static scene into the page (rasterised once); the animated bot layer sits outside the mask */
  .hero-scene .ill .desk-top { display: none; }
  .hero-scene .ill { position: absolute; inset: 0; width: 100%; height: 100%; aspect-ratio: auto; }

  .props { display: block; position: absolute; inset: 0; z-index: 2; pointer-events: none; }
  .prop, .ghost { position: absolute; display: block; height: auto; opacity: var(--prop-o); }
  /* far left edge, kept clear of the text column (it starts at --ws) */
  .p-far { z-index: -1; inset-inline-start: -90px; top: 18%; width: min(460px, calc(var(--ws) + 40px)); rotate: -2deg; --z: .25; opacity: var(--far-o); }
  .p-cabinet { inset-inline-start: -52px; top: 4%; width: 100px; height: 92%; --z: .3; }
  .p-sheet { inset-inline-start: 56px; top: 6%; width: 140px; rotate: -3deg; --z: .6; }
  .p-phone { inset-inline-start: calc(var(--ws) - 190px); top: 30%; width: 130px; --z: 1; }
  .p-slip { inset-inline-start: 48px; top: 50%; width: 150px; rotate: 3deg; --z: .9; }
  .p-ring { inset-inline-start: 150px; top: 47%; width: 84px; --z: .9; }
  .p-stapler { inset-inline-start: 112px; bottom: 26%; width: 110px; rotate: 2deg; --z: 1.1; }
  .p-folders { inset-inline-start: 16px; bottom: 7%; width: min(210px, calc(var(--ws) - 72px)); rotate: -2deg; --z: .55; }
  /* scene side, right of the text panel */
  .p-note, .p-roll { display: none; }
  .ghost { opacity: .16; font-size: var(--fs-statement); }
  .ghost::before { content: attr(data-label); } /* decorative text kept out of the DOM text */
  :root[data-active-theme="dark"] .ghost { opacity: .2; }
  .g-approved { inset-inline-start: calc(var(--ws) + 800px); top: 4%; rotate: -8deg; --z: .7; }
  .g-rev { inset-inline-start: 24px; top: 1%; rotate: -8deg; --z: .7; }
  html[lang="ar"] .ghost { font-family: var(--type); text-transform: uppercase; }
}
/* Gutter too narrow for the left props: keep only what fits */
@media (min-width: 1100px) { .p-far, .p-cabinet, .p-sheet, .p-phone, .p-slip, .p-ring, .p-stapler, .p-folders, .g-rev { display: none; } }
@media (min-width: 1400px) and (max-width: 1599px) { .p-sheet, .p-phone, .p-slip, .p-ring, .p-stapler { display: none; } }
@media (min-width: 1600px) and (max-width: 1699px) { .p-ring, .p-stapler { display: none; } }

@media (prefers-reduced-motion: no-preference) {
  .js .rise { opacity: 0; translate: 0 16px; animation: rise .8s var(--ease) forwards; animation-delay: calc(var(--d, 0) * 90ms + 60ms); }
  .js .stamp-in { animation: thump .5s cubic-bezier(.3, 1.6, .5, 1) both; animation-delay: calc(var(--d, 0) * 150ms + 900ms); }
  @keyframes rise { to { opacity: 1; translate: none; } }
  @keyframes thump { from { opacity: 0; transform: scale(1.8) rotate(-12deg); } to { opacity: .92; } }
  /* Eyebrow types in word by word (opacity only), then a blinking caret */
  .js .type-on > span { opacity: 0; animation: word-in .01s steps(1) forwards; animation-delay: .5s; }
  .js .type-on > span:nth-child(2) { animation-delay: .72s; } .js .type-on > span:nth-child(3) { animation-delay: .94s; }
  .js .type-on > span:nth-child(4) { animation-delay: 1.16s; } .js .type-on > span:nth-child(5) { animation-delay: 1.38s; }
  .js .type-on > span:nth-child(6) { animation-delay: 1.6s; } .js .type-on > span:nth-child(n+7) { animation-delay: 1.82s; }
  @keyframes word-in { to { opacity: 1; } }
  .js .caret { opacity: 0; animation: caret 1.05s steps(1) 2s infinite; }
  .tape-track { animation: tape-run 70s linear infinite; will-change: transform; }
  html[dir="rtl"] .tape-track { animation-name: tape-run-rtl; }
  .tape:hover .tape-track { animation-play-state: paused; }
  .hero.is-off .caret, .hero.is-off .tape-track { animation-play-state: paused; }
  @keyframes tape-run { to { transform: translateX(-50%); } }
  @keyframes tape-run-rtl { to { transform: translateX(50%); } }
  @keyframes caret { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
}

/* ---------- Sections are folders in a stack ---------- */
.folder { position: relative; margin-top: 58px; background-color: var(--f1); background-image: var(--folder-lamp), var(--edge-shade), var(--fiber); box-shadow: 0 -10px 22px -14px var(--tab-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.25); }
.folder.f2 { background-color: var(--f2); }
.folder.f3 { background-color: var(--f3); }
.folder-tab {
  position: absolute; top: -46px; height: 47px; inset-inline-start: calc(max(var(--gutter), (100% - var(--max)) / 2 + var(--gutter)) + var(--tab-x, 0px));
  display: inline-flex; align-items: center; gap: 12px; padding: 0 26px;
  background-color: inherit; background-image: var(--fiber); border-radius: 12px 12px 0 0;
  font-family: var(--type); font-weight: 700; font-size: .875rem; letter-spacing: .16em; text-transform: uppercase; color: var(--text);
  box-shadow: 0 -6px 14px -8px var(--tab-shadow);
}
.folder-tab .no { color: var(--red); }
.folder.f3 .folder-tab .no { color: color-mix(in srgb, var(--red) 85%, var(--text)); }
.folder.desk .folder-tab .no { color: #F07466; }
html[lang="ar"] .folder-tab { font-family: var(--font); letter-spacing: normal; text-transform: none; font-size: 1rem; }
.folder-tab .label-paper { background: var(--paper); padding: 4px 10px; border-radius: 3px; box-shadow: inset 0 0 0 1px var(--line); }
@media (min-width: 640px) {
  .folder.t2 .folder-tab { --tab-x: 14%; } .folder.t3 .folder-tab { --tab-x: 28%; } .folder.t4 .folder-tab { --tab-x: 42%; } .folder.t5 .folder-tab { --tab-x: 56%; }
}
.folder > .wrap { padding-block: 56px 72px; }
@media (min-width: 1024px) { .folder > .wrap { padding-block: 72px 96px; } }
.section-head { margin-bottom: 36px; max-width: 820px; }
.section-head h2 { font-size: clamp(2rem, 2.6vw + 1.1rem, 3.25rem); line-height: 1.06; }
html[lang="en"] .section-head h2 { letter-spacing: -0.025em; }
html[lang="ar"] .section-head h2 { line-height: 1.35; font-size: clamp(1.875rem, 2.2vw + 1rem, 2.75rem); }
.hl { background: linear-gradient(transparent 60%, var(--highlight) 60%, var(--highlight) 94%, transparent 94%); -webkit-box-decoration-break: clone; box-decoration-break: clone; }

/* Paper sheets and clips */
.paper { position: relative; background: var(--paper); border-radius: 3px; box-shadow: var(--shadow); }
.paper.lift { transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.paper.lift:hover { transform: translateY(-4px) rotate(-.3deg); box-shadow: var(--shadow-lg); }
.clip { position: absolute; top: -18px; inset-inline-end: 28px; width: 22px; height: 54px; color: #8C939E; pointer-events: none; }
.clip path { fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
:root[data-active-theme="dark"] .clip { color: #9AA1AA; }

/* Profile: personnel file */
.profile-grid { display: grid; gap: 40px; }
@media (min-width: 1024px) { .profile-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 56px; align-items: start; } }
.about { font-size: clamp(1.25rem, .9vw + 1rem, 1.5625rem); line-height: 1.6; }
.titleblock { background: var(--paper); border: 2px solid var(--text); border-radius: 2px; box-shadow: 8px 8px 0 0 var(--line-strong); position: relative; }
[dir="rtl"] .titleblock { box-shadow: -8px 8px 0 0 var(--line-strong); }
.tb-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 2px solid var(--text); font-family: var(--type); font-size: max(var(--min14), .75rem); font-weight: 700; text-transform: uppercase; letter-spacing: .14em; }
html[lang="ar"] .tb-head > span:first-child { font-family: var(--font); text-transform: none; letter-spacing: normal; font-size: .9375rem; }
.tb-rev { color: var(--text-3); white-space: nowrap; direction: ltr; }
.tb-grid > div { padding: 12px 16px 14px; border-bottom: 1px solid var(--line); min-width: 0; }
@media (min-width: 720px) { .tb-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); } .tb-grid > div:nth-child(odd):not(.wide) { border-inline-end: 1px solid var(--line); } .tb-grid > .wide { grid-column: 1 / -1; } }
.tb-grid > div:last-child { border-bottom: 0; padding-bottom: 40px; }
.tb-grid dt { font-family: var(--type); font-size: max(var(--min14), .75rem); font-weight: 600; text-transform: uppercase; letter-spacing: .12em; color: var(--text-3); }
html[lang="ar"] .tb-grid dt { font-family: var(--font); text-transform: none; letter-spacing: normal; font-size: max(var(--min14), .8125rem); }
.tb-grid dd { margin-top: 4px; font-weight: 600; }
.tb-roles { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.tb-roles li { padding: 3px 10px; background: var(--highlight); font-weight: 600; font-size: .9375rem; border-radius: 2px; }
.titleblock .stamp { position: absolute; inset-inline-end: 18px; bottom: -16px; background: var(--paper); }

/* Projects: wall map + index-card drawer */
.projects-top { display: grid; gap: 28px; margin-bottom: 48px; }
@media (min-width: 1024px) { .projects-top { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: start; gap: 40px; } }
.pinned { position: relative; padding: 14px 14px 10px; }
.pushpin { position: absolute; top: -9px; width: 18px; height: 18px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #F08A80, var(--red) 55%, #6E1610); box-shadow: 0 3px 4px rgba(0, 0, 0, 0.3); }
.pushpin.p1 { left: 18px; } .pushpin.p2 { right: 18px; }
.map-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 12px; padding: 4px 4px 8px; border-bottom: 1px solid var(--line); font-family: var(--type); font-size: max(var(--min14), .6875rem); letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); }
.map-head b { color: var(--text); }
html[lang="ar"] .map-head { font-family: var(--font); letter-spacing: normal; text-transform: none; font-size: max(var(--min14), .8125rem); }
.ksa-map { width: 100%; height: auto; margin-top: 6px; direction: ltr; }
.ksa-map .grat { stroke: var(--line-strong); stroke-width: .5; stroke-dasharray: 2 3; fill: none; opacity: .7; }
.ksa-map .grat-l { font-family: var(--type); font-size: 7px; fill: var(--text-3); }
.ksa-map .land { fill: var(--map-land); }
.ksa-map .hatch { fill: url(#ksa-hatch); }
.ksa-map .hatch-line { stroke: var(--map-hatch); stroke-width: 1; }
.ksa-map .coast { fill: none; stroke: var(--text); stroke-width: 1.3; stroke-linejoin: round; }
.ksa-map .north path { fill: var(--text); }
.ksa-map .north text { font-family: var(--type); font-size: 8px; font-weight: 700; fill: var(--text); }
.pin .shadow { fill: rgba(0, 0, 0, 0.25); }
.pin .head { fill: var(--red); stroke: var(--paper); stroke-width: 1.2; }
.pin.is-base .head { fill: var(--text); }
.pin.is-now .head { fill: var(--ok); }
.pin .ring { fill: none; stroke: var(--red); stroke-width: 1; opacity: 0; transform-box: fill-box; transform-origin: center; }
.pin-label { font-size: 8.5px; font-weight: 600; fill: var(--text); paint-order: stroke; stroke: var(--paper); stroke-width: 3px; stroke-linejoin: round; }
.pin-label.ar { display: none; font-size: 9.5px; }
html[lang="ar"] .pin-label.en { display: none; }
html[lang="ar"] .pin-label.ar { display: inline; }
.pin.hot .ring { opacity: .8; }
@media (max-width: 1100px) { .pin-label { font-size: 10.5px; } .pin-label.ar { font-size: 11px; } }
@media (max-width: 639px) { .pin-label { display: none; } html[lang="ar"] .pin-label.ar { display: none; } .ksa-map .grat-l { display: none; } }
@media (prefers-reduced-motion: no-preference) {
  .js .ksa-map .coast { stroke-dasharray: 1; stroke-dashoffset: 1; }
  .js .ksa-map.in .coast { animation: draw 2.4s var(--ease) forwards; }
  .js .ksa-map .pin { opacity: 0; }
  .js .ksa-map.in .pin { animation: drop .45s cubic-bezier(.3, 1.5, .5, 1) forwards; animation-delay: calc(1.1s + var(--i) * 110ms); }
  /* Pin rings: two pulses when the map first appears, then only on legend hover (no idle animation) */
  .js .ksa-map.in .pin .ring { animation: ring 2.8s ease-out 2; animation-delay: calc(1.6s + var(--i) * 280ms); }
  .js .ksa-map.in .pin.hot .ring, .pin.hot .ring { animation: ring 1.4s ease-out infinite; animation-delay: 0s; }
  @keyframes draw { to { stroke-dashoffset: 0; } }
  @keyframes drop { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
  @keyframes ring { 0% { opacity: .7; transform: scale(1); } 100% { opacity: 0; transform: scale(2.6); } }
}
.pin:nth-of-type(1) { --i: 0; } .pin:nth-of-type(2) { --i: 1; } .pin:nth-of-type(3) { --i: 2; } .pin:nth-of-type(4) { --i: 3; } .pin:nth-of-type(5) { --i: 4; } .pin:nth-of-type(6) { --i: 5; } .pin:nth-of-type(7) { --i: 6; } .pin:nth-of-type(8) { --i: 7; } .pin:nth-of-type(9) { --i: 8; }
.map-legend { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; padding: 8px 0 4px; border-top: 1px dashed var(--line); margin-top: 6px; }
@media (min-width: 640px) { .map-legend { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.map-legend a { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 4px 6px; border-radius: 4px; text-decoration: none; font-size: max(var(--min14), .8125rem); font-weight: 600; color: var(--text-2); line-height: 1.3; }
.map-legend a:hover, .map-legend a:focus-visible { background: var(--highlight); color: var(--text); }
@media (min-width: 1024px) { .map-legend { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 20px; } }
.ksa-map .pin { cursor: pointer; }
.ksa-map .pin .hit { fill: transparent; }
.lg-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--red); flex: none; }
.lg-dot.is-base { background: var(--text); }
.lg-dot.is-now { background: var(--ok); }
.drawer-art { position: relative; }
.drawer-art img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 3px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.chip { display: inline-flex; align-items: center; min-height: 44px; padding: 6px 14px; text-decoration: none; font-family: var(--type); font-size: max(var(--min14), .8125rem); font-weight: 700; letter-spacing: .06em; background: var(--paper); border: 1px solid var(--line-strong); border-radius: 3px; box-shadow: 0 2px 0 0 var(--line); transition: transform .2s var(--ease), border-color .2s ease; }
html[lang="ar"] .chip { font-family: var(--font); font-size: .9375rem; letter-spacing: normal; }
.chip:hover { transform: translateY(-2px); border-color: var(--red); }

/* The drawer front */
.drawer-front {
  display: flex; align-items: center; justify-content: center; gap: 28px; padding: 18px; margin-bottom: 28px; border-radius: 6px;
  background: linear-gradient(180deg, #8A6A43, #6E5233); box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.18), inset 0 -3px 0 rgba(0, 0, 0, 0.25), var(--shadow);
}
:root[data-active-theme="dark"] .drawer-front { background: linear-gradient(180deg, #4A3924, #3A2C1B); }
.drawer-label { min-width: 200px; padding: 6px 16px; text-align: center; background: #F7F0DC; color: #1B2A41; border: 3px solid #C9A65A; border-radius: 3px; font-family: var(--type); font-weight: 700; font-size: max(var(--min14), .8125rem); letter-spacing: .14em; text-transform: uppercase; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1); }
html[lang="ar"] .drawer-label { font-family: var(--font); letter-spacing: normal; text-transform: none; font-size: .9375rem; }
.drawer-handle { width: 90px; height: 14px; border-radius: 0 0 40px 40px; background: linear-gradient(180deg, #E2C47A, #A9853C); box-shadow: 0 3px 4px rgba(0, 0, 0, 0.35); }
@media (max-width: 479px) { .drawer-handle { display: none; } }

.cards-wrap { position: relative; }
.cards { position: relative; display: grid; gap: 40px; }
.rail, .rail-fill { position: absolute; top: 12px; bottom: 12px; inset-inline-start: 13px; width: 3px; border-radius: 3px; }
.rail { background: linear-gradient(90deg, #8F96A0, #D7DBE0, #8F96A0); opacity: .6; }
.rail-fill { background: var(--red); transform-origin: top; opacity: .85; will-change: transform; }
.employer { position: relative; padding-inline-start: 46px; }
.employer::before { content: ""; position: absolute; inset-inline-start: 4px; top: 10px; z-index: 1; width: 21px; height: 21px; border-radius: 50%; background: var(--bg); border: 3px solid var(--line-strong); transition: border-color .4s ease; }
.employer.passed::before, .no-js .employer::before { border-color: var(--red); }
.employer.is-current::before { border-color: var(--ok); background: var(--ok); box-shadow: 0 0 0 5px color-mix(in srgb, var(--ok) 25%, transparent); }
.divider { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; padding: 8px 18px 10px; margin-bottom: 16px; background: var(--paper-2); border: 1px solid var(--line-strong); border-bottom: 0; border-radius: 8px 8px 0 0; box-shadow: 0 -2px 6px -4px var(--tab-shadow); }
.divider h3 { font-size: clamp(1.125rem, .7vw + 1rem, 1.375rem); }
.tenure { font-family: var(--type); font-size: max(var(--min14), .75rem); font-weight: 600; letter-spacing: .06em; color: var(--text-3); }
html[lang="ar"] .tenure { font-family: var(--font); font-size: .875rem; letter-spacing: normal; }
.emp-projects { display: grid; gap: 16px; }
@media (min-width: 760px) { .emp-projects.many { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.index-card {
  position: relative; padding: 0 22px 20px; scroll-margin-top: calc(var(--header-h) + 60px);
  background: var(--paper);
  border-radius: 3px; box-shadow: var(--shadow-sm); border: 1px solid var(--line);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.index-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.index-card:target, .index-card:focus { outline: none; box-shadow: 0 0 0 3px var(--red), var(--shadow); }
.card-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; min-height: 52px; padding-top: 12px; border-bottom: 2px solid var(--card-red); margin-bottom: 10px; font-size: .875rem; color: var(--text-3); }
.p-dates { font-family: var(--type); font-weight: 700; color: var(--red); font-size: max(var(--min14), .8125rem); letter-spacing: .02em; }
html[lang="ar"] .p-dates { font-family: var(--font); font-size: .9375rem; letter-spacing: normal; }
.p-place { display: inline-flex; align-items: center; gap: 4px; }
.p-place .icon { width: 16px; height: 16px; }
.badge-current { font-family: var(--type); font-size: max(var(--min14), .75rem); font-weight: 800; letter-spacing: .12em; text-transform: uppercase; padding: 2px 8px; border: 2px solid var(--ok); color: var(--ok); border-radius: 3px; transform: rotate(-3deg); }
html[lang="ar"] .badge-current { font-family: var(--font); letter-spacing: normal; font-size: max(var(--min14), .8125rem); }
.index-card h4 { font-size: 1.125rem; line-height: 1.4; }
.p-role { margin-top: 2px; font-weight: 600; color: var(--text-2); font-size: .96875rem; }
.p-work { margin-top: 8px; color: var(--text-2); font-size: .96875rem; }
.mini-label { font-family: var(--type); font-size: max(var(--min14), .75rem); font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--text-3); }
html[lang="ar"] .mini-label { font-family: var(--font); text-transform: none; letter-spacing: normal; font-size: max(var(--min14), .8125rem); }
.p-packages { margin-top: 12px; }
.p-packages ul { margin-top: 4px; display: grid; gap: 2px; font-size: .9375rem; color: var(--text-2); }
.p-packages li { position: relative; padding-inline-start: 16px; }
.p-packages li::before { content: ""; position: absolute; inset-inline-start: 0; top: .72em; width: 7px; height: 2px; background: var(--red); }
.parties { margin-top: 12px; display: grid; gap: 4px; font-size: .9375rem; }
.parties > div { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: 8px; }
.parties dt { color: var(--text-3); font-weight: 600; font-size: max(var(--min14), .8125rem); padding-top: 2px; }
.parties dd { color: var(--text-2); min-width: 0; }
.chips-sm { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.index-card { display: flex; flex-direction: column; }
.index-card .chips-sm { margin-top: auto; padding-top: 14px; }
.chips-sm li { font-family: var(--type); font-size: max(var(--min14), .75rem); font-weight: 700; padding: 3px 9px; border-radius: 2px; background: var(--highlight); color: var(--text); }
@media (max-width: 479px) {
  .parties > div { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .employer { padding-inline-start: 38px; }
  .index-card { padding: 0 16px 18px; }
  .cards { gap: 32px; }
}

/* Platforms: labelled ring binders */
.binders { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .binders { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .binders { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.binder {
  --c: var(--binder-1); position: relative; padding: 22px 20px 22px 50px; border-radius: 6px 10px 10px 6px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--c) 70%, #000) 0 34px, var(--c) 34px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), inset -2px -3px 0 rgba(0, 0, 0, 0.2), var(--shadow);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
[dir="rtl"] .binder { padding: 22px 50px 22px 20px; border-radius: 10px 6px 6px 10px; background: linear-gradient(270deg, color-mix(in srgb, var(--c) 70%, #000) 0 34px, var(--c) 34px); }
.binder:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.binder:nth-child(2) { --c: var(--binder-2); } .binder:nth-child(3) { --c: var(--binder-3); } .binder:nth-child(4) { --c: var(--binder-4); } .binder:nth-child(5) { --c: var(--binder-5); } .binder:nth-child(6) { --c: var(--binder-6); }
.binder .rings { position: absolute; inset-inline-start: 9px; top: 22px; bottom: 22px; display: flex; flex-direction: column; justify-content: space-between; }
.binder .rings i { display: block; width: 16px; height: 16px; border-radius: 50%; background: radial-gradient(circle at 40% 40%, #F4F4F4, #9AA0A8 60%, #5E636B); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4); }
.binder-label { position: relative; height: 100%; padding: 14px 16px 16px; background: var(--slip-bg, #FBF7EC); color: #1B2A41; border-radius: 3px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12), 0 1px 0 rgba(255, 255, 255, 0.3); }
.binder-label .mark { width: 40px; height: 40px; color: #1B2A41; }
.binder-label .mark svg { width: 40px; height: 40px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.binder-label h3 { margin-top: 10px; font-size: 1.0625rem; line-height: 1.35; color: #1B2A41; }
.binder-label .p-role-txt { margin-top: 2px; color: #36405A; font-size: .9375rem; }
.binder-label .used { margin-top: 8px; padding-top: 8px; border-top: 1px dashed #C9B998; font-size: .875rem; color: #4C505E; }
.binder-label .used b { color: #36405A; font-weight: 600; }
.binder .stamp { position: absolute; top: 12px; inset-inline-end: 12px; font-size: max(var(--min14), .6875rem); color: #A3261C; mix-blend-mode: multiply; padding: 4px 8px; }
html[lang="ar"] .binder .stamp { font-size: max(var(--min14), .8125rem); }

/* Expertise: clipped forms */
.forms { display: grid; gap: 22px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .forms { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .forms { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.form-sheet { padding: 26px 24px 24px; }
.form-no { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding-bottom: 10px; border-bottom: 1px solid var(--line); font-family: var(--type); font-size: max(var(--min14), .6875rem); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); }
.form-no .icon { width: 22px; height: 22px; color: var(--red); }
.form-sheet h3 { margin-top: 14px; font-size: 1.125rem; }
.form-sheet p { margin-top: 8px; color: var(--text-2); font-size: .96875rem; }
.form-sheet .check { margin-top: 14px; display: inline-flex; align-items: center; gap: 8px; font-family: var(--type); font-size: max(var(--min14), .75rem); font-weight: 700; color: var(--ok); letter-spacing: .1em; text-transform: uppercase; }
.form-sheet .check .box { width: 16px; height: 16px; border: 1.5px solid currentColor; display: grid; place-items: center; }
.form-sheet .check .icon { width: 14px; height: 14px; }
html[lang="ar"] .form-sheet .check { font-family: var(--font); letter-spacing: normal; font-size: .875rem; }

/* Certifications: stamped documents */
.cert-grid { display: grid; gap: 22px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 760px) { .cert-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.certificate { position: relative; padding: 30px 28px 28px; background: var(--paper); border-radius: 2px; box-shadow: var(--shadow); }
.certificate::before { content: ""; position: absolute; inset: 8px; border: 2px solid color-mix(in srgb, var(--amber) 70%, transparent); outline: 1px solid color-mix(in srgb, var(--amber) 45%, transparent); outline-offset: 3px; pointer-events: none; }
.certificate h3 { font-size: 1.0625rem; display: flex; align-items: center; gap: 12px; }
.seal { width: 46px; height: 46px; flex: none; color: var(--amber-ink); }
.seal svg { width: 46px; height: 46px; fill: none; stroke: currentColor; stroke-width: 1.4; }
.cert-list { margin-top: 16px; display: grid; gap: 10px; }
.cert-list li { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; font-weight: 600; }
.cert-list .icon { color: var(--ok); }
.cert-list .date { font-family: var(--type); font-weight: 500; color: var(--text-3); font-size: max(var(--min14), .8125rem); }
html[lang="ar"] .cert-list .date { font-family: var(--font); }
.certificate .stamp { position: absolute; bottom: 18px; inset-inline-end: 22px; font-size: max(var(--min14), .75rem); opacity: 1; }
@media (max-width: 559px) { .certificate:not(.cert-total) .stamp { position: static; display: block; width: fit-content; margin: 16px 0 0; margin-inline-start: auto; } }
.cert-total { background: var(--desk); color: var(--desk-fg); }
.cert-total::before { border-color: rgba(235, 168, 62, 0.45); outline-color: rgba(235, 168, 62, 0.25); }
.cert-total .big { font-size: 4.5rem; font-weight: 700; line-height: .9; color: var(--amber); direction: ltr; }
[dir="rtl"] .cert-total .big { text-align: end; }
.cert-total p { margin-top: 10px; color: var(--desk-2); }
.cert-total .btn { margin-top: 18px; color: var(--desk-fg); border-color: rgba(243, 234, 215, .4); background: transparent; box-shadow: none; }
.cert-total .btn:hover { border-color: var(--desk-fg); }
.cert-art img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 2px; }
.edu-row { margin-top: 12px; }
.edu-row .school { font-weight: 600; font-size: 1.0625rem; }
.edu-row .lvl { color: var(--text-2); }

/* Contact: transmittal slip on the desk blotter */
.folder.desk { background-color: var(--desk); color: var(--desk-fg); }
.folder.desk .folder-tab { color: var(--desk-fg); }
.folder.desk .folder-tab .label-paper { color: #1B2A41; background: #FBF7EC; }
.folder.desk .section-head h2 { color: var(--desk-fg); }
.folder.desk .hl { background: linear-gradient(transparent 84%, var(--amber) 84%, var(--amber) 94%, transparent 94%); }
.contact-text { max-width: 60ch; font-size: 1.1875rem; color: var(--desk-2); }
.slip { margin-top: 36px; max-width: 860px; background: var(--slip-bg, #FBF7EC); color: #1B2A41; padding: 26px 24px 30px; border-radius: 2px; box-shadow: 0 30px 60px -24px rgba(0, 0, 0, 0.7); position: relative; }
.slip-title { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-bottom: 10px; border-bottom: 3px double #1B2A41; font-family: var(--type); font-weight: 800; letter-spacing: .2em; text-transform: uppercase; font-size: 1rem; }
html[lang="ar"] .slip-title { font-family: var(--font); letter-spacing: normal; }
.slip-fields { margin-top: 6px; }
.slip-fields > div { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 4px 14px; padding: 10px 0; border-bottom: 1px solid #DCCFB2; }
@media (max-width: 479px) { .slip-fields > div { grid-template-columns: minmax(0, 1fr); } }
.slip-fields dt { font-family: var(--type); font-size: max(var(--min14), .75rem); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #4C505E; padding-top: 4px; }
html[lang="ar"] .slip-fields dt { font-family: var(--font); letter-spacing: normal; text-transform: none; font-size: .875rem; }
.slip-fields dd { font-weight: 600; min-width: 0; }
.slip-fields a { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: #1B2A41; text-decoration: underline; text-decoration-color: #C9B998; text-underline-offset: 4px; overflow-wrap: anywhere; }
.slip-fields a:hover { text-decoration-color: #A3261C; }
.slip-fields .icon { color: #A3261C; }
.slip .cta-row { margin-top: 22px; }
.slip .btn-primary { background: #1B2A41; color: #FBF7EC; box-shadow: 0 3px 0 0 #0B1220; }
.slip .btn-ghost { background: #FBF7EC; color: #1B2A41; border-color: #AE9B78; box-shadow: 0 2px 0 0 #D6C6A6; }
.slip .stamp { position: absolute; bottom: 34px; inset-inline-end: 26px; color: #1D5A3E; font-size: max(var(--min14), .8125rem); }
@media (max-width: 759px) { .slip .stamp { position: static; margin-top: 18px; } }

/* Footer: title block */
.site-footer { background-color: var(--desk); background-image: var(--edge-shade); color: var(--desk-2); font-size: .875rem; padding-bottom: 24px; }
@media (max-width: 759px) { .footer-grid > *:last-child { grid-column: 1 / -1; border-inline-end: 0; } }
.footer-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid var(--desk-line); }
.footer-grid > * { padding: 12px 16px; border-inline-end: 1px solid var(--desk-line); border-bottom: 1px solid var(--desk-line); min-width: 0; }
.footer-grid > *:nth-child(2n) { border-inline-end: 0; }
@media (min-width: 900px) {
  .footer-grid { grid-template-columns: 1.2fr 1.5fr 1fr .8fr auto; }
  .footer-grid > * { border-bottom: 0; border-inline-end: 1px solid var(--desk-line); }
  .footer-grid > *:nth-child(2n) { border-inline-end: 1px solid var(--desk-line); }
  .footer-grid > *:last-child { border-inline-end: 0; }
}
.footer-grid small { display: block; font-family: var(--type); font-size: max(var(--min14), .75rem); letter-spacing: .14em; text-transform: uppercase; margin-bottom: 2px; opacity: .85; }
html[lang="ar"] .footer-grid small { font-family: var(--font); letter-spacing: normal; font-size: max(var(--min14), .75rem); text-transform: none; }
.footer-grid b { color: var(--desk-fg); font-weight: 600; }
.site-footer a { color: var(--desk-fg); font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; }
.site-footer a:hover { text-decoration: underline; }

/* Arabic: never track connected script */
html[lang="ar"] body, html[lang="ar"] * { letter-spacing: normal !important; }

/* ---------- Scroll reveal (JS + motion OK only) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
  .js .reveal.in { opacity: 1; transform: none; }
  .js .reveal.d1 { transition-delay: 80ms; } .js .reveal.d2 { transition-delay: 160ms; } .js .reveal.d3 { transition-delay: 240ms; }
}

@media print {
  .site-header, .skip, .cta-row, .props, .hero-scene { display: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
}

/* Delay steps (no inline styles, so a strict CSP works) */
.d1 { --d: 1; } .d2 { --d: 2; } .d3 { --d: 3; } .d4 { --d: 4; } .d5 { --d: 5; } .d6 { --d: 6; }
/* Brand mark */
.bm-bg { fill: var(--text); } .bm-back { fill: var(--amber); } .bm-doc { fill: var(--paper); } .bm-front { fill: color-mix(in srgb, var(--amber) 80%, #fff); } .bm-line { stroke: var(--text); stroke-width: 1.6; stroke-linecap: round; }

/* ---------- Hand-made desk illustration (day / night via tokens) ---------- */
.ill, .props {
  --wall: #E9DCC0; --wall-2: #DCCBA8; --frame: #8A6A43; --sky: #CFE3EA; --sky-2: #EEF4F2; --moon-o: 0;
  --wood: #B9895A; --wood-2: #8E623B; --wood-3: #A87A4D; --metal: #A3AAB3; --metal-2: #858C96; --metal-3: #6C727C;
  --beige: #E7DCC3; --beige-2: #CDBF9F; --beige-3: #B3A47F; --screen: #1F2B23; --phos: #8EE6A8;
  --manila: #E8CC8F; --manila-2: #D2AE63; --ill-red: #B42318; --ill-navy: #23395B; --ill-green: #2F5D50; --ill-amber: #D69A2D;
  --ill-paper: #FBF7EC; --bp: #2B5C9E; --bp-line: #D4E4F7; --ill-shadow: rgba(60, 40, 10, 0.18); --glow: #FFE2A1; --glow-o: .25; --screen-o: 0;
  --note: #F2D16B; --note-2: #D9B444; --stain: rgba(120, 72, 22, 0.22); --bp-sheet: rgba(43, 92, 158, 0.07); --bp-grid: rgba(43, 92, 158, 0.16); --bp-coast: rgba(27, 42, 65, 0.55);
}
.ill { width: 100%; height: auto; aspect-ratio: 16 / 10; border-radius: 2px; }
:root[data-active-theme="dark"] :is(.ill, .props) {
  --wall: #221C14; --wall-2: #1B160F; --frame: #4A3924; --sky: #0E1729; --sky-2: #1B2B47; --moon-o: 1;
  --wood: #5E4329; --wood-2: #3E2C1A; --wood-3: #4E3720; --metal: #4F5660; --metal-2: #3F454E; --metal-3: #30353C;
  --beige: #9C9179; --beige-2: #7D7360; --beige-3: #645B4A; --screen: #0C1610; --phos: #74FFA6;
  --manila: #9C8456; --manila-2: #7E6A43; --ill-paper: #D8CFB8; --bp: #1F4377; --bp-line: #8FB0D8;
  --ill-shadow: rgba(0, 0, 0, 0.45); --glow: #FFC970; --glow-o: .85; --screen-o: .5;
  --note: #B89B45; --note-2: #9A8036; --stain: rgba(255, 210, 150, 0.12); --bp-sheet: rgba(120, 160, 230, 0.06); --bp-grid: rgba(140, 170, 230, 0.12); --bp-coast: rgba(243, 234, 215, 0.45);
}
:is(.ill, .props) .wall { fill: var(--wall); } :is(.ill, .props) .wall-2 { fill: var(--wall-2); } :is(.ill, .props) .frame { fill: var(--frame); }
:is(.ill, .props) .sky { fill: var(--sky); } :is(.ill, .props) .sky-2 { fill: var(--sky-2); } :is(.ill, .props) .moon { fill: #F3E9C9; opacity: var(--moon-o); }
:is(.ill, .props) .wood { fill: var(--wood); } :is(.ill, .props) .wood-2 { fill: var(--wood-2); } :is(.ill, .props) .wood-3 { fill: var(--wood-3); }
:is(.ill, .props) .metal { fill: var(--metal); } :is(.ill, .props) .metal-2 { fill: var(--metal-2); } :is(.ill, .props) .metal-3 { fill: var(--metal-3); }
:is(.ill, .props) .beige { fill: var(--beige); } :is(.ill, .props) .beige-2 { fill: var(--beige-2); } :is(.ill, .props) .beige-3 { fill: var(--beige-3); }
:is(.ill, .props) .screen { fill: var(--screen); } :is(.ill, .props) .phos { stroke: var(--phos); stroke-width: 3; stroke-linecap: round; }
:is(.ill, .props) .manila { fill: var(--manila); } :is(.ill, .props) .manila-2 { fill: var(--manila-2); }
:is(.ill, .props) .red { fill: var(--ill-red); } :is(.ill, .props) .navy { fill: var(--ill-navy); } :is(.ill, .props) .green { fill: var(--ill-green); } :is(.ill, .props) .amber { fill: var(--ill-amber); }
:is(.ill, .props) .paper { fill: var(--ill-paper); } :is(.ill, .props) .bp { fill: var(--bp); } :is(.ill, .props) .bp-line { stroke: var(--bp-line); stroke-width: 1.2; fill: none; }
:is(.ill, .props) .ink-line { stroke: var(--ill-navy); stroke-width: 1.4; stroke-linecap: round; opacity: .55; }
:is(.ill, .props) .stamp-mark { fill: none; stroke: var(--ill-red); stroke-width: 2.2; opacity: .8; }
:is(.ill, .props) .shadow { fill: var(--ill-shadow); }
:is(.ill, .props) .label { fill: var(--ill-paper); }
:is(.ill, .props) .glow-stop { stop-color: var(--glow); }
:is(.ill, .props) .glow { opacity: var(--glow-o); }
:is(.ill, .props) .screen-glow { opacity: var(--screen-o); }
:is(.ill, .props) .clip-wire { fill: none; stroke: #9AA1AA; stroke-width: 1.6; stroke-linecap: round; }
:is(.ill, .props) .phos-fill { fill: var(--phos); }
:is(.ill, .props) .arm { fill: none; stroke: var(--metal-3); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }

/* Contact: words on the left, the slip on the right */
@media (min-width: 1024px) {
  .contact-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 56px; align-items: start; }
  .contact-grid .slip { margin-top: 0; }
}

/* Desk props (SVG text stays left-to-right inside an Arabic page) */
:is(.ill, .props) text { direction: ltr; }
:is(.ill, .props) .ink-hand { fill: none; stroke: var(--ill-navy); stroke-width: 2.4; stroke-linecap: round; }
.props .note { fill: var(--note); } .props .note-fold { fill: var(--note-2); }
.props .note-t { font-family: var(--type); font-weight: 800; font-size: 17px; fill: #1B2A41; }
.props .note-line { fill: none; stroke: var(--ill-red); stroke-width: 2; stroke-linecap: round; }
.props .slip-t { font-family: var(--type); font-weight: 800; font-size: 13px; letter-spacing: .2em; fill: var(--ill-navy); }
.props .rule-red { stroke: var(--ill-red); stroke-width: 2; }
.props .box { fill: none; stroke: var(--ill-navy); stroke-width: 1.4; opacity: .7; }
.props .tick { fill: none; stroke: var(--ill-green); stroke-width: 2; stroke-linecap: round; }
.props .stain { fill: none; stroke: var(--stain); stroke-width: 7; }
.props .stain.thin { stroke-width: 3; }
.props .bp-sheet { fill: var(--bp-sheet); }
.props .bp-grid { fill: none; stroke: var(--bp-grid); stroke-width: 1; }
.props .bp-coast { fill: none; stroke: var(--bp-coast); stroke-width: 2; stroke-dasharray: 6 4; }
.props .bp-end { fill: color-mix(in srgb, var(--bp) 70%, #000); }

/* The text row spans the wrap; let pointer events through to the desk bot except on the text itself */
.hero-wrap { pointer-events: none; }
.board, .calendars { pointer-events: auto; }

/* Desk bot: a little computer-headed helper at the desk, coding at the CRT with its back to us.
   It lives in its own overlay <svg class="ill bot-layer"> on top of the desk scene, so its repaints never
   touch the big scene. Uses the .ill colour tokens (day and night office). Transform and opacity only. */
.hero-scene .bot-layer.ill { position: absolute; inset: 0; width: 100%; height: 100%; aspect-ratio: auto; pointer-events: none; will-change: transform; }
.bot-layer .bot { pointer-events: none; --bot-glyph: var(--ill-green); }
.bot-layer .bot-hit { pointer-events: all; fill: none; }
:root[data-active-theme="dark"] .bot { --bot-glyph: var(--phos); }
.bot text { direction: ltr; }
.bot .bot-shell { fill: var(--beige); stroke: var(--ill-navy); stroke-width: 3; }
.bot .bot-panel { fill: var(--beige-2); stroke: var(--ill-navy); stroke-width: 1.6; }
.bot .bot-vent { fill: none; stroke: var(--ill-navy); stroke-width: 2.4; stroke-linecap: round; }
.bot .bot-screw { fill: var(--beige-3); stroke: var(--ill-navy); stroke-width: 1.2; }
.bot .bot-led.r { fill: var(--ill-red); } .bot .bot-led.a { fill: var(--ill-amber); } .bot .bot-led.g { fill: var(--phos); }
.bot .bot-foot { fill: var(--beige-3); stroke: var(--ill-navy); stroke-width: 2.4; }
.bot .bot-shadow { fill: var(--ill-shadow); }
.bot .bot-limb-o { fill: none; stroke: var(--ill-navy); stroke-width: 9.6; stroke-linecap: round; }
.bot .bot-limb { fill: none; stroke: var(--beige); stroke-width: 4.8; stroke-linecap: round; }
.bot .bot-hand { fill: var(--beige); stroke: var(--ill-navy); stroke-width: 2.4; }
.bot .bot-neck { fill: var(--metal-2); stroke: var(--ill-navy); stroke-width: 2; }
.bot .bot-stalk { fill: none; stroke: var(--ill-navy); stroke-width: 2.6; stroke-linecap: round; }
.bot .bot-bulb { fill: var(--ill-amber); stroke: var(--ill-navy); stroke-width: 2; }
.bot .bot-bulb-glow { fill: var(--ill-amber); opacity: .3; }
.bot .bot-bolt { fill: var(--metal-2); stroke: var(--ill-navy); stroke-width: 2.4; }
.bot .bot-visor { fill: var(--screen); }
.bot .bot-eye { fill: var(--phos); }
.bot .bot-shine { fill: var(--ill-paper); }
.bot .bot-mouth { fill: none; stroke: var(--phos); stroke-width: 2.6; stroke-linecap: round; }
.bot .bot-blush { fill: var(--ill-red); opacity: .55; }
.bot .bot-key { fill: var(--ill-amber); opacity: 0; }
.bot .bot-code-c { fill: none; stroke: var(--phos); stroke-width: 3; stroke-linecap: round; }
.bot .bot-code-k { fill: none; stroke: var(--ill-amber); stroke-width: 3; stroke-linecap: round; }
.bot .bot-code-d { fill: none; stroke: var(--phos); stroke-width: 3; stroke-linecap: round; opacity: .45; }
.bot .bot-glyph { font-family: var(--type, ui-monospace, monospace); font-size: 10px; font-weight: 700; fill: var(--bot-glyph); opacity: 0; }

/* Two views of one bot: the back (coding) and the front (looking at the visitor) */
.bot .bot-front { opacity: 0; }
.bot .bot-turn { transform-origin: 406px 334px; }
.bot .bot-eyes { transform-origin: 406px 240px; }
.bot .bot-wave { transform-origin: 386px 298px; }
.bot .bot-arm-l { transform-origin: 392px 306px; }
.bot .bot-arm-r { transform-origin: 404px 294px; }

@media (prefers-reduced-motion: no-preference) {
  .bot .bot-bob { animation: bot-bob 2.6s ease-in-out infinite; }
  .bot .bot-arm-l { animation: bot-type-l .34s ease-in-out infinite alternate; }
  .bot .bot-arm-r { animation: bot-type-r .3s ease-in-out .12s infinite alternate; }
  .bot .bot-key { animation: bot-key 1.1s step-end infinite; }
  .bot .bot-code { animation: bot-scroll 4.8s steps(8, end) infinite; }
  .bot .bot-glyph { animation: bot-rise 3.6s ease-out infinite; }
  .bot .g2 { animation-delay: 1.2s; } .bot .g3 { animation-delay: 2.4s; }
  /* Look (1.5 s): squash to an edge, swap back for front at the mid-point, lean, blink, wave and nod, turn back */
  .bot.is-looking .bot-turn { animation: bot-turn 1.5s ease-in-out both; }
  .bot.is-looking .bot-back, .bot.is-looking .bot-arm-l { animation: bot-back 1.5s step-end both; }
  .bot.is-looking .bot-front { animation: bot-front 1.5s step-end both; }
  .bot.is-looking .bot-eyes { animation: bot-blink 1.5s both; }
  .bot.is-looking .bot-wave { animation: bot-wave 1.5s ease-in-out both; }
  .bot.is-looking .bot-nod { animation: bot-nod 1.5s ease-in-out both; }
  .bot.is-looking .bot-arm-r { animation-play-state: paused; }
  .bot.paused, .bot.paused * { animation-play-state: paused !important; }
  /* While the page scrolls the bot holds still, so scroll frames stay cheap */
  .bot.scrolling, .bot.scrolling * { animation-play-state: paused !important; }
}
@keyframes bot-bob { 50% { transform: translateY(-1.6px); } }
@keyframes bot-type-l { to { transform: rotate(-5deg); } }
@keyframes bot-type-r { to { transform: rotate(4deg); } }
/* one key cap hops between three keys under the hands */
@keyframes bot-key {
  0% { opacity: .85; transform: none; } 12% { opacity: 0; transform: none; }
  33% { opacity: .85; transform: translate(-11.4px, 7px); } 45% { opacity: 0; transform: translate(-11.4px, 7px); }
  66% { opacity: .85; transform: translate(4px, 7px); } 78%, 100% { opacity: 0; transform: translate(4px, 7px); }
}
@keyframes bot-scroll { to { transform: translateY(-96px); } }
@keyframes bot-rise { 0% { opacity: 0; transform: none; } 15% { opacity: .9; } 100% { opacity: 0; transform: translateY(-38px); } }
@keyframes bot-turn { 0%, 100% { transform: none; } 15%, 85% { transform: rotate(2deg) scaleX(.06); } 30%, 70% { transform: rotate(4deg); } }
@keyframes bot-back { 0% { opacity: 1; } 15% { opacity: 0; } 85%, 100% { opacity: 1; } }
@keyframes bot-front { 0% { opacity: 0; } 15% { opacity: 1; } 85%, 100% { opacity: 0; } }
@keyframes bot-blink { 0%, 44%, 52%, 100% { transform: none; } 48% { transform: scaleY(.1); } }
@keyframes bot-wave { 0%, 28%, 70%, 100% { transform: none; } 36%, 52% { transform: rotate(-16deg); } 44%, 60% { transform: rotate(10deg); } }
@keyframes bot-nod { 0%, 54%, 66%, 100% { transform: none; } 60% { transform: translateY(3px); } }

/* Reduced motion: one static pose, the back view coding at the computer */
@media (prefers-reduced-motion: reduce) {
  .bot .bot-glyph, .bot .bot-key { display: none; }
}

/* Scene objects that link to their section: dashed ring and a typed label on hover/focus */
.hero-scene .ill:not(.bot-layer) * { pointer-events: none; }
.hero-scene .stamp { pointer-events: none; }
/* Arabic: the office is mirrored so the computer, robot, lamp and cabinet face away from the board; SVG text is turned back */
html[dir="rtl"] .hero-scene .ill { transform: scaleX(-1); }
html[dir="rtl"] .hero-scene .ill text { transform: scaleX(-1); transform-box: fill-box; transform-origin: center; }
.hero-scene .ill .hot-ring { pointer-events: all; }
.ill .hot { cursor: pointer; outline: none; }
.ill .hot-ring { fill: none; stroke: #B3261E; stroke-width: 2; stroke-dasharray: 5 4; opacity: 0; transition: opacity .15s; }
.ill .hot-tip { opacity: 0; transition: opacity .15s; pointer-events: none; }
.ill .hot-tip rect { fill: #1B2A41; }
.ill .hot-tip text { fill: #FBF7EC; font-family: "Typewriter", var(--type); font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; direction: ltr; }
html[lang="ar"] .ill .hot-tip text { font-family: var(--font); font-size: 11px; letter-spacing: normal; text-transform: none; }
.ill .hot:is(:hover, :focus-visible) :is(.hot-ring, .hot-tip) { opacity: 1; }
.ill .hot:focus-visible .hot-ring { stroke: #0B5FC7; stroke-width: 3; stroke-dasharray: none; }
:root[data-active-theme="dark"] .ill .hot:focus-visible .hot-ring { stroke: #7DB9FF; }
.ill .cord { fill: none; stroke: var(--metal-3); stroke-width: 2; }
@media (prefers-reduced-motion: reduce) { .card, .btab, .cal { transition: none; } .card:is(:hover, :focus-within), .btab:hover, .cal:hover { transform: none !important; } }
/* Board on tablets and phones: tabs become a tappable index list, cards wrap down the strings */
@media (max-width: 1099px) {
  .board { margin-top: 8px; }
  .board-tabs { position: static; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
  .btab { justify-content: center; width: 100%; padding-inline: 6px; text-align: center; }
  .string { flex-wrap: wrap; row-gap: 26px; }
  .statement, .sub { max-width: none; flex: 1 1 260px; }
  .contacts > * { flex: 1 1 220px; }
}
@media (max-width: 479px) {
  .board-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .board-face { padding: 10px 14px 20px; border-width: 10px; }
  .nameplate { white-space: normal; }
  .name-card { padding: 20px 18px 14px; }
}

/* 3D desk robot (robot3d.js): a small canvas over the desk scene, placed by the script on the SVG bot's spot.
   The SVG bot stays as the fallback; <html data-robot3d="loading|on|off"> is set by the script. */
.hero-scene .robot3d { position: absolute; left: 0; top: 0; display: block; pointer-events: none; opacity: 0; visibility: hidden; transition: opacity .45s ease, visibility 0s .45s; }
html[data-robot3d="on"] .hero-scene .robot3d { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity .45s ease; }
/* While it is on, hide the SVG bot's body; keep its CRT code scroll, rising glyphs and key flash */
.bot-layer :is(.bot-hit, .bot-shadow, .bot-arm-l, .bot-arm-r, .bot-foot, .bot-turn) { transition: opacity .45s ease; }
html[data-robot3d="on"] .bot-layer :is(.bot-hit, .bot-shadow, .bot-arm-l, .bot-arm-r, .bot-foot, .bot-turn) { opacity: 0; visibility: hidden; transition: opacity .45s ease, visibility 0s .45s; }
/* While the 3D robot loads, the SVG bot keeps typing instead of doing its own look: the 3D one greets when it arrives */
html[data-robot3d="loading"] .bot.is-looking :is(.bot-turn, .bot-back, .bot-front, .bot-eyes, .bot-wave, .bot-nod) { animation: none; }
html[data-robot3d="loading"] .bot.is-looking .bot-arm-l { animation: bot-type-l .34s ease-in-out infinite alternate; }
html[data-robot3d="loading"] .bot.is-looking .bot-arm-r { animation-play-state: running; }

/* ==========================================================================
   DROP A: fonts, tokens, the folder-tab sticky header and the section folder tabs.
   Append at the END of style.css (after deleting the old TTF @font-face rules).
   Fonts and tokens are global; header rules touch only .site-header, folder-tab
   rules only main > section:not(.hero). Motion: transform only.
   Fonts: SIL Open Font License, self-hosted woff2 subsets (latin / arabic).
   ========================================================================== */

@font-face { font-family: "Typewriter"; src: url("../fonts/CourierPrime-Regular-latin.woff2") format("woff2"); font-weight: 400; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Typewriter"; src: url("../fonts/CourierPrime-Bold-latin.woff2") format("woff2"); font-weight: 700; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Serif"; src: url("../fonts/IBMPlexSerif-Regular-latin.woff2") format("woff2"); font-weight: 400; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Serif"; src: url("../fonts/IBMPlexSerif-Medium-latin.woff2") format("woff2"); font-weight: 500; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Serif"; src: url("../fonts/IBMPlexSerif-SemiBold-latin.woff2") format("woff2"); font-weight: 600; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Libre Baskerville"; src: url("../fonts/LibreBaskerville-wght-latin.woff2") format("woff2"); font-weight: 400 700; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Noto Naskh Arabic"; src: url("../fonts/NotoNaskhArabic-wght-arabic.woff2") format("woff2"); font-weight: 400 700; font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FEFC, U+102E0-102FB, U+10E60-10EFF, U+1EE00-1EEFF; }

/* ---------- Tokens (plain :root = light only; the night blocks above win by specificity) ---------- */
:root {
  --font: "IBM Plex Serif", "Noto Naskh Arabic", Georgia, "Times New Roman", serif;
  --head: "Libre Baskerville", "Noto Naskh Arabic", Georgia, "Times New Roman", serif;
  --type: "Typewriter", "Noto Naskh Arabic", "Courier New", monospace;
  --red: #A8322D; --ok: #2F5D50; --wa-bg: #2F5D50; --kraft: #B8935A;
  --carbon: rgba(40, 66, 140, 0.24); --drop: rgba(31, 42, 68, 0.88);
  --speck: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.08) 0 .6px, transparent 1.2px), radial-gradient(circle at 60% 70%, rgba(0, 0, 0, 0.1) 0 .7px, transparent 1.3px);
  /* the hero board's manila, cork and frame wood, shared by the header and the section tabs */
  --tab-manila: #E8CC8F; --tab-manila-2: #D7B36E; --tab-ink: #1B2A41; --tab-edge: rgba(78, 50, 27, 0.45); --tag-paper: #FBF7EC;
  --cork: #B98A55; --cork-dot: rgba(92, 60, 24, 0.28); --cork-lite: rgba(255, 238, 200, 0.22); --frame-wood: #6B4627; --frame-edge: #4E321B;
  --header-h: 60px; --sx: 1; --hx: 12px;
}
[dir="rtl"] { --sx: -1; --hx: calc(100% - 12px); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --carbon: rgba(0, 0, 0, 0.6); --drop: rgba(0, 0, 0, 0.75); } }
:root[data-theme="dark"] { --carbon: rgba(0, 0, 0, 0.6); --drop: rgba(0, 0, 0, 0.75); }
:root[data-active-theme="dark"] {
  --tab-manila: #C9AE72; --tab-manila-2: #B0945A; --tag-paper: #E9DFC8;
  --cork: #6E5335; --cork-dot: rgba(0, 0, 0, 0.35); --cork-lite: rgba(255, 210, 150, 0.08); --frame-wood: #3E2A17; --frame-edge: #2A1C0F;
}

/* EN pages never fetch the Arabic font: the one Arabic word (the language tag) uses a system face */
html:not([lang="ar"]) .lang-btn [lang="ar"] { font-family: Tahoma, "Segoe UI", "Geeza Pro", "Noto Sans Arabic", "DejaVu Sans", sans-serif; }
/* Skip link: a typed banner over the whole header row (covers the header targets fully, never half) */
.skip { border-radius: 0; font-family: var(--type); font-weight: 700; text-transform: uppercase; letter-spacing: .12em; }
.skip:focus { top: 0; inset-inline: 0; min-height: calc(var(--header-h) + 4px); display: flex; align-items: center; justify-content: center; outline-offset: -6px; }
html[lang="ar"] .skip { font-family: var(--font); text-transform: none; }

/* ---------- Sticky header: manila folder tabs on a cork strip with a wood-trim rail ---------- */
.site-header {
  --focus: #0B2A5C;
  background: radial-gradient(circle at 30% 40%, var(--cork-dot) 0 1px, transparent 1.6px) 0 0 / 7px 7px,
    radial-gradient(circle at 70% 70%, var(--cork-lite) 0 1px, transparent 1.6px) 0 0 / 9px 9px, var(--cork);
  border-bottom: 4px solid var(--frame-wood); box-shadow: 0 1px 0 var(--frame-edge), 0 3px 0 rgba(40, 24, 8, 0.18);
}
:root[data-active-theme="dark"] .site-header { --focus: #9CC8FF; }
.site-header .header-inner { min-height: var(--header-h); gap: 12px; align-items: stretch; }
.site-header :is(.brand, .header-actions) { align-self: center; }
.site-header :focus-visible { border-radius: 0; outline-offset: 2px; }

/* Logo: a small typed file label */
.site-header .brand { gap: 0; min-height: 44px; padding: 5px 12px; background: var(--tag-paper); color: var(--tab-ink);
  border: 1px solid var(--tab-edge); box-shadow: inset 0 0 0 3px var(--tag-paper), inset 0 0 0 4px rgba(27, 42, 65, 0.35), calc(var(--sx) * 2px) 2px 0 rgba(40, 24, 8, 0.3); }
.site-header .brand-mark { display: none; }
.site-header .brand-text { flex-direction: column; align-items: flex-start; line-height: 1.25; }
.site-header :is(.brand-name, .brand-role) { font-family: var(--type); font-weight: 700; font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--tab-ink); }
html[lang="ar"] .site-header :is(.brand-name, .brand-role) { font-family: var(--font); font-size: .875rem; text-transform: none; }

/* Tab strip: kraft tabs sit on the rail; the current section's tab is raised and cream */
.site-header .site-nav { align-self: flex-end; }
.site-header .site-nav ul { gap: 3px; align-items: flex-end; }
.site-header .site-nav a {
  min-height: 44px; padding: 4px 12px 0; border-radius: 8px 8px 0 0; border: 1px solid var(--tab-edge); border-bottom: 0;
  background: linear-gradient(var(--tab-manila), var(--tab-manila-2)); color: var(--tab-ink); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
  font-family: var(--type); font-weight: 700; font-size: .8125rem; letter-spacing: .08em; text-transform: uppercase;
  transform-origin: 50% 100%; transition: transform .15s var(--ease);
}
.site-header .site-nav a:hover { background: linear-gradient(var(--tab-manila), var(--tab-manila-2)); color: var(--tab-ink); transform: translateY(-2px); }
.site-header .site-nav a[aria-current="true"], .site-header .site-nav a.active { min-height: 50px; background: var(--tag-paper); color: var(--tab-ink); transform: none; box-shadow: inset 0 3px 0 var(--red); }
.site-header :is(.site-nav a, .icon-btn, .btn):focus-visible { box-shadow: inset 0 0 0 2px var(--tab-ink); }
html[lang="ar"] .site-header .site-nav a { font-family: var(--font); font-size: .9375rem; text-transform: none; }

/* CV, language and theme: small stamped paper tags with a punched hole */
.site-header .icon-btn {
  min-width: 44px; height: 44px; padding: 0 10px; border-radius: 0; border: 1px solid var(--tab-edge); color: var(--tab-ink);
  background: radial-gradient(circle at var(--hx) 50%, var(--frame-edge) 0 2.5px, transparent 3px), var(--tag-paper);
  padding-inline-start: 20px; box-shadow: calc(var(--sx) * 2px) 2px 0 rgba(40, 24, 8, 0.3);
  font-family: var(--type); font-weight: 700; transition: transform .12s var(--ease);
}
.site-header .icon-btn:hover { border-color: var(--tab-ink); }
.site-header .icon-btn:active, .site-header .header-actions > .btn:active { transform: translate(calc(var(--sx) * 2px), 2px); }
/* The CV link is a red "FILE COPY" stamp tag (its accessible name stays "CV (PDF)") */
.site-header .header-actions > .btn {
  min-height: 44px; padding: 3px 10px; gap: 8px; border-radius: 0; border: 3px double #A8322D; color: #A8322D; background: var(--tag-paper);
  box-shadow: calc(var(--sx) * 2px) 2px 0 rgba(40, 24, 8, 0.3); rotate: -2deg; font-family: var(--type); font-weight: 700; font-size: .75rem;
  letter-spacing: .1em; text-transform: uppercase; transition: transform .12s var(--ease);
}
.site-header .header-actions > .btn:hover { transform: translateY(-1px); }
.site-header .header-actions > .btn > span { display: inline-block; line-height: 1.15; white-space: nowrap; }
.site-header .header-actions > .btn > span::before { content: "File copy"; content: "File copy" / ""; display: block; font-size: .625rem; letter-spacing: .22em; }
html[lang="ar"] .site-header .header-actions > .btn { font-family: var(--font); font-size: .875rem; text-transform: none; }
html[lang="ar"] .site-header .header-actions > .btn > span { line-height: 1.3; }
html[lang="ar"] .site-header .header-actions > .btn > span::before { content: "نسخة الملف"; content: "نسخة الملف" / ""; font-size: .75rem; }

/* Mobile: one folded manila tab, "INDEX ▾", opens the tab list */
.site-header .menu-btn { align-self: flex-end; height: 46px; padding: 2px 12px 0; gap: 6px; border-radius: 8px 8px 0 0; border-bottom: 0; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
  background: linear-gradient(var(--tab-manila), var(--tab-manila-2)); font-size: .8125rem; letter-spacing: .1em; text-transform: uppercase; }
.site-header .menu-btn .menu-caret { width: 0; height: 0; border: 5px solid transparent; border-top-color: currentColor; border-bottom: 0; transition: transform .15s var(--ease); }
.site-header.open .menu-btn .menu-caret { transform: rotate(180deg); }
.site-header .menu-btn:has(.menu-k) .icon { display: none; }
html[lang="ar"] .site-header .menu-btn { font-family: var(--font); font-size: .9375rem; text-transform: none; }
.site-header .header-actions { gap: 8px; align-self: stretch; align-items: center; }
@media (max-width: 1099px) {
  .js .site-header .site-nav {
    background: radial-gradient(circle at 30% 40%, var(--cork-dot) 0 1px, transparent 1.6px) 0 0 / 7px 7px, var(--cork);
    border-bottom: 4px solid var(--frame-wood); box-shadow: 0 3px 0 rgba(40, 24, 8, 0.25);
  }
  .js .site-header .site-nav ul { align-items: stretch; gap: 6px; padding: 12px var(--gutter) 16px; }
  .js .site-header .site-nav li + li { border-top: 0; }
  .js .site-header .site-nav a { min-height: 46px; padding: 8px 16px; font-size: .9375rem; border-radius: 8px 8px 0 0; border-bottom: 1px solid var(--tab-edge); }
  .js .site-header .site-nav a[aria-current="true"] { min-height: 46px; }
  html[lang="ar"].js .site-header .site-nav a { font-size: 1.0625rem; }
  .site-header .header-actions { align-self: stretch; }
}
/* 1100-1299 px: tighter tabs so the strip fits */
/* 1300 px and up: the tab strip, the label and the stamps fit the header content width (1120 px) */
@media (min-width: 1300px) { .site-header .site-nav a { padding-inline: 9px; letter-spacing: .05em; } }
@media (min-width: 1100px) and (max-width: 1299px) {
  .site-header .header-inner { gap: 8px; }
  .site-header .site-nav ul { gap: 2px; }
  .site-header .site-nav a { padding-inline: 6px; font-size: .6875rem; letter-spacing: .02em; }
  .site-header :is(.brand-name, .brand-role) { letter-spacing: .04em; }
  .site-header .brand { padding-inline: 8px; }
}
@media (max-width: 479px) {
  .site-header .header-inner { gap: 6px; }
  .site-header .brand { padding-inline: 8px; }
  .site-header .brand-name { letter-spacing: .04em; }
  .site-header .header-actions { gap: 5px; }
  .site-header .icon-btn { padding-inline: 16px 7px; }
  .site-header .menu-btn { padding-inline: 9px; }
}

/* ---------- Section folder tabs: "DOC-0x · NAME" on the same manila tab ---------- */
main > section:not(.hero) .folder-tab {
  top: -44px; height: 45px; gap: 0; padding: 4px 18px 0; border-radius: 8px 8px 0 0; border: 1px solid var(--tab-edge); border-bottom: 0;
  background: linear-gradient(var(--tab-manila), var(--tab-manila-2)); color: var(--tab-ink); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
  font-family: var(--type); font-size: max(var(--min14), .8125rem); letter-spacing: .1em;
}
main > section:not(.hero) .folder-tab .no { color: var(--tab-ink); font-family: var(--type); direction: ltr; unicode-bidi: isolate; text-decoration: underline 2px #A8322D; text-underline-offset: 4px; }
main > section:not(.hero) .folder-tab .no::before { content: "DOC-"; }
main > section:not(.hero) .folder-tab .label-paper { padding: 0; background: none; box-shadow: none; color: var(--tab-ink); }
main > section:not(.hero) .folder-tab .label-paper::before { content: "\00B7"; margin-inline: .6em; }
html[lang="ar"] main > section:not(.hero) .folder-tab { font-size: .9375rem; }
html[lang="ar"] main > section:not(.hero) .folder-tab .label-paper { font-family: var(--font); }

/* ==========================================================================
   DROP B, part 1: office corners for PROFILE, PROJECTS (with the timeline drawer)
   and PLATFORMS. Append after a-header.css. Scoped to #profile, #projects and
   #platforms only. CSS gradients and the existing grain tile only; motion is
   transform only; shadows never transition.
   ========================================================================== */

:root {
  --wood-desk: #C49A66; --wood-grain: rgba(92, 56, 20, 0.12); --wood-hi: rgba(255, 238, 205, 0.10);
  --print-paper: #E4ECEF; --print-line: rgba(43, 92, 158, 0.13); --print-major: rgba(43, 92, 158, 0.22);
  --wall-paint: #D9DCC8; --wall-rail: #B8BDA4; --shelf: #8A6A43; --shelf-edge: #5E4428;
  --drawer-in: #D8C29A; --drawer-wall: rgba(70, 45, 15, 0.35);
  /* papers inside a file stay paper-light in both themes, like the hero board's cards */
  --file-paper: #FBF7EC; --file-paper-2: #F5EEDC;
}
:root[data-active-theme="dark"] {
  --wood-desk: #33251A; --wood-grain: rgba(0, 0, 0, 0.22); --wood-hi: rgba(255, 210, 150, 0.04);
  --print-paper: #12233A; --print-line: rgba(140, 180, 230, 0.10); --print-major: rgba(140, 180, 230, 0.18);
  --wall-paint: #1E211C; --wall-rail: #2C3128; --shelf: #4A3924; --shelf-edge: #2A1C0F;
  --drawer-in: #2A2117; --drawer-wall: rgba(0, 0, 0, 0.5);
  --file-paper: #E9DFC8; --file-paper-2: #E1D5BA;
}

:is(#profile, #projects, #platforms) {
  & :focus-visible { border-radius: 0; }
  & :is(h2, h3, h4) { font-family: var(--head); font-weight: 700; }
  & .section-head { padding-bottom: 18px; border-bottom: 3px double color-mix(in srgb, currentColor 55%, transparent); }
  & .section-head h2 { font-size: clamp(1.75rem, 1.9vw + 1.1rem, 2.75rem); line-height: 1.18; letter-spacing: -0.01em; text-shadow: .05em .04em 0 var(--carbon); }
  html[lang="ar"] & .section-head h2 { line-height: 1.45; font-size: clamp(1.75rem, 2vw + 1rem, 2.625rem); }
  & .stamp { border-radius: 2px; text-shadow: calc(var(--sx) * .7px) .5px 0 color-mix(in srgb, currentColor 40%, transparent); box-shadow: inset calc(var(--sx) * 1px) -1px 0 color-mix(in srgb, currentColor 35%, transparent); }
  & :is(.paper, .index-card, .titleblock, .binder-label, .drawer-label, .divider, .map-legend a, .tb-roles li) { border-radius: 0; }
}

/* ---------- PROFILE: a typed personnel file open on the wooden desk ---------- */
#profile {
  background-color: var(--wood-desk);
  background-image: var(--folder-lamp), var(--edge-shade),
    repeating-linear-gradient(178deg, var(--wood-grain) 0 2px, transparent 2px 11px),
    repeating-linear-gradient(181deg, var(--wood-hi) 0 1px, transparent 1px 29px), var(--fiber);
}
#profile .profile-grid {
  --paper: var(--file-paper); --paper-2: var(--file-paper-2); --text: #1B2A41; --text-2: #36405A; --text-3: #4C505E;
  --line: #D6C6A6; --line-strong: #AE9B78; --ok: #2F5D50; --red: #A8322D; --focus: #0B5FC7; --highlight: rgba(244, 196, 64, 0.55);
  position: relative; margin-top: 18px; padding: 44px 24px 32px; color: var(--text);
  background: var(--fiber), linear-gradient(var(--tab-manila), var(--tab-manila-2));
  border: 1px solid var(--tab-edge); box-shadow: calc(var(--sx) * 6px) 8px 0 rgba(40, 24, 8, 0.28);
}
/* the folder's own tab and typed label */
#profile .profile-grid::before {
  content: "Personnel file \00B7  Confidential"; content: "Personnel file \00B7  Confidential" / "";
  position: absolute; top: -30px; inset-inline-start: -1px; height: 30px; padding: 6px 16px 0;
  background: var(--tab-manila); border: 1px solid var(--tab-edge); border-bottom: 0; border-radius: 8px 8px 0 0;
  font-family: var(--type); font-weight: 700; font-size: max(var(--min14), .75rem); letter-spacing: .14em; text-transform: uppercase; color: #1B2A41;
}
html[lang="ar"] #profile .profile-grid::before { content: "ملف الموظف · سري"; content: "ملف الموظف · سري" / ""; font-family: var(--font); font-size: .875rem; text-transform: none; padding-top: 2px; }
#profile .about { font-family: var(--type); font-size: clamp(1.0625rem, .5vw + .95rem, 1.25rem); line-height: 1.7; color: #1B2A41; }
html[lang="ar"] #profile .about { font-family: var(--font); line-height: 1.8; }
#profile .titleblock { background-image: var(--fiber); }
#profile .tb-grid > div { border-bottom-style: dashed; }
#profile .tb-roles li { background: var(--paper-2); border: 1px dashed var(--text-3); }
@media (min-width: 1024px) { #profile .profile-grid { padding: 48px 40px 40px; } }

/* ---------- PROJECTS: a whiteprint on the drafting table (night: a blueprint) ---------- */
#projects {
  background-color: var(--print-paper);
  background-image: var(--folder-lamp), var(--edge-shade),
    linear-gradient(var(--print-major) 1px, transparent 1px), linear-gradient(90deg, var(--print-major) 1px, transparent 1px),
    linear-gradient(var(--print-line) 1px, transparent 1px), linear-gradient(90deg, var(--print-line) 1px, transparent 1px);
  background-size: auto, auto, 120px 120px, 120px 120px, 24px 24px, 24px 24px;
}
/* the map is pinned to a wooden drafting board */
#projects .pinned { background-image: var(--fiber); box-shadow: 0 0 0 10px #C9B48A, 0 0 0 12px var(--shelf-edge), 6px 10px 0 8px rgba(20, 30, 50, 0.22); margin: 12px; }
:root[data-active-theme="dark"] #projects .pinned { box-shadow: 0 0 0 10px #5A4630, 0 0 0 12px #2A1C0F, 6px 10px 0 8px rgba(0, 0, 0, 0.45); }
#projects .map-head { font-size: max(var(--min14), .75rem); }
#projects .file-line { font-family: var(--type); font-size: .9375rem; }
html[lang="ar"] #projects .file-line { font-family: var(--font); font-size: 1rem; }
/* place-name chips: paper tags with a punched hole */
#projects .chip {
  border-radius: 0; border: 1px solid var(--text-3); padding-inline: 26px 14px; text-transform: uppercase; letter-spacing: .06em;
  background: var(--paper) radial-gradient(circle at var(--hx) 50%, var(--print-paper) 0 4px, var(--text-3) 4.5px 5.5px, transparent 6px) no-repeat;
  box-shadow: calc(var(--sx) * 2px) 2px 0 var(--kraft); transition: transform .2s var(--ease);
}
html[lang="ar"] #projects .chip { font-family: var(--font); text-transform: none; }
#projects .drawer-front { border-radius: 2px; }

/* The experience timeline: the open index-card drawer; the rail is its rod */
#projects .cards-wrap {
  --pad: 18px; padding: var(--pad); background: linear-gradient(var(--drawer-wall), transparent 22px), var(--fiber), var(--drawer-in);
  box-shadow: inset 6px 0 0 -2px var(--drawer-wall), inset -6px 0 0 -2px var(--drawer-wall), inset 0 -4px 0 var(--drawer-wall);
  border: 2px solid var(--shelf-edge); border-top: 0;
}
#projects :is(.rail, .rail-fill) { top: calc(12px + var(--pad)); bottom: calc(12px + var(--pad)); inset-inline-start: calc(13px + var(--pad)); }
#projects .divider { background: linear-gradient(var(--tab-manila), var(--tab-manila-2)); border-color: var(--tab-edge); color: #1B2A41; }
#projects .divider .tenure { color: #3D4A5F; }
#projects .index-card { border-radius: 0; background-image: var(--fiber); transition: transform .3s var(--ease); }
#projects .chips-sm li { border-radius: 0; background: var(--paper-2); border: 1px solid var(--line-strong); border-inline-start: 3px solid var(--kraft); text-transform: uppercase; letter-spacing: .04em; }
#projects .badge-current { border: 3px double var(--ok); border-radius: 0; font-weight: 700; }
html[lang="ar"] #projects .badge-current { font-family: var(--font); }
#projects .parties dt { font-family: var(--type); font-weight: 700; font-size: max(var(--min14), .75rem); letter-spacing: .08em; text-transform: uppercase; padding-top: 4px; }
html[lang="ar"] #projects .parties dt { font-family: var(--font); font-size: .875rem; text-transform: none; padding-top: 0; }
/* a typed card number in each card's head line */
#projects .cards { counter-reset: card; }
#projects .index-card { counter-increment: card; }
#projects .card-head::after { content: "No. " counter(card, decimal-leading-zero); content: "No. " counter(card, decimal-leading-zero) / ""; margin-inline-start: auto; font-family: var(--type); font-size: max(var(--min14), .75rem); letter-spacing: .08em; color: var(--text-3); direction: ltr; }
@media (max-width: 479px) { #projects .cards-wrap { --pad: 10px; } }

/* ---------- PLATFORMS: labelled binders on wooden shelves against the painted wall ---------- */
#platforms {
  background-color: var(--wall-paint);
  background-image: var(--folder-lamp), var(--edge-shade),
    linear-gradient(transparent 46px, var(--wall-rail) 46px 50px, transparent 50px), var(--fiber);
  background-repeat: no-repeat, no-repeat, no-repeat, repeat;
}
#platforms .binders { row-gap: 40px; }
#platforms .binder { transition: transform .3s var(--ease); }
/* each binder stands on its piece of shelf; the pieces meet across the column gap */
#platforms .binder::after {
  content: ""; position: absolute; inset-inline: -14px; bottom: -16px; height: 12px;
  background: linear-gradient(var(--shelf), var(--shelf) 70%, var(--shelf-edge));
  box-shadow: 0 6px 0 -2px rgba(30, 20, 8, 0.25);
}
#platforms .binder:hover { transform: translateY(-4px); }
#platforms .binder:hover::after { transform: translateY(4px); }

/* HANDOFF for b-sections-2 (EXPERTISE, CERTIFICATIONS, CONTACT, FOOTER): H5's first-pass rules for these sections, already axe-clean; start from here. Needs a-header.css tokens (--head, --type, --drop, --speck, --carbon, --sx). */
:is(#expertise, #certifications, #contact, .site-footer) {
  & :focus-visible { border-radius: 0; }
  & :is(h2, h3, h4) { font-family: var(--head); font-weight: 700; }
  & .section-head { padding-bottom: 18px; border-bottom: 3px double color-mix(in srgb, currentColor 55%, transparent); }
  & .section-head h2 { font-size: clamp(1.75rem, 1.9vw + 1.1rem, 2.75rem); line-height: 1.18; letter-spacing: -0.01em; text-shadow: .05em .04em 0 var(--carbon); }
  html[lang="ar"] & .section-head h2 { line-height: 1.45; font-size: clamp(1.75rem, 2vw + 1rem, 2.625rem); }

  /* Buttons: rubber-stamped tickets (cert-total LinkedIn, slip Email / CV); press = stamp-down offset */
  & .btn {
    border-radius: 0; border: 3px double currentColor; font-family: var(--type); font-weight: 700; font-size: .9375rem; letter-spacing: .08em; text-transform: uppercase;
    background-image: var(--speck); background-size: 5px 6px, 7px 5px; box-shadow: calc(var(--sx) * 3px) 3px 0 0 var(--drop); transition: transform .12s var(--ease);
  }
  & .btn:hover { transform: translate(calc(var(--sx) * -1px), -1px); }
  & .btn:active { transform: translate(calc(var(--sx) * 3px), 3px); }
  & .btn-green { background-color: var(--wa-bg); color: var(--wa-fg); }
  & .cert-total .btn { box-shadow: none; }
  html[lang="ar"] & .btn { font-family: var(--font); text-transform: none; font-size: 1rem; line-height: 1.5; }

  /* Paper: square corners, grain, transform-only lifts (no animated shadows) */
  & :is(.paper, .certificate, .slip) { border-radius: 0; }
  & :is(.paper, .certificate:not(.cert-total)) { background-image: var(--fiber); }
  & .paper.lift { transition: transform .3s var(--ease); }
  & .form-no { border-bottom: 1px dashed var(--line-strong); font-size: max(var(--min14), .75rem); }
  & .cert-total .big { font-family: var(--type); }
  & .stamp { border-radius: 2px; text-shadow: calc(var(--sx) * .7px) .5px 0 color-mix(in srgb, currentColor 40%, transparent); box-shadow: inset calc(var(--sx) * 1px) -1px 0 color-mix(in srgb, currentColor 35%, transparent); }

  /* Contact slip: dashed field rules, green WhatsApp icon, torn bottom edge, stamp below the buttons */
  & .slip { margin-bottom: 12px; }
  @media (min-width: 760px) { & .slip { padding-bottom: 76px; } & .slip .stamp { bottom: 24px; } }
  & .slip-fields > div { border-bottom: 1px dashed #B9A983; }
  & .slip-fields a[href*="//wa.me/"] .icon { color: #2F5D50; }
  & .slip::after { content: ""; position: absolute; inset-inline: 0; top: 100%; height: 12px; pointer-events: none;
    background: linear-gradient(135deg, var(--slip-bg, #FBF7EC) 50%, transparent 50%), linear-gradient(225deg, var(--slip-bg, #FBF7EC) 50%, transparent 50%);
    background-size: 12px 12px; background-repeat: repeat-x; }
}

/* B2 re-skin: four more corners of the document-control office. Expertise = steel filing cabinet,
   Certifications = painted wall, Contact = reception desk, Footer = office door. Scoped to #expertise,
   #certifications, #contact, .site-footer. Surfaces are background-image only (folder tabs keep their colour).
   Gradients + grain.png only, no filters; motion is transform only. Uses a-header.css tokens when present. */
:is(#expertise, #certifications, #contact, .site-footer) {
  --b2-lbl: "Typewriter", var(--type); --b2-end: to right;
  --b2-wood: var(--frame-wood, #6B4627); --b2-wood-hi: #8A5F37; --b2-wood-lo: var(--frame-edge, #4E321B);
}
[dir="rtl"] :is(#expertise, #certifications, #contact, .site-footer) { --b2-end: to left; }
:is(#certifications, #contact) .btn { border-radius: 0; }
:is(#certifications, #contact) .stamp { border-radius: 2px; }

/* ---------- Expertise: a grey steel filing cabinet; each card stands in an open drawer ---------- */
#expertise {
  --cab: #B4B6B1; --cab-hi: #C6C8C2; --cab-lo: #A3A6A0;
  --ix: #F3EAD2; --ix-ink: #1B2A41; --ix-ink-2: #36405A; --ix-ink-3: #4C505E; --ix-rule: rgba(43,92,158,.2); --ix-red: rgba(168,50,45,.6);
  --dw-hi: #CDCFC9; --dw-lo: #A2A59F; --dw-label: #EFE4C6; --handle: linear-gradient(#70746E, #2E312D);
  color: var(--ix-ink);
  background-image: var(--folder-lamp), linear-gradient(90deg, rgba(0,0,0,.08), transparent 5% 95%, rgba(0,0,0,.08)),
    repeating-linear-gradient(90deg, rgba(255,255,255,.07) 0 1px, transparent 1px 4px), var(--fiber), linear-gradient(var(--cab-hi), var(--cab) 35%, var(--cab-lo));
}
:root[data-active-theme="dark"] #expertise {
  --cab: #2A2E2B; --cab-hi: #323732; --cab-lo: #222522;
  --ix: #2A251D; --ix-ink: #F3EAD7; --ix-ink-2: #D7CBB4; --ix-ink-3: #B1A58F; --ix-rule: rgba(140,170,230,.14); --ix-red: rgba(240,116,102,.5);
  --dw-hi: #4A4F49; --dw-lo: #2E322D; --dw-label: #CFC4AA; --handle: linear-gradient(#8A8F88, #4A4E48);
}
#expertise .forms { row-gap: 40px; counter-reset: dc; }
#expertise .clip { display: none; }
#expertise .form-sheet { counter-increment: dc; padding: 22px 22px 76px; border-radius: 0; background: var(--ix) var(--fiber); color: var(--ix-ink); box-shadow: 0 1px 0 rgba(0,0,0,.08), 0 12px 18px -12px rgba(20,24,20,.6); }
#expertise .form-no { font-family: var(--b2-lbl); color: var(--ix-ink-3); border-bottom: 2px solid var(--ix-red); }
/* Index-card rules, one per text line */
#expertise .form-sheet p:not(.form-no) { color: var(--ix-ink-2); background: repeating-linear-gradient(transparent 0 calc(1lh - 1px), var(--ix-rule) calc(1lh - 1px) 1lh); }
/* Drawer front: label holder + pull handle */
#expertise .form-sheet::after {
  content: "DC-" counter(dc, decimal-leading-zero); content: "DC-" counter(dc, decimal-leading-zero) / "";
  position: absolute; inset-inline: -8px; bottom: -6px; height: 58px; padding-top: 9px; direction: ltr; text-align: center;
  font: 700 .6875rem/18px var(--b2-lbl); letter-spacing: .14em; color: #1B2A41;
  background: linear-gradient(var(--dw-label), var(--dw-label)) 50% 9px / 76px 18px no-repeat, linear-gradient(#9A8350, #6F5C33) 50% 6px / 84px 24px no-repeat,
    var(--handle) 50% 38px / 76px 9px no-repeat, linear-gradient(rgba(0,0,0,.3), rgba(0,0,0,.3)) 50% 48px / 66px 2px no-repeat, linear-gradient(var(--dw-hi), var(--dw-lo));
  border-top: 1px solid rgba(255,255,255,.5); box-shadow: inset 0 -3px 0 rgba(0,0,0,.18), 0 10px 14px -8px rgba(0,0,0,.5);
  transition: transform .3s var(--ease);
}
/* Hover pulls the card up out of its drawer; the drawer stays put */
#expertise .form-sheet.lift:hover { transform: translateY(-8px); }
#expertise .form-sheet.lift:hover::after { transform: translateY(8px); }

/* ---------- Certifications: a painted wall with a dado rail ---------- */
#certifications {
  --wall: #CBD3C1; --wall-lo: #BCC6B2; --dado: #2F5D50; --roll: rgba(255,255,255,.05);
  --cp: #F6EFDC; --cp-ink: #1B2A41; --frame-hi: var(--b2-wood-hi); --wire: #7E7B72; --filed: #A8322D;
  color: var(--cp-ink);
  background-image: var(--folder-lamp), repeating-linear-gradient(90deg, var(--roll) 0 26px, transparent 26px 52px), var(--fiber), linear-gradient(var(--wall), var(--wall-lo));
}
:root[data-active-theme="dark"] #certifications {
  --wall: #252C27; --wall-lo: #1D231F; --dado: #15201B; --roll: rgba(255,255,255,.012);
  --cp: #2A251D; --cp-ink: #F3EAD7; --b2-wood: #3E2A17; --frame-hi: #5A3F24; --b2-wood-lo: #24180C; --wire: #8A857A; --filed: #F07466;
}
#certifications::after {
  content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 56px; pointer-events: none;
  border-top: 8px solid var(--b2-wood); box-shadow: 0 -1px 0 var(--frame-hi); background: linear-gradient(rgba(0,0,0,.3), transparent 10px), var(--fiber), var(--dado);
}
#certifications .cert-grid { row-gap: 56px; padding-top: 20px; }
#certifications .certificate {
  border-radius: 0; border: 12px solid; border-color: var(--frame-hi) var(--b2-wood) var(--b2-wood-lo) var(--b2-wood); background: var(--cp) var(--fiber); color: var(--cp-ink);
  box-shadow: inset 0 2px 4px rgba(0,0,0,.3), 0 0 0 1px var(--b2-wood-lo), 0 16px 22px -12px rgba(30,18,6,.65);
}
/* Picture wire up to a nail */
#certifications .certificate::after {
  content: ""; position: absolute; left: 50%; bottom: calc(100% + 12px); width: 100px; height: 32px; margin-left: -50px;
  background: radial-gradient(circle at 50% 5px, #E2DDD0 0 2px, #5E5B53 2.5px 4.5px, transparent 5px),
    linear-gradient(to bottom right, transparent calc(50% - 1px), var(--wire) 50%, transparent calc(50% + 1px)) 0 0 / 50% 100% no-repeat,
    linear-gradient(to bottom left, transparent calc(50% - 1px), var(--wire) 50%, transparent calc(50% + 1px)) 100% 0 / 50% 100% no-repeat;
}
/* The total is a black felt letter board */
#certifications .cert-total { --focus: #9CC8FF; color: #EFE4C6; background: repeating-linear-gradient(transparent 0 11px, rgba(0,0,0,.5) 11px 12px, rgba(255,255,255,.05) 12px 13px), #1C1C1A; }
#certifications .cert-total::before { display: none; }
#certifications .cert-total .big { font-family: var(--b2-lbl); color: #F4EBDA; letter-spacing: .06em; }
#certifications .cert-total p { color: #EFE4C6; }
#certifications .cert-total .btn { color: #EFE4C6; border-color: rgba(239,228,198,.55); }
/* Education: a document taped to the wall, stamped FILED */
#certifications .certificate:has(.edu-row) { border: 0; rotate: -.8deg; box-shadow: 0 1px 1px rgba(0,0,0,.12), 0 14px 20px -12px rgba(30,18,6,.55); }
#certifications .certificate:has(.edu-row)::after { bottom: auto; top: -13px; width: 112px; height: 26px; margin-left: -56px; rotate: 2deg; background: linear-gradient(rgba(232,204,143,.82), rgba(215,179,110,.82)); }
#certifications .certificate:has(.edu-row)::before {
  content: "Filed"; content: "Filed" / ""; inset: 22px auto auto; inset-inline-end: 20px; padding: 6px 12px; outline: 0; rotate: 7deg;
  border: 3px double var(--filed); color: var(--filed); font: 700 .8125rem/1 var(--b2-lbl); letter-spacing: .2em; text-transform: uppercase;
}
html[lang="ar"] #certifications .certificate:has(.edu-row)::before { content: "محفوظ"; content: "محفوظ" / ""; font-family: var(--font); font-size: .9375rem; }

/* ---------- Contact: the reception desk (legal pad, desk phone, in-tray) ---------- */
#contact {
  --wood: #8A5A34; --wood-lo: #6A4224; --grain: rgba(40,20,6,.16); --tray: #C9A56E; --tray-rim: #8E6C3A; --tw: 12px; --phone: #A8322D; --phone-lo: #7A221E;
  --pad: #F3E3A0; --pad-ink: #1B2A41; --pad-ink-2: #36405A; --pad-rule: rgba(43,92,158,.26); --pad-margin: rgba(168,50,45,.55);
  background-image: var(--folder-lamp), repeating-linear-gradient(178deg, transparent 0 5px, var(--grain) 5px 6px, transparent 6px 13px),
    repeating-linear-gradient(181deg, transparent 0 17px, rgba(255,230,190,.07) 17px 19px, transparent 19px 41px),
    linear-gradient(90deg, rgba(0,0,0,.18), transparent 10% 90%, rgba(0,0,0,.18)), var(--fiber), linear-gradient(var(--wood), var(--wood-lo));
}
:root[data-active-theme="dark"] #contact {
  --wood: #3E2A18; --wood-lo: #2A1C10; --grain: rgba(0,0,0,.3); --tray: #8E7448; --tray-rim: #5A4527; --phone: #8E2B26; --phone-lo: #5E1A17; --pad: #BFB27D;
  --folder-lamp: radial-gradient(900px 620px at 28% 30%, rgba(255,186,92,.16), transparent 70%);
}
/* Legal pad: glued binding, double margin rule, a ruled line under each text line */
#contact .contact-grid > div:first-child {
  position: relative; padding: 30px 24px 28px; padding-inline-start: 54px; color: var(--pad-ink); border-top: 16px solid #7A221E;
  background: linear-gradient(var(--b2-end), transparent 38px, var(--pad-margin) 38px 39px, transparent 39px 42px, var(--pad-margin) 42px 43px, transparent 43px), var(--fiber), var(--pad);
  box-shadow: 0 1px 0 rgba(0,0,0,.12), 3px 4px 0 -1px #E9D893, 6px 8px 0 -2px #DCCB85, 0 20px 28px -14px rgba(0,0,0,.65);
}
#contact .section-head h2 { color: var(--pad-ink); }
#contact .hl { background: linear-gradient(transparent 84%, var(--pad-margin) 84% 94%, transparent 94%); }
#contact .contact-text { color: var(--pad-ink-2); background: repeating-linear-gradient(transparent 0 calc(1lh - 1px), var(--pad-rule) calc(1lh - 1px) 1lh); }
/* In-tray: the transmittal on a short stack in an oak tray, with an IN label on the rim */
#contact .slip {
  border-radius: 0;
  box-shadow: 3px 4px 0 -1px #E6DCC2, 6px 8px 0 -2px #D6C9AA, 0 0 0 var(--tw) var(--tray), 0 0 0 calc(var(--tw) + 4px) var(--tray-rim), 0 0 0 calc(var(--tw) + 5px) rgba(0,0,0,.3), 0 32px 40px -18px rgba(0,0,0,.75);
}
#contact .slip::after { content: none; }
#contact .slip::before {
  content: "In"; content: "In" / ""; position: absolute; bottom: 100%; inset-inline-end: 28px; padding: 0 12px; box-shadow: inset 0 0 0 1px rgba(78,50,27,.45);
  background: linear-gradient(#E2C98F, #C9A766); color: #1B2A41; font: 700 .6875rem/calc(var(--tw) + 5px) var(--b2-lbl); letter-spacing: .2em; text-transform: uppercase;
}
html[lang="ar"] #contact .slip::before { content: "وارد"; content: "وارد" / ""; font-family: var(--font); font-size: max(var(--min14), .75rem); }
@media (max-width: 759px) {
  #contact { --tw: 7px; }
  #contact .slip::before { font-size: max(var(--min14), .5625rem); }
  #contact .contact-grid > div:first-child { padding-inline-end: 18px; }
}
/* Desk phone seen from above, in the space under the pad (desktop only) */
@media (min-width: 1024px) {
  #contact .contact-grid > div:first-child { margin-bottom: 210px; }
  #contact .contact-grid > div:first-child::after {
    content: ""; position: absolute; top: calc(100% + 58px); inset-inline-start: 16%; width: 172px; height: 128px; border-radius: 20px 20px 12px 12px;
    background: radial-gradient(circle at 50% 62%, #EFE4C6 0 9px, #2A2725 9.5px 10.5px, transparent 11px), radial-gradient(circle at 50% 62%, #E9E2CF 0 21px, transparent 21.5px),
      radial-gradient(circle at 50% 62%, transparent 0 36px, #1F1D1B 36.5px 38px, var(--phone) 38.5px), repeating-conic-gradient(from 8deg at 50% 62%, #2B2724 0 15deg, #D3CCBA 15deg 36deg);
    box-shadow: inset 0 3px 0 rgba(255,255,255,.22), inset 0 -5px 0 var(--phone-lo), 0 18px 22px -10px rgba(0,0,0,.7);
  }
  #contact .contact-grid > div:first-child::before {
    content: ""; position: absolute; z-index: 1; top: calc(100% + 40px); inset-inline-start: calc(16% - 16px); width: 204px; height: 36px; border-radius: 18px;
    background: linear-gradient(90deg, rgba(0,0,0,.22), transparent 24% 76%, rgba(0,0,0,.22)), linear-gradient(#C2453D, var(--phone) 55%, var(--phone-lo));
    box-shadow: 0 7px 8px -3px rgba(0,0,0,.55);
  }
}

/* ---------- Footer: the office door, a brass name plate, a CLOSED FILE card ---------- */
.site-footer {
  --door: #24304C; --door-lo: #1A233A; --brass: #DCC28A; --brass-lo: #C2A065; --ink: #1B2A41; --ink-2: #3A2E14; --card: #EFE4C6; --card-edge: rgba(78,50,27,.3);
  padding: 34px 0 44px; border-top: 10px solid var(--b2-wood);
  background-image: var(--folder-lamp), linear-gradient(90deg, rgba(0,0,0,.28), transparent 8% 92%, rgba(0,0,0,.28)), var(--fiber), linear-gradient(var(--door), var(--door-lo));
}
:root[data-active-theme="dark"] .site-footer { --door: #161C2C; --door-lo: #0F131E; --brass: #CDB27A; --brass-lo: #B8995D; --card: #D9CFB7; --card-edge: rgba(0,0,0,.4); }
/* Raised door panel */
.site-footer > .wrap { position: relative; padding-block: 28px; box-shadow: inset 0 0 0 2px rgba(0,0,0,.35), inset 0 0 0 3px rgba(255,255,255,.08), inset 0 0 0 12px rgba(0,0,0,.1); }
.site-footer .footer-grid {
  --focus: #1B2A41; --screw: #F3E3B5 0 1.5px, #8A6A38 2px 3.5px, transparent 4px; padding: 4px 18px; border: 1px solid #7A5C30; color: var(--ink-2);
  background: radial-gradient(circle at 9px 9px, var(--screw)), radial-gradient(circle at calc(100% - 9px) 9px, var(--screw)),
    radial-gradient(circle at 9px calc(100% - 9px), var(--screw)), radial-gradient(circle at calc(100% - 9px) calc(100% - 9px), var(--screw)),
    repeating-linear-gradient(90deg, rgba(255,255,255,.12) 0 1px, transparent 1px 3px), linear-gradient(var(--brass), var(--brass-lo));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55), inset 0 -2px 0 rgba(0,0,0,.15), 0 3px 0 #6F5530, 0 12px 18px -8px rgba(0,0,0,.6);
}
.site-footer .footer-grid > * { border-color: rgba(78,50,27,.3); }
.site-footer .footer-grid small { font-family: var(--b2-lbl); color: var(--ink-2); opacity: 1; }
html[lang="ar"] .site-footer .footer-grid small { font-family: var(--font); font-size: max(var(--min14), .8125rem); }
.site-footer .footer-grid :is(b, a) { color: var(--ink); text-shadow: 0 1px 0 rgba(255,255,255,.3); }
.site-footer > .wrap::after {
  content: "Closed file"; content: "Closed file" / ""; display: block; width: fit-content; margin: 26px 8px 0; margin-inline-start: auto; padding: 8px 16px; rotate: -3deg;
  font: 700 .875rem/1 var(--b2-lbl); letter-spacing: .2em; text-transform: uppercase; color: #9A2B26;
  background: var(--card) var(--fiber); border: 3px double #9A2B26; box-shadow: 0 0 0 8px var(--card), 0 0 0 9px var(--card-edge), 0 10px 14px -6px rgba(0,0,0,.6);
}
html[lang="ar"] .site-footer > .wrap::after { content: "ملف مغلق"; content: "ملف مغلق" / ""; font-family: var(--font); font-size: 1rem; }
/* Brass door knob in the side margin on wide screens */
@media (min-width: 1360px) {
  .site-footer { position: relative; }
  .site-footer::after {
    content: ""; position: absolute; top: 50%; inset-inline-end: calc((100% - var(--max)) / 4 - 22px); width: 44px; height: 44px; margin-top: -22px; border-radius: 50%;
    background: radial-gradient(circle at 38% 34%, #F6E7BC 0 3px, #D8B874 9px, #9C7838 19px, #6F5328 22px); box-shadow: 0 0 0 7px rgba(0,0,0,.18), 0 8px 10px -4px rgba(0,0,0,.6);
  }
}

/* ---------- Board grid: every string, clip, card and tag stays inside the cork (24 px inner padding) ---------- */
.board-face { container-type: inline-size; overflow: clip; gap: 0; padding: 14px 24px 24px; }
.string { display: grid; gap: 16px; align-items: start; padding-top: 22px; }
.string + .string { margin-top: 14px; }
.string::before { inset-inline: -24px; }
.string > * { min-width: 0; margin: 0; }
/* row 1: name card (wide) + location tag */
.string:first-child { grid-template-columns: minmax(0, 1fr) auto; }
.nameplate { font-size: clamp(1.75rem, 7.4cqi, 2.75rem); }
html[lang="en"] .eyebrow .type-on > span:nth-child(4) { display: none; }
html[lang="en"] .eyebrow .type-on > span:nth-child(5)::before { content: "\A"; white-space: pre; }
.loc-tag { margin-top: 12px; justify-self: end; }
/* row 2: statement + facts, equal heights */
.string:nth-child(2) { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); align-items: stretch; }
.statement, .sub { max-width: none; }
.statement { font-size: clamp(1.125rem, 3.4cqi, 1.375rem); }
html[lang="ar"] .board .statement { font-size: clamp(1.125rem, 3.2cqi, 1.25rem); }
/* row 3: memo · while you were out · file copy over LinkedIn */
.string.contacts { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, .9fr); align-items: stretch; }
.memo-addr { display: block; margin-top: 2px; font-size: .75rem; letter-spacing: 0; overflow-wrap: anywhere; }
.wywo-h { letter-spacing: .08em; }
.wywo-ph { overflow-wrap: anywhere; }
.ticket-stack { grid-template-rows: auto auto; }
.ticket-stack > * { min-width: 0; }
.bizcard { flex-wrap: wrap; }
/* narrow boards (phones): one column; the tag sits under the name card */
@container (max-width: 520px) {
  .string:first-child, .string:nth-child(2), .string.contacts { grid-template-columns: minmax(0, 1fr); }
  .loc-tag { justify-self: start; margin-top: 4px; }
  .string { row-gap: 28px; }
}

/* Wall clock (main.js sets the hands from the visitor's time). In Arabic the scene is mirrored: the clock is turned back so it runs clockwise. */
.ill .clock-s { fill: none; stroke: var(--ill-red); stroke-width: 1.2; stroke-linecap: round; }
.ill .clock-m { stroke-width: 2; }
html[dir="rtl"] .hero-scene .ill .clock { transform: scaleX(-1); transform-box: fill-box; transform-origin: center; }
@media (prefers-reduced-motion: reduce) { .ill .clock-s { display: none; } }
/* "Open to work" is stamped on a paper label at the board's top corner */
.board .s-status { position: absolute; z-index: 2; top: -14px; inset-inline-end: 24px; margin: 0; padding: 7px 14px; background: #FBF7EC; color: #A8322D; mix-blend-mode: normal; opacity: 1;
  font-size: max(var(--min14), .8125rem); letter-spacing: .12em; transform: rotate(-3deg); box-shadow: 0 6px 10px -8px rgba(30, 18, 6, 0.7); pointer-events: none; }
html[lang="ar"] .board .s-status { font-family: var(--font); letter-spacing: normal; text-transform: none; font-size: .875rem; }
/* Desk phone: coiled cord and highlights */
.ill .phone-cord { fill: none; stroke: var(--ill-navy); stroke-width: 1.3; stroke-linejoin: round; }
.ill .phone-hl { fill: none; stroke: var(--ill-paper); stroke-width: 1.4; stroke-linecap: round; opacity: .35; }
.ill .phone-stop { fill: none; stroke: var(--metal-3); stroke-width: 1.6; stroke-linecap: round; }
/* Wall map (Natural Earth outline): blue-grey sea, pale neighbours, the kingdom in manila, pins and a red string */
.ill .map-sea { fill: color-mix(in srgb, var(--bp) 34%, var(--ill-paper)); }
.ill .map-nb { fill: var(--ill-paper); stroke: var(--ill-navy); stroke-width: .35; stroke-opacity: .45; }
.ill .map-land { fill: var(--manila); stroke: var(--ill-navy); stroke-width: .8; stroke-linejoin: round; }
.ill .map-grat { fill: none; stroke: var(--ill-navy); stroke-width: .3; opacity: .3; }
.ill .map-string { fill: none; stroke: var(--ill-red); stroke-width: 1; }
.ill .map-pin { fill: var(--ill-red); stroke: var(--ill-paper); stroke-width: .8; }
/* In-tray: reports stacked under a construction drawing stamped IFC (Issued For Construction) */
.ill .dwg-line { fill: none; stroke: var(--bp); stroke-width: .8; opacity: .8; }
.ill .dwg-box { fill: none; stroke: var(--ill-navy); stroke-width: .7; opacity: .7; }
.ill .ifc-box { fill: none; stroke: var(--ill-red); stroke-width: 1.6; }
.ill .ifc-t { font-family: "Typewriter", var(--type); font-weight: 700; font-size: 10px; letter-spacing: 2px; fill: var(--ill-red); }
/* Wall map: drawn at its desktop place and size; phones and tablets show it smaller where the blueprint was */
@media (max-width: 1099px) { .hero-scene .ill .hot[href="#projects"] { transform-box: fill-box; transform-origin: center; transform: translate(-163px, 252px) scale(.62); } }
/* Left wall (desktop): clock in the far top corner, calendar + coat hook under it, card-index cabinet and plant on the desk */
.lwall { display: none; }
.lwall .clock-t { fill: none; stroke: var(--ill-navy); stroke-width: 1.1; stroke-linecap: round; }
.lwall .clock-n { font-family: "Typewriter", var(--type); font-weight: 700; font-size: 11px; fill: var(--ill-navy); }
.lwall .clock-h { stroke-width: 4.2; } .lwall .clock-m { stroke-width: 2.8; } .lwall .clock-s { stroke-width: 1.5; }
@media (min-width: 1100px) {
  .wall-left { display: none; }
  .lwall { display: block; position: absolute; top: 0; bottom: 0; inset-inline-start: calc(var(--gutter) - var(--wsc)); width: var(--wsc); pointer-events: none; --lw: calc(var(--wsc) - 38px); }
  .lwall svg { display: block; width: 100%; height: auto; aspect-ratio: auto; border-radius: 0; overflow: visible; }
  .lwall > .lw-clock { position: absolute; top: 14px; inset-inline-start: 16px; width: min(120px, calc(var(--wsc) - 32px)); }
  .lw-row { position: absolute; top: calc(34px + min(120px, calc(var(--wsc) - 32px))); inset-inline-start: 16px; display: none; gap: 16px; align-items: flex-start; }
  .lw-row > :is(.lw-cal, .lw-coat) { width: min(90px, calc((var(--wsc) - 48px) / 2)); }
  .lw-bottom { position: absolute; bottom: 18%; inset-inline-start: 0; display: flex; gap: 8px; align-items: flex-end; }
  .lw-bottom > .lw-docs { display: none; width: min(150px, calc(var(--wsc) - 80px)); } .lw-bottom > .lw-plant { width: 56px; }
}
@media (min-width: 1100px) { .lw-row { display: flex; } .lw-bottom > .lw-docs { display: block; } }
.lwall .box-t { font-family: "Typewriter", var(--type); font-weight: 700; font-size: 6.6px; fill: var(--ill-navy); }
.lwall .twine { fill: none; stroke: var(--ill-red); stroke-width: 1; } .lwall .sheet-l { fill: none; stroke: var(--manila-2); stroke-width: .6; }
}
/* Sunlight (light theme only): shafts through the blinds, a warm patch on the desk and slow dust motes. No filters. */
.wall-right { overflow: visible; }
.ill .sun-bar { fill: url(#sunG); }
.ill .mote { fill: #FFF4D2; opacity: .7; }
:root[data-active-theme="dark"] .sun { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .ill .mote { animation: mote 9s ease-in-out infinite alternate; }
  .ill .mote:nth-of-type(3n) { animation-duration: 12s; animation-delay: -4s; }
  .ill .mote:nth-of-type(3n+1) { animation-duration: 14s; animation-delay: -7s; }
  .hero.is-off .mote { animation-play-state: paused; }
}
@keyframes mote { 0% { transform: translate(0, 0); opacity: .25; } 50% { opacity: .9; } 100% { transform: translate(-12px, 16px); opacity: .3; } }

/* ---------- Mobile and tablet fixes (H9). Append at the END of style.css. Every rule is under 1100 px. ---------- */
@media (max-width: 1099px) {
  /* INDEX menu: in landscape (360 px tall) the list ran below the screen while the page is scroll-locked */
  .js .site-header .site-nav { max-height: calc(100svh - var(--header-h)); overflow-y: auto; overscroll-behavior: contain; }

  /* Notched phones in landscape (only active if viewport-fit=cover is ever added) */
  .wrap { padding-left: max(var(--gutter), env(safe-area-inset-left)); padding-right: max(var(--gutter), env(safe-area-inset-right)); }

  /* CLS: the hero text layer is its own paint layer; as the rise-in cards finish, its painted extent grew and Chrome
     scored that as a 0.085 shift (Arabic, 390 px). Paint containment pins it to its own box; nothing overflows it. */
  .hero-wrap { contain: paint; }

  /* Readable without zoom: body copy 16 px, small type labels 12 px */
  .hero .sub { font-size: 1rem; }
  .cal-top { font-size: max(var(--min14), .75rem); }
  .p-work, .form-sheet p, .binder-label .p-role-txt { font-size: 1rem; }

  /* Desk scene: the desk phone ("Go to Contact") ring is 92 x 76 scene units, at least 44 px tall on a 360 px phone */
  .hero-scene .ill .hot[href="#contact"] .hot-ring { y: 268px; height: 76px; }

  /* Map pins: hit circles of neighbouring pins overlapped (AMAALA/Red Sea, KAUST/Makkah); keep them apart */
  .ksa-map .pin .hit { r: 9px; }
  /* Tablets (labels shown from 640 px): "AMAALA" ran off the map's left edge, "KAUST · Thuwal" sat on the 22°N label */
  .pin[data-pin="amaala"] .pin-label.en { text-anchor: start; transform: translateX(16px); }
  .ksa-map .grat-l:nth-of-type(n+6) { display: none; }

  /* Touch: a tapped card keeps :hover, so drop the hover lift and tilt there */
  @media (hover: none) {
    .card:hover:not(:focus-within), .cal:hover, .chip:hover, .btn:hover, .index-card:hover, #expertise .form-sheet.lift:hover { transform: none; }
    #expertise .form-sheet.lift:hover::after { transform: none; }
  }
}
@media (max-width: 479px) {
  /* Phones: the place list under the map is the way in; the pins are too small and close to tap (12 px) */
  .ksa-map .pin { pointer-events: none; }
}
/* Project map, atlas style: Natural Earth outline, blue-grey seas, faint neighbours, cities, compass rose, legend and scale bar */
.ksa-map .sea { fill: color-mix(in srgb, var(--map-land) 55%, #6F93A8); }
.ksa-map .nb { fill: var(--map-land); fill-opacity: .55; stroke: var(--text); stroke-width: .5; stroke-opacity: .35; stroke-linejoin: round; }
.ksa-map .sea-l { font-family: var(--head); font-style: italic; font-size: 9px; letter-spacing: .28em; fill: var(--text); }
.ksa-map .city { fill: var(--paper); stroke: var(--text); stroke-width: 1.4; }
.ksa-map .city-l { font-family: var(--head); font-style: italic; font-size: 8px; fill: var(--text); paint-order: stroke; stroke: var(--map-land); stroke-width: 2.5px; stroke-linejoin: round; }
.ksa-map .rose-d { fill: var(--text); } .ksa-map .rose-l { fill: var(--paper); stroke: var(--text); stroke-width: .5; }
.ksa-map .rose-ring { fill: none; stroke: var(--text); stroke-width: .6; opacity: .6; }
.ksa-map .cartouche { fill: var(--paper); stroke: var(--text); stroke-width: .8; }
.ksa-map .key-l { font-size: 7.5px; font-weight: 600; fill: var(--text); }
.ksa-map .pin-key { fill: var(--red); stroke: var(--paper); stroke-width: 1; } .ksa-map .pin-key.is-base { fill: var(--text); } .ksa-map .pin-key.is-now { fill: var(--ok); }
.ksa-map .sb-d { fill: var(--text); } .ksa-map .sb-l { fill: var(--paper); stroke: var(--text); stroke-width: .5; }
.ksa-map .sb-n { font-family: var(--type); font-size: 6.5px; fill: var(--text); }
.ksa-map :is(.sea-l, .city-l, .key-l, .sb-n).ar { display: none; letter-spacing: normal; font-style: normal; }
html[lang="ar"] .ksa-map :is(.sea-l, .city-l, .key-l, .sb-n).en { display: none; }
html[lang="ar"] .ksa-map :is(.sea-l, .city-l, .key-l, .sb-n).ar { display: inline; }
html[lang="ar"] .ksa-map .sea-l.ar { font-size: 10px; } html[lang="ar"] .ksa-map .key-l.ar { font-size: 8.5px; }
/* Header (desktop): brand, then the tabs 33 px after it, the actions at the far end. Same in Arabic (mirrored). */
@media (min-width: 1100px) {
  .site-header .brand { margin-inline-end: 21px; height: 44px; }
  .site-header .header-actions { margin-inline-start: auto; }
  html[lang="ar"] .site-header .brand-text { line-height: 1.2; }
  html[lang="ar"] .site-header .site-nav a { line-height: 1.25; padding-top: 0; padding-bottom: 5px; }
}
@media (min-width: 1300px) { .site-header .brand { min-width: 219px; } }
/* "Open to work" wire: a slim ticker under the header, from the board's edge to the scene's edge (desktop only) */
.wire { display: none; }
@media (min-width: 1100px) {
  .wire { display: block; position: absolute; z-index: 2; top: 4px; height: 38px; inset-inline-start: calc(var(--gutter) + var(--bw) + 24px); inset-inline-end: var(--gutter);
    overflow: hidden; border-block: 2px solid #6B4A2B; background: #EFE3C8; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 2px 4px -2px rgba(40, 24, 8, 0.5); }
  :root[data-active-theme="dark"] .wire { background: #3A2A1C; border-color: #1E140B; box-shadow: inset 0 1px 0 rgba(255, 230, 190, 0.08); }
  .wire:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
  .wire-track { display: flex; width: max-content; }
  .wire ul { display: flex; flex: none; }
  .wire li { padding-inline: 14px; font-family: "Typewriter", var(--type); font-weight: 700; font-size: 15.5px; line-height: 34px; letter-spacing: .12em; text-transform: uppercase; white-space: nowrap; color: #1B2A41; }
  :root[data-active-theme="dark"] .wire li { color: #F3EAD7; }
  .wire li::after { content: "•"; margin-inline-start: 28px; color: #B42318; }
  :root[data-active-theme="dark"] .wire li::after { color: #E5604D; }
  html[lang="ar"] .wire li { font-family: var(--font); font-size: 16.5px; letter-spacing: normal; text-transform: none; }
}
@media (min-width: 1100px) and (prefers-reduced-motion: no-preference) {
  .wire-track { animation: tape-run 38s linear infinite; }
  html[dir="rtl"] .wire-track { animation-name: tape-run-rtl; }
  .wire:is(:hover, :focus-within) .wire-track, .hero.is-off .wire-track { animation-play-state: paused; }
}
/* Bigger, bolder type (tokens): 17 px root on wide screens (body 18 px), body weight 500, Arabic +1 px; small labels never under 14 px */
@media (min-width: 1100px) { html { font-size: 106.25%; } }
body { font-weight: 500; }
html[lang="ar"] body { font-size: calc(1.0625rem + 1px); }
:root { --text-3: #3F4352; }
:root[data-active-theme="dark"] { --text-3: #C4B9A3; }
@media (min-width: 1300px) { .site-header .site-nav a { padding-inline: 7px; letter-spacing: .03em; } .site-header .brand { padding-inline: 10px; } }
/* ---------- #21 Desktop hero = one fixed 1512 x 770 stage, scaled as one picture ----------
   Everything in the scene (board, walls, wire, calendars, desk) is laid out once at 1512 x 770 px; .stage-in is then
   scaled by k = page width / 1512 (full width; capped at 2040 px on ultra-wide screens). Resize and zoom change only k, so nothing drifts. */
.stage, .stage-in { display: contents; }
:root { --min14: 14px; }
@property --k { syntax: "<number>"; inherits: true; initial-value: 1; }
@media (min-width: 1100px) {
  .hero { height: auto; container-type: normal; padding-bottom: 50px; }
  .stage { display: block; position: relative; width: min(100%, 2040px); margin-inline: auto; aspect-ratio: 1512 / 770; container-type: inline-size; }
  .stage-in { display: block; position: absolute; top: 0; left: 0; width: 1512px; height: 770px; container-type: size;
    --k: tan(atan2(100cqw, 1512px)); transform: scale(var(--k)); transform-origin: 0 0;
    --min14: max(14px, calc(11px / var(--k))); /* small labels never under 11 px on screen when the stage is scaled down */
    --wsc: calc((100cqw - var(--max)) / 2 + var(--gutter));
    --s: .9125px; --bw: min(700px, calc(100cqw - 2 * var(--wsc) - 470 * var(--s) - 40px)); }
  .hero-wrap { inset: 0; }
  .hero-scene { bottom: 0; }
  .calendars { bottom: calc(var(--s) * 24); width: 580px; }
  /* left wall zone (x 0-196): clock 110, then calendar + coat (80 each) side by side, then at the edge a tall document shelf
     with the plant beside it on the baseline (y 635), the mirror of the right bookcase and plant */
  .lwall > .lw-clock { inset-inline-start: 43px; width: 110px; }
  .lw-row { top: 146px; inset-inline-start: 12px; gap: 12px; }
  .lw-row > :is(.lw-cal, .lw-coat) { width: 80px; }
  .lw-bottom { bottom: 135px; gap: 14px; }
  .lw-bottom > .lw-shelf { width: 96px; }
  /* stat calendars: long labels fit their tab */
  .calendars .cal-top { letter-spacing: 0; padding-inline: 2px; }
  .board-face { padding-bottom: 18px; }
  .string { padding-top: 18px; }
  .string + .string { margin-top: 10px; }
}
/* Wire ticker: a vintage green strip, cream type (5.3:1 light, 8.4:1 dark), gold dots */
@media (min-width: 1100px) {
  .wire { background: #2E6B4A; box-shadow: inset 0 1px 0 rgba(255, 246, 220, 0.18), 0 2px 4px -2px rgba(40, 24, 8, 0.5); }
  :root[data-active-theme="dark"] .wire { background: #1F4A35; }
  .wire li, :root[data-active-theme="dark"] .wire li { color: #F3EAD3; }
  .wire li::after, :root[data-active-theme="dark"] .wire li::after { color: #E2BD6A; }
}
/* ==== H-C start ==== */
/* Arabic header (desktop): the file label is as big as the English one (Naskh name and role, centred, the role on the
   tabs' baseline), and the tab strip grows to fill the row so the CV stamp sits as close to the last tab as in English.
   English and mobile are untouched. */
@media (min-width: 1100px) {
  html[lang="ar"] .site-header .brand { justify-content: center; }
  html[lang="ar"] .site-header .brand-text { align-items: center; padding-bottom: 3px; }
  html[lang="ar"] .site-header .brand-name { font-size: .9375rem; line-height: 1.1; letter-spacing: normal; }
  html[lang="ar"] .site-header .brand-role { font-size: max(13px, .78125rem); font-weight: 600; line-height: 1.2; letter-spacing: normal; }
  html[lang="ar"] .site-header .site-nav { flex: 1 1 auto; margin-inline-end: 3px; }
  html[lang="ar"] .site-header .site-nav li { flex: 1 1 auto; }
  html[lang="ar"] .site-header .site-nav a { justify-content: center; }
}
/* 1100-1299 px: the English label is 206 px wide here (its own text); the Arabic one matches it */
@media (min-width: 1100px) and (max-width: 1299px) { html[lang="ar"] .site-header .brand { min-width: 206px; } html[lang="ar"] .site-header .site-nav { margin-inline-end: 7px; } }
/* ==== H-C end ==== */
/* ==== H-B start ==== */
/* Profile: key skills and education typed under the about text, on the folder */
#profile .pf-more { margin-top: 24px; padding-top: 16px; border-top: 1px dashed var(--line-strong); }
#profile .pf-k { font-family: var(--type); font-size: max(var(--min14), .75rem); font-weight: 700; line-height: 1.5; letter-spacing: .14em; text-transform: uppercase; color: var(--text); }
html[lang="ar"] #profile .pf-k { font-family: var(--font); font-size: .9375rem; letter-spacing: normal; text-transform: none; }
#profile .pf-skills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
#profile .pf-skills li { padding: 2px 8px; background: var(--paper-2); border: 1px dashed var(--text-3); color: var(--text); font-weight: 600; font-size: max(var(--min14), .875rem); line-height: 1.5; }
#profile .pf-edu { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; margin-top: 18px; }
#profile .pf-edu dd { font-weight: 600; color: var(--text); }
#profile .pf-edu .school { font-weight: 700; }
/* Platforms: the paper label is only as tall as its text; the binder cover shows below it (no blank paper band) */
#platforms .binder-label { height: auto; }
/* Expertise: every form the same height; text stays at the top, the DC drawer tag at the bottom */
@media (min-width: 640px) { #expertise .forms { grid-auto-rows: 1fr; } }
/* Certifications: Oracle's four in two columns where the frame is wide; each frame notes where that platform was used */
#certifications .certificate { container-type: inline-size; }
@container (min-width: 460px) { #certifications .cert-list.cols { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 18px; } }
#certifications .cert-list .date { flex-basis: 100%; padding-inline-start: 30px; }
#certifications .cert-used { margin-top: 16px; padding-top: 10px; border-top: 1px dashed color-mix(in srgb, currentColor 35%, transparent); font-size: .9375rem; line-height: 1.5; }
#certifications .cert-used b { font-weight: 700; }
@media (min-width: 560px) { #certifications .certificate:has(.cert-used) { padding-bottom: 72px; } }
/* Hero board: the statement is signed; the memo is dated and has a subject line */
.board .statement { display: flex; flex-direction: column; }
.board .statement .sig { margin-top: auto; padding-top: 10px; text-align: end; font-family: var(--head); font-style: italic; font-weight: 400; font-size: max(var(--min14), .9375rem); color: var(--card-ink-2); }
html[lang="ar"] .board .statement .sig { font-family: var(--font); font-style: normal; font-weight: 600; }
.memo-h { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 2px 10px; }
.memo-date { font-size: max(var(--min14), .8125rem); letter-spacing: .08em; color: var(--card-ink-2); white-space: nowrap; }
html[lang="ar"] .memo-date { letter-spacing: normal; }
.memo-re { display: block; margin-top: 4px; padding-bottom: 4px; border-bottom: 1px dashed rgba(27, 42, 65, 0.35); font-family: var(--type); font-size: max(var(--min14), .8125rem); font-weight: 700; line-height: 1.3; }
html[lang="ar"] .memo-re { font-family: var(--font); letter-spacing: normal; line-height: 1.45; }
/* the two new lines fit in the row's existing height: the WHILE YOU WERE OUT card still sets it */
.memo-act { margin-top: 2px; }
/* the widest boards (tablets): the address fits beside "To:", which pays for the new subject line */
@container (min-width: 600px) { .memo-to .memo-addr { display: inline; } }
/* ==== H-B end ==== */
/* ==== H-F start ==== */
/* Desk agents: agent B (white humanoid, AGENT · TRANSMITTALS) types at the hero's old CRT, whose screen scrolls code;
   agent A (round-eye chibi, AGENT · INDEX) types on a charcoal 90s notebook on a stack of files in Contact. Each lives in
   its own <svg class="ill bot-layer">, so its repaints never touch the big scene. Colours come from the .ill tokens (day and night office). Transform and opacity animations only.
   Resting pose = 3/4 typing view: --rest squashes each face, chest and ear disc toward the screen; a look animates
   every part from --rest to --look (the front view) and back. */
.bot2 {
  --ag-char: color-mix(in srgb, var(--metal-3) 50%, #14171B); --ag-char-2: color-mix(in srgb, var(--metal-3) 22%, #0E1013);
  --ag-key: color-mix(in srgb, var(--metal-3) 78%, #14171B); --ag-tan: color-mix(in srgb, var(--beige-3) 70%, var(--ill-amber));
  --ag-teal: color-mix(in srgb, var(--phos) 55%, var(--bp)); --ag-copper: color-mix(in srgb, var(--ill-amber) 55%, var(--ill-red));
  --ag-white: var(--ill-paper); --ag-glow-o: .22; --ag-light-o: .12; --ag-scr-o: .16; --ag-tl: var(--ill-amber);
}
/* night: the screens glow more and light the robots' faces */
:root[data-active-theme="dark"] .bot2 { --ag-glow-o: .8; --ag-light-o: .26; --ag-scr-o: .34; --ag-tl: var(--glow); }

/* laptop and CRT extras */
.bot2 .lt-glow { opacity: var(--ag-glow-o); }
.bot2 .lt-glow-s { stop-color: var(--phos); }
.bot2 .lt-shadow { fill: var(--ill-shadow); }
.bot2 .lt-deck, .bot2 .lt-lid { fill: var(--ag-char); }
.bot2 .lt-edge, .bot2 .lt-rim, .bot2 .lt-well { fill: var(--ag-char-2); }
.bot2 .lt-edge-2 { fill: color-mix(in srgb, var(--ag-char) 70%, var(--ag-char-2)); }
.bot2 .lt-keys { fill: none; stroke: var(--ag-key); stroke-width: 3; }
.bot2 .lt-light { fill: var(--ag-tl); opacity: var(--ag-light-o); }
.bot2 .lt-nub, .bot2 .lt-dot { fill: var(--ill-red); }
.bot2 .lt-btn { fill: none; stroke: var(--ag-key); stroke-width: 2; }
.bot2 .lt-btn-r { fill: none; stroke: var(--ill-red); stroke-width: 2; }
.bot2 .lt-led { fill: var(--phos); }
.bot2 .lt-press { fill: var(--phos); opacity: 0; }
.bot2 .crt-press { fill: var(--ill-amber); opacity: 0; }
.bot2 .lt-thinklight { fill: var(--ag-tl); }
.bot2 .lt-badge { fill: none; stroke: var(--ag-key); stroke-width: 1.4; stroke-linecap: round; }
.bot2 :is(.lt-code-c, .lt-code-k, .lt-code-d) { fill: none; stroke: var(--phos); stroke-width: 2.8; stroke-linecap: round; }
.bot2 .lt-code-k { stroke: var(--ill-amber); }
.bot2 .lt-code-d { opacity: .45; }
.bot2 .crt-code :is(.lt-code-c, .lt-code-k, .lt-code-d) { stroke-width: 3; }
.bot2 .lt-code :is(.lt-code-c, .lt-code-k, .lt-code-d) { stroke-width: 2; }
.bot2 .ag-status { fill: var(--phos); }

/* the passed sheet; brass name plates on the desk front, outside the two stools (B's under the keyboard, A's under
   the in-tray). Phones: the plates grow 1.6x so their names stay about 10 px tall. */
.bot2 .plate { fill: color-mix(in srgb, var(--ill-amber) 80%, var(--ill-paper)); stroke: var(--wood-2); stroke-width: 1.4; }
.bot2 .plate-t { font-family: "Typewriter", var(--type, ui-monospace, monospace); font-size: 11px; font-weight: 700; letter-spacing: .06em; fill: var(--ill-navy); }
html[lang="ar"] .bot2 .plate-t { font-family: var(--font, sans-serif); font-size: 12.8px; letter-spacing: normal; }
.bot2 .plate-b { transform-origin: 360px 399px; } /* the plate hangs under the robot's stool */
@media (max-width: 639px) { .bot2 .plate-b { transform: scale(1.6); } }

/* both robots */
.bot2 .ag-shadow { fill: var(--ill-shadow); }
.bot2 :is(.ag-stem, .ag-base) { fill: var(--metal-3); }
.bot2 .ag-caster { fill: var(--ag-char); }
.bot2 .ag-ring { fill: none; stroke: var(--metal-3); stroke-width: 2.6; }
.bot2 .ag-seat { fill: var(--ill-green); stroke: var(--ill-navy); stroke-width: 2.2; }
.bot2 .ag-neck { fill: var(--ag-char); stroke: var(--ill-navy); stroke-width: 1.8; }
.bot2 .ag-visor { fill: var(--screen); }
.bot2 .ag-shine { fill: var(--ill-paper); }
.bot2 .ag-gloss { fill: none; stroke: var(--ill-paper); stroke-width: 2.6; stroke-linecap: round; opacity: .55; }
.bot2 .ag-scrlight { fill: var(--phos); opacity: var(--ag-scr-o); }
.bot2 .ag-stalk { fill: none; stroke: var(--ill-navy); stroke-width: 2.2; stroke-linecap: round; }
.bot2 .ag-limb-o { fill: none; stroke: var(--ill-navy); stroke-width: 9; stroke-linecap: round; stroke-linejoin: round; }
.bot2 .ag-limb { fill: none; stroke: var(--ag-char); stroke-width: 4.4; stroke-linecap: round; stroke-linejoin: round; }
.bot2 .ag-leg .ag-limb-o { stroke-width: 11; } .bot2 .ag-leg .ag-limb { stroke-width: 6.4; }
.bot2 .ag-hand { fill: var(--ag-char); stroke: var(--ill-navy); stroke-width: 2; }
/* A: bronze-tan shell, dark back, teal eyes */
.bot2 :is(.ra-shell, .ra-ear, .ra-foot, .ra-cap) { fill: var(--ag-tan); stroke: var(--ill-navy); stroke-width: 2.4; }
.bot2 .ra-dark { fill: var(--ag-char); }
.bot2 .ra-ear-in { fill: color-mix(in srgb, var(--ag-tan) 80%, var(--ill-navy)); }
.bot2 :is(.ra-slit, .ra-sole) { fill: none; stroke: var(--ag-teal); stroke-width: 2.2; stroke-linecap: round; }
.bot2 :is(.ra-ball, .ra-btn-c) { fill: var(--ag-teal); }
.bot2 .ra-btn { fill: var(--screen); stroke: var(--ag-teal); stroke-width: 2.2; }
.bot2 .ra-eye { fill: var(--screen); stroke: var(--ag-teal); stroke-width: 3.6; }
.bot2 .ra-pupil { fill: color-mix(in srgb, var(--ag-teal) 45%, var(--screen)); }
.bot2 .ra-happy { fill: none; stroke: var(--ag-teal); stroke-width: 3.4; stroke-linecap: round; opacity: 0; }
/* B: white shell, copper ears and pads, white eyes */
.bot2 .rb-shell { fill: var(--ag-white); stroke: var(--ill-navy); stroke-width: 2.4; }
.bot2 .agent-b .ag-limb { stroke: var(--ag-white); }
.bot2 :is(.rb-ear, .rb-pad, .rb-boot) { fill: var(--ag-copper); stroke: var(--ill-navy); stroke-width: 2; }
.bot2 .rb-ear-in { fill: color-mix(in srgb, var(--ag-copper) 70%, #000); }
.bot2 .rb-tip { fill: var(--ag-copper); }
.bot2 .rb-bar { fill: var(--phos); }
.bot2 .rb-eye { fill: var(--ag-white); }
.bot2 .rb-happy { fill: none; stroke: var(--ag-white); stroke-width: 2.6; stroke-linecap: round; opacity: 0; }
.bot2 :is(.ra-wave, .rb-wave) { opacity: 0; }

/* the 3/4 typing pose (static) and the front view each part turns to */
.bot2 .ra-face { transform-origin: 586px 225px; --rest: translate(-33px, 2px) scaleX(.5); }
.bot2 .ra-chest { transform-origin: 586px 279px; --rest: translate(-12px, 0) scaleX(.5); }
.bot2 .ra-back { --rest: translate(0, 0); --look: translate(30px, 0); }
.bot2 .ra-back2 { --rest: translate(0, 0); --look: translate(24px, 0); }
.bot2 .ra-ear-n { transform-origin: 605px 225px; --rest: translate(0, 0) scaleX(1); --look: translate(21px, 0) scaleX(.42); }
.bot2 .ra-ear-f { transform-origin: 546px 225px; --rest: translate(21px, 0) scaleX(.42); --look: translate(0, 0) scaleX(.42); }
.bot2 .rb-face { transform-origin: 398px 229px; --rest: translate(-21px, 2px) scaleX(.5); }
.bot2 .rb-chest { transform-origin: 398px 271px; --rest: translate(-11px, 0) scaleX(.5); }
.bot2 .rb-ant { transform-origin: 398px 208px; --rest: translate(3px, 0) scaleX(.45); }
.bot2 .rb-ear-n { transform-origin: 410px 229px; --rest: translate(0, 0) scaleX(1); --look: translate(14px, 0) scaleX(.45); }
.bot2 .rb-ear-f { transform-origin: 372px 229px; --rest: translate(14px, 0) scaleX(.45); --look: translate(4px, 0) scaleX(.45); }
.bot2 :is(.ra-face, .ra-chest, .ra-back, .ra-back2, .ra-ear-n, .ra-ear-f, .rb-face, .rb-chest, .rb-ant, .rb-ear-n, .rb-ear-f) { transform: var(--rest); }
.bot2 .ra-head { transform-origin: 586px 254px; } .bot2 .rb-head { transform-origin: 398px 250px; }
.bot2 .ra-eyes { transform-origin: 586px 225px; } .bot2 .rb-eyes { transform-origin: 398px 229px; }
.bot2 .ra-arm-n { transform-origin: 592px 268px; } .bot2 .ra-arm-f { transform-origin: 574px 266px; } .bot2 .ra-wave { transform-origin: 604px 268px; }
.bot2 .rb-arm-n { transform-origin: 402px 266px; } .bot2 .rb-arm-f { transform-origin: 384px 264px; } .bot2 .rb-wave { transform-origin: 418px 264px; }

@media (prefers-reduced-motion: no-preference) {
  .bot2 .ra-bob { animation: ag-bob 2.6s ease-in-out infinite; }
  .bot2 .rb-bob { animation: ag-bob 3s ease-in-out .7s infinite; }
  .bot2 :is(.ra-arm-n, .rb-arm-n) { animation: ag-tap .3s ease-in-out infinite alternate; }
  .bot2 :is(.ra-arm-f, .rb-arm-f) { animation: ag-tap .26s ease-in-out .1s infinite alternate; }
  .bot2 .ra-eyes { animation: ag-blink 4.2s infinite; }
  .bot2 .rb-eyes { animation: ag-blink 5s 1.6s infinite; }
  .bot2 .lt-code { animation: lt-scroll 4.8s steps(8, end) infinite; }
  .bot2 .crt-code { animation: crt-scroll 5.6s steps(8, end) infinite; }
  .bot2 .lt-press { animation: lt-press 1.1s step-end infinite; }
  .bot2 .crt-press { animation: crt-press 1.3s step-end infinite; }
  .bot2 .ag-status { animation: ag-status 2.4s ease-in-out infinite alternate; }
  /* Look (1.5 s): faces, chests, ears and antennae slide round to the front, head tilt, happy eyes, wave, turn back */
  .bot2 .is-looking :is(.ra-face, .ra-chest, .ra-back, .ra-back2, .ra-ear-n, .ra-ear-f, .rb-face, .rb-chest, .rb-ant, .rb-ear-n, .rb-ear-f) { animation: ag-turn 1.5s ease-in-out both; }
  .bot2 .is-looking :is(.ra-head, .rb-head) { animation: ag-tilt 1.5s ease-in-out both; }
  .bot2 .is-looking :is(.ra-eyes, .rb-eyes) { animation: ag-eyes 1.5s step-end both; }
  .bot2 .is-looking :is(.ra-happy, .rb-happy) { animation: ag-happy 1.5s step-end both; }
  .bot2 .is-looking :is(.ra-arm-n, .rb-arm-n) { animation: ag-off 1.5s step-end both; }
  .bot2 .is-looking :is(.ra-wave, .rb-wave) { animation: ag-on 1.5s step-end both, ag-wave 1.5s ease-in-out both; }
  /* Off-screen (JS .paused or the hero's .is-off) and while the page scrolls, everything holds still */
  .bot2.paused *, .bot2.scrolling *, .hero.is-off .bot2 * { animation-play-state: paused !important; }
}
@keyframes ag-bob { 50% { transform: translateY(-1.4px); } }
@keyframes ag-tap { to { transform: rotate(3deg); } }
@keyframes ag-blink { 0%, 94%, 100% { transform: none; } 97% { transform: scaleY(.1); } }
@keyframes ag-status { from { opacity: 1; } to { opacity: .25; } }
@keyframes lt-scroll { to { transform: translateY(-32px); } }
@keyframes crt-scroll { to { transform: translateY(-96px); } }
/* one key lights up under the hands (laptop: deck coordinates; CRT: hops between three keys) */
@keyframes lt-press {
  0% { opacity: .9; transform: translate(26.9px, 11.5px); } 12% { opacity: 0; transform: translate(26.9px, 11.5px); }
  25% { opacity: .9; transform: translate(33.9px, 7.5px); } 37% { opacity: 0; transform: translate(33.9px, 7.5px); }
  50% { opacity: .9; transform: translate(32.5px, 11.5px); } 62% { opacity: 0; transform: translate(32.5px, 11.5px); }
  75% { opacity: .9; transform: translate(38.1px, 3.5px); } 87%, 100% { opacity: 0; transform: translate(38.1px, 3.5px); }
}
@keyframes crt-press {
  0% { opacity: .85; transform: none; } 12% { opacity: 0; transform: none; }
  33% { opacity: .85; transform: translate(4px, -7px); } 45% { opacity: 0; transform: translate(4px, -7px); }
  66% { opacity: .85; transform: translate(11.4px, 0); } 78%, 100% { opacity: 0; transform: translate(11.4px, 0); }
}
@keyframes ag-turn { 0%, 100% { transform: var(--rest); } 20%, 80% { transform: var(--look, none); } }
@keyframes ag-tilt { 0%, 18%, 82%, 100% { transform: none; } 34%, 66% { transform: rotate(-5deg); } }
@keyframes ag-eyes { 0% { opacity: 1; } 42% { opacity: 0; } 62%, 100% { opacity: 1; } }
@keyframes ag-happy { 0% { opacity: 0; } 42% { opacity: 1; } 62%, 100% { opacity: 0; } }
@keyframes ag-off { 0% { opacity: 1; } 16% { opacity: 0; } 84%, 100% { opacity: 1; } }
@keyframes ag-on { 0% { opacity: 0; } 16% { opacity: 1; } 84%, 100% { opacity: 0; } }
@keyframes ag-wave { 0% { transform: rotate(50deg); } 22% { transform: rotate(0deg); } 34%, 58% { transform: rotate(-14deg); } 46%, 70% { transform: rotate(8deg); } 84% { transform: rotate(30deg); } 100% { transform: rotate(50deg); } }

/* Reduced motion: one static pose, both typing; no key flash or passing sheet */
@media (prefers-reduced-motion: reduce) { .bot2 :is(.lt-press, .crt-press) { display: none; } }

/* 3D robots (robot3d.js) on: they bring their own robots and laptop, so the SVG ones fade out. The CRT code, in-tray,
   desk plates and markers stay. */
.bot-layer :is(.agent-a, .agent-b, .laptop2) { transition: opacity .45s ease; }
html[data-robot3d="on"] .bot-layer :is(.agent-a, .agent-b, .laptop2) { opacity: 0; visibility: hidden; transition: opacity .45s ease, visibility 0s .45s; }

/* 3D on (robot3d.js drops .no-3d from .hero-scene / .contact-bot): only the 2D robot bodies, their stools and the 2D
   laptop go; the plates, the CRT code, status light and lit key, the file stack and the markers stay. */
.hero-scene:not(.no-3d) .bot2 .agent, .contact-bot:not(.no-3d) .bot2 :is(.agent, .laptop2) { display: none; }
.hero-scene:not(.no-3d) .bot2 .agent *, .contact-bot:not(.no-3d) .bot2 :is(.agent, .laptop2) * { animation: none; }

/* Contact: AGENT · INDEX sits on a stack of files under the legal pad, beside the transmittal (desktop: right of the desk
   phone, reaching into the column gap). Mirrored in Arabic with its plate turned back. Markers for the 3D overlay:
   .bot-anchor-c (floor under the stack) and .bot-head-c (head centre). */
.contact-bot { position: absolute; z-index: 1; top: calc(100% + 10px); inset-inline-end: 8px; width: 140px; pointer-events: none; }
.contact-bot .ill { display: block; width: 100%; height: auto; aspect-ratio: 118 / 162; border-radius: 0; overflow: visible; }
.contact-bot .plate-t { font-size: 10px; letter-spacing: .05em; }
html[lang="ar"] .contact-bot .plate-t { font-size: 11.6px; letter-spacing: normal; }
html[dir="rtl"] .contact-bot .ill { transform: scaleX(-1); }
html[dir="rtl"] .contact-bot .ill text { transform: scaleX(-1); transform-box: fill-box; transform-origin: center; }
@media (max-width: 1023px) { #contact .contact-grid > div:first-child { margin-bottom: 224px; } }
/* desktop: as big as the gap right of the phone allows (the phone ends 16% + 188 px from the pad's start) */
@media (min-width: 1024px) { .contact-bot { top: calc(100% + 2px); inset-inline-end: -30px; width: min(180px, calc(84% - 166px)); } }
/* ==== H-F end ==== */
/* ==== H-E start ==== */
/* Mobile pass (H-E): 14 px text floor, calendars 2x2, tiny atlas labels off. Phones and tablets only. */
@media (max-width: 1099px) {
  .site-header :is(.brand-name, .brand-role), .site-header .menu-btn { font-size: 14px; }
  .memo-addr { font-size: 14px; }
  .calendars { grid-template-columns: repeat(2, minmax(0, 300px)); justify-content: center; }
  .ksa-map :is(.sea-l, .city-l, .grat-l, .legend, .north text) { display: none !important; }
}
/* Contrast fixes found in the mobile pass that apply at every width: folder tab numbers, project tenure, dark FILE COPY stamp */
main > section.folder:not(.hero) .folder-tab .no { color: var(--tab-ink); }
#projects .divider .tenure { color: #1B2A41; }
:root[data-active-theme="dark"] .fc-stamp { color: #7A1912; border-color: #7A1912; }
/* ==== H-E end ==== */
