/* =============================================================================
   HAILEE HOA LUONG — SHARED SITE STYLESHEET
   Production copy of design-reference/style.css, adapted for the live site.
   Fixes applied on top of the reference file:
     · .back-to-top referenced the undefined --color-card token — corrected to
       --color-surface-card (the button background was silently transparent).
     · .site-footer top padding used --section-gap (150px); the real page and
       this file's own audit notes agree the intended value is 48px.
     · .site-footer was missing from the narrow-viewport gutter rule, so it
       kept 40px side padding on mobile while everything else dropped to 24px.
   -----------------------------------------------------------------------------
   ORGANIZATION
     01. Fonts
     02. Tokens (:root)
     03. Base / reset
     04. Layout
     05. Typography
     06. Components
     07. Responsive
   ========================================================================== */

/* ---------- 01. FONTS -----------------------------------------------------
   DM Sans + DM Mono on every page. Indie Flower is About-only (polaroid
   captions + "click for more" cue).                                          */
@import url("https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=DM+Sans:wght@400;500;600;700&family=Indie+Flower&display=swap");

/* ---------- 02. TOKENS --------------------------------------------------- */
:root {
  /* --- Color: surfaces --- */
  --color-bg: #0D0D0E;            /* page background; also button label color */
  --color-surface-card: #131316;  /* THE card fill — all pages, all card types */
  --color-surface-slot: #1A1A1D;  /* image-slot placeholder fill only */
  --color-selection: #2A2A2C;
  --color-paper: #F4F0E8;         /* polaroid stock (About) */
  --color-paper-ink: #33322E;     /* polaroid caption ink (About) */

  /* --- Color: text ramp --- */
  --color-text: #EDEDED;          /* body / link default */
  --color-text-strong: #FFFFFF;   /* headings, card titles, nav */
  --color-text-body: #A0A0A6;     /* long-form paragraphs */
  --color-text-card: #C6C6CB;     /* ALL card body copy + pill labels */
  --color-text-muted: #8E8E93;    /* captions, sub-labels, secondary meta */

  /* --- Color: accents --- */
  --color-accent: #F6825D;        /* the one brand accent */
  --color-accent-hover: #FF9877;  /* CTA / link hover (Heat) */
  --color-live: #12E3AA;          /* "Open to work" / "Live" status */

  /* --- Color: heat scale (Urban Heat Portal only) --- */
  --color-heat-1: #5B8FD9;
  --color-heat-2: #7CA6D9;
  --color-heat-3: #F2A93B;
  --color-heat-4: #EB8A3E;
  --color-heat-5: #E4572E;
  --color-heat-6: #9A2B1D;
  --gradient-heat: linear-gradient(90deg, var(--color-heat-1), var(--color-heat-3) 55%, var(--color-heat-5) 82%, var(--color-heat-6));

  /* --- Borders --- */
  --border-hairline: 1px solid rgba(255, 255, 255, 0.09); /* dividers, rules, cards, image frames — ONE token now */
  --border-pill: 1px solid rgba(255, 255, 255, 0.13);
  --border-avatar: 1px solid rgba(255, 255, 255, 0.14);
  --border-button: 1px solid rgba(255, 255, 255, 0.16);
  --border-badge: 1px solid rgba(255, 255, 255, 0.28);

  /* --- Typography --- */
  --font-sans: "DM Sans", Helvetica, Arial, sans-serif;
  --font-mono: "DM Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --font-hand: "Indie Flower", cursive;

  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;

  /* Fluid type — Stage 1: phone (375px) → laptop (1512px). Stage 2 in the
     min-width:1512px block below carries 1512 → 1920, then caps. */
  --text-hero: clamp(2rem, 1.835rem + 0.7vw, 2.5rem);
  --text-h2:   clamp(1.6875rem, 1.543rem + 0.616vw, 2.125rem);
  --text-h3:   clamp(1.3125rem, 1.209rem + 0.44vw, 1.625rem);
  /* Status label — 12px → 14px (stage 1), 14px → 16px (stage 2). */
  --text-status: clamp(0.75rem, 0.709rem + 0.176vw, 0.875rem);
  /* Project-card overlay — title 22px → 26px, desc 14px → 16px (stage 1). */
  --text-card-title: clamp(1.375rem, 1.293rem + 0.352vw, 1.625rem);
  --text-card-desc:  clamp(0.875rem, 0.834rem + 0.176vw, 1rem);
  --text-h4: 21px;
  --text-lead: 19px;
  --text-body: 17px;
  --text-body-sm: 16px;
  --text-ui: 15px;
  --text-ui-sm: 14px;
  --text-chrome: 15px;      /* header wordmark + nav */
  --text-footer: 14px;      /* footer links */
  --text-meta: 13px;
  --text-eyebrow: 12px;
  --text-caption: 12.5px;
  --text-micro: 11px;

  --leading-tight: 1;
  --leading-heading: 1.05;
  --leading-snug: 1.2;
  --leading-normal: 1.5;
  --leading-relaxed: 1.6;
  --leading-loose: 1.65;

  --tracking-hero: -0.05em;    /* h1 on all three pages */
  --tracking-heading: -0.05em; /* h2 */
  --tracking-title: -0.04em;   /* wordmark, footer links, h3 */
  --tracking-tight: -0.03em;
  --tracking-mono: 0.06em;
  --tracking-mono-wide: 0.10em;
  --tracking-footer-caps: 0.12em;   /* on the footer container only */

  /* --- Spacing scale --- */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 14px;
  --space-5: 18px;
  --space-6: 20px;
  --space-7: 22px;
  --space-8: 26px;
  --space-9: 28px;
  --space-10: 34px;
  --space-11: 40px;
  --space-12: 48px;
  --space-13: 56px;
  --space-14: 64px;
  --space-15: 96px;
  --space-16: 110px;
  --space-17: 120px;
  --space-18: 150px;

  /* --- Layout --- */
  --page-max: 1240px;
  --page-gutter: 40px;
  --page-gutter-narrow: 24px;
  --header-pad-y: 26px;
  --header-top-offset: 150px;        /* now identical on all three pages */
  --header-top-offset-narrow: 104px;
  --section-gap: 150px;
  --section-gap-narrow: 96px;
  --measure-prose: 62ch;
  --measure-caption: 78ch;
  --breakpoint-narrow: 900px;

  /* --- Radius --- */
  --radius-card: 1px;      /* every card + image frame, all pages */
  --radius-print: 2px;     /* polaroid photo print (About) */
  --radius-pill: 999px;
  --radius-dot: 50%;

  /* --- Elevation --- */
  --shadow-polaroid: 0 18px 40px rgba(0, 0, 0, 0.5);

  /* --- Motion --- */
  --ease: ease;
  --dur-fast: 260ms;
  --dur-base: 280ms;
  --dur-slow: 320ms;
  --transition-fade: opacity var(--dur-base) var(--ease);
  --transition-card: transform var(--dur-slow) var(--ease), opacity var(--dur-fast) var(--ease);
}

