/* ==========================================================================
   fazalbhai.com — stylesheet
   Concept: "The record." Evidence-first layout. Mono metadata rails carry
   verifiable facts; serif display carries voice; prose stays out of the way.
   All colour pairs validated to WCAG AA (>=4.5:1) in both themes.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. TOKENS
   -------------------------------------------------------------------------- */
:root {
  /* Surfaces — warm paper, deliberately biased away from cream */
  --paper: #F6F5F1;
  --paper-alt: #EDEBE4;
  --card: #FFFFFF;
  --ground: #0D1317;        /* dark sections inside the light theme */
  --ground-alt: #151D22;

  /* Ink — cool-neutral, biased a touch toward the accent */
  --ink: #12181C;
  --ink-2: #39454B;
  --ink-3: #56646A;
  --ink-4: #616F75;

  /* Accent + signal */
  --accent: #0B6E4F;
  --accent-strong: #08573E;
  --accent-wash: #E4F0EA;
  /* Foreground for text sitting ON the accent. Must be re-picked per theme:
     the dark accent is a light green, so white text on it fails badly. */
  --on-accent: #FFFFFF;
  --signal: #7A5510;        /* reserved: awards / verification only */
  --signal-wash: #F6EEDC;

  /* Lines */
  --rule: #DAD7CE;
  --rule-soft: #E7E4DC;
  --rule-dark: #263238;

  /* On-dark ink (fixed: used inside .band-dark in both themes) */
  --d-ink: #E8EDEF;
  --d-ink-2: #B3C0C5;
  --d-ink-3: #8A999F;
  --d-accent: #46C88C;
  --d-signal: #D6A73C;

  /* Type */
  --display: ui-serif, "Iowan Old Style", "Palatino Linotype", Palatino,
             "Book Antiqua", Georgia, serif;
  --body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
          Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, "Cascadia Mono",
          "Liberation Mono", Menlo, monospace;

  /* Metrics */
  --measure: 1140px;
  --gutter: 28px;
  --r: 3px;
  --r-lg: 6px;

  /* Motion */
  --ease: cubic-bezier(.22,.61,.36,1);
}

/* Dark theme — selected, not inverted. Each step re-picked against #0D1317. */
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0D1317;
    --paper-alt: #121A1F;
    --card: #151D22;
    --ground: #080C0F;
    --ground-alt: #101619;

    --ink: #E8EDEF;
    --ink-2: #B3C0C5;
    --ink-3: #8A999F;
    --ink-4: #75858B;

    --accent: #46C88C;
    --accent-strong: #6BDCA6;
    --accent-wash: #10241C;
    --on-accent: #0D1317;
    --signal: #D6A73C;
    --signal-wash: #251C0C;

    --rule: #26333A;
    --rule-soft: #1D272C;
    --rule-dark: #26333A;
  }
}
:root[data-theme="dark"] {
  --paper: #0D1317;  --paper-alt: #121A1F;  --card: #151D22;
  --ground: #080C0F; --ground-alt: #101619;
  --ink: #E8EDEF;    --ink-2: #B3C0C5;      --ink-3: #8A999F;  --ink-4: #75858B;
  --accent: #46C88C; --accent-strong: #6BDCA6; --accent-wash: #10241C; --on-accent: #0D1317;
  --signal: #D6A73C; --signal-wash: #251C0C;
  --rule: #26333A;   --rule-soft: #1D272C;  --rule-dark: #26333A;
}
:root[data-theme="light"] {
  --paper: #F6F5F1;  --paper-alt: #EDEBE4;  --card: #FFFFFF;
  --ground: #0D1317; --ground-alt: #151D22;
  --ink: #12181C;    --ink-2: #39454B;      --ink-3: #56646A;  --ink-4: #616F75;
  --accent: #0B6E4F; --accent-strong: #08573E; --accent-wash: #E4F0EA; --on-accent: #FFFFFF;
  --signal: #7A5510; --signal-wash: #F6EEDC;
  --rule: #DAD7CE;   --rule-soft: #E7E4DC;  --rule-dark: #263238;
}

