/* ============ Tokens ============ */
:root {
  --bg: #FBF5EC;
  --bg-2: #F4EADB;
  --surface: #FFFDF9;
  --ink: #2B1630;
  --ink-2: #4A3450;
  --muted: #7A6577;
  --line: #E8DACA;
  --honey: #E9A21F;
  --honey-soft: #FBE3A8;
  --rose: #C4577A;
  --rose-soft: #F6D3DE;
  --plum: #5C2A63;
  --plum-soft: #E9D9EC;
  --shadow: 0 1px 2px rgba(43, 22, 48, .05), 0 12px 32px -12px rgba(92, 42, 99, .18);
  --shadow-lg: 0 30px 60px -20px rgba(92, 42, 99, .30);
  --glow: rgba(233, 162, 31, .20);
  --radius: 22px;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "DM Sans", system-ui, sans-serif;
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #170D19;
  --bg-2: #1F1322;
  --surface: #251828;
  --ink: #F7ECDD;
  --ink-2: #E2D2C6;
  --muted: #B9A3B4;
  --line: #3A2A3D;
  --honey: #F4BC45;
  --honey-soft: #4A3516;
  --rose: #EB8FAE;
  --rose-soft: #4A2333;
  --plum: #C9A0CF;
  --plum-soft: #35213A;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 14px 34px -14px rgba(0, 0, 0, .6);
  --shadow-lg: 0 30px 60px -20px rgba(0, 0, 0, .7);
  --glow: rgba(244, 188, 69, .12);
  color-scheme: dark;
}
:root[lang="ar"] {
  --font-display: "El Messiri", "Fraunces", serif;
  --font-body: "Tajawal", "DM Sans", sans-serif;
}

/* ============ Base ============ */
*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: clip; scroll-behavior: smooth; scroll-padding-top: 90px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  overflow-x: clip;
  transition: background-color .5s ease, color .5s ease;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.12; margin: 0; font-weight: 600; }
em { font-style: italic; color: var(--rose); }
:root[lang="ar"] em { font-style: normal; }
::selection { background: var(--honey); color: #2B1630; }
:focus-visible { outline: 3px solid var(--honey); outline-offset: 3px; border-radius: 8px; }

/* paper grain */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.35 0 0 0 0 0.2 0 0 0 0 0.3 0 0 0 .06 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
main, .footer, .nav { position: relative; z-index: 1; }

/* ============ Cursor glow + progress ============ */
.cursor-glow {
  position: fixed; width: 420px; height: 420px; border-radius: 50%;
  background: radial-gradient(circle, var(--glow), transparent 65%);
  pointer-events: none; z-index: 0; left: 0; top: 0;
  transform: translate(-50%, -50%); opacity: 0; transition: opacity .4s;
}
body.has-pointer .cursor-glow { opacity: 1; }
.scroll-progress {
  position: fixed; top: 0; inset-inline-start: 0; height: 3px; width: 100%; z-index: 60;
  background: linear-gradient(90deg, var(--honey), var(--rose), var(--plum));
  transform-origin: left; transform: scaleX(0);
}
[dir="rtl"] .scroll-progress { transform-origin: right; }

/* ============ Nav ============ */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px clamp(16px, 4vw, 48px);
  transition: background .3s, box-shadow .3s, padding .3s;
}
.nav.scrolled {
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  box-shadow: 0 1px 0 var(--line);
  padding-block: 10px;
}
.logo { display: flex; align-items: center; gap: 10px; transition: transform .35s var(--ease-spring); text-decoration: none; font-family: "Fraunces", serif; font-weight: 700; font-size: 1.35rem; }

