:root {
  --paper: #f3efe7;
  --paper-2: #ebe5d9;
  --ink: #1d1b18;
  --muted: #6b655c;
  --rule: #d6cebf;
  --accent: #8e3b2b;

  /* Colours drawn from the works themselves: each project gets a deep tone (--c)
     for small text and stitches, and a pale wash for its background band. */
  --ochre: #85570f;      --ochre-wash: #f1e4c8;   /* Window Frame: rusted iron, sunlit field */
  --orchard: #3d5a22;    --orchard-wash: #e2e9d2; /* We Plant Trees: apple orchards */
  --cherry: #9b1f33;     --cherry-wash: #f3dcdc;  /* Fear After War: the dolls' reds */
  --terracotta: #8e3b2b; --terracotta-wash: #efdcd0; /* From Rubbles to Art */
  --teal: #17605e;       --teal-wash: #d8ebe8;    /* Digital Drawings: Refugees */
  --cyan: #1b4f8a;       --cyan-wash: #dbe6f3;    /* Lesbos: cyanotype */
  --plum: #6a3570;       --plum-wash: #ece0ee;    /* Rishpon: current residency */

  --serif: "Cormorant Garamond", "Noto Naskh Arabic", Georgia, serif;
  --sans: "Instrument Sans", "Noto Sans Arabic", system-ui, -apple-system, sans-serif;

  /* A running stitch: the site's divider, after Nadeen's sewn work */
  --stitch: repeating-linear-gradient(90deg, var(--accent) 0 9px, transparent 9px 15px);

  --gutter: clamp(16px, 4vw, 56px);
  --max: 1320px;
  --header-h: 64px;
}

/* Arabic fonts take over when the page is in Arabic */
html.is-ar {
  --serif: "Noto Naskh Arabic", "Cormorant Garamond", serif;
  --sans: "Noto Sans Arabic", "Instrument Sans", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
::selection { background: var(--accent); color: var(--paper); }

/* ---------- Language switching ---------- */
.ar { display: none; }
html.is-ar .en { display: none; }
html.is-ar .ar { display: revert; }
html.is-ar body { line-height: 1.9; }

/* Year ranges like "2022–25" must stay left-to-right inside Arabic text */
.yr { direction: ltr; unicode-bidi: isolate; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-inline: var(--gutter);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}

.brand {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2.2vw, 28px);
  font-size: 0.875rem;
  letter-spacing: 0.02em;
}
.site-nav a { text-decoration: none; color: var(--muted); transition: color .2s; }
.site-nav a:hover, .site-nav a:focus-visible { color: var(--ink); }

.lang-toggle {
  font: inherit;
  font-size: 0.875rem;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--ink);
  border-radius: 999px;
  padding: 4px 14px;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.lang-toggle:hover { background: var(--ink); color: var(--paper); }
.lang-toggle [lang="ar"] { font-family: "Noto Sans Arabic", sans-serif; }

@media (max-width: 760px) {
  .site-header { height: auto; flex-wrap: wrap; padding-block: 10px; gap: 6px 16px; }
  .site-nav { width: 100%; justify-content: space-between; gap: 10px; font-size: 0.8125rem; }
  :root { --header-h: 88px; }
}

/* ---------- Hero ---------- */
.hero {
  max-width: var(--max);
  margin-inline: auto;
  padding: clamp(40px, 7vw, 96px) var(--gutter) clamp(48px, 8vw, 120px);
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: end;
}

.eyebrow, .label, .work-num {
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}
html.is-ar .eyebrow, html.is-ar .label { letter-spacing: 0; font-size: 0.875rem; }

.hero h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(3.25rem, 9vw, 7.5rem);
  line-height: 0.95;
  letter-spacing: -0.01em;
  margin: 20px 0 28px;
}
html.is-ar .hero h1 { line-height: 1.25; letter-spacing: 0; }

.lede {
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  max-width: 34em;
  margin: 0 0 40px;
}

.currently {
  display: block;
  text-decoration: none;
  background: var(--plum-wash);
  border-inline-start: 3px dashed var(--plum);
  padding: 16px 20px;
  max-width: 30em;
  transition: transform .25s;
}
.currently:hover { transform: translateY(-2px); }
.currently .label { color: var(--plum); }
.currently-title { font-family: var(--serif); font-size: 1.5rem; font-weight: 600; margin: 4px 0; line-height: 1.25; }
.currently-body { margin: 0; color: var(--muted); font-size: 0.9375rem; }

.hero-portrait { margin: 0; }
.hero-portrait img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 50% 30%;
  filter: grayscale(1) contrast(1.02);
}

@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; }
  .hero-portrait { order: -1; max-width: 420px; }
}

