/* ---------- Tokens ---------- */
:root {
  --bg: #f7f8fc; --bg-2: #eef1f8; --card: #ffffff; --ink: #0f1526; --ink-2: #4b5468; --line: #dde2ee;
  --brand: #1f3a8a; --brand-2: #0ea5a4; --brand-2-ink: #0b6f6e; --accent: #d9a441; --accent-ink: #7a5410; --ok: #0f7a5c; --err: #d23b3b;
  --shadow: 0 10px 30px -12px rgba(15, 21, 38, .18);
  --radius: 18px; --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0b1020; --bg-2: #0f172c; --card: #131b33; --ink: #eef1f8; --ink-2: #a5aec6; --line: #223052;
  --brand: #8fb0ff; --brand-2: #2dd4bf; --brand-2-ink: #2dd4bf; --accent: #e7b85a; --accent-ink: #f3d68e; --ok: #4ade80; --err: #f87171;
  --shadow: 0 16px 40px -16px rgba(0, 0, 0, .6);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1020; --bg-2: #0f172c; --card: #131b33; --ink: #eef1f8; --ink-2: #a5aec6; --line: #223052;
    --brand: #8fb0ff; --brand-2: #2dd4bf; --brand-2-ink: #2dd4bf; --accent: #e7b85a; --accent-ink: #f3d68e; --ok: #4ade80; --err: #f87171;
    --shadow: 0 16px 40px -16px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}