/* --------------------------------------------------------------------------
   2. RESET & BASE
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 84px;   /* sticky header offset for anchor jumps */
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
/* height:auto is load-bearing — width/height attributes are set on every <img>
   for CLS, and without this the intrinsic height wins and stretches the image. */
img, svg { max-width: 100%; height: auto; display: block; }
button { font: inherit; cursor: pointer; background: none; border: none; color: inherit; }
::selection { background: var(--accent); color: var(--on-accent); }

/* One focus treatment, everywhere. Never removed. */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}
.band-dark :focus-visible, .contact :focus-visible { outline-color: var(--d-accent); }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 999;
  background: var(--accent); color: var(--on-accent);
  padding: 10px 18px; border-radius: var(--r);
  font-size: 14px; font-weight: 600;
  transition: top .16s var(--ease);
}
.skip-link:focus { top: 12px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* --------------------------------------------------------------------------
   3. LAYOUT PRIMITIVES
   -------------------------------------------------------------------------- */
.wrap { width: min(var(--measure), 100% - var(--gutter) * 2); margin-inline: auto; }
.wrap-prose { width: min(680px, 100% - var(--gutter) * 2); margin-inline: auto; }

/* Vertical rhythm lives on ONE class. Modifiers only add, never fight. */
.band { padding-block: 72px; }
.band-alt { background: var(--paper-alt); }
.band-dark { background: var(--ground); color: var(--d-ink); }
.band-dark .kicker { color: var(--d-accent); }
.band-dark .band-title { color: var(--d-ink); }
.band-dark .band-lede { color: var(--d-ink-2); }

.band-head { margin-bottom: 44px; max-width: 640px; }

.kicker {
  font-family: var(--mono);
  font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 14px;
}
.band-title {
  font-family: var(--display);
  font-size: clamp(30px, 3.6vw, 44px);
  line-height: 1.13; letter-spacing: -.02em; font-weight: 400;
  text-wrap: balance;
}
.band-lede {
  margin-top: 16px; font-size: 18px; line-height: 1.62;
  color: var(--ink-2); max-width: 58ch;
}

/* Shared metadata rail — the site's core structural device. */
.meta {
  font-family: var(--mono);
  font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-3);
}

/* --------------------------------------------------------------------------
   4. BUTTONS
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 14px 26px;
  font-size: 15px; font-weight: 600; letter-spacing: -.005em;
  border-radius: var(--r);
  border: 1px solid transparent;
  transition: background .16s var(--ease), border-color .16s var(--ease),
              color .16s var(--ease), transform .16s var(--ease);
}
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-strong); }
.btn-ghost { border-color: var(--rule); color: var(--ink); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.band-dark .btn-ghost, .contact .btn-ghost { border-color: var(--rule-dark); color: var(--d-ink); }
.band-dark .btn-ghost:hover, .contact .btn-ghost:hover { border-color: var(--d-accent); color: var(--d-accent); }
@media (prefers-reduced-motion: no-preference) {
  .btn-primary:hover { transform: translateY(-1px); }
}

/* --------------------------------------------------------------------------
   5. HEADER
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.6) blur(10px);
  -webkit-backdrop-filter: saturate(1.6) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s var(--ease);
}
.site-header[data-scrolled] { border-bottom-color: var(--rule-soft); }
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; height: 68px;
}
.brand {
  display: inline-flex; align-items: center; gap: 11px;
  font-family: var(--display); font-size: 20px; letter-spacing: -.015em;
}
.brand-mark {
  width: 30px; height: 30px; flex: none;
  display: grid; place-items: center;
  background: var(--accent); color: var(--on-accent);
  font-family: var(--display); font-size: 17px; line-height: 1;
  border-radius: var(--r);
}
.nav { display: flex; align-items: center; gap: 30px; }
.nav a { font-size: 15px; color: var(--ink-3); transition: color .15s var(--ease); }
.nav a:hover { color: var(--ink); }
/* `.nav a` (0,1,1) outranks `.btn-primary` (0,1,0) — restate the colour at
   equal-or-higher specificity so the CTA never loses its white text. */