/* Stage 2: laptop (1512px) → monitor (1920px), capped past 1920. */
@media (min-width: 1512px) {
  :root {
    --text-hero: clamp(2.5rem, -2.59rem + 5.39vw, 62px);
    --text-h2:   clamp(2.125rem, -2.276rem + 4.657vw, 53px);
    --text-h3:   clamp(1.625rem, -1.617rem + 3.431vw, 40px);
  }
}

/* ---------- 03. BASE ----------------------------------------------------- */
html,
body { margin: 0; padding: 0; background: var(--color-bg); }

body {
  font-family: var(--font-sans);
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--color-text); text-decoration: none; }
a:hover { color: var(--color-accent); }

::selection { background: var(--color-selection); color: #fff; }

@keyframes om-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(18, 227, 170, 0.45); }
  70%  { box-shadow: 0 0 0 8px rgba(18, 227, 170, 0); }
  100% { box-shadow: 0 0 0 0 rgba(18, 227, 170, 0); }
}

/* ---------- 04. LAYOUT --------------------------------------------------- */
.page {
  background: var(--color-bg);
  color: var(--color-text);
  min-height: 100vh;
  position: relative;
}

.shell {
  box-sizing: border-box;
  max-width: var(--page-max);
  margin: 0 auto;
  padding-left: var(--page-gutter);
  padding-right: var(--page-gutter);
}

.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-sizing: border-box;
  max-width: var(--page-max);
  margin: 0 auto;
  padding: var(--header-pad-y) var(--page-gutter);
  background: linear-gradient(var(--color-bg) 62%, rgba(13, 13, 14, 0));
  pointer-events: none;
}

.wordmark {
  font-family: var(--font-sans);
  font-size: var(--text-chrome);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-title);
  text-transform: uppercase;
  color: var(--color-text-strong);
  pointer-events: auto;
}
.wordmark:hover { color: var(--color-accent); }

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--space-13);
  font-family: var(--font-sans);
  font-size: var(--text-chrome);
  font-weight: var(--weight-medium);
  pointer-events: auto;
}
.site-nav a { color: var(--color-text-strong); }
.site-nav a:hover { color: var(--color-accent); }
.site-nav a[aria-current] {          /* active page — About only today */
  font-weight: var(--weight-bold);
  text-decoration: underline;
  text-decoration-color: var(--color-accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}

.page-main {
  box-sizing: border-box;
  max-width: var(--page-max);
  margin: 0 auto;
  padding: var(--header-top-offset) var(--page-gutter) 0;
}

.section + .section { margin-top: var(--section-gap); }

/* Last section before the footer — top up the footer's own padding-top
   (--space-12, kept smaller for the footer link row itself) so the visual
   gap above the footer matches the regular inter-section gap. */
.section--footer-gap { margin-bottom: calc(var(--section-gap) - var(--space-12)); }

.section-head {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: var(--space-11);
  margin-bottom: var(--space-12);
}

.site-footer {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-4) var(--space-14);
  box-sizing: border-box;
  max-width: var(--page-max);
  margin: 0 auto;
  padding: var(--space-12) var(--page-gutter) var(--page-gutter);
  color: var(--color-text);
  font-size: var(--text-footer);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-footer-caps);
  text-transform: uppercase;
}
.site-footer__links {
  display: flex;
  gap: var(--space-14);
  flex-wrap: wrap;
}
.site-footer a {
  font-family: var(--font-sans);
  font-size: var(--text-footer);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-title);
  text-transform: uppercase;
}
.site-footer a:hover { color: var(--color-accent); }
.site-footer__copyright {
  font-family: var(--font-sans);
  font-size: var(--text-card-desc);
  font-weight: var(--weight-regular);
  letter-spacing: -0.01em;
  text-transform: none;
  color: var(--color-text-card);
}

/* ---------- 05. TYPOGRAPHY ---------------------------------------------- */
.hero-title {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-hero);
  line-height: var(--leading-tight);
  font-weight: var(--weight-regular);
  letter-spacing: var(--tracking-hero);
  color: var(--color-text-strong);
  text-wrap: balance;
}
.hero-title--accent { color: var(--color-accent); }   /* About */

.hero-sub {                                            /* Home second hero line */
  margin: 0.28em 0 0;
  font-size: var(--text-hero);
  line-height: var(--leading-tight);
  font-weight: var(--weight-regular);
  letter-spacing: var(--tracking-hero);
  color: var(--color-text-muted);
  text-wrap: pretty;
}

