/* Boutross Nicolas Assad — site styles (v2: heritage editorial).
   Built on tokens.css (Liquid Glass Design kit, MIT). Glass stays on floating chrome only.
   Palette: warm Aleppo-stone neutrals and one terracotta accent. Every text colour passes WCAG AA:
   light  text 15.7:1 · secondary 8.7:1 · tertiary 5.3:1 · tint 6.3:1 on #f6f2ec
   dark   text 15.3:1 · secondary 8.7:1 · tertiary 5.6:1 · tint 8.3:1 on #1c1915 */

:root {
  --lg-bg: #f6f2ec; --lg-bg-elevated: #ffffff; --lg-surface-grouped: #efe9e0;
  --lg-fill: rgba(120, 96, 70, 0.1); --lg-fill-strong: rgba(120, 96, 70, 0.18); --lg-separator: rgba(74, 58, 40, 0.16);
  --lg-text: #1d1915; --lg-text-secondary: #4a433a; --lg-text-tertiary: #6b6357;
  --lg-tint: #9a3b11; --lg-tint-fill: #9a3b11; --lg-tint-soft: rgba(154, 59, 17, 0.09); --lg-tint-ink: #86320e;
  --lg-material-thin: rgba(252, 249, 244, 0.68); --lg-material-regular: rgba(252, 249, 244, 0.8);
  --lg-edge: 0 0 0 0.5px rgba(60, 40, 20, 0.1);
  --lg-lift-1: 0 1px 2px rgba(60, 40, 20, 0.06), 0 6px 18px rgba(60, 40, 20, 0.06);
  --lg-lift-2: 0 2px 6px rgba(60, 40, 20, 0.07), 0 22px 48px rgba(60, 40, 20, 0.14);

  /* Display serif from fonts already on the device (no downloads): Palatino / Iowan / Georgia / Noto Serif */
  --site-serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", "URW Palladio L", P052, Georgia, "Noto Serif", serif;
  --site-max: 1160px;
  --site-band: #17130f;
  /* Eight-pointed star lattice from Aleppine woodwork and stone, used as a faint texture */
  --site-pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56'%3E%3Cpath d='M42 28 37.9 32.1 37.9 37.9 32.1 37.9 28 42 23.9 37.9 18.1 37.9 18.1 32.1 14 28 18.1 23.9 18.1 18.1 23.9 18.1 28 14 32.1 18.1 37.9 18.1 37.9 23.9ZM42 28H56M14 28H0M28 14V0M28 42V56' fill='none' stroke='black' stroke-width='1'/%3E%3C/svg%3E");
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --lg-bg: #0f0d0b; --lg-bg-elevated: #1c1915; --lg-surface-grouped: #17130f;
    --lg-fill: rgba(255, 240, 220, 0.08); --lg-fill-strong: rgba(255, 240, 220, 0.14); --lg-separator: rgba(255, 240, 220, 0.12);
    --lg-text: #f4efe7; --lg-text-secondary: #bfb5a8; --lg-text-tertiary: #9a9083;
    --lg-tint: #f0a06e; --lg-tint-fill: #a9441a; --lg-tint-soft: rgba(240, 160, 110, 0.15); --lg-tint-ink: #f5b48a;
    --lg-material-thin: rgba(28, 25, 21, 0.62); --lg-material-regular: rgba(28, 25, 21, 0.76);
    --lg-edge: 0 0 0 0.5px rgba(255, 240, 220, 0.08);
    --site-band: #17130f;
  }
}
:root[data-theme="dark"] {
  --lg-bg: #0f0d0b; --lg-bg-elevated: #1c1915; --lg-surface-grouped: #17130f;
  --lg-fill: rgba(255, 240, 220, 0.08); --lg-fill-strong: rgba(255, 240, 220, 0.14); --lg-separator: rgba(255, 240, 220, 0.12);
  --lg-text: #f4efe7; --lg-text-secondary: #bfb5a8; --lg-text-tertiary: #9a9083;
  --lg-tint: #f0a06e; --lg-tint-fill: #a9441a; --lg-tint-soft: rgba(240, 160, 110, 0.15); --lg-tint-ink: #f5b48a;
  --lg-material-thin: rgba(28, 25, 21, 0.62); --lg-material-regular: rgba(28, 25, 21, 0.76);
  --lg-edge: 0 0 0 0.5px rgba(255, 240, 220, 0.08);
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html { scroll-padding-top: 92px; }
/* Smooth in-page scrolling starts after load (site.js), so arriving at a #section after a language switch is an instant jump */
html.smooth-scroll { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html.smooth-scroll { scroll-behavior: auto; } }
body { margin: 0; background: var(--lg-bg); }
a { color: var(--lg-tint); text-underline-offset: 3px; text-decoration-thickness: 1px; }
img { max-width: 100%; display: block; }
.nowrap { white-space: nowrap; }
.wrap { width: min(var(--site-max), 100% - 40px); margin-inline: auto; }
.serif { font-family: var(--site-serif); font-weight: 400; letter-spacing: -0.012em; }
section { padding-block: 112px 0; }

/* Arabic: never track a joined script; give it room to breathe; display type uses the system Arabic face */
[lang="ar"] { font-family: var(--lg-font); }
:lang(ar) { letter-spacing: 0 !important; }
html[lang="ar"] .serif { font-family: var(--lg-font); font-weight: 650; }
html[lang="ar"] body { line-height: 1.75; }

/* Pattern helper: a tinted, masked lattice */
.pattern { position: absolute; inset: 0; background: var(--lg-tint); pointer-events: none;
  -webkit-mask: var(--site-pattern) 0 0 / 56px 56px repeat; mask: var(--site-pattern) 0 0 / 56px 56px repeat; }

/* ---------- Staging notice ---------- */

/* ---------- Nav ---------- */
/* The bar keeps one geometry in both languages, so nothing moves when the language changes:
   name on the left, section links centred, controls on the right. Only the words change. */
.nav-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 16px;
  height: 58px; padding-inline: 16px 8px; direction: ltr; }
