/* ============================================================
   Kareem Abdulaziz — personal site · v3 (Kareem's mockup + neon touch)
   Navy + indigo, one-page home with anchored sections, calm layout, neon glows and motion.
   Theme: [data-theme] dark (default) | light · logical properties only (LTR + RTL)
   Perf rules: no backdrop-filter over moving layers, no animated gradients, --p set on the bar only.
   ============================================================ */

:root,
:root[data-theme="dark"] {
  --bg: #070b18;
  --bg-2: #0a0f22;
  --card: #0d1330;
  --card-2: #111838;
  --line: rgba(129, 140, 248, 0.13);
  --line-2: rgba(129, 140, 248, 0.26);
  --ink: #eef0ff;
  --ink-2: #c3c8e6;
  --muted: #8e97bd;
  --accent: #6366f1;
  --accent-2: #8b5cf6;
  --accent-ink: #a5b4fc;
  --g1: 99 102 241;
  --g2: 139 92 246;
  --g3: 34 211 238;
  --white-tile: #ffffff;
  --shadow: 0 24px 60px rgba(2, 4, 16, 0.55);
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f6f7fd;
  --bg-2: #eef0fb;
  --card: #ffffff;
  --card-2: #f7f8ff;
  --line: rgba(49, 46, 129, 0.1);
  --line-2: rgba(49, 46, 129, 0.2);
  --ink: #0f1330;
  --ink-2: #30365a;
  --muted: #5d6487;
  --accent: #4f46e5;
  --accent-2: #7c3aed;
  --accent-ink: #4f46e5;
  --shadow: 0 24px 60px rgba(49, 46, 129, 0.12);
  color-scheme: light;
}
:root {
  --grad: linear-gradient(95deg, var(--accent), var(--accent-2));
  --font: "Inter", "Segoe UI", system-ui, sans-serif;
  --hand: "Caveat", "Segoe Script", cursive;
  --wrap: 1140px;
  --gutter: clamp(16px, 4vw, 40px);
  --r: 16px;
  --r-sm: 12px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}
html[lang="ar"] { --font: "Readex Pro", "Segoe UI", Tahoma, sans-serif; --hand: "Aref Ruqaa", "Readex Pro", serif; }

/* ---------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 16px; line-height: 1.65; -webkit-font-smoothing: antialiased; overflow-x: clip; }
html[lang="ar"] body { line-height: 1.85; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
p { margin: 0 0 1em; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; font-weight: 700; letter-spacing: -0.02em; }
html[lang="ar"] :is(h1, h2, h3, h4) { line-height: 1.45; letter-spacing: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
::selection { background: rgb(var(--g1) / 0.35); }
:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 3px; border-radius: 6px; }
.skip { position: fixed; inset-inline-start: 12px; top: -60px; z-index: 200; padding: 10px 16px; border-radius: 10px; background: var(--accent); color: #fff; font-weight: 600; }
.skip:focus { top: 12px; }
.ltr { direction: ltr; unicode-bidi: isolate; }
.muted { color: var(--muted); }
.accent { color: var(--accent-ink); font-weight: 600; }
.grad { background: linear-gradient(95deg, #6366f1, #8b5cf6 55%, #a855f7); -webkit-background-clip: text; background-clip: text; color: transparent; }
:root[data-theme="light"] .grad { background: linear-gradient(95deg, #4f46e5, #7c3aed); -webkit-background-clip: text; background-clip: text; }
.ico { width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ico.fill { fill: currentColor; stroke: none; }
[dir="rtl"] .flip { transform: scaleX(-1); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: linear-gradient(180deg, #6366f1, #8b5cf6); border-radius: 999px; border: 2px solid var(--bg); }
@supports not selector(::-webkit-scrollbar) { html { scrollbar-color: #6366f1 var(--bg); scrollbar-width: thin; } }
.progress { position: fixed; top: 0; inset-inline: 0; height: 2px; z-index: 150; background: var(--grad); box-shadow: 0 0 12px rgb(var(--g1)); transform-origin: left; transform: scaleX(var(--p, 0)); }
[dir="rtl"] .progress { transform-origin: right; }
.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }

/* ---------------------------------------------------------------- header */
.site-header { position: sticky; top: 0; z-index: 60; transition: background-color 0.3s, border-color 0.3s; border-bottom: 1px solid transparent; }
.site-header.scrolled { background: color-mix(in srgb, var(--bg) 94%, transparent); border-bottom-color: var(--line); }
.header-row { display: flex; align-items: center; gap: 22px; height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 16px; white-space: nowrap; }
.mark { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; color: #fff; font-size: 14px; font-weight: 800; letter-spacing: 0.02em;
  background: linear-gradient(135deg, #6366f1, #a855f7); box-shadow: 0 0 18px rgb(var(--g1) / 0.55); }
.nav { margin-inline: auto; }
.nav ul { display: flex; gap: 4px; }
.nav a { position: relative; display: inline-flex; align-items: center; min-height: 40px; padding-inline: 12px; color: var(--ink-2); font-size: 14.5px; font-weight: 500; transition: color 0.25s; }
.nav a::after { content: ""; position: absolute; inset-inline: 12px; bottom: 2px; height: 2px; border-radius: 2px; background: var(--grad); box-shadow: 0 0 10px rgb(var(--g1)); transform: scaleX(0); transition: transform 0.35s var(--ease); }
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"], .nav a.active { color: var(--accent-ink); }
.nav a[aria-current="page"]::after, .nav a.active::after { transform: scaleX(1); }
.controls { display: flex; align-items: center; gap: 6px; }
.icon-btn { min-width: 40px; height: 40px; padding-inline: 9px; border-radius: 10px; display: inline-grid; place-items: center; background: transparent; border: 1px solid transparent; color: var(--ink-2); cursor: pointer; transition: color 0.25s, border-color 0.25s, box-shadow 0.3s; }
.icon-btn:hover { color: var(--ink); border-color: var(--line-2); box-shadow: 0 0 14px rgb(var(--g1) / 0.25); }
.lang-btn { font-size: 14px; font-weight: 600; }
html[lang="en"] .lang-btn { font-family: "Segoe UI", Tahoma, sans-serif; }
[data-theme-toggle] .sun { display: none; }
:root[data-theme="light"] [data-theme-toggle] .sun { display: block; }
:root[data-theme="light"] [data-theme-toggle] .moon { display: none; }
.menu-btn { display: none; }
@media (max-width: 1020px) {
  .menu-btn { display: inline-grid; }
  .controls .header-cta { display: none; }
  .controls { margin-inline-start: auto; }
  .nav { position: absolute; inset-inline: var(--gutter); top: calc(100% + 6px); margin: 0; padding: 8px; display: none; background: var(--card); border: 1px solid var(--line-2); border-radius: 14px; box-shadow: var(--shadow); }
  .nav.open { display: block; animation: drop 0.3s var(--ease); }
  .nav ul { flex-direction: column; }
  .nav a { width: 100%; min-height: 46px; }
  .nav a::after { inset-inline: 12px auto; width: 22px; bottom: 8px; }
}
@keyframes drop { from { opacity: 0; transform: translateY(-6px); } }

/* ---------------------------------------------------------------- buttons */
.btn { position: relative; overflow: hidden; isolation: isolate; display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding-inline: 22px;
  border-radius: 10px; font-size: 15px; font-weight: 600; white-space: nowrap; cursor: pointer; border: 1.5px solid transparent; transition: transform 0.3s var(--spring), box-shadow 0.3s, background-color 0.3s, color 0.25s; }
.btn .ico { width: 18px; height: 18px; transition: transform 0.3s var(--spring); }
.btn:hover .ico { transform: translateX(3px); }
[dir="rtl"] .btn:hover .ico.flip { transform: scaleX(-1) translateX(3px); }
.btn:active { transform: scale(0.97); }
.btn-sm { min-height: 40px; padding-inline: 14px; font-size: 14px; }
.btn-primary { color: #fff; background: linear-gradient(95deg, #5b5ff2, #7c5cf6); box-shadow: 0 8px 26px rgb(var(--g1) / 0.4); }
.btn-primary::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.35) 50%, transparent 70%); transform: translateX(-120%); transition: transform 0.7s var(--ease); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px rgb(var(--g1) / 0.6), 0 0 28px rgb(var(--g1) / 0.6), 0 0 60px rgb(var(--g2) / 0.35); }
.btn-primary:hover::after { transform: translateX(120%); }
.btn-outline { color: var(--ink); border-color: var(--accent); background: transparent; }
.btn-outline:hover { transform: translateY(-2px); background: rgb(var(--g1) / 0.12); box-shadow: 0 0 22px rgb(var(--g1) / 0.4); }
.ripple { position: absolute; border-radius: 50%; pointer-events: none; background: rgba(255, 255, 255, 0.4); transform: scale(0); animation: ripple 0.6s var(--ease) forwards; }
@keyframes ripple { to { transform: scale(4); opacity: 0; } }
.actions { display: flex; flex-wrap: wrap; gap: 14px; }
.text-link { display: inline-flex; align-items: center; gap: 6px; color: var(--accent-ink); font-weight: 600; font-size: 14.5px; }
.text-link .ico { width: 16px; height: 16px; transition: transform 0.3s var(--spring); }
.text-link:hover .ico { transform: translateX(4px); }
[dir="rtl"] .text-link:hover .ico.flip { transform: scaleX(-1) translateX(4px); }
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip { display: inline-flex; align-items: center; min-height: 26px; padding-inline: 11px; border-radius: 999px; font-size: 12.5px; color: var(--ink-2); background: var(--card-2); border: 1px solid var(--line); white-space: nowrap; }
.chip.ver { color: var(--accent-ink); border-color: rgb(var(--g1) / 0.35); background: rgb(var(--g1) / 0.1); font-weight: 600; direction: ltr; unicode-bidi: isolate; }
.badge-gold { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding-inline: 11px; border-radius: 999px; font-size: 12.5px; font-weight: 600; color: #f5c542; background: rgb(245 197 66 / 0.1); border: 1px solid rgb(245 197 66 / 0.45); box-shadow: 0 0 14px rgb(245 197 66 / 0.15); }
:root[data-theme="light"] .badge-gold { color: #8a6500; }
.badge-gold .ico { width: 15px; height: 15px; }

/* ---------------------------------------------------------------- sections */
.section { padding-block: clamp(40px, 5vw, 64px); border-top: 1px solid var(--line); position: relative; }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 14px 24px; margin-bottom: clamp(20px, 2.6vw, 28px); }
.kicker { display: inline-flex; align-items: center; gap: 10px; color: var(--accent-ink); font-size: 12.5px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 8px; }
.kicker::after { content: ""; width: 22px; height: 2px; border-radius: 2px; background: var(--grad); box-shadow: 0 0 8px rgb(var(--g1)); }
html[lang="ar"] .kicker { letter-spacing: 0; font-size: 14px; }
.sec-head h2 { font-size: clamp(26px, 3vw, 34px); }
.sec-sub { margin: 10px 0 0; color: var(--muted); max-width: 680px; }
.sub-head { font-size: 20px; margin: 32px 0 16px; }
.mini-head { font-size: 12.5px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent-ink); margin: 22px 0 10px; }
.mini-head.first { margin-top: 0; }
html[lang="ar"] .mini-head { letter-spacing: 0; font-size: 14px; }

