@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,500;0,9..144,600;0,9..144,900;1,9..144,400;1,9..144,500&family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,500;1,6..72,400&family=DM+Mono:wght@400;500&family=IBM+Plex+Sans+Arabic:wght@400;500;600&display=swap');

/* ============================================================
   OMAR N. Sbetan — PORTFOLIO
   Aesthetic: cinematic editorial / film-house monograph
   Voices:  Fraunces (display)  ·  Newsreader (reading)  ·  DM Mono (slate/credits)
   ============================================================ */

:root {
  /* warm filmic palette — calm, not harsh */
  --bg:    #0D0C0A;
  --bg2:   #15130E;
  --bg3:   #1E1B14;
  --bg4:   #29241A;

  --gold:  #C0954A;   /* antique brass */
  --gold2: #E6C37E;   /* champagne highlight */
  --gold3: #7C5E2A;   /* deep */
  --glow:  rgba(192,149,74,0.12);

  --text:  #ECE4D3;   /* warm bone */
  --text2: #A89B82;
  --text3: #6A6151;

  --line:  rgba(192,149,74,0.20);
  --line2: rgba(192,149,74,0.09);
  --hair:  rgba(236,228,211,0.07);

  --nav-h: 66px;
  --ease:  cubic-bezier(0.22, 1, 0.36, 1);

  --f-disp: 'Fraunces', Georgia, serif;
  --f-read: 'Newsreader', Georgia, serif;
  --f-mono: 'DM Mono', ui-monospace, monospace;
  --f-ar:   'IBM Plex Sans Arabic', sans-serif;
}

body.light {
  --bg:    #F1EADB;
  --bg2:   #E9E1CF;
  --bg3:   #DFD5C0;
  --bg4:   #D2C6AC;
  --gold:  #8A6824;
  --gold2: #A8842F;
  --gold3: #6F5320;
  --glow:  rgba(138,104,36,0.10);
  --text:  #1B1610;
  --text2: #5B5240;
  --text3: #968B73;
  --line:  rgba(138,104,36,0.26);
  --line2: rgba(138,104,36,0.10);
  --hair:  rgba(27,22,16,0.07);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--f-read);
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
  transition: background 0.5s var(--ease), color 0.5s var(--ease);
  position: relative;
}
/* warm vignette atmosphere */
body::after {
  content: '';
  position: fixed; inset: 0; pointer-events: none; z-index: 1;
  background: radial-gradient(120% 90% at 50% -10%, transparent 55%, rgba(0,0,0,0.55) 100%);
}
body.light::after {
  background: radial-gradient(120% 90% at 50% -10%, transparent 60%, rgba(120,95,40,0.10) 100%);
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; font-family: inherit; color: inherit; }
::selection { background: var(--gold); color: var(--bg); }

/* ── FILM GRAIN ── */
.grain {
  position: fixed; inset: 0; z-index: 9990; pointer-events: none;
  opacity: 0.05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ── CURSOR (subtle) ── */
.cdot {
  width: 5px; height: 5px; background: var(--gold2); border-radius: 50%;
  position: fixed; top: 0; left: 0; z-index: 9999; pointer-events: none;
  transform: translate(-50%,-50%); transition: width .25s, height .25s, opacity .25s;
}
.cring {
  width: 30px; height: 30px; border: 1px solid var(--gold); border-radius: 50%;
  position: fixed; top: 0; left: 0; z-index: 9998; pointer-events: none;
  transform: translate(-50%,-50%); opacity: .45; transition: opacity .3s, transform .2s var(--ease);
}
@media (hover: none) { .cdot, .cring { display: none; } }

/* ── SCROLL PROGRESS ── */
.scroll-progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 1001; background: transparent; }
.scroll-progress-fill { height: 100%; width: 0%; background: linear-gradient(90deg, var(--gold3), var(--gold), var(--gold2)); transition: width .1s; }

