:root {
  --bg: #0d0d0d;
  --fg: #f1eee8;
  --muted: #8f8a83;
  --soft: #c9c4bc;
  --line: #2a2a2a;
  --accent: #ff5a2c;
  --accent-ink: #0d0d0d;

  --display-en: "Syne", "Helvetica Neue", Arial, sans-serif;
  --body-en: "Inter Tight", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display-ar: "Alexandria", "IBM Plex Sans Arabic", sans-serif;
  --body-ar: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;

  --display: var(--display-en);
  --body: var(--body-en);

  --gutter: clamp(16px, 4vw, 56px);
  --max: 1440px;
  --ease: cubic-bezier(.2, .7, .1, 1);
}

html[lang="ar"] {
  --display: var(--display-ar);
  --body: var(--body-ar);
}

/* Show only the active language */
html[lang="en"] .ar,
html[lang="ar"] .en { display: none !important; }

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

html { scroll-behavior: smooth; scroll-padding-top: 72px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
html[lang="ar"] body { font-size: 18px; line-height: 1.9; }

/* Film grain */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

::selection { background: var(--accent); color: var(--accent-ink); }

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
cite { font-style: normal; direction: ltr; unicode-bidi: isolate; }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 20px var(--gutter);
  color: #fff;
  transition: background .3s, padding .3s;
}
.site-header.scrolled {
  padding-block: 14px;
  background: rgba(13,13,13,.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.brand {
  font-family: var(--display);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
}
html[lang="ar"] .brand { letter-spacing: 0; font-size: 17px; }

.nav {
  display: flex;
  gap: 28px;
  margin-inline-start: auto;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
}
html[lang="ar"] .nav { letter-spacing: 0; font-size: 15px; }
.nav a { position: relative; text-decoration: none; }
.nav a::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  inset-block-end: -4px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .4s var(--ease);
}
.nav a:hover::after { transform: scaleX(1); transform-origin: left; }

.lang-toggle {
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  min-width: 52px;
  padding: 7px 14px;
  border: 1px solid currentColor;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  transition: background .25s, color .25s;
}
.lang-toggle:hover { background: #fff; color: #000; }
.lang-toggle .en { font-family: var(--body-ar); font-size: 14px; }
.lang-toggle .ar { font-family: var(--body-en); letter-spacing: .1em; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  height: 100svh;
  min-height: 560px;
  max-height: 1100px;
  overflow: hidden;
  isolation: isolate;
}
.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% 40%;
  z-index: -2;
  transform: scale(1.06);
  animation: hero-zoom 2.4s var(--ease) forwards;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(to top, rgba(13,13,13,.95) 0%, rgba(13,13,13,.55) 35%, rgba(13,13,13,0) 65%),
    linear-gradient(to bottom, rgba(13,13,13,.6), rgba(13,13,13,0) 22%);
}
@keyframes hero-zoom { to { transform: scale(1); } }

.hero-content {
  position: absolute;
  inset-inline: var(--gutter);
  inset-block-end: clamp(28px, 5vw, 64px);
}

.hero-kicker {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
}
html[lang="ar"] .hero-kicker { letter-spacing: 0; font-size: 16px; }

.hero-name {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(40px, 13vw, 240px);
  line-height: .86;
  letter-spacing: -.04em;
  text-transform: uppercase;
}
html[lang="ar"] .hero-name {
  font-size: clamp(64px, 13vw, 200px);
  line-height: 1.12;
  letter-spacing: 0;
}

.hero-roles {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 24px 0 0;
}
.hero-roles span {
  padding: 6px 14px;
  border: 1px solid rgba(241,238,232,.4);
  border-radius: 999px;
  font-size: 13px;
  letter-spacing: .06em;
  text-transform: uppercase;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
html[lang="ar"] .hero-roles span { font-size: 15px; letter-spacing: 0; }

.scroll-cue {
  position: absolute;
  inset-inline-end: var(--gutter);
  inset-block-end: clamp(28px, 5vw, 64px);
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 22px;
  text-decoration: none;
  animation: bob 2.2s ease-in-out infinite;
}
@keyframes bob { 50% { transform: translateY(6px); } }

/* ---------- Marquee ---------- */
.marquee {
  overflow: hidden;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 14px 0;
  direction: ltr;
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 38s linear infinite;
}
.marquee-track span {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(18px, 2vw, 26px);
  text-transform: uppercase;
  white-space: nowrap;
}
html[lang="ar"] .marquee-track { animation-direction: reverse; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(88px, 12vw, 180px) var(--gutter) 0;
}

.section-label {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin: 0 0 clamp(28px, 4vw, 56px);
  font-family: var(--body);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
}
html[lang="ar"] .section-label { font-size: 16px; letter-spacing: 0; }
.section-label .num { color: var(--accent); font-family: var(--body-en); }
.section-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
  align-self: center;
}

.statement {
  max-width: 22ch;
  margin: 0 0 clamp(48px, 7vw, 96px);
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(32px, 5.2vw, 76px);
  line-height: 1.04;
  letter-spacing: -.025em;
}
html[lang="ar"] .statement {
  max-width: 24ch;
  font-size: clamp(28px, 4.2vw, 60px);
  line-height: 1.45;
  letter-spacing: 0;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
}
.tags li {
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  color: var(--muted);
}

/* About */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: end;
}
.about-portrait { margin: 0; }
.about-portrait img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  filter: grayscale(1) contrast(1.05);
}
.about-portrait:hover img { filter: none; }
.about-text p { max-width: 58ch; color: var(--soft); margin: 0 0 18px; }