.nav .btn { padding: 9px 18px; font-size: 14px; }
.nav a.btn-primary, .nav a.btn-primary:hover { color: var(--on-accent); }

.nav-toggle {
  display: none;
  font-family: var(--mono); font-size: 12px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink);
  border: 1px solid var(--rule); border-radius: var(--r);
  padding: 9px 14px;
}

/* --------------------------------------------------------------------------
   6. HERO
   -------------------------------------------------------------------------- */
.hero { padding: 76px 0 64px; display: grid; grid-template-columns: 1.15fr .85fr; gap: 68px; align-items: center; }
/* Two sentences: the problem, then the claim. Sized down from a one-liner so
   the pair still reads as a single held breath rather than a paragraph. */
.hero h1 {
  font-family: var(--display);
  font-size: clamp(33px, 4.1vw, 50px);
  line-height: 1.1; letter-spacing: -.028em; font-weight: 400;
  margin: 18px 0 24px; text-wrap: balance;
}
.hero h1 em { font-style: normal; color: var(--accent); }
.hero-lede { font-size: 19px; line-height: 1.62; color: var(--ink-2); max-width: 52ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }

.hero-figure { position: relative; justify-self: center; }
.hero-portrait {
  width: 330px; aspect-ratio: 672 / 900;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--paper-alt);
}
.hero-portrait img { width: 100%; height: 100%; object-fit: cover; object-position: center 12%; }
.hero-stamp {
  position: absolute; left: 50%; bottom: -16px; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--card); color: var(--ink);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--signal);
  padding: 9px 16px; border-radius: var(--r);
  font-family: var(--mono); font-size: 11px; letter-spacing: .08em;
  text-transform: uppercase; white-space: nowrap;
  box-shadow: 0 6px 22px rgba(0,0,0,.09);
}

/* Proof figures — the numbers get real prominence. */
/* Grid, not flex — four figures wrap to a clean 2×2 instead of orphaning one. */
.proof {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px 20px;
  margin-top: 44px; padding-top: 28px;
  border-top: 1px solid var(--rule);
}
.proof-item b {
  display: block;
  font-family: var(--display); font-size: 34px; font-weight: 400;
  letter-spacing: -.03em; line-height: 1; color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.proof-item span {
  display: block; margin-top: 8px;
  font-family: var(--mono); font-size: 11px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-3);
}

/* --------------------------------------------------------------------------
   7. BRAND WALL — recognisable names, set as a record not a logo soup
   -------------------------------------------------------------------------- */
.brandwall { background: var(--paper-alt); border-block: 1px solid var(--rule-soft); padding-block: 26px; }
.brandwall-inner { display: flex; align-items: center; gap: 14px 34px; flex-wrap: wrap; justify-content: center; }
.brandwall-label {
  font-family: var(--mono); font-size: 11px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--ink-3);
}
.brandwall ul { display: flex; flex-wrap: wrap; gap: 12px 30px; list-style: none; justify-content: center; }
.brandwall li {
  font-size: 15px; font-weight: 600; letter-spacing: -.01em; color: var(--ink-2);
}

/* --------------------------------------------------------------------------
   8. SERVICES
   -------------------------------------------------------------------------- */
/* Each card reads as a spec sheet: what it is, what it promises, what you
   receive, and the hard facts underneath. Typographic contrast (serif promise
   against sans body against mono spec) does the visual work — no icon clichés. */
.services {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1px; background: var(--rule-soft);
  border: 1px solid var(--rule-soft);
  border-radius: var(--r-lg); overflow: hidden;
}
.service {
  background: var(--card); padding: 32px 30px 30px;
  display: flex; flex-direction: column;
  transition: background .2s var(--ease);
}
.service:hover { background: var(--accent-wash); }

