/* خط ثمانية (Thmanyah Serif Text) كما أُرسل من المصدر الرسمي دون تعديل. Tajawal احتياطي فقط. */
@font-face { font-family:"Thmanyah Serif"; font-weight:400; font-style:normal; src:url(/fonts/thmanyah/thmanyahseriftext-Regular.otf) format("opentype"); font-display:swap; }
@font-face { font-family:"Thmanyah Serif"; font-weight:500; font-style:normal; src:url(/fonts/thmanyah/thmanyahseriftext-Medium.otf) format("opentype"); font-display:swap; }
@font-face { font-family:"Thmanyah Serif"; font-weight:700; font-style:normal; src:url(/fonts/thmanyah/thmanyahseriftext-Bold.otf) format("opentype"); font-display:swap; }
@font-face { font-family:"Thmanyah Serif"; font-weight:900; font-style:normal; src:url(/fonts/thmanyah/thmanyahseriftext-Black.otf) format("opentype"); font-display:swap; }
@font-face { font-family:Tajawal; font-weight:400; src:url(/fonts/Tajawal-Regular.ttf) format("truetype"); font-display:swap; }
@font-face { font-family:Tajawal; font-weight:500; src:url(/fonts/Tajawal-Medium.ttf) format("truetype"); font-display:swap; }
@font-face { font-family:Tajawal; font-weight:700; src:url(/fonts/Tajawal-Bold.ttf) format("truetype"); font-display:swap; }

