/* ============================================================
   Fatima Alkhaldi — Portfolio
   Pixel-faithful artboard display + responsive nav overlay.
   Each page renders the original XD artboard PNG full-width,
   scaling proportionally to the viewport.
   ============================================================ */

@import url("https://fonts.googleapis.com/css2?family=Alexandria:wght@300;400;500;600;700&family=Aref+Ruqaa:wght@400;700&display=swap");

:root {
  --ink: #0e0e0e;
  --paper: #ffffff;
  --grey: #8c8c8c;
  --font: "Alexandria", "Segoe UI", sans-serif;
  --font-ar: "Aref Ruqaa", "Alexandria", serif;
  --nav-pad: clamp(0.9rem, 0.4rem + 1.4vw, 2rem);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { background: #fff; font-family: var(--font); color: var(--ink); }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* ---------- Responsive top nav (overlay on dark hero) ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(0.8rem, 0.4rem + 1vw, 1.4rem) var(--nav-pad);
  pointer-events: none;
}
.nav__group { display: flex; gap: clamp(1rem, 0.5rem + 2vw, 2.6rem); pointer-events: auto; }
.nav a {
  font-size: clamp(0.68rem, 0.55rem + 0.35vw, 0.85rem);
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #fff;
  padding: 0.35rem 0;
  border-bottom: 1px solid transparent;
  transition: border-color 180ms ease, opacity 180ms ease;
}
.nav a:hover { border-bottom-color: #fff; }
.nav a[aria-current="page"] { border-bottom-color: #fff; }
.nav--ink a { color: var(--ink); }
.nav--ink a:hover, .nav--ink a[aria-current="page"] { border-bottom-color: var(--ink); }

/* Hotspot-style nav: invisible clickable rectangles placed over the
   XD-baked nav text so only the design's own typography shows. */
.nav-spots {
  position: absolute;
  inset: 0 0 auto 0;
  width: 100%;
  height: clamp(34px, 4.6vw, 70px);
  z-index: 40;
  pointer-events: none;
}
.nav-spots a {
  position: absolute;
  display: block;
  height: 100%;
  pointer-events: auto;
}
.nav-spots a:hover { background: rgba(255, 255, 255, 0.06); }
.nav-spots--ink a:hover { background: rgba(0, 0, 0, 0.05); }

/* Fixed header for long scrolling project pages — invisible hotspots
   that stay clickable as the user scrolls past the top nav strip. */
.nav-fixed {
  position: fixed;
  inset: 0 0 auto 0;
  height: clamp(40px, 5vw, 80px);
  z-index: 50;
  pointer-events: none;
}
.nav-fixed a {
  position: absolute;
  display: block;
  top: 0;
  height: 100%;
  pointer-events: auto;
  font-size: 0;
}
.nav-fixed a:hover { background: rgba(255, 255, 255, 0.04); }

/* On long pages, show a small floating menu chip after scrolling */
.menu-chip {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 70;
  display: none;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.9rem;
  background: rgba(0, 0, 0, 0.78);
  color: #fff;
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  border-radius: 999px;
  backdrop-filter: blur(8px);
  cursor: pointer;
  pointer-events: auto;
  border: 1px solid rgba(255, 255, 255, 0.15);
}
.menu-chip.is-visible { display: inline-flex; }
.menu-chip:hover { background: rgba(0, 0, 0, 0.9); }
.menu-panel {
  position: fixed;
  top: 3.4rem;
  right: 1rem;
  z-index: 70;
  display: none;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.9rem 1.2rem;
  background: rgba(0, 0, 0, 0.88);
  color: #fff;
  border-radius: 14px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  min-width: 180px;
}
.menu-panel.is-open { display: flex; }
.menu-panel a {
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 0.35rem 0;
  color: #fff;
}
.menu-panel a:hover { color: #ccc; }

.brandmark {
  position: fixed;
  right: var(--nav-pad);
  bottom: clamp(0.8rem, 0.4rem + 1vw, 1.6rem);
  font-family: var(--font-ar);
  font-size: clamp(1.1rem, 0.7rem + 1.4vw, 2rem);
  color: #fff;
  z-index: 60;
  pointer-events: auto;
  letter-spacing: 0.04em;
}
.brandmark--ink { color: var(--ink); }

/* ---------- Artboard stage ---------- */
/* Each .xd-page wraps a single artboard image. The image scales
   to viewport width while preserving aspect ratio.  */
.xd-page {
  width: 100%;
  background: #fff;
  display: block;
}
.xd-page img {
  width: 100%;
  height: auto;
  display: block;
}

/* Hero artboards (1080–1152 tall) center on the viewport */
.xd-hero {
  width: 100%;
  height: 100vh;
  min-height: 600px;
  background: #1a1a1a;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.xd-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* ---------- Splash/Entry page ---------- */
.splash {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #111;
  color: #fff;
  cursor: pointer;
  z-index: 100;
}
.splash__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.45;
  filter: grayscale(1);
}
.splash__inner {
  position: relative;
  text-align: center;
}
.splash__ar {
  font-family: var(--font-ar);
  font-size: clamp(3rem, 1.5rem + 8vw, 9rem);
  letter-spacing: 0.05em;
}
.splash__en {
  font-size: clamp(0.9rem, 0.7rem + 0.6vw, 1.4rem);
  letter-spacing: 0.4em;
  margin-top: 0.5rem;
  opacity: 0.85;
}
.splash__cue {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.72rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  opacity: 0.7;
}
.splash__cue .line { width: 40px; height: 1px; background: #fff; display: inline-block; }

/* ---------- Projects index hotspots ---------- */
/* Transparent clickable rectangles over the projects artboard image. */
.projects-wrap { position: relative; width: 100%; }
.projects-wrap img { width: 100%; height: auto; display: block; }
.hotspot {
  position: absolute;
  display: block;
  border-radius: 4px;
  transition: background 200ms ease, outline 200ms ease;
}
.hotspot:hover {
  background: rgba(255, 255, 255, 0.08);
  outline: 1px solid rgba(255, 255, 255, 0.35);
}

/* ---------- Who Am I (simple bio page) ---------- */
.bio {
  min-height: 100vh;
  padding: 6rem var(--nav-pad) 4rem;
  max-width: 880px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.4rem;
}
.bio h1 {
  font-size: clamp(2rem, 1.2rem + 4vw, 4.5rem);
  font-weight: 300;
  letter-spacing: 0.04em;
}
.bio h1 .ar { font-family: var(--font-ar); display: block; }
.bio p { font-size: clamp(1rem, 0.9rem + 0.3vw, 1.15rem); line-height: 1.85; color: #2a2a2a; }
.bio .lead { font-size: clamp(1.2rem, 1rem + 0.6vw, 1.5rem); color: var(--ink); }

/* ---------- Footer (small) ---------- */
.foot {
  padding: 2.4rem var(--nav-pad);
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #777;
  background: #fff;
  border-top: 1px solid #eee;
}

/* ---------- Mobile ---------- */
@media (max-width: 640px) {
  .nav { padding: 0.7rem 1rem; }
  .nav__group { gap: 0.9rem; }
  .nav a { font-size: 0.62rem; letter-spacing: 0.15em; }
  .brandmark { font-size: 1.1rem; }
}