.service-top { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.service-glyph {
  flex: none; width: 30px; height: 30px;
  fill: none; stroke: var(--accent); stroke-width: 1.4;
  stroke-linecap: round; stroke-linejoin: round;
  opacity: .85;
}
.service h3 {
  font-size: 13px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-3);
}
.service-promise {
  font-family: var(--display); font-size: 22px; line-height: 1.25;
  letter-spacing: -.02em; color: var(--ink);
  margin-bottom: 14px; text-wrap: balance;
}
.service-desc { font-size: 15px; line-height: 1.62; color: var(--ink-2); }

.service-label {
  font-family: var(--mono); font-size: 10.5px;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: 10px;
}
/* margin-bottom is load-bearing: .service-spec uses margin-top:auto, which
   collapses to zero in whichever card has the tallest content — without this
   the spec rule is drawn straight through the last list item. */
.service-gets { margin-top: 24px; margin-bottom: 26px; }
.service-gets ul { list-style: none; display: grid; gap: 8px; }
.service-gets li {
  position: relative; padding-left: 20px;
  font-size: 14.5px; line-height: 1.5; color: var(--ink-2);
}
/* Hairline tick rather than a bullet or an emoji */
.service-gets li::before {
  content: ""; position: absolute; left: 1px; top: .48em;
  width: 9px; height: 5px;
  border-left: 1.5px solid var(--accent);
  border-bottom: 1.5px solid var(--accent);
  transform: rotate(-45deg);
}

/* The hard facts, last — this is the part a buyer scans for. */
.service-spec {
  margin-top: auto; padding-top: 22px;
  border-top: 1px solid var(--rule-soft);
}
.service-spec > div { display: grid; gap: 3px; }
.service-spec > div + div { margin-top: 14px; }
.service-spec dt {
  font-family: var(--mono); font-size: 10px;
  letter-spacing: .12em; text-transform: uppercase;
  /* --ink-4 measures 4.46:1 here in dark mode — just under AA. */
  color: var(--ink-3);
}
.service-spec dd {
  font-family: var(--mono); font-size: 12px; line-height: 1.5;
  letter-spacing: .01em; color: var(--ink-2);
}
.service:hover .service-spec dt { color: var(--accent); }
.service-spec dt { transition: color .2s var(--ease); }

/* --------------------------------------------------------------------------
   9. WORK — case records with a metadata rail
   -------------------------------------------------------------------------- */
.records { display: grid; gap: 1px; background: var(--rule-dark); border: 1px solid var(--rule-dark); border-radius: var(--r-lg); overflow: hidden; }
.record {
  background: var(--ground-alt);
  display: grid; grid-template-columns: 200px 1fr 220px;
  gap: 0; align-items: start;
}
.record-rail { padding: 34px 26px; border-right: 1px solid var(--rule-dark); height: 100%; }
.record-rail dt {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .11em;
  text-transform: uppercase; color: var(--d-ink-3); margin-bottom: 4px;
}
.record-rail dd { font-size: 14px; color: var(--d-ink-2); margin-bottom: 18px; }
.record-rail dd:last-child { margin-bottom: 0; }
.record-body { padding: 34px 32px; }
.record-body h3 {
  font-family: var(--display); font-size: 25px; font-weight: 400;
  letter-spacing: -.02em; line-height: 1.2; color: var(--d-ink); margin-bottom: 12px;
}
.record-body p { font-size: 15.5px; line-height: 1.66; color: var(--d-ink-2); }
.record-stack {
  margin-top: 18px; display: flex; flex-wrap: wrap; gap: 7px;
}
.record-stack span {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .06em;
  color: var(--d-ink-3); border: 1px solid var(--rule-dark);
  padding: 4px 9px; border-radius: var(--r);
}
.record-figs { padding: 34px 30px; border-left: 1px solid var(--rule-dark); height: 100%; }
.record-figs div + div { margin-top: 22px; }
.record-figs b {
  display: block; font-family: var(--display); font-size: 30px; font-weight: 400;
  letter-spacing: -.03em; line-height: 1; color: var(--d-accent);
  font-variant-numeric: tabular-nums;
}
.record-figs span {
  display: block; margin-top: 7px;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--d-ink-3);
}

