/* KOSans draws some symbols ( ) ! ? / ; # * · • ٪ as blank glyphs, so those fall through to the next font. */
@font-face { font-family: "KOSans"; src: url("assets/fonts/KOSans-Light.otf") format("opentype"); font-weight: 300; font-display: swap; unicode-range: U+0000-0020, U+0022, U+0024-0027, U+002B-002E, U+0030-003A, U+003C-003E, U+0040-005B, U+005D-00A0, U+00A2-00B6, U+00B8-00BE, U+00C0-0669, U+066E-2021, U+2023-10FFFF; }
@font-face { font-family: "KOSans"; src: url("assets/fonts/KOSans-Regular.otf") format("opentype"); font-weight: 400; font-display: swap; unicode-range: U+0000-0020, U+0022, U+0024-0027, U+002B-002E, U+0030-003A, U+003C-003E, U+0040-005B, U+005D-00A0, U+00A2-00B6, U+00B8-00BE, U+00C0-0669, U+066E-2021, U+2023-10FFFF; }
@font-face { font-family: "KOSans"; src: url("assets/fonts/KOSans-Medium.otf") format("opentype"); font-weight: 500; font-display: swap; unicode-range: U+0000-0020, U+0022, U+0024-0027, U+002B-002E, U+0030-003A, U+003C-003E, U+0040-005B, U+005D-00A0, U+00A2-00B6, U+00B8-00BE, U+00C0-0669, U+066E-2021, U+2023-10FFFF; }
@font-face { font-family: "KOSans"; src: url("assets/fonts/KOSans-Bold.otf") format("opentype"); font-weight: 700; font-display: swap; unicode-range: U+0000-0020, U+0022, U+0024-0027, U+002B-002E, U+0030-003A, U+003C-003E, U+0040-005B, U+005D-00A0, U+00A2-00B6, U+00B8-00BE, U+00C0-0669, U+066E-2021, U+2023-10FFFF; }

