/* muhammadtayyabshabbir.com
   Production stylesheet. Plain CSS, no build step, no JS.
   Tokens live on :root. Dark mode follows prefers-color-scheme and can be
   forced with <html data-theme="dark"> or <html data-theme="light">.
   Fonts: Fraunces (display) and Source Sans 3 (text), Google Fonts only. */

:root {
  --paper: #f5f1ea;
  --paper-deep: #ece6db;
  --ink: #1c1a17;
  --ink-soft: #4a463f;
  --ink-mute: #666056;
  --rule: #d8d1c4;
  --rule-strong: #1c1a17;
  --accent: #8a3b2e;
  --accent-ink: #ffffff;
  --photo-shadow: rgba(28, 26, 23, 0.18);
  --serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Source Sans 3", "Source Sans Pro", "Segoe UI", Helvetica, Arial, sans-serif;
  --measure: 62ch;
  --gutter: 16px;
  --max: 1180px;
  --tap: 44px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #1b1a18;
    --paper-deep: #232120;
    --ink: #efe9df;
    --ink-soft: #c9c1b4;
    --ink-mute: #a39b8d;
    --rule: #3a3733;
    --rule-strong: #efe9df;
    --accent: #d9926f;
    --accent-ink: #1b1a18;
    --photo-shadow: rgba(0, 0, 0, 0.5);
  }
}
:root[data-theme="dark"] {
  --paper: #1b1a18;
  --paper-deep: #232120;
  --ink: #efe9df;
  --ink-soft: #c9c1b4;
  --ink-mute: #a39b8d;
  --rule: #3a3733;
  --rule-strong: #efe9df;
  --accent: #d9926f;
  --accent-ink: #1b1a18;
  --photo-shadow: rgba(0, 0, 0, 0.5);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-feature-settings: "kern", "liga";
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--accent); }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 400; line-height: 1.1; margin: 0; letter-spacing: -0.01em; overflow-wrap: anywhere; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.25rem; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 2rem 0; }
.wrap { max-width: var(--max); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.wrap > *, [class$="-grid"] > *, .split > *, .aside-grid > * { min-width: 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Shared type pieces ---------- */
.kicker {
  font-family: var(--sans);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.9rem;
}
.tag, .label {
  font-size: 0.8125rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin: 0 0 0.5rem;
}
.lede { color: var(--ink-soft); max-width: var(--measure); margin: 0; font-size: 1.125rem; }
.more {
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 1px;
  display: inline-block;
  min-height: 24px;
}
.more::after { content: "\00a0\2192"; }
.more:hover { border-color: var(--accent); }
.section { padding: 3.5rem 0; border-top: 1px solid var(--rule); }
.section.deep { background: var(--paper-deep); }
.section-head { display: grid; gap: 0.6rem; margin-bottom: 2rem; }
.section-head > div { display: grid; gap: 0.6rem; }
.section-head h2 { font-size: clamp(1.75rem, 2.4vw + 0.8rem, 2.5rem); }
h2.section-title { font-size: clamp(1.75rem, 2.4vw + 0.8rem, 2.5rem); margin-bottom: 1.25rem; }
h3.sub { font-size: 1.375rem; margin: 2rem 0 0.75rem; }

/* ---------- Header and nav ---------- */
.masthead { border-bottom: 1px solid var(--rule-strong); }
.masthead-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.25rem 2rem;
  padding: 1rem 0 0.6rem;
}
.wordmark {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: -0.005em;
  text-decoration: none;
  white-space: nowrap;
  display: inline-block;
  min-height: 24px;
}
.wordmark:hover { color: var(--ink); }
.nav {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, auto));
  justify-content: start;
  column-gap: 1rem;
  width: 100%;
}
.nav a {
  display: inline-block;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--ink-soft);
  padding: 0.35rem 0;
  min-height: 28px;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
}
.nav a:hover { color: var(--accent); }
.nav a[aria-current="page"],
body[data-page=""] .nav a[href="/"],
body[data-page="story"] .nav a[href="/story"],
body[data-page="speaking"] .nav a[href="/speaking"],
body[data-page="track-record"] .nav a[href="/track-record"],
body[data-page="work-with-me"] .nav a[href="/work-with-me"],
body[data-page="press"] .nav a[href="/press"],
body[data-page="book"] .nav a[href="/book"],
body[data-page="contact"] .nav a[href="/contact"] {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

/* ---------- Hero (homepage) and page hero (inner pages) ---------- */
.hero { padding: 2.75rem 0 3.25rem; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2.25rem; align-items: start; }
.hero h1 {
  font-size: clamp(2.75rem, 7vw + 0.5rem, 5.25rem);
  font-weight: 300;
  line-height: 0.98;
  letter-spacing: -0.025em;
  margin-bottom: 1.4rem;
  max-width: 11ch;
}
.hero h1 em { font-style: italic; font-weight: 400; }
.standfirst {
  font-family: var(--serif);
  font-size: clamp(1.25rem, 1.2vw + 0.9rem, 1.625rem);
  line-height: 1.35;
  color: var(--ink);
  max-width: 30ch;
  margin: 0 0 1.25rem;
}
.hero-sub { color: var(--ink-soft); max-width: 48ch; font-size: 1.125rem; margin-bottom: 2rem; }
.routes { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--rule-strong); max-width: 30rem; }
.routes li { border-bottom: 1px solid var(--rule); }
.routes a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 1rem;
  align-items: center;
  padding: 0.85rem 0;
  text-decoration: none;
}
.routes a strong { font-family: var(--serif); font-weight: 400; font-size: 1.25rem; line-height: 1.2; }
.routes a span { font-family: var(--sans); font-size: 0.875rem; color: var(--ink-mute); letter-spacing: 0.02em; grid-column: 1; }
.routes a::after { content: "\2192"; font-family: var(--sans); color: var(--accent); grid-column: 2; grid-row: 1 / span 2; }
.routes a:hover { color: var(--accent); }
.portrait { position: relative; margin: 0; }
.portrait img { width: 100%; box-shadow: 0 24px 60px -24px var(--photo-shadow); }
.portrait figcaption { margin-top: 0.75rem; font-size: 0.875rem; color: var(--ink-mute); line-height: 1.45; }

