/* Sondos Mohamed - the stage hero on the home page. Gana Waleed's hero (gana-portfolio/site), cloned:
   the name in a condensed serif with a grainy glow behind the portrait, mono blurbs on hairline guides,
   sparkles, a strip of tags - set by the sea at golden hour. Nothing stands in the corners where Gana has
   her leaves: red curtains and then beach grass were tried there and taken out. Landscape is laid out on --sh-h (the hero's height), phones in vw.
   Everything is scoped under #sh: the page around it is the portfolio, untouched. */

@font-face { font-family: 'SH Serif'; src: url(../fonts/hero-instrument-serif.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: 'SH Mono'; src: url(../fonts/hero-jetbrains-mono.woff2) format('woff2'); font-weight: 100 800; font-display: swap; }

#sh {
  --sh-h: max(min(100vh, 69vw), 420px);
  --sh-ink: #f4f1ea;
  --sh-serif: 'SH Serif', 'Times New Roman', serif;
  --sh-mono: 'SH Mono', ui-monospace, monospace;
  --px: 0; --py: 0;
  position: fixed; z-index: 900; inset: 0; height: 100vh; overflow: hidden; isolation: isolate;
  background: #3c5f8c; color: var(--sh-ink); font-family: var(--sh-mono); -webkit-font-smoothing: antialiased;
  transition: transform 1.25s cubic-bezier(.76, 0, .24, 1);
}
@supports (height: 100svh) { #sh { --sh-h: max(min(100svh, 69vw), 420px); height: 100svh; } }
@media (max-aspect-ratio: 1/1) { #sh { --sh-h: max(100vh, 600px); } }
@supports (height: 100svh) { @media (max-aspect-ratio: 1/1) { #sh { --sh-h: max(100svh, 600px); } } }
#sh *, #sh *::before, #sh *::after { box-sizing: border-box; }
#sh a { color: inherit; text-decoration: none; }
#sh img { display: block; max-width: none; }
/* the stage flies out: the whole hero rises off the top like a cloth on its battens */
#sh.sh-flown { transform: translateY(-100%); pointer-events: none; }
#sh.sh-gone { display: none; }

/* the backdrop: his sea, the horizon kept low so the name sits in the deeper sky */
.sh-bg { position: absolute; inset: 0; z-index: -3; }
.sh-sea { position: absolute; left: 50%; bottom: 0; width: max(100%, calc(var(--sh-h) * 1.95), calc(var(--sh-h) * 1.12 * 16 / 9)); aspect-ratio: 16 / 9;
  transform: translate(calc(-50% + var(--px) * -4px), calc(var(--py) * -2px)); }
.sh-sea img { width: 100%; height: 100%; }
/* dusk over the lower sky, in the picture's own coordinates (its horizon is at 60.3%), so the white name
   keeps its contrast where the sky turns pale; the last band over the water stays warm */
.sh-sea::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(30, 44, 86, .08) 0%, rgba(36, 46, 92, .26) 30%, rgba(58, 52, 96, .26) 48%, rgba(80, 60, 90, .1) 56%, rgba(0, 0, 0, 0) 60.3%); }
/* the deck: a shade over the wet sand so the strip of tags reads, and a soft one under the nav */
.sh-bg::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(14, 22, 44, .62) 0%, rgba(14, 22, 44, .28) 16%, rgba(14, 22, 44, 0) 30%),
              linear-gradient(to bottom, rgba(10, 22, 48, .42) 0%, rgba(10, 22, 48, 0) 16%); }
.sh-guides i { position: absolute; top: 0; bottom: 0; left: var(--x); width: 1px; background: rgba(235, 240, 255, .16); z-index: -2; }
#sh::after { content: ""; position: absolute; inset: 0; z-index: 9; pointer-events: none;
  background: url(../images/hero-grain.png); mix-blend-mode: soft-light; opacity: .42; }

/* the name: crisp white letters and a blurred, grain-broken glow behind them */
.sh-name { position: absolute; z-index: 1; left: 0; right: 0; top: calc(var(--sh-h) * 0.112); margin: 0; text-align: center;
  font: 400 calc(var(--sh-h) * 0.295)/.77 var(--sh-serif); letter-spacing: -.012em;
  transform: translate(calc(var(--px) * -7px), calc(var(--py) * -5px)) scaleX(.92); }
.sh-name > span, .sh-name > span > span { display: block; }
.sh-name .sh-ink { position: relative; color: var(--sh-ink); text-shadow: 0 0 .012em rgba(244, 241, 234, .9), 0 .02em .12em rgba(20, 34, 70, .28); }
.sh-name .sh-glow { position: absolute; inset: 0; color: rgba(255, 246, 232, .8); filter: blur(.02em); opacity: .75;
  text-shadow: 0 0 .05em rgba(255, 244, 228, .6), 0 0 .14em rgba(255, 238, 214, .3);
  -webkit-mask: url(../images/hero-glow-mask.png) 0 0 / 128px 128px; mask: url(../images/hero-glow-mask.png) 0 0 / 128px 128px;
  animation: sh-shimmer 5s ease-in-out infinite; }
