/* ============ Dr. Mohamed Elrayes — personal brand ============ */
:root {
  --tan: #bda58c;
  --ink: #0a0a0a;
  --paper: #f2f0ed;
  --font-latin: 'Jost', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-ar: 'Cairo', 'Jost', sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-latin); background: var(--ink); color: #fff; overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ---------- panels ---------- */
.panel { position: relative; z-index: 1; min-height: 100vh; display: flex; flex-direction: column; justify-content: center; overflow: hidden; }
.panel-bg { position: absolute; inset: 0; background-size: cover; background-position: center 30%; }
.panel-bg::after { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.45); }

/* ---------- hero ---------- */
.hero { justify-content: flex-start; }
.hero .panel-bg { background-position: center 20%; filter: grayscale(1) contrast(1.08); }
.hero .panel-bg::after { background: radial-gradient(ellipse at center, rgba(0,0,0,.25), rgba(0,0,0,.6)); }
.hero-center { position: relative; min-height: 100vh; display: flex; flex-direction: column; justify-content: center; text-align: center; padding: 0 20px; width: 100%; }
.hero-name-ar { font-family: var(--font-ar); font-weight: 800; font-size: clamp(2.4rem, 5.5vw, 4.6rem); letter-spacing: .01em; }
.hero-name-en { font-weight: 600; font-size: clamp(1.5rem, 3.4vw, 3rem); letter-spacing: .14em; margin-top: .4rem; }
.chev { position: absolute; bottom: 34px; left: 50%; transform: translateX(-50%); width: 52px; height: 52px; border: 1px solid rgba(255,255,255,.7); border-radius: 50%; display: flex; align-items: center; justify-content: center; animation: bob 2.2s ease-in-out infinite; }
@keyframes bob { 0%,100% { transform: translate(-50%,0); } 50% { transform: translate(-50%,10px); } }

