/* Nadia I. Alshawi — site styles. Mobile first; layout is pure CSS. */

/* ── Fonts (self-hosted) ─────────────────────────────────────────────── */
@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 400; font-display: swap; src: url(/assets/fonts/cormorant-garamond-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 500; font-display: swap; src: url(/assets/fonts/cormorant-garamond-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-style: italic; font-weight: 400; font-display: swap; src: url(/assets/fonts/cormorant-garamond-latin-400-italic.woff2) format("woff2"); }
@font-face { font-family: "Lora"; font-style: normal; font-weight: 400; font-display: swap; src: url(/assets/fonts/lora-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Lora"; font-style: italic; font-weight: 400; font-display: swap; src: url(/assets/fonts/lora-latin-400-italic.woff2) format("woff2"); }
@font-face { font-family: "Lora"; font-style: normal; font-weight: 600; font-display: swap; src: url(/assets/fonts/lora-latin-600-normal.woff2) format("woff2"); }

@font-face { font-family: "Amiri"; font-style: normal; font-weight: 400; font-display: swap; src: url(/assets/fonts/amiri-arabic-400-normal.woff2) format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "Noto Naskh Arabic"; font-style: normal; font-weight: 400; font-display: swap; src: url(/assets/fonts/noto-naskh-arabic-arabic-400-normal.woff2) format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "Noto Naskh Arabic"; font-style: normal; font-weight: 600; font-display: swap; src: url(/assets/fonts/noto-naskh-arabic-arabic-600-normal.woff2) format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }

/* ── Tokens ──────────────────────────────────────────────────────────── */
:root {
  --bg: #f3f2f2;
  --surface: #eae9e9;
  --surface-2: #e2dfdc;
  --text: #201f1d;
  --muted: #5f5b57;
  --accent: #b68235;
  --accent-ink: #8f5f1c;
  --divider: rgba(32, 31, 29, .15);
  --band-bg: #1a1714;
  --band-text: #ece8e1;
  --shadow: 0 18px 50px -24px rgba(32, 31, 29, .35);
  --header-bg: rgba(243, 242, 242, .82);

  --font-display: "Cormorant Garamond", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-body: "Lora", "Iowan Old Style", Georgia, serif;
  --font-ar: "Noto Naskh Arabic", "Geeza Pro", "SF Arabic", serif;
  --font-ar-display: "Amiri", "Noto Naskh Arabic", "Geeza Pro", serif;
  --flip: 1;

  --gutter: clamp(18px, 5vw, 104px);
  --maxw: 1760px;
  --header-h: 68px;
  --radius: 4px;
  --ease: cubic-bezier(.2, .75, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --sadu: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='12'%3E%3Cpath d='M14 1L22 6L14 11L6 6Z' fill='none' stroke='%23000'/%3E%3Cpath d='M14 4L18 6L14 8L10 6Z'/%3E%3C/svg%3E");
  color-scheme: light;
}
:root[lang="ar"] {
  --font-display: "Amiri", "Cormorant Garamond", Georgia, serif;
  --font-body: "Noto Naskh Arabic", "Lora", Georgia, serif;
}
[dir="rtl"] { --flip: -1; }
:root[data-theme="dark"] {
  --bg: #161412;
  --surface: #211e1b;
  --surface-2: #2a2622;
  --text: #ece8e1;
  --muted: #aaa39a;
  --accent: #c9974e;
  --accent-ink: #dcae68;
  --divider: rgba(236, 232, 225, .15);
  --band-bg: #0e0c0b;
  --shadow: 0 18px 50px -20px rgba(0, 0, 0, .7);
  --header-bg: rgba(22, 20, 18, .8);
  color-scheme: dark;
}

/* ── Base ────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh;
  background: var(--bg); color: var(--text);
  font: 400 clamp(16px, .94rem + .2vw, 18px)/1.65 var(--font-body);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
html.theme-anim body, html.theme-anim body * { transition: background-color .45s var(--ease), color .45s var(--ease), border-color .45s var(--ease) !important; }
img, svg, picture { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: .2em; text-decoration-thickness: 1px; transition: color .25s var(--ease), text-decoration-color .25s var(--ease); }
a:hover { color: var(--accent-ink); text-decoration-color: currentColor; }
p { margin: 0 0 1em; text-wrap: pretty; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 400; line-height: 1.08; margin: 0; text-wrap: balance; letter-spacing: -.01em; }
em { font-style: italic; }
ul { margin: 0; padding: 0; }
button { font: inherit; color: inherit; }
::selection { background: color-mix(in srgb, var(--accent) 30%, transparent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
[hidden] { display: none !important; }
.icon.flip { transform: scaleX(var(--flip)); }
:root:not([lang="ar"]) [lang="ar"] { font-family: var(--font-ar-display); }
[lang="ar"], [lang="ar"] * { letter-spacing: 0 !important; }
:root[lang="ar"] body { line-height: 1.95; }
:root[lang="ar"] :is(h1, h2, h3, h4, .display, .h1, .h2, .h3, .row__title, .card__title, .cred__title, .contact__value, .menu__label, .stat__label) { line-height: 1.4; }
:root[lang="ar"] .display { font-size: clamp(2.2rem, 1.2rem + 3.4vw, 4.4rem); }
:root[lang="ar"] .h1 { font-size: clamp(2rem, 1.25rem + 2.6vw, 3.7rem); }
:root[lang="ar"] :is(em, .article__dek) { font-style: normal; }
:root[lang="ar"] .kicker { font-size: .9rem; font-weight: 600; }
:root[lang="ar"] :is(.card__meta, .tag, .facts-list dt) { font-size: .82rem; }
:root[lang="ar"] .lead { line-height: 1.9; }
.muted { color: var(--muted); }
.icon { width: 1.15em; height: 1.15em; flex: none; }

.container { width: min(100% - 2 * var(--gutter), var(--maxw)); margin-inline: auto; }
.skip { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100; padding: 10px 16px; background: var(--text); color: var(--bg); border-radius: var(--radius); transition: top .2s; }
.skip:focus { top: 12px; color: var(--bg); }

/* ── Type scale ──────────────────────────────────────────────────────── */
.display { font-size: clamp(2.5rem, 1.25rem + 4.4vw, 5.6rem); line-height: 1.01; letter-spacing: -.025em; }
.display em, .h1 em { color: var(--accent); }
.h1 { font-size: clamp(2.2rem, 1.3rem + 3.2vw, 4.4rem); line-height: 1.03; letter-spacing: -.02em; }
.h2 { font-size: clamp(1.9rem, 1.35rem + 2vw, 3.3rem); }
.h3 { font-size: clamp(1.35rem, 1.15rem + .7vw, 1.85rem); line-height: 1.15; }
.kicker { font: 500 .74rem/1.4 var(--font-body); letter-spacing: .18em; text-transform: uppercase; color: var(--accent-ink); margin: 0 0 1.1rem; display: flex; flex-wrap: wrap; gap: .4rem 1rem; align-items: baseline; }
.h1 + .lead, .h2 + .lead, .display + .lead, .h2 + .bullets { margin-top: 1.2rem; }
.kicker .alt { text-transform: none; font-size: 1.25rem; color: var(--muted); font-weight: 400; }
.kicker .alt:lang(en) { font: 400 1.15rem/1 "Cormorant Garamond", Georgia, serif; }
.lead { font-size: clamp(1.05rem, .98rem + .35vw, 1.25rem); line-height: 1.6; color: color-mix(in srgb, var(--text) 86%, var(--bg)); max-width: 62ch; }
.prose { max-width: 68ch; }
.prose p { line-height: 1.75; }
.prose a { color: var(--accent-ink); }
@media (min-width: 900px) { :root:not([lang="ar"]) :is(.prose p, .prose--article p) { text-align: justify; hyphens: auto; } }

/* ── Sadu rule ───────────────────────────────────────────────────────── */
.sadu { height: 12px; background: var(--accent); -webkit-mask: var(--sadu) repeat-x left center / 28px 12px; mask: var(--sadu) repeat-x left center / 28px 12px; }
.js .sadu--draw { clip-path: inset(0 100% 0 0); animation: draw 1.6s .5s var(--ease-out) forwards; }
@keyframes draw { to { clip-path: inset(0 0 0 0); } }

/* ── Buttons & links ─────────────────────────────────────────────────── */
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 2rem; }
.actions--end { padding-top: 2rem; border-top: 1px solid var(--divider); }
.btn {
  --b: var(--divider);
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  min-height: 48px; padding: .7em 1.35em; border: 1px solid var(--b); border-radius: var(--radius);
  background: transparent; color: var(--text); font: 500 .95rem/1.2 var(--font-body); letter-spacing: .01em;
  text-decoration: none; cursor: pointer; position: relative; overflow: hidden; isolation: isolate;
  transition: border-color .3s var(--ease), color .3s var(--ease), transform .3s var(--ease);
}
.btn::before { content: ""; position: absolute; inset: 0; z-index: -1; background: color-mix(in srgb, var(--accent) 12%, transparent); transform: scaleX(0); transform-origin: left; transition: transform .45s var(--ease-out); }
[dir="rtl"] .btn::before { transform-origin: right; }
.btn:hover { --b: var(--accent); color: var(--text); }
.btn:hover::before { transform: scaleX(1); }
.btn:active { transform: translateY(1px); }
.btn .icon { transition: transform .35s var(--ease); }
.btn:hover .icon.flip { transform: scaleX(var(--flip)) translateX(3px); }
.btn--primary { --b: var(--accent); color: var(--accent-ink); }
.btn--primary:hover { color: var(--accent-ink); }
.btn--sm { min-height: 40px; padding: .45em 1em; font-size: .85rem; }
.more { display: inline-flex; align-items: center; gap: .5em; color: var(--accent-ink); font-size: .95rem; text-decoration: none; padding: .5em 0; }
.more .icon { transition: transform .35s var(--ease); }
.more:hover .icon, a:hover > .more .icon { transform: scaleX(var(--flip)) translateX(4px); }
.back { display: inline-flex; align-items: center; gap: .5em; font-size: .9rem; text-decoration: none; margin-bottom: 1.6rem; padding: .4em 0; color: var(--muted); }
.back:hover .icon { transform: scaleX(var(--flip)) translateX(-3px); }
.back .icon { transition: transform .3s var(--ease); }
.icon-btn { width: 44px; height: 44px; display: inline-grid; place-items: center; border: 1px solid var(--divider); border-radius: var(--radius); background: transparent; cursor: pointer; transition: border-color .25s, color .25s, background-color .25s; }
.icon-btn:hover { border-color: var(--accent); color: var(--accent-ink); }

/* ── Header ──────────────────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 60; height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding-inline: max(var(--gutter), env(safe-area-inset-left)) max(var(--gutter), env(safe-area-inset-right));
  background: var(--header-bg); -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: transform .5s var(--ease-out), border-color .3s, background-color .3s, box-shadow .3s;
}
html:not(.vt-theme) .site-header { view-transition-name: site-header; }
.is-scrolled .site-header { border-bottom-color: var(--divider); box-shadow: 0 10px 30px -24px rgba(0, 0, 0, .35); }
.header-hidden:not(.menu-open) .site-header { transform: translateY(calc(-100% - 2px)); }
.menu-open .site-header { background: var(--bg); border-bottom-color: transparent; box-shadow: none; }
.brand { display: inline-flex; align-items: center; gap: 12px; font: 400 1.35rem/1 var(--font-display); text-decoration: none; white-space: nowrap; letter-spacing: -.01em; }
.brand:hover { color: var(--text); }
.brand__mark { width: 11px; height: 11px; flex: none; border: 1px solid var(--accent); transform: rotate(45deg); transition: transform .6s var(--ease), background-color .3s; }
.brand:hover .brand__mark { transform: rotate(225deg); background: var(--accent); }
.nav { display: none; }
.site-header__actions { display: flex; align-items: center; gap: 6px; }
.nav-cv { display: none !important; }
.icon-btn, .lang-btn { width: 42px; height: 42px; }
.lang-btn { display: inline-grid; place-items: center; border: 1px solid var(--divider); border-radius: var(--radius); text-decoration: none; font-size: .95rem; line-height: 1; transition: border-color .25s, color .25s, background-color .25s; }
.lang-btn:hover { border-color: var(--accent); color: var(--accent-ink); }
.lang-btn__full { display: none; }
.lang-btn[lang="ar"] { font-family: var(--font-ar-display); font-size: 1.2rem; }
.lang-btn[lang="en"] { font-family: "Lora", Georgia, serif; font-size: .85rem; letter-spacing: .06em; }
.theme-toggle .icon { width: 19px; height: 19px; transition: transform .5s var(--ease), opacity .3s; }
.theme-toggle { position: relative; }
.theme-toggle .i-sun { position: absolute; opacity: 0; transform: rotate(-90deg) scale(.6); }
[data-theme="dark"] .theme-toggle .i-sun { opacity: 1; transform: none; }
[data-theme="dark"] .theme-toggle .i-moon { opacity: 0; transform: rotate(90deg) scale(.6); }
.menu-toggle { position: relative; }
.menu-toggle span { position: absolute; inset-inline: 11px; height: 1.5px; border-radius: 2px; background: currentColor; transition: transform .5s var(--ease-out), top .5s var(--ease-out), opacity .25s, inset .5s var(--ease-out); }
.menu-toggle span:nth-child(1) { top: 14px; }
.menu-toggle span:nth-child(2) { top: 20px; inset-inline-end: 18px; }
.menu-toggle span:nth-child(3) { top: 26px; }
.menu-toggle:hover span:nth-child(2) { inset-inline-end: 11px; }
.menu-open .menu-toggle { border-color: var(--accent); color: var(--accent-ink); }
.menu-open .menu-toggle span:nth-child(1) { top: 20px; transform: rotate(45deg); }
.menu-open .menu-toggle span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.menu-open .menu-toggle span:nth-child(3) { top: 20px; transform: rotate(-45deg); }

@media (min-width: 1100px) {
  :root { --header-h: 78px; }
  .brand { font-size: 1.6rem; }
  .nav { display: flex; position: relative; gap: clamp(20px, 2.2vw, 38px); margin-inline: auto; }
  .nav a { position: relative; font: 400 1.15rem/1 var(--font-display); text-decoration: none; padding: 12px 0; transition: color .3s; }
  .nav a:hover { color: var(--text); }
  .nav a[aria-current] { color: var(--accent-ink); }
  .nav__ind { position: absolute; bottom: 4px; inset-inline-start: 0; height: 1px; width: var(--ind-w, 0); background: var(--accent); transform: translateX(var(--ind-x, 0)); opacity: var(--ind-o, 0); pointer-events: none; transition: transform .45s var(--ease-out), width .45s var(--ease-out), opacity .3s; }
  [dir="rtl"] .nav__ind { inset-inline-start: auto; left: 0; }
  .no-js .nav a[aria-current]::after { content: ""; position: absolute; inset-inline: 0; bottom: 4px; height: 1px; background: var(--accent); }
  .nav-cv { display: inline-flex !important; }
  .lang-btn { width: auto; padding-inline: 14px; border-radius: 999px; }
  .lang-btn__full { display: inline; }
  .lang-btn__short { display: none; }
  .lang-btn[lang="en"] { letter-spacing: .02em; font-size: .9rem; }
  .menu-toggle, .menu { display: none !important; }
}

/* ── Mobile menu ─────────────────────────────────────────────────────── */
.menu {
  --mx: calc(100% - 40px); --my: 34px;
  position: fixed; inset: 0; z-index: 55; display: flex; flex-direction: column; justify-content: space-between; gap: 28px;
  padding: calc(var(--header-h) + 8px) var(--gutter) max(24px, env(safe-area-inset-bottom));
  background: var(--bg); overflow-y: auto; overscroll-behavior: contain;
  visibility: hidden; clip-path: circle(0px at var(--mx) var(--my));
  transition: clip-path .55s cubic-bezier(.65, 0, .35, 1) .12s, visibility 0s .7s;
}
.menu::after { content: ""; position: absolute; inset-inline: var(--gutter); bottom: max(10px, env(safe-area-inset-bottom)); height: 12px; background: var(--accent); opacity: .35; -webkit-mask: var(--sadu) repeat-x left center / 28px 12px; mask: var(--sadu) repeat-x left center / 28px 12px; pointer-events: none; }
html.menu-open { overflow: hidden; }
.menu-open .menu { visibility: visible; clip-path: circle(150vmax at var(--mx) var(--my)); transition: clip-path .7s var(--ease-out), visibility 0s; }
.menu__nav { display: flex; flex-direction: column; }
.menu__nav a {
  display: grid; grid-template-columns: 2.4rem 1fr auto; align-items: center; gap: 10px; min-height: 56px;
  border-bottom: 1px solid var(--divider); text-decoration: none;
  opacity: 0; transform: translateY(18px); transition: opacity .2s var(--ease), transform .3s var(--ease), color .2s;
}
.menu__n { font: 400 .78rem/1 var(--font-body); color: var(--accent-ink); font-variant-numeric: tabular-nums; }
.menu__label { font: 400 clamp(1.6rem, 1.15rem + 2.2vw, 2.3rem)/1.1 var(--font-display); }
.menu__nav a .icon { width: 20px; color: var(--accent); opacity: 0; transform: translateX(-8px) scaleX(var(--flip)); transition: opacity .3s, transform .4s var(--ease-out); }
.menu__nav a:hover .icon, .menu__nav a[aria-current] .icon { opacity: .9; transform: scaleX(var(--flip)); }
.menu__nav a[aria-current] { color: var(--accent-ink); }
.menu-open .menu__nav a { opacity: 1; transform: none; transition: opacity .5s var(--ease), transform .7s var(--ease-out), color .2s; transition-delay: calc(.18s + var(--i) * .045s); }
.menu__foot { display: grid; gap: 18px; padding-bottom: 28px; opacity: 0; transform: translateY(12px); transition: opacity .2s, transform .3s var(--ease); }
.menu-open .menu__foot { opacity: 1; transform: none; transition: opacity .5s .55s, transform .7s .55s var(--ease-out); }
.menu__tools { display: flex; flex-wrap: wrap; gap: 10px; }
.menu__tools .btn { flex: 1 1 140px; }
.menu__contact { display: flex; flex-direction: column; gap: 4px; color: var(--muted); font-size: .95rem; }
.menu__contact a { text-decoration: none; }

/* ── Media & frames ──────────────────────────────────────────────────── */
.media { display: block; position: relative; overflow: hidden; background-size: cover; background-position: var(--pos, center); }
.media picture { width: 100%; height: 100%; }
.media img { width: 100%; height: 100%; object-fit: cover; object-position: var(--pos, center); transition: opacity .7s var(--ease), transform 1.1s var(--ease-out), filter .7s var(--ease); }
.js .media img:not(.is-loaded) { opacity: 0; }
.media[style*="aspect-ratio"] img { position: absolute; inset: 0; }

.arch { position: relative; margin: 0; padding: 14px 14px 0; }
.arch::before { content: ""; position: absolute; inset: 0 0 25px; border: 1px solid var(--accent); border-radius: 999px 999px 0 0; pointer-events: none; transition: transform .6s var(--ease-out); }
.arch .media { border-radius: 999px 999px 0 0; border: 6px solid var(--surface); }
.arch .sadu { margin-top: 13px; }

.lb { display: block; position: relative; text-decoration: none; cursor: zoom-in; }
.lb__zoom { position: absolute; inset-inline-end: 12px; bottom: 12px; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: rgba(20, 18, 16, .55); color: #fff; opacity: 0; transform: scale(.8); transition: opacity .3s, transform .4s var(--ease-out); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.lb__zoom .icon { width: 16px; height: 16px; }
.lb:hover .lb__zoom, .lb:focus-visible .lb__zoom { opacity: 1; transform: none; }
.lb:hover .media img { transform: scale(1.04); }
@media (hover: none) { .lb__zoom { opacity: .9; transform: none; width: 32px; height: 32px; } }

.fig { margin: 0; }
.fig figcaption, .masonry figcaption { margin-top: .75rem; font-size: .88rem; line-height: 1.5; color: var(--muted); }
.fig--hero .media { border-radius: var(--radius); }
.figs { display: grid; gap: clamp(16px, 2.4vw, 32px); grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.figs .media { border-radius: var(--radius); }

/* ── Reveal on scroll ────────────────────────────────────────────────── */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal, .js .reveal-group > * { opacity: 0; transform: translateY(22px); transition: opacity .9s var(--ease), transform 1s var(--ease-out); transition-delay: calc(var(--d, 0) * 90ms); }
  .js .reveal.is-in, .js .reveal-group.is-in > * { opacity: 1; transform: none; }
  .js .hero__in { opacity: 0; transform: translateY(24px); animation: rise 1.1s var(--ease-out) forwards; animation-delay: calc(.12s + var(--d, 0) * .12s); }
  html.intro .hero__in { animation-delay: calc(1.45s + var(--d, 0) * .12s); }
}
@keyframes rise { to { opacity: 1; transform: none; } }

/* ── Intro (first visit, home only) ──────────────────────────────────── */
.intro-screen { display: none; }
html.intro .intro-screen {
  position: fixed; inset: 0; z-index: 200; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px;
  background: var(--bg); animation: intro-out .7s 1.15s var(--ease) forwards; pointer-events: none;
}
.intro-screen__name { margin: 0; font: 400 clamp(2rem, 1.4rem + 3vw, 3.2rem)/1 var(--font-display); letter-spacing: -.01em; animation: rise .9s var(--ease-out) both; }
.intro-screen__rule { width: min(280px, 60vw); }
.intro-screen__rule .sadu { clip-path: inset(0 100% 0 0); animation: draw 1s .15s var(--ease-out) forwards; }
.intro-screen__ar { margin: 0; font-family: var(--font-ar); font-size: 1.3rem; color: var(--muted); animation: rise .9s .25s var(--ease-out) both; }
@keyframes intro-out { to { opacity: 0; visibility: hidden; transform: translateY(-2%); } }

/* ── Sections ────────────────────────────────────────────────────────── */
.section { padding-block: clamp(56px, 4rem + 4vw, 136px) 0; }
.section--tight { padding-top: clamp(24px, 3vw, 48px); }
.section__head { margin-bottom: clamp(28px, 3.5vw, 56px); }
.section__head .h2 + .lead { margin-top: 1rem; }
.section__head--row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; }
.page-head { padding-top: clamp(36px, 6vw, 104px); }
.page-head .lead { margin-top: 1.4rem; }
main { padding-bottom: clamp(64px, 8vw, 140px); }

/* Hero */
.hero { display: grid; gap: clamp(36px, 5vw, 96px); align-items: center; padding-block: clamp(32px, 6vw, 112px) clamp(32px, 4vw, 64px); }
.hero .display { margin-bottom: 1.6rem; max-width: 18ch; }
:root[lang="ar"] .hero .display { max-width: 16em; }
.hero .lead { max-width: 58ch; }
.hero__art { position: relative; width: min(100%, 420px); justify-self: center; padding-bottom: 8%; }
.hero__accent { position: absolute; inset-inline-start: -2%; bottom: 0; width: 40%; aspect-ratio: 1; border-radius: 50%; background: var(--bg); box-shadow: var(--shadow); display: block; isolation: isolate; }
.hero__ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); z-index: 2; pointer-events: none; }
.hero__ring circle { fill: none; stroke: var(--accent); stroke-width: 1.4; stroke-linecap: round; stroke-dasharray: 301.6; stroke-dashoffset: 301.6; }
.hero__accent.is-playing .hero__ring circle { animation: ring var(--slide-ms, 6000ms) linear forwards; }
@keyframes ring { to { stroke-dashoffset: 0; } }
.slides { position: absolute; inset: 7px; border-radius: 50%; overflow: hidden; background: var(--surface); }
.slide { position: absolute; inset: 0; background-size: cover; background-position: var(--pos, center); opacity: 0; transition: opacity 1.8s var(--ease); }
.slide img { width: 100%; height: 100%; object-fit: cover; object-position: var(--pos, center); transform: scale(1.1); transition: transform 8s cubic-bezier(.25, .1, .25, 1); }
.slide.is-active { opacity: 1; z-index: 1; }
.slide.is-active img { transform: scale(1); }
.slide--logo { background: #fff !important; }
.slide--logo img { object-fit: contain; padding: 8%; transform: scale(.94); }
.slide--logo.is-active img { transform: scale(1); }
.hero__accent:hover .slide.is-active img { transform: scale(1.05); }
@media (min-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr); }
  .hero__art { justify-self: end; width: min(100%, 470px); }
  .hero__accent { inset-inline-start: -12%; }
}