/* ليل أزرق نابض: خلفية كحلية عميقة بوهج ذهبي وفيروزي ناعم، وتخطيط حرّ بلا صناديق، وخط زمني ذهبي */
/* أزرق غامق مع أسود: خلفية سوداء مزرقة، وهج أزرق ملكي ناعم، ولون واحد للتمييز (أزرق سماوي ساطع) */
:root { --bg:#0b0b0c; --ink:#f4f4f1; --mute:#a0a09a; --rule:rgba(255,255,255,.15); --soft:rgba(255,255,255,.06);
  --accent:#d6f56b; --accent2:#b8d94e; --on-accent:#101010; --focus:#d6f56b; --lime:#d6f56b; --on-lime:#101010; --violet:#2c43a3;
  --g1:rgba(255,255,255,.10); --g2:rgba(160,160,160,.12); --g3:rgba(214,245,107,.07); --navbg:rgba(20,20,21,.72); --wave1:#1c1c1d; --wave2:#262627; --r:24px; color-scheme:dark; }
html[data-mode=light] { --lime:#26398f; --on-lime:#ffffff; --bg:#fbf8f7; --ink:#101010; --mute:#62625c; --rule:rgba(0,0,0,.15); --soft:rgba(0,0,0,.05);
  --accent:#26398f; --accent2:#3a52b5; --on-accent:#ffffff; --focus:#26398f; --g1:rgba(0,0,0,.06); --g2:rgba(0,0,0,.04); --g3:rgba(38,57,143,.18); --navbg:rgba(255,255,255,.78); --wave1:#e2e2dc; --wave2:#d6d6cf; color-scheme:light; }
* { box-sizing:border-box; }
html { scroll-behavior:smooth; scroll-padding-top:92px; background:var(--bg); }
body { margin:0; color:var(--ink); background:
    radial-gradient(900px 560px at 88% -6%, var(--g1), transparent 62%),
    radial-gradient(820px 560px at -10% 40%, var(--g2), transparent 60%),
    radial-gradient(900px 620px at 100% 95%, var(--g3), transparent 62%), var(--bg);
  background-attachment:fixed;
  font-family:"Thmanyah Serif",Tajawal,"Segoe UI",system-ui,sans-serif; font-size:18px; line-height:1.95; font-weight:400; font-synthesis:none; font-kerning:normal; text-rendering:auto; font-feature-settings:"liga","rlig","ccmp","locl","lnum"; font-variant-numeric:lining-nums; -webkit-text-size-adjust:100%; }
a { color:inherit; text-decoration-color:var(--rule); text-underline-offset:5px; } a:hover { color:var(--accent); text-decoration-color:var(--accent); }
img { max-width:100%; height:auto; display:block; }
button, input, textarea { font-family:inherit; }
::selection { background:var(--accent); color:var(--on-accent); }
:focus-visible { outline:3px solid var(--focus); outline-offset:3px; border-radius:6px; }
.skip { position:absolute; inset-inline-start:12px; top:-60px; background:var(--accent); color:var(--on-accent); padding:8px 16px; border-radius:99px; z-index:50; } .skip:focus { top:12px; }
.wrap { width:min(1120px,100%); margin-inline:auto; padding-inline:max(22px,env(safe-area-inset-left,0px)) max(22px,env(safe-area-inset-right,0px)); }
[lang=en] h1, [lang=en] .brand { letter-spacing:-.02em; } [lang=en] body { line-height:1.8; } [lang=en] .prose p, [lang=en] .lead { line-height:1.85; }

/* التنقل */
.top { position:sticky; top:0; z-index:30; padding:max(10px,env(safe-area-inset-top,0px)) 14px 0; pointer-events:none; }
.top .wrap { padding:0; width:min(1120px,100%); pointer-events:auto; }
.bar { display:flex; align-items:center; gap:16px; min-height:58px; padding:6px 10px 6px 22px; background:var(--navbg); backdrop-filter:blur(16px); border:1px solid var(--rule); border-radius:99px; position:relative; }
[dir=rtl] .bar { padding:6px 22px 6px 10px; }
.brand { font-weight:900; font-size:1.2rem; text-decoration:none; } .brand:hover { color:var(--accent); }
.nav { margin-inline-start:auto; display:flex; align-items:center; gap:4px; font-size:.95rem; } .nav a { text-decoration:none; color:var(--mute); padding:6px 14px; border-radius:99px; } .nav a:hover { color:var(--ink); background:var(--soft); }
.nav .icon { font-weight:700; border:1px solid var(--rule); width:36px; height:36px; padding:0; display:grid; place-items:center; } .nav .lang { color:var(--ink); border:1px solid var(--rule); }
.nav .signin { background:var(--accent); color:var(--on-accent); font-weight:700; padding:6px 22px; } .nav .signin:hover { background:var(--ink); color:var(--bg); }
.burger { display:none; margin-inline-start:auto; background:var(--soft); border:1px solid var(--rule); border-radius:99px; width:44px; height:44px; font-size:1.15rem; color:var(--ink); cursor:pointer; }

/* البطل: حرّ على الخلفية، اسم ضخم، وصورة بقوس ذهبي */
.hero { padding:clamp(56px,10vw,132px) 0 clamp(64px,9vw,120px); background:var(--bg-img, none) center/cover; }
.hero-grid { display:grid; grid-template-columns:minmax(0,7fr) minmax(0,4fr); gap:clamp(28px,6vw,84px); align-items:center; }
.hero-title { margin:0 0 14px; color:var(--accent); font-weight:700; font-size:1.2rem; line-height:1.6; }
h1 { margin:0; font-size:clamp(3rem,10vw,7.6rem); line-height:1.15; font-weight:900; text-wrap:balance; }
.lead { max-width:46ch; margin-top:24px; font-size:1.24rem; line-height:2.05; color:var(--mute); } .lead p { margin:0 0 .8em; }
.hero-meta { margin:14px 0 0; color:var(--mute); }
.cta { display:flex; flex-wrap:wrap; gap:10px; margin:30px 0 0; }
.btn { display:inline-block; padding:12px 28px; border:1.5px solid var(--rule); border-radius:99px; text-decoration:none; font-weight:500; line-height:1.5; } .btn:hover { border-color:var(--accent); color:var(--accent); }
.btn.primary { background:var(--accent); border-color:var(--accent); color:var(--on-accent); font-weight:700; } .btn.primary:hover { background:var(--ink); border-color:var(--ink); color:var(--bg); } .btn.ghost { background:transparent; }
.hero-photo { position:relative; max-width:360px; margin-inline:auto; width:100%; }
.hero-photo:has(img)::before { content:""; position:absolute; inset:5% -7% -5% 7%; border-radius:999px 999px 32px 32px; border:1.5px solid var(--accent); z-index:0; } [dir=rtl] .hero-photo:has(img)::before { inset:5% 7% -5% -7%; }
.hero-photo img { position:relative; z-index:1; aspect-ratio:4/5; width:100%; object-fit:cover; border-radius:999px 999px 26px 26px; }
/* بديل الصورة: حلقة ذهبية خفيفة بحرفين، لا لوحة ثقيلة */
.mono { display:grid; place-items:center; color:var(--accent); font-weight:900; } .mono.big { width:min(240px,70%); aspect-ratio:1; margin-inline:auto; border-radius:50%; font-size:clamp(3.4rem,10vw,5.6rem); border:1.5px solid var(--accent); background:var(--soft); box-shadow:0 0 80px var(--g1); }

/* الأقسام: مفتوحة على الخلفية، يفصلها خط ذهبي رفيع */
main > .sec { padding:clamp(64px,10vw,132px) 0; border-top:1px solid var(--rule); }
.sec-grid { display:grid; grid-template-columns:200px minmax(0,1fr); gap:clamp(20px,5vw,64px); }
.sec-head { align-self:start; position:sticky; top:100px; } .sec-head h2 { margin:0; font-size:1.4rem; line-height:1.5; font-weight:900; display:flex; align-items:center; gap:12px; } .sec-head h2::before { content:""; width:28px; height:3px; border-radius:3px; background:linear-gradient(90deg,var(--accent),var(--accent2)); flex:none; }
.sec-desc { margin:8px 0 0; color:var(--mute); font-size:.95rem; line-height:1.8; }
.prose p { margin:0 0 1em; max-width:62ch; line-height:2.05; } .prose ul, .what ul:not(.tags) { margin:0 0 1em; padding-inline-start:1.3em; max-width:62ch; list-style:disc; } .prose li, .what ul:not(.tags) li { margin:0 0 .35em; } li::marker { color:var(--accent); }
.about { display:grid; gap:28px; } .about h3 { margin:0 0 4px; font-size:1rem; color:var(--accent); font-weight:700; }
h3 { margin:0; font-size:1.36rem; line-height:1.5; font-weight:700; text-wrap:balance; } h4 { margin:18px 0 4px; font-size:.95rem; color:var(--accent2); font-weight:700; }

/* الخط الزمني للخبرات والتعليم */
.timeline { list-style:none; margin:0; padding:0; }
.timeline > li { position:relative; display:grid; grid-template-columns:150px minmax(0,1fr); gap:22px; padding:0 0 52px; padding-inline-start:32px; }
.timeline > li::before { content:""; position:absolute; top:12px; bottom:-4px; inset-inline-start:7px; width:2px; background:linear-gradient(var(--accent),transparent); }
.timeline > li::after { content:""; position:absolute; top:10px; inset-inline-start:0; width:16px; height:16px; border-radius:50%; background:var(--bg); border:3px solid var(--accent); }
.timeline > li:last-child { padding-bottom:0; } .timeline > li:last-child::before { display:none; }
.rows { list-style:none; margin:0; padding:0; } .rows > li { display:grid; grid-template-columns:150px minmax(0,1fr); gap:22px; padding:30px 0; border-top:1px solid var(--rule); } .rows > li:first-child { border-top:0; padding-top:0; }
.when { color:var(--accent2); font-size:.9rem; font-weight:700; padding-top:6px; font-variant-numeric:tabular-nums; } .what p { margin:.4em 0; max-width:62ch; }
.org { display:flex; align-items:center; gap:10px; flex-wrap:wrap; color:var(--mute); margin:4px 0 12px !important; } .org .logo { width:30px; height:30px; object-fit:contain; border-radius:8px; background:#fff; } .org em { font-style:normal; font-size:.82rem; border:1px solid var(--accent); color:var(--accent); border-radius:99px; padding:0 12px; }
.tags { list-style:none; margin:14px 0 0; padding:0; display:flex; flex-wrap:wrap; gap:8px; } .tags li { border-radius:99px; padding:3px 16px; font-size:.92rem; background:var(--soft); border:1px solid var(--rule); color:var(--ink); line-height:1.8; }
.tags li:nth-child(3n+1) { border-color:var(--accent); } .tags li:nth-child(3n+2) { border-color:var(--accent2); }
.skillgroups { display:grid; grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); gap:28px 30px; } .skillgroups h3 { font-size:1rem; color:var(--accent); font-weight:700; margin-bottom:4px; }
.projects { display:grid; grid-template-columns:repeat(auto-fill,minmax(270px,1fr)); gap:22px; } .proj { display:block; text-decoration:none; transition:transform .25s; } .proj:hover { transform:translateY(-5px); color:inherit; } .proj:hover h3 { color:var(--accent); } .proj.feat { grid-column:span 2; }
.thumb { aspect-ratio:16/10; overflow:hidden; border-radius:var(--r); background:var(--soft); border:1px solid var(--rule); } .thumb img { width:100%; height:100%; object-fit:cover; } .thumb .mono { width:100%; height:100%; font-size:3.4rem; border:0; box-shadow:none; border-radius:0; aspect-ratio:auto; background:var(--g2); color:var(--ink); }
.proj:nth-child(3n+2) .thumb .mono { background:var(--g1); color:var(--ink); } .proj:nth-child(3n+3) .thumb .mono { background:var(--g3); color:var(--ink); }
.proj .meta { padding:14px 4px 0; } .proj h3 { font-size:1.2rem; transition:color .2s; } .proj p { margin:2px 0 0; color:var(--mute); font-size:.92rem; } .badge { display:inline-block; font-size:.78rem; background:var(--accent); color:var(--on-accent); font-weight:700; border-radius:99px; padding:0 12px; margin-bottom:8px; }
.kind { color:var(--accent2); font-size:.85rem; font-weight:700; margin:0 0 2px !important; } .links { display:flex; gap:18px; flex-wrap:wrap; } img.inline { max-width:min(100%,420px); margin-top:14px; border-radius:var(--r); }
.contact { display:grid; grid-template-columns:minmax(0,5fr) minmax(0,6fr); gap:clamp(24px,5vw,56px); } .info ul { list-style:none; margin:0; padding:0; display:grid; gap:18px; } .info li { padding-inline-start:16px; border-inline-start:2px solid var(--accent); } .info li span { display:block; color:var(--accent2); font-size:.85rem; }
.form label { display:block; margin:14px 0 6px; font-weight:700; font-size:.95rem; } .form label:first-child { margin-top:0; }
.form input, .form textarea { width:100%; padding:13px 18px; font:inherit; color:inherit; background:var(--soft); border:1.5px solid var(--rule); border-radius:16px; } .form input:focus, .form textarea:focus { outline:none; border-color:var(--accent); }
.form button { margin-top:18px; padding:13px 32px; font:inherit; font-weight:700; background:var(--accent); color:var(--on-accent); border:0; border-radius:99px; cursor:pointer; } .form button:hover:not(:disabled) { background:var(--ink); color:var(--bg); } .form button:disabled { opacity:.6; cursor:wait; }
.form-msg { margin:14px 0 0; min-height:1.5em; font-weight:500; } .form-msg.ok { color:var(--accent2); } .form-msg.err { color:#ff8a7a; } .hp { position:absolute; inset-inline-start:-9999px; width:1px; height:1px; overflow:hidden; }
.foot { margin-top:20px; padding:34px 0 44px; border-top:1px solid var(--rule); color:var(--mute); font-size:.95rem; } .foot p { margin:4px 0; } .foot a { color:var(--ink); } .foot strong { color:var(--ink); } .foot-links { display:flex; gap:18px; flex-wrap:wrap; }
.center-msg { min-height:60vh; display:grid; place-content:center; text-align:center; gap:8px; }

/* صفحة المشروع */
.project-page { padding-top:clamp(28px,5vw,64px); padding-bottom:64px; } .project-page h1 { font-size:clamp(2.3rem,6.4vw,4.6rem); margin:18px 0 22px; } .back { color:var(--mute); text-decoration:none; font-size:.95rem; border:1px solid var(--rule); padding:4px 16px; border-radius:99px; display:inline-block; }
.facts { display:flex; flex-wrap:wrap; gap:14px 40px; margin:0 0 26px; } .facts > div { padding-inline-start:14px; border-inline-start:2px solid var(--accent); } .facts dt { color:var(--accent2); font-size:.82rem; } .facts dd { margin:0; font-weight:700; }
.cover { margin:0 0 32px; } .cover img { width:100%; border-radius:var(--r); } .project-page h2 { margin:44px 0 16px; font-size:1.3rem; font-weight:900; }
.gallery { display:grid; grid-template-columns:repeat(auto-fill,minmax(260px,1fr)); gap:14px; } .gallery img { width:100%; aspect-ratio:4/3; object-fit:cover; border-radius:var(--r); }

@media (max-width:860px) {
  .hero-grid, .contact { grid-template-columns:1fr; } .hero-photo { order:-1; max-width:280px; } .hero { padding:24px 0 36px; }
  .sec-grid { grid-template-columns:1fr; gap:20px; } .sec-head { position:static; }
  .timeline > li { grid-template-columns:1fr; gap:2px; } .rows > li { grid-template-columns:1fr; gap:2px; } .when { padding-top:0; } .proj.feat { grid-column:auto; }
  .burger { display:block; } .nav { display:none; position:absolute; inset-inline:0; top:calc(100% + 8px); background:var(--bg); border:1px solid var(--rule); border-radius:var(--r); flex-direction:column; align-items:stretch; padding:12px; gap:4px; } .nav.open { display:flex; } .nav a { padding:10px 16px; } .nav .icon { width:auto; height:auto; border-radius:99px; }
  [dir=rtl] .bar, .bar { padding:6px 18px; }
}
@media (prefers-reduced-motion:reduce) { html { scroll-behavior:auto; } * { transition:none !important; } }

/* تخفيف الزحمة: ملخص ظاهر، والتفاصيل مطوية */
.rows.compact > li { padding:16px 0; gap:18px; } .rows.compact h3 { font-size:1.08rem; font-weight:500; } .rows.compact .org { margin:0 !important; }
.more { margin-top:10px; } .more > summary { list-style:none; cursor:pointer; display:inline-flex; align-items:center; gap:8px; padding:5px 18px; border:1px solid var(--rule); border-radius:99px; color:var(--accent); font-weight:700; font-size:.92rem; line-height:1.8; user-select:none; }
.more > summary::-webkit-details-marker { display:none; } .more > summary::before { content:"+"; font-size:1.15rem; line-height:1; } .more[open] > summary::before { content:"−"; } .more > summary:hover { border-color:var(--accent); background:var(--soft); }
.more-body { margin-top:14px; } .more.older { margin-top:34px; } .more.older > summary { padding:9px 26px; font-size:1rem; }
.what > .more { margin-top:12px; }

/* صورة بلا خلفية (PNG شفاف): تقف على الصفحة بلا إطار ولا قص، فوق وهج أزرق ناعم */
.hero-photo.cutout { max-width:440px; }
.hero-photo.cutout:has(img)::before { content:""; position:absolute; inset:8% -12% -2% -12%; border-radius:50%; background:radial-gradient(closest-side, var(--g1), transparent 72%); border:0; z-index:0; }
[dir=rtl] .hero-photo.cutout:has(img)::before { inset:8% -12% -2% -12%; }
.hero-photo.cutout img { aspect-ratio:auto; object-fit:contain; border-radius:0; max-height:560px; width:100%; filter:drop-shadow(0 22px 34px rgba(60,40,10,.25)); }

/* أيقونات التواصل الاجتماعي */
.socials { list-style:none; margin:22px 0 0; padding:0; display:flex; gap:12px; flex-wrap:wrap; }
.socials a { display:grid; place-items:center; width:46px; height:46px; border-radius:50%; border:1px solid var(--rule); color:var(--ink); background:var(--soft); transition:transform .2s, background .2s, color .2s, border-color .2s; }
.socials a svg { width:21px; height:21px; }
.socials a:hover, .socials a:focus-visible { background:var(--accent); color:var(--on-accent); border-color:var(--accent); transform:translateY(-3px); }
.socials.foot-soc { margin:14px 0 6px; } .socials.foot-soc a { width:40px; height:40px; } .socials.foot-soc a svg { width:18px; height:18px; }
@media (max-width:860px) { .socials.hero-soc { justify-content:center; } }

/* ===== شريط آخر نشاط على LinkedIn (بطاقات بثيمة LinkedIn) ===== */
.li-strip { padding:0 0 clamp(36px,6vw,72px); }
.li-head { display:flex; align-items:center; gap:14px; margin-bottom:16px; flex-wrap:wrap; }
.li-head h2 { margin:0; font-size:clamp(1.2rem,2.6vw,1.6rem); } .li-all { color:var(--accent); font-weight:700; font-size:.95rem; text-decoration:none; } .li-all:hover { text-decoration:underline; }
.li-nav { margin-inline-start:auto; display:flex; gap:8px; } .li-nav button { width:38px; height:38px; border-radius:50%; border:1px solid var(--rule); background:var(--navbg); color:var(--ink); font-size:1.5rem; line-height:1; cursor:pointer; display:grid; place-items:center; padding:0 0 3px; transition:background .2s,color .2s; } .li-nav button:hover { background:var(--accent); color:var(--on-accent); }
.li-rail { display:flex; gap:16px; overflow-x:auto; scroll-snap-type:x mandatory; padding:4px 2px 18px; scrollbar-width:thin; -webkit-overflow-scrolling:touch; }
.li-card { position:relative; flex:0 0 min(86vw,372px); scroll-snap-align:start; background:#fff; color:rgba(0,0,0,.9); border:1px solid rgba(0,0,0,.15); border-radius:10px; box-shadow:0 0 0 1px rgba(0,0,0,.02), 0 6px 18px -10px rgba(11,22,48,.35); padding:12px 16px 10px; font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Tajawal,Arial,sans-serif; display:flex; flex-direction:column; gap:8px; transition:box-shadow .2s, transform .2s; }
.li-card:hover { box-shadow:0 0 0 1px rgba(10,102,194,.5), 0 14px 28px -14px rgba(11,22,48,.45); transform:translateY(-2px); }
.li-link { position:absolute; inset:0; z-index:2; border-radius:10px; } .li-link:focus-visible { outline:3px solid #0a66c2; outline-offset:2px; }
.li-rep { margin:0; padding-bottom:8px; border-bottom:1px solid rgba(0,0,0,.08); font-size:.8rem; color:rgba(0,0,0,.6); display:flex; align-items:center; gap:6px; } .li-rep svg { width:15px; height:15px; flex:none; } .li-rep b { font-weight:600; color:rgba(0,0,0,.75); }
.li-card header { display:flex; gap:10px; align-items:flex-start; } .li-card header > div { min-width:0; flex:1; }
.li-av { flex:none; width:48px; height:48px; border-radius:50%; background:linear-gradient(135deg,#0a66c2,#378fe9); color:#fff; font-weight:700; display:grid; place-items:center; font-size:1rem; }
.li-card header b { display:block; font-size:.95rem; font-weight:600; line-height:1.3; } .li-card header small { display:block; color:rgba(0,0,0,.6); font-size:.78rem; line-height:1.35; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.li-globe { width:12px; height:12px; vertical-align:-1px; }
.li-in { flex:none; width:22px; height:22px; border-radius:4px; background:#0a66c2; color:#fff; font:700 .8rem/22px Arial,sans-serif; text-align:center; letter-spacing:-.3px; }
.li-text { margin:0; font-size:.92rem; line-height:1.55; display:-webkit-box; -webkit-line-clamp:7; -webkit-box-orient:vertical; overflow:hidden; min-height:6.5em; font-family:inherit; }
.li-tag { color:#0a66c2; font-weight:600; }
.li-card footer { margin-top:auto; padding-top:8px; border-top:1px solid rgba(0,0,0,.08); display:flex; justify-content:space-between; align-items:center; font-size:.8rem; color:rgba(0,0,0,.6); }
.li-react { display:inline-flex; align-items:center; gap:5px; } .li-react svg { width:16px; height:16px; } .li-open { color:#0a66c2; font-weight:600; }

img.li-av { object-fit:cover; background:#5b4527; }

/* ===== ثيمة «Rayo»: خلفية سوداء، عناوين ضخمة، شارة ليموني ببريق ✦، أزرار كبسولة، مفتاح فاتح/داكن، موجات رمادية وحلقة معدنية ===== */
html { transition:background .3s; } body { transition:color .3s; }
.hero { position:relative; overflow:hidden; isolation:isolate; padding-top:clamp(48px,8vw,110px); }
.hero::before { content:""; position:absolute; inset:auto -10% -2px -10%; height:46%; z-index:-1; pointer-events:none;
  background:radial-gradient(70% 90% at 18% 112%, var(--wave2) 0 58%, transparent 59%), radial-gradient(60% 80% at 82% 118%, var(--wave1) 0 60%, transparent 61%), radial-gradient(90% 60% at 50% 125%, var(--wave1) 0 62%, transparent 63%); }
.hero h1 { font-size:clamp(3rem,11vw,7.4rem); line-height:1.02; font-weight:900; letter-spacing:-.01em; margin:.15em 0 .2em; }
.hero-title { display:inline-flex; align-items:center; gap:12px; background:var(--lime); color:var(--on-lime) !important; padding:8px 26px; border-radius:99px; font-weight:800; font-size:clamp(.95rem,2.4vw,1.35rem); line-height:1.5; margin:0 0 6px; max-width:100%; }
.hero-title::before, .hero-title::after { content:""; flex:none; width:20px; height:20px; background:var(--on-lime); clip-path:polygon(50% 0,61% 39%,100% 50%,61% 61%,50% 100%,39% 61%,0 50%,39% 39%); }
.hero-meta { color:var(--mute); }
.hero-photo.cutout:has(img)::before { inset:auto auto 4% -14%; width:58%; aspect-ratio:1; border-radius:50%; border:0; opacity:1; z-index:0;
  background:conic-gradient(from 20deg,#fafafa,#8a8a8d 18%,#f1f1f3 34%,#4d4d50 52%,#d9d9dc 68%,#7c7c80 84%,#fafafa); -webkit-mask:radial-gradient(circle,transparent 52%,#000 53.5%); mask:radial-gradient(circle,transparent 52%,#000 53.5%); filter:drop-shadow(0 16px 24px rgba(0,0,0,.45)); }
[dir=rtl] .hero-photo.cutout:has(img)::before { inset:auto -14% 4% auto; }
.hero-photo.cutout:has(img)::after { content:""; position:absolute; z-index:2; top:6%; left:-2%; width:44px; height:44px; background:var(--ink); clip-path:polygon(50% 0,61% 39%,100% 50%,61% 61%,50% 100%,39% 61%,0 50%,39% 39%); }
[dir=rtl] .hero-photo.cutout:has(img)::after { left:auto; right:-2%; }
.hero-photo.cutout img { filter:drop-shadow(0 26px 40px rgba(0,0,0,.55)); }
.btn { border-radius:99px; border:1.5px solid var(--rule); color:var(--ink); background:transparent; font-weight:700; padding:13px 30px; transition:background .2s,color .2s,border-color .2s,transform .2s; } .btn:hover { border-color:var(--ink); background:var(--ink); color:var(--bg); transform:translateY(-2px); }
.btn.primary { background:var(--lime); color:var(--on-lime); border-color:var(--lime); } .btn.primary:hover { background:var(--ink); border-color:var(--ink); color:var(--bg); }
.nav .signin { background:var(--lime); color:var(--on-lime); font-weight:800; } .nav .signin:hover { background:var(--ink); color:var(--bg); }
.sec-head h2 { font-size:clamp(1.5rem,3.4vw,2.2rem); font-weight:900; } .sec-head h2::before { width:22px; height:22px; border-radius:0; background:var(--lime); clip-path:polygon(50% 0,61% 39%,100% 50%,61% 61%,50% 100%,39% 61%,0 50%,39% 39%); flex:none; }
.timeline > li::after { background:var(--lime); border:0; width:14px; height:14px; top:12px; box-shadow:0 0 0 5px var(--soft); } .timeline > li::before { background:linear-gradient(var(--lime),transparent); opacity:.55; }
.tags li { background:var(--soft); border:1px solid var(--rule); } .tags li:nth-child(3n+1), .tags li:nth-child(3n+2) { border-color:var(--rule); } .tags li:hover { background:var(--lime); color:var(--on-lime); border-color:var(--lime); }
.org em, .badge { background:var(--lime); color:var(--on-lime); border:0; }
.more > summary { color:var(--ink); } .more > summary:hover { background:var(--lime); color:var(--on-lime); border-color:var(--lime); }
.socials a { background:var(--soft); } .socials a:hover, .socials a:focus-visible { background:var(--lime); color:var(--on-lime); border-color:var(--lime); }
.li-nav button:hover { background:var(--lime); color:var(--on-lime); border-color:var(--lime); }
.form input, .form textarea { background:var(--soft); border-radius:18px; } .form input:focus, .form textarea:focus { border-color:var(--lime); }
.form button { background:var(--lime); color:var(--on-lime); font-weight:800; }
.mode { direction:ltr; position:relative; flex:none; width:76px; height:38px; border:0; border-radius:99px; background:var(--violet); cursor:pointer; padding:0; display:block; margin-inline:4px; }
.mode .ic { position:absolute; top:9px; width:20px; height:20px; color:#101010; } .mode .ic.sun { left:9px; } .mode .ic.moon { right:9px; }
.mode .knob { position:absolute; top:4px; width:30px; height:30px; border-radius:50%; background:#101010; transition:left .25s,right .25s; right:4px; } .mode .knob::after { content:""; position:absolute; inset:7px; background:var(--lime); clip-path:polygon(50% 0,61% 39%,100% 50%,61% 61%,50% 100%,39% 61%,0 50%,39% 39%); }
html[data-mode=light] .mode .knob { right:auto; left:4px; } html[data-mode=light] .mode .knob::after { background:#fff; }
.mode:focus-visible { outline:3px solid var(--lime); outline-offset:3px; }
@media (max-width:860px) { .mode { margin:6px auto; } }

/* ===== الواجهة الجديدة: ثلاث نقاط شفافة + بطاقة هوية (صورة بزوايا منحنية على خلفية بيضاء، الاسم والوظيفة بجانبها) ===== */
.dots-top { position:fixed; top:0; inset-inline:0; z-index:40; padding:0; pointer-events:none; height:0; }
.dots-top > * { pointer-events:auto; }
.burger.dots { display:grid !important; grid-auto-flow:column; place-content:center; gap:5px; position:fixed; top:max(14px,env(safe-area-inset-top,0px)); left:14px; right:auto; width:46px; height:46px; margin:0; padding:0; border-radius:99px; border:1px solid var(--rule); background:var(--navbg); backdrop-filter:blur(10px); opacity:.82; cursor:pointer; transition:opacity .2s, background .2s; }
.burger.dots:hover, .burger.dots[aria-expanded=true] { opacity:1; background:var(--lime); }
.burger.dots i { width:5px; height:5px; border-radius:50%; background:var(--ink); display:block; } .burger.dots:hover i, .burger.dots[aria-expanded=true] i { background:var(--on-lime); }
.dots-top .nav { display:none !important; position:fixed; top:calc(max(14px,env(safe-area-inset-top,0px)) + 56px); left:14px; right:auto; width:min(300px,calc(100vw - 28px)); flex-direction:column; align-items:stretch; gap:4px; padding:12px; border-radius:22px; background:var(--navbg); backdrop-filter:blur(18px); border:1px solid var(--rule); box-shadow:0 24px 50px -18px rgba(0,0,0,.6); margin:0; }
.dots-top .nav.open { display:flex !important; }
.dots-top .nav a { padding:10px 16px; text-align:start; } .dots-top .nav .signin, .dots-top .nav .lang { text-align:center; }
.sr { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
.hero { padding:clamp(76px,10vw,120px) 0 clamp(28px,5vw,56px); }
.hero::before { height:40%; opacity:.7; }
.id-grid { display:flex; align-items:center; gap:clamp(16px,4vw,52px); }
.id-card { flex:none; width:clamp(124px,32vw,250px); aspect-ratio:4/5; background:#fff; border-radius:clamp(22px,4vw,34px); overflow:hidden; box-shadow:0 22px 44px -22px rgba(0,0,0,.65), 0 0 0 1px rgba(255,255,255,.08); display:grid; place-items:center; }
.id-card img { width:100%; height:100%; object-fit:cover; object-position:center 8%; display:block; }
.id-card .mono.big { width:70%; color:#101010; }
.id-text { min-width:0; flex:1; }
.id-text h1 { font-size:clamp(1.9rem,7.4vw,4.8rem); line-height:1.08; margin:0 0 .35em; font-weight:900; }
.id-text .hero-title { font-size:clamp(.85rem,2.6vw,1.2rem); padding:6px 18px; margin:0 0 14px; }
.id-text .hero-title::before, .id-text .hero-title::after { width:14px; height:14px; }
.hero-pos { margin:0 0 10px; display:flex; flex-direction:column; gap:1px; }
.hero-pos small { color:var(--mute); font-size:.78rem; letter-spacing:.04em; text-transform:uppercase; }
.hero-pos b { font-size:clamp(1rem,2.8vw,1.35rem); font-weight:800; line-height:1.4; } .hero-pos span { color:var(--mute); font-size:.92rem; }
.id-text .hero-meta { margin:0 0 14px; font-size:.9rem; } .id-text .cta { margin:0; gap:10px; display:flex; flex-wrap:wrap; } .id-text .btn { padding:10px 22px; }
.id-text .socials { margin-top:14px; }
@media (max-width:520px) { .id-text .socials { gap:8px; } .id-text .socials a { width:40px; height:40px; } .id-text .btn { padding:9px 18px; font-size:.92rem; } }

/* أيقونات التواصل في قسم «تواصل معي»: صف أفقي في الوسط بلا خطوط جانبية */
.info ul.socials { display:flex; flex-wrap:wrap; justify-content:center; align-items:center; gap:14px; margin:6px 0 4px; padding:0; }
.info ul.socials li { padding:0; border:0; }
.info ul.socials a { width:50px; height:50px; }

/* الصف الأول: الصورة + الاسم + التخصص متوازية أفقياً وبهامش كبير فوق وتحت؛ ثم الوظيفة الحالية وبقية البيانات */
.hero { padding-top:0; padding-bottom:clamp(36px,6vw,72px); }
.id-grid { margin-block:clamp(110px,24vh,210px) clamp(56px,13vh,120px); align-items:center; }
.id-text h1 { margin-bottom:.4em; }
.id-more { display:flex; flex-direction:column; align-items:center; text-align:center; gap:4px; }
.id-more .hero-pos { align-items:center; margin:0 0 10px; }
.id-more .hero-pos b { font-size:clamp(1.15rem,3.4vw,1.6rem); }
.id-more .hero-meta { margin:0 0 16px; font-size:.95rem; color:var(--mute); }
.id-more .cta { margin:0; display:flex; flex-wrap:wrap; justify-content:center; gap:10px; }
.id-more .btn { padding:11px 26px; }
.id-more .socials { justify-content:center; margin-top:18px; }

/* ضبط الفقرات (Justify): كل فقرة نصية، حتى القصيرة ذات السطرين والثلاثة */
.sec-body p:not(.org):not(.links):not(.when), .sec-body li:not(.when), .prose p, .prose li, .lead, .lead p, .what p:not(.org):not(.links), .what li, .proj p, .project-page .prose { text-align:justify; text-justify:inter-word; }
.sec-body .tags li, .sec-body .socials li, .sec-body .rows.compact .when, .sec-body .timeline > li, .sec-body .rows > li { text-align:start; }
.sec-body .when { text-align:start; }

/* التخصص: نص عادي تحت الاسم، بلا شارة ولا نجوم */
.id-text .hero-title { display:block; background:none; color:var(--mute) !important; padding:0; border-radius:0; margin:0; font-weight:700; font-size:clamp(1rem,3.2vw,1.5rem); line-height:1.5; }
.id-text .hero-title::before, .id-text .hero-title::after { content:none; display:none; }

/* الوظيفة أقرب للصورة والاسم؛ «تواصل» وأيقونات التواصل في صف أفقي واحد، وبينهما وبين الوظيفة مسافة */
.id-grid { margin-bottom:clamp(14px,3vh,30px); }
.id-more { flex-direction:row; flex-wrap:wrap; justify-content:center; align-items:center; column-gap:16px; row-gap:0; }
.id-more .hero-pos { flex:0 0 100%; margin:0 0 clamp(30px,6vh,52px); }
.id-more .cta { margin:0; }
.id-more .socials { margin:0; flex-wrap:nowrap; }
@media (max-width:400px) { .id-more { column-gap:10px; } .id-more .socials { gap:8px; } .id-more .socials a { width:42px; height:42px; } .id-more .btn { padding:10px 20px; } }

/* أول شاشة تُظهر كل شيء: هامش علوي أقل، ومسافة أكبر بين الوظيفة وصف «تواصل» والأيقونات */
.id-grid { margin-top:clamp(68px,11vh,110px); }
.id-more .hero-pos { margin-bottom:clamp(44px,9vh,72px); }

/* الهيرو يملأ أول شاشة كاملة، فلا يظهر شريط LinkedIn إلا بعد التمرير؛ والمحتوى موزَّع في الارتفاع */
.hero { min-height:100vh; min-height:100svh; display:flex; flex-direction:column; justify-content:center; padding-block:76px 28px; box-sizing:border-box; }
.hero .id-grid { margin-top:0; margin-bottom:clamp(18px,4svh,40px); }
.hero .id-more .hero-pos { margin-bottom:clamp(40px,8svh,72px); }

/* ثلاث نقاط فقط: بلا دائرة ولا خلفية، بشفافية 50% (خفيفة لا تلفت الزوّار) */
.burger.dots, .burger.dots:hover, .burger.dots[aria-expanded=true] { background:none !important; border:0 !important; backdrop-filter:none; box-shadow:none; width:48px; height:48px; border-radius:0; }
.burger.dots { opacity:.5; } .burger.dots:hover, .burger.dots:focus-visible, .burger.dots[aria-expanded=true] { opacity:.9; }
.burger.dots i, .burger.dots:hover i, .burger.dots[aria-expanded=true] i { background:var(--ink) !important; width:6px; height:6px; }

/* ===== بلا مظاهر «الذكاء الاصطناعي»: لا نقاط متوهجة ولا خطوط متدرجة ولا نجوم ✦ ولا بقع إضاءة ===== */
body { background:var(--bg); }
.hero::before { display:none; }
/* الخبرات: قائمة نصية نظيفة، خط فاصل رفيع وتاريخ واضح، بلا نقاط ولا خط زمن */
.timeline > li::before, .timeline > li::after { display:none !important; }
.timeline > li { padding:26px 0 26px; padding-inline-start:0; border-top:1px solid var(--rule); gap:22px; }
.timeline > li:first-child { border-top:2px solid var(--ink); }
.timeline > li:last-child { padding-bottom:0; }
.when { color:var(--mute); font-weight:700; font-size:.92rem; letter-spacing:.02em; }
/* عناوين الأقسام: بلا نجمة؛ خط قصير سميك تحت العنوان */
.sec-head h2::before { display:none !important; }
.sec-head h2 { display:block; padding-bottom:12px; position:relative; }
.sec-head h2::after { content:""; position:absolute; inset-inline-start:0; bottom:0; width:44px; height:4px; background:var(--accent); }
.hero-title::before, .hero-title::after { display:none !important; }
/* مفتاح الوضع: بلا نجمة داخل الكرة */
.mode .knob::after { clip-path:none; border-radius:50%; inset:11px; }

/* ===== الخبرات: بطاقات غامقة طافية بتأثير بلور؛ الوظيفة الحالية أكبر والسابقة أصغر ===== */
.s-experience { position:relative; isolation:isolate; overflow:hidden; }
.s-experience::before { content:""; position:absolute; z-index:-1; width:clamp(180px,34vw,360px); aspect-ratio:1; border-radius:50%; background:var(--accent); opacity:.38; top:clamp(40px,8vw,90px); inset-inline-end:-6%; }
.s-experience::after { content:""; position:absolute; z-index:-1; width:clamp(140px,26vw,280px); aspect-ratio:1; border-radius:32px; background:var(--lime); opacity:.34; bottom:8%; inset-inline-start:-4%; transform:rotate(18deg); }
.s-experience .timeline { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; align-items:start; }
.s-experience .timeline > li, .s-experience .timeline > li:first-child { --ink:#f2f4fc; --mute:#aab3d3; --rule:rgba(255,255,255,.18); --soft:rgba(255,255,255,.09); color:var(--ink); display:block; padding:20px 22px; border:1px solid rgba(255,255,255,.16); border-radius:22px; background:rgba(14,18,36,.80); -webkit-backdrop-filter:blur(16px) saturate(1.25); backdrop-filter:blur(16px) saturate(1.25); box-shadow:0 22px 44px -20px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.08); transition:transform .25s, box-shadow .25s; }
.s-experience .timeline > li:nth-child(even) { margin-top:14px; }
.s-experience .timeline > li:hover { transform:translateY(-5px); box-shadow:0 30px 52px -22px rgba(0,0,0,.7), inset 0 1px 0 rgba(255,255,255,.1); }
.s-experience .timeline > li .when { padding:0 0 8px; color:var(--mute); font-size:.84rem; }
.s-experience .timeline > li h3 { font-size:1.08rem; line-height:1.4; margin:0 0 6px; color:#fff; }
.s-experience .timeline > li .org { font-size:.88rem; margin:0 0 8px !important; }
.s-experience .timeline > li .prose, .s-experience .timeline > li p { font-size:.9rem; }
/* الوظيفة الحالية: بطاقة عريضة وأكبر */
.s-experience .sec-body > .timeline:first-child > li:first-child { grid-column:1 / -1; padding:32px clamp(22px,4vw,40px); border-radius:28px; margin-top:0; background:rgba(10,14,32,.88); }
.s-experience .sec-body > .timeline:first-child > li:first-child h3 { font-size:clamp(1.4rem,3.6vw,2rem); margin-bottom:10px; }
.s-experience .sec-body > .timeline:first-child > li:first-child .when { font-size:.95rem; padding-bottom:12px; }
.s-experience .sec-body > .timeline:first-child > li:first-child .org { font-size:1rem; }
@media (max-width:700px) { .s-experience .timeline { grid-template-columns:1fr; gap:14px; } .s-experience .timeline > li:nth-child(even) { margin-top:0; } .s-experience .timeline > li, .s-experience .timeline > li:first-child { padding:16px 18px; border-radius:18px; } .s-experience .sec-body > .timeline:first-child > li:first-child { padding:24px 20px; border-radius:24px; } }
.s-experience .more.older { margin-top:18px; }

/* الخبرات السابقة: بطاقات رمادية فاتحة بلور، والوظيفة الحالية تبقى غامقة */
.s-experience .timeline > li, .s-experience .timeline > li:first-child { --ink:#16161a; --mute:#5e5e66; --rule:rgba(0,0,0,.16); --soft:rgba(0,0,0,.07); background:rgba(226,227,231,.80); border-color:rgba(255,255,255,.65); box-shadow:0 20px 40px -22px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.7); }
.s-experience .timeline > li h3 { color:#111114; }
.s-experience .timeline > li .more > summary { background:rgba(255,255,255,.55); }
.s-experience .sec-body > .timeline:first-child > li:first-child { --ink:#f2f4fc; --mute:#aab3d3; --rule:rgba(255,255,255,.18); --soft:rgba(255,255,255,.09); background:rgba(10,14,32,.88); border-color:rgba(255,255,255,.16); box-shadow:0 26px 50px -20px rgba(0,0,0,.65), inset 0 1px 0 rgba(255,255,255,.08); }
.s-experience .sec-body > .timeline:first-child > li:first-child h3 { color:#fff; }
.s-experience .sec-body > .timeline:first-child > li:first-child .more > summary { background:rgba(255,255,255,.08); }

/* شعار الجهة بجانب كل خبرة */
.s-experience .org { align-items:center; gap:12px; }
.s-experience .org .logo { width:42px; height:42px; border-radius:11px; object-fit:cover; background:#fff; flex:none; box-shadow:0 2px 8px -2px rgba(0,0,0,.35); }
.s-experience .sec-body > .timeline:first-child > li:first-child .org .logo { width:56px; height:56px; border-radius:14px; }

/* الخبرات السابقة: بطاقات مضغوطة بمقدار نصها (عرض بحسب المحتوى وحشوة أقل) */
.s-experience .timeline { justify-items:start; }
.s-experience .timeline > li:not(.cur) { width:fit-content; max-width:100%; min-width:min(260px,100%); padding:12px 16px; border-radius:16px; }
.s-experience .sec-body > .timeline:first-child > li:first-child { width:auto; max-width:none; justify-self:stretch; }
.s-experience .timeline > li:not(.cur) .when { padding-bottom:4px; font-size:.78rem; }
.s-experience .timeline > li:not(.cur) h3 { font-size:.98rem; margin-bottom:4px; }
.s-experience .timeline > li:not(.cur) .org { font-size:.84rem; gap:8px; margin:0 0 4px !important; }
.s-experience .timeline > li:not(.cur) .org .logo { width:30px; height:30px; border-radius:8px; }
.s-experience .timeline > li:not(.cur) .more { margin-top:6px; } .s-experience .timeline > li:not(.cur) .more > summary { padding:3px 14px; font-size:.84rem; }

.s-experience .org .logo { background:transparent; box-shadow:none; }

/* الكمبيوتر: شبكة منظمة، بطاقات سابقة متساوية العرض والارتفاع وفي صفوف مستقيمة بلا إزاحة */
@media (min-width:701px) {
  .s-experience .timeline { grid-template-columns:repeat(2,minmax(0,1fr)); align-items:stretch; justify-items:stretch; gap:18px; }
  .s-experience .timeline > li:not(.cur), .s-experience .timeline > li:nth-child(even):not(.cur) { width:auto; min-width:0; margin-top:0; display:flex; flex-direction:column; justify-content:flex-start; }
  .s-experience .timeline > li:hover { transform:translateY(-4px); }
}
@media (min-width:1000px) { .s-experience .timeline { grid-template-columns:repeat(3,minmax(0,1fr)); } }

/* ===== موشن: الأشكال الخلفية تطفو وتدور ببطء، والبطاقات تظهر بحركة متتابعة عند التمرير وتتمايل بلطف ===== */
@keyframes shape-drift { 0% { transform:translate(0,0) scale(1); } 50% { transform:translate(-26px,34px) scale(1.08); } 100% { transform:translate(14px,-18px) scale(.96); } }
@keyframes shape-spin { 0% { transform:rotate(6deg) translate(0,0); } 50% { transform:rotate(30deg) translate(26px,-30px); } 100% { transform:rotate(52deg) translate(-10px,-56px); } }
@keyframes card-bob { 0%,100% { translate:0 0; } 50% { translate:0 -7px; } }
.s-experience::before { animation:shape-drift 9s ease-in-out infinite alternate; }
.s-experience::after { animation:shape-spin 12s ease-in-out infinite alternate; }
.s-experience .timeline > li { animation:card-bob 6s ease-in-out infinite; }
.s-experience .timeline > li:nth-child(2) { animation-delay:-1.4s; } .s-experience .timeline > li:nth-child(3) { animation-delay:-2.8s; } .s-experience .timeline > li:nth-child(4) { animation-delay:-4.2s; } .s-experience .timeline > li:nth-child(5) { animation-delay:-5.1s; }
.s-experience .sec-body > .timeline:first-child > li:first-child { animation-duration:8s; }
.rv { opacity:0; transform:translateY(34px) scale(.96); }
.rv.in { opacity:1; transform:none; transition:opacity .8s ease var(--d,0s), transform .8s cubic-bezier(.2,.8,.2,1) var(--d,0s), box-shadow .25s; }
.rv.in:hover { transform:translateY(-5px); transition-delay:0s; }
.li-card.rv.in { transition-duration:.8s; }
@media (prefers-reduced-motion:reduce) { .s-experience::before, .s-experience::after, .s-experience .timeline > li { animation:none !important; } .rv { opacity:1; transform:none; } }

/* ===== خلفية الهيرو: ألوان فاتحة ممتزجة تتحرك ببطء (شبكة تدرّج حيّة) ===== */
:root { --m1:#1d2c63; --m2:#2e3a14; --m3:#3a2a1c; --m4:#12353a; --mop:.55; }
html[data-mode=light] { --m1:#bfd2ff; --m2:#ffe2bd; --m3:#c6f0e0; --m4:#fff0b3; --mop:.9; }
.hero::before { display:block !important; content:""; position:absolute; inset:-25%; height:auto !important; z-index:-1; pointer-events:none; opacity:var(--mop);
  background:
    radial-gradient(38% 42% at 22% 30%, var(--m1) 0%, transparent 70%),
    radial-gradient(34% 40% at 78% 24%, var(--m2) 0%, transparent 70%),
    radial-gradient(40% 44% at 70% 78%, var(--m3) 0%, transparent 70%),
    radial-gradient(36% 40% at 26% 80%, var(--m4) 0%, transparent 70%);
  background-size:140% 140%; filter:blur(36px) saturate(1.1); animation:mesh-a 16s ease-in-out infinite alternate, mesh-b 26s linear infinite; }
.hero::after { content:""; position:absolute; inset:-25%; z-index:-1; pointer-events:none; opacity:calc(var(--mop) * .7);
  background:
    radial-gradient(30% 34% at 60% 50%, var(--m4) 0%, transparent 70%),
    radial-gradient(28% 32% at 36% 62%, var(--m2) 0%, transparent 70%);
  filter:blur(44px); animation:mesh-c 20s ease-in-out infinite alternate; }
@keyframes mesh-a { 0% { background-position:0% 0%; } 50% { background-position:100% 40%; } 100% { background-position:30% 100%; } }
@keyframes mesh-b { from { transform:rotate(0deg) scale(1.05); } to { transform:rotate(360deg) scale(1.05); } }
@keyframes mesh-c { 0% { transform:translate(-6%,4%) scale(1); } 100% { transform:translate(8%,-6%) scale(1.15); } }
@media (prefers-reduced-motion:reduce) { .hero::before, .hero::after { animation:none; } }

/* التذييل في الوسط: الاسم والمسمى، الأيقونات، الحقوق (جوال وكمبيوتر، عربي وإنجليزي) */
.foot .wrap { display:flex; flex-direction:column; align-items:center; text-align:center; gap:4px; }
.foot .wrap p { margin:4px 0; text-align:center; }
.foot .socials, .foot .foot-soc { justify-content:center; margin:12px auto; }

/* الاسم والقبيلة دائماً في سطر واحد (لا ينكسر أبداً): الخط يتقلّص حسب عرض عمود الاسم */
.id-text { container-type:inline-size; }
.id-text h1 { white-space:nowrap; font-size:clamp(1.25rem,11.5cqw,4.8rem); }
[dir=ltr] .id-text h1 { font-size:clamp(1.15rem,8.6cqw,4.6rem); }
[dir=ltr] .id-text h1 { font-size:clamp(.75rem,9.6cqw,4.6rem); }
[dir=rtl] .id-text h1 { font-size:clamp(.85rem,11.5cqw,4.8rem); }

/* ===== أداء: حركة أخفّ على المعالج (تحويلات فقط، بلا blur ولا إعادة رسم)، وتتوقف خارج الشاشة ===== */
.hero::before { inset:-14% !important; filter:none !important; background-size:100% 100% !important; will-change:transform; animation:mesh-c 18s ease-in-out infinite alternate !important; }
.hero::after { inset:-14% !important; filter:none !important; will-change:transform; animation:mesh-d 24s ease-in-out infinite alternate !important; }
@keyframes mesh-d { 0% { transform:translate(7%,-5%) scale(1.1); } 100% { transform:translate(-8%,6%) scale(1); } }
.s-experience::before, .s-experience::after { will-change:transform; }
.s-experience .timeline > li { animation:none !important; -webkit-backdrop-filter:blur(8px); backdrop-filter:blur(8px); }
.paused::before, .paused::after { animation-play-state:paused !important; }

/* المهارات بأيقونة لكل مهارة (Lucide) داخل مربع منحني */
.tags.skills { gap:10px; }
.tags.skills li { display:inline-flex; align-items:center; gap:10px; padding:6px 18px 6px 8px; }
[dir=rtl] .tags.skills li { padding:6px 8px 6px 18px; }
.sk-badge { flex:none; width:32px; height:32px; border-radius:10px; display:grid; place-items:center; background:var(--accent); color:var(--on-accent); }
.sk-ic { width:18px; height:18px; display:block; }

/* شعار الجهة المانحة في الشهادات والدورات: مربع بزوايا منحنية */
.s-certificates .org { align-items:center; gap:12px; }
.s-certificates .org .logo { width:42px; height:42px; border-radius:11px; object-fit:cover; background:#fff; flex:none; box-shadow:0 2px 8px -2px rgba(0,0,0,.3); }

/* شعار الجامعة في التعليم: مربع بزوايا منحنية */
.s-education .org { align-items:center; gap:12px; }
.s-education .org .logo { width:44px; height:44px; border-radius:12px; object-fit:cover; background:#fff; flex:none; box-shadow:0 2px 8px -2px rgba(0,0,0,.3); }

/* مساعد الموقع (محادثة): زر عائم + لوحة. يتبع وضع الموقع (فاتح/داكن) والألوان --lime/--ink. */
#site-chat { font-size:16px; line-height:1.7; font-weight:400; }
#site-chat[hidden], #site-chat [hidden] { display:none !important; }
.sc-fab { position:fixed; inset-inline-end:max(18px,env(safe-area-inset-right,0px)); bottom:max(18px,env(safe-area-inset-bottom,0px)); z-index:45; display:inline-flex; align-items:center; gap:10px; height:54px; padding:0 20px 0 18px; border:0; border-radius:99px; background:var(--lime); color:var(--on-lime); font:inherit; font-weight:700; cursor:pointer; box-shadow:0 14px 34px -12px rgba(0,0,0,.55); transition:transform .2s, box-shadow .2s; }
.sc-fab:hover { transform:translateY(-2px); box-shadow:0 18px 38px -12px rgba(0,0,0,.6); }
.sc-fab svg { width:24px; height:24px; flex:none; }
.sc-panel { position:fixed; inset-inline-end:max(18px,env(safe-area-inset-right,0px)); bottom:max(18px,env(safe-area-inset-bottom,0px)); z-index:46; width:min(400px,calc(100vw - 28px)); height:min(640px,calc(100dvh - 36px)); display:flex; flex-direction:column; overflow:hidden; border-radius:26px; border:1px solid var(--rule); background:linear-gradient(var(--soft),var(--soft)),var(--bg); color:var(--ink); box-shadow:0 30px 70px -20px rgba(0,0,0,.65); animation:sc-in .22s ease-out; }
@keyframes sc-in { from { opacity:0; transform:translateY(14px) scale(.98); } to { opacity:1; transform:none; } }
.sc-head { display:flex; align-items:center; gap:12px; padding:14px 16px; border-bottom:1px solid var(--rule); background:var(--soft); }
.sc-av { flex:none; width:42px; height:42px; border-radius:50%; display:grid; place-items:center; background:var(--lime); color:var(--on-lime); font-weight:900; font-size:1.1rem; }
.sc-ht { flex:1; min-width:0; line-height:1.4; } .sc-ht b { display:block; font-size:1rem; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; } .sc-ht small { display:block; color:var(--mute); font-size:.82rem; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.sc-x { flex:none; width:38px; height:38px; display:grid; place-items:center; border:1px solid var(--rule); border-radius:50%; background:transparent; color:var(--ink); cursor:pointer; } .sc-x:hover { background:var(--ink); color:var(--bg); } .sc-x svg { width:18px; height:18px; }
.sc-log { flex:1; overflow-y:auto; padding:16px 14px; display:flex; flex-direction:column; gap:10px; overscroll-behavior:contain; }
.sc-m { max-width:86%; padding:9px 14px; border-radius:18px; overflow-wrap:anywhere; font-size:.97rem; line-height:1.75; }
.sc-m p { margin:0; } .sc-m p + p, .sc-m p + ul, .sc-m ul + p { margin-top:6px; } .sc-m ul { margin:4px 0 0; padding-inline-start:1.2em; } .sc-m li { margin:2px 0; }
.sc-a { align-self:flex-start; background:var(--soft); border:1px solid var(--rule); border-end-start-radius:6px; }
.sc-u { align-self:flex-end; background:var(--lime); color:var(--on-lime); border-end-end-radius:6px; }
.sc-e { align-self:stretch; max-width:100%; display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:8px; border:1px solid #c0463d; color:var(--ink); background:rgba(192,70,61,.12); font-size:.92rem; }
.sc-retry { border:1px solid var(--ink); border-radius:99px; background:transparent; color:var(--ink); font:inherit; font-size:.88rem; padding:2px 14px; cursor:pointer; } .sc-retry:hover { background:var(--ink); color:var(--bg); }
.sc-typing { display:flex; gap:5px; align-items:center; padding:13px 16px; } .sc-typing i { width:7px; height:7px; border-radius:50%; background:var(--mute); animation:sc-b 1.1s infinite ease-in-out; } .sc-typing i:nth-child(2) { animation-delay:.15s; } .sc-typing i:nth-child(3) { animation-delay:.3s; }
@keyframes sc-b { 0%,80%,100% { transform:translateY(0); opacity:.45; } 40% { transform:translateY(-5px); opacity:1; } }
.sc-chips { display:flex; flex-wrap:wrap; gap:8px; padding:0 14px 12px; }
.sc-chip { border:1.5px solid var(--rule); border-radius:99px; background:transparent; color:var(--ink); font:inherit; font-size:.9rem; padding:5px 14px; cursor:pointer; transition:background .2s,color .2s,border-color .2s; } .sc-chip:hover { background:var(--lime); border-color:var(--lime); color:var(--on-lime); }
.sc-cf { padding:0 14px 10px; display:flex; justify-content:center; }
.sc-form { display:flex; align-items:flex-end; gap:8px; padding:10px 12px; border-top:1px solid var(--rule); }
.sc-in { flex:1; resize:none; max-height:120px; min-height:44px; padding:10px 16px; border:1.5px solid var(--rule); border-radius:22px; background:var(--bg); color:var(--ink); font:inherit; font-size:1rem; line-height:1.6; } .sc-in:focus { outline:none; border-color:var(--lime); }
.sc-send { flex:none; width:44px; height:44px; display:grid; place-items:center; border:0; border-radius:50%; background:var(--lime); color:var(--on-lime); cursor:pointer; } .sc-send:disabled { opacity:.5; cursor:not-allowed; } .sc-send svg { width:20px; height:20px; } [dir=rtl] .sc-sendic { transform:scaleX(-1); }
.sc-priv { margin:0; padding:0 16px 12px; color:var(--mute); font-size:.78rem; line-height:1.5; text-align:center; }
.sc-fab:focus-visible, .sc-x:focus-visible, .sc-chip:focus-visible, .sc-send:focus-visible, .sc-retry:focus-visible, .sc-in:focus-visible { outline:3px solid var(--focus); outline-offset:2px; }
@media (max-width:600px) {
  .sc-fab { height:50px; padding:0 16px; } .sc-fab-t { display:none; }
  .sc-panel { inset-inline:0; bottom:0; width:auto; height:min(82dvh,640px); border-radius:24px 24px 0 0; border-bottom:0; animation-name:sc-up; }
  .sc-m { max-width:92%; }
}
@keyframes sc-up { from { transform:translateY(40px); opacity:.6; } to { transform:none; opacity:1; } }
@media (prefers-reduced-motion:reduce) { .sc-panel, .sc-typing i, .sc-fab { animation:none !important; transition:none !important; } }
@media print { #site-chat { display:none !important; } }