/* Quotes */
.quote {
  margin: clamp(88px, 12vw, 160px) 0 0;
  padding: 0;
  max-width: 1100px;
}
.quote::before {
  content: "“";
  display: block;
  height: .5em;
  font-family: var(--display-en);
  font-weight: 800;
  font-size: clamp(120px, 14vw, 200px);
  line-height: .9;
  color: var(--accent);
}
html[lang="ar"] .quote::before { content: "«"; }
.quote > p {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(28px, 4.2vw, 60px);
  line-height: 1.1;
  letter-spacing: -.02em;
}
html[lang="ar"] .quote > p { font-size: clamp(26px, 3.4vw, 48px); line-height: 1.5; letter-spacing: 0; }
.quote-more p {
  max-width: 62ch;
  margin: 28px 0 0;
  color: var(--muted);
}

/* Work */
.entry {
  padding: clamp(36px, 5vw, 64px) 0;
  border-block-start: 1px solid var(--line);
}
.entry-head {
  display: grid;
  grid-template-columns: minmax(110px, 1fr) minmax(0, 8fr);
  gap: 16px clamp(20px, 3vw, 48px);
  align-items: baseline;
  margin-block-end: clamp(24px, 3vw, 40px);
}
.entry-year {
  font-family: var(--body-en);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .08em;
  color: var(--accent);
  direction: ltr;
  unicode-bidi: isolate;
}
.entry-title {
  margin: 0;
  font-family: var(--display-en);
  font-weight: 800;
  font-size: clamp(26px, 8.5vw, 104px);
  line-height: .92;
  letter-spacing: -.035em;
  text-transform: uppercase;
  transition: color .3s;
}
.entry:hover .entry-title { color: var(--accent); }
html[lang="ar"] .entry-title .ar { font-family: var(--display-ar); letter-spacing: 0; line-height: 1.3; }
.entry-meta { grid-column: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.entry-meta p { margin: 0; color: var(--muted); font-size: 15px; }

.watch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1px solid var(--fg);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .04em;
  text-decoration: none;
  transition: background .25s, color .25s, border-color .25s;
}
.watch:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
html[lang="ar"] .watch .arrow { display: inline-block; transform: scaleX(-1); }
.links { display: flex; flex-wrap: wrap; gap: 10px; margin: 24px 0 0; }

.entry-media { display: grid; gap: clamp(8px, 1vw, 16px); }
.entry-media.two { grid-template-columns: 1fr 1fr; }
.entry-media.two img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.entry-media.two.tall img { aspect-ratio: 4 / 5; }
.entry-media.one img { width: 100%; max-height: 640px; object-fit: cover; }
.entry-media.stack img { width: 100%; }

/* Image wipe-in when a block scrolls into view */
.entry-media img, .about-portrait img {
  clip-path: inset(0 0 0 0);
  transition: clip-path 1.2s var(--ease), filter .8s var(--ease);
}
.reveal:not(.in) .entry-media img,
.reveal:not(.in) .about-portrait img { clip-path: inset(100% 0 0 0); }

.credits { list-style: none; margin: 0; padding: 0; }
.credits li {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 16px;
  padding: 18px 0;
  border-block-start: 1px solid var(--line);
  align-items: baseline;
}
.credits cite {
  font-family: var(--display-en);
  font-weight: 700;
  font-size: clamp(20px, 2.2vw, 30px);
  letter-spacing: -.01em;
  text-align: start;
}
html[lang="ar"] .credits cite { text-align: right; }
.credits li > span { color: var(--muted); font-size: 15px; }

/* Gallery */
.gallery { padding-block-start: clamp(88px, 12vw, 180px); }
.gallery-track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 0 var(--gutter) 16px;
  scrollbar-width: none;
  cursor: grab;
}
.gallery-track::-webkit-scrollbar { display: none; }
.gallery-track.dragging { cursor: grabbing; scroll-snap-type: none; }
.gallery-track img {
  flex: none;
  height: clamp(300px, 52vw, 640px);
  width: auto;
  object-fit: cover;
  scroll-snap-align: center;
  user-select: none;
  -webkit-user-drag: none;
}
.gallery-credit {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 8px 0 0;
  padding: 0 var(--gutter);
  font-size: 13px;
  color: var(--muted);
}

