/* ============ FONTS (the real deck fonts, self-hosted) ============ */
@font-face {
  font-family: "Ragam";
  src: url("assets/fonts/ragam.woff2") format("woff2");
  font-weight: 300 500;
  font-display: swap;
}
@font-face {
  font-family: "Rawrote";
  src: url("assets/fonts/rawrote.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

/* ============ TOKENS & RESET ============ */
:root {
  --bg: #060606;
  --bg-soft: #0c0c0d;
  --text: #e9e7e2;
  --silver: #b9c0c4;
  --muted: #8d9296;
  --line: rgba(233, 231, 226, 0.12);
  --orange: #ffb52e;
  --red: #ff5757;
  --pink: #ff5fa8;
  --grad: linear-gradient(92deg, var(--orange), var(--red) 55%, var(--pink));
  --frame-grad: linear-gradient(135deg, rgba(255, 181, 46, 0.75), rgba(255, 87, 87, 0.4) 45%, rgba(255, 95, 168, 0.55));
  --serif: "Ragam", "Cormorant Garamond", Georgia, serif;
  --doodle: "Rawrote", "Gochi Hand", "Caveat", cursive;
  --sans: "Manrope", system-ui, sans-serif;
  --radius: 22px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: auto; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

.serif { font-family: var(--serif); font-weight: 300; }
.doodle { font-family: var(--doodle); letter-spacing: 0.07em; word-spacing: 0.14em; }

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.section { position: relative; padding: clamp(90px, 12vw, 160px) clamp(20px, 6vw, 96px); }

/* split chars */
.char { display: inline-block; will-change: transform; }
.word { display: inline-block; white-space: nowrap; }

/* doodle svg strokes: dash values set in JS */
.doodle-svg .draw { fill: none; }

a:focus-visible, button:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ============ PROGRESS + CURSOR ============ */
.progress-bar {
  position: fixed; top: 0; left: 0; height: 3px; width: 100%;
  background: var(--grad);
  transform-origin: 0 50%; transform: scaleX(0);
  z-index: 1000;
}

.cursor {
  position: fixed; top: 0; left: 0; width: 14px; height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 181, 46, 0.9), rgba(255, 95, 168, 0.55));
  pointer-events: none; z-index: 999;
  transform: translate(-50%, -50%);
  mix-blend-mode: screen;
  opacity: 0;
}
@media (hover: none), (pointer: coarse) { .cursor { display: none; } }

/* ============ PRELOADER ============ */
.preloader {
  position: fixed; inset: 0; z-index: 2000;
  background: var(--bg);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
}
.preloader-name { font-size: clamp(34px, 6vw, 64px); letter-spacing: 0.14em; color: var(--silver); }
.preloader-sub { font-size: 18px; color: var(--muted); }

/* ============ NAV ============ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 900;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px clamp(20px, 4vw, 48px);
  background: linear-gradient(180deg, rgba(6, 6, 6, 0.82), rgba(6, 6, 6, 0));
}
.nav-logo { font-size: 26px; letter-spacing: 0.18em; color: var(--text); }
.nav-logo-dot { background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.nav-links { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 30px); }
.nav-links a {
  font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--silver);
  transition: color 0.25s ease;
}
.nav-links a:hover { color: var(--text); }
.nav-cta {
  border: 1px solid var(--line); border-radius: 100px; padding: 8px 18px;
  transition: border-color 0.25s ease, color 0.25s ease;
}
.nav-cta:hover { border-color: var(--orange); }
@media (max-width: 720px) { .nav-links a:not(.nav-cta) { display: none; } }

/* ============ HERO ============ */
.hero {
  position: relative; min-height: 100svh;
  overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; object-position: center 38%; }

.hero-content {
  position: absolute; z-index: 2;
  left: clamp(24px, 7vw, 110px);
  top: 50%;
  transform: translateY(-50%);
  max-width: min(620px, 46vw);
  text-align: left;
}
.hero-kicker {
  font-size: 12px; letter-spacing: 0.42em; text-transform: uppercase; color: var(--muted);
  margin-bottom: 16px;
}
.hero-title {
  font-size: clamp(46px, 7.4vw, 118px);
  line-height: 0.98;
  letter-spacing: 0.06em;
  color: #dfe3e5;
  text-shadow: 0 8px 60px rgba(0, 0, 0, 0.75);
}
.hero-doodle-wrap { position: relative; display: inline-block; margin-top: clamp(10px, 1.6vw, 22px); }
.hero-doodle {
  font-size: clamp(26px, 3.2vw, 44px); letter-spacing: 0.08em;
  filter: drop-shadow(0 3px 14px rgba(0, 0, 0, 0.9)) drop-shadow(0 0 26px rgba(0, 0, 0, 0.7));
}
.underline-svg { position: absolute; left: 0; bottom: -14px; width: 100%; }
.hero-tag { margin-top: 30px; font-size: clamp(16px, 1.7vw, 21px); color: #c8ccce; text-shadow: 0 2px 18px rgba(0, 0, 0, 0.95); }
.hero-scrollcue {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%);
  z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.hero-scrollcue span { display: block; width: 1px; height: 54px; background: linear-gradient(180deg, transparent, var(--silver)); }
.hero-scrollcue p { font-size: 11px; letter-spacing: 0.4em; text-transform: uppercase; color: var(--muted); }

@media (max-width: 760px) {
  .hero { display: flex; align-items: flex-start; justify-content: center; }
  .hero-content {
    position: static; transform: none;
    max-width: 100%;
    padding: 108px 24px 0;
    text-align: center;
  }
  .hero-doodle-wrap { display: inline-block; }
  .hero-bg img {
    width: 165%; max-width: none; margin-left: -32%;
    object-fit: contain; object-position: center bottom;
    -webkit-mask-image: radial-gradient(130% 110% at 50% 100%, #000 55%, transparent 96%);
    mask-image: radial-gradient(130% 110% at 50% 100%, #000 55%, transparent 96%);
  }
}

/* ============ MARQUEE ============ */
.marquee {
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 22px 0; overflow: hidden; background: var(--bg-soft);
}
.marquee-track { display: flex; align-items: center; gap: 48px; width: max-content; will-change: transform; }
.marquee-track span { font-size: clamp(22px, 3vw, 38px); letter-spacing: 0.22em; text-transform: uppercase; color: var(--silver); white-space: nowrap; }
.marquee-track i { font-style: normal; font-size: 22px; background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

/* ============ SECTION HEADINGS ============ */
.section-heading { position: relative; margin-bottom: clamp(40px, 6vw, 72px); }
.section-heading.center { text-align: center; }
.section-heading h2 {
  font-size: clamp(44px, 7vw, 96px);
  letter-spacing: 0.08em; line-height: 1;
  color: #dfe3e5;
}
.heading-doodle {
  position: relative; display: inline-block;
  margin-top: 16px;
  font-size: clamp(20px, 2.4vw, 29px);
  line-height: 1.25;
  transform: rotate(-2.5deg);
}
.arrow-svg { position: absolute; right: -74px; top: -6px; width: 62px; }
@media (max-width: 700px) { .arrow-svg { display: none; } }

/* ============ ABOUT ============ */
.about { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(30px, 5vw, 80px); align-items: center; }
.about-media {
  position: relative; border-radius: var(--radius); overflow: hidden;
  order: 2;
  padding: 1px; background: var(--frame-grad);
}
.about-media img { width: 100%; height: 100%; object-fit: cover; border-radius: calc(var(--radius) - 1px); transform-origin: center; }
.about-inner { order: 1; }
.about-copy p { margin-bottom: 18px; color: var(--silver); max-width: 56ch; }
.about-copy strong { color: var(--text); font-weight: 500; }
.about-copy em { font-size: 1.28em; color: var(--text); line-height: 1.4; }
.about-stats {
  margin-top: clamp(34px, 4vw, 56px);
  display: grid; grid-template-columns: repeat(4, auto); gap: clamp(18px, 3vw, 44px);
  justify-content: start;
}
.stat { display: flex; flex-direction: column; }
.stat-num { font-size: clamp(38px, 4.6vw, 62px); line-height: 1; color: var(--text); }
.stat-label { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-top: 6px; max-width: 150px; }
.about-fields {
  margin-top: clamp(24px, 3vw, 36px);
  font-size: clamp(19px, 2.1vw, 25px);
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  transform: rotate(-1.4deg);
  display: inline-block;
}
@media (max-width: 900px) {
  .about { grid-template-columns: 1fr; }
  .about-media { order: 1; max-width: 520px; margin: 0 auto; }
  .about-inner { order: 2; }
  .about-stats { grid-template-columns: repeat(2, auto); }
}

/* ============ PROJECTS INTRO ============ */
.projects-intro { position: relative; }
.projects-intro-pin {
  position: relative; height: 100vh; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.intro-media { position: absolute; inset: 0; }
.projects-intro-pin img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.projects-intro-veil { position: absolute; inset: 0; background: rgba(6, 6, 6, 0.25); }
.projects-intro-title {
  position: relative; z-index: 2;
  font-size: clamp(56px, 12vw, 170px); letter-spacing: 0.12em; color: #e3e6e8;
  text-shadow: 0 10px 80px rgba(0, 0, 0, 0.8);
}
.projects-intro-sub {
  position: absolute; z-index: 2; bottom: 16vh;
  font-size: clamp(21px, 2.8vw, 32px); transform: rotate(-2deg);
}

/* ============ PROJECT ============ */
.project { border-top: 1px solid var(--line); }
.project-head {
  display: flex; align-items: flex-start; gap: clamp(16px, 3vw, 40px);
  flex-wrap: wrap;
  margin-bottom: clamp(30px, 4vw, 56px);
}
.project-index {
  font-size: clamp(15px, 1.6vw, 19px); color: var(--muted); letter-spacing: 0.2em;
  padding-top: clamp(10px, 1.4vw, 22px);
}
.project-heading { display: flex; flex-direction: column; }
.project-title-wrap { display: flex; align-items: baseline; gap: clamp(14px, 2vw, 26px); flex-wrap: wrap; }
.project-title {
  font-size: clamp(36px, 5.6vw, 78px); letter-spacing: 0.05em; line-height: 1.02;
  color: #dfe3e5;
}
.project-year {
  font-size: clamp(22px, 2.8vw, 36px);
  font-style: italic;
  letter-spacing: 0.1em;
  filter: drop-shadow(0 0 14px rgba(255, 95, 168, 0.35));
}
.project-role-title {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(19px, 2.2vw, 27px);
  letter-spacing: 0.08em;
  color: var(--silver);
}
.project-sub {
  display: flex; align-items: flex-start;
  gap: clamp(96px, 9vw, 150px);
  flex-wrap: wrap;
  margin-top: 8px;
}
.project-doodle {
  position: relative;
  max-width: 340px;
  font-size: clamp(19px, 2.1vw, 26px); line-height: 1.3;
  transform: rotate(-2.4deg);
  margin-top: -4px;
  filter: drop-shadow(0 0 16px rgba(255, 87, 87, 0.25));
}
.link-arrow { position: absolute; left: -78px; top: 0; width: 58px; }
@media (max-width: 900px) {
  .project-sub { gap: 18px; }
  .link-arrow { display: none; }
}

.project-body {
  display: grid; grid-template-columns: 1.35fr 1fr;
  gap: clamp(26px, 4vw, 64px); align-items: center;
  margin-bottom: clamp(30px, 4vw, 56px);
}
.project-body.flip .project-media { order: 2; }
.project-body.flip .project-info { order: 1; }
.project-media {
  position: relative; border-radius: var(--radius); overflow: hidden;
  padding: 1px; background: var(--frame-grad);
  cursor: zoom-in;
}
.project-media img {
  width: 100%; height: 100%; object-fit: cover;
  aspect-ratio: 3 / 2;
  border-radius: calc(var(--radius) - 1px);
  transform-origin: center;
}
.project-bullets li {
  position: relative; padding-left: 22px; margin-bottom: 13px;
  color: var(--silver); font-size: 15px;
}
.project-bullets li::before {
  content: "✦"; position: absolute; left: 0; top: 1px;
  font-size: 11px;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.zoom-hint {
  margin-top: 18px;
  font-size: 18px;
  color: var(--muted);
  transform: rotate(-1.6deg);
}
@media (max-width: 900px) {
  .project-body { grid-template-columns: 1fr; }
  .project-body.flip .project-media { order: 1; }
  .project-body.flip .project-info { order: 2; }
}

/* gallery strips */
.strip { overflow: hidden; }
.strip-track { display: flex; gap: 18px; width: max-content; will-change: transform; }
.strip-track img {
  height: clamp(170px, 24vw, 290px); width: auto;
  border-radius: 14px;
  border: 1px solid rgba(255, 181, 46, 0.28);
  cursor: zoom-in;
  transition: border-color 0.3s ease;
}
.strip-track img:hover { border-color: rgba(255, 181, 46, 0.7); }

/* ============ PRESS ============ */
.press { text-align: center; }
.quotes { display: flex; flex-direction: column; gap: clamp(52px, 7vw, 96px); max-width: 1000px; margin: 0 auto; }
.quote { position: relative; padding-top: 10px; }
.quote-mark {
  position: absolute; top: -30px; left: 50%; transform: translateX(-50%);
  font-size: clamp(80px, 10vw, 140px); line-height: 1;
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  opacity: 0.85;
  pointer-events: none;
}
.quote-text {
  position: relative;
  font-size: clamp(30px, 4.8vw, 62px); line-height: 1.16; letter-spacing: 0.02em;
  color: #d9dde0;
}
.quote[lang="ar"] .quote-text { font-family: "Amiri", var(--serif); line-height: 1.6; }
.quote cite {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  margin-top: 20px; font-style: normal;
  font-size: 13px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--muted);
}
.cite-line { display: block; width: 44px; height: 2px; background: var(--grad); border-radius: 2px; transform-origin: left center; }

/* ============ AI ============ */
.ai-copy { max-width: 760px; margin: 0 auto clamp(40px, 5vw, 64px); text-align: center; color: var(--silver); }
.ai-copy em { color: var(--text); }
.ai-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px;
}
.ai-card { position: relative; border-radius: 16px; overflow: hidden; cursor: zoom-in; }
.ai-card img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3; transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1); }
.ai-card:hover img { transform: scale(1.05); }
.ai-card figcaption {
  position: absolute; left: 14px; bottom: 10px;
  font-size: 19px; color: #fff;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.9);
}
.ai-card .play-badge {
  position: absolute; top: 12px; right: 12px;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(6, 6, 6, 0.55);
  border: 1px solid rgba(255, 181, 46, 0.6);
  display: flex; align-items: center; justify-content: center;
  color: var(--orange); font-size: 15px;
  pointer-events: none;
}
@media (max-width: 800px) { .ai-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .ai-grid { grid-template-columns: 1fr; } }

/* ============ CTA ============ */
.cta {
  position: relative; min-height: 92vh;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; text-align: center;
}
.cta-bg { position: absolute; inset: 0; }
.cta-bg img { width: 100%; height: 100%; object-fit: cover; }
.cta-content { position: relative; z-index: 2; padding: 0 24px; max-width: 1000px; }
.cta-title {
  font-size: clamp(42px, 7.6vw, 104px); line-height: 1.06; letter-spacing: 0.06em;
  color: #e3e0da;
  text-shadow: 0 8px 60px rgba(0, 0, 0, 0.8);
}
.cta-scribble { width: min(420px, 60%); margin: 18px auto 0; display: block; }
.cta-sub { margin-top: 18px; font-size: clamp(21px, 2.5vw, 29px); }
.cta-btn {
  display: inline-block; margin-top: 38px;
  font-size: clamp(15px, 1.6vw, 19px); letter-spacing: 0.08em;
  padding: 15px 34px; border-radius: 100px;
  border: 1px solid rgba(255, 181, 46, 0.55);
  color: var(--text);
  background: rgba(6, 6, 6, 0.4);
  transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}
.cta-btn:hover { border-color: var(--pink); background: rgba(255, 95, 168, 0.12); transform: translateY(-2px); }

/* ============ FOOTER ============ */
.footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: 26px clamp(20px, 6vw, 96px);
  border-top: 1px solid var(--line);
  color: var(--muted); font-size: 14px; letter-spacing: 0.12em;
}
.footer-note { font-size: 17px; }

/* ============ AMBIENT VIDEO LAYERS ============ */
.bg-video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0; pointer-events: none;
}

/* ============ LIGHTBOX ============ */
.lightbox {
  position: fixed; inset: 0; z-index: 1500;
  background: rgba(4, 4, 4, 0.92);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  display: none;
  align-items: center; justify-content: center;
}
.lightbox.open { display: flex; }
.lb-stage {
  position: relative;
  max-width: min(1280px, 92vw); max-height: 84vh;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.lb-img, .lb-video {
  max-width: 100%; max-height: 78vh;
  border-radius: 14px;
  border: 1px solid rgba(255, 181, 46, 0.35);
  display: none;
}
.lb-img.show, .lb-video.show { display: block; }
.lb-caption { font-size: 20px; color: var(--silver); text-align: center; }
.lb-close, .lb-prev, .lb-next {
  position: absolute; z-index: 2;
  background: rgba(12, 12, 13, 0.7);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 50%;
  width: 52px; height: 52px;
  font-size: 22px; line-height: 1;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: border-color 0.25s ease, background 0.25s ease;
}
.lb-close:hover, .lb-prev:hover, .lb-next:hover { border-color: var(--orange); background: rgba(255, 181, 46, 0.12); }
.lb-close { top: 22px; right: 22px; }
.lb-prev { left: 18px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 18px; top: 50%; transform: translateY(-50%); }
@media (max-width: 700px) {
  .lb-prev { left: 8px; width: 44px; height: 44px; }
  .lb-next { right: 8px; width: 44px; height: 44px; }
  .lb-close { top: 12px; right: 12px; width: 44px; height: 44px; }
  .lb-img, .lb-video { max-height: 70vh; }
}