.page-hero { padding: 2.75rem 0 2.5rem; }
.page-hero h1 {
  font-size: clamp(2.25rem, 4.5vw + 0.75rem, 4rem);
  font-weight: 300;
  line-height: 1.02;
  letter-spacing: -0.02em;
  max-width: 16ch;
  margin-bottom: 1rem;
}
.page-hero .lede { font-size: 1.25rem; }

/* ---------- Prose and marginal notes ---------- */
.prose { max-width: var(--measure); font-size: 1.125rem; }
.prose p, .prose ul, .prose ol { margin-bottom: 1.1em; }
.prose h2 { font-size: clamp(1.5rem, 1.6vw + 0.9rem, 2rem); margin: 2.25rem 0 0.9rem; }
.prose h3 { font-size: 1.375rem; margin: 1.75rem 0 0.6rem; }
.prose strong { font-weight: 600; }
.prose a { text-decoration-color: var(--accent); }
.aside-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem 3rem; align-items: start; }
.note {
  border-top: 1px solid var(--rule-strong);
  padding-top: 0.75rem;
  font-size: 0.9375rem;
  color: var(--ink-soft);
  max-width: 34ch;
}
.note .label { display: block; margin-bottom: 0.5rem; }
.note p { margin-bottom: 0.6em; }
.note p:last-child { margin-bottom: 0; }
.pullquote {
  border-top: 2px solid var(--rule-strong);
  border-bottom: 1px solid var(--rule);
  padding: 1.25rem 0;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.375rem, 1.4vw + 0.9rem, 1.75rem);
  line-height: 1.3;
  font-weight: 300;
}
.pullquote .label { display: block; margin-bottom: 0.75rem; font-family: var(--sans); }
.pullquote p { margin: 0; }

