/* ============================================================
   AHMED EL MASRY — Art Director / AI Filmmaker
   Style: NOIR black & white — bold uppercase type with a
   white→black gradient, image-1 intro gate, image-2 hero with
   moving cinematic bokeh, left rail nav, heavy motion.
   ============================================================ */

:root {
  --bg:      #08080b;
  --bg-2:    #101014;
  --ink:     #f3f4f7;
  --muted:   #8a8a92;
  --faint:   #2b2b32;
  --accent:    #ffffff;   /* monochrome accent — active blocks / buttons */
  --accent-hi: #ffffff;
  --accent-deep:#14141a;  /* deep — mobile menu / dark blocks */
  --line:    rgba(243,244,247,0.12);

  --rail: 70px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  /* title gradient — white with a very slight grey fall-off */
  --title-grad: linear-gradient(180deg, #ffffff 0%, #f1f1f3 55%, #d3d3d8 100%);
}

* { -webkit-font-smoothing: antialiased; box-sizing: border-box; }
html { scroll-behavior: smooth; background:var(--bg); }
@media (prefers-reduced-motion: reduce){ html{ scroll-behavior:auto; } }

/* body is transparent so the fixed .site-bg (cinema image + bokeh) shows behind all content */
body { margin:0; background:transparent; color:var(--ink);
  font-family:'Inter',system-ui,sans-serif; font-weight:400; line-height:1.55; overflow-x:clip; }
::selection { background: var(--accent); color:var(--bg); }
img { display:block; max-width:100%; }
a { color:inherit; text-decoration:none; }

.display { font-family:'Archivo','Arial Narrow',sans-serif; font-weight:900; text-transform:uppercase; letter-spacing:-.02em; line-height:.86; }
.wrap { padding-left: clamp(1.25rem,5vw,4rem); padding-right: clamp(1.25rem,5vw,4rem); }
@media (min-width:901px){ body{ padding-left: var(--rail); } }

/* white→black gradient text helper */
.grad-text { background:var(--title-grad); -webkit-background-clip:text; background-clip:text; color:transparent; }

/* custom cursor hides the native one on fine-pointer devices */
@media (hover:hover) and (pointer:fine){ body.has-cursor, body.has-cursor *{ cursor:none !important; } }

/* ---- Film grain (whole site) + vignette ---- */
.grain { position:fixed; inset:0; z-index:85; pointer-events:none; opacity:0.13; mix-blend-mode:overlay;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.vignette { position:fixed; inset:0; z-index:84; pointer-events:none;
  background: radial-gradient(125% 100% at 50% 42%, transparent 58%, rgba(0,0,0,0.55) 100%); }

/* ---- Whole-site fixed background: cinema image (B&W) + moving bokeh ---- */
.site-bg { position:fixed; inset:0; z-index:-1; overflow:hidden; background:var(--bg); }
.site-bg__img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; filter:grayscale(1) contrast(1.14) brightness(.3); }
.site-bg__scrim { position:absolute; inset:0; background:linear-gradient(180deg, rgba(8,8,11,.5), rgba(8,8,11,.74)); }
#bokehCanvas { position:absolute; inset:0; width:100%; height:100%; mix-blend-mode:screen; opacity:.9; pointer-events:none; }
@media (prefers-reduced-motion: no-preference){ .grain{ animation: gshift .42s steps(3) infinite; } }
@keyframes gshift { 0%{transform:translate(0,0)} 33%{transform:translate(-3%,2%)} 66%{transform:translate(2%,-2%)} 100%{transform:translate(-1%,2%)} }

/* ============================ INTRO GATE (image 1 — click to enter) ============================ */
.intro-gate { position:fixed; inset:0; z-index:120; background:#000; display:flex; align-items:center; justify-content:center;
  opacity:0; visibility:hidden; perspective:1300px; overflow:hidden; }
.intro-gate.active { opacity:1; visibility:visible; transition: opacity .6s var(--ease); }
.intro-gate.exit { opacity:0; visibility:hidden; transition: opacity .9s var(--ease); }
.intro-gate__img { position:absolute; inset:0; transform-style:preserve-3d; transition:transform .4s ease-out; will-change:transform; }
.intro-gate__img img { width:100%; height:100%; object-fit:cover; opacity:.16;
  filter:grayscale(1) contrast(1.06) brightness(.95); transform-origin:50% 50%; will-change:transform,filter,opacity;
  transition: opacity .85s var(--ease); animation: introZoom 20s ease-in-out infinite alternate, projFlicker 5.5s ease-in-out infinite; }
.intro-gate.revealed .intro-gate__img img { opacity:1; }
@keyframes introZoom { from { transform:scale(1.04); } to { transform:scale(1.10); } }
@keyframes projFlicker {
  0%,100% { filter:grayscale(1) contrast(1.06) brightness(.95); }
  6%      { filter:grayscale(1) contrast(1.08) brightness(1.03); }
  9%      { filter:grayscale(1) contrast(1.05) brightness(.88); }
  13%     { filter:grayscale(1) contrast(1.07) brightness(.99); }
  48%     { filter:grayscale(1) contrast(1.06) brightness(.92); }
  52%     { filter:grayscale(1) contrast(1.08) brightness(1.01); }
}
/* flickering projector light beam (top-left → centre) */
.intro-gate__beam { position:absolute; inset:-6%; z-index:1; pointer-events:none; mix-blend-mode:screen;
  background: radial-gradient(48% 42% at 31% 30%, rgba(255,255,255,.14), rgba(255,255,255,.04) 45%, transparent 72%);
  animation: beamPulse 4.5s ease-in-out infinite; transition:transform .5s ease-out; will-change:transform,opacity; }
@keyframes beamPulse { 0%,100% { opacity:.45; } 28% { opacity:.85; } 52% { opacity:.6; } 76% { opacity:.95; } }
.intro-gate__overlay { position:absolute; inset:0; background: radial-gradient(120% 120% at 50% 46%, transparent 60%, rgba(0,0,0,.5) 100%); }
.intro-gate__enter { position:absolute; left:50%; top:57%; transform:translate(-50%,-50%); z-index:2;
  background:none; border:0; cursor:pointer; color:#fff; display:flex; flex-direction:column; align-items:center; gap:1rem; }
.intro-gate__cue { font-family:'Archivo',sans-serif; font-weight:800; letter-spacing:.3em; text-transform:uppercase; font-size:.68rem;
  color:rgba(255,255,255,.72); border:1px solid rgba(255,255,255,.32); padding:.75rem 1.5rem; border-radius:999px;
  transition: background .25s var(--ease), color .25s var(--ease); }
.intro-gate__enter:hover .intro-gate__cue, .intro-gate__enter:focus-visible .intro-gate__cue { background:#fff; color:#000; }
@media (prefers-reduced-motion: reduce){
  .intro-gate__img img{ opacity:1; transform:none; animation:none; }
  .intro-gate__beam{ animation:none; opacity:.5; }
  .intro-gate, .intro-gate.active, .intro-gate.exit, .intro-gate__img, .intro-gate__img img{ transition:none; }
}

/* dark-grey loading panel — sweeps up from the bottom to cover, then off the top to reveal the hero */
.intro-loader { position:fixed; inset:0; z-index:125; background:#000;
  transform:translateY(100%); will-change:transform; display:flex; align-items:center; justify-content:center; }
.intro-loader.cover { transform:translateY(0);     transition:transform .42s cubic-bezier(.76,0,.24,1); }
.intro-loader.away  { transform:translateY(-100%); transition:transform .37s cubic-bezier(.76,0,.24,1); }
.intro-loader__label { font-family:'Archivo',sans-serif; font-weight:800; letter-spacing:.4em; text-transform:uppercase;
  font-size:.7rem; color:#6c6c74; opacity:0; }
.intro-loader.cover .intro-loader__label { opacity:1; transition:opacity .3s ease .18s; }
.intro-loader.away  .intro-loader__label { opacity:0; transition:opacity .2s ease; }
@media (prefers-reduced-motion: reduce){ .intro-loader{ display:none!important; } }

/* ============================ CUSTOM CURSOR ============================ */
.cursor { position:fixed; top:0; left:0; z-index:130; pointer-events:none; mix-blend-mode:difference;
  width:10px; height:10px; border-radius:999px; background:#fff; transform:translate(-50%,-50%);
  transition: width .25s var(--ease), height .25s var(--ease); will-change:transform; }
.cursor.is-hover { width:46px; height:46px; }
@media (hover:none),(pointer:coarse){ .cursor{ display:none; } }
@media (prefers-reduced-motion: reduce){ .cursor{ display:none; } }

/* ============================ SIDE RAIL ============================ */
.rail { position:fixed; top:0; left:0; bottom:0; width:var(--rail); z-index:70;
  display:flex; flex-direction:column; align-items:center; justify-content:space-between;
  padding:1.25rem 0; border-right:1px solid var(--line); background:var(--bg); }
.rail__brand { display:grid; place-items:center; width:100%; line-height:0; }
.rail__brand img { width:65px; height:65px; max-width:none; object-fit:contain; display:block; }
.rail__links { display:flex; flex-direction:column; gap:.25rem; align-items:center; }
.rail__link { writing-mode:vertical-rl; transform:rotate(180deg);
  font-family:'Archivo',sans-serif; font-weight:800; font-size:.72rem; letter-spacing:.2em; text-transform:uppercase;
  color:var(--muted); padding:.75rem .25rem; transition:color .25s var(--ease), background .25s var(--ease); }
.rail__link:hover { color:var(--ink); }
.rail__link.is-active { background:var(--accent); color:var(--bg); }
.rail__dot { width:8px; height:8px; border-radius:999px; background:var(--accent); }
@media (max-width:900px){ .rail{ display:none; } }

/* ---- Mobile top bar ---- */
.topbar { display:none; }
@media (max-width:900px){
  .topbar { display:flex; position:fixed; top:0; left:0; right:0; z-index:71; align-items:center; justify-content:space-between;
    padding:.9rem 1.25rem; background:rgba(8,8,11,.72); backdrop-filter:blur(10px); border-bottom:1px solid var(--line); }
  .topbar__brand { display:flex; align-items:center; line-height:0; }
  .topbar__brand img { width:40px; height:40px; max-width:none; object-fit:contain; display:block; }
  .menu-btn { font-family:'Archivo',sans-serif; font-weight:800; font-size:.8rem; letter-spacing:.16em; text-transform:uppercase;
    background:var(--accent); color:var(--bg); border:0; padding:.5rem .9rem; cursor:pointer; }
}
.mobile-menu { position:fixed; inset:0; z-index:75; background:var(--accent-deep); display:flex; flex-direction:column; justify-content:center; padding:2rem;
  transform:translateY(-100%); transition:transform .5s var(--ease); }
.mobile-menu.open { transform:translateY(0); }
.mobile-menu a { font-family:'Archivo',sans-serif; font-weight:900; text-transform:uppercase; font-size:clamp(2.5rem,12vw,4.5rem); line-height:1.05; letter-spacing:-.02em; padding:.4rem 0; color:#fff; }
.mobile-menu a:hover { color:var(--muted); }
.mobile-menu__close { position:absolute; top:1rem; right:1.25rem; background:#fff; color:#000; border:0; padding:.5rem .9rem;
  font-family:'Archivo',sans-serif; font-weight:800; letter-spacing:.12em; cursor:pointer; }

/* ============================ HERO (scroll-expansion, B&W video) ============================ */
.hero { position:relative; height:200vh; background:var(--bg); }
@media (max-width:900px){ .hero{ height:180vh; } }
.hero__pin { position:relative; height:100vh; width:100%; overflow:hidden; background:var(--bg); }
/* hero banner sits on the B&W bokeh plate (covers the site-bg cinema image here) */
.hero__bg { position:absolute; inset:0; z-index:0; will-change:opacity;
  background: radial-gradient(120% 95% at 50% 30%, #15151d 0%, #0c0c12 50%, #08080b 100%); }
.hero__bg-img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; filter:grayscale(1) contrast(1.08) brightness(.8); }
.hero__media { position:absolute; top:50%; left:50%; transform:translate(-50%,-50%); z-index:1;
  width:62vw; height:46vh; max-width:99vw; max-height:94vh; overflow:hidden; border-radius:14px;
  box-shadow:0 40px 100px rgba(0,0,0,.6); will-change:width,height; }
.hero__media video { width:100%; height:100%; object-fit:cover; display:block; filter:grayscale(1) contrast(1.08) brightness(1.02); }
.hero__media-scrim { position:absolute; inset:0; background:#000; opacity:.35; pointer-events:none; }
/* name + subtitle sit ABOVE the video (position/fade driven in applyHero) */
.hero__head { position:absolute; left:50%; bottom:58%; z-index:3; transform:translateX(-50%);
  text-align:center; width:max-content; max-width:96vw; pointer-events:none; will-change:transform,opacity,bottom; }
.hero__name { margin:0; font-family:'Archivo',sans-serif; font-weight:900; text-transform:uppercase; letter-spacing:-.02em; line-height:.92;
  font-size:clamp(2rem,7vw,6rem); white-space:nowrap;
  background:var(--title-grad); -webkit-background-clip:text; background-clip:text; color:transparent;
  filter: drop-shadow(0 6px 34px rgba(0,0,0,.55)); }
.hero__subtitle { margin:.7rem 0 0; font-family:'Inter',sans-serif; font-weight:300; letter-spacing:.3em; text-transform:uppercase;
  font-size:clamp(.68rem,1.2vw,.92rem);
  background:var(--title-grad); -webkit-background-clip:text; background-clip:text; color:transparent; }
.hero__role { position:absolute; z-index:3; left:clamp(1.25rem,5vw,3rem); bottom:clamp(2rem,7vh,4rem);
  font-family:'Archivo',sans-serif; font-weight:800; letter-spacing:.16em; text-transform:uppercase;
  font-size:clamp(.75rem,1.5vw,1rem); color:var(--ink); text-shadow:0 1px 16px rgba(0,0,0,.7); }
.hero__cue { position:absolute; z-index:3; left:50%; bottom:clamp(1.4rem,4vh,2.4rem); transform:translateX(-50%);
  display:inline-flex; align-items:center; gap:.6rem; font-family:'Archivo',sans-serif; font-weight:800;
  letter-spacing:.2em; text-transform:uppercase; font-size:.68rem; color:var(--muted); white-space:nowrap; }
.hero__cue-dot { width:6px; height:6px; border-radius:50%; background:var(--accent); }
@media (prefers-reduced-motion: no-preference){ .hero__cue-dot{ animation: cuepulse 1.8s ease-in-out infinite; } }
@keyframes cuepulse { 0%,100%{ transform:scale(.7); opacity:.5 } 50%{ transform:scale(1); opacity:1 } }
.visually-hidden { position:absolute!important; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; border:0; padding:0; margin:-1px; }

/* ---- Intro band (tagline + CTA) ---- */
.intro { padding-top: clamp(3rem,8vh,6rem); padding-bottom: clamp(1.5rem,4vh,3rem); display:grid; gap:2rem; }
@media (min-width:901px){ .intro{ grid-template-columns:1.5fr 1fr; align-items:end; } }
.intro__tag { max-width:46ch; font-family:'Inter',sans-serif; font-weight:400; font-size:clamp(1.2rem,2.2vw,1.8rem); line-height:1.32; color:var(--ink); }
.intro__cta { display:flex; flex-wrap:wrap; gap:1rem; align-items:center; }
@media (min-width:901px){ .intro__cta{ justify-content:flex-end; } }

/* ---- Buttons ---- */
.btn { display:inline-flex; align-items:center; gap:.7rem; font-family:'Archivo',sans-serif; font-weight:800;
  text-transform:uppercase; letter-spacing:.08em; font-size:.82rem; padding:1rem 1.6rem; cursor:pointer; border:1px solid transparent;
  transition:background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease); }
.btn--solid { background:var(--accent); color:var(--bg); }
.btn--solid:hover { background:transparent; color:var(--ink); border-color:var(--ink); }
.btn--out { border-color:var(--line); color:var(--ink); background:transparent; }
.btn--out:hover { border-color:var(--ink); background:var(--ink); color:var(--bg); }

/* ---- Section ---- */
.sec { padding-top:clamp(4rem,12vh,9rem); padding-bottom:clamp(4rem,12vh,9rem); }
.sec__tag { display:flex; align-items:center; gap:.8rem; color:var(--muted); font-family:'Archivo',sans-serif; font-weight:800;
  letter-spacing:.22em; text-transform:uppercase; font-size:.72rem; margin-bottom:1.5rem; }
.sec__tag::before { content:""; width:34px; height:2px; background:var(--ink); }
.sec__title { font-family:'Archivo',sans-serif; font-weight:900; text-transform:uppercase; letter-spacing:-.02em; line-height:.88; font-size:clamp(2.6rem,9vw,7rem);
  background:var(--title-grad); -webkit-background-clip:text; background-clip:text; color:transparent; }

/* mask reveal for big titles */
.mask { overflow:hidden; }
.mask > * { display:block; transform:translateY(105%); }
.mask.in > * { transform:translateY(0); transition:transform 1s var(--ease); }
@media (prefers-reduced-motion: reduce){ .mask > *{ transform:none!important; } }

/* ============================ WORK ============================ */
.work-layout { display:grid; gap:clamp(2rem,4vw,4rem); grid-template-columns:1fr; }
@media (min-width:901px){ .work-layout{ grid-template-columns:1.05fr 0.95fr; align-items:start; } }
.work-list { display:flex; flex-direction:column; }
.work-item { position:relative; border-top:1px solid var(--line); padding:clamp(1rem,2.2vw,1.8rem) 0; cursor:pointer;
  display:flex; flex-direction:column; gap:.75rem; text-align:left; background:none; border-left:0; border-right:0; border-bottom:0; width:100%; }
.work-list .work-item:last-child { border-bottom:1px solid var(--line); }
.work-item__title { font-family:'Archivo',sans-serif; font-weight:900; text-transform:uppercase; letter-spacing:-.01em; line-height:.95;
  font-size:clamp(2rem,6vw,4.2rem); color:var(--ink); transition:color .25s var(--ease), transform .35s var(--ease); }
.work-item__meta { font-family:'Archivo',sans-serif; font-weight:700; letter-spacing:.12em; text-transform:uppercase; font-size:.72rem; color:var(--muted); }
.work-item__idx { position:absolute; top:clamp(1rem,2.2vw,1.8rem); right:0; font-family:'Archivo',sans-serif; font-weight:800; font-size:.72rem; color:var(--faint); }
.work-item:hover .work-item__title, .work-item.is-active .work-item__title { color:#fff; }
/* per-film hover colours (only while the cursor is over the name) */
.work-item[data-i="0"]:hover .work-item__title { color:#FFD23F; }  /* yellow     */
.work-item[data-i="1"]:hover .work-item__title { color:#A66CFF; }  /* purple     */
.work-item[data-i="2"]:hover .work-item__title { color:#B23A48; }  /* maroon     */
.work-item[data-i="3"]:hover .work-item__title { color:#FF6FB5; }  /* pink       */
.work-item[data-i="4"]:hover .work-item__title { color:#8FD0FF; }  /* baby blue  */
.work-item[data-i="5"]:hover .work-item__title { color:#B5763C; }  /* brown      */
@media (min-width:901px){
  .work-item:hover .work-item__title, .work-item.is-active .work-item__title { transform:translateX(1.5rem); }
  .work-item:hover .work-item__meta, .work-item.is-active .work-item__meta { color:var(--ink); }
}
.work-item__thumb { display:none; }
@media (max-width:900px){
  .work-item__thumb { display:block; aspect-ratio:16/10; overflow:hidden; }
  .work-item__thumb img { width:100%; height:100%; object-fit:cover; filter:contrast(1.03) saturate(1.05) brightness(.92); }
}
.work-panel { display:none; }
@media (min-width:901px){
  .work-panel { display:block; position:sticky; top:8vh; height:78vh; overflow:hidden; background:var(--bg-2); }
  .work-panel__img { position:absolute; inset:0; opacity:0; transition:opacity .5s var(--ease); }
  .work-panel__img img { width:100%; height:100%; object-fit:cover; filter:contrast(1.04) saturate(1.06) brightness(.96); }
  .work-panel__img.is-active { opacity:1; }
  .work-panel__play { position:absolute; bottom:1.5rem; right:1.5rem; z-index:3; width:64px; height:64px; border-radius:999px;
    background:var(--accent); color:var(--bg); display:grid; place-items:center; opacity:0; transform:scale(.9); transition:opacity .4s var(--ease), transform .4s var(--ease); cursor:pointer; }
  .work-panel:hover .work-panel__play { opacity:1; transform:scale(1); }
  .work-panel__cap { position:absolute; left:0; right:0; bottom:0; z-index:3; padding:3rem 1.5rem 1.5rem;
    background:linear-gradient(to top, rgba(8,8,11,.92), rgba(8,8,11,.55) 55%, transparent); }
  .work-panel__cap h3 { font-family:'Archivo',sans-serif; font-weight:900; text-transform:uppercase; font-size:1.6rem; letter-spacing:-.01em; text-shadow:0 1px 14px rgba(0,0,0,.6); }
  .work-panel__desc { margin:.45rem 0 0; font-family:'Inter',sans-serif; font-weight:400; text-transform:none; letter-spacing:0;
    font-size:.95rem; line-height:1.4; color:rgba(243,244,247,.82); max-width:42ch; text-shadow:0 1px 12px rgba(0,0,0,.6); }
}

/* ============================ MARQUEE ============================ */
.marquee { overflow:hidden; white-space:nowrap; border-top:1px solid var(--line); border-bottom:1px solid var(--line); padding:1.5rem 0; }
.marquee__track { display:inline-block; will-change:transform; }
.marquee__track span { font-family:'Archivo',sans-serif; font-weight:900; text-transform:uppercase; letter-spacing:-.01em; font-size:clamp(1.4rem,3vw,2.6rem); padding:0 1.5rem; color:var(--faint); }
.marquee__track .hl { color:var(--ink); }
@media (prefers-reduced-motion:no-preference){ .marquee__track{ animation:mq 30s linear infinite; } }
@keyframes mq { from{transform:translateX(0)} to{transform:translateX(-50%)} }

/* ============================ ABOUT ============================ */
.about-grid { display:grid; gap:clamp(2rem,4vw,4rem); grid-template-columns:1fr; align-items:center; }
@media (min-width:901px){ .about-grid{ grid-template-columns:0.8fr 1.2fr; } }
.about-portrait { aspect-ratio:4/5; overflow:hidden; background:var(--bg-2); }
.about-portrait img { width:100%; height:100%; object-fit:cover; filter:grayscale(1) contrast(1.05) brightness(.95); }
.about-statement { font-family:'Archivo',sans-serif; font-weight:800; text-transform:uppercase; font-size:clamp(1.5rem,3.2vw,2.7rem); line-height:1.06; letter-spacing:-.01em; }
.about-statement .em { color:#fff; }
.stats { display:grid; grid-template-columns:repeat(3,1fr); gap:1.5rem; margin-top:2.5rem; padding-top:2.5rem; border-top:1px solid var(--line); }
.stats .n { font-family:'Archivo',sans-serif; font-weight:900; font-size:clamp(2rem,4vw,3.4rem); color:#fff; letter-spacing:-.02em; }
.stats .l { font-family:'Archivo',sans-serif; font-weight:700; letter-spacing:.12em; text-transform:uppercase; font-size:.68rem; color:var(--muted); margin-top:.3rem; }

/* ============================ CONTACT ============================ */
.contact { text-align:left; }
.contact__big { font-family:'Archivo',sans-serif; font-weight:900; text-transform:uppercase; letter-spacing:-.03em; line-height:.84; font-size:clamp(3rem,15vw,12rem); }
.contact__big a { color:#f6f6f4; -webkit-text-fill-color:#f6f6f4; text-shadow:0 6px 50px rgba(0,0,0,.6), 0 2px 6px rgba(0,0,0,.5); }
.contact__big a:hover { color:#fff; -webkit-text-fill-color:#fff; }
.contact__row { display:flex; flex-wrap:wrap; gap:2rem; margin-top:2.5rem; align-items:center; justify-content:space-between; }
.social { display:flex; gap:1.5rem; flex-wrap:wrap; }
.social a { font-family:'Archivo',sans-serif; font-weight:800; text-transform:uppercase; letter-spacing:.1em; font-size:.8rem; color:var(--muted); transition:color .25s var(--ease); }
.social a:hover { color:#fff; }

/* ============================ FOOTER ============================ */
.foot { border-top:1px solid var(--line); padding:2.5rem 0; display:flex; flex-wrap:wrap; gap:1rem; justify-content:space-between; align-items:center;
  font-family:'Archivo',sans-serif; font-weight:700; letter-spacing:.1em; text-transform:uppercase; font-size:.7rem; color:var(--muted); }

/* ============================ LIGHTBOX ============================ */
#lightbox { position:fixed; inset:0; z-index:90; display:none; place-items:center; background:rgba(4,4,6,.95); padding:1.25rem; }
#lightbox.open { display:grid; }
.lb-inner { width:min(1100px,100%); }
.lb-frame { position:relative; width:100%; aspect-ratio:16/9; overflow:hidden; background:#000; border:1px solid var(--line); }
.lb-frame iframe, .lb-frame video { position:absolute; inset:0; width:100%; height:100%; border:0; }
.lb-close { position:absolute; top:-2.8rem; right:0; background:var(--accent); color:var(--bg); border:0; padding:.5rem .9rem; cursor:pointer;
  font-family:'Archivo',sans-serif; font-weight:800; letter-spacing:.1em; text-transform:uppercase; font-size:.75rem; }
.lb-title { margin-top:1rem; font-family:'Archivo',sans-serif; font-weight:800; text-transform:uppercase; letter-spacing:.08em; font-size:.9rem; color:var(--ink); }
.lb-desc { font-family:'Inter',sans-serif; font-weight:400; text-transform:none; letter-spacing:0; color:var(--muted); font-size:.85rem; }

/* ============================ REVEAL ============================ */
.reveal { opacity:0; transform:translateY(30px); }
.reveal.in { opacity:1; transform:none; transition:opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.d1{ transition-delay:.08s } .reveal.d2{ transition-delay:.16s }
@media (prefers-reduced-motion: reduce){ .reveal{ opacity:1!important; transform:none!important; } }

a:focus-visible, button:focus-visible { outline:2px solid var(--accent); outline-offset:3px; }

/* ============================ ABOUT — re-triggering fade-up + counters ============================ */
.about-anim { opacity:0; transform:translateY(44px);
  transition: opacity 1s var(--ease) var(--d,0s), transform 1s var(--ease) var(--d,0s); will-change:opacity,transform; }
#about.in-view .about-anim { opacity:1; transform:none; }
@media (prefers-reduced-motion: reduce){ .about-anim{ opacity:1; transform:none; } }
.stats .n { font-variant-numeric: tabular-nums; }

/* ============================ CONTACT — B&W image + grain + Hire Me ============================ */
.contact { position:relative; overflow:hidden; background:var(--bg); }
.contact__bg { position:absolute; inset:0; z-index:0; }
.contact__bg img { width:100%; height:100%; object-fit:cover; filter:grayscale(1) contrast(1.12) brightness(.62); }
.contact__grain { position:absolute; inset:0; pointer-events:none; opacity:.22; mix-blend-mode:overlay;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='130' height='130'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
@media (prefers-reduced-motion: no-preference){ .contact__grain{ animation: gshift .42s steps(3) infinite; } }
.contact__scrim { position:absolute; inset:0;
  background:linear-gradient(180deg, rgba(8,8,11,.55) 0%, rgba(8,8,11,.4) 38%, rgba(8,8,11,.82) 100%); }
.contact__inner { position:relative; z-index:1; }

/* ============================ CINEMATIC FOOTER ============================ */
.cfooter { position:relative; overflow:hidden; isolation:isolate; background:var(--bg); color:var(--ink);
  min-height:94vh; display:flex; flex-direction:column; justify-content:space-between; padding:0 0 2rem; }
.cfooter__aurora { position:absolute; left:50%; top:52%; width:80vw; height:60vh; transform:translate(-50%,-50%);
  background:radial-gradient(circle at 50% 50%, rgba(255,255,255,.07) 0%, rgba(150,150,165,.05) 40%, transparent 70%);
  filter:blur(80px); border-radius:50%; pointer-events:none; z-index:0; }
@media (prefers-reduced-motion: no-preference){ .cfooter__aurora{ animation: cfBreathe 8s ease-in-out infinite alternate; } }
@keyframes cfBreathe { 0%{ transform:translate(-50%,-50%) scale(1); opacity:.6 } 100%{ transform:translate(-50%,-50%) scale(1.12); opacity:1 } }
.cfooter__grid { position:absolute; inset:0; z-index:0; pointer-events:none; background-size:60px 60px;
  background-image:linear-gradient(to right, rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(to bottom, rgba(255,255,255,.035) 1px, transparent 1px);
  -webkit-mask-image:linear-gradient(to bottom, transparent, #000 30%, #000 70%, transparent);
  mask-image:linear-gradient(to bottom, transparent, #000 30%, #000 70%, transparent); }
.cfooter__giant { position:absolute; left:50%; bottom:-4vh; transform:translateX(-50%); z-index:0; pointer-events:none; user-select:none; white-space:nowrap;
  font-family:'Archivo',sans-serif; font-weight:900; font-size:26vw; line-height:.75; letter-spacing:-.05em; color:transparent;
  -webkit-text-stroke:1px rgba(255,255,255,.06);
  background:linear-gradient(180deg, rgba(255,255,255,.10) 0%, transparent 60%); -webkit-background-clip:text; background-clip:text; }
.cfooter__marquee { position:absolute; top:7%; left:-4%; width:108%; overflow:hidden; z-index:2;
  border-top:1px solid var(--line); border-bottom:1px solid var(--line); background:rgba(8,8,11,.6); backdrop-filter:blur(8px);
  padding:.9rem 0; transform:rotate(-2deg); box-shadow:0 24px 60px rgba(0,0,0,.55); }
.cfooter__marquee-track { display:flex; width:max-content; align-items:center; font-family:'Archivo',sans-serif; font-weight:800;
  font-size:.78rem; letter-spacing:.3em; text-transform:uppercase; color:var(--muted); }
.cfooter__marquee-track span { padding:0 1.4rem; }
.cfooter__marquee-track i { color:var(--ink); font-style:normal; }
@media (prefers-reduced-motion: no-preference){ .cfooter__marquee-track{ animation: cfMarquee 42s linear infinite; } }
@keyframes cfMarquee { from{ transform:translateX(0) } to{ transform:translateX(-50%) } }
.cfooter__main { position:relative; z-index:3; flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center;
  text-align:center; padding:9rem 1.5rem 2rem; max-width:1100px; margin:0 auto; width:100%; }
.cfooter__heading { font-family:'Archivo',sans-serif; font-weight:900; letter-spacing:-.03em; line-height:.98; font-size:clamp(2.2rem,6.5vw,5rem); margin:0 0 2.6rem;
  background:linear-gradient(180deg, var(--ink) 0%, rgba(243,244,247,.4) 100%); -webkit-background-clip:text; background-clip:text; -webkit-text-fill-color:transparent;
  filter:drop-shadow(0 0 22px rgba(255,255,255,.12)); }
.cfooter__pills { display:flex; flex-wrap:wrap; justify-content:center; gap:1rem; }
.cpill { display:inline-flex; align-items:center; gap:.6rem; padding:.95rem 1.9rem; border-radius:999px; cursor:pointer;
  font-family:'Archivo',sans-serif; font-weight:800; text-transform:uppercase; letter-spacing:.1em; font-size:.78rem; color:var(--muted);
  background:linear-gradient(145deg, rgba(255,255,255,.045), rgba(255,255,255,.012)); border:1px solid rgba(255,255,255,.09);
  box-shadow:0 10px 30px -10px rgba(0,0,0,.5), inset 0 1px 1px rgba(255,255,255,.08); backdrop-filter:blur(16px); -webkit-backdrop-filter:blur(16px);
  transition: background .4s var(--ease), border-color .4s var(--ease), color .25s var(--ease); will-change:transform; }
.cpill:hover { color:var(--ink); border-color:rgba(255,255,255,.22); background:linear-gradient(145deg, rgba(255,255,255,.10), rgba(255,255,255,.02)); }
.cpill--accent { color:var(--bg); background:var(--ink); border-color:var(--ink); }
.cpill--accent:hover { color:var(--bg); background:#fff; }
.cfooter__bottom { position:relative; z-index:3; display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:1.2rem;
  padding:0 clamp(1.25rem,5vw,3rem); }
.cfooter__copy { font-family:'Archivo',sans-serif; font-weight:700; letter-spacing:.16em; text-transform:uppercase; font-size:.62rem; color:var(--muted); }
.cpill--static { cursor:default; padding:.62rem 1.2rem; font-size:.6rem; letter-spacing:.12em; color:var(--muted); }
.cfooter__heart { color:#e5484d; display:inline-block; }
@media (prefers-reduced-motion: no-preference){ .cfooter__heart{ animation: cfHeart 2s cubic-bezier(.25,1,.5,1) infinite; } }
@keyframes cfHeart { 0%,100%{ transform:scale(1) } 15%,45%{ transform:scale(1.28) } 30%{ transform:scale(1) } }
.cpill--icon { padding:0; width:48px; height:48px; justify-content:center; color:var(--muted); }
.cpill--icon:hover svg { transform:translateY(-3px); }
.cpill--icon svg { transition:transform .3s var(--ease); }
@media (max-width:700px){ .cfooter__bottom{ justify-content:center; text-align:center; } .cfooter__marquee{ top:5%; } }

/* ============================================================
   MOBILE LOGO SIZE FIX — added for ahmedelmasry.com
   Keeps the mobile header compact and prevents the logo image
   from rendering huge on phones.
   ============================================================ */
@media (max-width: 900px) {
  .topbar {
    height: 72px !important;
    min-height: 72px !important;
    padding: 0 1.25rem !important;
    align-items: center !important;
    background: rgba(8,8,11,.78) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
  }

  .topbar__brand {
    width: 56px !important;
    height: 56px !important;
    flex: 0 0 56px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
  }

  .topbar__brand img,
  .topbar img[src*="logo"] {
    width: 56px !important;
    height: 56px !important;
    max-width: 56px !important;
    max-height: 56px !important;
    min-width: 0 !important;
    object-fit: contain !important;
    display: block !important;
  }

  .menu-btn {
    height: 44px !important;
    padding: 0 .95rem !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: .76rem !important;
    line-height: 1 !important;
  }

  main {
    padding-top: 72px;
  }

  .hero__pin {
    height: calc(100vh - 72px);
    min-height: 620px;
  }
}

@media (max-width: 420px) {
  .topbar__brand,
  .topbar__brand img,
  .topbar img[src*="logo"] {
    width: 50px !important;
    height: 50px !important;
    max-width: 50px !important;
    max-height: 50px !important;
    flex-basis: 50px !important;
  }
}