/* --------------------------------------------------------------------------
   10. CREDENTIALS — every claim carries how to check it
   -------------------------------------------------------------------------- */
.creds { display: grid; gap: 0; border-top: 1px solid var(--rule); }
.cred {
  display: grid; grid-template-columns: 130px 1fr 250px;
  gap: 28px; align-items: baseline;
  padding: 26px 4px;
  border-bottom: 1px solid var(--rule);
  transition: background .16s var(--ease);
}
.cred:hover { background: var(--card); }
.cred-year {
  font-family: var(--mono); font-size: 12px; letter-spacing: .08em;
  color: var(--ink-3); font-variant-numeric: tabular-nums;
}
.cred-main h3 { font-size: 18px; font-weight: 650; letter-spacing: -.015em; margin-bottom: 5px; }
.cred-main p { font-size: 15px; color: var(--ink-2); max-width: 60ch; }
.cred-verify {
  font-family: var(--mono); font-size: 11.5px; line-height: 1.55;
  letter-spacing: .04em; color: var(--ink-3);
}
.cred-verify a { color: var(--accent); border-bottom: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); }
.cred-verify a:hover { border-bottom-color: var(--accent); }
.cred-verify .tick { color: var(--signal); font-weight: 700; }

/* --------------------------------------------------------------------------
   11. ABOUT
   -------------------------------------------------------------------------- */
.about { display: grid; grid-template-columns: 1fr 1.15fr; gap: 60px; align-items: start; }
.about-figure { position: relative; }
.about-figure img { width: 100%; border-radius: var(--r-lg); background: var(--paper-alt); }
.about-figure figcaption {
  margin-top: 12px;
  font-family: var(--mono); font-size: 11.5px; line-height: 1.6;
  letter-spacing: .04em; color: var(--ink-3);
}
.about-figure figcaption strong { color: var(--signal); font-weight: 600; }
.about-body h2 {
  font-family: var(--display); font-size: clamp(28px, 3.2vw, 38px);
  font-weight: 400; letter-spacing: -.025em; line-height: 1.14;
  margin-bottom: 22px; text-wrap: balance;
}
.about-body p { color: var(--ink-2); margin-bottom: 16px; line-height: 1.72; }
.about-body p strong { color: var(--ink); font-weight: 620; }
.about-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.about-actions a {
  font-size: 14px; font-weight: 600; color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  padding: 9px 16px; border-radius: var(--r);
  transition: background .15s var(--ease), color .15s var(--ease);
}
.about-actions a:hover { background: var(--accent); color: var(--on-accent); }

/* --------------------------------------------------------------------------
   12. INSIGHTS
   -------------------------------------------------------------------------- */
.posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.post {
  display: flex; flex-direction: column;
  background: var(--card);
  border: 1px solid var(--rule-soft); border-radius: var(--r-lg);
  padding: 28px 26px;
  transition: border-color .18s var(--ease), transform .18s var(--ease);
}
.post:hover { border-color: var(--accent); }
@media (prefers-reduced-motion: no-preference) { .post:hover { transform: translateY(-2px); } }
.post-meta {
  font-family: var(--mono); font-size: 11px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-3); margin-bottom: 16px;
  display: flex; gap: 10px; align-items: center;
}
.post-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--ink-4); }
.post h3 {
  font-family: var(--display); font-size: 21px; font-weight: 400;
  line-height: 1.26; letter-spacing: -.015em; margin-bottom: 12px;
}
.post p { font-size: 15px; line-height: 1.6; color: var(--ink-2); margin-bottom: auto; }
.post-more { margin-top: 22px; font-size: 14px; font-weight: 600; color: var(--accent); }

