/* Hamza Chishti — v5 "Bold Type"
   Light typographic direction: the headline is the design. Distinct from v3
   (dark, photo-led) and v4 (warm, serif) — cool grey canvas, olive accent,
   grotesque display with a mono for labels. */

:root {
  --bg: #eeeeec;
  --panel: #e5e5e2;
  --ink: #111110;
  --body: #454541;
  --muted: #6e6e68;
  --faint: #9a9a92;
  --hairline: rgba(17, 17, 16, 0.13);
  --light: #f7f7f5;

  /* hex fallback first, oklch for browsers that support it */
  --accent: #5e6b39;
  --accent: oklch(0.52 0.09 128);
  --accent-bright: #8ba055;
  --accent-bright: oklch(0.68 0.11 128);

  --maxw: 1280px;
  --pad: 40px;

  --sans: "Inter Tight", ui-sans-serif, system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
::selection { background: var(--accent); color: var(--light); }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font-family: inherit; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-inline: var(--pad);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--ink);
  color: var(--light);
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
}
.skip-link:focus { left: 0; }

/* mono label used throughout for eyebrows, statuses, meta */
.mono {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

/* the inline highlight device — proper nouns set as dark chips mid-sentence */
/* Sized in em so it tracks the type it sits in. A full 100px pill radius
   balloons at display sizes — a tight rounded box reads as emphasis instead. */
.chip {
  display: inline-block;
  background: var(--ink);
  color: var(--light);
  border-radius: 0.2em;
  padding: 0.02em 0.22em 0.1em;
  letter-spacing: -0.025em;
}
/* Body-copy chips are small enough to carry a true pill. */
.about__p .chip { border-radius: 100px; padding: 0.04em 0.42em 0.12em; }
.chip--accent { background: var(--accent); }

/* ---------------------------------------------------------------- NAV */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px var(--pad);
  background: rgba(238, 238, 236, 0);
  transition: background .3s ease, border-color .3s ease;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(238, 238, 236, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom-color: var(--hairline);
}
.nav__mark { display: flex; align-items: center; gap: 11px; }
.nav__glyph {
  width: 34px; height: 34px;
  border-radius: 9px;
  background: var(--ink);
  color: var(--light);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.03em;
}
.nav__name { line-height: 1.15; }
.nav__name b { display: block; font-size: 14px; font-weight: 600; letter-spacing: -0.01em; }
.nav__name span { display: block; font-family: var(--mono); font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }

.nav__links {
  display: flex;
  gap: 30px;
  align-items: center;
  font-size: 14px;
  font-weight: 500;
}
.nav__links a:not(.nav__cta):hover { color: var(--accent); }
.nav__cta {
  background: var(--accent);
  color: var(--light);
  padding: 10px 20px;
  border-radius: 100px;
  font-weight: 600;
  transition: background .2s ease;
}
.nav__cta:hover { background: var(--ink); }

.nav__toggle {
  display: none;
  background: none;
  border: 1px solid var(--hairline);
  color: var(--ink);
  border-radius: 100px;
  padding: 9px 16px;
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  cursor: pointer;
}

/* --------------------------------------------------------------- HERO */

.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 140px;
  padding-bottom: 56px;
}
.hero__statement {
  font-size: clamp(36px, 6.2vw, 96px);
  font-weight: 700;
  line-height: 1.0;
  letter-spacing: -0.038em;
  margin: 0;
  max-width: 20ch;
  text-wrap: balance;
}
.hero__aside {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-top: 64px;
  align-items: end;
}
/* Portrait fills the empty left cell the offset paragraph leaves behind.
   Deliberately modest — v5 is type-first, so the photo balances the
   composition rather than competing with the headline. */
.hero__media {
  grid-column: 1;
  margin: 0;
  width: 100%;
  max-width: 268px;
  aspect-ratio: 4 / 5;
  border-radius: 16px;
  overflow: hidden;
  background: var(--panel);
}
.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 26%;
}

.hero__para {
  grid-column: 2;
  font-size: 17px;
  line-height: 1.6;
  color: var(--body);
  margin: 0;
  max-width: 46ch;
}
.hero__ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 600;
  padding: 14px 26px;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.pill--solid { background: var(--ink); color: var(--light); }