/* ---------- Sections ---------- */
.section {
  max-width: var(--max);
  margin-inline: auto;
  padding: clamp(56px, 8vw, 120px) var(--gutter) 0;
}

.section-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  line-height: 1.05;
  margin: 0 0 32px;
  padding-bottom: 22px;
  background: var(--stitch) left bottom / 100% 2px no-repeat;
}

/* Works index */
.works-index { list-style: none; margin: 0; padding: 0; }
.works-index a {
  display: grid;
  grid-template-columns: 4.25rem 1fr auto;
  align-items: baseline;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--rule);
  text-decoration: none;
  font-family: var(--serif);
  font-size: clamp(1.35rem, 2.6vw, 2rem);
  line-height: 1.2;
  transition: color .2s, padding .3s;
}
.works-index a:hover { color: var(--c, var(--accent)); padding-inline-start: 10px; }
.works-index a[href="#window-frame"]     { --c: var(--ochre); }
.works-index a[href="#we-plant-trees"]   { --c: var(--orchard); }
.works-index a[href="#fear-after-war"]   { --c: var(--cherry); }
.works-index a[href="#rubbles-to-art"]   { --c: var(--terracotta); }
.works-index a[href="#digital-drawings"] { --c: var(--teal); }
.works-index .num { display: inline-flex; align-items: center; gap: 10px; color: var(--c); }
.works-index .num::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--c);
}
.works-index .num, .works-index .yr {
  font-family: var(--sans);
  font-size: 0.8125rem;
  color: var(--muted);
  letter-spacing: 0.06em;
}

/* ---------- Work ---------- */
.work {
  max-width: var(--max);
  margin-inline: auto;
  padding: clamp(56px, 8vw, 112px) var(--gutter) 0;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: start;
}
.section .work { padding-inline: 0; }

#window-frame     { --c: var(--ochre);      --wash: var(--ochre-wash); }
#we-plant-trees   { --c: var(--orchard);    --wash: var(--orchard-wash); }
#fear-after-war   { --c: var(--cherry);     --wash: var(--cherry-wash); }
#rubbles-to-art   { --c: var(--terracotta); --wash: var(--terracotta-wash); }
#digital-drawings { --c: var(--teal);       --wash: var(--teal-wash); }
#rishpon          { --c: var(--plum);       --wash: var(--plum-wash); }
#lesbos           { --c: var(--cyan);       --wash: var(--cyan-wash); }

/* Each project sits on its own colour band that runs edge to edge */
.work[id] {
  background: var(--wash);
  box-shadow: 0 0 0 100vmax var(--wash);
  clip-path: inset(0 -100vmax);
  padding-bottom: clamp(56px, 8vw, 112px);
}
.works-index + .work, #works + .work { margin-top: clamp(56px, 8vw, 112px); }
.section .work[id] + .work[id] { margin-top: 0; }
.section-title + .work[id] { margin-top: 8px; }

.work-text {
  position: sticky;
  top: calc(var(--header-h) + 32px);
}
.work-num { color: var(--c, var(--accent)); }
.work .work-meta { border-color: color-mix(in srgb, var(--c, var(--ink)) 25%, transparent); }
.work .prose .pull { border-color: var(--c, var(--accent)); }
.work .gallery img { background: color-mix(in srgb, var(--wash, var(--paper-2)) 70%, #fff); }

.work h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2rem, 3.6vw, 3rem);
  line-height: 1.08;
  margin: 10px 0 24px;
}
html.is-ar .work h3 { line-height: 1.4; }

.work-meta {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 20px;
  margin: 0 0 28px;
  padding: 16px 0;
  border-block: 1px solid var(--rule);
  font-size: 0.875rem;
}
.work-meta dt { color: var(--muted); }
.work-meta dd { margin: 0; }

.prose p { margin: 0 0 1em; max-width: 36em; }
.prose em { font-style: italic; }
.prose .pull, .prose blockquote {
  font-family: var(--serif);
  font-size: 1.35rem;
  line-height: 1.4;
  font-style: italic;
  margin: 1.5em 0;
  padding-inline-start: 18px;
  border-inline-start: 2px dashed var(--accent);
}
html.is-ar .prose .pull, html.is-ar .prose blockquote { font-style: normal; font-size: 1.2rem; line-height: 1.9; }

@media (max-width: 900px) {
  .work { grid-template-columns: 1fr; }
  .work-text { position: static; }
}