/* Stats */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; margin-top: clamp(28px, 4vw, 56px); border-top: 1px solid var(--divider); }
.stat { display: flex; flex-direction: column; gap: 4px; padding-block: 22px; padding-inline: 0 16px; border-bottom: 1px solid var(--divider); }
.stat__n { align-self: flex-start; font: 400 clamp(2.4rem, 1.8rem + 2vw, 3.6rem)/1 var(--font-display); color: var(--accent); font-variant-numeric: lining-nums; }
.stat__label { font-size: .88rem; color: var(--muted); max-width: 18ch; }
@media (min-width: 760px) { .stats { grid-template-columns: repeat(4, 1fr); } .stat { padding-block: 30px; padding-inline: 0 24px; border-bottom: 0; } .stat + .stat { padding-inline-start: 24px; border-inline-start: 1px solid var(--divider); } }

/* Practice cards: swipeable row on phones, grid above */
.practice { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 76%); gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 10px; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter); scrollbar-width: none; }
.practice::-webkit-scrollbar { display: none; }
.practice__card { scroll-snap-align: start; text-decoration: none; display: flex; flex-direction: column; }
.practice__card .h3 { margin: 1.1rem 0 .4rem; transition: color .3s; }
.practice__card p { color: var(--muted); font-size: .95rem; margin: 0; }
.practice__card .more { margin-top: auto; padding-top: .9rem; }
.practice__card:hover { color: var(--text); }
.practice__card:hover .h3 { color: var(--accent-ink); }
.practice__card:hover .arch::before { transform: translateY(-6px); }
.practice__card:hover .media img { transform: scale(1.05); }
@media (min-width: 760px) { .practice { grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); grid-auto-columns: auto; overflow: visible; margin-inline: 0; padding-inline: 0; gap: clamp(24px, 3vw, 56px); } }