.h2 {
  margin: 0;
  font-size: var(--text-h2);
  line-height: var(--leading-heading);
  font-weight: var(--weight-regular);
  letter-spacing: var(--tracking-heading);
  color: var(--color-text-strong);
}

.h3 {
  margin: 0;
  font-size: var(--text-h3);
  line-height: var(--leading-snug);
  font-weight: var(--weight-regular);
  letter-spacing: var(--tracking-title);
  color: var(--color-text-strong);
}

.h4 {
  margin: 0;
  font-size: var(--text-h4);
  line-height: var(--leading-snug);
  font-weight: var(--weight-regular);
  letter-spacing: var(--tracking-tight);
  color: var(--color-text-strong);
}

.lead {
  margin: 0;
  font-size: var(--text-lead);
  line-height: var(--leading-relaxed);
  color: var(--color-text-body);
  max-width: 54ch;
  text-wrap: pretty;
}

.prose {
  margin: 0;
  font-size: var(--text-body);
  line-height: var(--leading-loose);
  color: var(--color-text-body);
  max-width: var(--measure-prose);
  text-wrap: pretty;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--text-eyebrow);
  letter-spacing: var(--tracking-mono);
  text-transform: uppercase;
  color: var(--color-text-muted);
}
.eyebrow--accent { color: var(--color-accent); }
.eyebrow--micro { font-size: var(--text-micro); letter-spacing: var(--tracking-mono-wide); }

.figcaption {
  margin: var(--space-5) 0 0;
  font-family: var(--font-mono);
  font-size: var(--text-caption);
  line-height: var(--leading-relaxed);
  color: var(--color-text-muted);
  max-width: var(--measure-caption);
}

/* ---------- 06. COMPONENTS ---------------------------------------------- */

/* Card — the one card shell, now identical on all three pages. */
.card {
  box-sizing: border-box;
  background: var(--color-surface-card);
  border: var(--border-hairline);
  border-radius: var(--radius-card);
  padding: var(--space-9);
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}
.card__body {
  margin: 0;
  font-size: var(--text-body);
  line-height: var(--leading-normal);
  color: var(--color-text-card);
  text-wrap: pretty;
}

/* Project card — Home. Same shell as .card; image swaps to text on hover. */
.project-card {
  position: relative;
  display: block;
  box-sizing: border-box;
  width: 100%;
  max-width: 420px;
  aspect-ratio: 1 / 1.05;
  background: var(--color-surface-card);
  border-radius: var(--radius-card);
  overflow: hidden;
  cursor: pointer;
  text-decoration: none;
  outline: none;
}
.project-card__media,
.project-card__overlay { position: absolute; inset: 0; transition: var(--transition-fade); }
.project-card__media { opacity: 1; }
.project-card__overlay {
  padding: var(--space-6);
  box-sizing: border-box;
  background: var(--color-surface-slot);
  opacity: 0;
  pointer-events: none;
}
.project-card:hover .project-card__media,
.project-card:focus .project-card__media { opacity: 0; }
.project-card:hover .project-card__overlay,
.project-card:focus .project-card__overlay { opacity: 1; }

.project-card__badge {
  position: absolute;
  top: 16px; right: 16px;
  width: 40px; height: 40px;
  border-radius: var(--radius-pill);
  background: var(--color-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-strong);
}
.project-card__badge svg { width: 16px; height: 16px; }
.project-card__content {
  box-sizing: border-box;
  padding-right: 34px;
  padding-bottom: 52px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.project-card__title {
  margin: 0;
  font-size: var(--text-card-title);
  line-height: 1.1;
  letter-spacing: var(--tracking-tight);
  font-weight: var(--weight-medium);
  color: var(--color-text-strong);
}
.project-card__desc {
  margin: 0;
  font-size: var(--text-card-desc);
  line-height: 1.4;
  letter-spacing: -0.01em;
  color: var(--color-text-card);
  text-wrap: pretty;
}
.project-card__meta {
  position: absolute;
  left: var(--space-6); right: var(--space-6); bottom: var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 16px;
  font-size: var(--text-status);
  line-height: 1.3;
  letter-spacing: 0.02em;
  color: var(--color-text-muted);
}
.project-card__lock {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  color: var(--color-accent);
}
.project-card__lock svg { width: 13px; height: 13px; flex: 0 0 auto; }

/* Framed image — case-study screenshots (Heat). */
.figure-frame {
  border: var(--border-hairline);
  border-radius: var(--radius-card);
  overflow: hidden;
}
.figure-frame img { width: 100%; display: block; }

/* Pill / tag — About skills + Heat collaborators. */
.pill {
  padding: 7px var(--space-4);
  border: var(--border-pill);
  border-radius: var(--radius-pill);
  font-size: var(--text-ui-sm);
  color: var(--color-text-card);
  white-space: nowrap;
}
.pill-row { display: flex; flex-wrap: wrap; gap: var(--space-2); }

/* Text link — inline accent link beside a section heading (About). */
.text-link {
  font-family: var(--font-sans);
  font-size: var(--text-ui-sm);
  font-weight: var(--weight-medium);
  letter-spacing: -0.01em;
  color: var(--color-accent);
  text-decoration: none;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.text-link:hover {
  color: var(--color-accent-hover);
  font-weight: var(--weight-bold);
  text-decoration: underline;
}
.section-head-inline {         /* heading + text link on one baseline */
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin: 0 0 46px;
}

/* Buttons — Heat (the site's only button component). */
.btn {
  padding: 13px var(--space-7);
  border-radius: var(--radius-pill);
  font-size: var(--text-ui-sm);
  font-weight: var(--weight-medium);
  display: inline-block;
}
.btn--primary { background: var(--color-accent); color: var(--color-bg); }
.btn--primary:hover { background: var(--color-accent-hover); color: var(--color-bg); }
.btn--secondary { border: var(--border-button); color: var(--color-text); }
.btn--secondary:hover { border-color: var(--color-accent); color: var(--color-accent); }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--space-3); }