/* ---------- Gallery ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(12px, 1.6vw, 20px);
  align-items: start;
}
.gallery figure { margin: 0; }
.gallery .wide { grid-column: 1 / -1; }

.gallery img {
  width: 100%;
  background: var(--paper-2);
  cursor: zoom-in;
  transition: opacity .25s;
}
.gallery img:hover { opacity: .9; }

figcaption {
  margin-top: 8px;
  font-size: 0.8125rem;
  color: var(--muted);
  line-height: 1.45;
}

.gallery-note {
  grid-column: 1 / -1;
  font-size: 0.9375rem;
  color: var(--muted);
  max-width: 40em;
}
.gallery-note p { margin: 0; }

@media (max-width: 520px) {
  .gallery { grid-template-columns: 1fr; }
}

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: start;
}
.about .lead {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 2.2vw, 1.75rem);
  line-height: 1.35;
  max-width: none;
}
html.is-ar .about .lead { font-size: 1.35rem; line-height: 1.8; }

.about-photos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.about-photos figure { margin: 0; }
.about-photos figure:nth-child(2) { margin-top: 48px; }

@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; }
}

/* ---------- CV ---------- */
.cv-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 48px clamp(32px, 5vw, 80px);
}
.cv-block h4 {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 14px;
}
html.is-ar .cv-block h4 { letter-spacing: 0; font-size: 0.9375rem; }
.cv-block ul { list-style: none; margin: 0; padding: 0; }
.cv-block li {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 0.9375rem;
  line-height: 1.5;
}
.cv-block .yr { color: var(--muted); font-variant-numeric: tabular-nums; }
.cv-block p { margin: 0; font-size: 0.9375rem; }

@media (max-width: 760px) {
  .cv-grid { grid-template-columns: 1fr; }
}

/* ---------- Residency strip (scrolls sideways) ---------- */
.residency { grid-template-columns: 1fr; }
.residency .work-text { position: static; max-width: 46em; }
#lesbos .strip { scrollbar-color: var(--cyan) transparent; }
.strip {
  display: flex;
  gap: clamp(12px, 1.6vw, 20px);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 14px;
  scrollbar-width: thin;
  scrollbar-color: var(--accent) transparent;
}
.strip figure { flex: 0 0 auto; width: clamp(220px, 28vw, 360px); scroll-snap-align: start; }

/* ---------- Contact ---------- */
.contact { padding-bottom: clamp(56px, 8vw, 120px); }
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(24px, 5vw, 80px);
  align-items: start;
}
.contact-lede {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 2.4vw, 1.85rem);
  line-height: 1.3;
  margin: 0;
  max-width: 18em;
}
.contact-list {
  display: grid;
  grid-template-columns: 7rem 1fr;
  margin: 0;
  font-size: 1rem;
}
.contact-list dt, .contact-list dd {
  padding: 14px 0;
  border-bottom: 1px solid var(--rule);
  margin: 0;
}
.contact-list dt { color: var(--muted); font-size: 0.875rem; }
.contact-list dd { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.contact-list a {
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  direction: ltr;
  unicode-bidi: isolate;
  overflow-wrap: anywhere;
  transition: color .2s, border-color .2s;
}
.contact-list a:hover { color: var(--accent); border-color: var(--accent); }

@media (max-width: 760px) {
  .contact-grid { grid-template-columns: 1fr; }
  .contact-list { grid-template-columns: 5.5rem 1fr; }
}

/* ---------- Footer ---------- */
.site-footer {
  padding: 24px var(--gutter);
  font-size: 0.8125rem;
  color: var(--muted);
  background: var(--stitch) left top / 100% 2px no-repeat;
}
.footer-inner {
  max-width: var(--max);
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
}
.footer-inner p { margin: 0; }
.to-top { text-decoration: none; }
.to-top:hover { color: var(--ink); }

/* ---------- Lightbox ---------- */
.lightbox {
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(20, 18, 16, 0.96);
  color: #eee8dc;
}
.lightbox[open] {
  display: grid;
  grid-template-columns: 64px 1fr 64px;
  align-items: center;
}
.lightbox::backdrop { background: rgba(20, 18, 16, 0.9); }
.lightbox figure {
  margin: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 0 24px;
  min-width: 0;
}
.lightbox img {
  max-width: 100%;
  max-height: calc(100vh - 120px);
  object-fit: contain;
}
.lightbox figcaption { color: #b9b1a3; text-align: center; margin-top: 14px; padding-inline: 12px; }
.lightbox button {
  background: none;
  border: 0;
  color: inherit;
  font-size: 2.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 12px;
  opacity: .7;
}
.lightbox button:hover, .lightbox button:focus-visible { opacity: 1; }
.lb-close { position: absolute; top: 8px; inset-inline-end: 12px; z-index: 1; }
html.is-ar .lb-prev, html.is-ar .lb-next { transform: scaleX(-1); }

@media (max-width: 600px) {
  .lightbox[open] { grid-template-columns: 40px 1fr 40px; }
  .lightbox button { font-size: 2rem; padding: 6px; }
}