/* --------------------------------------------------------------------------
   12b. TESTIMONIAL MARQUEE
   Continuous horizontal scroll. Full-bleed so cards run off both edges.
   Pauses on hover, on keyboard focus, on button press, and stops entirely
   under prefers-reduced-motion (WCAG 2.2.2 — moving content must be pausable).
   -------------------------------------------------------------------------- */
.marquee {
  --gap: 20px;
  --speed: 80s;
  position: relative;
  overflow: hidden;
  /* Bottom padding reserves a lane for the pause control so it never sits
     on top of a card. */
  padding: 4px 0 48px;
  /* Already full-bleed: .marquee is a direct child of the section, outside
     .wrap. Do NOT reach for 100vw here — it includes the scrollbar width and
     pushes the whole page into horizontal scroll. */
}
/* Soft edges so cards enter and leave rather than being chopped */
.marquee::before, .marquee::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: clamp(40px, 8vw, 130px);
  z-index: 2; pointer-events: none;
}
.marquee::before { left: 0;  background: linear-gradient(to right, var(--paper), transparent); }
.marquee::after  { right: 0; background: linear-gradient(to left,  var(--paper), transparent); }

.marquee-track {
  display: flex;
  gap: var(--gap);
  width: max-content;
  padding-inline: var(--gap);
}
@media (prefers-reduced-motion: no-preference) {
  .marquee-track { animation: marquee-scroll var(--speed) linear infinite; }
  .marquee:hover .marquee-track,
  .marquee:focus-within .marquee-track,
  .marquee[data-paused] .marquee-track { animation-play-state: paused; }
}
/* The track holds two identical sets; shifting by half its width + half a gap
   lands set 2 exactly where set 1 began. */
@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(calc(-50% - var(--gap) / 2)); }
}
/* No animation at all for reduced motion — becomes a normal swipeable row. */
@media (prefers-reduced-motion: reduce) {
  .marquee { overflow-x: auto; scroll-snap-type: x mandatory; }
  .quote { scroll-snap-align: center; }
  .marquee-toggle { display: none; }
}

.quote {
  flex: 0 0 auto;
  width: min(360px, 78vw);
  display: flex; flex-direction: column;
  background: var(--card);
  border: 1px solid var(--rule-soft);
  border-left: 3px solid var(--accent);
  border-radius: var(--r-lg);
  padding: 26px 26px 22px;
}
.quote blockquote {
  font-size: 15.5px; line-height: 1.62; color: var(--ink-2);
  margin-bottom: auto;
}
.quote blockquote::before { content: "\201C"; }
.quote blockquote::after  { content: "\201D"; }
.quote figcaption {
  display: flex; align-items: center; gap: 12px;
  margin-top: 22px; padding-top: 16px;
  border-top: 1px solid var(--rule-soft);
}
.quote-avatar {
  flex: none; width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent-wash); color: var(--accent);
  font-family: var(--display); font-size: 17px; line-height: 1;
}
.quote figcaption b {
  display: block; font-size: 14.5px; font-weight: 650;
  color: var(--ink); letter-spacing: -.01em;
}
.quote figcaption span span,
.quote figcaption > span:last-child {
  font-family: var(--mono); font-size: 11px; line-height: 1.5;
  letter-spacing: .04em; color: var(--ink-3);
}

.marquee-toggle {
  position: absolute; bottom: 4px; z-index: 3;
  /* Align to the same right edge as .wrap content above it */
  right: max(var(--gutter), calc(50% - var(--measure) / 2));
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-3);
  background: var(--card); border: 1px solid var(--rule);
  border-radius: 999px; padding: 6px 14px;
  transition: color .15s var(--ease), border-color .15s var(--ease);
}
.marquee-toggle:hover { color: var(--accent); border-color: var(--accent); }

/* --------------------------------------------------------------------------
   13. CONTACT
   -------------------------------------------------------------------------- */