.logo .dot { color: var(--honey); }
.nav-links { display: flex; gap: 6px; }
.nav-links a {
  position: relative; text-decoration: none; padding: 8px 14px; border-radius: 999px;
  font-weight: 500; font-size: .95rem; color: var(--ink-2); transition: color .25s, background .25s;
}
.nav-links a:hover, .nav-links a.active { color: var(--ink); background: var(--plum-soft); }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.pill-btn, .theme-toggle, .menu-btn {
  border: 1px solid var(--line); background: var(--surface); cursor: pointer;
  height: 42px; border-radius: 999px; transition: transform .3s var(--ease-spring), border-color .3s, background .3s;
}
.pill-btn:hover, .theme-toggle:hover, .menu-btn:hover { transform: translateY(-2px); border-color: var(--honey); }
.lang-toggle { padding: 0 14px; font-weight: 600; font-size: .9rem; display: flex; align-items: center; gap: 4px; }
.lang-toggle .lang-ar { font-family: "Tajawal", sans-serif; font-size: 1.05rem; }
.lang-sep { opacity: .35; }
:root[lang="en"] .lang-en, :root[lang="ar"] .lang-ar { color: var(--rose); }
:root[lang="en"] .lang-ar, :root[lang="ar"] .lang-en { opacity: .55; }

.theme-toggle { width: 42px; display: grid; place-items: center; }
.theme-toggle svg { width: 22px; height: 22px; overflow: visible; }
.sun-core { fill: var(--honey); transition: r .5s var(--ease-out); }
.moon-bite { transition: cx .5s var(--ease-out), cy .5s var(--ease-out); }
.sun-rays { stroke: var(--honey); stroke-width: 2; stroke-linecap: round; transform-origin: 12px 12px; transition: transform .6s var(--ease-spring), opacity .35s; }
:root[data-theme="dark"] .sun-core { r: 9px; fill: var(--plum); }
:root[data-theme="dark"] .moon-bite { cx: 17px; cy: 7px; }
:root[data-theme="dark"] .sun-rays { transform: rotate(90deg) scale(0); opacity: 0; }

.menu-btn { display: none; width: 42px; padding: 0; position: relative; }
.menu-btn span { position: absolute; left: 12px; right: 12px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .35s var(--ease-out); }
.menu-btn span:first-child { top: 16px; } .menu-btn span:last-child { top: 24px; }
.menu-btn[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }

/* ============ Buttons ============ */
.btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 14px 26px; border-radius: 999px;
  font-weight: 600; text-decoration: none; border: 0; cursor: pointer; position: relative; overflow: hidden;
  transition: transform .35s var(--ease-spring), box-shadow .35s;
}
.btn-primary { background: var(--ink); color: var(--bg); box-shadow: 0 10px 24px -10px var(--plum); }
.btn-primary::before {
  content: ""; position: absolute; inset: 0; background: linear-gradient(120deg, var(--honey), var(--rose));
  transform: translateY(101%); transition: transform .45s var(--ease-out); z-index: 0;
}
.btn-primary:hover::before { transform: translateY(0); }
.btn-primary:hover { color: #2B1630; }
.btn > * { position: relative; z-index: 1; }
.btn-primary .arrow { transition: transform .3s var(--ease-spring); }
.btn-primary:hover .arrow { transform: translateX(5px); }
[dir="rtl"] .btn-primary .arrow { transform: scaleX(-1); }
[dir="rtl"] .btn-primary:hover .arrow { transform: scaleX(-1) translateX(5px); }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn-ghost:hover { background: var(--honey-soft); }

/* ============ Hero ============ */
.hero {
  position: relative; min-height: min(calc(100svh - 70px), 860px);
  display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: clamp(24px, 5vw, 72px);
  padding: 30px clamp(16px, 6vw, 96px) 90px; max-width: 1320px; margin: 0 auto;
}
.blob { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; pointer-events: none; z-index: -1; animation: drift 18s ease-in-out infinite alternate; }
.b1 { width: 420px; height: 420px; background: var(--honey-soft); top: -60px; inset-inline-end: 4%; }
.b2 { width: 340px; height: 340px; background: var(--rose-soft); bottom: 0; inset-inline-start: -80px; animation-delay: -6s; }
.b3 { width: 260px; height: 260px; background: var(--plum-soft); top: 40%; inset-inline-start: 40%; animation-delay: -12s; }
@keyframes drift {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, -30px) scale(1.12); }
  100% { transform: translate(-30px, 30px) scale(.94); }
}
.kicker { font-weight: 500; color: var(--muted); margin: 0 0 6px; font-size: 1.05rem; }

