/* ==========================================================================
   mckenzienorris.com — stylesheet
   --------------------------------------------------------------------------
   Ported from McKenzie's design artifact (Claude, Sep 2026).
   Design direction is HERS and is reproduced faithfully. What changed in the
   port is mechanical only:
     - 185 inline style attributes  -> token-driven CSS
     - 26 non-standard style-hover  -> real :hover / :focus-visible rules
     - 0 media queries              -> responsive down to 360px
   Colour values, type, spacing and layout intent are unchanged.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Fonts (self-hosted — no third-party request, no Google Fonts CDN)
   Cormorant Garamond + DM Sans, both SIL Open Font License 1.1.
   Only latin + latin-ext subsets are shipped; cyrillic/vietnamese dropped
   to save ~130 KB. Re-add from Google Fonts if ever needed.
   -------------------------------------------------------------------------- */

@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('../fonts/cormorant-garamond-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
    U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
    U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('../fonts/cormorant-garamond-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
    U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F,
    U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 400 500;
  font-display: swap;
  src: url('../fonts/cormorant-garamond-italic-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
    U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
    U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 400 500;
  font-display: swap;
  src: url('../fonts/cormorant-garamond-italic-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
    U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F,
    U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 300 500;
  font-display: swap;
  src: url('../fonts/dm-sans-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
    U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
    U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 300 500;
  font-display: swap;
  src: url('../fonts/dm-sans-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
    U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F,
    U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}

/* --------------------------------------------------------------------------
   2. Design tokens — every value extracted from the artifact
   -------------------------------------------------------------------------- */

:root {
  /* Surfaces */
  --bone:          #efede5;  /* page background */
  --plum:          #4b1328;  /* primary ink + dark panels */
  --plum-deep:     #3a0e1e;  /* panel shadow tone */
  --plum-mid:      #5c3545;  /* body copy on dark panels */
  --plum-soft:     #5a2038;  /* secondary on dark panels */
  --plum-line:     #5a1f35;  /* rules inside dark panels */

  /* Accents */
  --chartreuse:    #e3ff6b;  /* contact CTA + contact section */
  /* Eyebrows, project links, focus rings.
     Swapped to the deeper orange on McKenzie's call, Sep 2026.
     5.25:1 on bone — passes WCAG AA for normal text and non-text UI. */
  --orange:        #b03800;
  /* Original brand orange. 2.84:1 on bone: fails AA for text AND fails the
     3:1 non-text minimum. Safe only on the dark plum panel or on display
     type well above 24px. Do not put it back on the 11px eyebrows. */
  --orange-brand:  #f65802;

  /* Neutrals */
  --brown:         #885f45;  /* secondary text on bone (4.75:1 — passes AA) */
  --brown-soft:    #8a7460;
  --brown-faint:   #7a6554;
  --rule:          #d5cab8;  /* hairline borders */

  /* Image placeholder tints (delete this block once real photos land) */
  --ph-1: #e4d1b5; --ph-2: #e8d9c8; --ph-3: #e2d0be; --ph-4: #d9c4b0;
  --ph-5: #d4c5b5; --ph-6: #ddc9b5; --ph-7: #e8d8c5; --ph-8: #cab89e;

  /* Type */
  --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --sans:  'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Layout */
  --shell:      1248px;   /* max content width */
  --gutter:     48px;     /* horizontal page padding, desktop */
  --nav-h:      64px;
  --section-y:  120px;    /* vertical section rhythm, desktop */

  /* Motion */
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --dur:  0.2s;
}

/* --------------------------------------------------------------------------
   3. Reset + base
   -------------------------------------------------------------------------- */

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-size-adjust: 100%;
}

body {
  background: var(--bone);
  color: var(--plum);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  font-weight: 400;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
ul { list-style: none; }

/* Keyboard focus — visible on every interactive element, both surfaces. */
:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
}
.panel--dark :focus-visible,
.contact :focus-visible {
  outline-color: var(--plum);
}

/* Skip link — first tab stop, hidden until focused. */
.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  padding: 12px 20px;
  background: var(--plum);
  color: var(--bone);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.skip:focus { left: 0; }

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

/* --------------------------------------------------------------------------
   4. Shared primitives
   -------------------------------------------------------------------------- */

.shell {
  max-width: var(--shell);
  margin: 0 auto;
  width: 100%;
  padding-inline: var(--gutter);
}

/* Tracked-out uppercase label used above headings and as meta text. */
.eyebrow {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--orange);
}
.eyebrow--muted { color: var(--brown); letter-spacing: 0.08em; font-size: 12px; }

.meta {
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--brown);
}

/* Section heading — Cormorant, large, tight. */
.section-title {
  font-family: var(--serif);
  font-size: clamp(38px, 4.4vw, 52px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: var(--plum);
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 56px;
}

/* Underlined text link with a trailing glyph. */
.link {
  display: inline-block;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--orange);
  border-bottom: 1px solid currentColor;
  padding-bottom: 3px;
  transition: color var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
.link:hover { color: var(--plum); }

.link--plum { color: var(--plum); }
.link--plum:hover { color: var(--orange); }

.link--chartreuse { color: var(--chartreuse); }
.link--chartreuse:hover { opacity: 0.72; }

/* Group label divider used above PROFESSIONAL / PERSONAL. */
.group-label {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 36px;
}
.group-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--rule);
}

/* --------------------------------------------------------------------------
   5. Navigation
   -------------------------------------------------------------------------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(239, 237, 229, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
}

.nav__inner {
  min-height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav__brand {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 500;
  color: var(--plum);
  transition: color var(--dur) var(--ease);
  white-space: nowrap;
}
.nav__brand:hover { color: var(--orange); }

.nav__links, .nav__links li {
  list-style: none;
}

.nav__links {
  display: flex;
  gap: 36px;
  align-items: center;
}

.nav__link {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brown);
  transition: color var(--dur) var(--ease);
}
.nav__link:hover { color: var(--plum); }

.nav__cta {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 10px 22px;
  background: var(--chartreuse);
  color: var(--plum);
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.nav__cta:hover { background: var(--plum); color: var(--chartreuse); }

/* Anchor targets clear the sticky bar. */
#work, #about, #resume, #contact { scroll-margin-top: var(--nav-h); }

/* --------------------------------------------------------------------------
   6. Hero
   -------------------------------------------------------------------------- */

.hero {
  min-height: calc(100vh - var(--nav-h));
  padding: 64px 0 72px;
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid var(--rule);
}

.hero__inner {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.hero__meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
}

.hero__spacer { flex: 1; min-height: 60px; }

.hero__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: flex-end;
}