/* Password gate — Parental Controls & Identity Architecture case studies only.
   Centered narrow column inside .page-main; content fades in once unlocked
   (JS in password-gate.js toggles [hidden] + .is-visible, see that file).

   While locked, .is-gate-locked on <body> (present by default in the markup,
   removed by JS on unlock) hides the header/footer and centers the gate in
   the full viewport, so it stands alone rather than sitting under the normal
   chrome. This is an intentional, documented exception to the CLAUDE.md
   shared-markup rule — see PROJECT.md §8. */
.is-gate-locked .site-header,
.is-gate-locked .site-footer,
.is-gate-locked .back-to-top { display: none; }
.is-gate-locked .page-main {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 0;
  padding-bottom: 0;
  box-sizing: border-box;
}
.is-gate-locked .password-gate { margin: 0; }

.password-gate {
  max-width: 440px;
  margin: var(--space-17) auto var(--space-18);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-6);
}
.password-gate__title { color: var(--color-text-strong); }
.password-gate__note {
  margin: 0;
  max-width: 42ch;
  font-size: var(--text-body);
  line-height: var(--leading-relaxed);
  color: var(--color-text-body);
}
.password-gate__note a { color: var(--color-accent); }
.password-gate__note a:hover { color: var(--color-accent-hover); }

.password-gate__form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.password-gate__field { position: relative; width: 100%; }
.password-gate__input {
  width: 100%;
  box-sizing: border-box;
  padding: var(--space-5) var(--space-11) var(--space-5) var(--space-6);
  border-radius: var(--radius-card);
  border: var(--border-hairline);
  background: var(--color-surface-card);
  color: var(--color-text-strong);
  font-family: var(--font-sans);
  font-size: var(--text-ui-sm);
}
.password-gate__input::placeholder { color: var(--color-text-muted); }
.password-gate__input:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }

.password-gate__eye {
  position: absolute;
  top: 50%; right: var(--space-4);
  transform: translateY(-50%);
  display: flex;
  padding: var(--space-1);
  background: none;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
}
.password-gate__eye:hover { color: var(--color-text-strong); }
.password-gate__eye:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; border-radius: var(--radius-dot); }
.password-gate__eye svg { width: 18px; height: 18px; }
.password-gate__eye svg.is-hidden { display: none; }

.password-gate__error {
  margin: 0;
  text-align: left;
  font-family: var(--font-mono);
  font-size: var(--text-status);
  letter-spacing: var(--tracking-mono);
  color: var(--color-text-muted);
}

.password-gate__submit {
  display: block;
  width: 100%;
  text-align: center;
  border: none;
  cursor: pointer;
  font-family: var(--font-sans);
}

.password-gate__return {
  font-family: var(--font-sans);
  font-size: var(--text-ui-sm);
  color: var(--color-text-muted);
}
.password-gate__return:hover { color: var(--color-accent); }

.case-study-placeholder {
  max-width: 440px;
  margin: var(--space-17) auto var(--space-18);
  text-align: center;
  opacity: 0;
  transition: var(--transition-fade);
}
.case-study-placeholder.is-visible { opacity: 1; }
.case-study-placeholder__note {
  margin: var(--space-4) 0 0;
  font-size: var(--text-body);
  color: var(--color-text-body);
}

/* Not found — 404.html only. A quiet centered column standing alone in the
   viewport, like the locked password gate (PROJECT.md §6). The page has no
   site header or footer — an intentional exception to the CLAUDE.md
   shared-markup rule, see PROJECT.md §8. */
.page-main--standalone {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 0;
  padding-bottom: 0;
}
.not-found {
  max-width: 440px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-6);
}
.not-found__note {
  margin: 0;
  font-size: var(--text-body);
  line-height: var(--leading-relaxed);
  color: var(--color-text-body);
}
.not-found__return {
  font-family: var(--font-sans);
  font-size: var(--text-ui-sm);
  color: var(--color-text-muted);
}
.not-found__return:hover { color: var(--color-accent); }

/* Back to top — site-wide, all 9 pages. Fixed bottom-right circular button.
   Hidden by default; JS (back-to-top.js) sets data-back-to-top="1" once the
   page has scrolled past ~90vh. Card fill on page bg = white arrow at ~15:1. */
.back-to-top {
  position: fixed;
  right: var(--space-8, 32px);
  bottom: var(--space-8, 32px);
  z-index: 30;
  width: 52px; height: 52px;
  border-radius: var(--radius-pill);
  border: var(--border-avatar);
  background: var(--color-surface-card);
  color: var(--color-text);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.55);
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
  transition:
    opacity 280ms var(--ease),
    transform 280ms var(--ease),
    background-color 200ms var(--ease),
    border-color 200ms var(--ease);
}
.back-to-top[data-back-to-top="1"] {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.back-to-top:hover {
  background: #1F1F24;
  border-color: rgba(255, 255, 255, 0.28);
}
.back-to-top:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}
.back-to-top svg { width: 20px; height: 20px; }
@media (prefers-reduced-motion: reduce) {
  .back-to-top { transition: opacity 280ms var(--ease); transform: none; }
}