:root {
  /* رصاصي · ذهبي · برغندي */
  --bg: #111112;
  --bg-2: #18181a;
  --bg-3: #222225;
  --line: rgba(255, 255, 255, .09);
  --line-2: rgba(255, 255, 255, .18);
  --text: #ecebe8;
  --muted: #9e9c98;
  --accent: #c9a45c;
  --accent-hover: #dcbb78;
  --accent-ink: #1a1408;
  --wine: #7b1e2e;
  --wine-deep: #1e0b10;
  --ai: #d9808d;
  --ai-ink: #f1cdd3;
  --radius: 14px;
  --wrap: 1200px;
  --font-head: "KOSans", "IBM Plex Sans Arabic", system-ui, sans-serif;
  --font-body: "KOSans", "IBM Plex Sans Arabic", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video, iframe { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; padding: 0; }
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 600; line-height: 1.2; margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px max(16px, calc((100% - var(--wrap)) / 2));
  border-bottom: 1px solid transparent;
  transition: background .3s, padding .3s, border-color .3s;
}
.nav.scrolled, .nav.menu-open {
  background: rgba(11, 11, 12, .85);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-color: var(--line);
  padding-block: 12px;
}
.brand { font-family: var(--font-head); font-weight: 800; font-size: 18px; }
.nav-links { display: flex; gap: 32px; font-size: 15px; color: var(--muted); }
.nav-links a { transition: color .2s; }
.nav-links a:hover { color: var(--text); }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.lang {
  min-width: 44px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 13px;
  transition: border-color .2s;
}
.lang:hover { border-color: var(--text); }
.menu-btn { display: none; position: relative; width: 40px; height: 40px; }
.menu-btn span {
  position: absolute;
  inset-inline: 10px;
  height: 1.5px;
  background: var(--text);
  transition: transform .3s;
}
.menu-btn span:first-child { top: 16px; }
.menu-btn span:last-child { top: 23px; }
.menu-btn[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-block: 120px 96px;
}
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-bg video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .5; }
.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(11, 11, 12, .15), var(--bg) 96%);
}
/* Hero photo: subject sits on the left, text on the right (mirrored for English). */
.hero-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 20% 30%; }
html[dir="ltr"] .hero-photo { transform: scaleX(-1); }
.hero.has-photo .hero-bg::after {
  background:
    linear-gradient(to left, var(--bg) 6%, rgba(17, 17, 18, .78) 40%, rgba(17, 17, 18, 0) 70%),
    linear-gradient(to bottom, rgba(17, 17, 18, 0) 55%, var(--bg) 98%);
}
html[dir="ltr"] .hero.has-photo .hero-bg::after {
  background:
    linear-gradient(to right, var(--bg) 6%, rgba(17, 17, 18, .78) 40%, rgba(17, 17, 18, 0) 70%),
    linear-gradient(to bottom, rgba(17, 17, 18, 0) 55%, var(--bg) 98%);
}
.hero.has-photo .hero-inner > * { max-width: 600px; }
.hero.has-photo .hero-title { font-size: clamp(40px, 6vw, 84px); }
.blob { position: absolute; border-radius: 50%; filter: blur(100px); opacity: .32; }
.b1 { width: 55vw; height: 55vw; background: var(--wine); opacity: .55; top: -22%; left: -14%; animation: float 18s ease-in-out infinite alternate; }
.b2 { width: 46vw; height: 46vw; background: var(--accent); opacity: .18; bottom: -26%; right: -10%; animation: float 22s ease-in-out infinite alternate-reverse; }
@keyframes float { to { transform: translate(8vw, 6vh) scale(1.15); } }
.grain {
  position: absolute;
  inset: 0;
  opacity: .09;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.hero-inner { position: relative; z-index: 1; }
.status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 28px;
  padding: 6px 16px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-size: 14px;
  color: var(--muted);
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: #3ddc84; animation: pulse 2s infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(61, 220, 132, .55); }
  70%, 100% { box-shadow: 0 0 0 10px rgba(61, 220, 132, 0); }
}
.hero-title { font-size: clamp(42px, 7.5vw, 104px); font-weight: 800; max-width: 13ch; }
html[lang="en"] .hero-title { letter-spacing: -.03em; line-height: 1.05; }
.hero-title em, .contact-title em { font-style: normal; color: var(--accent); }
.hero-role { margin: 22px 0 38px; font-size: clamp(16px, 2vw, 21px); font-weight: 300; color: var(--muted); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 500;
  transition: transform .2s, background .2s, border-color .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost { border: 1px solid var(--line-2); }
.btn-ghost:hover { border-color: var(--text); }
.stats { display: flex; flex-wrap: wrap; gap: 56px; margin: 72px 0 0; }
.stats div { display: flex; flex-direction: column-reverse; }
.stats dt { font-size: 14px; color: var(--muted); }
.stats dd { margin: 0; font-family: var(--font-head); font-size: clamp(30px, 4vw, 46px); font-weight: 600; }
.scroll-hint {
  position: absolute;
  bottom: 28px;
  left: 50%;
  z-index: 1;
  width: 24px;
  height: 40px;
  margin-left: -12px;
  border: 1.5px solid var(--line-2);
  border-radius: 12px;
}
.scroll-hint span {
  position: absolute;
  top: 8px;
  left: 50%;
  width: 3px;
  height: 8px;
  margin-left: -1.5px;
  border-radius: 2px;
  background: var(--text);
  animation: scroll 1.8s infinite;
}
@keyframes scroll { to { transform: translateY(12px); opacity: 0; } }

/* ---------- Marquee ---------- */
.marquee { direction: ltr; overflow: hidden; padding: 20px 0; border-block: 1px solid var(--line); }
.marquee-track {
  display: flex;
  width: max-content;
  font-family: var(--font-head);
  font-size: 20px;
  color: var(--muted);
  white-space: nowrap;
  animation: marquee 45s linear infinite;
}
.marquee-track span { padding-inline: 24px; }
.marquee-track i { font-style: normal; color: var(--accent); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
.section { padding-block: 128px 32px; }
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 44px;
}
.section h2 { font-size: clamp(34px, 4.6vw, 58px); }
.eyebrow {
  display: block;
  margin-bottom: 12px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: .1em;
  color: var(--accent);
}
.eyebrow.ai { color: var(--ai); }
/* Letter-spacing and mono fonts break Arabic letter joining. */
html[lang="ar"] :is(.eyebrow, .card-cat, .cs-cat, .about h3, .cs h4, .timeline .period) {
  font-family: var(--font-body);
  letter-spacing: 0;
}
.sub { max-width: 58ch; margin: 14px 0 0; color: var(--muted); }

/* ---------- Work grid ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 8px 18px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-size: 14px;
  color: var(--muted);
  transition: color .2s, background .2s, border-color .2s;
}
.chip:hover { color: var(--text); border-color: var(--text); }
.chip.active { background: var(--text); border-color: var(--text); color: var(--bg); }
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: 290px;
  grid-auto-flow: dense;
  gap: 16px;
}
.card {
  position: relative;
  display: block;
  overflow: hidden;
  isolation: isolate;
  border-radius: var(--radius);
  background: var(--bg-3);
  text-align: start;
}
.card.wide { grid-column: span 2; }
.card.tall { grid-row: span 2; }
.card.hide { display: none; }
.card img, .card video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .9s cubic-bezier(.2, .7, .2, 1), opacity .4s;
}
.card video { opacity: 0; }
.card.playing video { opacity: 1; }
.card:hover img, .card:focus-visible img { transform: scale(1.05); }
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(to top, rgba(0, 0, 0, .85), rgba(0, 0, 0, 0) 58%);
}
.card-badge {
  position: absolute;
  top: 16px;
  inset-inline-end: 16px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-2);
  border-radius: 50%;
  background: rgba(0, 0, 0, .4);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: background .3s, color .3s, border-color .3s;
}
.card-badge svg { width: 18px; height: 18px; }
.card:hover .card-badge { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.card-info { position: absolute; inset-inline: 22px; bottom: 20px; z-index: 2; display: block; }
.card-cat, .cs-cat { display: block; font-family: var(--font-mono); font-size: 12px; letter-spacing: .06em; color: var(--accent); }
.card-cat.ai, .cs-cat.ai { color: var(--ai); }
.card-title { display: block; margin-top: 4px; font-family: var(--font-head); font-size: 21px; font-weight: 600; line-height: 1.3; }
.card-meta { display: block; font-size: 13px; color: var(--muted); }

/* ---------- AI lab ---------- */
.lab { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.lab-item {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-2);
}
.prompt {
  direction: ltr;
  text-align: left;
  padding: 12px 14px;
  border: 1px solid rgba(123, 30, 46, .7);
  border-radius: 10px;
  background: var(--wine-deep);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
  color: var(--ai-ink);
}
.prompt b { font-weight: 400; color: var(--ai); }
.compare {
  --pos: 50%;
  position: relative;
  direction: ltr;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border-radius: 10px;
  background: var(--bg-3);
  user-select: none;
}
.compare:has(input:focus-visible) { outline: 2px solid var(--ai); outline-offset: 3px; }
.compare img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.compare .before { clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.compare .handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos);
  width: 2px;
  margin-left: -1px;
  background: #fff;
  pointer-events: none;
}
.compare .knob {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
  border-radius: 50%;
  background: #fff;
  color: #111;
}
.compare .knob svg { width: 20px; height: 20px; }
.compare input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
}
.compare .lbl {
  position: absolute;
  top: 10px;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .6);
  font-size: 12px;
  pointer-events: none;
}
.lbl-before { left: 10px; }
.lbl-after { right: 10px; }
.lab-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.lab-title { font-family: var(--font-head); font-size: 18px; font-weight: 600; }
.lab-note { margin: 0; font-size: 15px; color: var(--muted); }

