/* ==========================================================================
   Jayden Yu — portfolio
   One typeface. Italic is the only emphasis. Whitespace is the structure.
   ========================================================================== */

:root {
  /* ---- ground ---- */
  --ground:          #ffffff;
  --ground-inverse:  #0c0c0c;
  --ground-overlay:  #f5f5f5;

  /* ---- ink ---- */
  --ink:             #000000;
  --ink-display:     #0c0c0c;
  --ink-inverse:     #ffffff;

  /* Greys are AA-checked against the surface each one actually sits on.
     The reference's #7a7a7a / #999 / #c4c4c4 all fail on white (4.29 / 2.85 /
     1.74), so each is nudged to the nearest passing value. */
  --muted-strong:    #737373;   /* 4.74:1 on white  — meta lines, labels */
  --muted:           #d4d4d4;   /* 4.93:1 on scrim  — hover category only */
  --muted-soft:      #737373;   /* 4.74:1 on white  — about subhead */

  /* ---- rules ---- */
  --rule:            #111111;
  --rule-inverse:    #ffffff;

  /* ---- accent: coral. #fb8787 is decorative only (2.36:1 on white).
         --accent-text is the AA-safe cut used for any coloured text. ---- */
  --accent:          #fb8787;
  --accent-text:     #b34a4a;

  --scrim:           rgba(0, 0, 0, 0.6);

  /* ---- cover grounds, sampled from the project artwork ---- */
  --cover-inurra:    #cedde0;
  --cover-wellbeing: #fdc94a;

  /* ---- type ---- */
  --font: "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI Variable",
          "Segoe UI", Helvetica, Arial, sans-serif;

  /* Scale. The gap between display and body is the hierarchy — do not fill it. */
  --t-display-1: 108px;
  --t-display-2: 98px;
  --t-display-3: clamp(32px, 4.4vw, 64px);
  --t-cover:     clamp(40px, 5.6vw, 80px);
  --t-title-1:   clamp(36px, 3.2vw, 42px);
  --t-title-2:   clamp(28px, 2.8vw, 36px);
  --t-heading:   24px;
  --t-body-lg:   clamp(18px, 1.8vw, 24px);
  --t-body-md:   21px;
  --t-body:      18px;
  --t-body-sm:   16px;
  --t-caption:   14px;

  /* ---- space ---- */
  --s-1: 4px;   --s-2: 8px;   --s-3: 16px;  --s-4: 24px;  --s-5: 32px;
  --s-6: 40px;  --s-7: 48px;  --s-8: 64px;  --s-9: 80px;  --s-10: 124px;
  --s-11: 140px; --s-12: 200px; --s-13: 224px;

  /* ---- measure ---- */
  --measure-wide:   880px;
  --measure:        760px;
  --measure-narrow: 676px;

  /* ---- motion ---- */
  --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
  --ease-power3:   cubic-bezier(0.645, 0.045, 0.355, 1);
  --ease-circ:     cubic-bezier(0.785, 0.135, 0.15, 0.86);

  --nav-h: 80px;
}

/* ==========================================================================
   reset
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 400 var(--t-body) / 30px var(--font);
  letter-spacing: 0;
  text-transform: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4, p, figure, blockquote, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
/* so every `.x img` rule below still applies to a srcset image */
picture { display: contents; }

h1, h2 { font-weight: 700; letter-spacing: 0; }
h3, h4 { font-weight: 600; letter-spacing: 0; }

a { color: var(--accent-text); text-decoration: none; }
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent-text);
  outline-offset: 3px;
}

em, i { font-style: italic; }

::selection { background: var(--ink); color: var(--ground); }

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

.skip-link {
  position: absolute; top: -100px; left: var(--s-4); z-index: 200;
  background: var(--ground); color: var(--ink);
  padding: var(--s-3) var(--s-4);
  font-size: var(--t-body-sm); font-weight: 600;
  border: 2px solid var(--ink);
}
.skip-link:focus { top: var(--s-3); }

