/* Project pages (/projects/ and /projects/<slug>/): same tokens, type and tiles as the home page. */
:root{
  --ground:#ECEBE7; --paper:#F7F6F3; --ink:#17181A; --mute:#55544F; --pill:#DDDBD5; --pill-h:#D0CEC7;
  --night:#121314; --gold:#C38B3A; --gold-l:#E0B26A; --r:22px;
  --f:"Alexandria","Segoe UI",Tahoma,sans-serif;
  color-scheme:light;
}
*{box-sizing:border-box}
html{background:var(--ground)}
body{margin:0;background:var(--ground);color:var(--ink);font-family:var(--f);font-weight:300;font-size:17px;line-height:1.7;-webkit-font-smoothing:antialiased}
::selection{background:var(--ink);color:var(--paper)}
a{color:inherit;text-decoration:none}
img{display:block;max-width:100%}
:focus-visible{outline:2px solid var(--gold);outline-offset:3px;border-radius:999px}
h1,h2,h3{font-weight:600;line-height:1.12;margin:0;text-wrap:balance;letter-spacing:-.01em}
[lang="ar"] h1,[lang="ar"] h2,[lang="ar"] h3{line-height:1.3;letter-spacing:0}
p{margin:0}
.wrap{max-width:1320px;margin-inline:auto;padding-inline:max(16px,3vw)}
.svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;flex:none}
[dir="rtl"] .flip{transform:scaleX(-1)}

.pill{display:inline-flex;align-items:center;gap:.55em;height:42px;padding:0 18px;border-radius:999px;border:0;background:var(--pill);color:var(--ink);font:500 15px/1 var(--f);cursor:pointer;transition:background .25s,color .25s;white-space:nowrap}
.pill:hover{background:var(--pill-h)}
.pill.dark{background:var(--ink);color:var(--paper)}
.pill.dark:hover{background:#2C2D30}
.pill.big{height:52px;padding:0 24px;font-size:16px}
.round{width:42px;height:42px;padding:0;justify-content:center}

/* header */
header.top{position:sticky;top:0;z-index:50;background:rgba(236,235,231,.9);backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);box-shadow:0 1px 0 rgba(23,24,26,.08)}
header.top .wrap{display:flex;align-items:center;justify-content:space-between;height:72px;gap:16px}
header.top nav{display:flex;gap:8px;align-items:center}
.brand img{height:40px;width:auto}

.crumbs{display:flex;flex-wrap:wrap;gap:8px;align-items:center;font-size:14px;color:var(--mute);padding-top:18px;padding-bottom:14px}
.crumbs a:hover{color:var(--ink)}
.crumbs [aria-current]{color:var(--ink)}