@keyframes sh-shimmer { 0%, 100% { opacity: .75; } 50% { opacity: .55; } }

/* the portrait */
.sh-her { position: absolute; z-index: 2; left: 50%; bottom: calc(var(--sh-h) * -0.012); height: calc(var(--sh-h) * 0.94);
  transform: translateX(-50%) translate(calc(var(--px) * 6px), calc(var(--py) * 3px)); }
.sh-body { position: relative; height: 100%; }
.sh-her picture, .sh-her img { display: block; height: 100%; width: auto; }
.sh-shut { position: absolute; inset: 0; opacity: 0; transition: opacity .19s cubic-bezier(.22, .61, .36, 1); }
.sh-her.sh-blink .sh-shut { opacity: 1; transition: opacity .09s cubic-bezier(.55, 0, .85, .45); }
/* her one movement (js/stage-hero.js): a canvas over the picture while it plays, the picture back the moment it ends */
.sh-vid { position: absolute; top: 0; left: 0; height: 100%; aspect-ratio: 874 / 1400; opacity: 0; pointer-events: none; }
.sh-her.sh-playing .sh-vid { opacity: 1; }
.sh-her.sh-playing .sh-open, .sh-her.sh-playing .sh-shut { visibility: hidden; }

/* nav */
.sh-nav { position: absolute; z-index: 6; left: 0; right: 0; top: 0; height: 0; }
.sh-logo { position: absolute; left: 6.06vw; top: calc(var(--sh-h) * 0.036); font: 400 clamp(18px, calc(var(--sh-h) * 0.029), 34px)/1 var(--sh-serif); letter-spacing: -.01em; }
.sh-links { position: absolute; left: 12.56vw; top: calc(var(--sh-h) * 0.044); display: flex; gap: .75em; align-items: center;
  font: 400 clamp(10px, calc(var(--sh-h) * 0.0167), 17px)/1 var(--sh-mono); text-transform: uppercase; letter-spacing: .02em; }
.sh-links i { font-style: normal; opacity: .7; }
.sh-links a, .sh-lang { transition: opacity .2s; }
.sh-links a:hover, .sh-lang:hover { opacity: .65; }
.sh-cta { position: absolute; right: 5.1vw; top: calc(var(--sh-h) * 0.031); display: flex; align-items: center; gap: 1.6vw;
  font: 400 clamp(10px, calc(var(--sh-h) * 0.0167), 17px)/1 var(--sh-mono); text-transform: uppercase; letter-spacing: .02em; }
