/* ---------- Fonts (self-hosted, no Google calls) ---------- */
@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-latin-wdth-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-latin-wdth-italic.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Amiri";
  src: url("../fonts/amiri-arabic-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --asphalt: #1e2328;   /* main ink, dark sections */
  --paper: #ffffff;
  --stone: #eef0ee;     /* alternate section background */
  --muted: #59616a;     /* secondary text */
  --ochre: #8f6216;     /* accent on light: dry grass, darkened for contrast */
  --grass: #dcaa4a;     /* accent on dark */
  --steel: #3f5466;     /* Duster blue-grey */

  --sans: "Archivo", "Helvetica Neue", Arial, system-ui, sans-serif;
  --arabic: "Amiri", "Noto Naskh Arabic", "Traditional Arabic", serif;

  --wrap: 1160px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section: clamp(4rem, 9vw, 7rem);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--asphalt);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--ochre); text-underline-offset: 0.18em; }
a:hover { color: var(--asphalt); }
:focus-visible { outline: 3px solid var(--grass); outline-offset: 3px; }

h1, h2, h3 { margin: 0; line-height: 1.1; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }

.section { padding-block: var(--section); }
.section--stone { background: var(--stone); }

.section-title {
  font-stretch: 125%;
  font-weight: 800;
  font-size: clamp(2rem, 5vw, 3.25rem);
  letter-spacing: -0.01em;
  margin-bottom: 0.4em;
}
p.section-intro { color: var(--muted); max-width: 52ch; margin-bottom: 2.5rem; }

.btn {
  display: inline-block;
  padding: 0.8em 1.4em;
  font: 600 0.95rem/1 var(--sans);
  font-stretch: 110%;
  text-decoration: none;
  color: var(--paper);
  background: var(--asphalt);
  border: 2px solid var(--asphalt);
  border-radius: 2px;
}
.btn:hover { background: var(--ochre); border-color: var(--ochre); color: var(--paper); }
.btn--ghost { background: transparent; color: var(--asphalt); }
.btn--ghost:hover { background: var(--asphalt); border-color: var(--asphalt); color: var(--paper); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  color: var(--paper);
  background: var(--asphalt) url("../images/hero-duster.jpg") center 60% / cover no-repeat;
}
.hero::before {
  /* darken only where text sits, keep the landscape bright */
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(20, 24, 28, 0.55) 0%, rgba(20, 24, 28, 0) 22%),
    linear-gradient(to top, rgba(20, 24, 28, 0.88) 0%, rgba(20, 24, 28, 0.35) 38%, rgba(20, 24, 28, 0) 60%);
}
.hero > * { position: relative; }

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.25rem;
}
.nav__home {
  font-weight: 800;
  font-stretch: 125%;
  color: var(--paper);
  text-decoration: none;
  font-size: 1.05rem;
}
.nav ul { display: flex; gap: clamp(0.9rem, 3vw, 2rem); margin: 0; padding: 0; list-style: none; }
.nav ul a { color: var(--paper); text-decoration: none; font-size: 0.95rem; font-weight: 500; }
.nav ul a:hover { color: var(--grass); }

.hero__body {
  margin-top: auto;
  padding-bottom: clamp(2.5rem, 7vh, 5rem);
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 2rem;
}
.hero__name {
  font-stretch: 125%;
  font-weight: 800;
  font-size: clamp(3rem, 10.5vw, 8.5rem);
  letter-spacing: -0.025em;
  line-height: 0.92;
  margin-bottom: 0.3em;
}
.hero__role {
  font-size: clamp(1.1rem, 2.2vw, 1.45rem);
  font-weight: 500;
  max-width: 34ch;
  margin-bottom: 1.1rem;
}
.hero__quote {
  font-style: italic;
  color: rgba(255, 255, 255, 0.78);
  font-size: 1rem;
}
.hero__quote cite { font-style: normal; color: var(--grass); }
.hero__dua {
  font-family: var(--arabic);
  font-size: clamp(1.35rem, 2.4vw, 1.8rem);
  line-height: 1.4;
  text-align: right;
  color: rgba(255, 255, 255, 0.9);
}
.hero__dua span { display: block; font-family: var(--sans); font-size: 0.8rem; color: rgba(255, 255, 255, 0.65); }