/* ---------- Facts strip ---------- */
.facts { background: var(--paper-deep); }
.facts-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; border-top: 1px solid var(--rule-strong); }
.fact { padding: 1.3rem 0; border-bottom: 1px solid var(--rule); }
.fact strong {
  display: block;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.75rem, 2.2vw + 1rem, 2.5rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 0.35rem;
}
.fact span { color: var(--ink-soft); font-size: 0.9375rem; display: block; max-width: 30ch; }

/* ---------- Key/value list (press rows, fact sheet) ---------- */
.kv { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule-strong); }
.kv li { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.2rem 1.5rem; padding: 1rem 0; border-bottom: 1px solid var(--rule); }
.kv .k { font-size: 0.8125rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-mute); padding-top: 0.2rem; }
.kv .v { color: var(--ink); max-width: var(--measure); }
.kv .v p { margin: 0 0 0.4em; }
.kv .v p:last-child { margin-bottom: 0; }
.kv .v .src { font-size: 0.875rem; color: var(--ink-mute); }
.kv-thumb { display: flex; gap: 1rem; align-items: center; }
.kv-thumb img { width: 72px; height: auto; flex: 0 0 auto; }

/* ---------- Topic list (speaking) ---------- */
.topics { list-style: none; margin: 0; padding: 0; counter-reset: topic; border-top: 1px solid var(--rule-strong); }
.topics li {
  counter-increment: topic;
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr);
  gap: 0.75rem 1rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--rule);
}
.topics li::before {
  content: "0" counter(topic);
  font-family: var(--serif);
  font-size: 1.125rem;
  color: var(--accent);
  padding-top: 0.2rem;
}
.topics h3 { font-size: 1.375rem; margin-bottom: 0.35rem; }
.topics p { color: var(--ink-soft); margin: 0; max-width: var(--measure); }
.topics p + p { margin-top: 0.5rem; }

/* ---------- Card grid ---------- */
.card-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
.card { border-top: 2px solid var(--rule-strong); padding: 1.25rem 0 0; }
.card h3 { font-size: 1.5rem; margin-bottom: 0.5rem; }
.card p { color: var(--ink-soft); }
.card .more { font-size: 0.9375rem; }

/* ---------- Timeline (track record) ---------- */
.timeline { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule-strong); }
.timeline li { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.25rem 2rem; padding: 1.25rem 0; border-bottom: 1px solid var(--rule); }
.timeline time, .timeline .when {
  font-family: var(--serif);
  font-size: 1.125rem;
  color: var(--accent);
  white-space: nowrap;
  padding-top: 0.15rem;
}
.timeline h3 { font-size: 1.25rem; margin-bottom: 0.3rem; }
.timeline p { color: var(--ink-soft); margin: 0; max-width: var(--measure); }
.timeline p + p { margin-top: 0.4rem; }
.timeline .src { font-size: 0.875rem; color: var(--ink-mute); }

/* ---------- Bio blocks (press page), copy friendly ---------- */
.bio { border-top: 2px solid var(--rule-strong); padding: 1.25rem 0 1.75rem; }
.bio-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.25rem 1.5rem; margin-bottom: 0.75rem; }
.bio-head h3 { font-size: 1.375rem; }
.bio-head .meta { font-size: 0.875rem; color: var(--ink-mute); }
.bio-text {
  max-width: var(--measure);
  font-size: 1.0625rem;
  line-height: 1.65;
  background: var(--paper-deep);
  padding: 1rem 1.1rem;
  border-left: 2px solid var(--accent);
  user-select: all;
  -webkit-user-select: all;
}
.bio-text p { margin: 0 0 0.9em; }
.bio-text p:last-child { margin-bottom: 0; }
.bio-hint { font-size: 0.875rem; color: var(--ink-mute); margin: 0.6rem 0 0; }