.contact { background: var(--ground); color: var(--d-ink); padding-block: 84px; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.contact .kicker { color: var(--d-accent); }
.contact h2 {
  font-family: var(--display); font-size: clamp(28px, 3.4vw, 40px);
  font-weight: 400; letter-spacing: -.025em; line-height: 1.14;
  color: var(--d-ink); text-wrap: balance;
}
.contact p { color: var(--d-ink-2); margin-top: 18px; line-height: 1.7; }
.contact-direct { margin-top: 30px; display: grid; gap: 12px; }
.contact-direct a {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px;
  border: 1px solid var(--rule-dark); border-radius: var(--r);
  color: var(--d-ink); font-size: 15px;
  transition: border-color .16s var(--ease), background .16s var(--ease);
}
.contact-direct a:hover { border-color: var(--d-accent); background: rgba(70,200,140,.06); }
.contact-direct .lbl {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .11em;
  text-transform: uppercase; color: var(--d-ink-3); min-width: 74px;
}
.contact-direct .val { font-family: var(--mono); font-size: 14px; color: var(--d-accent); }

.form { display: grid; gap: 16px; }
.field label {
  display: block; margin-bottom: 7px;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--d-ink-2);
}
.field input, .field textarea, .field select {
  width: 100%;
  background: var(--ground-alt);
  border: 1px solid var(--rule-dark);
  color: var(--d-ink);
  font-family: var(--body); font-size: 15px;
  padding: 12px 14px; border-radius: var(--r);
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.field input::placeholder, .field textarea::placeholder { color: #6C7B81; }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--d-accent);
  box-shadow: 0 0 0 3px rgba(70,200,140,.22);
}
.field textarea { resize: vertical; min-height: 108px; }
.form-note { font-size: 13px; color: var(--d-ink-3); }
.form-status { font-size: 14.5px; min-height: 22px; color: var(--d-accent); }
.form-status[data-state="error"] { color: #FF9C8A; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* --------------------------------------------------------------------------
   14. FOOTER
   -------------------------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--rule-soft); padding-block: 34px; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: center; justify-content: space-between; }
.footer-inner p { font-size: 14px; color: var(--ink-3); }
.footer-links { display: flex; flex-wrap: wrap; gap: 22px; }
.footer-links a { font-size: 14px; color: var(--ink-3); transition: color .15s var(--ease); }
.footer-links a:hover { color: var(--accent); }
.footer-disclosure {
  margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--rule-soft);
  font-size: 13px; line-height: 1.6; color: var(--ink-3); max-width: 80ch;
}

/* --------------------------------------------------------------------------
   15. ARTICLE PAGES
   -------------------------------------------------------------------------- */
.article-head { padding: 64px 0 34px; border-bottom: 1px solid var(--rule); margin-bottom: 40px; }
.article-head h1 {
  font-family: var(--display); font-size: clamp(32px, 4.4vw, 50px);
  font-weight: 400; line-height: 1.1; letter-spacing: -.028em;
  margin: 16px 0 18px; text-wrap: balance;
}
.article-head .byline { font-family: var(--mono); font-size: 12px; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-3); }
.back-link {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 12px; letter-spacing: .09em;
  text-transform: uppercase; color: var(--accent);
}
.back-link:hover { color: var(--accent-strong); }

.prose { padding-bottom: 72px; font-size: 18px; line-height: 1.75; color: var(--ink-2); }
.prose > * + * { margin-top: 1.25em; }
.prose h2 {
  font-family: var(--display); font-size: 30px; font-weight: 400;
  line-height: 1.2; letter-spacing: -.022em; color: var(--ink);
  margin-top: 2.2em; text-wrap: balance;
}
.prose h3 { font-size: 19px; font-weight: 650; color: var(--ink); margin-top: 1.9em; letter-spacing: -.01em; }
.prose strong { color: var(--ink); font-weight: 620; }
.prose a { color: var(--accent); border-bottom: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); }
.prose a:hover { border-bottom-color: var(--accent); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .5em; }
.prose blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 22px; color: var(--ink-2); font-style: italic;
}
.prose hr { border: 0; border-top: 1px solid var(--rule); margin-block: 2.4em; }
.prose code {
  font-family: var(--mono); font-size: .88em;
  background: var(--paper-alt); padding: 2px 6px; border-radius: var(--r);
  color: var(--ink);
}
.prose pre {
  background: var(--ground); color: var(--d-ink);
  padding: 20px 22px; border-radius: var(--r-lg);
  overflow-x: auto; font-size: 14px; line-height: 1.6;
}
.prose pre code { background: none; padding: 0; color: inherit; }
.article-foot {
  border-top: 1px solid var(--rule); padding-top: 26px; margin-top: 48px;
  font-size: 15.5px; color: var(--ink-3); line-height: 1.7;
}