.hero__name {
  font-family: var(--serif);
  font-size: clamp(56px, 10vw, 118px);
  font-weight: 500;
  line-height: 0.88;
  letter-spacing: -0.02em;
  color: var(--plum);
}
.hero__name em { font-style: italic; }

.hero__lede {
  font-size: 16px;
  line-height: 1.65;
  color: var(--plum-mid);
  max-width: 46ch;
  margin: 20px 0 28px;
}

.hero__actions { display: flex; align-items: center; gap: 28px; }

/* --------------------------------------------------------------------------
   7. Work
   -------------------------------------------------------------------------- */

.work { padding: var(--section-y) 0; border-bottom: 1px solid var(--rule); }

.work__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 56px 40px;
  margin-bottom: 72px;
}
.work__grid--personal {
  grid-template-columns: repeat(3, 1fr);
  gap: 40px 32px;
  margin-bottom: 0;
}

.project__figure { margin-bottom: 20px; }

.project__title {
  font-family: var(--serif);
  font-size: 27px;
  font-weight: 500;
  line-height: 1.15;
  color: var(--plum);
  margin: 6px 0 12px;
}

.project__desc {
  font-size: 14px;
  line-height: 1.65;
  color: var(--plum-mid);
  margin-bottom: 16px;
  max-width: 58ch;
}