.hero-name { font-size: clamp(3.2rem, 9vw, 7rem); font-weight: 700; letter-spacing: -.03em; line-height: .98; margin-bottom: 14px; }
:root[lang="ar"] .hero-name { letter-spacing: 0; line-height: 1.25; }
.split .ch { display: inline-block; opacity: 0; transform: translateY(60%) rotate(8deg); animation: chIn .9s var(--ease-spring) forwards; }
.split .ch.space { width: .28em; }
.split .ch:hover { color: var(--rose); transform: translateY(-8px) rotate(-6deg); transition: transform .3s var(--ease-spring), color .2s; }
@keyframes chIn { to { opacity: 1; transform: none; } }
.hero-name .split { background: linear-gradient(100deg, var(--ink) 40%, var(--plum)); -webkit-background-clip: text; background-clip: text; }

.hero-role { font-family: var(--font-display); font-size: clamp(1.4rem, 3vw, 2.1rem); margin: 0 0 18px; display: flex; flex-wrap: wrap; gap: .35em; align-items: baseline; }
.rotator { position: relative; display: inline-block; color: var(--rose); font-style: italic; }
:root[lang="ar"] .rotator { font-style: normal; }
.rotator::after { content: ""; position: absolute; inset-inline: 0; bottom: 2px; height: 10px; background: var(--honey-soft); z-index: -1; border-radius: 4px; }
.rotator-word { display: inline-block; transition: transform .45s var(--ease-out), opacity .45s; }
.rotator-word.out { transform: translateY(-70%); opacity: 0; }
.rotator-word.in { transform: translateY(70%); opacity: 0; transition: none; }
.hero-lead { max-width: 54ch; color: var(--ink-2); font-size: 1.1rem; margin: 0 0 30px; }
.hero-lead strong { color: var(--ink); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 30px; }
.hero-tags { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; }
.hero-tags li { padding: 6px 14px; border-radius: 999px; font-size: .85rem; font-weight: 600; background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); transition: transform .3s var(--ease-spring), background .3s; }
.hero-tags li:hover { transform: translateY(-3px) rotate(-3deg); background: var(--honey-soft); }

.hero-visual { display: grid; place-items: center; }
.photo-wrap { position: relative; width: min(440px, 80vw); aspect-ratio: 1; transform-style: preserve-3d; }
.photo {
  position: absolute; inset: 7%; overflow: hidden; background: var(--honey);
  border-radius: 58% 42% 50% 50% / 48% 55% 45% 52%;
  animation: morph 12s ease-in-out infinite; box-shadow: var(--shadow-lg);
}
.photo img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.04); transition: transform .8s var(--ease-out); }
.photo-wrap:hover .photo img { transform: scale(1.1); }
@keyframes morph {
  0%, 100% { border-radius: 58% 42% 50% 50% / 48% 55% 45% 52%; }
  33% { border-radius: 45% 55% 40% 60% / 55% 45% 55% 45%; }
  66% { border-radius: 52% 48% 60% 40% / 42% 58% 42% 58%; }
}
.ring { position: absolute; inset: 0; width: 100%; height: 100%; animation: spin 40s linear infinite; }
.ring circle { fill: none; stroke: var(--honey); stroke-width: 1.2; stroke-dasharray: 2 7; stroke-linecap: round; }
@keyframes spin { to { transform: rotate(360deg); } }
.badge-spin { position: absolute; width: 120px; height: 120px; inset-inline-end: -4%; bottom: 2%; display: grid; place-items: center; background: var(--ink); color: var(--bg); border-radius: 50%; box-shadow: var(--shadow); transform: translateZ(40px); }
.badge-spin svg { position: absolute; inset: 0; animation: spin 14s linear infinite; }
.badge-spin text { font: 700 9.6px/1 "DM Sans", sans-serif; letter-spacing: 2.3px; fill: currentColor; }
.badge-star { color: var(--honey); font-size: 1.6rem; animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.3) rotate(45deg); } }
.float-chip {
  position: absolute; display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 16px;
  background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--line); box-shadow: var(--shadow); font-weight: 600; font-size: .9rem; white-space: nowrap;
  animation: bob 5s ease-in-out infinite; transform: translateZ(60px);
}
.chip-1 { top: 6%; inset-inline-start: -10%; }
.chip-2 { top: 46%; inset-inline-end: -14%; animation-delay: -1.6s; }
.chip-3 { bottom: 4%; inset-inline-start: -4%; animation-delay: -3.2s; }
@keyframes bob { 50% { translate: 0 -12px; } }