/* Status dot — Home "Open to work" / Heat "Live". */
.status { display: flex; align-items: center; gap: var(--space-3); }
.status__dot {
  width: 8px; height: 8px;
  border-radius: var(--radius-dot);
  background: var(--color-live);
  box-shadow: 0 0 0 0 rgba(18, 227, 170, 0.6);
  animation: om-pulse 2s var(--ease) infinite;
  flex: 0 0 auto;
}
.status__label {
  font-family: var(--font-mono);
  font-size: var(--text-status);
  text-transform: uppercase;
  color: var(--color-live);
}

/* Meta grid — Heat project facts. */
.meta-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px 0;
  border-top: var(--border-hairline);
}
.meta-grid__item { padding: var(--space-6) var(--page-gutter-narrow) var(--space-7) 0; }
.meta-grid__label { margin-bottom: var(--space-2); }
.meta-grid__value { font-size: var(--text-ui); line-height: 1.45; color: var(--color-text-strong); }

/* Role row — About work history. */
.role-row {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: var(--space-11);
  padding: var(--space-8) 0;
  border-top: var(--border-hairline);
}
.role-row__dates {
  font-family: var(--font-mono);
  font-size: var(--text-meta);
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  padding-top: 5px;
}
.role-row__company {
  margin: 0;
  font-size: var(--text-h4);
  line-height: 1.15;
  font-weight: var(--weight-regular);
  letter-spacing: var(--tracking-tight);
  color: var(--color-text-strong);
}
.role-row__summary {
  font-size: var(--text-body-sm);
  line-height: var(--leading-normal);
  color: var(--color-text-body);
  max-width: 44em;
  text-wrap: pretty;
}

/* Numbered row — Heat audiences. */
.numbered-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: var(--space-4);
  padding: var(--space-5) 0;
  border-bottom: var(--border-hairline);
}
.numbered-row__n {
  font-family: var(--font-mono);
  font-size: var(--text-meta);
  color: var(--color-accent);
  padding-top: 3px;
}

/* Testimonial card — About. Extends .card. */
.quote-card { gap: var(--space-7); }
.quote-card__text {
  margin: 0;
  font-size: var(--text-body);
  line-height: 1.55;
  color: var(--color-text-card);
  text-wrap: pretty;
}
.quote-card__text strong { color: var(--color-accent); font-weight: var(--weight-medium); }
.quote-card__attrib { margin-top: auto; display: flex; align-items: center; gap: var(--space-3); }
.quote-card__initials {
  width: 36px; height: 36px;
  flex: 0 0 auto;
  border-radius: var(--radius-pill);
  border: var(--border-avatar);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-eyebrow);
  letter-spacing: 0.04em;
  color: var(--color-text-body);
}
.quote-card__name { font-size: var(--text-ui-sm); color: var(--color-text-strong); }
.quote-card__role { font-size: var(--text-meta); color: var(--color-text-muted); }

/* Polaroid stack — About. Rotation/offset per card set inline by JS. */
.polaroid-stack {
  position: relative;
  width: 320px;
  height: 390px;
  cursor: pointer;
  user-select: none;
}
.polaroid {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  box-sizing: border-box;
  background: var(--color-paper);
  padding: var(--space-4) var(--space-4) 0;
  border-radius: var(--radius-print);
  box-shadow: var(--shadow-polaroid);
  transition: var(--transition-card);
}
.polaroid__photo {
  width: 100%;
  height: 76%;
  overflow: hidden;
  background: var(--color-surface-slot);
  position: relative;
}
.polaroid__caption {
  height: 24%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-hand);
  font-size: 19px;
  color: var(--color-paper-ink);
  text-align: center;
  padding: 0 6px;
}
.hand-note {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-hand);
  font-size: 19px;
  color: var(--color-accent);
}

/* Process steps — Heat. */
.step {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding-top: var(--space-6);
  border-top: var(--border-hairline);
}
.step__dot { width: 7px; height: 7px; border-radius: var(--radius-dot); }
.step__label { font-size: var(--text-body-sm); color: var(--color-text-strong); }
.step__sub { font-size: var(--text-ui-sm); line-height: 1.45; color: var(--color-text-muted); }

/* Heat scale legend — Heat. */
.scale-legend {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  font-family: var(--font-mono);
  font-size: var(--text-micro);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}
.scale-legend__bar {
  flex: 1 1 auto;
  height: 4px;
  border-radius: var(--radius-pill);
  background: var(--gradient-heat);
}

/* Common grids */
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-6); }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-6); }
.grid-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-14); align-items: start; }

/* Skills grid — About "What I work with". Own gap (wider than .grid-3's). */
.skills-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px; }

/* About hero + polaroid-stack split. */
.about-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 394px;
  gap: var(--space-16);
  align-items: start;
}
.about-hero__text {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
  max-width: 34em;
}
.about-hero__photos {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  box-sizing: border-box;
  padding-right: var(--space-10);
  justify-self: end;
}

/* Home hero + featured-card split. Two fixed-ratio columns (not 1fr/1fr like
   .grid-split) with the left column sticking through the right column's
   scroll — top padding lives on the columns themselves, not the grid, so the
   sticky hero keeps its 150px clearance under the fixed header once stuck. */
.home-grid {
  display: grid;
  grid-template-columns: minmax(0, 620px) minmax(0, 420px);
  justify-content: center;
  gap: var(--space-17);
}
.home-grid__hero {
  position: sticky;
  top: 0;
  align-self: start;
  min-height: 100vh;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: var(--header-top-offset) 0 var(--space-11);
}
.home-grid__hero .hero-title,
.home-grid__hero .hero-sub { max-width: 11em; }
.home-grid__cards {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  padding: var(--header-top-offset) 0 var(--space-17);
}

/* Work grid — Selected work page. Simple stacked hero + card grid,
   3 cols (>=1100px) -> 2 cols (900-1099px) -> 1 col (<900px). */