/* ---------- Downloads list ---------- */
.downloads { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule-strong); }
.downloads li { border-bottom: 1px solid var(--rule); }
.downloads a {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.2rem 1rem;
  align-items: center;
  padding: 0.75rem 0;
  text-decoration: none;
  min-height: var(--tap);
}
.downloads img { width: 56px; height: auto; grid-row: 1 / span 2; }
.downloads strong { font-family: var(--serif); font-weight: 400; font-size: 1.125rem; grid-column: 2; }
.downloads span { font-size: 0.875rem; color: var(--ink-mute); grid-column: 2; }
.downloads a::after { content: "\2193"; color: var(--accent); grid-column: 3; grid-row: 1 / span 2; }
.downloads a:hover strong { color: var(--accent); }

/* ---------- Contact block ---------- */
.contact { border-top: 1px solid var(--rule-strong); display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; }
.contact > div { padding: 1.25rem 0; border-bottom: 1px solid var(--rule); }
.contact h2, .contact h3 { font-size: 1.25rem; margin-bottom: 0.4rem; }
.contact p { color: var(--ink-soft); margin: 0 0 0.6em; }
.contact p:last-child { margin-bottom: 0; }
.contact a { display: inline-block; min-height: 24px; }

/* ---------- Buttons and actions ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);
  padding: 0.65rem 1.4rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border: 1px solid var(--ink);
}
.btn:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.secondary { background: transparent; color: var(--ink); border-color: var(--rule-strong); }
.btn.secondary:hover { color: var(--accent); border-color: var(--accent); background: transparent; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; margin-top: 2rem; }
.actions .more { min-height: var(--tap); display: inline-flex; align-items: center; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--rule-strong); padding: 2.5rem 0 3rem; font-size: 0.9375rem; color: var(--ink-soft); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.75rem; }
.footer .wordmark { color: var(--ink); display: inline-block; margin-bottom: 0.4rem; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.1rem; }
.footer ul a { display: inline-block; padding: 0.2rem 0; min-height: 24px; }
.footer .label { font-family: var(--sans); font-size: 0.8125rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-mute); margin: 0 0 0.6rem; font-weight: 600; }
.footer .legal {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  font-size: 0.875rem;
  color: var(--ink-mute);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
}

/* ---------- Breakpoints ---------- */
@media (min-width: 540px) {
  .kv li { grid-template-columns: 9rem minmax(0, 1fr); }
  .timeline li { grid-template-columns: 8.5rem minmax(0, 1fr); }
  .contact { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 2.5rem; }
}
@media (min-width: 720px) {
  :root { --gutter: 32px; }
  .section { padding: 4.5rem 0; }
  .hero { padding: 4rem 0 4.5rem; }
  .page-hero { padding: 3.5rem 0 3rem; }
  .masthead-row { gap: 0.6rem 2rem; padding: 1.1rem 0 0.9rem; }
  .nav { display: flex; flex-wrap: wrap; width: auto; gap: 0.2rem 1.25rem; }
  .nav a { font-size: 0.9375rem; }
  .hero-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 3rem; align-items: center; }
  .facts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 2.5rem; }
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.5rem; }
  .footer-grid { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 2.5rem; }
  .aside-grid { grid-template-columns: 14rem minmax(0, 1fr); gap: 2rem 3rem; }
  .aside-grid .note { order: -1; }
  .section-head { grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 2rem; }
  .section-head .more { justify-self: end; margin-bottom: 0.35rem; white-space: nowrap; }
}
@media (min-width: 1080px) {
  :root { --gutter: 48px; }
  .hero-grid { grid-template-columns: minmax(0, 8fr) minmax(0, 5fr); gap: 5rem; }
  .facts-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .fact { border-bottom: 0; border-right: 1px solid var(--rule); padding-right: 2rem; }
  .fact:last-child { border-right: 0; }
  .aside-grid { grid-template-columns: 15rem minmax(0, 1fr); gap: 2rem 4rem; }
}
@media (prefers-reduced-motion: no-preference) {
  a, .btn { transition: color 120ms ease, border-color 120ms ease, background-color 120ms ease; }
}
@media print {
  .masthead, .footer, .actions, .btn { display: none; }
  body { background: #fff; color: #000; }
}