.scroll-cue { position: absolute; bottom: 24px; left: 50%; translate: -50% 0; width: 26px; height: 42px; border: 2px solid var(--muted); border-radius: 14px; }
.scroll-cue span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; background: var(--rose); border-radius: 2px; animation: scrollcue 1.8s ease-in-out infinite; }
@keyframes scrollcue { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* ============ Stats ribbon ============ */
.stats {
  max-width: 1160px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px);
  display: grid; grid-template-columns: repeat(4, 1fr);
}
.stat { position: relative; padding: 26px clamp(12px, 2.4vw, 32px); border-block: 1px solid var(--line); }
.stat + .stat::before { content: ""; position: absolute; inset-block: 24px; inset-inline-start: 0; width: 1px; background: var(--line); }
.stat .num, .stat .plus { font-family: "Fraunces", serif; font-size: clamp(2.3rem, 4.6vw, 3.3rem); font-weight: 700; line-height: 1; }
.stat .plus { color: var(--honey); }
.stat p { margin: 10px 0 0; color: var(--muted); font-weight: 600; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; }
:root[lang="ar"] .stat p { letter-spacing: 0; font-size: .95rem; text-transform: none; }

/* ============ Sections ============ */
.section { max-width: 1160px; margin: 0 auto; padding: clamp(56px, 8vw, 96px) clamp(16px, 4vw, 40px); }
.section-head { margin-bottom: clamp(24px, 4vw, 40px); max-width: 720px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: .8rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--rose); margin-bottom: 14px;
}
:root[lang="ar"] .eyebrow { letter-spacing: 0; font-size: .95rem; }
.eyebrow::before { content: ""; width: 28px; height: 2px; background: currentColor; border-radius: 2px; }
.section h2 { font-size: clamp(2rem, 5vw, 3.4rem); letter-spacing: -.02em; }
:root[lang="ar"] .section h2 { letter-spacing: 0; line-height: 1.35; }

/* About */
.about-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: start; }
.about-copy p { margin: 0 0 18px; color: var(--ink-2); font-size: 1.08rem; }
.about-copy p:first-child::first-letter { font-family: "Fraunces", serif; float: inline-start; font-size: 4.2em; line-height: .85; padding-inline-end: 10px; color: var(--honey); font-weight: 700; }
:root[lang="ar"] .about-copy p:first-child::first-letter { all: unset; }
.facts { list-style: none; margin: 0; padding: 6px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 26px 28px; align-content: start; }
.fact { display: grid; grid-template-columns: auto 1fr; gap: 6px 10px; align-items: center; align-content: start; transform: none !important; }
.fact .fact-ico { width: 22px; height: 22px; color: var(--ink-2); }
.fact > div { display: contents; }
.fact b { font-size: .74rem; text-transform: uppercase; letter-spacing: .13em; color: var(--muted); font-weight: 700; }
:root[lang="ar"] .fact b { letter-spacing: 0; font-size: .9rem; }
.fact span { grid-column: 1 / -1; font-weight: 600; line-height: 1.4; }