/* ---------- social rail ---------- */
.rail { position: fixed; left: 30px; top: 50%; transform: translateY(-50%); z-index: 60; display: flex; flex-direction: column; gap: 26px; mix-blend-mode: difference; }
.rail a { display: block; opacity: .9; transition: transform .3s, opacity .3s; }
.rail a:hover { transform: scale(1.18); opacity: 1; }
.rail svg { width: 21px; height: 21px; fill: #fff; }

/* ---------- dot nav ---------- */
.dots { position: fixed; right: 26px; top: 50%; transform: translateY(-50%); z-index: 60; display: flex; flex-direction: column; gap: 16px; align-items: flex-end; }
.dots a { position: relative; display: block; }
.dots .lbl { position: absolute; right: 24px; top: 50%; transform: translate(6px, -50%); white-space: nowrap; font-size: 11px; font-weight: 600; letter-spacing: .12em; color: #fff; opacity: 0; transition: opacity .3s, transform .3s, color .3s; }
.dots.light .lbl { color: #101010; text-shadow: 0 0 7px rgba(242,240,237,.95), 0 0 3px rgba(242,240,237,.95); }
.dots a.on .lbl, .dots a:hover .lbl { opacity: 1; transform: translate(0, -50%); }
.dots .dot { display: block; width: 11px; height: 11px; border: 1.6px solid #fff; border-radius: 50%; transition: background .3s, transform .3s, border-color .3s; }
.dots.light .dot { border-color: #101010; }
.dots a.on .dot { background: #fff; transform: scale(1.15); }
.dots.light a.on .dot { background: #101010; }

/* ---------- about (merged into hero, same background) ---------- */
.hero .about-inner { position: relative; max-width: 1060px; margin: 0 auto; text-align: center; padding: 30px 24px 130px; }
.hero .about-tagline { text-shadow: 0 2px 18px rgba(0,0,0,.55); }
.hero .about-text { text-shadow: 0 2px 14px rgba(0,0,0,.5); }
.hero .about-roles a { text-shadow: 0 2px 12px rgba(0,0,0,.5); }
.about-text { font-size: clamp(1.05rem, 1.7vw, 1.5rem); line-height: 2; font-weight: 300; }
.about-roles { display: flex; justify-content: center; gap: clamp(2rem, 8vw, 7rem); margin-top: 3.2rem; flex-wrap: wrap; }
.about-roles a { font-size: clamp(.95rem, 1.6vw, 1.3rem); font-weight: 600; letter-spacing: .1em; padding-bottom: 4px; border-bottom: 2px solid transparent; transition: border-color .3s, color .3s; }
.about-roles a:hover { border-color: var(--tan); color: var(--tan); }

/* ---------- ambitions (ABtalks card-game style) ---------- */
.vision { background: #0d0d0d; justify-content: center; }
.vision-grid { display: grid; grid-template-columns: 1fr 1fr; align-items: stretch; max-width: 1500px; width: 100%; margin: 0 auto; min-height: 100vh; }
.vision-text { display: flex; flex-direction: column; justify-content: center; padding: 90px 7%; }
.vision-heading { font-style: italic; font-weight: 700; text-transform: uppercase; font-size: clamp(1.9rem, 3.4vw, 3.2rem); line-height: 1.12; letter-spacing: .02em; }
.vh-white { display: block; color: #fff; }
.vh-red { display: block; color: #d31621; }
.vision-p { margin-top: 2.1rem; font-style: italic; font-weight: 300; color: #d8d8d8; font-size: clamp(.98rem, 1.25vw, 1.15rem); line-height: 1.9; max-width: 480px; }
.vision-cta { display: inline-block; align-self: flex-start; margin-top: 2.2rem; background: #d31621; color: #fff; font-weight: 700; font-style: italic; text-transform: uppercase; font-size: .95rem; letter-spacing: .06em; padding: 11px 24px; transition: background .3s, transform .3s; }
.vision-cta:hover { background: #a50f18; transform: translateY(-2px); }
.vision-photo { position: relative; min-height: 420px; }
.vision-photo img { position: absolute; inset: 0; height: 100%; width: 100%; object-fit: contain; object-position: center bottom; padding: 48px 6% 0; filter: drop-shadow(0 22px 44px rgba(0,0,0,.55)); }

/* ---------- doctor ---------- */
.doctor { background: var(--paper); color: var(--ink); justify-content: flex-end; }
.doc-grid { flex: 1; display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: 2rem; max-width: 1300px; width: 92%; margin: 0 auto; padding: 90px 0 30px; }
.doc-kicker { font-size: .8rem; font-weight: 600; letter-spacing: .22em; color: #8a5a2b; margin-bottom: 1.4rem; }
.doc-title { font-size: clamp(3rem, 7vw, 5.6rem); font-weight: 600; letter-spacing: -.01em; line-height: 1; margin-bottom: 1.6rem; }
.doc-p { font-size: 1.08rem; line-height: 1.85; max-width: 480px; color: #2a2a2a; }
.btn-dark { display: inline-block; margin-top: 2rem; background: var(--ink); color: #fff; font-weight: 600; font-size: .82rem; letter-spacing: .14em; padding: 15px 44px; transition: background .3s, color .3s; }
.btn-dark:hover { background: var(--tan); color: var(--ink); }
.doc-photo { display: flex; align-items: flex-end; justify-content: center; height: 100%; }
.doc-photo img { max-height: 72vh; width: auto; filter: drop-shadow(0 18px 40px rgba(0,0,0,.25)); }
.doc-band { position: relative; z-index: 4; background: var(--ink); color: #fff; text-align: center; padding: 26px 16px; font-weight: 600; font-size: clamp(1rem, 2.4vw, 1.7rem); letter-spacing: .06em; }

/* ---------- entrepreneur ---------- */
.entre { background: var(--ink); justify-content: flex-start; }
.sec-head { text-align: center; padding: 10px 20px 46px; }
.sec-head h2 { font-size: clamp(1.9rem, 4vw, 3rem); font-weight: 600; }
.sec-head p { color: #b9b9b9; margin-top: .7rem; letter-spacing: .08em; font-size: .95rem; }
.sec-head.light h2 { color: #fff; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; max-width: 1240px; width: 92%; margin: 0 auto; }
.card { background: #161616; border: 1px solid #262626; overflow: hidden; display: flex; flex-direction: column; transition: transform .4s, border-color .4s; }
.card:hover { transform: translateY(-8px); border-color: var(--tan); }
.card-img { aspect-ratio: 16/10; overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(.35); transition: filter .5s; }
.card:hover .card-img img { filter: grayscale(0); }
.card-body { padding: 26px 24px 30px; text-align: center; flex: 1; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.card-name { font-size: 1.25rem; font-weight: 600; letter-spacing: .03em; }
.card-tag { font-size: .9rem; color: #a8a8a8; line-height: 1.6; flex: 1; }
.card-btn { margin-top: 8px; border: 1px solid #4a4a4a; padding: 11px 30px; font-size: .74rem; font-weight: 600; letter-spacing: .16em; transition: background .3s, color .3s, border-color .3s; }
.card-btn:hover { background: #fff; color: var(--ink); border-color: #fff; }

/* ---------- speaker ---------- */
.speaker-inner { position: relative; text-align: center; padding: 120px 24px; }
.speaker-inner h2 { font-size: clamp(2.2rem, 5vw, 3.8rem); font-weight: 600; }
.speaker-note { margin-top: 1.2rem; font-size: 1.05rem; color: #d8d8d8; font-weight: 300; letter-spacing: .03em; max-width: 760px; margin-inline: auto; }

/* ---------- media ---------- */
.media { background: #050505; min-height: 70vh; justify-content: flex-start; padding: 100px 0 80px; }
.media-note { max-width: 620px; margin: 1rem auto 0; line-height: 1.9; color: #b9b9b9; font-weight: 300; }
.media-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; width: auto; margin: 10px 22px 0; }
.m-item { overflow: hidden; border: 1px solid #232323; background: #101010; }
.m-item video, .m-item img { width: 100%; aspect-ratio: 4/5; object-fit: cover; display: block; filter: grayscale(1); transition: filter .5s; }
.m-item:hover video, .m-item:hover img { filter: grayscale(0); }
.m-item figcaption { padding: 14px 16px; font-size: .82rem; letter-spacing: .1em; color: #b9b9b9; text-transform: uppercase; text-align: center; position: relative; z-index: 2; background: #101010; }
[dir=rtl] .m-item figcaption { letter-spacing: 0 !important; }
@media (max-width: 1100px) { .media-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .media-grid { grid-template-columns: 1fr; max-width: 420px; width: calc(100% - 44px); margin: 10px auto 0; } }

/* ---------- connect ---------- */
.connect { min-height: 90vh; text-align: center; }
.connect-inner { position: relative; padding: 110px 24px 60px; display: flex; flex-direction: column; align-items: center; gap: 1.1rem; }
.connect-title { font-size: clamp(2.4rem, 5.5vw, 4.2rem); font-weight: 600; }
.connect-note { color: #cfcfcf; font-weight: 300; max-width: 520px; line-height: 1.8; }
.connect-socials { display: flex; gap: 26px; margin: 1.2rem 0 2.4rem; }
.connect-socials a { width: 54px; height: 54px; border: 1px solid rgba(255,255,255,.55); border-radius: 50%; display: flex; align-items: center; justify-content: center; transition: background .3s, transform .3s; }
.connect-socials a:hover { background: rgba(255,255,255,.14); transform: translateY(-4px); }
.connect-socials svg { width: 22px; height: 22px; fill: #fff; }
.connect-name-ar { font-family: var(--font-ar); font-weight: 800; font-size: clamp(1.7rem, 3.6vw, 2.8rem); }
.connect-name-en { font-weight: 600; letter-spacing: .14em; font-size: clamp(1rem, 2.2vw, 1.5rem); }
.copyright { margin-top: 2.2rem; font-size: .78rem; color: #8f8f8f; letter-spacing: .06em; }
.credit { font-size: .78rem; color: var(--tan); letter-spacing: .08em; }
.credit:hover { text-decoration: underline; }

/* ---------- reveal animation ---------- */
.rv { opacity: 0; transform: translateY(34px); transition: opacity .8s ease, transform .8s ease; }
.rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rv { opacity: 1; transform: none; transition: none; }
  .chev { animation: none; }
  * { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* ---------- about tagline + paragraphs ---------- */
.about-tagline { font-size: clamp(1.4rem, 2.6vw, 2.2rem); font-weight: 500; color: var(--tan); margin-bottom: 2.2rem; }
.about-paras p + p { margin-top: 1.5rem; }

/* ---------- method accordion ---------- */
.method { background: var(--paper); color: var(--ink); justify-content: flex-start; padding: 100px 0 80px; }
.method .sec-head h2 { color: var(--ink); }
.method .sec-head p { color: #6b6b6b; }
.method-intro { max-width: 760px; margin: 1.1rem auto 0; color: #4a4a4a !important; font-size: 1.02rem; line-height: 1.9; letter-spacing: 0 !important; }
.acc { max-width: 900px; width: 92%; margin: 0 auto; }
.acc-item { border-bottom: 1px solid #d8d4cc; }
.acc-item:first-child { border-top: 1px solid #d8d4cc; }
.acc-head { width: 100%; background: none; border: 0; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 26px 6px; font-family: inherit; text-align: start; }
.acc-title { font-size: clamp(1.1rem, 2.2vw, 1.5rem); font-weight: 600; color: var(--ink); transition: color .3s; }
.acc-head:hover .acc-title { color: #8a5a2b; }
.acc-ico { position: relative; flex: 0 0 18px; width: 18px; height: 18px; }
.acc-ico::before, .acc-ico::after { content: ""; position: absolute; background: #8a5a2b; transition: transform .4s; }
.acc-ico::before { left: 0; top: 8px; width: 18px; height: 2px; }
.acc-ico::after { left: 8px; top: 0; width: 2px; height: 18px; }
.acc-item.open .acc-ico::after { transform: scaleY(0); }
.acc-body { max-height: 0; overflow: hidden; transition: max-height .55s ease; }
.acc-body p { padding: 0 6px 32px; line-height: 2.05; color: #2a2a2a; font-size: 1.04rem; font-weight: 300; max-width: 780px; }

/* ---------- language switch ---------- */
.lang-switch { position: fixed; top: 20px; inset-inline-end: 26px; z-index: 70; font-size: .8rem; font-weight: 600; letter-spacing: .1em; border: 1px solid rgba(255,255,255,.55); padding: 7px 17px; border-radius: 999px; color: #fff; mix-blend-mode: difference; transition: transform .3s; }
.lang-switch:hover { transform: scale(1.06); }

/* ---------- RTL ---------- */
[dir=rtl] body { font-family: var(--font-ar); }
[dir=rtl] * { letter-spacing: 0 !important; }
[dir=rtl] .hero-name-en, [dir=rtl] .connect-name-en { letter-spacing: .14em !important; }
[dir=rtl] .dots { right: auto; left: 26px; align-items: flex-start; }
[dir=rtl] .dots .lbl { right: auto; left: 24px; transform: translate(-6px, -50%); }
[dir=rtl] .dots a.on .lbl, [dir=rtl] .dots a:hover .lbl { transform: translate(0, -50%); }
[dir=rtl] .rail { left: auto; right: 30px; }
[dir=rtl] .doc-kicker { font-weight: 700; }
@media (max-width: 920px) {
  [dir=rtl] .dots { left: 12px; }
  [dir=rtl] .rail { right: 14px; }
}

/* ---------- responsive ---------- */
@media (max-width: 920px) {
  .rail { left: 14px; gap: 18px; }
  .rail svg { width: 17px; height: 17px; }
  .dots { right: 12px; gap: 13px; }
  .dots .dot { width: 9px; height: 9px; }
  .dots .lbl { display: none; }
  .doc-grid { grid-template-columns: 1fr; text-align: center; padding: 70px 40px 30px; gap: 1rem; width: 100%; }
  .doc-p { margin: 0 auto; }
  .doc-photo img { max-height: 44vh; }
  .cards { grid-template-columns: 1fr; max-width: 480px; }
  .panel { min-height: auto; padding: 60px 0; }
  .hero { min-height: 100vh; padding: 0; }
  .about-inner, .speaker-inner, .connect-inner { padding-left: 54px; padding-right: 44px; }
  .method { padding: 70px 0 56px; }
  .vision-grid { grid-template-columns: 1fr; min-height: 0; }
  .vision-text { padding: 20px 44px 0; }
  .vision-photo { min-height: 0; height: 58vh; margin-top: 42px; }
  .acc { padding-inline-start: 54px; padding-inline-end: 24px; }
  .acc-head { padding: 20px 4px; }
  .lang-switch { top: 14px; inset-inline-end: 14px; padding: 6px 14px; }
}

/* ---------- entrepreneur video panels ---------- */
.entre .cards { gap: 0; max-width: 100%; width: 100%; }
.card.vpanel { position: relative; border: none; border-right: 1px solid rgba(255,255,255,.08); background: #000; }
[dir=rtl] .card.vpanel { border-right: none; border-left: 1px solid rgba(255,255,255,.08); }
.card.vpanel:hover { transform: none; border-color: rgba(255,255,255,.08); }
.card.vpanel > video, .card.vpanel > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.06); }
.vp-shade { position: absolute; inset: 0; background: rgba(0,0,0,.52); transition: background .4s; }
.card.vpanel:hover .vp-shade { background: rgba(0,0,0,.32); }
.vp-body { position: relative; z-index: 1; min-height: inherit; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; padding: 40px 26px; }
.vp-body .card-name { font-size: clamp(1.4rem, 2.2vw, 2rem); }
.vp-body .card-tag { color: #d9d9d9; flex: none; }
.vp-body .card-btn { border-color: rgba(255,255,255,.65); color: #fff; }
.vp-body .card-btn:hover { background: #fff; color: var(--ink); }

/* speaker pinned background (desktop) */
@media (min-width: 921px) {
  .speaker .panel-bg, .hero .panel-bg, .connect .panel-bg { background-attachment: fixed; }
  /* doctor + ambitions: cutout becomes a fixed-attachment layer (same feel as speaker), img keeps layout space only */
  .doctor { background: var(--paper) url("../assets/img/doctor-coat.webp") no-repeat fixed right 10% bottom / auto 76%; }
  [dir=rtl] .doctor { background-position: left 10% bottom; }
  .vision { background: #0d0d0d url("../assets/img/vision.webp") no-repeat fixed right 5% bottom / auto 80%; }
  [dir=rtl] .vision { background-position: left 5% bottom; }
  .doc-photo img, .vision-photo img { visibility: hidden; }
}

/* connect footer: raise background so the face shows */
#speakerBg { background-position: center 15%; }

@media (max-width: 920px) {
  .card.vpanel { border-right: none; border-bottom: 1px solid rgba(255,255,255,.08); }
  [dir=rtl] .card.vpanel { border-left: none; }
}

/* ---------- brand lockup (ABtalks-style) ---------- */
.brand-lockup { font-weight: 800; font-size: clamp(2.6rem, 6vw, 4.6rem); line-height: 1.15; display: inline-block; position: relative; padding-bottom: 18px; }
.brand-lockup .bl-pre { color: #e01b2f; margin-inline-end: .15em; }
.brand-lockup .bl-name { color: #fff; }
.brand-lockup::after { content: ""; position: absolute; bottom: 0; inset-inline-start: 8%; width: 84%; height: 5px; background: #e01b2f; border-radius: 3px; }