:lang(ar) { --font: "Cairo", "Tajawal", system-ui, sans-serif; }
:lang(he) { --font: "Heebo", "Assistant", system-ui, sans-serif; }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.65; font-size: clamp(1rem, .95rem + .25vw, 1.08rem); }
img { max-width: 100%; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: .2em; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; font-weight: 800; }
h1 { font-size: clamp(2.2rem, 1.4rem + 3.6vw, 4rem); }
h2 { font-size: clamp(1.7rem, 1.2rem + 2vw, 2.6rem); }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }
.wrap { width: min(1140px, 100% - 2rem); margin-inline: auto; }
.muted { color: var(--ink-2); }
.kicker { color: var(--brand-2-ink); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: .78rem; margin-bottom: .6rem; }
:lang(ar) .kicker, :lang(he) .kicker { letter-spacing: 0; font-size: .9rem; }
.lead { font-size: 1.15rem; color: var(--ink-2); max-width: 60ch; }
.skip { position: absolute; inset-inline-start: 1rem; top: -4rem; background: var(--brand); color: #fff; padding: .6rem 1rem; border-radius: 8px; z-index: 100; }
.skip:focus { top: 1rem; }
.section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.section--alt { background: var(--bg-2); }
.section__head { display: flex; justify-content: space-between; align-items: end; gap: 1.5rem; flex-wrap: wrap; margin-bottom: 2rem; }
.grid-2 { display: grid; grid-template-columns: 1.3fr 1fr; gap: 3rem; align-items: start; }
.grid-2.gap { margin-top: 3rem; }
@media (max-width: 800px) { .grid-2 { grid-template-columns: 1fr; gap: 2rem; } }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: .5rem; padding: .8rem 1.4rem; border-radius: 999px; font-weight: 600; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); transition: transform .2s, box-shadow .2s, background .2s; }
.btn:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow); }
.btn--primary { background: linear-gradient(135deg, var(--brand), #2f4fb8); color: #fff; border-color: transparent; }
:root[data-theme="dark"] .btn--primary { color: #0b1020; background: linear-gradient(135deg, var(--brand), var(--brand-2)); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn--primary { color: #0b1020; background: linear-gradient(135deg, var(--brand), var(--brand-2)); } }
.btn--ghost { background: transparent; }
.btn--sm { padding: .5rem 1rem; font-size: .9rem; white-space: nowrap; }
.btn svg { width: 1.1em; height: 1.1em; fill: currentColor; }
.icon-btn { width: 42px; height: 42px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); display: grid; place-items: center; cursor: pointer; transition: background .2s; }
.icon-btn:hover { background: var(--bg-2); }
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
#theme .i-moon { display: none; }
#theme[aria-pressed="true"] .i-sun { display: none; }
#theme[aria-pressed="true"] .i-moon { display: block; }

/* ---------- Nav ---------- */
.nav { position: sticky; top: 0; z-index: 50; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); background: color-mix(in srgb, var(--bg) 75%, transparent); border-bottom: 1px solid transparent; transition: border-color .2s, box-shadow .2s; }
.nav.scrolled { border-color: var(--line); box-shadow: 0 6px 24px -18px rgba(0,0,0,.4); }
.nav__in { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 68px; }
.brand { display: flex; align-items: center; gap: .6rem; font-weight: 800; color: var(--ink); white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand__mark { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; font-size: .8rem; color: #fff; background: linear-gradient(135deg, var(--brand), var(--brand-2)); letter-spacing: .05em; }
.nav__links { display: flex; align-items: center; gap: 1.4rem; font-weight: 500; }
.nav__links a { color: var(--ink-2); }
.nav__links a:hover { color: var(--ink); text-decoration: none; }
.nav__tools { display: flex; align-items: center; gap: .6rem; }
.lang { display: flex; border: 1.5px solid var(--line); border-radius: 999px; padding: 3px; background: var(--card); }
.lang button { border: 0; background: transparent; color: var(--ink-2); font: inherit; font-size: .85rem; font-weight: 600; padding: .35rem .7rem; border-radius: 999px; cursor: pointer; }
.lang button[aria-current="true"] { background: var(--brand); color: #fff; }
:root[data-theme="dark"] .lang button[aria-current="true"] { color: #0b1020; }
.burger { display: none; }
@media (max-width: 900px) {
  .burger { display: grid; }
  .nav__links { position: absolute; inset-inline: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 0; background: var(--card); border-bottom: 1px solid var(--line); padding: .5rem 1rem 1rem; display: none; box-shadow: var(--shadow); }
  .nav__links.open { display: flex; }
  .nav__links a { padding: .8rem .5rem; border-bottom: 1px solid var(--line); }
  .nav__links .btn { margin-top: .8rem; justify-content: center; border-bottom: 0; }
  .brand__name { display: none; }
}

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; color: #eef1f8; isolation: isolate; }
.hero__bg { position: absolute; inset: 0; z-index: -2; }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.08); will-change: transform; }
.hero__veil { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(11,16,32,.55) 0%, rgba(11,16,32,.72) 60%, var(--bg) 100%); }
.hero__in { display: grid; grid-template-columns: 1.15fr .85fr; gap: 3rem; align-items: center; padding-block: clamp(4rem, 10vw, 7rem) 3rem; min-height: 78vh; }
.hero .kicker { color: var(--brand-2); }
.hero .lead { color: #c9d1e6; }
.cta { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 1.6rem; }
.hero .btn--ghost { color: #fff; border-color: rgba(255,255,255,.35); }
.hero .btn--ghost:hover { background: rgba(255,255,255,.1); }
.hero .btn--primary { color: #0b1020; background: linear-gradient(135deg, #f3d68e, var(--accent)); }
.hero__portrait { position: relative; margin: 0; justify-self: center; width: min(380px, 100%); }
.portrait { border-radius: 28px; overflow: hidden; box-shadow: 0 30px 60px -20px rgba(0,0,0,.7); border: 1px solid rgba(255,255,255,.18); background: #101830; transform: rotate(-2deg); transition: transform .5s; }
.hero__portrait:hover .portrait { transform: rotate(0); }
.portrait img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; }
.orb { position: absolute; border-radius: 50%; filter: blur(40px); opacity: .6; z-index: -1; animation: float 9s ease-in-out infinite; }
.orb--a { width: 220px; height: 220px; background: var(--brand-2); inset-inline-end: -60px; top: -40px; }
.orb--b { width: 260px; height: 260px; background: var(--accent); inset-inline-start: -80px; bottom: -60px; animation-delay: -4s; }
@keyframes float { 50% { transform: translateY(-18px); } }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; padding-block: 1rem 3rem; }
.stat { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); backdrop-filter: blur(10px); border-radius: var(--radius); padding: 1.1rem 1.2rem; display: flex; flex-direction: column; }
.stat__n { font-size: 2rem; font-weight: 800; letter-spacing: -.02em; color: #fff; }
.stat__l { color: #c9d1e6; font-size: .92rem; }
@media (max-width: 900px) {
  .hero__in { grid-template-columns: 1fr; text-align: center; min-height: auto; }
  .hero .lead { margin-inline: auto; }
  .cta { justify-content: center; }
  .hero__portrait { order: -1; width: min(260px, 70%); }
  .stats { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Cards / lists ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; box-shadow: var(--shadow); }
.card--soft { background: var(--bg-2); box-shadow: none; }
.card svg { width: 40px; height: 40px; fill: none; stroke: var(--brand-2); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; margin-bottom: .9rem; }
.card h3 + .ticks { margin-bottom: 1.4rem; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; margin-top: 2rem; }
.cards .card { transition: transform .25s, border-color .25s; }
.cards .card:hover { transform: translateY(-4px); border-color: var(--brand-2); }
.cards .card p { margin: 0; color: var(--ink-2); font-size: .97rem; }
@media (max-width: 900px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .cards { grid-template-columns: 1fr; } }
.ticks li { position: relative; padding-inline-start: 1.5rem; margin-bottom: .45rem; }
.ticks li::before { content: ""; position: absolute; inset-inline-start: 0; top: .55em; width: .8em; height: .8em; border-radius: 50%; background: linear-gradient(135deg, var(--brand-2), var(--brand)); }
.confs li { display: flex; flex-direction: column; padding-block: .7rem; border-bottom: 1px solid var(--line); }
.confs li:last-child { border: 0; }
.confs span { color: var(--ink-2); font-size: .93rem; }

/* Publications */
.pubs { display: grid; gap: .9rem; }
.pub { display: grid; grid-template-columns: auto 1fr auto; gap: 1.2rem; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.3rem; transition: border-color .25s, transform .25s; }
.pub:hover { border-color: var(--brand-2); transform: translateX(4px); }
.pub__year { font-weight: 800; color: var(--accent-ink); background: color-mix(in srgb, var(--accent) 18%, transparent); border-radius: 10px; padding: .35rem .6rem; font-size: .9rem; }
.pub h3 { font-size: 1.02rem; margin: 0 0 .2rem; }
.pub h3 a { color: var(--ink); }
.pub p { margin: 0; font-size: .92rem; }
.pub__link { white-space: nowrap; font-weight: 600; font-size: .9rem; }
@media (max-width: 640px) { .pub { grid-template-columns: auto 1fr; } .pub__link { grid-column: 2; } }

/* Timeline */
.timeline { position: relative; padding-inline-start: 1.6rem; border-inline-start: 2px solid var(--line); }
.job { position: relative; padding-bottom: 2rem; }
.job::before { content: ""; position: absolute; inset-inline-start: calc(-1.6rem - 7px); top: .45rem; width: 12px; height: 12px; border-radius: 50%; background: var(--brand-2); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand-2) 25%, transparent); }
.job__period { font-size: .82rem; font-weight: 700; color: var(--brand-2-ink); letter-spacing: .06em; }
.job h3 { margin: .2rem 0 .1rem; }
.job__org { color: var(--ink-2); margin-bottom: .6rem; }
.job .ticks li { font-size: .97rem; }
.edu li { display: flex; flex-direction: column; padding: 1rem 1.2rem; margin-bottom: .8rem; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); }
.edu strong { font-size: 1.02rem; }

/* Contact */
.card--hero { padding: clamp(1.8rem, 5vw, 3.2rem); background: linear-gradient(135deg, var(--card), var(--bg-2)); text-align: center; }
.card--hero .lead { margin-inline: auto; }
.contact__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin: 1.8rem 0; }
.contact__grid dt { font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-2); }
:lang(ar) .contact__grid dt, :lang(he) .contact__grid dt { letter-spacing: 0; font-size: .9rem; }
.contact__grid dd { margin: .2rem 0 0; font-weight: 600; }
@media (max-width: 720px) { .contact__grid { grid-template-columns: repeat(2, 1fr); } }

/* Footer */
.footer { border-top: 1px solid var(--line); padding-block: 1.6rem; font-size: .92rem; }
.footer__in { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

/* Reveal */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- v2: audiences, services, FAQ, form ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.small { font-size: .9rem; }
.wrap--narrow { width: min(860px, 100% - 2rem); }
.cards--3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .cards--3 { grid-template-columns: 1fr; } }
.cards .card .ticks { margin-top: .8rem; }
.cards .card .ticks li { font-size: .93rem; margin-bottom: .3rem; }
.trust { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.6rem; padding: 0; }
.trust li { font-size: .82rem; font-weight: 600; color: #e6ebf7; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2); border-radius: 999px; padding: .3rem .75rem; backdrop-filter: blur(8px); }
@media (max-width: 900px) { .trust { justify-content: center; } }
.service__meta { display: flex; flex-wrap: wrap; gap: .5rem .8rem; align-items: center; margin-top: .9rem !important; font-size: .88rem; }
.tag { display: inline-block; background: color-mix(in srgb, var(--brand-2) 16%, transparent); color: var(--brand-2-ink); font-weight: 700; border-radius: 999px; padding: .2rem .65rem; font-size: .8rem; }
.timeline--compact { padding-inline-start: 1.2rem; margin: 0 0 1.4rem; }
.timeline--compact .job { padding-bottom: .9rem; display: flex; flex-direction: column; }
.timeline--compact .job::before { inset-inline-start: calc(-1.2rem - 6px); width: 10px; height: 10px; }
.timeline--compact .job__org { margin: 0; font-size: .92rem; }
.edu--compact li { padding: .6rem .9rem; margin-bottom: .5rem; font-size: .95rem; }
.edu--compact span { color: var(--ink-2); font-size: .88rem; }

/* FAQ */
.faq { margin-top: 1.5rem; display: grid; gap: .6rem; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 0 1.2rem; transition: border-color .2s; }
.faq details[open] { border-color: var(--brand-2); }
.faq summary { cursor: pointer; font-weight: 700; padding: 1rem 0; list-style: none; display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; line-height: 1; color: var(--brand-2); flex: none; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 1.1rem; color: var(--ink-2); }

/* Form */
.grid-2--form { grid-template-columns: 1fr 1.15fr; }
@media (max-width: 800px) { .grid-2--form { grid-template-columns: 1fr; } }
.contact__list { display: grid; gap: .8rem; margin: 1.6rem 0 0; }
.contact__list dt { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-2); }
:lang(ar) .contact__list dt, :lang(he) .contact__list dt { letter-spacing: 0; font-size: .88rem; }
.contact__list dd { margin: .1rem 0 0; font-weight: 600; }
.form { display: grid; gap: 1rem; }
.form label { display: grid; gap: .35rem; font-weight: 600; font-size: .92rem; }
.form input:not([type="radio"]), .form select, .form textarea { font: inherit; font-size: 1rem; color: var(--ink); background: var(--bg); border: 1.5px solid var(--line); border-radius: 10px; padding: .7rem .85rem; width: 100%; transition: border-color .2s, box-shadow .2s; }
.form input:focus-visible, .form select:focus-visible, .form textarea:focus-visible { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 35%, transparent); }
.form textarea { resize: vertical; min-height: 120px; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 560px) { .form .row { grid-template-columns: 1fr; } }
.form button { justify-self: start; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; border: 1.5px solid var(--line); border-radius: 999px; padding: 4px; margin: 0; background: var(--bg); }
.seg label { position: relative; cursor: pointer; text-align: center; border-radius: 999px; padding: .55rem .8rem; font-weight: 700; font-size: .92rem; color: var(--ink-2); transition: background .2s, color .2s; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg label:has(input:checked) { background: var(--brand); color: #fff; }
:root[data-theme="dark"] .seg label:has(input:checked) { color: #0b1020; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .seg label:has(input:checked) { color: #0b1020; } }
.seg label:has(input:focus-visible) { outline: 3px solid var(--brand); outline-offset: 2px; }
.hp { position: absolute; inset-inline-start: -9999px; opacity: 0; height: 0; overflow: hidden; }
.form__status { margin: 0; font-weight: 600; min-height: 1.4em; }
.form__status.is-ok { color: var(--ok); }
.form__status.is-error { color: var(--err); }
.footer__langs { display: flex; gap: .8rem; }
.footer__langs a[aria-current="page"] { font-weight: 700; color: var(--ink); }
.lang a { color: var(--ink-2); font-size: .85rem; font-weight: 600; padding: .35rem .7rem; border-radius: 999px; }
.lang a:hover { text-decoration: none; color: var(--ink); }
.lang a[aria-current="page"] { background: var(--brand); color: #fff; }
:root[data-theme="dark"] .lang a[aria-current="page"] { color: #0b1020; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .lang a[aria-current="page"] { color: #0b1020; } }

/* How it works */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; margin-top: 2rem; counter-reset: step; }
@media (max-width: 800px) { .steps { grid-template-columns: 1fr; } }
.step { position: relative; padding: 1.4rem 1.4rem 1.4rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.step::before { counter-increment: step; content: counter(step); display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; font-weight: 800; margin-bottom: .8rem; }
.step h3 { font-size: 1.05rem; }
.step p { margin: 0; color: var(--ink-2); font-size: .95rem; }
.integrity { margin-top: 1.6rem; padding: 1rem 1.3rem; border-inline-start: 4px solid var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); border-radius: 10px; font-weight: 600; }
/* Instruments + citations */
.instruments { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; margin-top: 2.2rem; }
@media (max-width: 800px) { .instruments { grid-template-columns: 1fr; } }
.instrument p { margin: 0 0 .6rem; font-size: .95rem; }
.instrument .cite { display: block; margin-top: .6rem; font-size: .85rem; color: var(--ink-2); font-style: normal; word-break: break-word; }
.instrument .cite a { word-break: break-all; }
.pub cite { font-style: normal; }
h3.sub { margin-top: 2.2rem; }
.footer__in { align-items: center; }
.hero__tagline { font-size: clamp(1.25rem, 1rem + 1.2vw, 1.7rem); font-weight: 700; line-height: 1.3; margin: -.2rem 0 1rem; background: linear-gradient(90deg, #f3d68e, var(--accent), #2dd4bf); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero h1 { margin-bottom: .4rem; }

[hidden] { display: none !important; }
.instrument h4 { font-size: 1.15rem; font-weight: 700; margin: 0 0 .5em; line-height: 1.2; }
@media (max-width: 400px) { .nav__in { gap: .5rem; } .nav__tools { gap: .4rem; } .lang a { padding-inline: .45rem; } }
@media print { .js .reveal { opacity: 1; transform: none; } .nav, .hero__bg, .orb, .footer__langs, .form button { display: none; } }