.work-hero { padding-bottom: var(--space-14); }
.work-hero .hero-title { max-width: 22em; }
.work-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-6);
  padding: 0 0 240px;
}
@media (max-width: 1099px) {
  .work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Case study — shared by every case-study page (built first for Urban Heat
   Portal). Everything prefixed .cs- is generic: a new case study reuses these
   classes and only changes its own content. Behavior lives in
   js/case-study.js (section rail, click-to-enlarge, "See all" row, videos). */

/* Anchor targets clear the fixed header when the rail scrolls to them. */
.page-main > section[id] { scroll-margin-top: 110px; }

.cs-link {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 0.15em;
  text-decoration-thickness: 1px;
}
.cs-link:hover { color: var(--color-accent-hover); }

/* Intro */
.cs-hero .hero-title { margin-top: var(--space-7); max-width: 15em; }
.cs-hero .lead { margin-top: var(--space-8); }
.cs-live {
  margin-top: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--text-ui);
  line-height: 1.45;
  color: var(--color-text-strong);
}
.cs-live__dot {
  width: 7px; height: 7px;
  border-radius: var(--radius-dot);
  background: var(--color-live);
  flex: 0 0 auto;
}
.cs-hero .meta-grid { margin-top: var(--space-13); }
.meta-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.meta-grid__sub {
  margin-top: var(--space-1);
  font-size: var(--text-ui);
  line-height: 1.45;
  color: var(--color-text-body);
  text-wrap: pretty;
}
.cs-hero__image { margin-top: var(--space-13); }

/* Image holder — plain, square-framed, or inset (a floating UI screenshot). */
.cs-shot { border-radius: var(--radius-card); overflow: hidden; }
.cs-shot img { width: 100%; height: auto; display: block; }
.cs-shot--inset { padding: 4% 9.5%; overflow: visible; }
.cs-shot--inset img { border-radius: 12px; }
.cs-shot--wide { aspect-ratio: 2 / 1; background: var(--color-surface-slot); }
.cs-shot--wide img { height: 100%; object-fit: cover; filter: grayscale(1); }
.cs-shot--square {
  box-sizing: border-box;
  aspect-ratio: 1 / 1;
  background: var(--color-surface-slot);
  border: var(--border-hairline);
  display: flex;
  align-items: center;
  justify-content: center;
}
.cs-shot--square img { width: auto; max-width: 100%; max-height: 100%; object-fit: contain; }

/* Section heading: small label stacked over the h2 (and optional intro). */
.cs-head { display: grid; gap: var(--space-3); margin-bottom: var(--space-12); }
.cs-head .prose { margin-top: var(--space-3); max-width: 66ch; }

.cs-stack { display: flex; flex-direction: column; gap: var(--space-5); }
.cs-stack--wide .prose { max-width: 66ch; }

/* Numbered statement cards (Urban Heat: the three barriers). */
.cs-barriers { gap: 24px; margin-top: 80px; }
.cs-barrier {
  box-sizing: border-box;
  background: var(--color-surface-slot);
  border-top: 2px solid var(--color-accent);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.cs-barrier__text {
  margin: 0;
  font-size: var(--text-h4);
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--color-text-strong);
  text-wrap: pretty;
}

/* Objective — the one large statement. */
.cs-objective { padding: var(--space-16) 0; }
.cs-objective__quote {
  margin: var(--space-9) 0 0;
  font-size: 48px;
  line-height: 1.1;
  letter-spacing: var(--tracking-heading);
  color: var(--color-text-strong);
  text-wrap: balance;
}
.cs-objective__quote em { font-style: normal; color: var(--color-accent); }
.cs-objective .prose { margin-top: 24px; max-width: 100%; }

.cs-steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 24px; }

/* Click-to-enlarge image + its full-screen view (built by case-study.js). */
.cs-zoom {
  display: block;
  width: 100%;
  padding: 0;
  background: none;
  border: var(--border-hairline);
  border-radius: var(--radius-card);
  overflow: hidden;
  cursor: zoom-in;
}
.cs-zoom img { width: 100%; height: auto; display: block; }
.cs-zoom:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 3px; }
.cs-zoom__hint { color: var(--color-accent); }
.cs-zoom + .figcaption { max-width: none; }   /* caption runs the full width of the image */

.cs-lightbox {
  position: fixed;
  inset: 0;
  z-index: 40;
  box-sizing: border-box;
  display: flex;
  padding: 72px 40px 40px;
  background: rgba(13, 13, 14, 0.96);
  overflow: auto;
  cursor: zoom-out;
}
.cs-lightbox img {
  display: block;
  margin: auto;
  width: 100%;
  max-width: 100%;
  max-height: 100%;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-card);
  cursor: default;
}
.cs-lightbox__close {
  position: fixed;
  top: 24px; right: 32px;
  width: 44px; height: 44px;
  border-radius: var(--radius-pill);
  border: var(--border-avatar);
  background: var(--color-surface-card);
  color: var(--color-text-strong);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.cs-lightbox__close:hover { background: #1F1F24; }
.cs-lightbox__close:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 3px; }

/* Design question block */
.cs-question {
  margin: var(--space-6) 0 0;
  font-size: var(--text-h3);
  line-height: 1.15;
  font-weight: var(--weight-regular);
  letter-spacing: var(--tracking-title);
  color: var(--color-text-strong);
  max-width: 30ch;
  text-wrap: pretty;
}
.cs-question + .cs-stack { margin-top: 24px; }
.cs-columns {
  margin-top: 32px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-5) var(--space-12);
  align-items: start;
}
.cs-columns .prose { max-width: none; }
.cs-feature {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-14);
  align-items: start;
}
.cs-feature .prose { max-width: 56ch; }
.cs-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  font-size: var(--text-body);
  line-height: var(--leading-loose);
  color: var(--color-text-body);
  max-width: 56ch;
}
.cs-list strong { font-weight: var(--weight-regular); color: var(--color-text-strong); }