/* Dark band (Sanayef) */
.band { margin-top: clamp(56px, 4rem + 4vw, 136px); padding-block: clamp(56px, 7vw, 120px); background: var(--band-bg); color: var(--band-text); --text: var(--band-text); --muted: #b3aca2; --divider: rgba(236, 232, 225, .16); --accent-ink: #dcae68; --surface: #2a2622; position: relative; overflow: hidden; }
.band::before { content: ""; position: absolute; inset: 0 0 auto; height: 12px; margin-top: 18px; background: var(--accent); opacity: .5; -webkit-mask: var(--sadu) repeat-x left center / 28px 12px; mask: var(--sadu) repeat-x left center / 28px 12px; }
.band__grid { display: grid; gap: clamp(36px, 5vw, 96px); align-items: center; }
.band .lead { color: var(--band-text); opacity: .88; }
.band .media { border-radius: var(--radius); }
@media (min-width: 900px) { .band__grid { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); } .band__grid--flip { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); } }
.bullets { list-style: none; display: grid; gap: .7rem; margin: 1.6rem 0 0; }
.bullets li { position: relative; padding-inline-start: 1.6rem; line-height: 1.6; text-wrap: pretty; }
.bullets li::before { content: ""; position: absolute; inset-inline-start: 2px; top: .62em; width: 7px; height: 7px; border: 1px solid var(--accent); transform: rotate(45deg); }