.brand { justify-self: start; display: flex; align-items: center; gap: 10px; min-width: 0; color: var(--lg-text); text-decoration: none; white-space: nowrap; }
.brand .full, .brand .short { overflow: hidden; text-overflow: ellipsis; font-size: 19px; line-height: 1.2; }
html[lang="ar"] .brand .full, html[lang="ar"] .brand .short { font-size: 17px; }
.brand-mark { width: 26px; height: 26px; flex: none; color: var(--lg-tint); }
.brand-mark .hole { fill: var(--lg-bg-elevated); }
.brand .short { display: none; }
.nav-links { justify-self: center; display: flex; gap: 6px; }
html[dir="rtl"] .nav-links { direction: rtl; }
.nav-links a { display: inline-flex; align-items: center; min-height: 36px; padding-inline: 12px; border-radius: var(--lg-radius-pill);
  color: var(--lg-text-secondary); text-decoration: none; font-size: var(--lg-text-sm); white-space: nowrap; transition: background var(--lg-dur-fast) var(--lg-ease), color var(--lg-dur-fast) var(--lg-ease); }
.nav-links a:hover { color: var(--lg-text); background: var(--lg-fill); }
.nav-tools { justify-self: end; display: flex; align-items: center; gap: 6px; }
.nav-cta { min-width: 96px; }
.menu-btn { display: none; }

/* Language: one two-option switch, identical on both pages; the highlight marks the current language */
.lang-seg { position: relative; display: grid; grid-template-columns: 1fr 1fr; width: 100px; height: 38px; padding: 3px; border-radius: var(--lg-radius-pill);
  background: var(--lg-fill); box-shadow: inset 0 0 0 0.5px var(--lg-separator); isolation: isolate; direction: ltr; }
.lang-thumb { position: absolute; top: 3px; bottom: 3px; left: 3px; width: calc(50% - 3px); z-index: 0; border-radius: var(--lg-radius-pill);
  background: var(--lg-bg-elevated); box-shadow: 0 1px 3px rgba(40, 25, 10, 0.16), var(--lg-edge); }
.lang-seg[data-current="ar"] .lang-thumb { left: 50%; }
.lang-opt { position: relative; z-index: 1; display: grid; place-items: center; border-radius: var(--lg-radius-pill); text-decoration: none;
  color: var(--lg-text-secondary); font: 600 13px/1 var(--lg-font); transition: color var(--lg-dur-fast) var(--lg-ease); }