/* ==========================================================================
   layout
   ========================================================================== */

.container {
  width: 100%;
  max-width: 1452px;
  margin-inline: auto;
  padding-inline: var(--s-8);
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 30px;
}

.col-6  { grid-column: span 6; }
.col-4  { grid-column: span 4; }
.col-12 { grid-column: span 12; }

.measure        { max-width: var(--measure); }
.measure-wide   { max-width: var(--measure-wide); }
.measure-narrow { max-width: var(--measure-narrow); }
.measure-center { margin-inline: auto; }

/* rules — the only dividers on the site */
.rule {
  height: 1px; border: 0;
  background: var(--rule);
  margin-block: var(--s-4);
}
.rule-heavy {
  height: 2px; border: 0;
  background: var(--ink);
  margin: 0;
}

/* ==========================================================================
   nav
   ========================================================================== */

.nav {
  position: sticky; top: 0; z-index: 120;
  height: var(--nav-h);
  background: var(--ground-inverse);
  transition: background 0.4s var(--ease-circ);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 100%;
}
.nav-mark {
  font-size: 24px; font-weight: 600; letter-spacing: -0.5px;
  color: var(--ink-inverse); text-decoration: none;
}
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a {
  position: relative;
  font-size: var(--t-caption); font-weight: 500;
  color: var(--ink-inverse);
  padding-block: var(--s-4) var(--s-1);
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 0; height: 1px; background: var(--accent);
  transition: width 0.2s var(--ease-out-expo);
}
.nav-links a:hover::after,
.nav-links a:focus-visible::after { width: 100%; }
.nav-links a[aria-current] { font-weight: 600; }
.nav-links a[aria-current]::after { width: 100%; }

/* transparent over a full-bleed cover, fills on scroll */
.nav.over-cover { background: transparent; }
.nav.over-cover.filled { background: var(--ground-inverse); }

/* White chrome vanishes on a pale cover, so a light cover flips it to ink
   until the bar fills. */
.nav.over-cover.cover-light:not(.filled) .nav-mark,
.nav.over-cover.cover-light:not(.filled) .nav-links > a { color: var(--ink); }
.nav.over-cover.cover-light:not(.filled) .nav-links > a::after { background: var(--accent-text); }
.nav.over-cover.cover-light:not(.filled) .nav-toggle i,
.nav.over-cover.cover-light:not(.filled) .nav-toggle i::before,
.nav.over-cover.cover-light:not(.filled) .nav-toggle i::after { background: var(--ink); }

.nav-toggle { display: none; }

/* ==========================================================================
   hero — home
   ========================================================================== */

.hero {
  padding-block: var(--s-10) var(--s-9);
  text-align: center;
}
.hero-name {
  font-size: var(--t-title-1); font-weight: 600; line-height: 1.2;
}
.hero-role {
  font-size: var(--t-body-md); font-style: italic; line-height: 40px;
  font-weight: 400;
}
.hero-copy {
  margin-top: var(--s-6);
  max-width: var(--measure-wide); margin-inline: auto;
}
.hero-copy p {
  font-size: var(--t-body-lg); line-height: 1.67;
}
.hero-copy p + p { margin-top: var(--s-4); }

/* ==========================================================================
   work grid — bare squares, everything lives in the hover
   ========================================================================== */

.work-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
  padding-bottom: var(--s-9);
}