.mosaic { display: grid; grid-template-columns: 1.15fr 1fr; grid-template-rows: auto auto; gap: clamp(10px, 1.4vw, 20px); }
.mosaic__item--1 { grid-row: span 2; }
.mosaic__item--1 .media { height: 100%; aspect-ratio: auto !important; min-height: 100%; }
.mosaic .media { border-radius: var(--radius); }

/* Rows (selected work) */
.rows { list-style: none; border-top: 1px solid var(--divider); }
.row { display: grid; grid-template-columns: 1fr auto; gap: 2px 16px; padding: 20px 0; border-bottom: 1px solid var(--divider); text-decoration: none; position: relative; isolation: isolate; }
.row::before { content: ""; position: absolute; inset: 0 calc(var(--gutter) * -.4); z-index: -1; background: color-mix(in srgb, var(--accent) 8%, transparent); opacity: 0; transition: opacity .3s; border-radius: var(--radius); }
.row:hover { color: var(--text); }
.row:hover::before { opacity: 1; }
.row__year { grid-column: 1; font-size: .82rem; color: var(--accent-ink); font-variant-numeric: tabular-nums; }
.row__title { grid-column: 1; font: 400 clamp(1.35rem, 1.1rem + 1vw, 2rem)/1.15 var(--font-display); }
.row__org { grid-column: 1; font-size: .9rem; color: var(--muted); }
.row__arrow { grid-column: 2; grid-row: 1 / span 3; align-self: center; color: var(--accent); transition: transform .4s var(--ease-out); }
.row:hover .row__arrow { transform: scaleX(var(--flip)) translateX(6px); }
@media (min-width: 760px) { .row { grid-template-columns: 9rem minmax(0, 1fr) minmax(0, 18rem) 24px; align-items: baseline; padding: 26px 0; } .row__year, .row__title, .row__org { grid-column: auto; } .row__arrow { grid-column: auto; grid-row: auto; } }