/* --------------------------------------------------------------------------
   16. RESPONSIVE
   -------------------------------------------------------------------------- */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; gap: 44px; padding: 48px 0 56px; }
  .hero-figure { order: -1; }
  .hero-portrait { width: 270px; }
  .services { grid-template-columns: 1fr; }
  .record { grid-template-columns: 1fr; }
  .record-rail { border-right: 0; border-bottom: 1px solid var(--rule-dark); display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 16px; padding: 22px 26px; }
  .record-rail dd { margin-bottom: 0; }
  .record-figs { border-left: 0; border-top: 1px solid var(--rule-dark); display: flex; gap: 40px; padding: 22px 26px 26px; }
  .record-figs div + div { margin-top: 0; }
  .cred { grid-template-columns: 84px 1fr; gap: 8px 22px; }
  .cred-verify { grid-column: 2; }
  .about { grid-template-columns: 1fr; gap: 36px; }
  .posts { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; gap: 44px; }

  .nav-toggle { display: block; }
  .nav {
    display: none; position: absolute; top: 67px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 4px;
    background: var(--paper); border-bottom: 1px solid var(--rule);
    padding: 14px var(--gutter) 20px;
    box-shadow: 0 14px 30px rgba(0,0,0,.09);
  }
  .nav[data-open] { display: flex; }
  .nav a { padding: 11px 2px; font-size: 17px; }
  .nav .btn { margin-top: 8px; padding: 13px 18px; font-size: 15px; }
}

@media (max-width: 560px) {
  :root { --gutter: 20px; }
  body { font-size: 16px; }
  .band { padding-block: 54px; }
  .band-head { margin-bottom: 32px; }
  .hero h1 { font-size: clamp(31px, 8.4vw, 40px); }
  .hero-lede { font-size: 17px; }
  .hero-portrait { width: 230px; }
  .hero-actions .btn { flex: 1 1 100%; }
  .proof { grid-template-columns: repeat(2, 1fr); gap: 24px 18px; margin-top: 34px; }
  .proof-item b { font-size: 27px; }
  .record-figs { flex-wrap: wrap; gap: 24px 40px; }
  .marquee-toggle { min-height: 36px; padding-inline: 18px; }  /* comfortable tap target */
  .cred { grid-template-columns: 1fr; gap: 8px; padding: 22px 2px; }
  .cred-verify { grid-column: 1; }
  .contact { padding-block: 60px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

/* --------------------------------------------------------------------------
   17. MOTION — opt-in reveal, single consistent language
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(14px); }
  .reveal.is-in {
    opacity: 1; transform: none;
    transition: opacity .55s var(--ease), transform .55s var(--ease);
  }
}

/* --------------------------------------------------------------------------
   18. PRINT — recruiters print things
   -------------------------------------------------------------------------- */
@media print {
  .site-header, .nav, .contact, .hero-actions, .about-actions, .post-more { display: none !important; }
  body { background: #fff; color: #000; font-size: 12pt; }
  .band, .contact { padding-block: 16pt; }
  .record, .band-dark { background: #fff !important; color: #000 !important; }
  .record-body h3, .record-body p, .band-dark .band-title { color: #000 !important; }
  a::after { content: " (" attr(href) ")"; font-size: 9pt; color: #555; }
}