/* "See all +" row that opens a panel below it. */
.cs-disclosure {
  box-sizing: border-box;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: var(--space-5) 0;
  background: none;
  border: 0;
  border-top: var(--border-hairline);
  border-bottom: var(--border-hairline);
  cursor: pointer;
  text-align: left;
  font-family: var(--font-sans);
  font-size: var(--text-body-sm);
  color: var(--color-text-strong);
}
.cs-disclosure:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 3px; }
.cs-disclosure__action { flex: 0 0 auto; }
.cs-disclosure[aria-expanded="true"] .cs-disclosure__more,
.cs-disclosure[aria-expanded="false"] .cs-disclosure__less { display: none; }
.cs-disclosure__panel {
  margin-top: var(--space-11);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-11) var(--space-14);
  align-items: start;
}
.cs-disclosure__panel[hidden] { display: none; }
.cs-layers__label { padding-bottom: 6px; border-bottom: var(--border-hairline); }
.cs-disclosure__panel .numbered-row { padding: 16px 0; }
.numbered-row__body { display: flex; flex-direction: column; gap: 5px; }
.numbered-row__title { font-size: var(--text-body-sm); color: var(--color-text-strong); }
.numbered-row__detail { font-size: var(--text-ui-sm); line-height: var(--leading-normal); color: var(--color-text-muted); }

/* Image strip — a row of captioned images. Each figure spans two shared grid
   rows (image, caption) so captions line up even when images differ in height. */
.cs-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: var(--space-4) 16px;
  align-items: start;
}
.cs-strip--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: var(--space-6); }
.cs-strip--6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.cs-strip > figure {
  margin: 0;
  display: grid;
  grid-template-rows: subgrid;
  grid-row: span 2;
  row-gap: var(--space-4);
}
.cs-span-2 { grid-column: span 2; }
.cs-span-3 { grid-column: span 3; }
.cs-strip--feature { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-12) 24px; margin-top: 24px; }
.cs-strip--feature > figure { display: flex; flex-direction: column; gap: var(--space-5); grid-row: auto; }
.cs-strip__text {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  font-size: var(--text-body);
  line-height: var(--leading-loose);
  color: var(--color-text-body);
  text-wrap: pretty;
}

.cs-caption { display: flex; flex-direction: column; gap: 6px; padding-top: var(--space-4); }
.cs-caption--rule { border-top: var(--border-hairline); }
.cs-caption__label {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: var(--text-eyebrow);
  letter-spacing: var(--tracking-mono);
  text-transform: uppercase;
  color: var(--color-text-strong);
}
.cs-caption__n { color: var(--color-accent); }
.cs-caption__live { color: var(--color-live); }
.cs-caption__muted { color: var(--color-text-muted); }
.cs-caption__text {
  font-size: var(--text-ui-sm);
  line-height: var(--leading-normal);
  color: var(--color-text-muted);
  text-wrap: pretty;
}

/* Looping video with a pause/play button. */
.cs-video-figure { margin: 0; display: flex; flex-direction: column; gap: var(--space-4); }
.cs-video {
  position: relative;
  border-radius: var(--radius-card);
  overflow: hidden;
  background: var(--color-surface-slot);
}
.cs-video video { width: 100%; height: auto; display: block; }
.cs-video__toggle {
  position: absolute;
  right: 12px; bottom: 12px;
  width: 32px; height: 32px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(13, 13, 14, 0.72);
  border: var(--border-hairline);
  border-radius: var(--radius-card);
  color: var(--color-text-strong);
  cursor: pointer;
}
.cs-video__toggle:hover { background: rgba(13, 13, 14, 0.9); }
.cs-video__toggle:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.cs-video__toggle svg { width: 12px; height: 12px; }
.cs-video .cs-video__play,
.cs-video.is-paused .cs-video__pause { display: none; }
.cs-video.is-paused .cs-video__play { display: block; }

/* Spacing between blocks inside one section. */
.cs-gap-48 { margin-top: var(--space-12); }
.cs-gap-64 { margin-top: var(--space-14); }
.cs-gap-90 { margin-top: 90px; }
.cs-gap-96 { margin-top: var(--space-15); }
.cs-strip-label { padding-bottom: 6px; margin-bottom: 32px; }

.cs-outcome .prose + .prose { margin-top: var(--space-5); }
.cs-outcome .prose:nth-of-type(2) { margin-top: 24px; }
.cs-reflection__body {
  margin: 0;
  font-size: var(--text-body-sm);
  line-height: var(--leading-relaxed);
  color: var(--color-text-body);
  text-wrap: pretty;
}

/* Next case study — closing link. */
.cs-next-section { padding-top: var(--section-gap); border-top: var(--border-hairline); }
.cs-next { display: flex; flex-direction: column; gap: var(--space-4); color: var(--color-text-strong); }
.cs-next:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 6px; }
.cs-next__label {
  font-family: var(--font-mono);
  font-size: var(--text-ui-sm);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}
.cs-next__title {
  display: flex;
  align-items: baseline;
  gap: 16px;
  font-size: var(--text-h2);
  line-height: 1.1;
  letter-spacing: var(--tracking-heading);
  color: var(--color-text-strong);
}
.cs-next:hover .cs-next__title { color: var(--color-accent); }
.cs-next__arrow { color: var(--color-accent); }