/* Image placeholder. DELETE .placeholder once real photography is dropped in;
   the <img> markup is already in place inside each <figure>. */
.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  aspect-ratio: 4 / 3;
  background: var(--ph-1);
  background-image: repeating-linear-gradient(
    45deg, rgba(75, 19, 40, 0.04) 0 2px, transparent 2px 9px);
  color: var(--brown-faint);
  font-size: 11px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  padding: 16px;
}
.placeholder--2 { background-color: var(--ph-3); aspect-ratio: 16 / 10; }
.placeholder--3 { background-color: var(--ph-4); }
.placeholder--4 { background-color: var(--ph-5); }
.placeholder--5 { background-color: var(--ph-2); aspect-ratio: 1 / 1; }
.placeholder--6 { background-color: var(--ph-6); aspect-ratio: 1 / 1; }
.placeholder--7 { background-color: var(--ph-7); aspect-ratio: 1 / 1; }
.placeholder--portrait { background-color: var(--ph-8); aspect-ratio: 3 / 4; }

/* --------------------------------------------------------------------------
   8. About — full-bleed oxblood panel
   -------------------------------------------------------------------------- */

.panel--dark {
  background: var(--plum);
  color: var(--bone);
  padding: var(--section-y) 0;
}

.about__grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 72px;
  align-items: start;
}

.about__portrait {
  background: var(--plum-deep);
  background-image: repeating-linear-gradient(
    45deg, rgba(239, 237, 229, 0.03) 0 2px, transparent 2px 9px);
  color: rgba(239, 237, 229, 0.42);
}

.about__title {
  font-family: var(--serif);
  font-size: clamp(30px, 3.4vw, 42px);
  font-weight: 400;
  line-height: 1.2;
  color: var(--bone);
  margin: 14px 0 32px;
  max-width: 22ch;
}

.about__body p {
  font-size: 15px;
  line-height: 1.75;
  color: rgba(239, 237, 229, 0.82);
  margin-bottom: 20px;
  max-width: 62ch;
}

.about__eyebrow { color: var(--chartreuse); }

.disciplines {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 48px;
  margin: 40px 0 36px;
  max-width: 620px;
}
.disciplines li {
  font-size: 14px;
  color: rgba(239, 237, 229, 0.88);
  padding: 12px 0;
  border-bottom: 1px solid var(--plum-line);
}

/* --------------------------------------------------------------------------
   9. Resume
   -------------------------------------------------------------------------- */

.resume { padding: var(--section-y) 0; }

.resume__grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 72px;
  align-items: start;
}

.role { padding-bottom: 36px; margin-bottom: 36px; border-bottom: 1px solid var(--rule); }
.role:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }

.role__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.role__title {
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 500;
  line-height: 1.2;
  color: var(--plum);
}

.role__dates { font-size: 12px; letter-spacing: 0.06em; color: var(--brown); white-space: nowrap; }

.role__org {
  font-size: 13px;
  font-weight: 500;
  color: var(--orange);
  margin: 4px 0 12px;
}

.role__desc { font-size: 14px; line-height: 1.7; color: var(--plum-mid); max-width: 62ch; }

.role__points { margin-top: 14px; }
.role__points li {
  position: relative;
  padding-left: 20px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--plum-mid);
  margin-bottom: 10px;
}
.role__points li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--orange);
}

.skills__block { margin-bottom: 24px; padding-bottom: 20px; border-bottom: 1px solid var(--rule); }
.skills__block:last-child { border-bottom: 0; }
.skills__block--education { margin-top: 32px; }
.eyebrow--muted.resume__label { margin-bottom: 16px; }
.eyebrow--muted.education__label { margin-bottom: 10px; }

.skills__label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--plum);
  margin-bottom: 8px;
}

.skills__list { font-size: 13px; line-height: 1.65; color: var(--brown); }