.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.tags li {
  direction: ltr;
  padding: 3px 11px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-size: 13px;
  color: var(--muted);
}
.lab .tags li { border-color: rgba(217, 128, 141, .4); color: var(--ai-ink); }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 72px; align-items: start; }
.about-photo {
  position: sticky;
  top: 100px;
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: var(--radius);
  background: linear-gradient(140deg, #3a0f18, var(--bg-2));
  font-family: var(--font-head);
  font-size: 120px;
  font-weight: 800;
  color: rgba(255, 255, 255, .1);
}
.about-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; }
.about-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(123, 30, 46, .35), transparent 60%);
  pointer-events: none;
}
.bio { margin: 22px 0 12px; font-size: clamp(18px, 2vw, 22px); line-height: 1.85; }
.about-meta { margin: 0 0 48px; color: var(--accent); font-size: 15px; }
::selection { background: var(--wine); color: #fff; }
.about h3 {
  margin: 0 0 16px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: .08em;
  color: var(--muted);
}
.timeline { margin: 0 0 48px; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.timeline li { display: grid; grid-template-columns: 150px 1fr; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.timeline .period { font-family: var(--font-mono); font-size: 14px; color: var(--muted); }
.timeline strong { display: block; font-weight: 500; }
.timeline .company { display: block; font-size: 15px; color: var(--muted); }
.timeline .detail { display: block; margin-top: 4px; font-size: 14px; color: var(--muted); opacity: .85; }
.tools { margin-bottom: 44px; }

/* ---------- Contact ---------- */
.contact { text-align: center; padding-bottom: 96px; }
.contact .section-head, .contact .sub { margin-inline: auto; }
.section .contact-title { font-size: clamp(42px, 7vw, 100px); font-weight: 800; }
.email-link {
  display: inline-block;
  direction: ltr;
  margin: 36px 0 52px;
  border-bottom: 2px solid var(--accent);
  font-family: var(--font-head);
  font-size: clamp(20px, 3vw, 32px);
  transition: color .2s;
}
.email-link:hover { color: var(--accent); }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 720px; margin: 0 auto; text-align: start; }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--muted); }
.form .full { grid-column: 1 / -1; }
.form input, .form textarea {
  padding: 13px 15px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: var(--bg-2);
  color: var(--text);
  font: inherit;
  resize: vertical;
  transition: border-color .2s;
}
.form input:focus, .form textarea:focus { outline: none; border-color: var(--accent); }
.form .invalid { border-color: #ff6b6b; }
.err { font-size: 13px; color: #ff8f8f; }
.err:empty { display: none; }
.form button { grid-column: 1 / -1; justify-self: center; margin-top: 8px; }
.form-status { grid-column: 1 / -1; min-height: 1.7em; margin: 0; text-align: center; color: var(--muted); }
.form-status.ok { color: #3ddc84; }
.socials { display: flex; flex-wrap: wrap; justify-content: center; gap: 28px; margin: 56px 0 0; padding: 0; list-style: none; }
.socials a { color: var(--muted); transition: color .2s; }
.socials a:hover { color: var(--text); }

.footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 32px 0 40px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--muted);
}

/* ---------- Modals ---------- */
.modal {
  width: min(1000px, 100% - 32px);
  max-width: none;
  max-height: none;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line-2);
  border-radius: 18px;
  background: var(--bg-2);
  color: var(--text);
}
.modal::backdrop { background: rgba(0, 0, 0, .78); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.modal[open] { animation: pop .35s cubic-bezier(.2, .7, .2, 1); }
@keyframes pop { from { opacity: 0; transform: translateY(18px) scale(.98); } }
.modal-body { max-height: calc(100svh - 48px); overflow-y: auto; }
.modal-close {
  position: absolute;
  top: 14px;
  inset-inline-end: 14px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(0, 0, 0, .6);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.modal-close svg { width: 20px; height: 20px; }
.modal-close:hover { background: var(--accent); color: var(--accent-ink); }
.media { aspect-ratio: 16 / 9; background: #000; }
.media iframe, .media video, .media img { width: 100%; height: 100%; border: 0; object-fit: cover; }
.media video { object-fit: contain; }
.cs { padding: 32px 36px 40px; }
.cs-title { margin: 6px 0 4px; font-size: clamp(26px, 3.4vw, 40px); }
.cs-meta { margin: 0; color: var(--muted); font-size: 15px; }
.cs-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; margin: 32px 0; }
.cs h4 { margin-bottom: 8px; font-family: var(--font-mono); font-size: 13px; font-weight: 400; letter-spacing: .06em; color: var(--accent); }
.cs-grid p { margin: 0; line-height: 1.8; }
.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 32px; }
.gallery img { width: 100%; border-radius: 10px; }
.reel-empty { display: grid; place-items: center; gap: 8px; padding: 32px; text-align: center; color: var(--muted); }
.reel-empty code { direction: ltr; font-family: var(--font-mono); color: var(--text); }

/* ---------- Reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s ease, transform .8s cubic-bezier(.2, .7, .2, 1); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 240px; }
  .lab { grid-template-columns: 1fr; }
  .about { grid-template-columns: 1fr; gap: 44px; }
  .about-photo { position: relative; top: 0; width: min(100%, 420px); }
  .cs-grid { grid-template-columns: 1fr; gap: 20px; }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .menu-btn { display: block; }
  .nav-links {
    position: absolute;
    top: 100%;
    inset-inline: 0;
    display: none;
    flex-direction: column;
    gap: 0;
    padding: 4px 16px 16px;
    border-bottom: 1px solid var(--line);
    background: var(--bg);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 18px; color: var(--text); }
  .stats { gap: 32px; margin-top: 56px; }
  .section { padding-block: 88px 24px; }
  .grid { grid-template-columns: 1fr; grid-auto-rows: 250px; }
  .card.wide { grid-column: auto; }
  .card.tall { grid-row: auto; }
  .timeline li { grid-template-columns: 1fr; gap: 2px; }
  .form { grid-template-columns: 1fr; }
  .cs { padding: 24px 20px 28px; }
  .gallery { grid-template-columns: 1fr; }
  .footer { flex-direction: column; align-items: center; }
  .hero.has-photo { align-items: flex-end; padding-top: 50vh; }
  .hero-photo { height: 60vh; object-position: 10% 25%; }
  .hero.has-photo .hero-bg::after,
  html[dir="ltr"] .hero.has-photo .hero-bg::after {
    background: linear-gradient(to bottom, rgba(17, 17, 18, .1) 0, rgba(17, 17, 18, .3) 34vh, var(--bg) 60vh);
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; }
}

/* ---------- Behind-the-scenes band ---------- */
.band { position: relative; height: min(72vh, 660px); margin: 128px 0 0; overflow: hidden; }
.band[hidden] { display: none; }
.band img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 35%; }
.band::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, var(--bg) 2%, rgba(17, 17, 18, .45) 42%, rgba(17, 17, 18, .1) 75%),
    linear-gradient(to bottom, var(--bg), rgba(17, 17, 18, 0) 16%);
}
.band figcaption { position: absolute; inset-inline: 0; bottom: 56px; z-index: 1; }
.band-quote { max-width: 14ch; margin: 0; font-family: var(--font-head); font-size: clamp(30px, 5vw, 64px); font-weight: 700; line-height: 1.2; }
.band-quote em { font-style: normal; color: var(--accent); }
.band-caption { display: block; margin-top: 12px; font-size: 14px; color: var(--muted); }
@media (max-width: 720px) {
  .band { height: 70vh; margin-top: 88px; }
  .band img { object-position: 72% 35%; }
  .band figcaption { bottom: 32px; }
}
/* On wide screens the subject sits right, so the caption goes left over the monitor. */
@media (min-width: 721px) {
  html[dir="rtl"] .band figcaption { display: flex; flex-direction: column; align-items: flex-end; }
  .band::after {
    background:
      linear-gradient(to right, rgba(17, 17, 18, .8), rgba(17, 17, 18, 0) 55%),
      linear-gradient(to top, var(--bg) 2%, rgba(17, 17, 18, .45) 42%, rgba(17, 17, 18, .1) 75%),
      linear-gradient(to bottom, var(--bg), rgba(17, 17, 18, 0) 16%);
  }
}
