/* Existing header rules stay in header.css. Profile: variance 6 / motion 3 / density 3.
   Native CSS, with the existing Outfit/Tajawal brand typography. */
.profile-page { --surface:#111a25; --surface-raised:#182330; --ink:#f3f6f8; --muted:#b0bdca; --line:#2c3947; --accent:#63d5d9; background:var(--surface); color:var(--muted); font-family:'Outfit',sans-serif; }
html[lang=ar] .profile-page {font-family:'Tajawal',sans-serif}
.profile-page .wrap {width:min(1180px,calc(100% - 80px));margin-inline:auto}
.profile-page main h1,.profile-page main h2,.profile-page main h3 {color:var(--ink);letter-spacing:-.035em}
.profile-page main h1 {font-size:clamp(3rem,5.4vw,5.1rem);line-height:1.07;font-weight:500;max-width:11ch;margin:22px 0 26px}
.profile-page main h2 {font-size:clamp(2rem,3.3vw,3.2rem);font-weight:500;line-height:1.15;max-width:23ch;margin-bottom:22px}
.profile-page main h3 {font-size:1.4rem;font-weight:500;line-height:1.3;margin-bottom:14px}
.profile-page main p {font-size:1.06rem;line-height:1.8;max-width:65ch}
.profile-page .eyebrow {color:var(--accent);font-size:.82rem;letter-spacing:.1em;font-weight:500}
.profile-page .section {padding-block:96px;scroll-margin-top:105px}
.profile-hero {display:grid;grid-template-columns:1.2fr 1fr;align-items:center;gap:80px;padding-top:165px;padding-bottom:70px;min-height:720px}
.hero-copy>p:not(.eyebrow) {max-width:46ch}
.portrait {margin:0;align-self:center}
.portrait img {width:100%;height:auto;aspect-ratio:1;object-fit:cover;border-radius:8px;filter:saturate(.85)}
.profile-page .identity {color:var(--ink);font-size:1.05rem;margin-top:18px;line-height:1.5}
.actions {display:flex;flex-wrap:wrap;gap:16px;margin-top:32px;align-items:center}
.action {display:inline-flex;justify-content:center;align-items:center;min-height:50px;padding:12px 22px;border:1px solid var(--line);border-radius:5px;font-size:.96rem;font-weight:500;color:var(--ink);text-align:center}
.action.primary {background:var(--accent);color:#10222b;border-color:var(--accent)}
.action:hover {transform:translateY(-2px);border-color:var(--accent)}
.text-link {display:inline-block;color:var(--accent);text-underline-offset:6px;margin-top:26px}
.text-link:hover {text-decoration:underline}
.proof {display:grid;grid-template-columns:repeat(3,1fr);gap:40px;border-top:1px solid var(--line);border-bottom:1px solid var(--line);padding-block:32px}
.proof strong {font-weight:400;font-size:3.2rem;line-height:1.2;color:var(--ink);display:block}
.profile-page .proof p {font-size:.9rem;margin-top:8px;max-width:29ch}
.expertise-grid {display:grid;grid-template-columns:repeat(2,1fr);column-gap:80px;margin-top:42px}
.expertise {padding-block:28px;border-top:1px solid var(--line);scroll-margin-top:110px}
.profile-page .expertise p {font-size:1rem;max-width:49ch}
.about-section {background:var(--surface-raised)}
.about-grid {display:grid;grid-template-columns:1fr 1fr;gap:80px}
.about-grid .eyebrow {margin-bottom:20px}
.about-grid p+p {margin-top:22px}
.project-grid {display:grid;grid-template-columns:1fr 1fr;gap:24px;margin-top:40px}
.project {padding:36px;background:var(--surface-raised);border-radius:8px;border:1px solid var(--line)}
.project-dirassati {grid-row:span 2;display:flex;flex-direction:column;justify-content:flex-end;min-height:430px;background:#1b3940;border-color:#31545a}
.profile-page .project-dirassati h3 {font-size:3.5rem;margin-top:auto;padding-top:90px}
.profile-page .project-role {color:var(--accent);font-size:.85rem;margin-bottom:16px}
.project p {max-width:48ch}
.timeline {margin-top:40px}
.timeline article {display:grid;grid-template-columns:230px 1fr;gap:40px;padding-block:28px;border-top:1px solid var(--line)}
.profile-page .date {font-size:.95rem;color:var(--accent)}
.credentials {display:grid;grid-template-columns:1.3fr 1fr;gap:70px;margin-top:55px}
.credentials p+p {margin-top:20px}
.cv-panel {padding:30px;background:var(--surface-raised);border-radius:8px}
.cv-panel .action {margin-top:24px;margin-inline-end:18px}
.cv-panel .text-link {font-size:.95rem}
.contact-section {border-top:1px solid var(--line);background:var(--surface-raised)}
.profile-page .contact-section h2 {max-width:none}
.contact-email {display:inline-block;font-size:clamp(1.3rem,3.4vw,2.8rem);color:var(--accent);margin-top:25px;overflow-wrap:anywhere}
.contact-email span {display:inline-block;margin-inline-start:12px}
.contact-details {display:flex;flex-wrap:wrap;gap:24px;margin-top:36px;font-size:.95rem}
.contact-details a:hover {color:var(--accent)}
.profile-footer {display:flex;align-items:center;justify-content:space-between;gap:24px;padding-block:35px;font-size:.85rem}
.profile-footer .text-link {margin:0}
.footer-wordmark {font-size:1.6rem;font-weight:700;color:var(--ink);direction:ltr}
.footer-wordmark span {color:var(--accent)}
.page-intro {padding-top:180px;padding-bottom:35px}
.profile-page .page-intro h1 {max-width:19ch;font-size:clamp(2.6rem,5vw,4.6rem)}
.community-grid {display:grid;grid-template-columns:1fr 1fr;gap:60px;margin-top:40px}
.skip-link {position:fixed;top:-100px;left:20px;z-index:2000;background:var(--accent);color:#10222b;padding:12px 24px;border-radius:5px}
.skip-link:focus {top:10px}
.profile-page a:focus-visible,.profile-page button:focus-visible {outline:3px solid var(--accent);outline-offset:5px}
html[lang=ar] .profile-page main h1 {max-width:12ch;line-height:1.25;font-weight:700;letter-spacing:0}
html[lang=ar] .profile-page main h2,html[lang=ar] .profile-page main h3 {letter-spacing:0;line-height:1.4}
html[lang=ar] .profile-page .eyebrow {letter-spacing:0}
@media(prefers-color-scheme:light) {
 .profile-page {--surface:#f5f8fa;--surface-raised:#eaf0f4;--ink:#122431;--muted:#485c6a;--line:#c7d4dd;--accent:#08767d}
 .profile-page .action.primary {color:#fff}
 .profile-page .project-dirassati {background:#dcecef;border-color:#bed5d9}
 /* The user's existing dark floating header is deliberately preserved. */
}
@media(max-width:1024px) {
 .profile-page .wrap {width:calc(100% - 48px)}
 .profile-hero {gap:38px;min-height:650px;padding-top:140px}
 .profile-page main h1 {font-size:3.6rem}
 .expertise-grid,.about-grid {gap:35px}
 .credentials {gap:30px}
}
@media(max-width:767px) {
 .profile-page .wrap {width:calc(100% - 40px)}
 .profile-hero {grid-template-columns:1fr;gap:36px;padding-top:125px;padding-bottom:38px;min-height:0}
 .profile-page main h1 {font-size:clamp(2.7rem,10vw,4rem);margin-block:18px 22px;max-width:12ch}
 .profile-page main p {font-size:1rem}
 .portrait {width:100%;max-width:440px}
 .portrait img {aspect-ratio:1.12;object-position:50% 40%}
 .profile-page .section {padding-block:58px}
 .proof {gap:16px;padding-block:24px}
 .proof strong {font-size:2.25rem}
 .profile-page .proof p {font-size:.76rem;line-height:1.5}
 .expertise-grid,.about-grid,.project-grid,.credentials,.community-grid {grid-template-columns:1fr;gap:24px}
 .expertise-grid {gap:0;margin-top:28px}
 .project-dirassati {grid-row:auto;min-height:290px}
 .profile-page .project-dirassati h3 {padding-top:25px;font-size:2.6rem}
 .project {padding:26px}
 .timeline article {grid-template-columns:1fr;gap:10px}
 .credentials {margin-top:30px}
 .contact-details {flex-direction:column;gap:16px}
 .profile-footer {flex-wrap:wrap;gap:15px}
 .profile-footer p {width:100%;order:3}
 .page-intro {padding-top:130px}
}
@media(prefers-reduced-motion:reduce) {html {scroll-behavior:auto}.profile-page *, .profile-page *::before,.profile-page *::after {animation:none!important;transition:none!important;scroll-behavior:auto!important}}
/* Remove the old alternating timeline decoration from the new experience list. */
.profile-page .timeline {max-width:none;margin-inline:0}
.profile-page .timeline::before {content:none}
@media(max-width:767px) {html[lang=ar] .profile-page main h1 {max-width:none;font-size:2.55rem;line-height:1.35}}

.profile-page .social-profile-links {width:min(1180px,calc(100% - 40px));margin:30px auto}.ecosystem-links {padding-bottom:32px;color:var(--accent)}

/* Supplied logo and updated portraits. Preserve the floating header geometry. */
.profile-page .aeb-brand-image {width:44px;height:44px;object-fit:contain;border-radius:50%;display:block}
.profile-page .footer-wordmark .aeb-brand-image {width:52px;height:52px}
.profile-page .proof {grid-template-columns:repeat(4,minmax(0,1fr))}
.profile-page .project-dirassati {grid-row:auto;min-height:320px}
.profile-page .project-dirassati h3 {padding-top:32px}
.portrait-gallery {display:grid;grid-template-columns:1.4fr 1fr;gap:28px;margin-top:32px;align-items:start}
.portrait-gallery img {width:100%;height:520px;object-fit:cover;border-radius:8px}
.portrait-gallery img:last-child {object-fit:contain;background:var(--surface-raised)}
@media(max-width:767px){.profile-page .proof {grid-template-columns:repeat(2,minmax(0,1fr));gap:24px}.portrait-gallery{grid-template-columns:1fr}.portrait-gallery img{height:auto;max-height:600px}}