.education__degree {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 500;
  color: var(--plum);
}
.education__school { font-size: 13px; color: var(--brown); }

/* --------------------------------------------------------------------------
   10. Contact + footer
   -------------------------------------------------------------------------- */

.contact {
  background: var(--chartreuse);
  color: var(--plum);
  padding: var(--section-y) 0;
  text-align: center;
}

.contact .eyebrow { color: var(--plum); opacity: 0.66; }

.contact__title {
  font-family: var(--serif);
  font-size: clamp(38px, 5.6vw, 68px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 18px 0 24px;
}

.contact__body {
  font-size: 15px;
  line-height: 1.7;
  max-width: 46ch;
  margin: 0 auto 40px;
  color: var(--plum);
}

.contact__email {
  font-size: clamp(17px, 2vw, 21px);
  border-bottom: 1px solid currentColor;
  padding-bottom: 4px;
  transition: opacity var(--dur) var(--ease);
}
.contact__email:hover { opacity: 0.65; }

.social {
  display: flex;
  justify-content: center;
  gap: 22px;
  margin-top: 36px;
}
.social a {
  display: inline-flex;
  padding: 8px;
  color: var(--plum);
  opacity: 0.72;
  transition: opacity var(--dur) var(--ease);
}
.social a:hover { opacity: 1; }
.social svg { width: 20px; height: 20px; }

.footer {
  background: var(--plum);
  color: rgba(239, 237, 229, 0.55);
  padding: 22px 0;
  font-size: 12px;
  letter-spacing: 0.04em;
}
.footer__inner { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }

/* --------------------------------------------------------------------------
   11. Responsive — the artifact had none of this
   -------------------------------------------------------------------------- */

@media (max-width: 1024px) {
  :root { --gutter: 32px; --section-y: 88px; }
  .about__grid  { grid-template-columns: 260px 1fr; gap: 48px; }
  .resume__grid { grid-template-columns: 1fr 280px; gap: 48px; }
  .work__grid   { gap: 48px 32px; }
}

@media (max-width: 820px) {
  :root { --gutter: 24px; --section-y: 72px; }

  /* The old single-page design hid every nav link here and relied on
     scrolling. That strands a visitor now that these are real pages, so the
     links stay and wrap instead. Still no JS hamburger at this scale. */
  .nav__inner { flex-wrap: wrap; gap: 10px 0; padding-block: 10px; height: auto; }
  .nav__links { gap: 16px; flex-wrap: wrap; row-gap: 8px; }
  .nav__link { font-size: 11px; letter-spacing: 0.08em; }
  .nav__cta { padding: 8px 16px; font-size: 11px; }
  .nav__brand { font-size: 18px; }

  .hero { min-height: auto; padding: 56px 0 64px; }
  .hero__grid { grid-template-columns: 1fr; gap: 28px; align-items: start; }
  .hero__meta { flex-direction: column; gap: 6px; }
  .hero__spacer { min-height: 40px; }

  .work__grid,
  .work__grid--personal { grid-template-columns: 1fr; gap: 44px; }

  .about__grid  { grid-template-columns: 1fr; gap: 36px; }
  .about__portrait { max-width: 300px; }

  .resume__grid { grid-template-columns: 1fr; gap: 48px; }

  .section-head { margin-bottom: 40px; }
}

@media (max-width: 480px) {
  .disciplines { grid-template-columns: 1fr; gap: 0; }
  .role__head { flex-direction: column; gap: 4px; }
  .footer__inner { flex-direction: column; gap: 6px; }
  .hero__actions { flex-wrap: wrap; gap: 18px; }
}

/* --------------------------------------------------------------------------
   11b. Case study pages — /work/<slug>/
   Generated by tools/build.py. Same tokens, same rhythm as the homepage;
   single column because a case study is a reading page, not a grid.
   -------------------------------------------------------------------------- */

.study { padding: calc(var(--nav-h) + 56px) 0 var(--section-y); }

.study__back { margin-bottom: 56px; }

.study__head { max-width: 780px; margin-bottom: 56px; }

.study__title {
  font-family: var(--serif);
  font-size: clamp(44px, 6vw, 76px);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.015em;
  color: var(--plum);
  margin: 14px 0 24px;
}

.study__lede {
  font-size: clamp(17px, 1.5vw, 20px);
  line-height: 1.65;
  color: var(--brown);
  max-width: 62ch;
}

.study__hero { margin-bottom: 56px; }
.study__hero img { width: 100%; }
.study__hero .placeholder { aspect-ratio: 16 / 9; }

/* Role / Client / Year / Scope strip. */
.study__meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 28px 40px;
  padding: 32px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  margin-bottom: 72px;
}

