/* Shared small-screen text flow, without changing content or project artwork. */
.site-shell main,.site-shell section,.section-head,.footer-col{min-width:0}
.site-shell h1,.site-shell h2,.site-shell h3{overflow-wrap:break-word}
.case-titlebar h3,.lang-ar .case-titlebar h3{font-family:"Montech",sans-serif!important;font-weight:400!important;letter-spacing:0!important;direction:ltr;text-align:left}
/* Preserve the shared current card treatment on touch devices too. */
@media(hover:none),(max-width:600px){
 .case-card .case-titlebar{transform:translateY(0);opacity:1;backdrop-filter:blur(3px) saturate(1.2)!important;-webkit-backdrop-filter:blur(3px) saturate(1.2)!important}
}
@media(max-width:600px){
 .section-head{flex-wrap:wrap;gap:16px}
 .section-head h2,.statement-line{font-size:36px!important;line-height:1.2!important;white-space:normal!important;letter-spacing:0!important}
 .page-hero h1,.about-hero h1,.resume-hero h1{font-size:48px!important;line-height:1.15!important;white-space:normal!important;letter-spacing:0!important}
 .work-page .page-hero h1{font-size:54px!important}
 .case-titlebar{transform:translateY(0);opacity:1}
 .footer a{overflow-wrap:anywhere}
 .brief-call.compact .bc-cta{white-space:normal;letter-spacing:0;max-width:100%}
 .modal-head{gap:12px;flex-wrap:wrap}
 .modal-head>div{min-width:0;max-width:100%}
 .pm-controls{gap:8px}
 .pm-arrow{min-width:0;max-width:44%;padding:8px}
 .pm-arrow-label{white-space:normal;line-height:1.3;letter-spacing:0}
 .quick-links{max-width:calc(100vw - 36px)}
}

/* Dark-only shared navigation and text flow. */
.theme-toggle{display:none!important}
.mobile-menu{background:var(--bg-2)!important;height:100dvh!important;max-height:100dvh!important;padding:calc(76px + env(safe-area-inset-top,0px)) 24px calc(24px + env(safe-area-inset-bottom,0px))!important;gap:4px!important;overflow-y:auto;overscroll-behavior:contain}
.mobile-menu>a{flex-shrink:0;font-family:"Montech",sans-serif!important;font-size:24px!important;font-weight:400!important;line-height:1.4!important;letter-spacing:0!important;text-transform:none!important;text-decoration:none;padding:10px 0!important;text-align:start;color:var(--text)!important;border-bottom:1px solid var(--line)!important;margin:0!important;background:transparent!important;border-radius:0!important;overflow-wrap:break-word}
.mobile-menu>a[href="/brief"]{margin-top:16px!important;padding:14px 20px!important;background:var(--accent)!important;color:var(--soft-text)!important;border:0!important;border-radius:8px!important;text-align:center;font-size:18px!important}
.lang-ar .mobile-menu>a{font-family:"IBM Plex Sans Arabic","Cairo",sans-serif!important;font-weight:500!important}
.mobile-menu .lang-switch{flex-shrink:0;justify-content:center;margin:20px 0 12px!important;padding:0!important;width:100%}
.mobile-menu .mm-socials{flex-shrink:0;display:flex;flex-wrap:wrap;justify-content:center;gap:12px!important;margin:12px 0 0!important}
.mobile-menu .mm-socials a{width:42px!important;height:42px!important;padding:0!important;margin:0!important;display:grid;place-items:center;background:var(--panel)!important;border:1px solid var(--line-2)!important;border-radius:50%!important}
.mobile-menu .mm-close{top:calc(14px + env(safe-area-inset-top,0px))}
.lang-ar .mobile-menu .mm-close{font-family:inherit!important}
@media(min-width:901px){.topbar{grid-template-columns:auto 1fr auto}.mobile-menu.open{display:none!important}}
@media(max-width:900px){
 .topbar{grid-template-columns:auto 1fr auto}
 .topbar>.brand{margin-inline-end:auto;margin-inline-start:0}
 .topbar>.nav-toggle{margin-inline-start:auto;margin-inline-end:0;grid-column:3;justify-self:end}
 html[dir="rtl"] .topbar>.brand{margin-left:auto;margin-right:0}
 html[dir="rtl"] .topbar>.nav-toggle{margin-left:0;margin-right:auto}
 .page:not(.work-page)>.page-hero{min-height:0;padding:72px 0 36px;align-items:start}
}
@media(max-width:600px){
 .site-shell p,.site-shell li{overflow-wrap:break-word}
 .page-hero,.about-hero,.resume-hero{max-width:100%}
 .lang-ar .mobile-menu>a{font-size:24px!important;line-height:1.6!important}
 .brief-call h3{white-space:normal!important;overflow-wrap:break-word;letter-spacing:0!important}
 .footer-top{gap:28px}
}

/* SEO: project title links inherit the card title look; crawlable static
   project content is replaced by the pop-up as soon as scripts run. */
.case-titlebar h3 .case-link{color:inherit;text-decoration:none;font:inherit;pointer-events:none}
.seo-static{padding:120px 24px 40px;color:var(--muted,#9a9aa3);font-family:Poppins,sans-serif}
.seo-static img,.seo-static video{max-width:100%;height:auto;display:block;margin:16px 0}
.seo-static a{color:inherit}