/* Career: accordion rows */
.roles { position: relative; display: grid; gap: 10px; }
.tl-line { position: absolute; top: 26px; bottom: 26px; inset-inline-start: 9px; width: 2px; background: var(--line); border-radius: 2px; }
.tl-fill { position: absolute; inset-inline: 0; top: 0; height: 0; background: linear-gradient(var(--honey), var(--rose)); border-radius: 2px; }
.role { position: relative; margin-inline-start: 34px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; transition: border-color .3s, box-shadow .3s, opacity .9s var(--ease-out), transform .9s var(--ease-out); }
.role[open], .role:hover { border-color: color-mix(in srgb, var(--honey) 45%, var(--line)); box-shadow: var(--shadow); }
.role summary, .role-row { list-style: none; display: flex; align-items: center; gap: 14px; padding: 15px 20px; cursor: pointer; }
.role-row { cursor: default; }
.role summary::-webkit-details-marker { display: none; }
.role-dot { position: absolute; inset-inline-start: -31px; top: 22px; width: 14px; height: 14px; border-radius: 50%; background: var(--bg); border: 2px solid var(--muted); transition: border-color .3s, background .3s; }
.role[open] .role-dot, .role:hover .role-dot { border-color: var(--honey); background: var(--honey); }
.role.is-current .role-dot { border-color: var(--rose); background: var(--rose); }
.role.is-current .role-dot::after { content: ""; position: absolute; inset: -7px; border-radius: 50%; border: 2px solid var(--rose); animation: ping 2s ease-out infinite; }
@keyframes ping { 0% { transform: scale(.6); opacity: 1; } 100% { transform: scale(1.8); opacity: 0; } }
.role.is-edu { background: linear-gradient(120deg, var(--honey-soft), var(--rose-soft)); border-color: transparent; }
.role.is-edu .role-dot, .role.is-edu:hover .role-dot { width: 26px; height: 26px; inset-inline-start: -37px; top: 14px; border: 0; background: var(--bg); display: grid; place-items: center; color: var(--ink); }
.role.is-edu .role-dot .ico { width: 20px; height: 20px; }
.tl-date { flex: none; font-weight: 700; font-size: .8rem; color: var(--plum); background: var(--plum-soft); padding: 4px 11px; border-radius: 999px; white-space: nowrap; }
.role-main { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; min-width: 0; flex: 1; }
.role-title { font-family: var(--font-display); font-weight: 600; font-size: 1.12rem; line-height: 1.3; }
.role-co { color: var(--rose); font-weight: 600; font-size: .9rem; }
.tl-badge { flex: none; font-size: .72rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--rose); color: #fff; }
:root[data-theme="dark"] .tl-badge { color: #2B1630; }
.role-toggle { flex: none; position: relative; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line); transition: transform .4s var(--ease-spring), background .3s, border-color .3s; }
.role-toggle::before, .role-toggle::after { content: ""; position: absolute; left: 50%; top: 50%; width: 10px; height: 1.5px; margin: -.75px 0 0 -5px; background: currentColor; border-radius: 2px; }
.role-toggle::after { transform: rotate(90deg); transition: transform .3s; }
.role[open] .role-toggle { transform: rotate(180deg); background: var(--honey); border-color: var(--honey); color: #2B1630; }
.role[open] .role-toggle::after { transform: rotate(0); }
.role ul { margin: 0; padding: 0 20px 18px; list-style: none; display: grid; gap: 6px; }
.role li { position: relative; padding-inline-start: 20px; color: var(--ink-2); font-size: .96rem; }
.role li::before { content: ""; position: absolute; inset-inline-start: 2px; top: .62em; width: 6px; height: 6px; border-radius: 50%; background: var(--honey); }
.role[open] ul { animation: roleIn .45s var(--ease-out); }
@keyframes roleIn { from { opacity: 0; transform: translateY(-6px); } }

/* Skills: one panel, three columns */
.skill-grid { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--surface); border: 1px solid var(--line); border-radius: 26px; box-shadow: var(--shadow); overflow: hidden; }
.skill-card { padding: 28px clamp(18px, 2.6vw, 32px); position: relative; transform: none !important; }
.skill-card + .skill-card { border-inline-start: 1px solid var(--line); }
.skill-card .skill-ico { width: 30px; height: 30px; margin-bottom: 12px; color: var(--ink); transition: transform .5s var(--ease-spring); }
.skill-card:hover .skill-ico { transform: rotate(-14deg) scale(1.12); }
.skill-card h3 { font-size: 1.25rem; margin-bottom: 14px; }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { padding: 6px 13px; border-radius: 999px; background: var(--bg-2); font-size: .88rem; font-weight: 500; transition: transform .3s var(--ease-spring), background .3s; cursor: default; }
.chips li:hover { transform: translateY(-3px); background: var(--honey-soft); }
.marquee { margin-top: 36px; overflow: hidden; padding-block: 8px; mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee-track { display: flex; gap: 28px; width: max-content; animation: marquee 32s linear infinite; font-family: "Fraunces", serif; font-size: clamp(1.3rem, 2.6vw, 1.9rem); font-weight: 600; white-space: nowrap; direction: ltr; }
.marquee-track i { color: var(--honey); font-style: normal; }
.marquee-track span:nth-of-type(3n+2) { font-style: italic; color: var(--rose); }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Highlights: promo left, milestones right */
.hl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(18px, 3vw, 36px); align-items: start; }
.promo { display: grid; grid-template-columns: 170px 1fr; gap: 22px; align-items: start; background: var(--surface); border: 1px solid var(--line); border-radius: 26px; padding: 22px; box-shadow: var(--shadow); }
.promo-img { border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); }
.promo-img img { width: 100%; height: auto; }
.promo-tag { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: .78rem; padding: 5px 12px; border-radius: 999px; background: var(--honey-soft); margin-bottom: 10px; }
.promo-tag .ico { width: 14px; height: 14px; }
.promo h3 { font-size: clamp(1.3rem, 2.2vw, 1.6rem); margin-bottom: 12px; }
.promo blockquote { margin: 0; padding-inline-start: 16px; border-inline-start: 3px solid var(--rose); }
.promo blockquote p { margin: 0 0 8px; font-family: var(--font-display); font-style: italic; font-size: 1rem; line-height: 1.55; color: var(--ink-2); }
:root[lang="ar"] .promo blockquote p { font-style: normal; }
.promo cite { font-style: normal; font-weight: 600; color: var(--muted); font-size: .82rem; }
.sub-head { font-size: 1.15rem; margin: 4px 0 12px; }
.milestones { display: grid; }
.ms-card { padding: 16px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 82px 1fr; gap: 2px 14px; transform: none !important; }
.ms-card:last-child { border-bottom: 1px solid var(--line); }
.ms-date { grid-row: span 2; font-weight: 700; font-size: .8rem; color: var(--rose); padding-top: 3px; }
.ms-card h4 { font-size: 1.08rem; margin: 0; }
.ms-card p { margin: 2px 0 0; color: var(--ink-2); font-size: .92rem; line-height: 1.5; }