.study__meta dt {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 8px;
}

.study__meta dd { font-size: 15px; line-height: 1.5; color: var(--plum); }

.study__body { max-width: 68ch; }

.study__section + .study__section { margin-top: 52px; }

.study__section h2 {
  font-family: var(--serif);
  font-size: clamp(26px, 2.6vw, 34px);
  font-weight: 500;
  line-height: 1.15;
  color: var(--plum);
  margin-bottom: 18px;
}

.study__section p {
  font-size: 16px;
  line-height: 1.8;
  color: var(--brown);
}

.study__section p + p { margin-top: 18px; }

.study__gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-top: 72px;
}

.study__gallery img { width: 100%; }

.study__external { margin-top: 48px; }

/* Third-party rights notice. Deliberately quiet — it is a legal line,
   not a design element — but never below 12px and never below AA. */
.study__rights {
  max-width: 68ch;
  margin-top: 56px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
  font-size: 12px;
  line-height: 1.6;
  color: var(--brown);
}

.rights-note {
  font-size: 12px;
  line-height: 1.6;
  color: var(--brown);
  margin: -18px 0 34px;
}

.study__next {
  margin-top: var(--section-y);
  padding-top: 40px;
  border-top: 1px solid var(--rule);
}

.study__nextlink {
  display: inline-block;
  font-family: var(--serif);
  font-size: clamp(30px, 3.6vw, 44px);
  font-weight: 500;
  line-height: 1.1;
  color: var(--plum);
  margin-top: 10px;
  transition: color var(--dur) var(--ease);
}

.study__nextlink:hover { color: var(--orange); }

@media (max-width: 820px) {
  .study { padding-top: calc(var(--nav-h) + 32px); }
  .study__back { margin-bottom: 36px; }
  .study__head, .study__hero { margin-bottom: 40px; }
  .study__meta { gap: 24px; padding: 26px 0; margin-bottom: 52px; }
  .study__gallery { grid-template-columns: 1fr; gap: 24px; }
}

/* --------------------------------------------------------------------------
   11c. Primary nav dropdowns
   CSS only. :focus-within keeps it operable from the keyboard; on touch, the
   parent link navigates to the section index, which lists the same children.
   -------------------------------------------------------------------------- */

.nav__item { position: relative; display: flex; align-items: center; }

.nav__menu {
  position: absolute;
  top: 100%;
  left: -18px;
  min-width: 246px;
  padding: 10px 0;
  margin: 0;
  background: var(--bone);
  border: 1px solid var(--rule);
  list-style: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease),
              visibility 0s linear var(--dur);
  z-index: 20;
}

.nav__item--has-menu:hover .nav__menu,
.nav__item--has-menu:focus-within .nav__menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition-delay: 0s;
}

.nav__menu a {
  display: block;
  padding: 9px 18px;
  font-size: 13px;
  line-height: 1.35;
  color: var(--plum);
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}

.nav__menu a:hover, .nav__menu a:focus-visible {
  background: var(--plum);
  color: var(--bone);
}

.nav__link[aria-current="page"], .nav__brand[aria-current="page"] {
  color: var(--orange);
}

