:root {
    color-scheme: light;
    --paper: #eef0e7;
    --ink: #30291f;
    --muted: #414536;
    --olive: #536340;
    --dark-olive: #39462d;
    --accent: #354126;
    --deep: #282e21;
    --display: "Baskervville", Baskerville, Georgia, serif;
    --mosaic-image: url("assets/olive-mosaic.webp");
    --pale: #edf1e4;
    --sage: #bfcfab;
    --line: #a6b096;
    --sans: "Instrument Sans", system-ui, sans-serif;
    --gutter: clamp(1.25rem, 7vw, 7rem);
}

html[dir="rtl"] {
    --display: "Noto Naskh Arabic", "Baskervville", Georgia, serif;
    --sans: "Noto Sans Arabic", "Instrument Sans", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font: 400 1rem/1.65 var(--sans);
}
a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 2px solid currentColor; outline-offset: 5px; }
img { display: block; max-width: 100%; }
figure, address, h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font: 400 1em/1.07 var(--display); letter-spacing: -.035em; }
h1, h2 { font-weight: 600; }
h2 { font-size: clamp(2.6rem, 5.1vw, 4.7rem); }
section[id], footer[id] { scroll-margin-top: 1.5rem; }
.shell { width: min(100% - var(--gutter) * 2, 84rem); margin-inline: auto; }
.eyebrow {
    color: var(--accent);
    font-size: .875rem;
    font-weight: 600;
    letter-spacing: .145em;
    line-height: 1.55;
    text-transform: uppercase;
}
.skip-link { position: fixed; z-index: 5; top: 1rem; inset-inline-start: 1rem; padding: .6rem 1rem; transform: translateY(-200%); background: var(--ink); color: var(--paper); }
.skip-link:focus { transform: none; }

