:root {
  --ink: #16202e;
  --muted: #566274;
  --line: #dde7e6;
  --bg: #fbfdfd;
  --alt: #eef5f4;
  --card: #ffffff;
  --accent: #12a594;
  --accent-dark: #0b7d70;
  --navy: #14223d;
  --gold: #c9a45c;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Naskh Arabic", sans-serif;
  color: var(--ink); background: var(--bg); line-height: 1.65; font-size: 17px;
  overflow-x: hidden;
}
h1, h2, h3, h4 { font-family: Georgia, "Times New Roman", "Noto Naskh Arabic", serif; font-weight: 600; line-height: 1.2; margin: 0; color: var(--navy); }
a { color: inherit; }
img { max-width: 100%; display: block; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

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

/* header */
header.top { position: sticky; top: 0; z-index: 20; background: #fff; border-bottom: 1px solid var(--line); transition: box-shadow .3s; }
header.top.scrolled { box-shadow: 0 6px 24px rgba(20, 34, 61, .1); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.brand { display: block; height: 68px; overflow: hidden; flex: none; }
.brand img { height: 92px; width: auto; max-width: none; margin: -12px 0 0 -22px; }
html[dir="rtl"] .brand img { margin: -12px -22px 0 0; }
nav.links { display: flex; gap: 22px; font-size: 15px; }
nav.links a { text-decoration: none; color: var(--muted); position: relative; padding: 4px 0; }
nav.links a::after { content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 2px; background: var(--accent); transform: scaleX(0); transition: transform .25s; }
nav.links a:hover { color: var(--navy); }
nav.links a:hover::after { transform: scaleX(1); }
.lang { display: flex; gap: 4px; }
.lang button { border: 1px solid var(--line); background: transparent; color: var(--muted); padding: 5px 11px; border-radius: 999px; font: inherit; font-size: 13px; cursor: pointer; }
.lang button[aria-pressed="true"] { background: var(--navy); color: #fff; border-color: var(--navy); }

/* hero */
.hero { padding: 80px 0 90px; position: relative; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 56px; align-items: center; position: relative; z-index: 1; }
.blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .35; animation: float 14s ease-in-out infinite; }
.b1 { width: 420px; height: 420px; background: #12a594; top: -120px; inset-inline-end: -80px; }
.b2 { width: 340px; height: 340px; background: #c9a45c; bottom: -140px; inset-inline-start: -90px; animation-delay: -6s; opacity: .22; }
@keyframes float { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(30px,-26px) scale(1.08); } }
.eyebrow { text-transform: uppercase; letter-spacing: 0.16em; font-size: 13px; color: var(--accent-dark); margin-bottom: 18px; }
.hero h1 { font-size: clamp(42px, 6vw, 68px); margin-bottom: 22px; }
.hero p.lead { font-size: 23px; color: var(--muted); max-width: 30em; margin: 0 0 34px; min-height: 3.4em; }
.rot { color: var(--accent-dark); font-weight: 600; border-inline-end: 2px solid var(--accent); padding-inline-end: 3px; animation: caret .8s step-end infinite; }
@keyframes caret { 50% { border-color: transparent; } }
.btns { display: flex; gap: 14px; flex-wrap: wrap; }
.btn { display: inline-block; padding: 14px 28px; border-radius: 999px; text-decoration: none; font-weight: 600; font-size: 16px; background: var(--navy); color: #fff; border: 1px solid var(--navy); transition: transform .2s, background .2s, box-shadow .2s; }
.btn:hover { background: #0c162b; transform: translateY(-2px); box-shadow: 0 10px 24px rgba(20,34,61,.22); }
.btn.ghost { background: transparent; color: var(--navy); }
.btn.ghost:hover { background: rgba(20, 34, 61, 0.06); }
.btn.light { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.light:hover { background: var(--accent-dark); }
.portrait { position: relative; }
.portrait > img { width: 100%; border-radius: 22px; box-shadow: 0 24px 60px rgba(20, 34, 61, 0.25); aspect-ratio: 1 / 1; object-fit: cover; }
.bubble { position: absolute; top: -16px; inset-inline-start: -18px; background: #fff; color: var(--navy); font-family: Georgia, serif; font-size: 20px; padding: 10px 20px; border-radius: 22px 22px 22px 4px; box-shadow: 0 12px 30px rgba(20,34,61,.2); animation: bob 3.5s ease-in-out infinite; }
html[dir="rtl"] .bubble { border-radius: 22px 22px 4px 22px; }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.badge { position: absolute; bottom: -18px; inset-inline-end: 18px; display: flex; align-items: center; gap: 10px; background: var(--navy); color: #fff; padding: 8px 16px 8px 8px; border-radius: 999px; font-size: 14px; box-shadow: 0 12px 30px rgba(20,34,61,.3); }
.badge img { width: 34px; height: 34px; border-radius: 50%; background: #fff; object-fit: cover; }

/* stats */
.stats { padding: 0; background: var(--navy); }
.stats .wrap { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding-top: 34px; padding-bottom: 34px; text-align: center; }
.stat b { display: block; font-family: Georgia, serif; font-size: clamp(34px, 5vw, 52px); color: #fff; line-height: 1.1; }
.stat span { color: #9fe0d6; font-size: 14.5px; }

/* sections */
section { padding: 84px 0; }
section.alt { background: var(--alt); }
.section-title { font-size: clamp(30px, 4vw, 40px); margin-bottom: 14px; }
.section-title::after { content: ""; display: block; width: 56px; height: 3px; background: var(--accent); margin-top: 16px; border-radius: 2px; }
.intro { color: var(--muted); max-width: 42em; margin: 18px 0 0; }
.chip { display: inline-block; background: rgba(18,165,148,.12); color: var(--accent-dark); border: 1px solid rgba(18,165,148,.35); padding: 4px 14px; border-radius: 999px; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 16px; }
.chip.light { background: rgba(255,255,255,.08); color: #9fe0d6; border-color: rgba(159,224,214,.4); }
h3.sub { font-size: 24px; margin: 56px 0 18px; }

.about-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 56px; margin-top: 34px; }
.about-grid p { margin: 0 0 18px; }
.facts { display: grid; gap: 14px; align-content: start; }
.fact { background: var(--card); border: 1px solid var(--line); border-inline-start: 4px solid var(--accent); border-radius: 14px; padding: 18px 22px; }
.fact small { display: block; text-transform: uppercase; letter-spacing: 0.12em; font-size: 12px; color: var(--accent-dark); margin-bottom: 4px; }
.fact span { font-weight: 600; color: var(--navy); }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 22px; margin-top: 38px; }
.cards.three { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.card { display: block; text-decoration: none; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 28px; transition: transform .25s, box-shadow .25s, border-color .25s; }
.card:hover { transform: translateY(-5px); box-shadow: 0 16px 38px rgba(20, 34, 61, 0.12); border-color: var(--accent); }
.card .num { font-family: Georgia, serif; color: var(--accent); font-size: 15px; letter-spacing: .1em; margin-bottom: 12px; }
.card h3 { font-size: 22px; margin-bottom: 10px; }
.card p { margin: 0; color: var(--muted); font-size: 16px; }
.card.prog { position: relative; padding-top: 56px; }
.seal { position: absolute; top: 18px; inset-inline-start: 24px; background: linear-gradient(135deg, #c9a45c, #e3c98a); color: #3a2c0c; font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: 4px 12px; border-radius: 999px; }

.panel { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 28px; }
.panel h3 { font-size: 21px; margin-bottom: 20px; }
.train-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 22px; margin-top: 30px; }
.donut-row { display: flex; align-items: center; gap: 30px; flex-wrap: wrap; }
.donut-wrap { position: relative; width: 190px; height: 190px; flex: none; }
.donut circle { transition: stroke-dasharray 1.4s cubic-bezier(.2,.8,.2,1); }
.donut g circle { stroke-dasharray: 0 100; }
.in .donut g circle { stroke-dasharray: var(--d) calc(100 - var(--d)); }
.donut-c { position: absolute; inset: 0; display: grid; place-items: center; font-family: Georgia, serif; color: var(--navy); font-size: 17px; text-align: center; }
.legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; flex: 1; min-width: 200px; }
.legend li { display: flex; align-items: center; gap: 10px; font-size: 15.5px; }
.legend i { width: 14px; height: 14px; border-radius: 4px; flex: none; }
.legend b { margin-inline-start: auto; color: var(--navy); }
.note { margin: 18px 0 0; color: var(--muted); font-size: 14px; }
.steps ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; position: relative; }
.steps li { display: flex; gap: 16px; align-items: flex-start; }
.steps li b { flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; font-family: Georgia, serif; }
.steps li:last-child b { background: var(--gold); color: #3a2c0c; }
.steps li strong { display: block; color: var(--navy); font-size: 17px; }
.steps li span { color: var(--muted); font-size: 15.5px; }

.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.gallery figure { margin: 0; overflow: hidden; border-radius: 16px; box-shadow: 0 14px 34px rgba(20,34,61,.14); }
.gallery img { width: 100%; height: 100%; max-height: 360px; object-fit: cover; transition: transform .6s; }
.gallery figure:hover img { transform: scale(1.06); }

/* AI section */
section.dark { background: radial-gradient(1200px 500px at 80% -10%, #1d3a57 0%, var(--navy) 60%); color: #dbe6f2; }
.dark .section-title, .dark h3, .dark h4 { color: #fff; }
.dark .intro { color: #b9c8da; }
.flow { display: flex; align-items: stretch; gap: 0; margin-top: 44px; flex-wrap: wrap; justify-content: center; }
.node { flex: 1 1 150px; max-width: 190px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.16); border-radius: 16px; padding: 18px 16px; text-align: center; transition: all .4s; }
.node b { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.12); margin: 0 auto 10px; font-family: Georgia, serif; color: #fff; transition: all .4s; }
.node strong { display: block; color: #fff; font-size: 16px; line-height: 1.3; margin-bottom: 4px; }
.node span { font-size: 13.5px; color: #b9c8da; }
.node.active { background: rgba(18,165,148,.22); border-color: #12a594; transform: translateY(-6px); box-shadow: 0 14px 34px rgba(18,165,148,.3); }
.node.active b { background: #12a594; }
.arrow { flex: 0 0 26px; align-self: center; height: 2px; background: repeating-linear-gradient(90deg, #4fd1c0 0 6px, transparent 6px 10px); background-size: 20px 2px; animation: dash 1s linear infinite; }
html[dir="rtl"] .arrow { animation-direction: reverse; }
@keyframes dash { to { background-position: 20px 0; } }
.ai-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 50px; align-items: stretch; }
.panel-d { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.14); border-radius: 18px; padding: 28px; }
.panel-d h3 { font-size: 21px; margin-bottom: 22px; }
.ladder { display: flex; align-items: flex-end; gap: 14px; height: 250px; }
.step { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 10px; text-align: center; font-size: 13.5px; color: #cbd8e8; }
.step i { display: block; width: 100%; height: 0; border-radius: 10px 10px 0 0; background: linear-gradient(180deg, #4fd1c0, #12a594); transition: height 1.2s cubic-bezier(.2,.8,.2,1); }
.step:nth-child(2) i { transition-delay: .15s; } .step:nth-child(3) i { transition-delay: .3s; } .step:nth-child(4) i { transition-delay: .45s; background: linear-gradient(180deg, #e3c98a, #c9a45c); }
.in .step i, .panel-d.in .step i { height: calc(var(--h) * .72); }
.step span { min-height: 2.8em; display: block; }
.uses { display: grid; gap: 14px; }
.use { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.14); border-inline-start: 4px solid #12a594; border-radius: 14px; padding: 18px 22px; transition: transform .25s; }
.use:hover { transform: translateX(6px); }
html[dir="rtl"] .use:hover { transform: translateX(-6px); }
.use h4 { font-size: 18px; margin-bottom: 4px; }
.use p { margin: 0; font-size: 15.5px; color: #b9c8da; }

/* timeline + gantt */
.gantt { margin: 38px 0 10px; }
.g-row { display: grid; grid-template-columns: 190px 1fr; gap: 16px; align-items: center; padding: 7px 0; }
.g-name { font-size: 15px; color: var(--navy); font-weight: 600; line-height: 1.25; }
.g-name small { display: block; font-weight: 400; color: var(--muted); font-size: 12.5px; }
.g-track { position: relative; height: 22px; background: repeating-linear-gradient(90deg, #eef3f3 0 1px, transparent 1px 33.333%); border-radius: 6px; }
.g-bar { position: absolute; top: 2px; bottom: 2px; inset-inline-start: var(--s); width: 0; border-radius: 6px; background: var(--navy); transition: width 1.2s cubic-bezier(.2,.8,.2,1); }
.in .g-bar { width: var(--w); }
.g-bar.c1 { background: linear-gradient(90deg, #12a594, #4fd1c0); }
.g-bar.c2 { background: var(--navy); }
.g-bar.c3 { background: #6b7a92; }
.g-bar.c4 { background: var(--gold); }
.g-axis { display: flex; justify-content: space-between; margin-inline-start: 206px; font-size: 12.5px; color: var(--muted); margin-top: 6px; }

.timeline { margin-top: 44px; border-inline-start: 2px solid #cfe0de; padding-inline-start: 34px; display: grid; gap: 34px; }
.job { position: relative; }
.job::before { content: ""; position: absolute; inset-inline-start: -43px; top: 8px; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); border: 3px solid var(--alt); box-shadow: 0 0 0 0 rgba(18,165,148,.5); }
.job.in::before { animation: ping 1.6s ease-out 1; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(18,165,148,.6); } 100% { box-shadow: 0 0 0 14px rgba(18,165,148,0); } }
.job .when { font-size: 14px; color: var(--accent-dark); letter-spacing: .06em; }
.job h3 { font-size: 21px; margin: 4px 0 2px; }
.job .org { color: var(--muted); font-weight: 600; margin-bottom: 8px; }
.job .org a { color: var(--accent-dark); }
.job p { margin: 0; color: var(--muted); max-width: 46em; }

.two { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 60px; }
.edu { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 22px 26px; margin-bottom: 16px; }
.edu h3 { font-size: 19px; margin-bottom: 6px; }
.edu p { margin: 0; color: var(--muted); font-size: 15.5px; }

/* speaking */
.speak { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 56px; align-items: center; }
.speak img { border-radius: 20px; box-shadow: 0 20px 50px rgba(20, 34, 61, 0.2); width: 100%; }
.speak p { color: var(--muted); margin: 18px 0 0; }
.links-row { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }

/* contact */
.contact { background: var(--navy); color: #fff; text-align: center; }
.seal-icon { width: 76px; height: 76px; border-radius: 50%; background: #fff; margin: 0 auto 22px; object-fit: cover; box-shadow: 0 0 0 6px rgba(18,165,148,.35); }
.contact h2 { color: #fff; font-size: clamp(32px, 4.5vw, 46px); }
.contact p { color: #cdd5e3; max-width: 36em; margin: 18px auto 32px; }
.contact .btn { background: #fff; color: var(--navy); border-color: #fff; }
.contact .btn:hover { background: #e4f6f3; }
.contact .btn.ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.5); }
.contact .btn.ghost:hover { background: rgba(255,255,255,.1); }
.contact .btns { justify-content: center; }
footer { padding: 24px 0; color: var(--muted); font-size: 14px; }
.foot { display: flex; align-items: center; justify-content: center; gap: 12px; }
.foot img { width: 30px; height: 30px; border-radius: 50%; }

/* arabic */
html[dir="rtl"] body { font-size: 18px; line-height: 1.8; }
html[dir="rtl"] .eyebrow, html[dir="rtl"] .fact small, html[dir="rtl"] .job .when, html[dir="rtl"] .chip { letter-spacing: 0; }

@media (prefers-reduced-motion: reduce) {
  .js .rv { opacity: 1; transform: none; transition: none; }
  .blob, .bubble, .arrow, .rot { animation: none; }
}

@media (max-width: 960px) { nav.links { display: none; } }
@media (max-width: 860px) {
  .hero .wrap, .about-grid, .two, .speak, .train-grid, .ai-grid { grid-template-columns: 1fr; gap: 36px; }
  .portrait { order: -1; max-width: 360px; margin: 0 auto; }
  section { padding: 60px 0; }
  .hero { padding: 40px 0 56px; }
  .stats .wrap { grid-template-columns: repeat(2, 1fr); gap: 22px; }
  .g-row { grid-template-columns: 110px 1fr; gap: 10px; }
  .g-axis { margin-inline-start: 120px; }
  .arrow { flex-basis: 100%; height: 18px; width: 2px; background: none; }
  .node { max-width: none; }
}