.card { position: relative; isolation: isolate; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); transition: border-color 0.3s, transform 0.4s var(--ease), box-shadow 0.4s var(--ease); }
.card::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity 0.4s;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgb(var(--g1) / 0.13), transparent 45%); }
.card:hover::before { opacity: 1; }
.lift:hover { transform: translateY(-4px); border-color: rgb(var(--g1) / 0.5); box-shadow: 0 0 0 1px rgb(var(--g1) / 0.2), 0 18px 44px rgb(var(--g1) / 0.18); }

/* ---------------------------------------------------------------- hero */
.hero { position: relative; overflow: hidden; min-height: min(calc(100vh - 72px), 780px); display: flex; align-items: center; padding-block: 24px 70px; }
.hero-aurora { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.hero-aurora span { position: absolute; border-radius: 50%; will-change: transform; }
.hero-aurora span:first-child { width: 60vmax; height: 60vmax; inset-inline-end: -18vmax; top: -24vmax; background: radial-gradient(circle, rgb(var(--g1) / 0.28), transparent 62%); animation: drift1 22s var(--ease) infinite alternate; }
.hero-aurora span:last-child { width: 46vmax; height: 46vmax; inset-inline-start: -16vmax; bottom: -26vmax; background: radial-gradient(circle, rgb(var(--g2) / 0.18), transparent 62%); animation: drift2 28s var(--ease) infinite alternate; }
.hero-aurora.small span:first-child { width: 42vmax; height: 42vmax; top: -22vmax; }
@keyframes drift1 { to { transform: translate(-8vw, 10vh) scale(1.1); } }
@keyframes drift2 { to { transform: translate(10vw, -8vh) scale(1.15); } }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 30px; align-items: center; width: 100%; }
.hello { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; background: var(--card-2); border: 1px solid var(--line); font-size: 14px; font-weight: 500; color: var(--ink-2); }
.wave { display: inline-block; transform-origin: 70% 70%; animation: wave 2.4s ease-in-out infinite; }
@keyframes wave { 0%, 60%, 100% { transform: rotate(0); } 10%, 30% { transform: rotate(14deg); } 20% { transform: rotate(-8deg); } 40% { transform: rotate(-4deg); } 50% { transform: rotate(10deg); } }
.hero-name { font-size: clamp(44px, 6.4vw, 78px); font-weight: 800; letter-spacing: -0.035em; line-height: 1.05; margin: 18px 0 14px; }
html[lang="ar"] .hero-name { letter-spacing: 0; line-height: 1.3; }
.hero-role { font-size: clamp(18px, 1.8vw, 22px); font-weight: 600; color: var(--ink); margin-bottom: 16px; }
.hero-lead { color: var(--ink-2); max-width: 540px; margin-bottom: 30px; }
.hero-social { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 28px; }
.soc { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; color: var(--ink-2); transition: color 0.25s, background-color 0.25s, box-shadow 0.3s, transform 0.3s var(--spring); }
.soc:hover { color: #fff; background: rgb(var(--g1) / 0.2); box-shadow: 0 0 16px rgb(var(--g1) / 0.45); transform: translateY(-2px); }
.soc .ico { width: 20px; height: 20px; }

.hero-visual { position: relative; align-self: end; height: min(640px, 72vh); min-height: 460px; display: grid; justify-items: center; align-items: end; }
.blob { position: absolute; bottom: 4%; width: 78%; aspect-ratio: 0.82; border-radius: 58% 42% 50% 50% / 55% 50% 50% 45%;
  background: linear-gradient(165deg, #4f46e5 0%, #6d28d9 55%, rgba(76, 29, 149, 0.2) 100%); filter: blur(2px);
  box-shadow: 0 0 80px rgb(var(--g1) / 0.55), 0 0 160px rgb(var(--g2) / 0.3); animation: morph 14s ease-in-out infinite alternate; }
@keyframes morph { 50% { border-radius: 45% 55% 42% 58% / 50% 44% 56% 50%; transform: rotate(4deg) scale(1.03); } to { border-radius: 55% 45% 58% 42% / 44% 56% 44% 56%; transform: rotate(-3deg); } }
.hero-arc { position: absolute; inset: 0 -4% 0 -2%; width: 106%; height: 100%; overflow: visible; filter: drop-shadow(0 0 6px rgb(var(--g1) / 0.8)); }
.hero-arc path { stroke-dasharray: 1100; stroke-dashoffset: 1100; animation: draw 2.4s 0.4s var(--ease) forwards; }
[dir="rtl"] .hero-arc { transform: scaleX(-1); }
@keyframes draw { to { stroke-dashoffset: 0; } }
.cutout { position: absolute; z-index: 1; bottom: 0; left: 50%; translate: -50% 0; display: block; height: 100%; width: max-content; }
.cutout img { height: 100%; width: auto; max-width: none; object-fit: contain; }
.hand-note { position: absolute; z-index: 2; top: 16%; inset-inline-end: -2%; margin: 0; font-family: var(--hand); font-size: clamp(24px, 2.4vw, 32px); line-height: 1.15; color: var(--ink); transform: rotate(-12deg); max-width: 170px; text-align: center; text-shadow: 0 0 18px rgb(var(--g1) / 0.6); }
[dir="rtl"] .hand-note { transform: rotate(9deg); font-size: clamp(22px, 2.1vw, 28px); max-width: 150px; line-height: 1.55; top: 12%; }
.note-line { display: block; width: 130px; height: 20px; margin: 6px auto 0; color: var(--accent-ink); filter: drop-shadow(0 0 6px rgb(var(--g1))); }
.note-line path { stroke-dasharray: 170; stroke-dashoffset: 170; animation: draw 1.2s 1.6s var(--ease) forwards; }
.chip-float { position: absolute; z-index: 3; display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 12px; background: color-mix(in srgb, var(--card) 92%, transparent); border: 1px solid var(--line-2); box-shadow: var(--shadow), 0 0 22px rgb(var(--g1) / 0.2); animation: floaty 6s ease-in-out infinite; }
.chip-float .num { font-size: 22px; line-height: 1; color: var(--accent-ink); direction: ltr; }
.chip-float small { font-size: 12.5px; color: var(--ink-2); }
.chip-float .ico { width: 17px; height: 17px; color: #f5c542; }
.chip-float .dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 10px #22c55e; }
.cf1 { bottom: 26%; inset-inline-start: 0; }
.cf2 { bottom: 9%; inset-inline-end: 4%; animation-delay: -3s; }
@keyframes floaty { 50% { transform: translateY(-8px); } }
.scroll-down { position: absolute; bottom: 16px; left: 50%; translate: -50% 0; display: grid; justify-items: center; gap: 6px; font-size: 12px; color: var(--muted); z-index: 4; }
.mouse { width: 22px; height: 34px; border: 1.5px solid var(--muted); border-radius: 12px; position: relative; }
.mouse::after { content: ""; position: absolute; top: 6px; left: 50%; width: 3px; height: 7px; margin-left: -1.5px; border-radius: 2px; background: var(--accent-ink); animation: wheel 1.8s ease-in-out infinite; }
@keyframes wheel { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(10px); } }
@media (max-width: 900px) {
  .hero { min-height: 0; padding-block: 28px 80px; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-visual { height: 420px; min-height: 0; order: -1; margin-bottom: 18px; }
  .cf2 { bottom: 14%; }
  .hand-note { top: 10%; inset-inline-end: 2%; }
  .scroll-down { display: none; }
}

/* ---------------------------------------------------------------- moving strips */
.strip { position: relative; padding-block: 34px; border-top: 1px solid var(--line); }
.strip .marquee { -webkit-mask-image: none; mask-image: none; position: relative; }
.strip .marquee::before, .strip .marquee::after { content: ""; position: absolute; top: 0; bottom: 0; width: 12%; z-index: 2; pointer-events: none; }
.strip .marquee::before { left: 0; background: linear-gradient(90deg, var(--bg), transparent); }
.strip .marquee::after { right: 0; background: linear-gradient(270deg, var(--bg), transparent); }
.strip-title { text-align: center; color: var(--muted); font-size: 13px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 18px; }
html[lang="ar"] .strip-title { letter-spacing: 0; font-size: 14px; }
.marquee { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; width: max-content; animation: marquee var(--dur, 60s) linear infinite; }
[dir="rtl"] .marquee-track { animation-name: marquee-rtl; }
.marquee:is(:hover, :focus-within) .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes marquee-rtl { to { transform: translateX(50%); } }
.strip-logo { flex: 0 0 auto; display: grid; place-items: center; width: 150px; height: 58px; margin-inline-end: 34px; }
.strip-logo img { width: 130px; height: 50px; object-fit: contain; filter: grayscale(1) invert(1) brightness(1.3); opacity: 0.7; transition: opacity 0.3s, filter 0.3s; }
.strip-logo:hover img { opacity: 1; filter: grayscale(1) invert(1) brightness(1.5) drop-shadow(0 0 8px rgb(var(--g1))); }
:root[data-theme="light"] .strip-logo img { filter: grayscale(1); }

/* ---------------------------------------------------------------- about */
.about-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(30px, 5vw, 64px); align-items: center; }
.about-text p { color: var(--ink-2); }
.info-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px 18px; margin: 26px 0 24px; }
.info { display: flex; gap: 12px; align-items: flex-start; min-width: 0; }
.info-ico { width: 40px; height: 40px; flex-shrink: 0; display: grid; place-items: center; border-radius: 11px; color: var(--accent-ink); background: rgb(var(--g1) / 0.1); border: 1px solid rgb(var(--g1) / 0.25); box-shadow: 0 0 14px rgb(var(--g1) / 0.15); }
.info-ico .ico { width: 19px; height: 19px; }
.info small { display: block; color: var(--muted); font-size: 12.5px; }
.info b { display: block; font-size: 14.5px; font-weight: 600; overflow-wrap: anywhere; }
.info .num { font-size: 16px; color: var(--ink); }
.doc-stack { position: relative; display: block; aspect-ratio: 5 / 4; border-radius: 20px; border: 1px solid var(--line-2); overflow: hidden; isolation: isolate;
  background: radial-gradient(60% 55% at 50% 48%, rgb(var(--g2) / 0.45), transparent 70%), radial-gradient(120% 90% at 50% 110%, rgb(var(--g1) / 0.35), transparent 60%), linear-gradient(180deg, #0c1233, #0a0f28);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.06); }
.stack-glow { position: absolute; inset: 0; z-index: -1; background-image: linear-gradient(rgb(var(--g1) / 0.07) 1px, transparent 1px), linear-gradient(90deg, rgb(var(--g1) / 0.07) 1px, transparent 1px);
  background-size: 32px 32px; -webkit-mask-image: radial-gradient(70% 70% at 50% 45%, #000 30%, transparent 80%); mask-image: radial-gradient(70% 70% at 50% 45%, #000 30%, transparent 80%); }
.doc-stack::after { content: ""; position: absolute; left: 20%; right: 20%; bottom: 17%; height: 7%; border-radius: 50%; z-index: 1; background: radial-gradient(closest-side, rgba(2, 4, 16, 0.75), transparent); }
.doc-stack .doc { position: absolute; border-radius: 6px; background: #fff; box-shadow: 0 22px 40px rgba(2, 4, 16, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.1);
  transition: transform 0.7s var(--spring); animation: bob 7s ease-in-out infinite; }
/* d0 Odoo 17 (front) · d1 Tarabut letter (right, back) · d2 Odoo sample (middle) · d3 Arab Merchandise letter (left, back) */
.doc.d3 { width: 24%; left: 10%; top: 14%; transform: rotate(-12deg); z-index: 2; animation-delay: -1.5s; }
.doc.d1 { width: 24%; right: 10%; top: 14%; transform: rotate(12deg); z-index: 2; animation-delay: -4s; }
.doc.d2 { width: 46%; left: 27%; top: 10%; transform: rotate(4deg); z-index: 3; animation-delay: -2.5s; }
.doc.d0 { width: 56%; left: 22%; top: 30%; transform: rotate(-3deg); z-index: 5; box-shadow: 0 30px 60px rgba(2, 4, 16, 0.7), 0 0 40px rgb(var(--g1) / 0.35), 0 0 0 1px rgba(255, 255, 255, 0.14); }
@keyframes bob { 50% { translate: 0 -6px; } }
.doc-stack:hover .doc.d0 { transform: rotate(0) translateY(-6px) scale(1.04); }
.doc-stack:hover .doc.d1 { transform: rotate(18deg) translateX(10px); }
.doc-stack:hover .doc.d2 { transform: rotate(2deg) translateY(-8px); }
.doc-stack:hover .doc.d3 { transform: rotate(-18deg) translateX(-10px); }
.stack-badges { position: absolute; z-index: 6; bottom: 16px; inset-inline: 16px; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.stack-badge { display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; border-radius: 999px; font-size: 13px; font-weight: 600; color: #f5c542;
  background: rgba(7, 11, 24, 0.9); border: 1px solid rgb(245 197 66 / 0.5); box-shadow: 0 0 18px rgb(245 197 66 / 0.22); }
.stack-badge .ico { width: 15px; height: 15px; }
@media (max-width: 900px) { .about-grid { grid-template-columns: minmax(0, 1fr); } .info-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------------------------------------------------------------- skills */
.tools { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 10px; }
.tool { display: grid; justify-items: center; gap: 12px; padding: 18px 8px 14px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); text-align: center; transition: transform 0.35s var(--spring), border-color 0.3s, box-shadow 0.3s; }
.tool img { width: 34px; height: 34px; object-fit: contain; transition: transform 0.4s var(--spring), filter 0.3s; }
.tool span { font-size: 13px; color: var(--ink-2); line-height: 1.3; }
.tool:hover { transform: translateY(-4px); border-color: rgb(var(--g1) / 0.5); box-shadow: 0 0 22px rgb(var(--g1) / 0.3); }
.tool:hover img { transform: scale(1.12); filter: drop-shadow(0 0 10px rgb(var(--g1) / 0.6)); }
:root[data-theme="light"] .tool img[src*="github"], :root[data-theme="light"] .tool img[src*="hermes"] { filter: invert(1); }
@media (max-width: 1100px) { .tools { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (max-width: 520px) { .tools { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.services { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.service { display: flex; flex-direction: column; gap: 10px; padding: 22px 20px; }
.svc-ico { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; color: #fff; background: linear-gradient(135deg, #6366f1, #8b5cf6); box-shadow: 0 0 20px rgb(var(--g1) / 0.45); }
.svc-ico .ico { width: 22px; height: 22px; }
.service h3 { font-size: 17px; margin-top: 4px; }
.service p { margin: 0; color: var(--muted); font-size: 14.5px; }
.ticks { display: grid; gap: 7px; margin-top: 4px; }
.ticks li { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; color: var(--ink-2); line-height: 1.5; }
.ticks .ico { width: 15px; height: 15px; margin-top: 3px; color: var(--accent-ink); }
@media (max-width: 1000px) { .services { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .services { grid-template-columns: minmax(0, 1fr); } }

/* ---------------------------------------------------------------- projects */
.projects-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 960px) { .projects-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .projects-grid { grid-template-columns: minmax(0, 1fr); } }
.project { display: flex; flex-direction: column; overflow: hidden; }
.project[hidden] { display: none; }
.p-media { position: relative; height: 150px; display: grid; place-items: center; overflow: hidden; border-bottom: 1px solid var(--line);
  background: radial-gradient(90% 120% at 80% 0%, rgb(var(--g2) / 0.45), transparent 60%), radial-gradient(90% 120% at 10% 100%, rgb(var(--g1) / 0.45), transparent 60%), #0b1130; }
.p-media::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(165, 180, 252, 0.07) 1px, transparent 1px), linear-gradient(90deg, rgba(165, 180, 252, 0.07) 1px, transparent 1px); background-size: 26px 26px; }
.p-logo { position: relative; display: grid; place-items: center; width: 148px; height: 74px; border-radius: 12px; background: #fff; box-shadow: 0 12px 30px rgba(2, 4, 16, 0.5), 0 0 24px rgb(var(--g1) / 0.35); transition: transform 0.5s var(--spring); }
.p-logo img { width: 120px; height: 54px; object-fit: contain; filter: grayscale(1); }
.p-logo.initials { color: #4f46e5; font-weight: 800; font-size: 24px; }
.project:hover .p-logo { transform: scale(1.06) translateY(-3px); }
.p-body { display: flex; flex-direction: column; gap: 10px; padding: 16px 18px 18px; flex: 1; }
.p-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.p-head h3 { font-size: 17px; }
.p-head small { display: block; color: var(--muted); font-size: 12.5px; }
.p-open { width: 34px; height: 34px; flex-shrink: 0; display: grid; place-items: center; border-radius: 50%; color: var(--accent-ink); border: 1px solid rgb(var(--g1) / 0.45); transition: box-shadow 0.3s, background-color 0.3s; }
.p-open:hover { background: rgb(var(--g1) / 0.15); box-shadow: 0 0 16px rgb(var(--g1) / 0.5); }
.p-open .ico { width: 15px; height: 15px; }
.p-body > p { margin: 0; color: var(--muted); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.project details { margin-top: auto; border-top: 1px solid var(--line); padding-top: 8px; }
.project summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 6px; min-height: 34px; color: var(--accent-ink); font-size: 14px; font-weight: 600; }
.project summary::-webkit-details-marker { display: none; }
.project summary .ico { width: 15px; height: 15px; transition: transform 0.3s; }
.project details[open] summary .ico { transform: rotate(180deg); }
.dots { display: grid; gap: 6px; margin-top: 6px; }
.dots li { position: relative; padding-inline-start: 16px; font-size: 13.5px; color: var(--ink-2); }
.dots li::before { content: ""; position: absolute; inset-inline-start: 0; top: 0.7em; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 6px rgb(var(--g1)); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.filter { position: relative; overflow: hidden; min-height: 38px; padding-inline: 15px; border-radius: 999px; cursor: pointer; font-size: 13.5px; color: var(--ink-2); background: var(--card); border: 1px solid var(--line-2); transition: color 0.25s, border-color 0.25s, box-shadow 0.3s; }
.filter:hover { color: var(--ink); border-color: var(--accent); }
.filter[aria-pressed="true"] { color: #fff; background: linear-gradient(95deg, #5b5ff2, #7c5cf6); border-color: transparent; box-shadow: 0 0 18px rgb(var(--g1) / 0.45); }
.slider { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent); mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent); }
.projects-row { display: flex; gap: 16px; width: max-content; padding-block: 6px 14px; animation: pingpong var(--dur, 40s) ease-in-out infinite alternate; }
.slider:is(:hover, :focus-within) .projects-row { animation-play-state: paused; }
.projects-row > .project { flex: 0 0 330px; }
[dir="rtl"] .projects-row { animation-name: pingpong-rtl; }
@keyframes pingpong { to { transform: translateX(calc(-1 * var(--shift, 0px))); } }
@keyframes pingpong-rtl { to { transform: translateX(var(--shift, 0px)); } }
@media (max-width: 600px) { .projects-row > .project { flex-basis: min(82vw, 310px); } }

/* ---------------------------------------------------------------- journey */
.journey-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); gap: clamp(28px, 5vw, 60px); align-items: center; }
.journey { position: relative; display: grid; gap: 16px; }
.journey::before { content: ""; position: absolute; top: 12px; bottom: 12px; inset-inline-start: 7px; width: 2px; background: linear-gradient(#6366f1, #8b5cf6, rgb(var(--g2) / 0.1)); box-shadow: 0 0 8px rgb(var(--g1) / 0.6); }
.j-item { position: relative; display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 8px 18px; padding-inline-start: 32px; align-items: baseline; }
.j-item::before { content: ""; position: absolute; inset-inline-start: 1px; top: 7px; width: 14px; height: 14px; border-radius: 50%; background: var(--bg); border: 3px solid var(--accent); box-shadow: 0 0 0 4px rgb(var(--g1) / 0.15), 0 0 12px rgb(var(--g1)); }
.j-date { font-size: 14px; color: var(--muted); font-weight: 500; }
.j-title { font-size: 15.5px; font-weight: 600; transition: color 0.25s; }
a.j-title:hover { color: var(--accent-ink); }
.j-title small { margin-inline-start: 10px; font-size: 12.5px; color: var(--muted); font-weight: 400; }
.j-kids { grid-column: 1 / -1; display: grid; gap: 8px; margin-top: 4px; padding-inline-start: 14px; border-inline-start: 1px dashed var(--line-2); }
.j-sub { display: grid; grid-template-columns: 136px minmax(0, 1fr); gap: 4px 18px; align-items: baseline; }
.j-sub .j-date { font-size: 13px; }
.j-sub .j-title { font-size: 14px; font-weight: 500; color: var(--ink-2); }
@media (max-width: 640px) { .j-item, .j-sub { grid-template-columns: minmax(0, 1fr); gap: 2px; } .j-title small { display: block; margin: 0; } }
.quote { position: relative; overflow: hidden; margin: 0; padding: 30px 28px 70px; background: linear-gradient(160deg, var(--card-2), var(--card)); border-color: var(--line-2); box-shadow: 0 0 40px rgb(var(--g1) / 0.12); }
.q-mark { width: 32px; height: 32px; color: var(--accent-ink); filter: drop-shadow(0 0 8px rgb(var(--g1))); }
[dir="rtl"] .q-mark { transform: scaleX(-1); }
.quote blockquote { margin: 14px 0 12px; font-size: 18px; line-height: 1.6; color: var(--ink); }
.quote figcaption { color: var(--muted); font-size: 13.5px; margin-bottom: 14px; }
.quote-curve { position: absolute; inset-inline: 0; bottom: 0; width: 100%; height: 90px; filter: drop-shadow(0 0 6px rgb(var(--g2))); }
[dir="rtl"] .quote-curve { transform: scaleX(-1); }
.quote-curve path { stroke-dasharray: 400; stroke-dashoffset: 400; }
.quote.in .quote-curve path { animation: draw 1.8s 0.3s var(--ease) forwards; }
@media (max-width: 900px) { .journey-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------------------------------------------------------------- credentials */
.cred-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: stretch; }
.cred-col { padding: 20px; display: flex; flex-direction: column; }
.col-title { display: flex; align-items: center; gap: 10px; font-size: 18px; margin-bottom: 14px; }
.col-title .ico { color: var(--accent-ink); }
.doc-list { display: grid; gap: 14px; }
.doc-list.cols { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.doc-card { display: flex; flex-direction: column; overflow: hidden; background: var(--card-2); }
.doc-thumb { display: block; overflow: hidden; border-bottom: 1px solid var(--line); }
.doc-thumb img { width: 100%; transition: transform 0.5s var(--spring); }
.doc-card:hover .doc-thumb img { transform: scale(1.03); }
.doc-body { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; padding: 13px 15px; }
.doc-body b { font-size: 14.5px; line-height: 1.4; }
.doc-body small { color: var(--muted); font-size: 12.5px; }
.cert-rows { display: grid; gap: 10px; margin-top: 12px; }
.cert-row { display: flex; align-items: center; gap: 12px; padding: 13px 15px; background: var(--card-2); }
.cert-row b { display: block; font-size: 14.5px; }
.cert-row small { display: block; color: var(--muted); font-size: 12.5px; margin-bottom: 6px; }
.seal { width: 44px; height: 44px; flex-shrink: 0; display: grid; place-items: center; border-radius: 50%; color: var(--accent-ink); border: 1px solid rgb(var(--g1) / 0.45); box-shadow: 0 0 14px rgb(var(--g1) / 0.3); }
.marquee.soft .marquee-track.docs > .doc-card { flex: 0 0 230px; margin-inline-end: 12px; }
@media (min-width: 901px) {
  .edu-col .edu-degree { flex: 1 1 auto; display: flex; flex-direction: column; min-height: 0; }
  .edu-col .edu-degree > .doc-card { flex: 1 1 auto; min-height: 0; }
  .edu-col .edu-degree .doc-thumb { flex: 1 1 0; min-height: 240px; position: relative; }
  .edu-col .edu-degree .doc-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
}
@media (max-width: 900px) { .cred-grid { grid-template-columns: minmax(0, 1fr); } }
.letters { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.letter { display: flex; overflow: hidden; }
.letter-thumb { flex: 0 0 110px; aspect-ratio: 3 / 4; background: #fff; border-inline-end: 1px solid var(--line); }
.letter-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.letter-body { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 5px; padding: 12px 16px; min-width: 0; }
.letter-body b { font-size: 15px; }
.letter-body small { color: var(--muted); font-size: 12.5px; }
@media (max-width: 420px) { .letters { grid-template-columns: minmax(0, 1fr); } }

/* ---------------------------------------------------------------- contact + footer */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr) minmax(0, 0.8fr); gap: 36px; align-items: center; }
.contact-grid h2 { font-size: clamp(26px, 3vw, 34px); margin-bottom: 10px; }
.contact-grid .muted { max-width: 440px; margin-bottom: 22px; }
.c-list { display: grid; gap: 18px; }
.c-item { display: flex; gap: 14px; align-items: center; }
.c-ico { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; color: var(--accent-ink); border: 1px solid rgb(var(--g1) / 0.35); background: rgb(var(--g1) / 0.08); transition: box-shadow 0.3s; }
a.c-item:hover .c-ico { box-shadow: 0 0 18px rgb(var(--g1) / 0.55); }
.c-ico .ico { width: 18px; height: 18px; }
.c-item small { display: block; color: var(--muted); font-size: 12.5px; }
.c-item b { display: block; font-size: 14.5px; font-weight: 600; }
.c-follow small { display: block; color: var(--accent-ink); font-size: 13px; font-weight: 600; margin-bottom: 10px; }
.soc-grid { display: flex; flex-wrap: wrap; gap: 4px; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; } }
.site-footer { border-top: 1px solid var(--line); }
.footer-row { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; padding-block: 22px; color: var(--muted); font-size: 13.5px; }
.to-top-link { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); transition: color 0.25s; }
.to-top-link:hover { color: var(--accent-ink); }
.to-top-link .ico { width: 16px; height: 16px; }

/* ---------------------------------------------------------------- inner pages */
.page-hero { position: relative; overflow: hidden; padding-block: clamp(46px, 7vw, 86px) clamp(40px, 5vw, 60px); }
.ph-top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.ph-top .kicker { margin-bottom: 0; }
.page-hero h1 { font-size: clamp(34px, 5vw, 58px); font-weight: 800; letter-spacing: -0.03em; margin: 14px 0 14px; max-width: 900px; }
html[lang="ar"] .page-hero h1 { letter-spacing: 0; }
.page-hero .lead { color: var(--ink-2); font-size: clamp(16px, 1.5vw, 18.5px); max-width: 760px; margin-bottom: 26px; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.stat { padding: 18px 20px; }
.stat .num { display: block; font-size: clamp(28px, 3vw, 38px); font-weight: 800; line-height: 1.1; margin-bottom: 6px; direction: ltr; text-align: start; background: linear-gradient(95deg, #818cf8, #a78bfa); -webkit-background-clip: text; background-clip: text; color: transparent; }
[dir="rtl"] .stat .num { text-align: right; }
:root[data-theme="light"] .stat .num { background: linear-gradient(95deg, #4f46e5, #7c3aed); -webkit-background-clip: text; background-clip: text; }
.stat span { color: var(--muted); font-size: 13.5px; line-height: 1.4; display: block; }
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.companies { display: grid; gap: 20px; }
.company { display: grid; grid-template-columns: minmax(0, 270px) minmax(0, 1fr); gap: clamp(22px, 4vw, 48px); padding: clamp(20px, 3vw, 34px); scroll-margin-top: 90px; }
.company-aside { display: grid; gap: 8px; align-content: start; justify-items: start; }
.company-aside h2 { font-size: 24px; margin-top: 8px; }
.company-aside .muted { margin: 0; font-size: 14px; }
.logo-box { display: grid; place-items: center; flex-shrink: 0; width: 56px; height: 56px; border-radius: 12px; background: #fff; overflow: hidden; }
.logo-box img { width: 44px; height: 44px; object-fit: contain; filter: grayscale(1); }
.logo-box.initials { background: var(--card-2); border: 1px solid rgb(var(--g1) / 0.4); color: var(--accent-ink); font-weight: 800; }
.logo-box.sm { width: 42px; height: 42px; border-radius: 10px; }
.logo-box.sm img { width: 32px; height: 32px; }
.logo-box.lg { width: 150px; height: 80px; border-radius: 14px; box-shadow: 0 0 22px rgb(var(--g1) / 0.25); }
.logo-box.lg img { width: 124px; height: 58px; }
.logo-box.lg.initials { width: 80px; font-size: 24px; }
.path { display: grid; width: 100%; }
.path li { position: relative; padding-inline-start: 24px; padding-block: 5px; color: var(--muted); font-size: 14px; }
.path li::before { content: ""; position: absolute; inset-inline-start: 0; top: 12px; width: 11px; height: 11px; border-radius: 50%; background: var(--bg); border: 2px solid var(--accent-2); z-index: 1; }
.path li::after { content: ""; position: absolute; inset-inline-start: 4.5px; top: 23px; bottom: -6px; width: 2px; background: rgb(var(--g2) / 0.45); }
.path li:last-child::after { display: none; }
.path li:last-child { color: var(--ink); font-weight: 600; }
.path li:last-child::before { border-color: var(--accent); box-shadow: 0 0 10px rgb(var(--g1)); }
.story p { color: var(--ink-2); }
.results { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.results li { display: flex; gap: 9px; align-items: flex-start; padding: 11px 13px; border-radius: var(--r-sm); background: var(--card-2); border: 1px solid var(--line); font-size: 14px; color: var(--ink-2); }
.results .ico { width: 17px; height: 17px; margin-top: 3px; color: var(--accent-ink); }
.merged-block { margin-bottom: 10px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--card-2); scroll-margin-top: 90px; }
.merged-block summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 11px 13px; }
.merged-block summary::-webkit-details-marker { display: none; }
.mb-txt { flex: 1; min-width: 0; }
.mb-txt b { display: block; }
.mb-txt small { color: var(--muted); font-size: 12.5px; }
.merged-block summary > .ico { width: 17px; height: 17px; color: var(--accent-ink); transition: transform 0.3s; }
.merged-block[open] summary > .ico { transform: rotate(180deg); }
.merged-body { padding: 4px 16px 16px; }
.merged-body .results { margin-top: 10px; }
@media (max-width: 900px) { .company { grid-template-columns: minmax(0, 1fr); } .results { grid-template-columns: minmax(0, 1fr); } }
.chapters { position: relative; display: grid; gap: 14px; }
.chapters::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; translate: -50% 0; background: linear-gradient(transparent, #6366f1, #8b5cf6, transparent); box-shadow: 0 0 8px rgb(var(--g1) / 0.5); }
.chapter { width: calc(50% - 32px); padding: 18px 20px; }
.chapter:nth-child(odd) { justify-self: start; }
.chapter:nth-child(even) { justify-self: end; }
.chapter::after { content: ""; position: absolute; top: 24px; width: 13px; height: 13px; border-radius: 50%; background: var(--bg); border: 3px solid var(--accent); box-shadow: 0 0 10px rgb(var(--g1)); }
.chapter:nth-child(odd)::after { inset-inline-end: -39px; }
.chapter:nth-child(even)::after { inset-inline-start: -39px; }
.chapter .chip { margin-bottom: 8px; }
.chapter h3 { font-size: 18px; margin-bottom: 6px; }
.chapter p { margin: 0; color: var(--ink-2); font-size: 15px; }
@media (max-width: 760px) {
  .chapters::before { left: auto; inset-inline-start: 6px; translate: none; }
  .chapter, .chapter:nth-child(odd), .chapter:nth-child(even) { width: auto; justify-self: stretch; margin-inline-start: 28px; }
  .chapter:nth-child(odd)::after, .chapter:nth-child(even)::after { inset-inline-start: -28px; inset-inline-end: auto; }
}
.today { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.today-card { display: grid; gap: 8px; justify-items: start; padding: 22px; }
.today-card h3 { font-size: 19px; margin-top: 6px; }
.today-card p { margin: 0; }
@media (max-width: 900px) { .today { grid-template-columns: minmax(0, 1fr); } }
.sectors-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.sector { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 15px 17px; }
.sector b { font-size: 14.5px; font-weight: 600; }
.ai-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.ai-item { display: flex; gap: 12px; align-items: flex-start; padding: 17px 19px; font-size: 14.5px; color: var(--ink-2); }
.ai-item .ico { color: var(--accent-ink); filter: drop-shadow(0 0 6px rgb(var(--g1))); }
.process { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.step { padding: 20px 18px; }
.step-n { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; color: #fff; font-weight: 700; background: linear-gradient(135deg, #6366f1, #8b5cf6); box-shadow: 0 0 18px rgb(var(--g1) / 0.5); margin-bottom: 12px; direction: ltr; }
.step h3 { font-size: 16px; margin-bottom: 6px; }
.step p { margin: 0; color: var(--muted); font-size: 14px; }
@media (max-width: 1000px) { .process { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .process { grid-template-columns: minmax(0, 1fr); } }
.section.viewer { border-top: 0; padding-top: 0; }
.viewer-img { width: 100%; max-width: 1040px; margin-inline: auto; border-radius: 14px; background: #fff; box-shadow: var(--shadow), 0 0 40px rgb(var(--g1) / 0.2); }
.viewer-img.tall { max-width: 820px; }

/* ---------------------------------------------------------------- motion */
.reveal-on .reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); transition-delay: var(--d, 0s); }
.reveal-on .reveal.in { opacity: 1; transform: none; }
@media (max-width: 760px) { .hero-aurora span { animation: none; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; }
  .hero-arc path, .note-line path, .quote-curve path { stroke-dashoffset: 0; }
  .marquee, .slider { overflow-x: auto; }
  .marquee-track > [aria-hidden="true"] { display: none; }
}

/* ---------------------------------------------------------------- tool tile raster logo (Hermes) */


/* ---------------------------------------------------------------- sectors slider (home) */
.sectors-marquee { padding-block: 6px 10px; }
.sectors-marquee .marquee-track { align-items: stretch; }
.sector-card { flex: 0 0 330px; margin-inline-end: 16px; padding: 20px; display: flex; flex-direction: column; gap: 12px; transition: border-color 0.3s, box-shadow 0.3s, transform 0.35s var(--ease); }
.sector-card:hover { border-color: rgb(var(--g1) / 0.55); box-shadow: 0 0 0 1px rgb(var(--g1) / 0.2), 0 0 30px rgb(var(--g1) / 0.25); transform: translateY(-3px); }
.sc-head { display: flex; align-items: center; gap: 12px; }
.sc-head h3 { font-size: 17px; }
.sc-head small { color: var(--accent-ink); font-size: 13px; font-weight: 600; }
.sc-label { margin: 0; font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
html[lang="ar"] .sc-label { letter-spacing: 0; font-size: 13px; }
.sc-examples { display: grid; gap: 10px; }
.sc-examples li { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: 12px; background: var(--card-2); border: 1px solid var(--line); }
.ex-logo { width: 64px; height: 44px; flex-shrink: 0; display: grid; place-items: center; border-radius: 9px; background: #fff; color: #4f46e5; font-weight: 800; }
.ex-logo img { width: 54px; height: 34px; object-fit: contain; filter: grayscale(1); }
.ex-txt { min-width: 0; }
.ex-txt b { display: block; font-size: 14px; }
.ex-txt small { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--muted); font-size: 12.5px; line-height: 1.45; }
@media (max-width: 600px) { .sector-card { flex-basis: 280px; } }

/* ---------------------------------------------------------------- credentials (professional document tiles) */
.cred-group + .cred-group { margin-top: 30px; }
.cg-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.cg-head > div { flex: 1; min-width: 0; }
.cg-head h3 { font-size: 18px; }
.cg-head small { color: var(--muted); font-size: 13.5px; }
.cg-count { font-size: 12.5px; font-weight: 600; color: var(--accent-ink); padding: 4px 10px; border-radius: 999px; border: 1px solid rgb(var(--g1) / 0.35); background: rgb(var(--g1) / 0.08); white-space: nowrap; }
.dgrid { display: grid; gap: 16px; }
.dgrid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dgrid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1000px) { .dgrid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .dgrid.cols-2, .dgrid.cols-4 { grid-template-columns: minmax(0, 1fr); } }
.dtile { display: flex; flex-direction: column; overflow: hidden; }
.d-stage { position: relative; display: grid; place-items: center; aspect-ratio: 16 / 10; padding: 18px; overflow: hidden; border-bottom: 1px solid var(--line);
  background: radial-gradient(90% 100% at 80% 0%, rgb(var(--g2) / 0.3), transparent 60%), radial-gradient(90% 100% at 10% 100%, rgb(var(--g1) / 0.3), transparent 60%), #0b1130; }
.d-stage::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(165, 180, 252, 0.06) 1px, transparent 1px), linear-gradient(90deg, rgba(165, 180, 252, 0.06) 1px, transparent 1px); background-size: 24px 24px; }
.d-stage img { position: absolute; inset: 18px; width: calc(100% - 36px); height: calc(100% - 36px); max-width: none; object-fit: contain;
  filter: drop-shadow(0 14px 22px rgba(2, 4, 16, 0.65)); transition: transform 0.5s var(--spring); }
.d-stage.portrait { aspect-ratio: 4 / 3; }
.dgrid.cols-4 .d-stage img { inset: 14px; width: calc(100% - 28px); height: calc(100% - 28px); }
.dtile:hover .d-stage img { transform: translateY(-4px) scale(1.03); }
.dgrid.cols-4 .d-stage { aspect-ratio: 4 / 3; padding: 14px; }
.d-body { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 14px 16px 16px; flex: 1; }
.d-org { font-size: 11.5px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-ink); }
html[lang="ar"] .d-org { letter-spacing: 0; font-size: 12.5px; }
.d-body h4 { font-size: 15px; line-height: 1.4; }
.d-body small { color: var(--muted); font-size: 12.5px; }
.d-body .chip { margin-top: 4px; }
.d-body .text-link { margin-top: auto; padding-top: 8px; font-size: 14px; }
.legend-card { display: flex; align-items: center; gap: 14px; margin-top: 16px; padding: 14px 18px; flex-wrap: wrap; }
.legend-card > div { flex: 1; min-width: 200px; }
.legend-card b { display: block; font-size: 15px; }
.legend-card small { color: var(--muted); font-size: 13px; }

/* ---------------------------------------------------------------- light theme polish */
:root[data-theme="light"] {
  --bg: #f4f5fb;
  --card: #ffffff;
  --card-2: #f6f7fd;
  --line: rgba(49, 46, 129, 0.09);
  --line-2: rgba(49, 46, 129, 0.16);
  --ink: #0e1233;
  --ink-2: #363c61;
  --muted: #646b8c;
  --shadow: 0 18px 44px rgba(49, 46, 129, 0.1);
}
:root[data-theme="light"] body { background: radial-gradient(1200px 600px at 85% -10%, rgba(99, 102, 241, 0.08), transparent 60%), var(--bg); }
:root[data-theme="light"] .card, :root[data-theme="light"] .tool { box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(49, 46, 129, 0.06); }
:root[data-theme="light"] .lift:hover { box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.25), 0 20px 44px rgba(79, 70, 229, 0.16); }
:root[data-theme="light"] .hero-aurora span:first-child { background: radial-gradient(circle, rgba(99, 102, 241, 0.16), transparent 62%); }
:root[data-theme="light"] .hero-aurora span:last-child { background: radial-gradient(circle, rgba(139, 92, 246, 0.1), transparent 62%); }
:root[data-theme="light"] .blob { box-shadow: 0 0 70px rgba(99, 102, 241, 0.35), 0 0 140px rgba(139, 92, 246, 0.18); }
:root[data-theme="light"] .hand-note { color: #312e81; text-shadow: none; }
:root[data-theme="light"] .chip-float { background: #ffffff; box-shadow: 0 12px 30px rgba(49, 46, 129, 0.14); }
:root[data-theme="light"] .site-header.scrolled { background: rgba(255, 255, 255, 0.94); }
:root[data-theme="light"] .nav { background: transparent; }
@media (max-width: 1020px) { :root[data-theme="light"] .nav { background: #fff; } }

/* document stages: light lavender instead of dark navy */
:root[data-theme="light"] .d-stage,
:root[data-theme="light"] .p-media {
  background: radial-gradient(90% 100% at 80% 0%, rgba(139, 92, 246, 0.16), transparent 60%), radial-gradient(90% 100% at 10% 100%, rgba(99, 102, 241, 0.16), transparent 60%), #eef0fb; }
:root[data-theme="light"] .d-stage::before, :root[data-theme="light"] .p-media::before {
  background-image: linear-gradient(rgba(79, 70, 229, 0.07) 1px, transparent 1px), linear-gradient(90deg, rgba(79, 70, 229, 0.07) 1px, transparent 1px); }
:root[data-theme="light"] .d-stage img { filter: drop-shadow(0 12px 18px rgba(49, 46, 129, 0.22)); }
:root[data-theme="light"] .p-logo { box-shadow: 0 10px 24px rgba(49, 46, 129, 0.16); }

/* about card with the fanned documents */
:root[data-theme="light"] .doc-stack {
  border-color: rgba(99, 102, 241, 0.2);
  background: radial-gradient(60% 55% at 50% 48%, rgba(139, 92, 246, 0.2), transparent 70%), radial-gradient(120% 90% at 50% 110%, rgba(99, 102, 241, 0.18), transparent 60%), linear-gradient(180deg, #f3f2ff, #e9ebfb);
  box-shadow: 0 20px 50px rgba(49, 46, 129, 0.14); }
:root[data-theme="light"] .stack-glow { background-image: linear-gradient(rgba(79, 70, 229, 0.08) 1px, transparent 1px), linear-gradient(90deg, rgba(79, 70, 229, 0.08) 1px, transparent 1px); }
:root[data-theme="light"] .doc-stack::after { background: radial-gradient(closest-side, rgba(49, 46, 129, 0.22), transparent); }
:root[data-theme="light"] .doc-stack .doc { box-shadow: 0 16px 32px rgba(49, 46, 129, 0.2), 0 0 0 1px rgba(49, 46, 129, 0.06); }
:root[data-theme="light"] .doc.d0 { box-shadow: 0 24px 50px rgba(49, 46, 129, 0.26), 0 0 0 1px rgba(49, 46, 129, 0.08); }
:root[data-theme="light"] .stack-badge, :root[data-theme="light"] .badge-gold { color: #8a6100; background: #fffaf0; border-color: rgba(202, 150, 20, 0.45); box-shadow: 0 6px 18px rgba(202, 150, 20, 0.16); }

/* client logo strip: one consistent dark grey */
:root[data-theme="light"] .strip-logo img { filter: grayscale(1) brightness(0.45); opacity: 0.7; }
:root[data-theme="light"] .strip-logo:hover img { filter: grayscale(1) brightness(0.3); opacity: 1; }

/* quote card + contact */
:root[data-theme="light"] .quote { background: linear-gradient(160deg, #ffffff, #f3f2ff); box-shadow: 0 18px 44px rgba(49, 46, 129, 0.1); }
:root[data-theme="light"] .soc:hover { color: #4f46e5; background: rgba(99, 102, 241, 0.1); }

/* cartoon logo in the header */
.mark-img { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px rgb(var(--g1) / 0.65), 0 0 18px rgb(var(--g1) / 0.5); }

/* seated portrait: width-driven, anchored to the bottom of the visual */
.hero-visual .cutout { height: 100%; width: auto; left: 50%; translate: -50% 0; bottom: 0; }
.hero-visual .cutout img { height: 100%; width: auto; }
.hero-visual .blob { width: 70%; bottom: 12%; }
.hand-note { top: 6%; }
.hero-visual .cf1 { top: 16%; bottom: auto; left: 0; right: auto; }
.hero-visual .cf2 { top: auto; bottom: 8%; right: 0; left: auto; }

/* note stays top-right in both directions (the photo is not mirrored, so the empty space is always there) */
.hero-visual .hand-note { right: -2%; left: auto; }
[dir="rtl"] .hero-visual .hand-note { top: 6%; }
[dir="rtl"] .hero-arc { transform: none; }