/* ============================================================
   NAVIGATION  — film slate
   ============================================================ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; height: var(--nav-h); z-index: 1000;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 32px;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  border-bottom: 1px solid var(--line2);
}
.nav-brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 34px; height: 34px; flex-shrink: 0;
  border: 1px solid var(--gold); border-radius: 3px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--f-disp); font-weight: 600; font-size: .92rem; color: var(--gold2);
  letter-spacing: -.02em;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-family: var(--f-mono); font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; color: var(--text); }
.brand-sub  { font-family: var(--f-mono); font-size: .56rem; letter-spacing: .22em; text-transform: uppercase; color: var(--text3); }

.nav-links { display: flex; align-items: stretch; gap: 2px; list-style: none; }
.nav-links a {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 6px 15px; gap: 1px;
  font-family: var(--f-mono); font-size: .66rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--text3); transition: color .25s;
}
.nav-links a .ar { font-family: var(--f-ar); font-size: .56rem; letter-spacing: 0; color: var(--text3); opacity: .6; transition: opacity .25s, color .25s; }
.nav-links a::after {
  content: ''; position: absolute; left: 15px; right: 15px; bottom: 9px; height: 1px;
  background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease);
}
.nav-links a:hover, .nav-links a.active { color: var(--gold2); }
.nav-links a:hover .ar, .nav-links a.active .ar { color: var(--gold); opacity: 1; }
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); }

.nav-right { display: flex; align-items: center; gap: 10px; }
.btn-mode {
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center; color: var(--text2);
  transition: border-color .25s, color .25s, background .25s;
}
.btn-mode:hover { border-color: var(--gold); color: var(--gold2); background: var(--glow); }
.btn-mode svg { width: 16px; height: 16px; }
.btn-mode .ico-sun { display: none; }
body.light .btn-mode .ico-sun { display: block; }
body.light .btn-mode .ico-moon { display: none; }

.hamburger { display: none; flex-direction: column; gap: 5px; width: 30px; padding: 6px 2px; }
.hamburger span { height: 1.4px; background: var(--text2); display: block; border-radius: 2px; transition: .3s; }

.drawer {
  display: none; position: fixed; top: var(--nav-h); left: 0; right: 0; z-index: 999;
  background: var(--bg2); border-bottom: 1px solid var(--line); padding: 12px 24px 20px;
  flex-direction: column;
}
.drawer.open { display: flex; }
.drawer a {
  display: flex; justify-content: space-between; align-items: baseline; padding: 14px 2px;
  font-family: var(--f-mono); font-size: .8rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text2); border-bottom: 1px solid var(--line2); transition: color .2s;
}
.drawer a .ar { font-family: var(--f-ar); font-size: .72rem; color: var(--text3); }
.drawer a:hover, .drawer a.active { color: var(--gold2); }

/* ── PAGE WRAP + transition ── */
.pg { padding-top: var(--nav-h); min-height: 100vh; position: relative; z-index: 2; animation: pgFade .5s var(--ease) both; }
@keyframes pgFade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ── REVEAL ── */
.rv { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.rv.on { opacity: 1; transform: none; }
.rv.d1 { transition-delay: .08s; } .rv.d2 { transition-delay: .16s; }
.rv.d3 { transition-delay: .24s; } .rv.d4 { transition-delay: .32s; }

/* ============================================================
   TYPOGRAPHY UTILITIES
   ============================================================ */
.eyebrow {
  font-family: var(--f-mono); font-size: .68rem; letter-spacing: .28em; text-transform: uppercase; color: var(--gold);
}
.eyebrow-ar { font-family: var(--f-ar); font-size: .72rem; color: var(--text3); direction: rtl; }

.display {
  font-family: var(--f-disp); font-weight: 900; line-height: .92; letter-spacing: -.02em;
  font-optical-sizing: auto;
}
.section-title { font-family: var(--f-disp); font-weight: 600; line-height: 1; font-size: clamp(2rem,4vw,3.4rem); }
.gold-text { color: var(--gold2); }
.italic-gold { font-style: italic; color: var(--gold2); font-weight: 400; }
.outline-text { -webkit-text-stroke: 1px var(--gold); color: transparent; }

.body-text { font-family: var(--f-read); font-size: 1.06rem; color: var(--text2); line-height: 1.85; }
.muted { color: var(--text2); }
.gold-bar { width: 46px; height: 2px; background: var(--gold); margin: 16px 0; }

/* SECTION HEADER — reel marker */
.reel-head { display: flex; align-items: baseline; gap: 18px; margin-bottom: 30px; }
.reel-idx  { font-family: var(--f-mono); font-size: .72rem; letter-spacing: .12em; color: var(--gold); white-space: nowrap; }
.reel-title { font-family: var(--f-disp); font-weight: 600; font-size: clamp(1.5rem,3vw,2.1rem); line-height: 1; }
.reel-ar   { font-family: var(--f-ar); font-size: .72rem; color: var(--text3); direction: rtl; }
.reel-line { flex: 1; height: 1px; background: linear-gradient(90deg, var(--line), transparent); align-self: center; }

/* ── FOOTER ── */
.footer {
  position: relative; z-index: 2; border-top: 1px solid var(--line2);
  padding: 30px 40px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px;
}
.footer-name { font-family: var(--f-disp); font-style: italic; font-size: 1.05rem; color: var(--gold2); }
.footer-note { font-family: var(--f-mono); font-size: .64rem; letter-spacing: .18em; text-transform: uppercase; color: var(--text3); }

@media (max-width: 880px) {
  .nav { padding: 0 18px; }
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .brand-sub { display: none; }
  .footer { padding: 22px 20px; flex-direction: column; align-items: flex-start; }
}
