/* ============================================================
   salemababneh.com
   Display: Instrument Serif  ·  Text: Inter  ·  Arabic: IBM Plex Sans Arabic
   ============================================================ */

@font-face {
  font-family: "Instrument Serif";
  src: url("/fonts/instrument-serif-latin.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F, U+2074, U+20AC, U+2122, U+2212;
}
@font-face {
  font-family: "Inter";
  src: url("/fonts/inter-latin-var.woff2") format("woff2");
  font-weight: 300 800; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F, U+2074, U+20AC, U+2122, U+2212;
}
@font-face { font-family: "Plex Arabic"; src: url("/fonts/plex-ar-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plex Arabic"; src: url("/fonts/plex-ar-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Plex Arabic"; src: url("/fonts/plex-ar-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Plex Arabic"; src: url("/fonts/plex-ar-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

/* ---------- tokens ---------- */

:root {
  --bg:        #0b0d10;
  --bg-2:      #101318;
  --surface:   #14181e;
  --surface-2: #191e25;
  --ink:       #f2f4f7;
  --ink-soft:  #a8b0bd;
  --ink-faint: #737b89;
  --rule:      #232932;
  --rule-soft: #1a1f27;
  --accent:    #e0a86a;
  --accent-dim:#a97b45;
  --glow:      rgba(224, 168, 106, 0.13);

  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;

  --max: 68rem;
  --narrow: 47rem;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg:        #fdfcfa;
    --bg-2:      #f6f3ee;
    --surface:   #ffffff;
    --surface-2: #f8f5f0;
    --ink:       #14161a;
    --ink-soft:  #4d545f;
    --ink-faint: #7d848f;
    --rule:      #e5e0d8;
    --rule-soft: #efebe4;
    --accent:    #9a6428;
    --accent-dim:#b98a53;
    --glow:      rgba(154, 100, 40, 0.09);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  font-feature-settings: "cv05" 1, "ss03" 1;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body[dir="rtl"] {
  font-family: "Plex Arabic", var(--sans);
  line-height: 1.95;
}
body[dir="rtl"] .display { font-family: "Plex Arabic", var(--sans); font-weight: 700; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 1.7rem; }
.wrap.tight { max-width: var(--narrow); }

a { color: var(--accent); }

::selection { background: var(--accent); color: var(--bg); }

/* ---------- top bar ---------- */

.topbar {
  position: sticky; top: 0; z-index: 20;
  border-bottom: 1px solid var(--rule-soft);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px) saturate(1.4);
  padding: 0.95rem 0;
  font-size: 0.85rem;
}
.topbar .wrap { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.mark { font-weight: 600; letter-spacing: -0.014em; color: var(--ink); text-decoration: none; }
.mark .dot { color: var(--accent); }
.lang {
  color: var(--ink-soft); text-decoration: none;
  border: 1px solid var(--rule); border-radius: 999px;
  padding: 0.26rem 0.8rem; font-weight: 500;
  transition: color .18s, border-color .18s, background .18s;
}
.lang:hover { color: var(--accent); border-color: var(--accent-dim); background: var(--glow); }

/* ---------- hero ---------- */

.hero { position: relative; padding: 6rem 0 4.2rem; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; z-index: 0;
  top: -34%; left: 50%; transform: translateX(-50%);
  width: min(72rem, 150%); aspect-ratio: 1 / 1;
  background: radial-gradient(circle at 50% 50%, var(--glow) 0%, transparent 62%);
  pointer-events: none;
}
/* Full-width wrap so the hero's left edge lines up with every section below;
   line length is constrained on the children instead. */
.hero .wrap { position: relative; z-index: 1; }
.hero .wrap > * { max-width: 44rem; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-size: 0.76rem; font-weight: 550; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-faint); margin: 0 0 1.5rem;
}
.eyebrow::before {
  content: ""; width: 1.6rem; height: 1px; background: var(--accent-dim);
}
body[dir="rtl"] .eyebrow { letter-spacing: 0; text-transform: none; font-size: 0.84rem; }

h1.display {
  font-family: var(--serif);
  font-size: clamp(3.1rem, 9.5vw, 5.6rem);
  line-height: 0.98;
  letter-spacing: -0.021em;
  font-weight: 400;
  margin: 0 0 0.85rem;
}

.role {
  font-size: clamp(1.02rem, 2.4vw, 1.16rem);
  color: var(--accent);
  font-weight: 550;
  letter-spacing: -0.004em;
  margin: 0 0 2.1rem;
}

.statement {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 4.1vw, 2.15rem);
  line-height: 1.22;
  letter-spacing: -0.014em;
  font-weight: 400;
  color: var(--ink);
  margin: 0 0 1.9rem;
  padding-inline-start: 1.35rem;
  border-inline-start: 2px solid var(--accent);
}
body[dir="rtl"] .statement { font-family: "Plex Arabic", var(--sans); font-weight: 600; line-height: 1.6; }

.lede { font-size: 1.04rem; color: var(--ink-soft); margin: 0 0 1.05rem; max-width: 40rem; }

.cred-strip { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 2.2rem; }
.cred-strip span {
  font-size: 0.8rem; font-weight: 520; color: var(--ink-soft);
  background: var(--surface); border: 1px solid var(--rule);
  border-radius: 7px; padding: 0.34rem 0.75rem;
}

/* ---------- sections ---------- */

section { padding: 4.4rem 0; position: relative; }
section.band { background: var(--bg-2); border-block: 1px solid var(--rule-soft); }

h2 {
  display: flex; align-items: baseline; gap: 0.85rem;
  font-size: 0.79rem; text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--ink-faint); font-weight: 600;
  margin: 0 0 2.4rem;
  padding-bottom: 1rem; border-bottom: 1px solid var(--rule);
}
h2 .num {
  font-family: var(--serif); font-size: 1.05rem; letter-spacing: 0;
  color: var(--accent); text-transform: none;
}
body[dir="rtl"] h2 { letter-spacing: 0; text-transform: none; font-size: 0.95rem; }
body[dir="rtl"] h2 .num { font-family: var(--sans); }

h4.group {
  font-size: 0.75rem; font-weight: 620; letter-spacing: 0.11em; text-transform: uppercase;
  color: var(--accent); margin: 2.4rem 0 1.05rem;
}
h4.group:first-of-type { margin-top: 0; }
body[dir="rtl"] h4.group { letter-spacing: 0; text-transform: none; font-size: 0.94rem; }

/* ---------- stats ---------- */

/* Explicit 3 columns so six stats read as two balanced rows, not 4 + 2. */
.figures { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; }
@media (max-width: 58rem) { .figures { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 32rem) { .figures { grid-template-columns: 1fr; } }
.fig {
  padding: 1.5rem 1.4rem 1.5rem 0;
  border-top: 1px solid var(--rule);
}
body[dir="rtl"] .fig { padding: 1.5rem 0 1.5rem 1.4rem; }
.fig .n {
  display: block;
  font-family: var(--serif);
  font-size: clamp(2.4rem, 6vw, 3.1rem);
  font-weight: 400; line-height: 1; letter-spacing: -0.024em;
  color: var(--ink);
}
body[dir="rtl"] .fig .n { font-family: var(--sans); font-weight: 600; letter-spacing: -0.03em; }
.fig .l { display: block; color: var(--ink-soft); font-size: 0.875rem; margin-top: 0.7rem; line-height: 1.45; max-width: 15rem; }

/* ---------- pillars ---------- */

.pillars { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); }
.pillar {
  position: relative; overflow: hidden;
  background: linear-gradient(168deg, var(--surface-2), var(--surface));
  border: 1px solid var(--rule); border-radius: 14px;
  padding: 1.7rem 1.55rem 1.6rem;
}
.pillar .ghost {
  position: absolute; top: -0.6rem; inset-inline-end: 0.5rem;
  font-family: var(--serif); font-size: 5.2rem; line-height: 1;
  color: var(--accent); opacity: 0.16; pointer-events: none;
}
.pillar h3 {
  margin: 0 0 0.75rem; font-size: 1.12rem; font-weight: 620;
  letter-spacing: -0.017em; line-height: 1.28; position: relative;
}
.pillar p { margin: 0; color: var(--ink-soft); font-size: 0.945rem; position: relative; }

/* ---------- experience timeline ---------- */

.roles { position: relative; display: grid; gap: 2.5rem; }
.roles::before {
  content: ""; position: absolute; top: 0.55rem; bottom: 0.8rem;
  inset-inline-start: 6.6rem; width: 1px; background: var(--rule);
}
.role-item { display: grid; grid-template-columns: 6.6rem 1fr; gap: 2rem; position: relative; }
.role-when {
  color: var(--ink-faint); font-size: 0.8rem; font-weight: 540;
  font-variant-numeric: tabular-nums; line-height: 1.45; padding-top: 0.15rem;
  text-align: end;
}
.role-when span { display: block; font-weight: 400; opacity: 0.8; }
.role-body { position: relative; }
.role-body::before {
  content: ""; position: absolute; top: 0.45rem; inset-inline-start: -2.31rem;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 4px var(--bg-2);
}
.role-item h3 { margin: 0 0 0.25rem; font-size: 1.14rem; font-weight: 620; letter-spacing: -0.018em; line-height: 1.3; }
.role-item .org { margin: 0 0 0.6rem; color: var(--accent); font-size: 0.9rem; font-weight: 550; }
.role-item p:last-child { margin: 0; color: var(--ink-soft); font-size: 0.945rem; }

/* ---------- engagement lists ---------- */

.eng-cols { display: grid; gap: 2.4rem 3rem; grid-template-columns: repeat(auto-fit, minmax(21rem, 1fr)); align-items: start; }
ul.eng { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.95rem; }
ul.eng li {
  color: var(--ink-soft); font-size: 0.94rem; line-height: 1.55;
  padding-inline-start: 1.2rem; position: relative;
}
ul.eng li::before {
  content: ""; position: absolute; inset-inline-start: 0; top: 0.6em;
  width: 5px; height: 5px; border-radius: 1px; transform: rotate(45deg);
  background: var(--accent-dim);
}
ul.eng li b { color: var(--ink); font-weight: 600; }

/* ---------- credentials ---------- */

.cred-cols { display: grid; gap: 2.2rem 3rem; grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr)); align-items: start; }
ul.plain { list-style: none; margin: 0; padding: 0; display: grid; }
ul.plain li {
  font-size: 0.93rem; color: var(--ink-soft);
  display: flex; justify-content: space-between; gap: 1.2rem; align-items: baseline;
  border-bottom: 1px solid var(--rule-soft); padding: 0.62rem 0;
}
ul.plain li:last-child { border-bottom: 0; }
.yr { color: var(--ink-faint); font-size: 0.8rem; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ---------- tags ---------- */

.tags { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.tags span {
  border: 1px solid var(--rule); background: var(--surface);
  border-radius: 999px; padding: 0.34rem 0.85rem;
  font-size: 0.85rem; color: var(--ink-soft);
  transition: border-color .18s, color .18s;
}
.tags span:hover { border-color: var(--accent-dim); color: var(--ink); }

/* ---------- contact ---------- */

.contact-band { position: relative; overflow: hidden; background: var(--bg-2); border-top: 1px solid var(--rule-soft); }
.contact-band::before {
  content: ""; position: absolute; inset-inline-start: 50%; bottom: -60%;
  transform: translateX(-50%); width: min(60rem, 140%); aspect-ratio: 1/1;
  background: radial-gradient(circle, var(--glow) 0%, transparent 60%);
  pointer-events: none;
}
.contact-band .wrap { position: relative; }
.contact-band .wrap > * { max-width: 44rem; }
.contact-links { display: flex; flex-wrap: wrap; gap: 0.65rem; }
.btn {
  display: inline-flex; align-items: center; gap: 0.45rem;
  border: 1px solid var(--rule); border-radius: 10px;
  padding: 0.7rem 1.3rem; text-decoration: none; color: var(--ink);
  font-size: 0.94rem; font-weight: 550; background: var(--surface);
  transition: border-color .18s, color .18s, transform .18s, background .18s;
}
.btn:hover { border-color: var(--accent-dim); color: var(--accent); transform: translateY(-1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #14100a; }
.btn.primary:hover { color: #14100a; filter: brightness(1.07); }

/* ---------- footer ---------- */

footer { border-top: 1px solid var(--rule-soft); padding: 2.2rem 0 3.4rem; color: var(--ink-faint); font-size: 0.83rem; }
footer a { color: var(--ink-faint); }

/* ---------- entrance ---------- */

@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.hero .eyebrow  { animation: rise .6s .02s both cubic-bezier(.22,.8,.3,1); }
.hero h1        { animation: rise .7s .08s both cubic-bezier(.22,.8,.3,1); }
.hero .role     { animation: rise .7s .16s both cubic-bezier(.22,.8,.3,1); }
.hero .statement{ animation: rise .7s .24s both cubic-bezier(.22,.8,.3,1); }
.hero .lede     { animation: rise .7s .32s both cubic-bezier(.22,.8,.3,1); }
.hero .cred-strip { animation: rise .7s .4s both cubic-bezier(.22,.8,.3,1); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- narrow ---------- */

@media (max-width: 44rem) {
  body { font-size: 16.5px; }
  section { padding: 3.1rem 0; }
  .hero { padding: 3.6rem 0 2.8rem; }
  .roles::before { inset-inline-start: 4px; }
  .role-item { grid-template-columns: 1fr; gap: 0.4rem; padding-inline-start: 1.7rem; }
  .role-when { text-align: start; padding-top: 0; }
  .role-when span { display: inline; }
  .role-when span::before { content: " "; }
  .role-body::before { inset-inline-start: -1.7rem; top: 0.4rem; }
  .fig { padding-inline-end: 0; }
  body[dir="rtl"] .fig { padding-inline-start: 0; }
  ul.plain li { flex-direction: column; gap: 0.15rem; }
}