/* Horizontal strip */
.strip { display: flex; gap: clamp(12px, 1.6vw, 24px); overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px var(--gutter) 16px; scroll-padding-inline: var(--gutter); scrollbar-width: thin; scrollbar-color: var(--divider) transparent; }
.strip__item { flex: none; scroll-snap-align: start; height: clamp(260px, 22vw + 140px, 460px); }
.strip__item .media { height: 100%; width: auto; aspect-ratio: auto; border-radius: var(--radius); }
.strip__item .media img { width: auto; height: 100%; }
.strip__item picture { width: auto; }
.strip__ctrl { display: flex; align-items: center; gap: 8px; }
.strip__ctrl .icon-btn { display: none; }
@media (hover: hover) and (min-width: 760px) { .strip__ctrl .icon-btn { display: inline-grid; } }

/* Cards (articles) */
.cards { display: grid; gap: clamp(36px, 3.5vw, 56px) clamp(24px, 3vw, 48px); grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.card { display: flex; flex-direction: column; text-decoration: none; }
.card:hover { color: var(--text); }
.card .media { border-radius: var(--radius); margin-bottom: 1.2rem; }
.card:hover .media img { transform: scale(1.05); }
.card__meta { font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-ink); margin: 0 0 .5rem; }
.card__title { font: 400 clamp(1.5rem, 1.25rem + .8vw, 2rem)/1.12 var(--font-display); margin-bottom: .6rem; transition: color .3s; }
.card:hover .card__title { color: var(--accent-ink); }
.card__dek { color: var(--muted); font-size: .96rem; margin-bottom: .4rem; }
.card .more { margin-top: auto; }