/* --------------------------------------------------------------------------
   11d. Media grid — video and stills inside a case study
   Landscape items span the row; verticals sit two or three across.
   -------------------------------------------------------------------------- */

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 28px;
  margin-top: 36px;
}

.vid { margin: 0; }
.vid--land { grid-column: 1 / -1; }

.vid__frame {
  position: relative;
  background: var(--plum-deep);
  overflow: hidden;
}

/* One class per ratio in RATIOS (tools/build.py). Classes, not inline
   styles, because the CSP in _headers blocks style attributes. */
.vid__frame--16x9 { aspect-ratio: 16 / 9; }
.vid__frame--9x16 { aspect-ratio: 9 / 16; }
.vid__frame--4x5  { aspect-ratio: 4 / 5; }

.vid__frame > img,
.vid__frame > video,
.vid__frame > iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
}

.vid__blank { width: 100%; height: 100%; background: var(--ph-4); }

/* Shown only while a slot has a poster but no playable source. */
.vid__pending {
  position: absolute;
  left: 14px;
  bottom: 14px;
  padding: 6px 12px;
  background: var(--plum);
  color: var(--bone);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.vid__cap {
  margin-top: 10px;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--brown);
}

/* --------------------------------------------------------------------------
   11e. Grouped sections inside a case study
   -------------------------------------------------------------------------- */

.group { margin-top: 84px; scroll-margin-top: calc(var(--nav-h) + 24px); }

.group__title {
  font-family: var(--serif);
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 500;
  line-height: 1.1;
  color: var(--plum);
  padding-bottom: 18px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 26px;
}

.group__body { max-width: 68ch; }
.group__body p { font-size: 16px; line-height: 1.8; color: var(--brown); }
.group__body p + p { margin-top: 18px; }
.group__body strong { color: var(--plum); font-weight: 500; }

.group__awaiting {
  display: inline-block;
  margin-top: 22px;
  padding: 10px 16px;
  border: 1px dashed var(--rule);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--brown-faint);
}

.group__links { display: flex; flex-wrap: wrap; gap: 26px; margin-top: 28px; }

/* --------------------------------------------------------------------------
   11f. Whole-card link on work grids
   -------------------------------------------------------------------------- */

.project__hit { display: block; }
.project__hit:hover .project__title { color: var(--orange); }
.project__hit .project__figure { overflow: hidden; }
.project__hit img { transition: transform 0.5s var(--ease); }
.project__hit:hover img { transform: scale(1.03); }

.project__figure img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }

.about__teaser { max-width: 760px; }
.about__teaser .about__title { margin-bottom: 28px; }

.contact--page { min-height: 62vh; display: flex; align-items: center; }

@media (prefers-reduced-motion: reduce) {
  .project__hit img { transition: none; }
  .project__hit:hover img { transform: none; }
  .nav__menu { transition: none; }
}

@media (max-width: 900px) {
  /* No hover on touch: the dropdown is dead weight, and every child link is
     listed on the section page the parent link goes to. */
  .nav__menu { display: none; }
  .nav__links { gap: 18px; flex-wrap: wrap; }
}

@media (max-width: 820px) {
  .group { margin-top: 56px; }
  .media-grid { gap: 20px; margin-top: 28px; }
}

@media (max-width: 480px) {
  .media-grid { grid-template-columns: 1fr; }
}

/* --------------------------------------------------------------------------
   12. Print — makes Ctrl-P on #resume produce a usable one-off PDF.
   A designed PDF is still the better deliverable; see README.
   -------------------------------------------------------------------------- */

@media print {
  .nav, .contact, .hero__actions, .placeholder, .social,
  .study__back, .study__next, .vid, .group__awaiting { display: none; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .panel--dark { background: #fff; color: #000; }
  .about__body p, .disciplines li, .about__title { color: #000; }
  .resume, .work, .panel--dark { padding: 18pt 0; border: 0; }
  a { text-decoration: underline; }
}