.pill--solid:hover { background: var(--accent); }
.pill--ghost { border: 1px solid var(--hairline); color: var(--ink); }
.pill--ghost:hover { border-color: var(--ink); }

/* ------------------------------------------------------------- STRIP */

.strip {
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  padding: 18px 0;
}
.strip__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  align-items: center;
}
.strip__inner span::before {
  content: "◆";
  color: var(--accent);
  margin-right: 10px;
  font-size: 8px;
  vertical-align: middle;
}

/* ----------------------------------------------------------- SECTION */

.section { padding-block: 120px; }
.section__head {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 40px;
  align-items: start;
  margin-bottom: 64px;
}
.section__title {
  font-size: clamp(30px, 4.4vw, 62px);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.032em;
  margin: 0;
  max-width: 20ch;
  text-wrap: balance;
}
.section__lede {
  font-size: 17px;
  line-height: 1.65;
  color: var(--body);
  margin: 22px 0 0;
  max-width: 54ch;
}

/* -------------------------------------------------------------- WORK */

.work { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.card {
  background: var(--panel);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .25s ease, background .25s ease;
}
.card:hover { transform: translateY(-4px); background: #e0e0dc; }
.card__media { aspect-ratio: 4 / 3; overflow: hidden; background: #d8d8d4; }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__body { padding: 26px 26px 30px; display: flex; flex-direction: column; flex: 1; }
.card__top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 12px;
}
.card__t { font-size: 26px; font-weight: 700; letter-spacing: -0.025em; }
.card__status {
  font-family: var(--mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  white-space: nowrap;
}
.card__d { font-size: 15px; line-height: 1.6; color: var(--body); margin: 0; }
.card__go {
  margin-top: 22px;
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink);
}
.card:hover .card__go { color: var(--accent); }

/* ----------------------------------------------------------- WRITING */

.write { border-top: 1px solid var(--hairline); }
.write__row {
  display: grid;
  grid-template-columns: 60px 1fr auto;
  gap: 28px;
  align-items: center;
  padding: 24px 0;
  border-bottom: 1px solid var(--hairline);
  transition: padding-left .2s ease, background .2s ease;
}
.write__row:hover { padding-left: 12px; background: rgba(17, 17, 16, 0.02); }
.write__no { font-family: var(--mono); font-size: 11.5px; color: var(--faint); }
.write__t {
  font-size: clamp(18px, 2.1vw, 26px);
  font-weight: 600;
  letter-spacing: -0.022em;
  line-height: 1.2;
}
.write__meta { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); white-space: nowrap; }

/* ------------------------------------------------------------- ABOUT */

.about { background: var(--ink); color: var(--light); }
.about__grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 72px;
  align-items: center;
}
.about__media { aspect-ratio: 3 / 4; border-radius: 14px; overflow: hidden; background: #2a2a26; }
.about__media img { width: 100%; height: 100%; object-fit: cover; }
.about .mono { color: var(--accent-bright); }
.about__h {
  font-size: clamp(28px, 3.8vw, 52px);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.032em;
  margin: 20px 0 26px;
  text-wrap: balance;
}
.about__p { font-size: 17px; line-height: 1.72; color: rgba(247, 247, 245, 0.74); margin: 0 0 18px; }
.about__p:last-of-type { margin-bottom: 0; }
.about__p strong { color: var(--light); font-weight: 600; }
.about .chip { background: var(--light); color: var(--ink); }

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 48px;
  border-top: 1px solid rgba(247, 247, 245, 0.18);
  padding-top: 32px;
}
.stats__n { font-size: 40px; font-weight: 700; letter-spacing: -0.035em; line-height: 1; }
.stats__l { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.06em; color: rgba(247, 247, 245, 0.5); margin-top: 10px; }

/* ----------------------------------------------------------- CONNECT */