/* ---------- Identity strip ---------- */
.be {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1rem, 2.5vw, 2rem);
  margin: 0;
  padding: 0;
  list-style: none;
}
.be img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--stone); }
.be li:first-child img { object-fit: contain; background: #fff; border: 1px solid #dfe2df; }
.be h3 { font-size: 1.25rem; font-weight: 700; font-stretch: 110%; margin-top: 0.85rem; }

/* ---------- Work intro ---------- */
.work {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.work p { max-width: 58ch; }
.pull {
  font-size: clamp(1.2rem, 2vw, 1.45rem);
  font-weight: 600;
  font-stretch: 105%;
  line-height: 1.35;
  border-left: 4px solid var(--grass);
  padding-left: 1rem;
  margin-block: 1.75rem 2rem;
}
.work__img img { width: 100%; }

/* ---------- Projects ---------- */
.projects-head { margin-top: var(--section); }
.project {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.75rem, 5vw, 4rem);
  align-items: center;
  padding-block: clamp(2.5rem, 5vw, 3.5rem);
  border-top: 1px solid #d4d8d4;
}
.project:nth-of-type(even) .project__media { order: 2; }
.project h3 {
  font-size: clamp(1.4rem, 2.6vw, 1.85rem);
  font-weight: 750;
  font-stretch: 108%;
  margin-bottom: 0.8rem;
}
.project p { color: #353c43; max-width: 60ch; }
.project .btn { margin-top: 0.75rem; }
.project__media img { width: 100%; max-height: 560px; object-fit: cover; object-position: center 30%; }
.project__media figcaption, .video + p { font-size: 0.9rem; color: var(--muted); margin-top: 0.6rem; }
.project__media figure { margin: 0; }
.tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1rem 0 0; padding: 0; list-style: none; }
.tags li {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--steel);
  background: #e2e7eb;
  padding: 0.3em 0.7em;
  border-radius: 2px;
}

/* click-to-play video, nothing autoplays */
.video {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  padding: 0;
  border: 0;
  cursor: pointer;
  background: var(--asphalt) center / cover no-repeat;
  color: var(--paper);
  overflow: hidden;
}
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video__play {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.65em 1.1em 0.65em 0.9em;
  font: 600 0.95rem/1 var(--sans);
  background: rgba(20, 24, 28, 0.82);
  border-radius: 2px;
}
.video__play::before {
  content: "";
  border-style: solid;
  border-width: 0.45em 0 0.45em 0.75em;
  border-color: transparent transparent transparent var(--grass);
}
.video:hover .video__play { background: var(--ochre); }
.video:hover .video__play::before { border-left-color: var(--paper); }

/* ---------- Life grid ---------- */
.life {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(2rem, 3vw, 2.5rem) clamp(1rem, 2.5vw, 1.75rem);
  margin: 0;
  padding: 0;
  list-style: none;
}
.life img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: #dfe2df; }
.life .top img { object-position: top; }
.life h3 { font-size: 1.15rem; font-weight: 700; font-stretch: 110%; margin: 0.9rem 0 0.35rem; }
.life p { font-size: 0.98rem; color: #3b4248; }
.life blockquote { margin: 0; font-size: 0.98rem; font-style: italic; color: #3b4248; }
.life blockquote cite { display: block; margin-top: 0.4rem; font-style: normal; font-size: 0.88rem; color: var(--muted); }

/* ---------- Footer ---------- */
.footer { background: var(--asphalt); color: #d8dcdf; padding-block: var(--section) 2.5rem; }
.footer .section-title { color: var(--paper); }
.footer p { max-width: 46ch; }
.links { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 2rem 0 0; padding: 0; list-style: none; }
.links a {
  display: inline-block;
  padding: 0.75em 1.25em;
  font-weight: 600;
  color: var(--paper);
  text-decoration: none;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 2px;
}
.links a:hover { border-color: var(--grass); color: var(--grass); }
.links .cv a { background: var(--grass); border-color: var(--grass); color: var(--asphalt); }
.links .cv a:hover { background: var(--paper); border-color: var(--paper); color: var(--asphalt); }
.footer .footer__small {
  max-width: none;
  margin-top: clamp(3rem, 8vw, 5rem);
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 0.88rem;
  color: #9aa2a9;
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .life { grid-template-columns: repeat(2, 1fr); }
  .work, .project { grid-template-columns: 1fr; }
  .project:nth-of-type(even) .project__media { order: 0; }
}
@media (max-width: 640px) {
  .hero__body { grid-template-columns: 1fr; }
  .hero__dua { text-align: left; }
  .nav ul { gap: 0.9rem; }
  .nav ul li.hide-sm { display: none; }
  .be { grid-template-columns: 1fr 1fr 1fr; gap: 0.75rem; }
  .be h3 { font-size: 0.95rem; }
  .life { grid-template-columns: 1fr; }
  /* One column on phones: show each photo whole, at its own shape, instead of cropping it */
  .life img { aspect-ratio: auto; height: auto; object-fit: contain; }
}