/* CTA */
.cta { margin-top: clamp(72px, 8vw, 150px); }
.cta__inner { padding-block: clamp(44px, 6vw, 96px); max-width: 980px; }
.cta .h2 { font-size: clamp(2rem, 1.3rem + 2.8vw, 3.9rem); line-height: 1.05; }
.cta .lead { margin-top: 1.2rem; }
.cta .btn:not(.btn--primary) { overflow-wrap: anywhere; }

/* Split (about, sanayef) */
.split { display: grid; gap: clamp(36px, 5vw, 104px); padding-top: clamp(36px, 6vw, 104px); align-items: start; }
.split__art { width: min(100%, 420px); }
.split__text .h1, .split__text .display { margin-bottom: 1.6rem; }
.split__text .sadu { margin: 2.4rem 0; }
.facts { display: grid; gap: 1.6rem 3rem; }
.facts .h3 { margin-bottom: .6rem; }
.facts p { color: var(--muted); }
@media (min-width: 900px) {
  .split { grid-template-columns: minmax(280px, .8fr) minmax(0, 1.2fr); }
  .split__art { position: sticky; top: calc(var(--header-h) + 32px); }
  .split--brand { grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr); align-items: center; }
  .split--brand .split__art { position: static; justify-self: end; }
  .facts { grid-template-columns: 1fr 1fr; }
}
.alt--title { font-size: .55em; color: var(--accent); margin-inline-start: .3em; vertical-align: middle; }
.logo-plate { background: #fff; border-radius: 50%; padding: 6%; box-shadow: var(--shadow); outline: 1px solid var(--accent); outline-offset: 10px; }
.logo-plate .media { border-radius: 50%; background: #fff !important; }

/* Masonry (gallery & lookbook) */
.masonry { columns: 1; column-gap: clamp(16px, 2vw, 28px); }
.masonry__item { break-inside: avoid; margin: 0 0 clamp(22px, 2.6vw, 40px); }
.masonry .media { border-radius: var(--radius); }
.masonry figcaption { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.tag { font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-ink); }
@media (min-width: 640px) { .masonry { columns: 2; } }
@media (min-width: 1100px) { .masonry { columns: 3; } }
.masonry__item.is-hidden { display: none; }
html.vt-filter .gallery .masonry__item { view-transition-name: var(--vtn); }
::view-transition-group(*) { animation-duration: .5s; animation-timing-function: var(--ease-out); }

.filters { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 calc(var(--gutter) * -1) clamp(24px, 3vw, 40px); padding: 2px var(--gutter); }
.filters::-webkit-scrollbar { display: none; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 16px; border: 1px solid var(--divider); border-radius: 999px; background: transparent; cursor: pointer; font-size: .9rem; transition: border-color .25s, background-color .25s, color .25s; }
.chip span { font-size: .75rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.chip:hover { border-color: var(--accent); }
.chip[aria-pressed="true"] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent-ink); }

/* Principles */
.principles { display: grid; gap: 0 clamp(24px, 3vw, 56px); grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.principle { padding: 24px 0; border-top: 1px solid var(--divider); }
.principle__n { font: 400 1rem/1 var(--font-display); color: var(--accent); }
.principle .h3 { margin: .8rem 0 .6rem; }
.principle p { color: var(--muted); margin: 0; }

/* Jobs */
.jobs { border-top: 1px solid var(--divider); }
.job { display: grid; gap: 12px 48px; padding: clamp(24px, 3vw, 40px) 0; border-bottom: 1px solid var(--divider); }
.job__meta p { margin: 0 0 .2rem; font-size: .92rem; }
.job__when { color: var(--accent-ink); font-variant-numeric: tabular-nums; }
.job .h3 { margin-bottom: .9rem; }
@media (min-width: 900px) { .job { grid-template-columns: minmax(200px, 16rem) minmax(0, 1fr); } .job .bullets { max-width: 72ch; } }

/* Detail pages */
.detail .page-head { padding-bottom: clamp(28px, 4vw, 56px); }
.detail__body { display: grid; gap: clamp(28px, 4vw, 72px); padding-top: clamp(32px, 4vw, 64px); }
@media (min-width: 900px) { .detail__body { grid-template-columns: minmax(220px, 20rem) minmax(0, 1fr); } }
.facts-list { margin: 0; display: grid; gap: 14px; align-content: start; }
.facts-list div { border-top: 1px solid var(--divider); padding-top: 12px; }
.facts-list dt { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.facts-list dd { margin: 4px 0 0; }
.pager { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 12px 28px; margin-top: clamp(40px, 5vw, 72px); padding-top: 20px; border-top: 1px solid var(--divider); }
.pager--split { justify-content: space-between; border-top: 0; }
.pager .back { margin: 0; }

/* Article */
.article { max-width: 780px; }
.article__head { padding-top: clamp(32px, 5vw, 88px); margin-bottom: clamp(28px, 4vw, 48px); }
.article__head .h1 { margin-bottom: 1.2rem; }
.article__dek { font-style: italic; }
.article__cover .media { border-radius: var(--radius); }
.prose--article { margin-top: clamp(32px, 4vw, 56px); max-width: none; }
.prose--article .h3 { margin: 2.4rem 0 .8rem; }
:root[lang="ar"] .dropcap::first-letter { all: unset; }
.dropcap::first-letter { float: left; font: 400 4.6em/.82 var(--font-display); padding: .06em .12em 0 0; color: var(--accent); }
.article > .sadu { margin-top: 3rem; }
.progress { position: fixed; top: var(--header-h); left: 0; right: 0; z-index: 59; height: 2px; background: var(--accent); transform-origin: left; transform: scaleX(0); }
[dir="rtl"] .progress { transform-origin: right; }
@supports (animation-timeline: scroll()) { .progress { animation: progress linear both; animation-timeline: scroll(root); } }
@keyframes progress { to { transform: scaleX(1); } }

/* Credentials & CV */
.cred { display: grid; gap: 16px 48px; padding-top: clamp(32px, 4vw, 64px); }
@media (min-width: 900px) { .cred { grid-template-columns: minmax(200px, 16rem) minmax(0, 1fr); } .cred .h2 { font-size: clamp(1.6rem, 1.2rem + 1vw, 2.2rem); } }
.cred__list { border-top: 1px solid var(--divider); }
.cred__org { font: 400 clamp(1.3rem, 1.1rem + .6vw, 1.7rem)/1.2 var(--font-display); color: var(--accent-ink); padding: 18px 0 4px; margin: 0; }
.cred__row { display: grid; gap: 4px 32px; padding: 18px 0; border-bottom: 1px solid var(--divider); }
.cred__row > span:last-child { display: flex; flex-direction: column; gap: 4px; }
.cred__a { font-size: .86rem; color: var(--accent-ink); }
.cred__title { font: 400 clamp(1.2rem, 1.05rem + .5vw, 1.5rem)/1.25 var(--font-display); }
@media (min-width: 640px) { .cred__row { grid-template-columns: minmax(150px, 15rem) minmax(0, 1fr); align-items: baseline; } }
.cv__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px 32px; padding-top: clamp(32px, 5vw, 88px); }
.cv__head .actions { margin-top: 0; }
.cv__role { font: 400 clamp(1.15rem, 1rem + .5vw, 1.45rem)/1.3 var(--font-display); margin: .8rem 0 0; color: var(--muted); }
.cv__contact { list-style: none; display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 2rem 0 0; padding: 18px 0; border-block: 1px solid var(--divider); font-size: .92rem; }
.cv__contact li { display: inline-flex; align-items: center; gap: 8px; }
.cv__contact .icon { color: var(--accent); }
.cv__contact a { overflow-wrap: anywhere; }
.cv__sec { padding-top: clamp(36px, 4vw, 64px); }
.cv__sec > .h2 { margin-bottom: 1.2rem; }

/* Contact */
.contact { display: grid; gap: clamp(36px, 5vw, 96px); }
@media (min-width: 960px) { .contact { grid-template-columns: minmax(0, 1fr) minmax(320px, .85fr); align-items: start; } }
.contact__list { border-top: 1px solid var(--divider); }
.contact__item { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 12px; padding: 22px 0; border-bottom: 1px solid var(--divider); }
.contact__item .kicker { grid-column: 1 / -1; margin: 0; }
.contact__value { font: 400 clamp(1.3rem, 1.05rem + 1.1vw, 2rem)/1.2 var(--font-display); text-decoration: none; overflow-wrap: anywhere; }
.form { display: grid; gap: 16px; padding: clamp(24px, 3vw, 40px); border: 1px solid var(--divider); border-radius: var(--radius); background: color-mix(in srgb, var(--surface) 55%, transparent); }
.form .muted { margin: -6px 0 4px; font-size: .9rem; }
.field { display: grid; gap: 6px; font-size: .85rem; color: var(--muted); }
.field input, .field select, .field textarea { width: 100%; min-height: 48px; padding: 12px 14px; border: 1px solid var(--divider); border-radius: var(--radius); background: var(--bg); color: var(--text); font: inherit; font-size: 1rem; transition: border-color .25s, box-shadow .25s; }
.field textarea { resize: vertical; min-height: 140px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.form .btn { justify-self: start; }

/* Legal & 404 */
.legal { max-width: 780px; padding-top: clamp(32px, 5vw, 88px); }
.legal .h1 { margin-bottom: .6rem; }
.legal__sec { padding: 22px 0; border-top: 1px solid var(--divider); }
.legal__sec .h3 { margin-bottom: .5rem; }
.notfound { padding-top: clamp(48px, 10vw, 160px); max-width: 900px; }
.notfound .display { margin-bottom: 1.4rem; }
.notfound .sadu { margin-top: 3rem; }

/* ── Footer ──────────────────────────────────────────────────────────── */
.site-footer { padding: 0 0 max(28px, env(safe-area-inset-bottom)); border-top: 1px solid var(--divider); }
.site-footer > .container > .sadu { margin: clamp(32px, 4vw, 56px) 0; opacity: .8; }
.site-footer__grid { display: grid; gap: 32px; grid-template-columns: 1fr 1fr; }
.site-footer__brand { grid-column: 1 / -1; }
.site-footer__name { font: 400 clamp(1.8rem, 1.4rem + 1.4vw, 2.4rem)/1 var(--font-display); text-decoration: none; }
.site-footer__brand .alt-name { font-size: 1.25rem; color: var(--muted); margin: .6rem 0 .8rem; }
.alt-name:lang(en) { font: 400 1.3rem/1.2 "Cormorant Garamond", Georgia, serif; }
.notfound__alt { margin-top: 2.4rem; padding-top: 1.6rem; border-top: 1px solid var(--divider); }
.notfound__alt .lead { font-family: "Noto Naskh Arabic", serif; }
.site-footer__grid > div:last-child { grid-column: 1 / -1; }
.site-footer__brand p:last-child { color: var(--muted); font-size: .92rem; max-width: 34ch; }
.site-footer__links { list-style: none; display: grid; }
.site-footer__links a, .site-footer__links span { display: inline-block; padding: 7px 0; font-size: .93rem; text-decoration: none; overflow-wrap: anywhere; }
.site-footer__links span { color: var(--muted); }
.site-footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--divider); font-size: .84rem; color: var(--muted); }
.site-footer__bottom span:last-child { display: flex; gap: 24px; }
.site-footer__bottom a { text-decoration: none; padding: 6px 0; }
@media (min-width: 900px) { .site-footer__grid { grid-template-columns: 1.6fr 1fr 1fr 1.2fr; } .site-footer__brand, .site-footer__grid > div:last-child { grid-column: auto; } }

/* ── Floating bits ───────────────────────────────────────────────────── */
.to-top { position: fixed; inset-inline-end: max(18px, env(safe-area-inset-right)); bottom: max(18px, env(safe-area-inset-bottom)); z-index: 40; width: 46px; height: 46px; display: grid; place-items: center; border: 1px solid var(--divider); border-radius: 50%; background: var(--header-bg); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); cursor: pointer; opacity: 0; transform: translateY(16px); pointer-events: none; transition: opacity .35s, transform .45s var(--ease-out), border-color .25s; }
.to-top.is-on { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { border-color: var(--accent); color: var(--accent-ink); }
.toast { position: fixed; left: 50%; bottom: max(24px, env(safe-area-inset-bottom)); z-index: 300; padding: 12px 18px; border-radius: var(--radius); background: var(--text); color: var(--bg); font-size: .9rem; opacity: 0; transform: translate(-50%, 12px); pointer-events: none; transition: opacity .3s, transform .4s var(--ease-out); }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ── Lightbox ────────────────────────────────────────────────────────── */
.lightbox { width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(14, 12, 11, .94); color: #f2eee8; overflow: hidden; }
.lightbox::backdrop { background: rgba(14, 12, 11, .5); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.lightbox[open] { display: grid; grid-template-rows: 1fr auto; animation: lb-in .4s var(--ease-out); }
.lightbox.is-closing { animation: lb-out .25s var(--ease) forwards; }
@keyframes lb-in { from { opacity: 0; } }
@keyframes lb-out { to { opacity: 0; } }
.lightbox__stage { position: relative; display: grid; place-items: center; padding: 64px 12px 8px; min-height: 0; touch-action: pan-y pinch-zoom; }
.lightbox__img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; border-radius: 2px; box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .8); transition: opacity .3s var(--ease), transform .45s var(--ease-out); }
.lightbox[open] .lightbox__img { animation: lb-img .5s var(--ease-out); }
.lightbox__img.is-swapping { opacity: 0; transform: scale(.98); }
@keyframes lb-img { from { opacity: 0; transform: scale(.96); } }
.lightbox__bar { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; padding: 14px max(20px, env(safe-area-inset-left)) max(18px, env(safe-area-inset-bottom)); font-size: .92rem; }
.lightbox__cap { margin: 0; max-width: 70ch; }
.lightbox__count { color: #b3aca2; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lightbox__btn { position: absolute; width: 48px; height: 48px; display: grid; place-items: center; border: 1px solid rgba(242, 238, 232, .25); border-radius: 50%; background: rgba(14, 12, 11, .55); color: inherit; cursor: pointer; transition: border-color .25s, background-color .25s; }
.lightbox__btn:hover { border-color: var(--accent); background: rgba(14, 12, 11, .8); }
.lightbox__close { top: max(12px, env(safe-area-inset-top)); inset-inline-end: max(12px, env(safe-area-inset-right)); }
.lightbox__prev, .lightbox__next { top: 50%; transform: translateY(-50%); }
.lightbox__prev { inset-inline-start: max(12px, env(safe-area-inset-left)); }
.lightbox__next { inset-inline-end: max(12px, env(safe-area-inset-right)); }
@media (max-width: 640px) { .lightbox__prev, .lightbox__next { top: auto; bottom: 58px; transform: none; width: 44px; height: 44px; } .lightbox__stage { padding-bottom: 64px; } }
.lightbox.is-single .lightbox__prev, .lightbox.is-single .lightbox__next, .lightbox.is-single .lightbox__count { display: none; }

/* ── Page transitions (cross-document View Transitions) ──────────────── */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out .28s var(--ease) both; }
::view-transition-new(root) { animation: vt-in .5s var(--ease-out) both; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-10px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(16px); } }
html.vt-theme::view-transition-old(root), html.vt-theme::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
html.vt-filter::view-transition-old(root), html.vt-filter::view-transition-new(root) { animation-duration: .3s; }

@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  html.intro .intro-screen { display: none; }
}

/* ── Print (CV) ──────────────────────────────────────────────────────── */
@media print {
  :root { --bg: #fff; --text: #000; --muted: #444; --divider: #ccc; --accent: #8f5f1c; --accent-ink: #8f5f1c; }
  .site-header, .menu, .site-footer, .to-top, .toast, .lightbox, .no-print, .skip, .intro-screen, .progress { display: none !important; }
  body { font-size: 10.5pt; }
  .js .reveal, .js .reveal-group > * { opacity: 1 !important; transform: none !important; }
  .job, .cred__row { break-inside: avoid; }
  main { padding: 0; }
  a { text-decoration: none; }
}