.sh-pill { display: inline-flex; align-items: center; gap: .6em; padding: .76em 1.05em .76em 1.15em; border-radius: 99px;
  background: #fff; color: #1c1612; box-shadow: 0 2px 10px rgba(20, 12, 40, .25); transition: transform .25s; }
.sh-pill:hover { transform: translateY(-1px); }
.sh-pill svg { width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.sh-nav, .sh-blurb, .sh-tags li, .sh-kicker { text-shadow: 0 1px 8px rgba(14, 20, 44, .45); }
#sh .sh-pill { text-shadow: none; color: #1c1612; }
.sh-blurb { text-shadow: 0 1px 3px rgba(14, 20, 44, .55), 0 0 14px rgba(14, 20, 44, .45); }

/* blurbs, where Gana's sit (on the guides) */
.sh-blurb, .sh-kicker { position: absolute; z-index: 3; margin: 0; font: 400 clamp(10px, calc(var(--sh-h) * 0.0178), 18px)/1.31 var(--sh-mono);
  text-transform: uppercase; letter-spacing: .01em; color: #fbf8f2; }
.sh-kicker { display: none; }
.sh-b1 { left: 14.25vw; top: calc(var(--sh-h) * 0.174); }
.sh-b2 { left: 4.06vw; top: calc(var(--sh-h) * 0.4); }
.sh-b3 { left: 85.94vw; top: calc(var(--sh-h) * 0.131); }
.sh-b4 { left: 77.2vw; top: calc(var(--sh-h) * 0.388); }   /* Gana's 75.62 would touch the d of the longer "Mohamed" */

/* sparkles: the first stars over the sea */
.sh-sparks i { position: absolute; z-index: 3; left: var(--x); top: var(--y); width: calc(var(--sh-h) * 0.0155); height: calc(var(--sh-h) * 0.0155); margin: calc(var(--sh-h) * -0.00775); background: #fff;
  clip-path: polygon(50% 0, 57% 43%, 100% 50%, 57% 57%, 50% 100%, 43% 57%, 0 50%, 43% 43%);
  animation: sh-twinkle 4.2s ease-in-out var(--d) infinite; }
@keyframes sh-twinkle { 0%, 100% { transform: scale(.85); opacity: .8; } 50% { transform: scale(1.1); opacity: 1; } }

/* the strip of tags along the bottom */
.sh-tags { position: absolute; z-index: 3; left: 12.8vw; right: 12.5vw; bottom: calc(var(--sh-h) * 0.031); margin: 0; padding: 0; list-style: none; display: flex;
  justify-content: space-between; font: 400 clamp(9px, calc(var(--sh-h) * 0.0167), 17px)/1 var(--sh-mono); text-transform: uppercase; letter-spacing: .02em; }
.sh-tags li.sh-dup { display: none; }
.sh-tags li { display: flex; align-items: center; gap: .55em; white-space: nowrap; }
.sh-tags svg { width: 1.25em; height: 1.25em; fill: none; stroke: #fff; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }

/* ------------------------------------------------------------------ intro (after the splash) */
#sh .sh-name, #sh .sh-her, #sh .sh-blurb, #sh .sh-tags, #sh .sh-nav, #sh .sh-kicker, #sh .sh-sparks { transition: opacity 1.2s ease, filter 1.4s ease; }
#sh:not(.sh-ready) .sh-name { opacity: 0; filter: blur(18px); }
#sh:not(.sh-ready) .sh-her { opacity: 0; }
#sh:not(.sh-ready) .sh-blurb, #sh:not(.sh-ready) .sh-tags, #sh:not(.sh-ready) .sh-nav, #sh:not(.sh-ready) .sh-kicker, #sh:not(.sh-ready) .sh-sparks { opacity: 0; }
#sh.sh-ready .sh-her { transition-delay: .25s; }
#sh.sh-ready .sh-blurb, #sh.sh-ready .sh-tags, #sh.sh-ready .sh-nav, #sh.sh-ready .sh-kicker, #sh.sh-ready .sh-sparks { transition-delay: .9s; }

/* ------------------------------------------------------------------ phones and portrait screens */
@media (max-aspect-ratio: 1/1) {
  .sh-logo { left: 5.5vw; top: 22px; font-size: 26px; }
  .sh-links { left: 0; right: 0; top: 66px; justify-content: center; font-size: 10.5px; }
  .sh-cta { right: 5vw; top: 16px; }
  .sh-pill { font-size: 10.5px; }
  .sh-lang { display: none; }

  #sh { --gh: min(150vw, calc(var(--sh-h) - 25vw - 150px)); }
  .sh-kicker { display: block; left: 0; right: 0; top: 100px; text-align: center; font-size: 10px; opacity: .92; }
  .sh-name { top: auto; bottom: calc(var(--gh) - 4vw); font-size: 25.5vw; }
  .sh-her { bottom: 0; height: var(--gh); }
  .sh-blurb { display: none; }
  .sh-sea { width: auto; height: 100%; }


  .sh-sparks i { width: 2.6vw; height: 2.6vw; margin: -1.3vw; }
  .sh-guides { display: none; }
  .sh-tags { left: 0; right: auto; bottom: 14px; justify-content: flex-start; gap: 34px; padding-right: 34px; width: max-content; animation: sh-ticker 26s linear infinite; }
  .sh-tags li.sh-dup { display: flex; }
  @keyframes sh-ticker { to { transform: translateX(-50%); } }
}

@media (prefers-reduced-motion: reduce) {
  #sh .sh-sparks i, #sh .sh-name .sh-glow, #sh .sh-tags { animation: none !important; }
  #sh { transition-duration: .01s; }
}

/* ------------------------------------------------------------------ the portfolio around it */
/* while the stage is down the page under it is held, and the site's own nav steps aside for the hero's */
html.sh-up, html.sh-up body { overflow: hidden !important; }
html.sh-up .navbar { opacity: 0; pointer-events: none !important; }
.navbar { transition: opacity .6s ease .3s; }
html.sh-up .navbar { transition-delay: 0s; }
/* the Arabic pages put their face on everything; the name, logo and Latin labels keep the hero's */
html[lang="ar"] body #sh .sh-name, html[lang="ar"] body #sh .sh-name *, html[lang="ar"] body #sh .sh-logo,
html[lang="ar"] body #sh .sh-logo * { font-family: var(--sh-serif) !important; letter-spacing: -.012em !important; }
html[lang="ar"] body #sh .sh-lang[lang="en"] { font-family: var(--sh-mono) !important; }
html[lang="ar"] body #sh .sh-blurb { line-height: 1.6; text-transform: none; }