/* hero: the cover photo with the name over it, like the home page tiles */
.hero{padding:0 10px}
.hero .media{position:relative;height:min(76vh,780px);min-height:420px;border-radius:var(--r);overflow:hidden;background:#cfccc4;color:#fff}
.hero .media img{width:100%;height:100%;object-fit:cover}
.hero .media::after{content:"";position:absolute;inset:auto 0 0;height:60%;background:linear-gradient(to top,rgba(0,0,0,.62),transparent)}
.hero .cap{position:absolute;z-index:2;inset-inline:max(24px,3vw);bottom:max(24px,3vw);display:grid;gap:10px;justify-items:start;max-width:900px}
.hero h1{font-size:clamp(34px,4.6vw,68px);letter-spacing:-.02em}
[lang="ar"] .hero h1{letter-spacing:0}
.hero .cap p{font-size:clamp(16px,1.3vw,19px);color:rgba(255,255,255,.88)}
.chip{display:inline-flex;align-items:center;height:30px;padding:0 12px;border-radius:999px;background:rgba(247,246,243,.2);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);font-size:13px;color:#fff;white-space:nowrap;direction:ltr}

/* text + facts */
.about{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(300px,1fr);gap:clamp(28px,5vw,80px);padding-top:clamp(48px,6vw,90px);padding-bottom:clamp(40px,5vw,70px);align-items:start}
.about .lead{font-size:clamp(19px,1.6vw,23px);line-height:1.65;color:#2B2B28;max-width:60ch}
.about h2{font-size:16px;font-weight:500;color:var(--mute);margin:34px 0 8px}
.about .txt p:not(.lead){max-width:60ch}
.facts{display:grid;gap:18px;position:sticky;top:96px}
.facts dl{display:grid;grid-template-columns:1fr 1fr;gap:1px;margin:0;background:rgba(23,24,26,.1);border-radius:16px;overflow:hidden}
.facts dl div{background:var(--paper);padding:14px 16px}
.facts dl div:last-child:nth-child(odd){grid-column:1/-1}
.facts dt{font-size:13px;color:var(--mute)}
.facts dd{margin:0;font-weight:500;font-size:16px;font-variant-numeric:tabular-nums}
.facts .pill{justify-self:start}

/* photos */
.photos{padding-bottom:clamp(50px,6vw,90px)}
.photos h2,.more h2,.intro h1{font-size:clamp(26px,2.6vw,38px)}
.photos h2{margin-bottom:20px}
.photos h2 span{font-size:.55em;font-weight:400;color:var(--mute);vertical-align:.35em;margin-inline-start:6px}
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,260px),1fr));gap:10px}
.grid a{display:block;aspect-ratio:4/3;border-radius:14px;overflow:hidden;background:#d8d5ce}
.grid img{width:100%;height:100%;object-fit:cover;transition:transform .9s cubic-bezier(.16,1,.3,1)}
.grid a:hover img{transform:scale(1.04)}

/* project tiles (more projects, all projects) */
.more{padding-bottom:clamp(50px,6vw,90px)}
.sec-head{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:20px}
.tiles{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.tiles.all{grid-template-columns:repeat(auto-fill,minmax(min(100%,280px),1fr));padding-bottom:clamp(50px,6vw,90px)}
.tile{position:relative;display:block;aspect-ratio:3/4.2;border-radius:var(--r);overflow:hidden;background:#cfccc4;color:#fff}
.tile img{width:100%;height:100%;object-fit:cover;transition:transform 1.1s cubic-bezier(.16,1,.3,1)}
.tile:hover img{transform:scale(1.035)}
.tile::after{content:"";position:absolute;inset:auto 0 0;height:55%;background:linear-gradient(to top,rgba(0,0,0,.62),transparent)}
.tile .cap{position:absolute;z-index:2;inset-inline:18px;bottom:16px;display:flex;flex-direction:column;align-items:flex-start;gap:8px}
.tile h3{font-size:19px}
.tile .meta{font-size:14px;color:rgba(255,255,255,.85)}
.tile:focus-visible{outline-offset:-4px;border-radius:var(--r)}

.intro{padding-top:clamp(20px,3vw,40px);padding-bottom:clamp(28px,3vw,44px);display:grid;gap:14px}
.intro h1{font-size:clamp(34px,4.4vw,64px)}
.intro p{max-width:62ch;color:var(--mute);font-size:clamp(17px,1.3vw,19px)}
.nf{min-height:50vh;align-content:center;justify-items:start}

/* photo viewer */
.lb{position:fixed;inset:0;z-index:100;background:rgba(10,10,11,.94);display:grid;place-items:center}
.lb[hidden]{display:none}
.lb img{max-width:calc(100vw - 140px);max-height:calc(100vh - 100px);object-fit:contain;border-radius:8px}
.lb .x{position:absolute;top:16px;inset-inline-end:16px;background:rgba(247,246,243,.9)}
.lb .nav{position:absolute;top:50%;margin-top:-23px;width:46px;height:46px;border-radius:50%;border:0;display:grid;place-items:center;background:rgba(247,246,243,.14);color:#fff;cursor:pointer}
.lb .nav:hover{background:rgba(247,246,243,.28)}
.lb .nav.p{inset-inline-start:16px}.lb .nav.n{inset-inline-end:16px}
.lb .count{position:absolute;bottom:18px;left:50%;transform:translateX(-50%);font-size:13px;padding:6px 12px;border-radius:999px;background:rgba(247,246,243,.14);color:#fff;font-variant-numeric:tabular-nums;direction:ltr}
html.lock{overflow:hidden}

/* footer */
footer{background:var(--night);color:#D9D6CE;margin:10px;border-radius:var(--r);padding:clamp(36px,4vw,60px) clamp(24px,3.4vw,52px) 0;overflow:hidden}
.fcols{display:grid;grid-template-columns:2fr 1fr;gap:30px}
.fcols a{display:block;color:#A9A79F;padding:4px 0;font-size:15px}
.fcols a:hover{color:#fff}
.fcols p{color:#A9A79F;max-width:34ch}
.fbrand img{height:34px;width:auto;margin:0 0 16px}
.legal{margin-top:clamp(40px,5vw,64px);display:flex;justify-content:space-between;gap:16px;border-top:1px solid rgba(255,255,255,.1);padding:16px 0;font-size:13px;color:#8E8C85;flex-wrap:wrap}

@media (max-width:1100px){.tiles{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:899px){
  header.top .wrap{height:64px}
  .brand img{height:34px}
  .hide-s{display:none}
  .hero{padding:0 6px}
  .hero .media{height:64vh;min-height:360px}
  .about{grid-template-columns:1fr}
  .facts{position:static}
  .grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
  .grid a{border-radius:10px}
  .fcols{grid-template-columns:1fr}
  .lb img{max-width:100vw;max-height:80vh;border-radius:0}
  .lb .nav{top:auto;bottom:12px;margin:0}
}
@media (max-width:560px){.tiles:not(.all){grid-template-columns:1fr 1fr;gap:6px}.tile h3{font-size:16px}.tile .cap{inset-inline:12px;bottom:12px}.tile .meta{font-size:12.5px}}
@media (prefers-reduced-motion:reduce){*{transition:none!important}}