/* Creations */
.feature-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: baseline;
  margin: 0 0 16px;
  color: var(--muted);
}
.feature-title {
  margin: 0 0 clamp(32px, 4vw, 56px);
  font-family: var(--display-en);
  font-weight: 800;
  font-size: clamp(30px, 10vw, 168px);
  line-height: .88;
  letter-spacing: -.045em;
  text-transform: uppercase;
}
.feature-title cite { display: block; text-align: start; }
html[lang="ar"] .feature-title cite { text-align: right; }
.feature-media {
  grid-template-columns: 1.1fr 1fr;
  align-items: end;
}
.feature-media img { width: 100%; object-fit: cover; }
.feature-media img:last-child { margin-block-end: clamp(-80px, -6vw, -24px); }
.feature-text {
  max-width: 640px;
  margin-block-start: clamp(56px, 8vw, 120px);
  margin-inline-start: auto;
}
.feature-text p { color: var(--soft); margin: 0 0 18px; }

/* Teaching */
.teaching-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}
.teaching-grid .entry-media img:nth-child(2) {
  position: relative;
  width: 72%;
  margin-inline-start: auto;
  margin-block-start: -12%;
  border: 8px solid var(--bg);
}
.teaching-text p { color: var(--soft); margin: 0 0 18px; max-width: 58ch; }

/* Education */
.edu { margin: 0; }
.edu div {
  display: grid;
  grid-template-columns: minmax(110px, 1fr) minmax(0, 8fr);
  gap: 24px;
  padding: 24px 0;
  border-block-start: 1px solid var(--line);
  align-items: baseline;
}
.edu dt {
  font-family: var(--body-en);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .08em;
  color: var(--accent);
  direction: ltr;
  unicode-bidi: isolate;
  text-align: start;
}
html[lang="ar"] .edu dt { text-align: right; }
.edu dd { margin: 0; display: flex; flex-wrap: wrap; gap: 4px 24px; align-items: baseline; }
.edu strong {
  font-family: var(--display-en);
  font-weight: 700;
  font-size: clamp(22px, 2.6vw, 36px);
  letter-spacing: -.01em;
  direction: ltr;
  unicode-bidi: isolate;
}
.edu dd > span { color: var(--muted); }

/* Contact */
.contact {
  margin-block-start: clamp(88px, 12vw, 180px);
  background: var(--accent);
  color: var(--accent-ink);
}
.contact-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(72px, 10vw, 140px) var(--gutter) clamp(56px, 8vw, 100px);
}
.contact .section-label,
.contact .section-label .num { color: var(--accent-ink); }
.contact .section-label::after { background: rgba(13,13,13,.25); }
.contact-head {
  margin: 0 0 24px;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(28px, 9vw, 200px);
  line-height: .88;
  letter-spacing: -.045em;
  text-transform: uppercase;
}
html[lang="ar"] .contact-head { line-height: 1.2; letter-spacing: 0; font-size: clamp(56px, 10vw, 160px); }
.contact-intro { margin: 0 0 32px; font-size: 18px; }
.contact-email {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  padding: 12px 22px;
  border-radius: 999px;
  background: var(--accent-ink);
  color: var(--fg);
  font-family: var(--body-en);
  font-size: clamp(14px, 1.3vw, 17px);
  font-weight: 500;
  text-decoration: none;
  overflow-wrap: anywhere;
  transition: transform .3s var(--ease);
}
.contact-email:hover { transform: translateY(-3px); }
.contact-email span { transition: transform .3s var(--ease); }
.contact-email:hover span { transform: translateX(6px); }
.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin: 28px 0 0;
  font-weight: 500;
}
.contact-links a { text-decoration: none; border-block-end: 1.5px solid currentColor; }

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 20px var(--gutter);
  border-block-start: 1px solid rgba(13,13,13,.25);
  font-size: 13px;
}
.site-footer a { text-decoration: none; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(32px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .reveal:not(.in) .entry-media img,
  .reveal:not(.in) .about-portrait img { clip-path: none; }
  .hero-img, .scroll-cue, .marquee-track { animation: none; }
  .hero-img { transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .entry-head { grid-template-columns: 1fr; }
  .entry-meta { grid-column: auto; }
  .about-grid, .teaching-grid { grid-template-columns: 1fr; }
  .about-portrait { max-width: 440px; }
  .credits li { grid-template-columns: 1fr; gap: 2px; }
  .edu div { grid-template-columns: 1fr; gap: 6px; }
}

@media (max-width: 760px) {
  .nav { display: none; }
  .lang-toggle { margin-inline-start: auto; }
  .hero { max-height: none; }
  .hero-img { object-position: 70% 30%; }
  .scroll-cue { display: none; }
  .entry-media.two, .feature-media { grid-template-columns: 1fr; }
  .feature-media img:last-child { margin: 0; }
  .teaching-grid .entry-media img:nth-child(2) { width: 100%; margin-block-start: 0; border: 0; }
  .site-footer { flex-direction: column; }
}