/* Contact */
.contact-card {
  position: relative; overflow: hidden; text-align: center; border-radius: 34px;
  padding: clamp(40px, 7vw, 80px) clamp(20px, 5vw, 64px);
  background: var(--ink); color: var(--bg);
}
.contact-card .eyebrow { color: var(--honey); justify-content: center; }
.contact-card h2 { color: var(--bg); margin-bottom: 14px; }
.contact-card h2 em { color: var(--honey); }
.contact-card > p { max-width: 520px; margin: 0 auto 36px; opacity: .8; }
.b4 { width: 420px; height: 420px; background: var(--rose); opacity: .25; top: -160px; inset-inline-end: -120px; z-index: 0; }
.contact-card > *:not(.blob) { position: relative; z-index: 1; }
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 36px; }
.c-item {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 24px 16px; border-radius: 22px;
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); color: inherit; text-decoration: none; cursor: pointer;
  transition: background .3s, transform .35s var(--ease-spring);
}
:root[data-theme="dark"] .c-item { background: rgba(0, 0, 0, .05); border-color: rgba(0, 0, 0, .12); }
.c-item:hover { background: rgba(255, 255, 255, .12); }
:root[data-theme="dark"] .c-item:hover { background: rgba(0, 0, 0, .08); }
.c-ico { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 6px; color: inherit; transition: transform .4s var(--ease-spring); }
.c-ico .ico { width: 34px; height: 34px; }
.c-item:hover .c-ico { transform: rotate(-10deg) scale(1.1); }
.c-label { font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; opacity: .7; font-weight: 700; }
.c-val { font-weight: 600; font-size: 1rem; word-break: break-all; }
.c-hint { font-size: .8rem; opacity: .55; }
.contact-card .btn-primary { background: var(--honey); color: #2B1630; }
.contact-card .btn-primary:hover { color: #2B1630; }

/* Footer */
.footer { display: flex; justify-content: space-between; align-items: center; gap: 16px; max-width: 1160px; margin: 0 auto; padding: 32px clamp(16px, 4vw, 40px) 40px; color: var(--muted); font-size: .92rem; }
.footer p { margin: 0; }
.heart { color: var(--rose); display: inline-block; animation: beat 1.4s ease-in-out infinite; }
@keyframes beat { 0%, 60%, 100% { transform: scale(1); } 15%, 40% { transform: scale(1.25); } }
.to-top { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); text-decoration: none; font-weight: 700; transition: transform .35s var(--ease-spring), background .3s; }
.to-top:hover { transform: translateY(-4px); background: var(--honey-soft); }

/* Toast + confetti */
.toast { position: fixed; bottom: 28px; left: 50%; translate: -50% 120px; background: var(--ink); color: var(--bg); padding: 12px 22px; border-radius: 999px; font-weight: 600; box-shadow: var(--shadow-lg); z-index: 80; transition: translate .5s var(--ease-spring); pointer-events: none; }
.toast.show { translate: -50% 0; }
#confetti { position: fixed; inset: 0; pointer-events: none; z-index: 90; width: 100%; height: 100%; }

/* ============ Icons (bespoke sprite in index.html) ============ */
.ico, .fact-ico, .skill-ico { display: inline-block; width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; overflow: visible; vertical-align: -0.2em; }
symbol .ac { fill: var(--honey); stroke: none; }
symbol .ac-soft { fill: var(--honey); fill-opacity: .28; stroke: var(--honey); }
symbol .ac-line { stroke: var(--honey); }
symbol .glyph { font: 600 17px/1 "Fraunces", serif; fill: currentColor; stroke: none; }
symbol .glyph-ar { font: 700 17px/1 "El Messiri", "Tajawal", serif; stroke: none; }
symbol .glyph-it { font: italic 600 15px/1 "Fraunces", serif; fill: currentColor; stroke: none; }
.hello-spark { width: 16px; height: 16px; margin-inline-end: 4px; animation: twinkle 3s ease-in-out infinite; }
@keyframes twinkle { 0%, 100% { transform: rotate(0) scale(1); } 50% { transform: rotate(90deg) scale(1.25); } }
.float-chip .ico { width: 20px; height: 20px; color: var(--ink); }

/* ============ Reveal + tilt ============ */
.reveal { opacity: 0; transform: translateY(36px); transition: opacity .9s var(--ease-out), transform .9s var(--ease-out); transition-delay: var(--d, 0s); }
.reveal.visible { opacity: 1; transform: none; }
.tilt { transition: transform .5s var(--ease-out); will-change: transform; }
.tilt.reveal { transition: opacity .9s var(--ease-out), transform .9s var(--ease-out); }

/* theme switch circle reveal */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }

/* ============ Responsive ============ */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; text-align: center; padding-top: 10px; min-height: auto; }
  .hero-visual { order: -1; margin-top: 10px; }
  .hero-role, .hero-cta, .hero-tags { justify-content: center; }
  .hero-lead { margin-inline: auto; }
  .photo-wrap { width: min(340px, 74vw); }
  .chip-1 { inset-inline-start: -6%; } .chip-2 { inset-inline-end: -8%; }
  .scroll-cue { display: none; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3)::before { display: none; }
  .stat:nth-child(n+3) { border-top: 0; }
  .about-grid, .hl-grid { grid-template-columns: 1fr; }
  .skill-grid { grid-template-columns: 1fr; }
  .skill-card + .skill-card { border-inline-start: 0; border-top: 1px solid var(--line); }
}
@media (max-width: 820px) {
  .menu-btn { display: block; }
  .nav-links {
    position: fixed; inset: 70px 16px auto; flex-direction: column; gap: 4px; padding: 12px;
    background: var(--surface); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow-lg);
    opacity: 0; transform: translateY(-12px) scale(.98); pointer-events: none; transition: opacity .3s, transform .35s var(--ease-out);
  }
  .nav-links.open { opacity: 1; transform: none; pointer-events: auto; }
  .nav-links a { padding: 12px 16px; font-size: 1.05rem; }
  .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .promo { grid-template-columns: 110px 1fr; gap: 14px; padding: 16px; }
  .role summary, .role-row { flex-wrap: wrap; gap: 8px 12px; padding: 14px 16px; }
  .role-main { flex-basis: 100%; order: 3; }
  .role-toggle { margin-inline-start: auto; }
  .role ul { padding: 0 16px 16px; }
  .facts { gap: 20px 16px; }
  .ms-card { grid-template-columns: 1fr; }
  .ms-date { grid-row: auto; }
  body { font-size: 16px; }
  .float-chip { font-size: .78rem; padding: 7px 11px; }
  .chip-2 { top: 34%; inset-inline-end: -4%; }
  .chip-1 { inset-inline-start: -2%; }
  .badge-spin { width: 92px; height: 92px; }
  .hero-cta .btn { flex: 1 1 auto; justify-content: center; }
  .footer { flex-direction: column; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
  .split .ch { opacity: 1; transform: none; }
  .cursor-glow { display: none; }
}