.thumb {
  position: relative; display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--ground-overlay);
  color: var(--ink-inverse);
  text-decoration: none;
}
.thumb img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.3s ease;
}
.thumb::after {
  content: ""; position: absolute; inset: 0;
  background: var(--scrim);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.thumb-meta {
  position: absolute; left: var(--s-6); bottom: var(--s-6); z-index: 2;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.thumb-meta .t {
  display: block;
  font-size: var(--t-heading); font-weight: 600; line-height: 1.25;
  color: var(--ink-inverse);
}
.thumb-meta .c {
  display: block; margin-top: var(--s-1);
  font-size: var(--t-body); color: var(--muted);
}
.thumb:hover img,
.thumb:focus-visible img { transform: scale(1.15); }
.thumb:hover::after,
.thumb:focus-visible::after { opacity: 1; }
.thumb:hover .thumb-meta,
.thumb:focus-visible .thumb-meta { opacity: 1; transform: translateY(0); }

/* the meta is the accessible name too, so it must be readable without hover
   for anyone who never triggers it */
@media (hover: none) {
  .thumb::after { opacity: 1; }
  .thumb-meta { opacity: 1; transform: none; }
}

/* ==========================================================================
   statement — the loudest thing on the page
   ========================================================================== */

/* The inset is a margin, not padding — overriding the container's
   padding-left here drops the gutter entirely on narrow screens. */
.statement { padding-block: var(--s-9); }
.statement p { margin-left: var(--s-6); }
.statement p {
  font-size: var(--t-display-2);
  font-weight: 500;
  color: var(--ink-display);
  line-height: 1.34;
  max-width: 15ch;
}
.statement p:last-child { line-height: 1.1; }


/* ==========================================================================
   page headline — about / resume
   ========================================================================== */

.page-head {
  padding-top: var(--s-10);
}
.page-head h1 {
  font-size: var(--t-display-1);
  font-weight: 700;
  line-height: 1;
}
.page-head-row {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: var(--s-8); flex-wrap: wrap;
}

.print-name { display: none; }
.resume-role {
  margin-top: var(--s-4);
  font-size: var(--t-body-md); font-style: italic; line-height: 40px;
}
.resume-summary { margin-top: var(--s-4); }
.resume-summary p { font-size: var(--t-body-sm); line-height: 27px; }
.resume-summary p + p { margin-top: var(--s-3); }
.resume-contact {
  margin-top: var(--s-5);
  font-size: var(--t-body-sm); line-height: 27px; color: var(--muted-strong);
}
.resume-contact a { color: var(--ink); }

/* section label bracketed by two rules — the reference's table-header device */
.section-label {
  font-size: var(--t-body); font-style: italic; font-weight: 400;
  letter-spacing: 0.8px;
}

/* ==========================================================================
   buttons — fill grows outward from the centre, 700ms
   ========================================================================== */

.btn {
  position: relative; display: inline-block;
  padding: var(--s-3) var(--s-5);
  border: 2px solid var(--rule);
  border-radius: 1px;
  background: transparent;
  font: 600 var(--t-body-sm) / 1.4 var(--font);
  color: var(--ink);
  cursor: pointer;
  overflow: hidden;
  transition: color 0.7s var(--ease-out-expo), border-color 0.7s var(--ease-out-expo);
}
.btn::after {
  content: ""; position: absolute; z-index: -1;
  left: 50%; top: 0; bottom: 0;
  width: 0;
  transform: translateX(-50%);
  background: var(--ink);
  transition: width 0.7s var(--ease-out-expo);
}
.btn span { position: relative; z-index: 1; }
.btn:hover { color: var(--ink-inverse); border-color: var(--ink); }
.btn:hover::after { width: 100%; }
.btn { isolation: isolate; }

.btn-print { display: none; }
.js .btn-print { display: inline-block; }

.btn-inverse {
  border-color: var(--rule-inverse);
  color: var(--ink-inverse);
}
.btn-inverse::after { background: var(--ground); }
.btn-inverse:hover { color: var(--ink); border-color: var(--ground); }

/* ==========================================================================
   about
   ========================================================================== */

.about-body { padding-bottom: var(--s-12); }
.about-portrait { padding-top: var(--s-10); }
.about-portrait img {
  width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 20%;
}
.about-text { padding-top: var(--s-11); }
.about-greeting {
  text-align: center;
  font-size: clamp(32px, 3.6vw, 48px); font-weight: 700; line-height: 1.1;
}
.about-sub {
  text-align: center; margin-top: var(--s-2);
  font-size: var(--t-body-md); color: var(--muted-soft);
}
.about-prose {
  margin-top: var(--s-7);
  padding-inline: var(--s-6);
}
.about-prose p + p { margin-top: var(--s-4); }

/* ==========================================================================
   resume ledger — meta line is LARGER than the prose it labels
   ========================================================================== */

.entry { padding-top: var(--s-9); }
.entry-role {
  font-size: var(--t-heading); font-weight: 700; line-height: 40px;
}
.entry-meta {
  font-size: var(--t-body); font-style: italic; color: var(--muted-strong);
  line-height: 30px;
}
.entry-body { max-width: var(--measure); }
.entry-body p + p { margin-top: var(--s-3); }
.entry-body p { font-size: var(--t-body-sm); line-height: 27px; }

.skill-group + .skill-group { margin-top: var(--s-4); }
.skill-group dt {
  font-size: var(--t-body-sm); font-weight: 600; line-height: 27px;
}
.skill-group dd {
  margin: 0;
  font-size: var(--t-body-sm); line-height: 27px; color: var(--ink);
}

/* ==========================================================================
   case study
   ========================================================================== */

.cover {
  min-height: 100vh;
  margin-top: calc(-1 * var(--nav-h));
  padding-top: var(--nav-h);
  display: flex; align-items: center;
}
.cover-inurra    { background: var(--cover-inurra); }
.cover-wellbeing { background: var(--cover-wellbeing); }

.cover-grid {
  width: 100%;
  align-items: center;
  padding-block: var(--s-9);
}
.cover-text { grid-column: span 6; }
.cover-art  { grid-column: span 6; }
.cover-art img { width: 100%; }

.cover h1 {
  font-size: var(--t-cover);
  font-weight: 700; line-height: 1.15; letter-spacing: -0.79px;
  color: var(--ink);
}
.cover-descriptor {
  margin-top: var(--s-3);
  font-size: var(--t-body-lg); line-height: 1.5;
  color: var(--ink);
  max-width: 26ch;
}
.cover-links { margin-top: var(--s-7); display: flex; gap: var(--s-3); flex-wrap: wrap; }

.eyebrow {
  font-size: var(--t-body);
  font-weight: 400;
  letter-spacing: 0.8px;
}

.cs-section { padding-top: var(--s-10); }
.cs-section > h2 {
  font-size: var(--t-title-2);
  font-weight: 700; line-height: 1.25;
  margin-bottom: var(--s-4);
}
.cs-section p { font-size: var(--t-body-sm); line-height: 27px; }
.cs-section p + p { margin-top: var(--s-4); }

/* These sit inside .cs-section, whose `p` and `> h2` base rules would
   otherwise out-specify them and flatten everything to body size. */
.cs-section h2.cs-overview-name {
  font-size: var(--t-display-3);
  font-weight: 700; line-height: 1.15;
  margin-block: var(--s-4) var(--s-5);
}
.cs-section p.eyebrow    { font-size: var(--t-body); line-height: 30px; }
.cs-meta {
  margin-top: var(--s-7);
  align-items: end;
}
.cs-meta .v { font-size: var(--t-body); line-height: 30px; }
.cs-meta .right { text-align: right; }
.cs-meta-note {
  margin-top: var(--s-3);
  font-size: var(--t-body); font-style: italic; color: var(--muted-strong);
  line-height: 30px;
}

/* three-up cards — the only place the site groups content */
.cards { margin-top: var(--s-7); }
.card h3 {
  font-size: var(--t-heading); font-weight: 600; line-height: 1.3;
  margin-bottom: var(--s-2);
}
.card p { font-size: var(--t-body-sm); line-height: 27px; }
.card-num {
  display: block; margin-bottom: var(--s-3);
  font-size: var(--t-body); color: var(--muted-strong);
}

/* my-role and future-metrics lists */
.role-list, .metric-list { margin-top: var(--s-4); }
.role-list li, .metric-list li {
  position: relative;
  padding-left: var(--s-4);
  font-size: var(--t-body-sm); line-height: 27px;
}
.role-list li + li, .metric-list li + li { margin-top: var(--s-2); }
.role-list li::before, .metric-list li::before {
  content: ""; position: absolute; left: 0; top: 12px;
  width: 6px; height: 1px; background: var(--ink);
}

/* impact, split three ways */
.impact { margin-top: var(--s-7); }
.impact-block { padding-top: var(--s-6); border-top: 1px solid var(--rule); }
.impact-block + .impact-block { margin-top: var(--s-7); }
.impact-block h3 {
  font-size: var(--t-heading); font-weight: 600; line-height: 1.3;
  margin-bottom: var(--s-3);
}
.impact-block p { font-size: var(--t-body-sm); line-height: 27px; }
.impact-block p + p { margin-top: var(--s-3); }
.impact-block .metric-list { columns: 2; column-gap: var(--s-8); margin-top: var(--s-3); }
.impact-block .metric-list li { break-inside: avoid; }

@media (max-width: 767px) {
  .impact-block .metric-list { columns: 1; }
}

/* research quotes — no card, no quote mark, just a rule and a voice */
.quotes { margin-top: var(--s-7); }
.quote { margin: 0; padding-top: var(--s-4); border-top: 1px solid var(--rule); }
.quote blockquote { margin: 0; }
.quote p {
  font-size: var(--t-body); font-style: italic; line-height: 30px;
}
.quote figcaption {
  margin-top: var(--s-3);
  font-size: var(--t-body-sm); color: var(--muted-strong);
}

/* outcome metrics */
.metrics { margin-top: var(--s-6); margin-bottom: var(--s-8); }
.metric { padding-top: var(--s-4); border-top: 2px solid var(--ink); }
.metric strong {
  display: block;
  font-size: clamp(28px, 3.2vw, 44px); font-weight: 700; line-height: 1.1;
}
.metric span {
  display: block; margin-top: var(--s-2);
  font-size: var(--t-body-sm); line-height: 24px; color: var(--muted-strong);
}

/* a numbered run of decisions / trade-offs */
.run { margin-top: var(--s-7); }
.run-item { padding-top: var(--s-6); }
.run-item + .run-item { border-top: 1px solid var(--rule); }
.run-item h3 {
  font-size: var(--t-heading); font-weight: 600; line-height: 1.3;
}
.run-item .lead {
  font-size: var(--t-body); font-style: italic; color: var(--muted-strong);
  line-height: 30px;
}
.run-item .body { max-width: var(--measure); }
.run-item .body p { font-size: var(--t-body-sm); line-height: 27px; }

/* the honest aside — the strongest narrative device on the reference site */
.aside-block { margin-top: var(--s-7); max-width: var(--measure); }
.aside-block + .aside-block { margin-top: var(--s-6); }
.aside-label {
  font-size: var(--t-body); font-weight: 600; line-height: 30px;
}
.aside-block p { font-size: var(--t-body-sm); line-height: 27px; }

/* flow diagram — plain type, no chrome */
.flow {
  margin-top: var(--s-9);
  display: flex; flex-wrap: wrap; align-items: stretch;
  gap: var(--s-3);
}
.flow-step {
  flex: 1 1 150px;
  padding-top: var(--s-3);
  border-top: 2px solid var(--ink);
}
.flow-step .n {
  display: block;
  font-size: var(--t-caption); color: var(--muted-strong);
}
.flow-step .l {
  display: block; margin-top: var(--s-1);
  font-size: var(--t-body-sm); font-weight: 600; line-height: 24px;
}
.flow-step .d {
  display: block; margin-top: var(--s-2);
  font-size: var(--t-body-sm); line-height: 24px; color: var(--muted-strong);
}
.flow-step.is-gate { border-top-color: var(--accent); }
.flow-note {
  margin-top: var(--s-4);
  font-size: var(--t-body); font-style: italic; color: var(--muted-strong);
  line-height: 30px;
}



/* takeaways */
.takeaways { margin-top: var(--s-4); max-width: var(--measure-narrow); }
.takeaways li {
  padding-top: var(--s-4);
  font-size: var(--t-body-sm); line-height: 27px;
}
.takeaways li + li { border-top: 1px solid var(--rule); margin-top: var(--s-4); }


/* next project */
.next-band {
  display: block;
  margin-top: var(--s-13);
  padding-block: var(--s-9);
  text-decoration: none; color: var(--ink);
  border-top: 2px solid var(--ink);
}
.next-band .k {
  font-size: var(--t-body); font-style: italic; color: var(--muted-strong);
}
.next-band .n {
  display: block; margin-top: var(--s-2);
  font-size: var(--t-display-3); font-weight: 700; line-height: 1.15;
  transition: transform 0.5s var(--ease-out-expo);
}
.next-band:hover .n { transform: translateX(16px); }

/* ==========================================================================
   footer
   ========================================================================== */

.site-footer {
  margin-top: var(--s-13);
  background: var(--ground-inverse);
  color: var(--ink-inverse);
}
.footer-a {
  padding-block: var(--s-4);
  align-items: center;
}
.footer-mark { grid-column: 1 / span 3; font-size: var(--t-body); font-weight: 600; }
.footer-cta  { grid-column: 8 / span 3; text-align: right; font-size: var(--t-body); }
.footer-mail { grid-column: 11 / span 2; text-align: right; font-size: var(--t-body); }
.footer-mail a { color: var(--ink-inverse); text-decoration: underline; text-underline-offset: 4px; }

.footer-seam {
  height: 1px; border: 0; background: var(--rule-inverse);
  margin: var(--s-4) 0 0;
}
.footer-b { padding-block: 0 var(--s-6); }
.footer-b nav { grid-column: 1 / span 11; display: grid; grid-template-columns: repeat(11, 1fr); }
.footer-b nav a:nth-child(1) { grid-column: 1; }
.footer-b nav a:nth-child(2) { grid-column: 2; }
.footer-b nav a:nth-child(3) { grid-column: 3; }
.footer-b .social {
  grid-column: 10 / span 3;
  display: flex; justify-content: flex-end; gap: var(--s-4);
  white-space: nowrap;
}
.footer-b a {
  font-size: var(--t-body); color: var(--ink-inverse);
}
.footer-b nav a[aria-current] {
  font-weight: 600; text-decoration: underline; text-underline-offset: 4px;
}

/* ==========================================================================
   scroll reveal — the house move is a 60px slide in from the left
   ========================================================================== */

/* Scoped to .js so the page is fully readable with JavaScript off, blocked,
   or broken. Without the class the start state is simply never applied. */
.js .reveal {
  opacity: 0;
  transform: translateX(-60px);
  transition: opacity 1.2s var(--ease-power3), transform 1.2s var(--ease-power3);
}
/* only hint the compositor while an element still has something to animate */
.js .reveal:not(.in) { will-change: opacity, transform; }
.js .reveal.rise { transform: translateY(60px); }
.js .reveal.fade { transform: none; }
.js .reveal.in { opacity: 1; transform: none; }

.reveal[data-delay="1"] { transition-delay: 0.07s; }
.reveal[data-delay="2"] { transition-delay: 0.14s; }
.reveal[data-delay="3"] { transition-delay: 0.21s; }

/* ==========================================================================
   custom cursor — fine pointers only
   ========================================================================== */

.cursor {
  position: fixed; top: 0; left: 0; z-index: 300;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--accent);
  pointer-events: none;
  display: grid; place-items: center;
  transform: translate3d(-100px, -100px, 0) translate(-50%, -50%);
  transition: width 0.3s var(--ease-out-expo), height 0.3s var(--ease-out-expo),
              background 0.3s var(--ease-out-expo);
  mix-blend-mode: normal;
}
.cursor span {
  font-size: 12px; letter-spacing: 1px; text-transform: uppercase;
  color: var(--ink-inverse); opacity: 0;
  transition: opacity 0.2s ease;
}
.cursor.on-link { width: 24px; height: 24px; }
.cursor.on-thumb { width: 76px; height: 76px; background: rgba(12, 12, 12, 0.82); }
.cursor.on-thumb span { opacity: 1; }

@media (hover: none), (pointer: coarse) {
  .cursor { display: none; }
}

/* ==========================================================================
   responsive
   ========================================================================== */

@media (max-width: 1169px) {
  .container { padding-inline: var(--s-6); }
  /* Discrete steps, not a continuous clamp: display type steps down at the
     breakpoints and then holds. It is never made polite. */
  :root { --nav-h: 72px; --t-display-1: 80px; }
}

@media (max-width: 991px) {
  :root { --t-display-2: 80px; }
}

@media (max-width: 991px) {
  .cover-text, .cover-art { grid-column: span 12; }
  .cover-art { margin-top: var(--s-7); }
  .cover-art img { max-width: 460px; margin-inline: auto; }
  .cs-meta .right { text-align: left; }
  .about-portrait { padding-top: 0; }
  .about-text { padding-top: var(--s-7); }
}

@media (max-width: 767px) {
  .container { padding-inline: var(--s-4); }
  :root { --t-display-2: 72px; }

  /* A 12-column track with a 30-40px gutter needs ~500px just for the gaps.
     Below this breakpoint every grid collapses to a single column. */
  .grid { grid-template-columns: 1fr; gap: var(--s-6); }
  .col-6, .col-4, .col-12,
  .cover-text, .cover-art,
  .footer-mark, .footer-cta, .footer-mail,
  .footer-b nav, .footer-b .social { grid-column: auto; }

  /* the -60px slide would push full-width blocks past the left edge */
  .js .reveal { transform: translateY(24px); }

  .work-grid { grid-template-columns: 1fr; gap: var(--s-4); }

  .statement p { margin-left: 0; max-width: none; }


  .about-prose { padding-inline: 0; }
  .about-greeting, .about-sub { text-align: left; }

  .footer-mark, .footer-cta, .footer-mail,
  .footer-b nav, .footer-b .social { text-align: left; }
  .footer-a { gap: var(--s-3); }
  .footer-b { gap: var(--s-3); }
  .footer-b .social { display: flex; gap: var(--s-4); }


  /* nav collapses to a full-screen overlay */
  .nav-toggle {
    display: grid; place-items: center;
    width: 44px; height: 44px; margin-right: -10px;
    background: none; border: 0; cursor: pointer;
  }
  .nav-toggle i {
    display: block; position: relative;
    width: 24px; height: 2px; background: var(--ink-inverse);
    transition: background 0.2s ease;
  }
  .nav-toggle i::before, .nav-toggle i::after {
    content: ""; position: absolute; left: 0;
    width: 24px; height: 2px; background: var(--ink-inverse);
    transition: transform 0.3s var(--ease-out-expo), top 0.3s var(--ease-out-expo);
  }
  .nav-toggle i::before { top: -6px; }
  .nav-toggle i::after  { top: 6px; }
  .nav-toggle[aria-expanded="true"] i { background: transparent; }
  .nav-toggle[aria-expanded="true"] i::before { top: 0; transform: rotate(45deg); }
  .nav-toggle[aria-expanded="true"] i::after  { top: 0; transform: rotate(-45deg); }

  .nav-links {
    position: fixed; inset: 0; z-index: 110;
    flex-direction: column; justify-content: center; align-items: center;
    gap: var(--s-6);
    background: var(--ground-overlay);
    opacity: 0; visibility: hidden;
    transition: opacity 0.3s var(--ease-circ), visibility 0.3s;
  }
  .nav-links.open { opacity: 1; visibility: visible; }
  .nav-links a { font-size: var(--t-heading); color: var(--ink); }
  .nav-links a::after { background: var(--accent-text); }

  body.nav-open { overflow: hidden; }
}

@media (max-width: 543px) {
  :root {
    --s-9: 56px; --s-10: 72px; --s-11: 80px; --s-12: 160px; --s-13: 200px;
    --t-body-lg: 16px;
    --t-display-1: 72px; --t-display-2: 48px;
  }
  .cover { min-height: auto; padding-block: var(--s-9); }
  .flow-step { flex-basis: 100%; }
}

/* ==========================================================================
   motion preferences
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .js .reveal { opacity: 1; transform: none; }
  .thumb img { transition: none; }
  .thumb:hover img { transform: none; }
  .cursor { display: none; }
}

/* ==========================================================================
   print — the resume page should print cleanly
   ========================================================================== */

@media print {
  /* The screen page is a wide, airy ledger. Printed as-is it runs six pages,
     so the whole spacing scale is compressed and the type set to document size. */
  :root {
    --s-1: 2px;  --s-2: 3px;  --s-3: 6px;  --s-4: 8px;  --s-5: 10px;
    --s-6: 12px; --s-7: 14px; --s-8: 0;    --s-9: 14px; --s-10: 12px;
    --s-11: 12px; --s-12: 0;  --s-13: 0;
    --t-body: 9.5pt; --t-body-sm: 9pt; --t-body-md: 11pt;
    --t-heading: 11pt; --t-caption: 8pt;
  }

  .nav, .site-footer, .cursor, .btn, .skip-link { display: none !important; }
  .js .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }

  html, body { background: #fff; }
  body { font-size: 9.5pt; line-height: 1.4; }
  .container { padding-inline: 0; max-width: none; }
  .grid { gap: 14px; }

  /* lead with the name, not with the word "Resume." */
  .page-head h1 { display: none; }
  .print-name {
    display: block;
    font-size: 19pt; font-weight: 700; line-height: 1.1; letter-spacing: -0.4px;
  }
  .page-head { padding-top: 0; }
  .resume-role { margin-top: 2px; font-size: 11pt; line-height: 1.3; }
  .resume-summary { margin-top: 8px; max-width: none; }
  .resume-summary p { font-size: 9pt; line-height: 1.42; }
  .resume-contact { margin-top: 8px; font-size: 8.5pt; color: #333; }
  .resume-contact a { text-decoration: none; }

  .rule { margin-block: 6px; background: #999; }
  .section-label { font-size: 9pt; }

  /* narrower label column, and never split an entry across pages */
  .entry { padding-top: 12px; break-inside: avoid; page-break-inside: avoid; }
  .entry > .col-6:first-child { grid-column: span 4; }
  .entry > .col-6:last-child  { grid-column: span 8; }
  .entry-role { font-size: 11pt; line-height: 1.25; }
  .entry-meta { font-size: 8.5pt; line-height: 1.35; }
  .entry-body { max-width: none; }
  .entry-body p { font-size: 9pt; line-height: 1.4; padding-left: 10px; text-indent: -10px; }
  .entry-body p + p { margin-top: 4px; }
  .entry-body p::before { content: "\2022\00a0\00a0"; }
  /* the case-study links are a screen affordance, not resume content */
  .entry-body p:has(> a) { display: none; }

  .skill-group + .skill-group { margin-top: 5px; }
  .skill-group dt, .skill-group dd { font-size: 9pt; line-height: 1.4; }

  section { break-inside: auto; }
  h2, h3 { break-after: avoid; page-break-after: avoid; }
}
}