.connect__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}
.connect__h {
  font-size: clamp(38px, 6.4vw, 96px);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.038em;
  margin: 0 0 28px;
  text-wrap: balance;
}
.news { display: flex; gap: 10px; flex-wrap: wrap; max-width: 460px; margin-top: 24px; }
.news input {
  flex: 1;
  min-width: 200px;
  background: var(--light);
  border: 1px solid var(--hairline);
  border-radius: 100px;
  padding: 14px 22px;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  outline: none;
}
.news input:focus { border-color: var(--accent); }
.news button {
  background: var(--accent);
  color: var(--light);
  border: none;
  border-radius: 100px;
  padding: 14px 26px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: background .2s ease;
}
.news button:hover { background: var(--ink); }
.news__done { margin-top: 24px; font-size: 22px; font-weight: 600; letter-spacing: -0.025em; }
.news__note { font-family: var(--mono); font-size: 11px; color: var(--muted); margin-top: 14px; }

.contact__row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 0;
  border-bottom: 1px solid var(--hairline);
  font-size: 15px;
  transition: color .2s ease;
}
.contact__row:hover { color: var(--accent); }
.contact__row .mono { color: var(--faint); }

.foot {
  border-top: 1px solid var(--hairline);
  margin-top: 100px;
  padding: 28px 0 44px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

/* -------------------------------------------------------- RESPONSIVE */

@media (max-width: 1000px) {
  .section__head { grid-template-columns: 1fr; gap: 18px; margin-bottom: 44px; }
  .work { grid-template-columns: 1fr; }
  .about__grid { grid-template-columns: 1fr; gap: 40px; }
  .about__media { max-width: 420px; }
  .connect__grid { grid-template-columns: 1fr; gap: 44px; }
  .hero__aside { grid-template-columns: 1fr; gap: 28px; }
  .hero__para { grid-column: 1; }
  .hero__media { grid-column: 1; max-width: 220px; }
}

@media (max-width: 820px) {
  :root { --pad: 22px; }

  .nav__links {
    position: fixed;
    inset: 0 0 auto;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bg);
    padding: 84px 22px 28px;
    transform: translateY(-100%);
    transition: transform .35s ease;
    box-shadow: 0 18px 44px rgba(17, 17, 16, 0.16);
  }
  .nav__links a { padding: 17px 0; border-bottom: 1px solid var(--hairline); }
  .nav.open .nav__links { transform: translateY(0); }
  .nav__cta { border-bottom: none !important; margin-top: 18px; align-self: flex-start; }
  .nav__toggle { display: block; position: relative; z-index: 2; }

  .hero { padding-top: 120px; min-height: auto; padding-bottom: 72px; }
  .hero__aside { margin-top: 44px; }
  .section { padding-block: 76px; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 30px 20px; }
  .write__row { grid-template-columns: 32px 1fr; gap: 6px 14px; }
  .write__meta { grid-column: 2; }
  .foot { margin-top: 64px; }
}

/* ----------------------------------------------------------- MOTION

   Everything below is gated behind .js-motion, which v5.js adds to <html>
   only when JS runs AND the visitor has not asked for reduced motion. Without
   that class the page renders fully visible and static — so no-JS visitors and
   reduced-motion visitors never get stuck looking at invisible text. */

/* hero headline — word-by-word rise, staggered by inline transition-delay */
.js-motion .w {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.42em);
  transition: opacity .95s ease, transform 1.15s cubic-bezier(.22, .68, .3, 1);
  will-change: opacity, transform;
}
.js-motion .w.in { opacity: 1; transform: none; }

/* the chip rides in with a touch of scale so it lands as a unit */
.js-motion .w--chip { transform: translateY(0.42em) scale(0.97); }
.js-motion .w--chip.in { transform: none; }

/* Exit half of the loop: quicker than the entrance and drifting upward, so the
   headline reads as moving on rather than rewinding. */
.js-motion .w.leaving {
  opacity: 0;
  transform: translateY(-0.3em);
  transition: opacity .5s ease, transform .6s cubic-bezier(.4, 0, .7, .4);
}
.js-motion .w--chip.leaving { transform: translateY(-0.3em) scale(0.98); }

/* everything below the fold — reveal on scroll */
.js-motion .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 1.05s ease, transform 1.25s cubic-bezier(.22, .68, .3, 1);
}
.js-motion .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