/* keep Latin-only decorations left-to-right inside RTL pages */
.logo, .badge-spin svg { direction: ltr; }
:root[data-theme="dark"] .contact-card .eyebrow,
:root[data-theme="dark"] .contact-card h2 em { color: #A8601A; }

/* ============ Press feedback: squish + ripple ============ */
.logo:hover { transform: translateY(-1px); }
.btn, .c-item, .pill-btn, .theme-toggle, .menu-btn, .to-top, .nav-links a, .role summary, .hero-tags li, .chips li, .promo-tag {
  transition: scale .45s var(--ease-spring), transform .35s var(--ease-spring), background .3s, border-color .3s, color .3s, box-shadow .35s;
}
.btn:active, .c-item:active, .pill-btn:active, .theme-toggle:active, .menu-btn:active, .to-top:active, .nav-links a:active, .promo-tag:active { scale: .94; transition-duration: .12s; }
.role summary:active { scale: .985; transition-duration: .12s; }
.c-item, .pill-btn, .theme-toggle, .to-top, .nav-links a, .role summary { position: relative; overflow: hidden; }
.ripple {
  position: absolute; border-radius: 50%; pointer-events: none; z-index: 0;
  background: currentColor; opacity: .18; transform: scale(0);
  animation: ripple .65s var(--ease-out) forwards;
}
.btn-primary .ripple { background: #fff; opacity: .35; }
@keyframes ripple { to { transform: scale(1); opacity: 0; } }
.theme-toggle.spin svg { animation: toggleSpin .6s var(--ease-spring); }
@keyframes toggleSpin { from { transform: rotate(-120deg) scale(.6); } }
@media (prefers-reduced-motion: reduce) { .ripple { display: none; } }