.lang-opt[lang="en"] { letter-spacing: 0.06em; }
.lang-opt[lang="ar"] { font-size: 14px; }
.lang-opt.is-current { color: var(--lg-text); cursor: default; }
a.lang-opt:hover { color: var(--lg-tint); }

/* Sections menu for narrower screens: a frosted panel pinned under the bar's right edge */
.site-menu { position: fixed; inset: 80px 12px auto auto; margin: 0; padding: 8px; width: min(280px, calc(100vw - 24px)); border: 0;
  border-radius: var(--lg-radius-xl); color: var(--lg-text); background: var(--lg-material-thick);
  -webkit-backdrop-filter: blur(40px) saturate(var(--lg-saturate)); backdrop-filter: blur(40px) saturate(var(--lg-saturate));
  box-shadow: var(--lg-rim), var(--lg-edge), var(--lg-lift-2);
  opacity: 0; transform: translateY(-8px) scale(0.98); transform-origin: top right;
  transition: opacity 220ms var(--lg-ease), transform 320ms var(--lg-ease-spring), display 320ms allow-discrete, overlay 320ms allow-discrete; }
.site-menu:popover-open { display: grid; gap: 2px; opacity: 1; transform: none; }
@starting-style { .site-menu:popover-open { opacity: 0; transform: translateY(-8px) scale(0.98); } }
.site-menu a { display: flex; align-items: center; min-height: 46px; padding-inline: 16px; border-radius: 14px; color: var(--lg-text); text-decoration: none; font-size: 16px; }
.site-menu a:hover { background: var(--lg-fill); }
.site-menu .menu-cta { display: none; justify-content: center; margin-top: 6px; background: var(--lg-tint-fill); color: #fff; font-weight: 600; }
.site-menu .menu-cta:hover { background: color-mix(in srgb, var(--lg-tint-fill) 88%, #000); }

/* ---------- Hero ---------- */
.hero-band { position: relative; isolation: isolate; }
.hero-band > .pattern { z-index: -2; opacity: 0.07; }
.hero-band::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(120% 80% at 75% 0%, transparent 30%, var(--lg-bg) 75%); }
.hero { display: grid; grid-template-columns: 1fr 1.02fr; gap: 64px; align-items: center; padding-block: 72px 56px; }
.hero-eyebrow { margin: 0 0 14px; font-size: 30px; line-height: 1.3; color: var(--lg-tint-ink); font-weight: 600; }
html[lang="ar"] .hero-eyebrow { font-family: var(--site-serif); font-weight: 400; font-size: 26px; }
.hero h1 { margin: 0; font-size: clamp(44px, 4.6vw, 66px); line-height: 1.04; letter-spacing: -0.02em; }
html[lang="ar"] .hero h1 { line-height: 1.25; max-width: 12ch; }
.hero .lead { font-size: 20px; line-height: 1.5; max-width: 34ch; margin: 26px 0 0; color: var(--lg-text-secondary); }
.hero-cta { display: flex; gap: var(--lg-space-3); margin-top: 36px; flex-wrap: wrap; }

.stage { position: relative; margin: 0; padding-bottom: 44px; }
.stage-frame { position: relative; border-radius: var(--lg-radius-xl); overflow: hidden; aspect-ratio: 4 / 3.25; background: var(--lg-fill); box-shadow: var(--lg-lift-2); }
.stage-frame > img { width: 100%; height: 100%; object-fit: cover; }
.stage-frame::after { content: ""; position: absolute; inset: 50% 0 0; background: linear-gradient(180deg, transparent, rgba(10, 8, 6, 0.5)); pointer-events: none; }
.portrait { position: absolute; inset-inline-start: 28px; bottom: 0; z-index: 2; width: 136px; height: 136px; border-radius: 50%; object-fit: cover;
  border: 5px solid var(--lg-bg); box-shadow: var(--lg-lift-2); }
.id-card { position: absolute; inset-inline: 184px 18px; bottom: 62px; z-index: 1; padding: 14px 18px; border-radius: var(--lg-radius-lg); }
.id-card strong { display: block; font-size: var(--lg-text-base); font-weight: 600; line-height: 1.3; }
.id-card span { display: block; font-size: var(--lg-text-sm); margin-top: 2px; }
.photo-credit { margin: 10px 0 0; font-size: var(--lg-text-xs); color: var(--lg-text-tertiary); }
.photo-credit a { color: inherit; }
.stage .photo-credit { position: absolute; inset-inline-end: 0; bottom: 8px; max-width: calc(100% - 190px); text-align: end; }

/* Proof row */
.proof { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-block: 0.5px solid var(--lg-separator); }
.proof > div { padding: 30px 24px 30px 0; }
.proof > div + div { border-inline-start: 0.5px solid var(--lg-separator); padding-inline-start: 28px; }
.proof strong { display: block; font-family: var(--site-serif); font-weight: 400; font-size: clamp(34px, 3.8vw, 50px); line-height: 1; letter-spacing: -0.02em; font-variant-numeric: lining-nums tabular-nums; }
.proof span { display: block; margin-top: 10px; color: var(--lg-text-secondary); font-size: var(--lg-text-md); line-height: 1.45; }
.proof span .nowrap { display: inline; margin: 0; }

/* ---------- Section heads: title left, lead right ---------- */
.section-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px 72px; align-items: end; margin-bottom: 48px; }
.section-head h2 { margin: 0; font-size: clamp(38px, 4.6vw, 58px); line-height: 1.04; letter-spacing: -0.02em; }
html[lang="ar"] .section-head h2 { line-height: 1.3; font-size: clamp(34px, 4vw, 50px); }
.section-head p { margin: 0; font-size: 19px; line-height: 1.55; color: var(--lg-text-secondary); max-width: 46ch; }
.section-head .rule { grid-column: 1 / -1; height: 0.5px; background: var(--lg-separator); margin-bottom: 8px; }

/* ---------- Biography: the story in chapters (year and title on one side, the account on the other) ---------- */
.chapters { border-top: 0.5px solid var(--lg-separator); }
.chapter { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 56px; padding-block: 40px; border-bottom: 0.5px solid var(--lg-separator); }
.chapter .when { display: block; font-family: var(--site-serif); font-size: 20px; color: var(--lg-tint-ink); font-variant-numeric: lining-nums; }
html[lang="ar"] .chapter .when { font-family: var(--lg-font); font-weight: 600; font-size: 17px; }
.chapter h3 { margin: 8px 0 0; font-size: 28px; line-height: 1.2; }
html[lang="ar"] .chapter h3 { font-size: 24px; line-height: 1.5; }
.chapter p { margin: 0; font-size: 19px; line-height: 1.75; max-width: 66ch; }
html[lang="en"] .chapter:first-child p::first-letter { float: left; font-family: var(--site-serif); font-size: 78px; line-height: 0.82; margin: 8px 12px 0 0; color: var(--lg-tint); }

/* ---------- Hotels and projects ---------- */
.hotels-head { align-items: center; }
.places { margin: 0; justify-self: end; width: min(100%, 380px); }
.places svg { width: 100%; height: auto; display: block; overflow: visible; }
.places .grat { stroke: var(--lg-separator); stroke-width: 1; stroke-dasharray: 2 5; fill: none; }
.places .grat-label { fill: var(--lg-text-tertiary); font: 13px var(--lg-font); }
.places .sea { fill: var(--lg-text-tertiary); font: italic 13px var(--site-serif); }
.places .route { stroke: var(--lg-tint); stroke-width: 1.25; stroke-dasharray: 4 5; fill: none; opacity: 0.55; }
.places .dot { fill: var(--lg-bg); stroke: var(--lg-tint); stroke-width: 2; }
.places .dot.home { fill: var(--lg-tint); }
.places .halo { fill: var(--lg-tint); opacity: 0.14; }
.places .city { fill: var(--lg-text); font: 19px var(--site-serif); }
.places .yrs { fill: var(--lg-text-secondary); font: 13.5px var(--lg-font); }
.places figcaption { margin-top: 6px; font-size: var(--lg-text-xs); color: var(--lg-text-tertiary); text-align: end; }

.work { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 22px; }
.work-card { display: flex; flex-direction: column; padding: 0; overflow: hidden; box-shadow: var(--lg-edge), var(--lg-lift-1); }
.span-4 { grid-column: span 4; } .span-3 { grid-column: span 3; } .span-2 { grid-column: span 2; }
.work-media { position: relative; margin: 0; background: var(--lg-fill); overflow: hidden; min-height: 0; }
.work-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 900ms var(--lg-ease); }
.work-card:hover .work-media img:not(.blur) { transform: scale(1.03); }
.media-std { aspect-ratio: 16 / 9; }
/* The lead photo grows to the row's height, so the card never shows an empty patch beside a taller neighbour */
.media-pair { display: grid; grid-template-columns: 2.2fr 1fr; gap: 3px; flex: 1 1 auto; min-height: 280px; background: var(--lg-bg-elevated); }
.media-pair img { height: 100%; }
.media-fit .blur { position: absolute; inset: -20px; width: calc(100% + 40px); height: calc(100% + 40px); filter: blur(22px) saturate(1.2); opacity: 0.75; }
.media-fit .sharp { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: auto; height: 100%; max-width: none; object-fit: contain; box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25); }
.work-card:hover .media-fit .sharp { transform: translateX(-50%) scale(1.03); }
.work-media figcaption { position: absolute; inset-inline-start: 12px; bottom: 12px; padding: 4px 10px; border-radius: var(--lg-radius-pill);
  font-size: var(--lg-text-xs); color: #fff; background: rgba(20, 16, 12, 0.62); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
/* Motif header for cards without a licensed photograph: the place name, set large over the lattice */
.work-motif { position: relative; display: grid; place-items: center; height: 132px; background: var(--lg-surface-grouped); overflow: hidden; }
.work-motif .pattern { opacity: 0.13; }
.work-motif span { position: relative; font-size: 40px; line-height: 1; color: var(--lg-tint-ink); }
.work-motif [lang="ar"] { font-weight: 600; }
.work-motif [lang="en"] { font-family: var(--site-serif); font-style: italic; font-size: 38px; }
.work-body { display: flex; flex-direction: column; gap: 12px; padding: 26px 28px 28px; flex: 1; }
.media-pair + .work-body { flex: 0 0 auto; }
.work-body h3 { margin: 0; font-size: 27px; line-height: 1.15; }
html[lang="ar"] .work-body h3 { font-size: 24px; line-height: 1.4; }
.work-meta { margin: -4px 0 2px; font-size: var(--lg-text-sm); color: var(--lg-text-tertiary); }
.work-body p { margin: 0; font-size: var(--lg-text-md); line-height: 1.6; color: var(--lg-text-secondary); }
.work-facts { margin: 4px 0 0; display: grid; gap: 8px; font-size: var(--lg-text-md); padding-top: 14px; border-top: 0.5px solid var(--lg-separator); }
.work-facts div { display: grid; grid-template-columns: 68px 1fr; gap: 12px; }
.work-facts dt { color: var(--lg-text-tertiary); font-size: var(--lg-text-sm); padding-top: 1px; }
.work-facts dd { margin: 0; }
.call-note { margin-top: auto; padding: 14px 16px; border-radius: var(--lg-radius-sm); background: var(--lg-tint-soft); color: var(--lg-tint-ink); font-size: var(--lg-text-sm); line-height: 1.5; }

/* ---------- Vision: the page's one deliberate dark band ---------- */
.band { position: relative; isolation: isolate; margin-top: 112px; padding-block: 104px; background: var(--site-band); overflow: hidden; color-scheme: dark;
  --lg-text: #f4efe7; --lg-text-secondary: #bfb5a8; --lg-text-tertiary: #9a9083; --lg-separator: rgba(255, 240, 220, 0.14);
  --lg-fill: rgba(255, 240, 220, 0.08); --lg-bg-elevated: rgba(255, 240, 220, 0.045);
  --lg-tint: #f0a06e; --lg-tint-soft: rgba(240, 160, 110, 0.16); --lg-tint-ink: #f5b48a;
  --lg-warning: #ffb340; --lg-warning-soft: rgba(255, 179, 64, 0.14); --lg-edge: 0 0 0 0.5px rgba(255, 240, 220, 0.12);
  color: var(--lg-text); }
.band > .pattern { z-index: -1; opacity: 0.06; }
.vision { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: start; }
.vision .statement { margin: 0; font-size: clamp(32px, 3.6vw, 48px); line-height: 1.15; letter-spacing: -0.015em; }
html[lang="ar"] .vision .statement { line-height: 1.5; font-size: clamp(28px, 3.2vw, 40px); }
.vision-points { margin: 0; padding: 0; list-style: none; display: grid; gap: 18px; color: var(--lg-text-secondary); font-size: 18px; line-height: 1.6; }
.vision-points li { position: relative; padding-inline-start: 24px; }
.vision-points li::before { content: ""; position: absolute; inset-inline-start: 0; top: 0.62em; width: 8px; height: 8px; transform: rotate(45deg); background: var(--lg-tint); opacity: 0.85; }
.vision-source { margin: 28px 0 0; padding-top: 18px; border-top: 0.5px solid var(--lg-separator); font-size: var(--lg-text-sm); color: var(--lg-text-tertiary); line-height: 1.55; }

/* ---------- Sources ---------- */
.sources { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.source-card { display: flex; flex-direction: column; gap: 12px; padding: 28px; box-shadow: var(--lg-edge), var(--lg-lift-1); }
.source-card .kind { display: flex; align-items: center; gap: 10px; color: var(--lg-text-tertiary); font-size: var(--lg-text-sm); font-weight: 500; }
.source-card .kind svg { width: 20px; height: 20px; color: var(--lg-tint); }
.source-card .year { font-family: var(--site-serif); font-size: 52px; line-height: 1; letter-spacing: -0.02em; color: var(--lg-tint-ink); font-variant-numeric: lining-nums; }
.source-card h3 { margin: 0; font-size: 18px; font-weight: 600; line-height: 1.35; }
.source-card p { margin: 0; font-size: var(--lg-text-md); color: var(--lg-text-secondary); line-height: 1.6; }
.source-card .cite { margin-top: auto; padding-top: 14px; border-top: 0.5px solid var(--lg-separator); font-size: var(--lg-text-sm); }
.method { margin-top: 28px; font-size: var(--lg-text-md); color: var(--lg-text-secondary); max-width: 74ch; line-height: 1.6; }

/* ---------- Contact over photography ---------- */
.contact { position: relative; border-radius: var(--lg-radius-xl); overflow: hidden; min-height: 460px; display: grid; align-items: end; padding: 28px; isolation: isolate; }
.contact > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -1; }
.contact-panel { max-width: 580px; padding: 36px; border-radius: var(--lg-radius-xl); }
.contact-panel h2 { margin: 0 0 14px; font-size: clamp(30px, 3.4vw, 42px); line-height: 1.1; }
html[lang="ar"] .contact-panel h2 { line-height: 1.4; font-size: clamp(26px, 3vw, 36px); }
.contact-panel p { margin: 0; line-height: 1.6; font-size: 17px; }

/* ---------- Credits and footer ---------- */
.credits { margin-top: 56px; font-size: var(--lg-text-sm); color: var(--lg-text-secondary); }
.credits h2 { font-size: var(--lg-text-sm); font-weight: 600; color: var(--lg-text-tertiary); margin: 0 0 12px; text-transform: uppercase; letter-spacing: 0.08em; }
html[lang="ar"] .credits h2 { text-transform: none; font-size: var(--lg-text-md); }
.credits ul { margin: 0; padding-inline-start: 1.1em; columns: 2; column-gap: 56px; }
.credits li { break-inside: avoid; margin-bottom: 8px; }
.credits a { color: var(--lg-text-secondary); }
.credits p { margin: 14px 0 0; color: var(--lg-text-tertiary); }
.site-footer { margin-top: 96px; padding-block: 56px 44px; border-top: 0.5px solid var(--lg-separator); background: var(--lg-surface-grouped); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px 72px; align-items: start; }
.footer-name { margin: 0; font-size: 30px; line-height: 1.15; }
.footer-alt { margin: 6px 0 0; font-size: 20px; color: var(--lg-tint-ink); }
html[lang="en"] .footer-alt { font-weight: 600; }
html[lang="ar"] .footer-alt { font-family: var(--site-serif); }
.footer-tag { margin: 14px 0 0; color: var(--lg-text-secondary); font-size: var(--lg-text-md); max-width: 44ch; }
.footer-nav { display: grid; grid-template-columns: repeat(2, minmax(0, max-content)); gap: 10px 48px; justify-content: end; }
.footer-nav a { color: var(--lg-text-secondary); text-decoration: none; font-size: var(--lg-text-md); }
.footer-nav a:hover { color: var(--lg-text); text-decoration: underline; }
.footer-meta { grid-column: 1 / -1; padding-top: 22px; border-top: 0.5px solid var(--lg-separator); font-size: var(--lg-text-sm); color: var(--lg-text-tertiary); display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }

/* ---------- Responsive: every multi-column block states its phone layout ---------- */
/* Top bar: below 1020px the section links fold into the menu button at the far right; below 600px Contact moves into the menu;
   on phones the name shortens and the theme follows the device. The controls never trade places between languages. */
@media (max-width: 1020px) {
  .nav-inner { grid-template-columns: minmax(0, 1fr) auto; }
  .nav-links { display: none; }
  .menu-btn { display: inline-grid; }
}
@media (max-width: 600px) {
  .nav-cta { display: none; }
  .site-menu .menu-cta { display: flex; }
}
@media (max-width: 1020px) {
  .hero { grid-template-columns: 1fr; gap: 48px; padding-top: 48px; }
  .hero h1 { max-width: 14ch; }
  .section-head, .vision, .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .chapter { grid-template-columns: 200px minmax(0, 1fr); gap: 40px; }
  .places { justify-self: start; }
  .footer-nav { justify-content: start; }
  .work { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .span-4 { grid-column: 1 / -1; } .span-3, .span-2 { grid-column: span 1; }
  .sources { grid-template-columns: 1fr; }
  .proof { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .proof > div:nth-child(3) { border-inline-start: 0; padding-inline-start: 0; }
  .proof > div:nth-child(n+3) { border-top: 0.5px solid var(--lg-separator); }
}
@media (max-width: 760px) {
  section { padding-top: 80px; }
  .band { margin-top: 80px; padding-block: 80px; }
  .work { grid-template-columns: 1fr; }
  .span-4, .span-3, .span-2 { grid-column: 1 / -1; }
  .media-pair { grid-template-columns: 1fr; aspect-ratio: auto; }
  .media-pair img { aspect-ratio: 16 / 9; }
  .media-pair img + img { display: none; }
  .work-body { padding: 22px; }
  .stage { padding-bottom: 52px; }
  .portrait { width: 100px; height: 100px; inset-inline-start: 16px; border-width: 4px; }
  .id-card { inset-inline: 130px 12px; bottom: 66px; padding: 12px 14px; }
  .stage .photo-credit { bottom: 2px; max-width: calc(100% - 132px); }
  .stage-frame { aspect-ratio: 4 / 4.2; }
  .contact { padding: 14px; min-height: 420px; }
  .contact-panel { padding: 26px; }
  .credits ul { columns: 1; }
  .chapter { grid-template-columns: 1fr; gap: 14px; padding-block: 32px; }
  .hero .lead, .chapter p { font-size: 18px; }
}
@media (max-width: 430px) {
  .brand .full { display: none; }
  .brand .short { display: inline; }
  #theme { display: none; }
  .nav-inner { gap: 10px; padding-inline: 14px 8px; }
  .lang-seg { width: 92px; }
  .proof > div { padding-inline-end: 12px; }
  .proof > div + div { padding-inline-start: 16px; }
  .id-card span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .work-media img, .work-card:hover .work-media img { transition: none; transform: none; }
  .work-card:hover .media-fit .sharp { transform: translateX(-50%); }
}

/* ==========================================================================
   Motion: theme and language transitions
   Theme: the new appearance spreads in a circle from the toggle (View Transitions; script in site.js).
   Language: the layout mirrors, so the motion mirrors too. The nav holds still, the hero photo and
   portrait glide to their mirrored places, and the page slides and dissolves in the new reading direction.
   Browsers without View Transitions get a short fade; reduced motion gets an instant switch.
   ========================================================================== */
@view-transition { navigation: auto; }

.lg-nav { view-transition-name: site-nav; }
.stage-frame { view-transition-name: hero-photo; }
.portrait { view-transition-name: hero-portrait; }
.id-card { view-transition-name: hero-card; }
/* The language switch: the highlight slides under the two labels while the rest of the bar holds still */
.lang-thumb { view-transition-name: lang-thumb; }
.lang-opt[lang="en"] { view-transition-name: lang-en; }
.lang-opt[lang="ar"] { view-transition-name: lang-ar; }
/* Only pair the hero when it is on screen on both sides; during a theme change, capture the page as one layer */
.vt-no-hero .stage-frame, .vt-no-hero .portrait, .vt-no-hero .id-card,
.vt-theme .lg-nav, .vt-theme .stage-frame, .vt-theme .portrait, .vt-theme .id-card,
.vt-theme .lang-thumb, .vt-theme .lang-opt { view-transition-name: none; }

@keyframes lang-out-right { to { opacity: 0; transform: translateX(32px); filter: blur(6px); } }
@keyframes lang-out-left  { to { opacity: 0; transform: translateX(-32px); filter: blur(6px); } }
@keyframes lang-in-from-left  { from { opacity: 0; transform: translateX(-32px); filter: blur(6px); } }
@keyframes lang-in-from-right { from { opacity: 0; transform: translateX(32px); filter: blur(6px); } }

/* These rules live in the destination page: html[lang] is the language being opened */
html[lang="ar"]::view-transition-old(root) { animation: 280ms cubic-bezier(0.4, 0, 1, 1) both lang-out-right; }
html[lang="ar"]::view-transition-new(root) { animation: 560ms 140ms cubic-bezier(0.2, 0.8, 0.2, 1) both lang-in-from-left; }
html[lang="en"]::view-transition-old(root) { animation: 280ms cubic-bezier(0.4, 0, 1, 1) both lang-out-left; }
html[lang="en"]::view-transition-new(root) { animation: 560ms 140ms cubic-bezier(0.2, 0.8, 0.2, 1) both lang-in-from-right; }
::view-transition-group(hero-photo),
::view-transition-group(hero-card),
::view-transition-group(hero-portrait) { animation-duration: 760ms; animation-timing-function: cubic-bezier(0.65, 0, 0.35, 1); }
::view-transition-group(hero-card) { z-index: 2; }
::view-transition-group(hero-portrait) { z-index: 3; }
/* The caption's text differs between languages: keep both snapshots at their own size instead of stretching */
::view-transition-old(hero-card), ::view-transition-new(hero-card) { height: 100%; width: auto; object-fit: none; }
::view-transition-group(site-nav) { animation-duration: 420ms; animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1); z-index: 4; }
::view-transition-group(lang-thumb) { z-index: 5; animation-duration: 560ms; animation-timing-function: cubic-bezier(0.34, 1.3, 0.64, 1); }
::view-transition-group(lang-en), ::view-transition-group(lang-ar) { z-index: 6; animation-duration: 420ms; }

/* Theme: the incoming appearance is revealed by a clip-path circle animated from the script */
:root.vt-theme::view-transition-old(root),
:root.vt-theme::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
:root.vt-theme::view-transition-new(root) { z-index: 2; }

/* Sun and moon: the icon shows the appearance you will switch to, and turns over when it changes */
#theme { position: relative; }
#theme svg { position: absolute; inset: 0; margin: auto; transition: transform 560ms cubic-bezier(0.34, 1.4, 0.64, 1), opacity 260ms ease; }
#theme .i-sun { opacity: 0; transform: rotate(-90deg) scale(0.4); }
:root[data-theme="dark"] #theme .i-sun { opacity: 1; transform: none; }
:root[data-theme="dark"] #theme .i-moon { opacity: 0; transform: rotate(90deg) scale(0.4); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) #theme .i-sun { opacity: 1; transform: none; }
  :root:not([data-theme="light"]) #theme .i-moon { opacity: 0; transform: rotate(90deg) scale(0.4); }
}

/* Fallback for browsers without View Transitions */
html.theme-fade, html.theme-fade *, html.theme-fade *::before, html.theme-fade *::after {
  transition: background-color 450ms ease, color 450ms ease, border-color 450ms ease, fill 450ms ease, stroke 450ms ease, box-shadow 450ms ease !important; }
html.leave-to-ar body, html.leave-to-en body { opacity: 0; filter: blur(4px); transition: opacity 240ms ease, transform 240ms ease, filter 240ms ease; }
html.leave-to-ar body { transform: translateX(28px); }
html.leave-to-en body { transform: translateX(-28px); }
html.enter-to-ar body { animation: lang-in-from-left 560ms cubic-bezier(0.2, 0.8, 0.2, 1) both; }
html.enter-to-en body { animation: lang-in-from-right 560ms cubic-bezier(0.2, 0.8, 0.2, 1) both; }

@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  #theme svg { transition: none; }
  html.enter-to-ar body, html.enter-to-en body { animation: none; }
}