/* Section rail — fixed list of in-page links at the left edge, on every case
   study. Each page writes its own list of links; the look and behavior are
   shared. Hidden until the first section scrolls into view (data-rail="1", set
   by case-study.js), and never shown below 1280px where there's no margin
   for it.
     1280–1379px  ticks only; hover to reveal the labels
     1380–1539px  ticks + the current section's short name
     1540px+      full labels always visible                                  */
.cs-rail {
  --rail-content-start: calc(max(0px, (100vw - var(--page-max)) / 2) + var(--page-gutter));
  position: fixed;
  top: 50%;
  left: max(4px, calc(var(--rail-content-start) - 52px));
  z-index: 15;
  transform: translateY(-50%);
  box-sizing: border-box;
  display: none;
  flex-direction: column;
  gap: 2px;
  padding: 10px 18px 10px 10px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-card);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--dur-fast) var(--ease), visibility 0s linear var(--dur-fast),
    background-color 200ms var(--ease), border-color 200ms var(--ease);
}
.cs-rail[data-rail="1"] { opacity: 1; visibility: visible; transition-delay: 0s; }
.is-gate-locked .cs-rail { display: none; }

.cs-rail a {
  min-height: 28px;
  display: flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: var(--text-eyebrow);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--color-text-body);
}
.cs-rail a::before {            /* the tick */
  content: "";
  flex: 0 0 auto;
  width: 14px;
  height: 1px;
  margin-right: 26px;
  background: #6B6B70;
  transition: width 200ms var(--ease), margin-right 200ms var(--ease), background-color 200ms var(--ease);
}
.cs-rail a:hover { color: var(--color-text-strong); }
.cs-rail a:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.cs-rail a[aria-current] { color: var(--color-accent); font-size: var(--text-meta); font-weight: var(--weight-medium); }
.cs-rail a[aria-current]::before { width: 28px; height: 2px; margin-right: 12px; background: var(--color-accent); }

/* Labels are visually hidden (still read by screen readers) until revealed. */
.cs-rail a > span {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.cs-rail:hover,
.cs-rail:has(a:focus-visible) { background: var(--color-bg); border-color: rgba(255, 255, 255, 0.09); }
.cs-rail:hover a > span,
.cs-rail:has(a:focus-visible) a > span {
  position: static;
  width: auto; height: auto;
  overflow: visible;
  clip-path: none;
}

@media (min-width: 1280px) {
  .cs-rail { display: flex; }
}
@media (min-width: 1380px) and (max-width: 1539px) {
  .cs-rail { left: max(4px, calc(var(--rail-content-start) - 104px)); }
  .cs-rail:not(:hover):not(:has(a:focus-visible)) a[aria-current]::after {
    content: attr(data-short);
    content: attr(data-short) / "";
    font-size: var(--text-eyebrow);
    font-weight: var(--weight-regular);
  }
}
@media (min-width: 1540px) {
  .cs-rail { left: max(4px, calc(var(--rail-content-start) - 202px)); }
  .cs-rail,
  .cs-rail:hover,
  .cs-rail:has(a:focus-visible) { background: transparent; border-color: transparent; }
  .cs-rail a > span {
    position: static;
    width: auto; height: auto;
    overflow: visible;
    clip-path: none;
  }
}

/* ---------- 07. RESPONSIVE ---------------------------------------------- */
/* The pages branch on window.innerWidth < 900 in JS; CSS equivalent: */
@media (max-width: 899px) {
  .shell,
  .site-header,
  .site-footer { padding-left: var(--page-gutter-narrow); padding-right: var(--page-gutter-narrow); }
  .site-footer { flex-direction: column; align-items: flex-start; }
  .page-main { padding: var(--header-top-offset-narrow) var(--page-gutter-narrow) 0; }
  .page-main--standalone { padding-top: 0; }
  .section + .section { margin-top: var(--section-gap-narrow); }
  .section--footer-gap { margin-bottom: calc(var(--section-gap-narrow) - var(--space-12)); }
  /* hero/h2/h3 scale fluidly from the :root tokens — no override needed here. */
  .section-head,
  .role-row,
  .grid-2,
  .grid-3,
  .grid-split { grid-template-columns: minmax(0, 1fr); }
  .role-row { gap: 10px; }
  .meta-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project-card { max-width: 100%; }
  .polaroid-stack { width: 270px; height: 330px; }

  .about-hero { grid-template-columns: minmax(0, 1fr); gap: 56px; }
  .about-hero__photos { padding-right: 0; justify-self: center; }
  .skills-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }

  .home-grid { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .home-grid__hero {
    position: static;
    min-height: auto;
    padding: var(--header-top-offset-narrow) 0 24px;
  }
  .home-grid__hero .hero-title,
  .home-grid__hero .hero-sub { max-width: 100%; }
  .home-grid__cards { padding: 0 0 72px; }

  .work-hero { padding-bottom: var(--space-11); }
  .work-hero .hero-title { max-width: 100%; }
  .work-grid { grid-template-columns: minmax(0, 1fr); padding: 0 0 72px; }

  /* Case study */
  .cs-objective { padding: var(--space-14) 0; }
  .cs-objective__quote { font-size: 28px; }
  .cs-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 20px; }
  .cs-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cs-strip--3,
  .cs-strip--6,
  .cs-strip--feature,
  .cs-columns,
  .cs-feature,
  .cs-disclosure__panel { grid-template-columns: minmax(0, 1fr); }
  .cs-feature { gap: var(--space-12); }
  .cs-span-2,
  .cs-span-3 { grid-column: 1 / -1; }
  .cs-strip .cs-caption { padding-bottom: var(--space-10); }
  .cs-next-section { padding-top: var(--section-gap-narrow); }
  .cs-lightbox { padding: 72px 16px 24px; }
  .cs-lightbox__close { right: 16px; }
}