body {
    background-image:
        linear-gradient(90deg, rgb(238 240 231 / .64), rgb(238 240 231 / .87) 21%, rgb(238 240 231 / .91) 54%, rgb(238 240 231 / .61)),
        var(--mosaic-image);
    background-position: center top;
    background-size: auto, max(48rem, 100%) auto;
    background-repeat: repeat-y;
}
.site-header { border-bottom: 1px solid var(--line); background: rgb(238 240 231 / .58); }
.header-inner {
    min-height: 5.5rem;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1.5rem;
}
.brand {
    display: inline-block;
    width: fit-content;
    margin-block: .35rem;
    text-decoration: none;
}
.brand img {
    width: clamp(9rem, 17vw, 15.5rem);
    height: auto;
}
.footer-end .brand img { width: 5rem; }
.header-inner nav { display: flex; align-items: center; gap: clamp(1.2rem, 4.3vw, 3.85rem); }
.header-inner nav a { font-size: .94rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.header-inner nav a:hover { text-decoration: underline; text-underline-offset: .3em; }
.header-inner .languages { gap: .65rem; justify-self: end; }
.languages a { min-width: 2.3rem; min-height: 2.3rem; display: grid; place-items: center; color: var(--ink); }
.languages a[aria-current] { background: var(--sage); color: var(--deep); font-weight: 700; }
.header-inner .languages a[aria-current]:hover { text-decoration: none; }

.home-intro {
    --hero-shade-direction: to right;
    position: relative;
    isolation: isolate;
    background-color: #30291f;
    color: #faf6ed;
}
.home-intro .site-header {
    border-bottom-color: rgb(238 240 231 / .3);
    background: linear-gradient(rgb(238 240 231 / .78), rgb(238 240 231 / .68));
    color: var(--ink);
}
.hero {
    display: grid;
    align-items: center;
    min-height: 36rem;
    min-height: clamp(33rem, 77svh, 54rem);
    padding-block: clamp(3rem, 8vh, 6.5rem);
}
[dir="rtl"] .home-intro { --hero-shade-direction: to left; }
.hero-video, .home-intro::before {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}
.hero-video {
    z-index: -2;
    object-fit: cover;
    object-position: center 54%;
}
.home-intro::before {
    z-index: -1;
    content: "";
    background: linear-gradient(var(--hero-shade-direction),
        rgb(24 21 17 / .82), rgb(24 21 17 / .67) 44%,
        rgb(24 21 17 / .46) 65%, rgb(24 21 17 / .16) 100%);
}
.hero-content { max-width: 51rem; }
.hero-eyebrow { color: #e4ebd7; display: flex; flex-wrap: wrap; gap: .7rem; align-items: center; }
.hero-eyebrow span { width: 1.45rem; height: 1px; background: currentColor; opacity: .65; }
.hero h1 {
    margin-block: 1.35rem 1.55rem;
    font-size: clamp(3rem, 5.3vw, 5.7rem);
    line-height: 1.01;
    letter-spacing: -.045em;
    text-shadow: 0 2px 1rem rgb(24 21 17 / .3);
}
.hero h1 span { color: #e4ebd7; }
.hero-description { max-width: 27rem; font-size: 1.05rem; }
.button {
    display: inline-flex;
    min-height: 3.25rem;
    align-items: center;
    margin-top: 1.65rem;
    padding: .67rem 1.27rem;
    background: var(--olive);
    color: var(--pale);
    font-size: .92rem;
    font-weight: 600;
    text-decoration: none;
    transition: background .18s ease;
}
.button:hover { background: var(--dark-olive); }
.hero .button { background: #e4ebd7; color: var(--deep); }
.hero .button:hover { background: var(--sage); }
.hero .button:focus-visible { outline-color: #faf6ed; }

.work { padding-block: clamp(2.4rem, 5vw, 4.5rem) clamp(3.2rem, 6vw, 5.5rem); }
.section-heading { margin-bottom: clamp(1.8rem, 3vw, 2.8rem); }
.section-heading h2 { margin-top: .42rem; }
.project-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.25rem, 2.6vw, 2.6rem); }
.project-card a { display: flex; flex-direction: column; height: 100%; text-decoration: none; }
.card-image { overflow: hidden; background: #c3cdb3; }
.card-image img {
    width: 100%;
    aspect-ratio: 1.32;
    object-fit: cover;
    transition: transform .4s ease;
}
.project-card a:hover img { transform: scale(1.035); }
.card-text { display: flex; flex: 1; flex-direction: column; align-items: flex-start; gap: .7rem; padding-top: 1.2rem; }
.card-text .eyebrow { letter-spacing: .095em; }
.card-text h3 { font-size: clamp(1.7rem, 2.5vw, 2.5rem); font-weight: 600; }
.card-text p:not(.eyebrow) { max-width: 28rem; color: var(--muted); }
.text-link {
    display: inline-block;
    width: fit-content;
    font-size: .9375rem;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: .34em;
    text-decoration-thickness: 1px;
}
.text-link:hover, .project-card a:hover .text-link { color: var(--accent); }
.card-text .text-link { margin-top: auto; padding-top: .2rem; }

.extra-work { border-top: 1px solid var(--line); padding-block: clamp(2rem, 4vw, 4rem) clamp(3.2rem, 7vw, 6rem); }
.other-project-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: clamp(1.2rem, 2.6vw, 2.4rem);
    margin-bottom: clamp(2.6rem, 4.5vw, 4.75rem);
}
.other-project-grid .card-image img { aspect-ratio: 1.58; }
.extra-group {
    display: grid;
    grid-template-columns: minmax(12rem, .73fr) minmax(0, 2fr);
    gap: 1.25rem clamp(1.25rem, 3.8vw, 3.6rem);
}
.extra-group + .extra-group { margin-top: clamp(2.6rem, 5vw, 4.5rem); }
.extra-copy h3 { font-size: clamp(1.65rem, 2.85vw, 2.65rem); font-weight: 600; }
.extra-copy p { max-width: 34rem; margin-top: .7rem; color: var(--muted); }
.extra-visuals { display: grid; gap: clamp(1rem, 2vw, 1.75rem); }
.extra-images, .extra-panoramas { display: grid; gap: clamp(.75rem, 1.6vw, 1.45rem); }
.extra-panoramas, .extra-images--salon { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.extra-images--cuisine { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.extra-images .gallery-figure img { aspect-ratio: 6 / 7; object-fit: contain; background: transparent; }
.extra-feature .gallery-figure img, .extra-panoramas .gallery-figure img { background: transparent; }
.about {
    background-color: var(--dark-olive);
    background-image: linear-gradient(90deg, rgb(54 66 43 / .98), rgb(54 66 43 / .94) 46%, rgb(54 66 43 / .79)), var(--mosaic-image);
    background-position: center, right 66%;
    background-size: cover, max(42rem, 70vw) auto;
    background-repeat: no-repeat;
    color: var(--pale);
    padding-block: clamp(3.4rem, 6vw, 5.5rem);
}
.about-grid { display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; gap: clamp(2.75rem, 9vw, 9rem); }
.about .eyebrow { color: var(--sage); }
.about h2 { margin: .5rem 0 .9rem; }
.about-role { margin-bottom: .95rem; color: var(--sage); font-size: 1.13rem; }
.about p:not(.about-role):not(.eyebrow) { color: var(--pale); max-width: 37rem; }
.about-bio p + p { margin-top: .85rem; }
.about-link { margin-top: .8rem; }
.about .about-link:hover { color: var(--sage); }
.skills { display: flex; flex-wrap: wrap; gap: .48rem; margin: 1.6rem 0 0; padding: 0; list-style: none; }
.skills li { padding: .26rem .68rem; border: 1px solid #879876; font-size: .875rem; }
.education h3 { font-size: clamp(1.9rem, 3vw, 2.5rem); }
.education ol { margin: 1.05rem 0 0; padding: 0; list-style: none; }
.education li { display: grid; grid-template-columns: 6.7rem 1fr; gap: .75rem; padding-block: 1rem; border-top: 1px solid #849473; line-height: 1.5; }
.education li:last-child { border-bottom: 1px solid #849473; }
.education li > span { color: var(--sage); font-size: .875rem; }
.education small { display: block; color: var(--sage); font-size: .875rem; margin-top: .2rem; }

.site-footer {
    padding-block: clamp(3.8rem, 7vw, 6rem) 1.5rem;
    border-top: 1px solid var(--line);
    background: rgb(238 240 231 / .65);
}
.contact-grid { display: grid; grid-template-columns: 1.1fr 1fr; align-items: end; gap: 2.2rem clamp(2.75rem, 9vw, 9rem); }
.contact-grid h2 { margin-top: .5rem; }
.site-footer a:hover { color: var(--accent); }
.contact-grid address { font-style: normal; padding-block: .35rem; }
.contact-grid address p { margin-bottom: .7rem; }
.contact-grid address a { display: block; width: fit-content; text-underline-offset: .25em; }
.contact-grid address a + a { margin-top: .32rem; }

.footer-end { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: clamp(2rem, 5vw, 4.25rem); padding-top: 1.4rem; border-top: 1px solid var(--line); }

.detail { padding-bottom: clamp(2.5rem, 5vw, 5rem); }
.detail-heading { padding-block: clamp(2.2rem, 5.6vw, 5rem) clamp(1.5rem, 4vw, 3.2rem); }
.back-link { margin-bottom: 2rem; }
.detail-heading h1 { font-size: clamp(2.85rem, 7vw, 6.9rem); margin: .55rem 0 .9rem; }
.detail-summary { max-width: 40rem; color: var(--muted); font-size: clamp(1.1rem, 1.6vw, 1.3rem); }
.detail-cover img { width: 100%; max-height: 42rem; aspect-ratio: 1.8; object-fit: cover; background: #c3cdb3; }
.project-intro { display: grid; grid-template-columns: 1fr 1.5fr; gap: 1.35rem 3rem; padding-block: clamp(2.75rem, 6vw, 5.5rem); }
.detail-heading + .project-intro { padding-top: .7rem; }
.project-intro h2, .project-gallery h2 { font-size: clamp(2.1rem, 4.1vw, 3.8rem); }
.project-intro p { max-width: 44rem; }
.project-intro p + p { margin-top: .95rem; }
.project-gallery { border-top: 1px solid var(--line); padding: clamp(2rem, 4vw, 3.5rem) 0 clamp(2.7rem, 5vw, 5rem); }
.project-gallery h2 { margin-bottom: 1.65rem; }
.gallery-grid, .boards-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.9rem clamp(1rem, 2vw, 2rem); }
.boards-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.image-link { display: block; position: relative; }
.gallery-figure img { width: 100%; aspect-ratio: 1.8; object-fit: cover; background: #c3cdb3; }
.boards-grid img { aspect-ratio: 5 / 4; object-fit: contain; background: transparent; }
.gallery-figure figcaption { color: var(--muted); margin-top: .5rem; font-size: .9375rem; }
.zoom-mark {
    position: absolute;
    inset-inline-end: .65rem;
    bottom: .65rem;
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    background: var(--paper);
    color: var(--ink);
    font-size: 1.35rem;
    line-height: 1;
}
.image-link:hover .zoom-mark { background: var(--olive); color: var(--paper); }
.project-moodboard { padding-bottom: clamp(3rem, 6vw, 6rem); }
.mood-spread + .mood-spread { margin-top: clamp(2.2rem, 5vw, 4.5rem); }
.mood-spread h3, .salon-materials h3 {
    margin-bottom: clamp(1rem, 2.6vw, 2rem);
    font-size: clamp(1.55rem, 2.8vw, 2.4rem);
    font-weight: 600;
}
.mood-swatches {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 5.5rem), 1fr));
    align-items: start;
    gap: clamp(1rem, 2.7vw, 2.2rem);
    max-width: 64rem;
    text-align: center;
}
.mood-swatches img {
    width: 100%;
    height: clamp(3.9rem, 7.5vw, 6.4rem);
    margin-inline: auto;
    object-fit: contain;
}
.mood-swatches figcaption {
    color: var(--ink);
    font-size: .875rem;
    line-height: 1.4;
    margin-top: .6rem;
    overflow-wrap: anywhere;
}
.extra-palette { padding-top: .55rem; }
.extra-palette img { height: clamp(3.6rem, 6.5vw, 5.9rem); }
.variant-nav { display: flex; flex-wrap: wrap; gap: .65rem 1.6rem; margin-top: 1.35rem; }
.salon-variant h2 { margin-bottom: .8rem; }
.salon-feature { margin-top: 1.6rem; }
.salon-feature .gallery-figure img { aspect-ratio: auto; }
.salon-details, .salon-materials { margin-top: clamp(1.45rem, 3.5vw, 2.7rem); }
.salon-plan { max-width: 56rem; }
.salon-plan .gallery-figure img { aspect-ratio: auto; height: auto; background: transparent; }
.salon-composition > img { width: min(100%, 46rem); height: auto; margin: 0 auto 2rem; }
.project-pagination { border-top: 1px solid var(--line); padding-top: 1.75rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.next-project { text-align: end; text-decoration: none; }
.next-project span { display: block; }
.next-project span:last-child { font: 400 clamp(1.35rem, 3.2vw, 2.65rem)/1 var(--display); }
.next-project:hover span:last-child { text-decoration: underline; text-underline-offset: .15em; text-decoration-thickness: 1px; }

#image-viewer {
    max-width: min(94vw, 82rem);
    max-height: 96vh;
    max-height: 96dvh;
    width: max-content;
    padding: .85rem;
    border: 1px solid var(--line);
    background: var(--paper);
    color: var(--ink);
}
#image-viewer::backdrop { background: rgb(24 31 20 / .88); }
#viewer-image { margin: auto; max-height: 72vh; max-height: 72dvh; width: auto; object-fit: contain; }
.viewer-bar, .viewer-nav { display: flex; gap: .8rem; align-items: center; justify-content: space-between; }
.viewer-bar { margin-bottom: .7rem; }
.viewer-nav { margin-top: .7rem; }
.viewer-bar p, #viewer-position { font-size: .875rem; color: var(--muted); }
#image-viewer button { min-height: 2.5rem; padding: .3rem .65rem; border: 1px solid var(--olive); background: var(--paper); color: var(--ink); font: 500 .875rem/1.2 var(--sans); cursor: pointer; }
#image-viewer button:hover { background: var(--olive); color: var(--paper); }

.languages a[lang="ar"] { font-family: "Noto Sans Arabic", system-ui, sans-serif; padding-inline: .4rem; }
[dir="rtl"] body { line-height: 1.85; }
[dir="rtl"] .header-inner { direction: ltr; }
[dir="rtl"] .header-inner nav:not(.languages) { direction: rtl; }
[dir="rtl"] :is(h1, h2, h3, .eyebrow, .card-text .eyebrow) { letter-spacing: normal; }
[dir="rtl"] :is(h1, h2, h3) { line-height: 1.18; }
[dir="rtl"] .hero h1 { line-height: 1.18; }
[dir="rtl"] :is(.gallery-figure figcaption, .mood-swatches figcaption) { line-height: 1.6; }
[dir="rtl"] #image-viewer button { line-height: 1.5; }

@media (max-width: 58rem) {
    .hero h1 { font-size: clamp(3rem, 7vw, 4.8rem); }
    .about-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
    .education li { grid-template-columns: 5.3rem 1fr; }
    .other-project-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .extra-images--cuisine { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .boards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 43rem) {
    .header-inner { min-height: 4.4rem; gap: .85rem; }
    .header-inner nav { gap: clamp(.62rem, 2.4vw, 1.25rem); }
    .header-inner nav a { font-size: .875rem; }
    .hero h1 { font-size: clamp(2.7rem, 8.7vw, 4.25rem); }
    .hero-video { object-position: 52% center; }
    .home-intro::before { background: linear-gradient(var(--hero-shade-direction), rgb(24 21 17 / .75), rgb(24 21 17 / .64)); }
    .other-project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .project-grid, .about-grid, .contact-grid, .project-intro, .extra-group { grid-template-columns: 1fr; }
    .extra-images .zoom-mark { width: 1.6rem; height: 1.6rem; inset-inline-end: .35rem; bottom: .35rem; }
    .project-grid { gap: 2.65rem; }
    .card-image img { aspect-ratio: 1.48; }
    .contact-grid { gap: 1.5rem; }
    .work .section-heading { margin-bottom: 1.65rem; }
}
@media (max-width: 40rem) {
    .header-inner { grid-template-columns: 1fr auto; gap: .6rem 1rem; padding-block: .7rem; }
    .header-inner .languages { grid-column: 2; grid-row: 1; }
    .header-inner nav:not(.languages) { grid-column: 1 / -1; gap: 1.2rem; padding-top: .3rem; }
}
@media (max-width: 29rem) {
    .header-inner .brand img { width: clamp(6rem, 30vw, 9rem); }
    .header-inner .languages { gap: .3rem; }
    .other-project-grid, .gallery-grid, .boards-grid { grid-template-columns: 1fr; }
    .detail-cover img { aspect-ratio: 1.42; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; }
}
