/* ==========================================================================
   stephenmulvain.com — site stylesheet
   Built on the Stephen Mulvain design system (tokens taken from
   assets/css/homepage.css on the live site). Playfair Display headings,
   Arial body, deep teal #04536C and mint greens.
   ========================================================================== */

:root {
  /* Color */
  --color-secondary: #04536c;      /* signature teal: headings, links, primary buttons */
  --color-deep: #002f3e;           /* darkest teal: hover ground, image wells */
  --color-primary: #79de9b;        /* brand green: mint button, highlight marker */
  --color-accent: #7ce49f;         /* hover ring */
  --color-accent-hover: #5dac77;   /* mint button hover */
  --color-border: #d4f1de;         /* hairlines */
  --color-border-strong: #b9d9c6;  /* input borders */
  --color-light-green: #f1fff6;    /* tinted cards */
  --color-section-tint: #edffee;   /* full-width bands */
  --color-form-bg: #f7fff9;        /* contact page ground */
  --color-background: #ffffff;
  --color-surface-muted: #f0f0f0;
  --color-text: #333333;
  --color-text-light: #555555;
  --color-error: #b42318;

  /* Type */
  --font-heading: "Playfair Display", Georgia, serif;
  --font-base: Arial, Helvetica, sans-serif;

  /* Radius */
  --radius-md: 4px;
  --radius-xl: 8px;
  --radius-lg: 12px;
  --radius-card: 16px;
  --radius-container: 40px;

  /* Shadow */
  --shadow-nav: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-card-hover: 0 12px 32px rgba(121, 222, 155, 0.2);
  --shadow-form: 0 12px 32px rgba(4, 83, 108, 0.08);

  /* Layout */
  --gutter: 96px;
  --content: 1248px;
  --header-h: 88px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

@media (max-width: 1100px) { :root { --gutter: 48px; } }
@media (max-width: 760px)  { :root { --gutter: 20px; --header-h: 68px; } }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--header-h) + 32px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--color-background);
  color: var(--color-text);
  font-family: var(--font-base);
  line-height: 1.5;
}
body > main { flex: 1 0 auto; }
img { max-width: 100%; height: auto; }
h1, h2, h3, p, figure, dl, dd, ul, ol { margin: 0; }
a { color: var(--color-secondary); }
a:hover { color: var(--color-deep); }
/* Browser surfaces in the palette: scrollbars, form accents and the caret */
html { scrollbar-color: #9cc3cf var(--color-section-tint); accent-color: var(--color-secondary); }
input, textarea { caret-color: var(--color-secondary); }
/* Even line breaks: balanced headlines, no lone last word in paragraphs */
h1, h2, h3, .card-title, .section-title { text-wrap: balance; }
p, li, dd, figcaption, .exp-impact { text-wrap: pretty; }
::selection { background: var(--color-primary); color: var(--color-secondary); }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid var(--color-secondary); outline-offset: 3px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  padding: 12px 18px; border-radius: var(--radius-md);
  background: var(--color-secondary); color: #fff; font-weight: 700; text-decoration: none;
}
.skip-link:focus, .skip-link:hover { top: 12px; color: #fff; }

/* Full-bleed section whose content sits in the 1248px column */
.bleed { padding-inline: max(var(--gutter), calc((100% - var(--content)) / 2)); }
.band { background: var(--color-section-tint); }

.icon { flex-shrink: 0; display: block; }

/* ---------- Highlight marker ---------- */
.hl { position: relative; z-index: 0; font-weight: 700; color: var(--color-secondary); white-space: nowrap; }
.hl::before, .hl::after {
  content: ""; position: absolute; z-index: -1; left: -3px; right: -3px;
  border-radius: 3px; filter: blur(1px);
}
.hl::before { top: 45%; bottom: 2%; background: rgba(121, 222, 155, 0.5); transform: rotate(-2deg); }
.hl::after  { top: 55%; bottom: -4%; background: rgba(121, 222, 155, 0.33); transform: rotate(1.5deg); }

.hl-role {
  position: relative; z-index: 0; display: inline-block; padding: 0 6px; margin-left: -6px;
  font-family: var(--font-heading); font-weight: 700; line-height: 1.2; color: var(--color-secondary);
}
.hl-role::before, .hl-role::after { content: ""; position: absolute; z-index: -1; left: 0; right: 0; filter: blur(1px); }
.hl-role::before { top: 48%; bottom: 4%; background: rgba(121, 222, 155, 0.55); border-radius: 6px 3px 7px 2px; transform: rotate(-1.5deg); }
.hl-role::after  { top: 62%; bottom: -6%; background: rgba(121, 222, 155, 0.35); border-radius: 3px 7px 2px 6px; transform: rotate(1deg); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 64px; padding: 0 34px;
  border: 0; border-radius: var(--radius-md);
  font-family: var(--font-heading); font-size: 18px; font-weight: 700;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .3s ease, color .3s ease, box-shadow .3s ease;
}
.btn svg { transition: transform .3s ease; }
.btn:hover svg { transform: translateX(3px); }
.btn:active { box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.08); }
.btn--sm { height: 50px; padding: 0 22px; font-size: 15px; }
.btn--md { height: 54px; padding: 0 24px; font-size: 16px; }
.btn--lg { height: 56px; padding: 0 28px; font-size: 17px; }

.btn-primary { background: var(--color-secondary); color: #fff; }
.btn-primary:hover { background: var(--color-deep); color: #fff; }
.btn-mint { background: var(--color-primary); color: var(--color-secondary); }
/* Hover brightens rather than darkening, so it reads as "more on", not "switched off" */
.btn-mint:hover { background: #8cf0ad; color: var(--color-deep); }
.btn-mint:active { background: var(--color-primary); box-shadow: inset 0 0 0 2px rgba(0, 47, 62, 0.12); }
.btn-outline { background: transparent; color: var(--color-secondary); box-shadow: inset 0 0 0 2px var(--color-secondary); }
.btn-outline:hover { background: var(--color-secondary); color: #fff; }
.btn-outline-light { background: transparent; color: #fff; box-shadow: inset 0 0 0 2px #fff; }
.btn-outline-light:hover { background: #fff; color: var(--color-secondary); }

.text-link {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 17px; font-weight: 700; color: var(--color-secondary);
  text-decoration: underline; text-decoration-color: var(--color-primary);
  text-decoration-thickness: 2px; text-underline-offset: 6px;
  transition: text-decoration-color .3s ease, color .3s ease;
}
.text-link:hover { text-decoration-color: var(--color-secondary); }
.back-link {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 0; font-size: 16px; font-weight: 700; color: var(--color-secondary); text-decoration: none;
}

/* Makes a whole card clickable from its main link */
.stretch::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  background: #fff; border-bottom: 1px solid var(--color-border); box-shadow: var(--shadow-nav);
}
.brand { display: flex; align-items: center; padding: 4px 0; text-decoration: none; }
.brand-mark {
  display: block; flex-shrink: 0; overflow: hidden; height: 72px;
  width: 0; margin-right: 0; opacity: 0; transform: translateY(6px);
  transition: width 320ms var(--ease-out), margin-right 320ms var(--ease-out), opacity 220ms ease-out, transform 320ms var(--ease-out);
}
.brand-mark img { width: 66px; height: 72px; max-width: none; display: block; }
.brand-name { font-family: var(--font-heading); font-size: 24px; font-weight: 700; line-height: 1.1; color: var(--color-secondary); }
/* The portrait mark slides in once the hero portrait has scrolled away,
   and is always shown on pages without a hero portrait. */
.is-scrolled .brand-mark, .brand--always .brand-mark { width: 66px; margin-right: 12px; opacity: 1; transform: none; }

.header-actions { display: flex; align-items: center; gap: 16px; }
.primary-nav { display: flex; align-items: center; gap: 4px; }
.nav-link {
  position: relative; padding: 12px 14px 14px;
  font-family: var(--font-heading); font-size: 19px; color: var(--color-secondary); text-decoration: none;
  transition: color .3s ease;
}
.nav-link::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 3px; border-radius: 2px;
  background: var(--color-primary); transform: scaleX(0);
  transition: transform .4s cubic-bezier(.68, -.55, .27, 1.55);
}
.nav-link:hover::after, .nav-link[aria-current="page"]::after { transform: scaleX(1); }

.menu-toggle {
  display: none; width: 44px; height: 44px; border: 0; border-radius: var(--radius-md);
  background: transparent; color: var(--color-secondary); cursor: pointer;
  align-items: center; justify-content: center; transition: background-color .3s ease;
}
.menu-toggle:hover { background: var(--color-surface-muted); }
.menu-toggle .icon-close { display: none; }
.menu-open .menu-toggle .icon-open { display: none; }
.menu-open .menu-toggle .icon-close { display: block; }

@media (max-width: 960px) {
  .site-header { padding-right: 12px; }
  .menu-toggle { display: flex; }
  .header-actions {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 12px;
    padding: 12px var(--gutter) 24px;
    background: #fff; border-bottom: 1px solid var(--color-border); box-shadow: 0 12px 24px rgba(0, 47, 62, 0.08);
    display: none;
  }
  .menu-open .header-actions { display: flex; }
  .primary-nav { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-link { padding: 14px 0; font-size: 20px; color: var(--color-deep); border-bottom: 1px solid var(--color-border); }
  .nav-link::after { left: 0; right: auto; width: 40px; bottom: 8px; }
  .header-actions .btn { height: 54px; }
}
@media (max-width: 760px) {
  .brand-mark { height: 53px; }
  .brand-mark img { width: 48px; height: 53px; }
  .is-scrolled .brand-mark, .brand--always .brand-mark { width: 48px; margin-right: 10px; }
  .brand-name { font-size: 20px; }
}

/* ---------- Footer ---------- */
.site-footer {
  margin-top: auto;
  display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap;
  padding-block: 64px; background: var(--color-secondary);
}
.site-footer h2 { font-family: var(--font-heading); font-size: 40px; font-weight: 700; color: #fff; }
.site-footer p { margin-top: 8px; font-size: 17px; color: var(--color-border); }
.site-footer .footer-email { margin-top: 12px; font-size: 18px; font-weight: 700; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.site-footer .footer-email a { color: #fff; text-decoration: underline; text-decoration-color: var(--color-primary); text-decoration-thickness: 2px; text-underline-offset: 4px; overflow-wrap: anywhere; }
.site-footer .footer-email a:hover { color: var(--color-primary); }
.footer-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.site-footer--slim { padding-block: 32px; }
.site-footer--slim .footer-name { font-family: var(--font-heading); font-size: 20px; font-weight: 700; color: #fff; }
.site-footer--slim p { margin: 0; font-size: 15px; }

@media (max-width: 760px) {
  .site-footer { flex-direction: column; align-items: stretch; gap: 14px; padding-block: 40px; }
  .site-footer h2 { font-size: 28px; }
  .footer-actions { flex-direction: column; align-items: stretch; }
  .footer-actions .btn { height: 58px; font-size: 17px; }
  .site-footer--slim { padding-block: 28px; gap: 10px; }
}

/* ---------- Shared type ---------- */
.eyebrow { font-size: 15px; color: var(--color-text-light); }
.lead { max-width: 620px; font-size: 19px; line-height: 1.6; color: var(--color-text-light); }
.lead strong { font-weight: 700; color: var(--color-secondary); }
.section-title { font-family: var(--font-heading); font-size: 48px; font-weight: 400; line-height: 1.2; color: var(--color-secondary); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.section-head p { margin-top: 8px; font-size: 17px; color: var(--color-text-light); }
.label-serif { font-family: var(--font-heading); font-size: 20px; font-weight: 700; color: var(--color-secondary); }
.label-serif--lg { font-size: 22px; }

@media (max-width: 760px) {
  .section-title { font-size: 30px; font-weight: 700; }
  .lead { font-size: 17px; line-height: 1.55; }
}

/* ==========================================================================
   Home
   ========================================================================== */
.hero {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; align-items: center;
  padding-top: 48px; padding-bottom: 64px;
}
.hero-copy { grid-column: span 7; display: flex; flex-direction: column; gap: 28px; }
.hero-role { display: flex; flex-direction: column; gap: 8px; }
.hero-role .hl-role { font-size: 34px; align-self: flex-start; }
.hero-location { display: flex; align-items: center; gap: 6px; font-size: 16px; font-weight: 500; color: var(--color-text-light); }
.hero h1 { font-family: var(--font-heading); font-size: 64px; font-weight: 700; line-height: 1.08; color: var(--color-secondary); }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.hero-actions .text-link { padding: 20px 12px; }
.hero-portrait { grid-column: 8 / span 5; display: flex; justify-content: center; }
.hero-portrait img { width: 359px; height: auto; display: block; }
.portrait-blink { position: relative; display: block; }
.portrait-blink .blink {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; animation: portrait-blink 5s step-end infinite 1.5s;
}
@keyframes portrait-blink { 0% { opacity: 0; } 96% { opacity: 1; } 99% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .portrait-blink .blink { animation: none; } }
/* Hover: instant swap to the waving pose (a crossfade lets the white page show through mid-fade). The wave canvas is wider (773x757); offsets keep the blob and head in place. */
.portrait-blink .wave {
  position: absolute; top: 0; left: -23.878%; width: 123.878%; max-width: none; height: auto;
  opacity: 0.001; pointer-events: none; /* not 0: keeps the layer painted so the first hover frame isn't blank */
}
.hero-portrait:hover .wave { opacity: 1; }
.hero-portrait:hover .portrait-blink > img:not(.wave) { opacity: 0.001; animation: none; }

.clients {
  display: flex; align-items: center; gap: 48px; flex-wrap: wrap;
  padding-top: 32px; padding-bottom: 48px; border-top: 1px solid var(--color-border);
}
.clients-label { font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-text-light); }
.clients ul { list-style: none; padding: 0; display: flex; align-items: center; gap: 56px; flex-wrap: wrap; }
.clients li { display: flex; align-items: center; }
.clients img { width: auto; display: block; }
.clients-text { display: none; font-size: 14px; line-height: 1.6; color: var(--color-text-light); }
.clients-text strong { color: var(--color-text); }

@media (max-width: 1100px) {
  .hero h1 { font-size: 52px; }
  .clients ul { gap: 36px; }
}
@media (max-width: 760px) {
  .hero { display: flex; flex-direction: column-reverse; align-items: stretch; gap: 20px; padding-top: 20px; padding-bottom: 32px; }
  .hero-copy { gap: 20px; }
  .hero-role { gap: 6px; }
  .hero-role .hl-role { font-size: 24px; }
  .hero-location { font-size: 15px; }
  .hero-portrait { justify-content: flex-start; }
  .hero-portrait img { width: 136px; }
  .hero h1 { font-size: 36px; line-height: 1.12; }
  .hero-actions { flex-direction: column; align-items: stretch; gap: 10px; }
  .hero-actions .btn { height: 58px; font-size: 17px; }
  .hero-actions .text-link { align-self: flex-start; padding: 12px 0; } /* 44px+ tap target */
  .clients { border-top: 0; padding-top: 0; padding-bottom: 40px; }
  .clients-label, .clients ul { display: none; }
  .clients-text { display: block; }
}

/* ---------- Project cards ---------- */
.work { display: flex; flex-direction: column; gap: 40px; padding-block: 88px; }
.card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
.card {
  position: relative; cursor: pointer;
  display: flex; flex-direction: column; overflow: hidden;
  background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-card);
  transition: transform .3s ease, box-shadow .3s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card-hover); }
.card:focus-within { box-shadow: 0 0 0 3px var(--color-secondary); }
.card-media {
  height: 300px; padding-top: 48px; overflow: hidden;
  display: flex; align-items: flex-start; justify-content: center;
  background: var(--color-deep);
}
.card-img {
  height: 360px; width: auto; max-width: none; flex-shrink: 0; display: block;
  transform-origin: 50% 100%; transition: transform 900ms cubic-bezier(.16, 1, .3, 1); will-change: transform;
}
.card:hover .card-img { transform: scale(1.08) rotate(-2deg); }
.card-body { flex-grow: 1; display: flex; flex-direction: column; gap: 12px; padding: 28px 32px 32px; }
.card-meta { font-size: 14px; font-weight: 600; color: var(--color-secondary); }
.card-title + .card-meta { margin-top: -4px; } /* details sit tight under their title */
.card-title { font-family: var(--font-heading); font-size: 28px; font-weight: 700; line-height: 1.2; color: var(--color-secondary); }
.card-desc { flex-grow: 1; font-size: 16px; line-height: 1.55; color: var(--color-text-light); }
.card-result {
  display: flex; align-items: center; gap: 14px;
  margin-top: 12px; padding: 20px 0 4px; border-top: 1px solid var(--color-border);
  font-size: 16px; font-weight: 600; line-height: 1.45; color: var(--color-secondary);
}
.result-icon {
  flex-shrink: 0; width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--color-border); color: var(--color-secondary);
}
.card .btn { align-self: flex-start; margin-top: 12px; }
/* Featured cards: the title is the link (stretched over the whole card), with a trailing arrow */
.card-title-link { color: inherit; text-decoration: none; }
.card-title-link:hover { color: inherit; }
.card-title-link .nowrap { white-space: nowrap; }
.card-title-link svg { display: inline-block; margin-left: 8px; vertical-align: -0.1em; color: var(--color-primary-ink, #499a66); transition: transform .3s ease, color .3s ease; }
.card:hover .card-title-link svg { transform: translateX(4px); color: var(--color-secondary); }
.card:hover .card-title { text-decoration: underline; text-decoration-color: var(--color-primary); text-decoration-thickness: 2px; text-underline-offset: 6px; }

@media (max-width: 1100px) { .card-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) {
  .work { gap: 20px; padding-block: 40px; }
  .work .section-head .btn, .work .section-head p { display: none; }
  .card-media { height: 178px; padding-top: 24px; background: var(--color-light-green); }
  .card-img { height: 220px; }
  .card-body { gap: 10px; padding: 20px; }
  .card-meta { font-size: 13px; }
  .card-title { font-size: 23px; }
  .card-desc { font-size: 15px; }
  .card-result { gap: 12px; margin-top: 8px; padding-top: 16px; font-size: 15px; }
  .result-icon { width: 28px; height: 28px; }
  .card .btn { align-self: stretch; margin-top: 10px; height: 54px; font-size: 16px; }
}

/* ---------- Experience (a plain list; projects live on the Work page) ---------- */
.experience { display: flex; flex-direction: column; gap: 32px; padding-block: 88px; }
.experience .text-link { font-size: 16px; padding: 12px 0; }
.exp-list { list-style: none; padding: 0; display: flex; flex-direction: column; border-top: 1px solid var(--color-border); }
.exp-list > li { border-bottom: 1px solid var(--color-border); }
.exp-row { padding: 24px 0; display: grid; grid-template-columns: 168px 300px minmax(0, 1fr); gap: 32px; align-items: center; }
.exp-logo { height: 56px; display: flex; align-items: center; }
.exp-logo img { width: auto; max-width: 168px; display: block; }
.exp-who { display: flex; flex-direction: column; gap: 4px; }
.exp-role { font-size: 19px; font-weight: 700; color: var(--color-text); }
.exp-company { font-size: 15px; font-weight: 500; color: var(--color-text-light); }
.exp-impact { font-size: 16px; line-height: 1.55; color: var(--color-text-light); }

/* Company-card chevron on the Work page */
.chev svg { transition: transform 240ms var(--ease-out); }
.chev[aria-expanded="true"] svg { transform: rotate(180deg); }

@media (max-width: 1100px) {
  .exp-row { grid-template-columns: 140px 220px minmax(0, 1fr); gap: 24px; }
}
@media (max-width: 760px) {
  .experience { gap: 16px; padding-block: 40px; }
  .exp-row { padding: 16px 0; grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .exp-logo, .exp-impact { display: none; }
  .exp-role { font-size: 16px; }
  .exp-company { font-size: 14px; color: var(--color-secondary); }
}

/* ==========================================================================
   Blog
   ========================================================================== */
.posts { padding-block: 64px 96px; }
.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.post-media { aspect-ratio: 16 / 9; overflow: hidden; background: var(--color-light-green); border-bottom: 1px solid var(--color-border); }
.post-img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 900ms cubic-bezier(.16, 1, .3, 1);
}
.card:hover .post-img { transform: scale(1.05); }
.post-card .card-title { font-size: 26px; }

/* Article pages reuse the case-study layout (.cs-hero, .toc, .cs-article, .cs-section, .fig, .bullets) */
.article-date { font-size: 15px; color: var(--color-text-light); }
.cs-hero-img.cs-hero-img--light { background: var(--color-light-green); }
/* For hero images that aren't wide panoramas: keep them a sensible size, centred */
.cs-hero-img.cs-hero-img--contain { padding: 32px 24px; }
.cs-hero-img.cs-hero-img--contain img { width: auto; max-width: 100%; max-height: 520px; margin: 0 auto; }
.next-card-media--photo { padding-top: 0; background: var(--color-light-green); }
.next-card-media--hero { padding: 24px; align-items: center; }
.next-card-media--hero img { width: 100%; height: 100%; object-fit: contain; display: block; transition: transform 900ms cubic-bezier(.16, 1, .3, 1); }
.card:hover .next-card-media--hero img { transform: scale(1.04); }
.cs-section h3 { font-family: var(--font-heading); font-size: 26px; font-weight: 700; line-height: 1.25; color: var(--color-secondary); }
.cs-section .sub { display: flex; flex-direction: column; gap: 16px; }
.bullets strong { color: var(--color-secondary); }

.proscons { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.proscons > div { display: flex; flex-direction: column; gap: 12px; padding: 22px 24px; border-radius: var(--radius-lg); }
.pros { background: #e0ffe0; }
.cons { background: #ffe0e0; }
.proscons h3, .proscons h4 { font-family: var(--font-heading); font-size: 20px; font-weight: 700; color: var(--color-text); }
.proscons ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 16px; line-height: 1.5; color: var(--color-text); }
.proscons li { position: relative; padding-left: 26px; }
.proscons li::before { position: absolute; left: 0; top: 0; font-weight: 700; }
.pros li::before { content: "+"; color: #1d6b38; }
.cons li::before { content: "\2212"; color: var(--color-error); }

.steps { list-style: none; padding: 0; counter-reset: step; display: flex; flex-direction: column; gap: 12px; max-width: 68ch; }
.steps li {
  counter-increment: step; position: relative; padding-left: 48px; min-height: 32px;
  display: flex; flex-direction: column; justify-content: center;
  font-size: 18px; line-height: 1.55; color: var(--color-text);
}
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0;
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--color-border); color: var(--color-secondary); font-weight: 700; font-size: 15px;
}
.steps strong { color: var(--color-secondary); }

@media (max-width: 760px) {
  .cs-section h3 { font-size: 22px; }
  .proscons { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .proscons > div { padding: 18px 20px; }
  .steps li { font-size: 16px; }
}

@media (max-width: 1100px) { .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .posts { padding-block: 32px 48px; }
  .post-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .post-card .card-title { font-size: 23px; }
}

/* ==========================================================================
   All projects
   ========================================================================== */
.page-intro {
  display: flex; flex-direction: column; gap: 24px;
  padding-top: 56px; padding-bottom: 48px; border-bottom: 1px solid var(--color-border);
}
.page-intro .back-link { font-size: 15px; font-weight: 600; padding: 10px 0; }
.page-intro-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.page-intro-copy { display: flex; flex-direction: column; gap: 12px; max-width: 720px; }
.page-title { font-family: var(--font-heading); font-size: 60px; font-weight: 700; line-height: 1.08; color: var(--color-secondary); }

.segmented { display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--color-surface-muted); }
.seg {
  padding: 12px 22px; border: 0; border-radius: 999px; cursor: pointer;
  font-family: inherit; font-size: 15px; font-weight: 700;
  background: transparent; color: var(--color-secondary);
  transition: background-color .3s ease, color .3s ease;
}
.seg[aria-pressed="false"]:hover { background: var(--color-border); }
.seg[aria-pressed="true"] { background: var(--color-secondary); color: #fff; }

.company-list { display: flex; flex-direction: column; gap: 40px; padding-top: 64px; padding-bottom: 96px; }
.company {
  --brand: 4, 83, 108;
  display: flex; flex-direction: column; gap: 20px; padding: 24px;
  background: var(--color-surface-muted); border: 10px solid rgba(var(--brand), 0.12);
  border-radius: var(--radius-container);
}
.company[hidden] { display: none; }
/* Collapsed cards are clickable as a whole: pointer cursor and a hover cue on the frame + chevron */
.company { transition: border-color .3s ease; }
.company:has(.chev[aria-expanded="false"]) { cursor: pointer; }
.company:has(.chev[aria-expanded="false"]):hover { border-color: rgba(var(--brand), 0.28); }
.company:has(.chev[aria-expanded="false"]):hover .chev { background: var(--color-border); }
.company-head { display: flex; align-items: center; gap: 32px; }
.company-logo {
  width: 220px; height: 84px; flex-shrink: 0; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  padding: 12px 18px; border-radius: var(--radius-card); background: #fff;
}
.company-logo img { max-width: 100%; max-height: 60px; width: auto; height: auto; object-fit: contain; display: block; }
.company-logo--cover { padding: 0; }
.company-logo--cover img { width: 100%; height: 84px; max-height: none; object-fit: cover; object-position: center top; }
.company-copy { flex-grow: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.company-copy h2 { font-family: var(--font-heading); font-size: 34px; font-weight: 700; line-height: 1.15; color: var(--color-secondary); }
.company-copy p { max-width: 760px; font-size: 16px; line-height: 1.6; color: var(--color-text-light); }
.company-copy .company-role { margin-top: -4px; font-size: 15px; font-weight: 700; line-height: 1.4; color: var(--color-secondary); }
.chev {
  width: 52px; height: 52px; flex-shrink: 0; border: 0; border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  background: #fff; color: var(--color-secondary); transition: background-color .3s ease;
}
.chev:hover { background: var(--color-border); }
.tags { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tags li { padding: 8px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; line-height: 1; color: #fff; }
.company-projects { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.company-projects[hidden] { display: none; }
.project-tile {
  position: relative; cursor: pointer;
  display: flex; flex-direction: column; gap: 8px; padding: 24px;
  border-radius: var(--radius-card); background: #fff; transition: box-shadow .3s ease;
}
.project-tile:hover { box-shadow: inset 0 0 0 6px var(--color-accent); }
.project-tile h3 { font-family: var(--font-heading); font-size: 24px; font-weight: 700; line-height: 1.3; color: #033f52; }
.project-tile p { flex-grow: 1; font-size: 15px; line-height: 1.55; color: var(--color-text-light); }
.project-tile .tile-result { flex-grow: 0; font-size: 14px; font-weight: 700; line-height: 1.45; color: var(--color-secondary); }
.project-tile a {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; padding: 10px 0;
  font-size: 15px; font-weight: 700; color: var(--color-secondary); text-decoration: none;
}
.project-tile a svg { transition: transform .3s ease; }
/* Tiles without a case study yet: readable, but clearly not a link */
.project-tile--soon { cursor: default; background: rgba(255, 255, 255, 0.65); }
.project-tile--soon:hover { box-shadow: none; }
.project-tile--soon h3 { color: var(--color-text); }
.tile-soon {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; padding: 10px 0;
  font-size: 15px; font-weight: 700; color: var(--color-text-light);
}
.tile-soon::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--color-border-strong); }
.project-tile:hover a svg { transform: translateX(3px); }

@media (max-width: 1100px) { .company-projects { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .page-intro { padding-top: 20px; padding-bottom: 28px; gap: 16px; }
  .page-title { font-size: 40px; }
  .segmented { width: 100%; }
  .seg { flex: 1 1 0; padding: 12px 8px; font-size: 14px; }
  .company-list { gap: 20px; padding-top: 28px; padding-bottom: 48px; }
  .company { padding: 16px; border-width: 6px; border-radius: 28px; gap: 16px; }
  .company-head { flex-wrap: wrap; gap: 16px; }
  .company-logo { width: calc(100% - 68px); height: 72px; }
  .company-logo--cover img { height: 72px; }
  .company-copy { order: 3; flex-basis: 100%; }
  .company-copy h2 { font-size: 26px; }
  .chev { order: 2; }
  .company-projects { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .project-tile { padding: 20px; }
  .project-tile h3 { font-size: 21px; }
}

/* ==========================================================================
   Case studies
   ========================================================================== */
.cs-hero { display: flex; flex-direction: column; gap: 24px; padding-top: 40px; padding-bottom: 56px; }
.cs-title { font-family: var(--font-heading); font-size: 68px; font-weight: 700; line-height: 1.08; color: var(--color-secondary); }
.cs-lede { max-width: 34ch; font-family: var(--font-heading); font-size: 30px; line-height: 1.35; color: var(--color-text); }
.cs-meta { display: grid; grid-template-columns: repeat(4, auto); justify-content: start; gap: 0 48px; }
.cs-meta > div { display: flex; flex-direction: column; gap: 2px; }
.cs-meta dt { font-size: 14px; color: var(--color-text-light); }
.cs-meta dd { font-size: 17px; font-weight: 700; color: var(--color-text); }
.cs-hero-img { margin-top: 16px; overflow: hidden; border-radius: var(--radius-card); background: var(--color-deep); }
.cs-hero-img img { width: 100%; height: auto; display: block; }

.cs-outcome { display: flex; align-items: baseline; gap: 64px; padding-block: 40px; background: var(--color-section-tint); }
.cs-outcome h2 { flex-shrink: 0; font-family: var(--font-heading); font-size: 32px; font-weight: 700; color: var(--color-secondary); }
.cs-outcome ul { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.cs-outcome li { font-size: 19px; line-height: 1.55; color: var(--color-text); }

.cs-body { display: flex; align-items: flex-start; gap: 88px; padding-top: 72px; padding-bottom: 96px; }
.toc { position: sticky; top: 120px; width: 280px; flex-shrink: 0; display: flex; flex-direction: column; gap: 12px; }
.toc ol { list-style: none; padding: 0; }
.toc-link {
  position: relative; display: block; padding: 9px 0 9px 18px;
  font-size: 15px; line-height: 1.35; color: var(--color-text-light); text-decoration: none; transition: color .3s ease;
}
.toc-link::before {
  content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 2px;
  background: var(--color-border); transition: background-color .3s ease;
}
.toc-link:hover { color: var(--color-secondary); }
.toc-link[aria-current="true"] { color: var(--color-secondary); font-weight: 700; }
.toc-link[aria-current="true"]::before { background: var(--color-primary); }

.jump { display: none; margin: 20px var(--gutter) 0; border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: #fff; }
.jump summary {
  height: 52px; padding: 0 16px; list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--font-heading); font-size: 18px; font-weight: 700; color: var(--color-secondary);
}
.jump summary::-webkit-details-marker { display: none; }
.jump summary svg { transition: transform .3s ease; }
.jump[open] summary svg { transform: rotate(180deg); }
.jump ol { list-style: none; padding: 0 16px 8px; border-top: 1px solid var(--color-border); }
.jump a { display: block; padding: 10px 0; font-size: 16px; color: var(--color-secondary); text-decoration: none; }

.cs-article { flex: 0 1 880px; min-width: 0; display: flex; flex-direction: column; gap: 72px; }
.cs-section { display: flex; flex-direction: column; gap: 28px; scroll-margin-top: 120px; }
.cs-section > h2 { font-family: var(--font-heading); font-size: 44px; font-weight: 700; line-height: 1.15; color: var(--color-secondary); }
.body-lg { max-width: 68ch; font-size: 19px; line-height: 1.6; color: var(--color-text); }
.rule { margin: 0; border: 0; height: 1px; background: var(--color-border); }

.constraints { display: flex; flex-direction: column; gap: 8px; }
.bullets { list-style: none; padding: 0; max-width: 68ch; display: flex; flex-direction: column; gap: 10px; font-size: 18px; line-height: 1.55; color: var(--color-text); }
.bullets li { position: relative; padding-left: 22px; }
.bullets li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 9px; height: 9px; border-radius: 50%; background: var(--color-primary); }

/* Figures */
.fig { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.fig figcaption { font-size: 15px; line-height: 1.5; color: var(--color-text-light); }
.fig-frame { display: flex; justify-content: center; overflow: hidden; padding: 16px; border-radius: var(--radius-card); }
.fig-frame img { width: 100%; height: auto; display: block; border-radius: var(--radius-xl); }
.fig-frame--white { background: #fff; }
.fig-frame--mint { background: var(--color-light-green); }
.fig-frame--dark { background: var(--color-deep); }
.fig-frame--tight { padding: 8px; }
.fig-frame--flush { padding: 0; }
.fig-frame--flush img { border-radius: var(--radius-card); }
.zoom { cursor: zoom-in; }
.fig-video { width: 100%; height: auto; display: block; border-radius: var(--radius-xl); background: #000; }

.fig-row { display: flex; align-items: flex-start; gap: 24px; }
.fig-row > * { flex: var(--w, 1) 1 0; min-width: 0; }
.fig-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px 24px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack--20 { gap: 20px; }

/* "I chose / Over / Why" decision block */
.decision { display: flex; flex-direction: column; gap: 24px; padding: 24px; border-radius: var(--radius-card); background: var(--color-section-tint); }
.decision-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.decision-card { display: flex; flex-direction: column; gap: 6px; padding: 22px 24px; border-radius: var(--radius-lg); background: #fff; }
.decision-card p:last-child { font-size: 17px; line-height: 1.5; color: var(--color-text); }
.decision-card--chose { background: var(--color-secondary); }
.decision-card--chose .label-serif { color: var(--color-primary); }
.decision-card--chose p:last-child { color: #fff; }
.decision-why { padding: 0 8px; font-size: 17px; line-height: 1.55; color: var(--color-text); }
.decision-why strong { color: var(--color-secondary); }
.decision--compact { gap: 16px; padding: 16px; }
.decision--compact .decision-grid { grid-template-columns: 1fr; gap: 16px; }
.decision--compact .decision-card { padding: 18px 20px; }
.decision--compact .label-serif { font-size: 18px; }
.decision--compact .decision-card p:last-child, .decision--compact .decision-why { font-size: 16px; }
.decision--compact .decision-why { padding: 0 4px; }

/* Results tiles */
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.stat { display: flex; flex-direction: column; gap: 8px; padding: 24px 28px; border-radius: var(--radius-card); background: var(--color-light-green); }
.stat-value { font-size: 21px; line-height: 1.4; color: var(--color-text); }
.stat-note { font-size: 16px; line-height: 1.5; color: var(--color-text-light); }

/* Next project card */
.cs-next { padding-bottom: 96px; }
.next-card { flex-direction: row; align-items: stretch; background: var(--color-light-green); }
.next-card-body { width: 520px; flex-shrink: 0; display: flex; flex-direction: column; justify-content: center; gap: 12px; padding: 48px; }
.next-card-body h2 { font-family: var(--font-heading); font-size: 40px; font-weight: 700; line-height: 1.15; color: var(--color-secondary); }
.next-card-body p:not(.eyebrow) { font-size: 18px; line-height: 1.55; color: var(--color-text); }
.next-card-body .btn { margin-top: 8px; }
.next-card-media {
  flex-grow: 1; height: 340px; padding-top: 40px; overflow: hidden;
  display: flex; justify-content: center; background: var(--color-deep);
}
.next-card-media .card-img { height: 440px; }

@media (max-width: 1100px) {
  .cs-title { font-size: 56px; }
  .cs-outcome { flex-direction: column; gap: 20px; }
  .cs-body { gap: 48px; }
  .toc { width: 220px; }
  .next-card-body { width: 50%; padding: 40px; }
}
@media (max-width: 900px) {
  .toc { display: none; }
  .jump { display: block; }
  .cs-body { padding-top: 40px; }
}
@media (max-width: 760px) {
  .cs-hero { gap: 16px; padding-top: 16px; padding-bottom: 32px; }
  .cs-title { font-size: 40px; }
  .cs-lede { font-size: 22px; }
  .cs-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 24px; }
  .cs-meta dd { font-size: 16px; }
  .cs-hero-img { margin-top: 8px; border-radius: var(--radius-lg); }
  .cs-outcome { gap: 12px; padding-block: 28px; }
  .cs-outcome h2 { font-size: 26px; }
  .cs-outcome ul { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .cs-outcome li { font-size: 17px; }
  .cs-body { padding-top: 32px; padding-bottom: 48px; }
  .cs-article { gap: 48px; }
  .cs-section { gap: 20px; }
  .cs-section > h2 { font-size: 30px; }
  .body-lg { font-size: 17px; }
  .bullets { font-size: 16px; }
  .fig-frame { padding: 8px; border-radius: var(--radius-lg); }
  .fig figcaption { font-size: 14px; }
  .fig-row { flex-direction: column; align-items: stretch; gap: 20px; }
  .fig-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .decision { gap: 16px; padding: 16px; }
  .decision-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .decision-card { padding: 18px 20px; }
  .decision-card p:last-child, .decision-why { font-size: 16px; }
  .decision-why { padding: 0 4px; }
  .stat-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .stat { padding: 20px; }
  .stat-value { font-size: 19px; }
  .cs-next { padding-bottom: 48px; }
  .next-card { flex-direction: column-reverse; }
  .next-card-body { width: auto; padding: 24px 20px; }
  .next-card-body h2 { font-size: 28px; }
  .next-card-body p:not(.eyebrow) { font-size: 16px; }
  .next-card-body .btn { align-self: stretch; }
  .next-card-media { height: 200px; padding-top: 24px; }
  .next-card-media .card-img { height: 260px; }
}

/* Image lightbox for .zoom figures */
.lightbox {
  width: min(96vw, 1600px); max-width: none; max-height: 94vh; padding: 0; border: 0;
  border-radius: var(--radius-card); background: var(--color-deep); overflow: hidden;
}
.lightbox::backdrop { background: rgba(0, 47, 62, 0.82); }
.lightbox img { display: block; width: 100%; height: auto; max-height: 94vh; object-fit: contain; }
.lightbox-close {
  position: absolute; top: 12px; right: 12px; width: 44px; height: 44px; border: 0; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: #fff; color: var(--color-secondary); cursor: pointer;
}

/* ==========================================================================
   About
   ========================================================================== */
.about-hero { display: flex; align-items: center; gap: 96px; padding-top: 48px; padding-bottom: 88px; }
.about-hero-copy { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.about-hero h1 { font-family: var(--font-heading); font-size: 72px; font-weight: 700; line-height: 1.05; color: var(--color-secondary); }
.about-hero .cs-lede { max-width: 30ch; }
.about-quote { display: flex; flex-direction: column; gap: 14px; padding-top: 4px; }
.about-quote::before { content: ""; width: 48px; height: 3px; border-radius: 2px; background: var(--color-primary); }
.about-quote p { max-width: 40ch; font-family: var(--font-heading); font-style: italic; font-size: 24px; line-height: 1.45; color: var(--color-secondary); }
.about-hero-actions { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 12px; }
.about-hero-actions .btn { height: 62px; padding: 0 30px; }
.about-portrait { flex-shrink: 0; width: 500px; }
.about-portrait svg { display: block; width: 100%; height: auto; overflow: visible; }

.how { display: flex; flex-direction: column; gap: 36px; padding-block: 88px; }
.h2-serif { font-family: var(--font-heading); font-size: 44px; font-weight: 700; line-height: 1.15; color: var(--color-secondary); }
.diamond { display: flex; flex-direction: column; gap: 8px; }
.diamond svg { display: block; width: 100%; height: auto; overflow: visible; }
.diamond-mobile { display: none; }
.phases { display: grid; grid-template-columns: repeat(4, 1fr); }
.phases > div { display: flex; flex-direction: column; gap: 8px; padding: 20px 28px 0; border-left: 1px solid #b9e6c8; }
.phases > div:first-child { padding-left: 0; border-left: 0; }
.phases > div:last-child { padding-right: 0; }
.phases h3 { font-family: var(--font-heading); font-size: 24px; font-weight: 700; color: var(--color-secondary); }
.phases p { font-size: 17px; line-height: 1.55; color: var(--color-text); }
.values-title { margin-top: 48px; font-family: var(--font-heading); font-size: 30px; font-weight: 700; color: var(--color-secondary); }
.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px 40px; }
.values > div { display: flex; flex-direction: column; gap: 6px; padding-top: 16px; border-top: 2px solid var(--color-primary); }
.values dt { font-family: var(--font-heading); font-size: 21px; font-weight: 700; color: var(--color-secondary); }
.values dd { font-size: 17px; line-height: 1.55; color: var(--color-text); }

.split { display: grid; grid-template-columns: 320px 1fr; gap: 64px; align-items: start; padding-block: 88px; }
.split + .split { border-top: 1px solid var(--color-border); }
.split-inner { margin-inline: max(var(--gutter), calc((100% - var(--content)) / 2)); }
.skills { display: flex; gap: 32px; }
.skills > div { flex: 1 1 0; display: flex; flex-direction: column; gap: 8px; }
.skills h3 { font-family: var(--font-heading); font-size: 24px; font-weight: 700; color: var(--color-secondary); }
.skills ul { list-style: none; padding: 0; }
.skills li { padding: 10px 0; border-bottom: 1px solid var(--color-border); font-size: 18px; line-height: 1.4; color: var(--color-text); }

.job-list { list-style: none; padding: 0; border-top: 1px solid var(--color-border); }
.job-list li { display: flex; align-items: center; gap: 32px; padding: 20px 0; border-bottom: 1px solid var(--color-border); }
.job-logo { flex-shrink: 0; width: 176px; height: 56px; display: flex; align-items: center; }
.job-logo img { width: auto; max-width: 100%; display: block; }
.job-who { flex: 1 1 0; display: flex; flex-direction: column; gap: 2px; }
.job-role { font-size: 19px; font-weight: 700; color: var(--color-text); }
.job-company, .job-years { font-size: 16px; color: var(--color-text-light); }
.job-years { white-space: nowrap; }
.split .text-link { margin-top: 20px; }

@media (max-width: 1100px) {
  .about-hero { gap: 48px; }
  .about-hero h1 { font-size: 56px; }
  .about-portrait { width: 380px; }
  .split { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .skills { flex-wrap: wrap; }
  .skills > div { flex-basis: calc(50% - 16px); }
}
@media (max-width: 760px) {
  .about-hero { flex-direction: column-reverse; align-items: stretch; gap: 16px; padding-top: 16px; padding-bottom: 48px; }
  .about-hero h1 { font-size: 44px; }
  .about-hero .cs-lede { font-size: 22px; }
  .about-hero .body-lg { font-size: 17px; }
  .about-quote p { font-size: 20px; }
  .about-hero-actions { flex-direction: column; }
  .about-hero-actions .btn { height: 58px; font-size: 17px; }
  .about-portrait { width: 260px; align-self: center; }
  .how { gap: 24px; padding-block: 48px; }
  .h2-serif { font-size: 30px; }
  .diamond-desktop { display: none; }
  .diamond-mobile { display: block; }
  .phases { grid-template-columns: minmax(0, 1fr); }
  .phases > div, .phases > div:first-child { padding: 16px 0 0; border-left: 0; border-top: 1px solid #b9e6c8; }
  .phases > div:first-child { border-top: 0; padding-top: 4px; }
  .phases h3 { font-size: 22px; }
  .phases p { font-size: 16px; }
  .values-title { margin-top: 16px; font-size: 24px; }
  .values { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .values dt { font-size: 19px; }
  .values dd { font-size: 16px; }
  .split { gap: 20px; padding-block: 48px; }
  .skills { flex-direction: column; gap: 28px; }
  .skills li { font-size: 16px; }
  .job-list li { flex-wrap: wrap; gap: 4px 16px; padding: 16px 0; }
  .job-logo { width: 100%; height: 36px; }
  .job-role { font-size: 17px; }
  .job-company, .job-years { font-size: 15px; }
}

/* ==========================================================================
   Contact
   ========================================================================== */
.page-tint { background: var(--color-form-bg); }
.contact { display: flex; align-items: flex-start; gap: 96px; padding-top: 64px; padding-bottom: 112px; }
.contact-intro { width: 420px; flex-shrink: 0; display: flex; flex-direction: column; gap: 22px; }
.contact-intro h1 { font-family: var(--font-heading); font-size: 64px; font-weight: 700; line-height: 1.05; color: var(--color-secondary); }
.channels { margin-top: 6px; display: flex; flex-direction: column; gap: 10px; }
.about-channels { margin-top: 24px; max-width: 420px; }
.chan {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px;
  border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: #fff; text-decoration: none;
  transition: background-color .3s ease, border-color .3s ease;
}
.chan:hover { background: var(--color-light-green); border-color: var(--color-primary); }
.chan-icon {
  flex-shrink: 0; width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--color-section-tint); color: var(--color-secondary);
}
.chan-text { flex: 1 1 0; display: flex; flex-direction: column; gap: 2px; }
.chan-label { font-size: 14px; color: var(--color-text-light); }
.chan-value { font-size: 17px; font-weight: 700; color: var(--color-secondary); }
.chan .go { transition: transform .3s ease; color: var(--color-secondary); }
.chan:hover .go { transform: translateX(3px); }

.form-panel {
  flex: 1 1 0; min-width: 0; padding: 40px;
  background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-card); box-shadow: var(--shadow-form);
}
.contact-form { display: flex; flex-direction: column; gap: 6px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 24px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 15px; font-weight: 700; color: var(--color-text); }
.field input, .field textarea {
  width: 100%; height: 52px; padding: 0 14px;
  font: inherit; font-size: 17px; color: var(--color-text); background: #fff;
  border: 1.5px solid var(--color-border-strong); border-radius: var(--radius-md);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.field textarea { height: auto; min-height: 160px; padding: 12px 14px; resize: vertical; line-height: 1.5; }
.field input:hover, .field textarea:hover { border-color: var(--color-accent-hover); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--color-secondary); box-shadow: 0 0 0 3px rgba(121, 222, 155, 0.55); }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: var(--color-error); }
.field input[aria-invalid="true"]:focus, .field textarea[aria-invalid="true"]:focus { box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.18); }
.field-msg { min-height: 20px; font-size: 14px; line-height: 1.4; color: var(--color-error); }
.form-actions { margin-top: 6px; display: flex; align-items: center; gap: 14px; }
.form-actions .btn { height: 58px; padding: 0 30px; }
.form-note { font-size: 14px; line-height: 1.5; color: var(--color-text-light); }
.form-error {
  margin-top: 8px; padding: 14px 16px; border-radius: var(--radius-md);
  background: #fdecea; color: var(--color-error); font-size: 15px; line-height: 1.5;
}
.form-error[hidden] { display: none; }
.btn:disabled { opacity: 0.7; cursor: progress; }
.form-sent { display: flex; flex-direction: column; gap: 12px; padding: 24px 0; }
.form-sent[hidden], .contact-form[hidden] { display: none; }
.sent-icon {
  width: 52px; height: 52px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--color-primary); color: var(--color-secondary);
}
.form-sent h2 { font-family: var(--font-heading); font-size: 34px; font-weight: 700; color: var(--color-secondary); }
.form-sent p { font-size: 18px; line-height: 1.55; color: var(--color-text); }
.link-button {
  align-self: flex-start; margin-top: 4px; padding: 0; border: 0; background: none; cursor: pointer;
  font: inherit; font-size: 16px; font-weight: 700; color: var(--color-secondary);
  text-decoration: underline; text-decoration-color: var(--color-primary); text-decoration-thickness: 2px; text-underline-offset: 4px;
}
.link-button:hover { text-decoration-color: var(--color-secondary); }

@media (max-width: 1100px) {
  .contact { gap: 48px; }
  .contact-intro { width: 340px; }
  .contact-intro h1 { font-size: 52px; }
}
@media (max-width: 900px) {
  .contact { flex-direction: column; align-items: stretch; gap: 28px; padding-top: 20px; padding-bottom: 48px; }
  .contact-intro { width: auto; gap: 16px; }
}
@media (max-width: 760px) {
  .contact-intro h1 { font-size: 40px; }
  .contact-intro .body-lg { font-size: 17px; }
  .chan-value { font-size: 16px; }
  .form-panel { padding: 22px 18px; }
  .contact-form { gap: 8px; }
  .field-row { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .field input, .field textarea { font-size: 16px; }
  .form-actions { flex-direction: column; align-items: stretch; }
  .form-sent { padding: 8px 0; }
  .form-sent h2 { font-size: 28px; }
  .form-sent p { font-size: 16px; }
}

/* ==========================================================================
   Playful interactions (assets/js/fun.js adds html.fun only when motion is allowed)
   ========================================================================== */

/* Cursor follower: mint dot, trailing teal ring, and an action pill over cards */
.cursor-dot, .cursor-ring, .cursor-pill {
  position: fixed; left: 0; top: 0; z-index: 9999; pointer-events: none;
  opacity: 0; transition: opacity .2s ease;
}
.cursor-on .cursor-dot, .cursor-on .cursor-ring { opacity: 1; }
.cursor-dot::before, .cursor-ring::before { content: ""; position: absolute; border-radius: 50%; transform: translate(-50%, -50%); }
.cursor-dot::before { width: 10px; height: 10px; background: var(--color-primary); transition: width .2s ease, height .2s ease; }
.cursor-ring::before {
  width: 34px; height: 34px; border: 2px solid rgba(4, 83, 108, 0.45);
  transition: width .25s var(--ease-out), height .25s var(--ease-out), background-color .25s ease, border-color .25s ease;
}
.cursor-hot .cursor-ring::before { width: 54px; height: 54px; background: rgba(121, 222, 155, 0.22); border-color: var(--color-primary); }
.cursor-down .cursor-ring::before { width: 26px; height: 26px; }
.cursor-pill {
  display: flex; align-items: center; gap: 8px; padding: 12px 18px;
  border-radius: 999px; background: var(--color-secondary); color: #fff;
  font-family: var(--font-heading); font-size: 17px; font-weight: 700; white-space: nowrap;
  box-shadow: 0 10px 24px rgba(0, 47, 62, 0.22);
  scale: 0.6; transition: opacity .2s ease, scale .3s var(--ease-out), background-color .3s ease;
}
.cursor-on.cursor-card .cursor-pill { opacity: 1; scale: 1; }
.cursor-on.cursor-card .cursor-ring { opacity: 0; }
.cursor-on.cursor-card .cursor-dot { opacity: 0; }
/* While the pill is showing it is the pointer, so hide the system arrow (mouse users with motion on only) */
html.cursor-on.cursor-card, html.cursor-on.cursor-card * { cursor: none !important; }

/* Scroll reveal */
.fun [data-reveal] {
  opacity: 0; translate: 0 12px;
  transition: opacity .4s var(--ease-out), translate .45s var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}
.fun [data-reveal].is-in { opacity: 1; translate: none; }
/* Jumped to a section, searched the page or printing: show everything at once */
.fun.reveal-done [data-reveal] { opacity: 1; translate: none; transition: none; }
@media print { .fun [data-reveal] { opacity: 1 !important; translate: none !important; transition: none !important; } }

/* Highlighter draws in, left to right */
.hl-draw::before, .hl-draw::after {
  clip-path: inset(0 100% 0 0);
  transition: clip-path .7s cubic-bezier(.65, 0, .35, 1);
  transition-delay: var(--hl-delay, 250ms);
}
.hl-draw::after { transition-delay: calc(var(--hl-delay, 250ms) + 120ms); }
.hl-draw.is-drawn::before, .hl-draw.is-drawn::after { clip-path: inset(0 0 0 0); }

/* Portrait tilt and magnetic buttons */
.tilt { transition: transform .5s var(--ease-out); will-change: transform; }
.magnetic { transition: background-color .3s ease, color .3s ease, box-shadow .3s ease, translate .35s var(--ease-out); }

/* Header fun: a mint pill glides between menu items (desktop, mouse) */
.primary-nav { position: relative; }
.nav-glide {
  position: absolute; left: 0; top: 50%; height: 44px; margin-top: -22px; z-index: 0;
  border-radius: 999px; background: #dcf7e5; opacity: 0; pointer-events: none;
  transition: transform .45s cubic-bezier(.3, 1.35, .5, 1), width .45s cubic-bezier(.3, 1.35, .5, 1), opacity .2s ease;
}
.primary-nav.has-glide .nav-link { z-index: 1; }
.primary-nav.has-glide .nav-link::after { display: none; } /* the pill replaces the underline */
.primary-nav.has-glide .nav-link.is-glided { color: var(--color-deep); }
/* Current page: solid mint pill, bold deep text, and a teal tick that stays put
   even while the pill glides off to whatever you point at. */
.nav-glide.is-current { background: var(--color-primary); }
.primary-nav.has-glide .nav-link[aria-current="page"] { font-weight: 700; color: var(--color-deep); }
.primary-nav.has-glide .nav-link[aria-current="page"]::after {
  display: block; left: 50%; right: auto; width: 16px; margin-left: -8px; bottom: 9px;
  background: var(--color-secondary); transform: scaleX(1);
}
@media (max-width: 960px) {
  .nav-glide { display: none; }
  .primary-nav.has-glide .nav-link::after { display: block; }
  .nav-link[aria-current="page"], .primary-nav.has-glide .nav-link[aria-current="page"] { font-weight: 700; padding-left: 14px; background: #dcf7e5; border-radius: 8px; }
  .nav-link[aria-current="page"]::after, .primary-nav.has-glide .nav-link[aria-current="page"]::after {
    left: 0; top: 12px; bottom: 12px; width: 4px; height: auto; margin: 0; background: var(--color-secondary);
  }
}

/* The Résumé download arrow bobs, inviting the click */
@keyframes bob { 0%, 100% { translate: 0 0; } 40% { translate: 0 4px; } 70% { translate: 0 -1px; } }
.fun .header-actions .btn:hover svg { animation: bob .7s ease-in-out 2; transform: none; }

/* Phone menu: items arrive one after another */
@keyframes navIn { from { opacity: 0; translate: -14px 0; } to { opacity: 1; translate: none; } }
@media (max-width: 960px) {
  .fun .menu-open .header-actions .nav-link, .fun .menu-open .header-actions .btn {
    animation: navIn .45s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 45ms);
  }
}

/* Reading progress */
.read-progress {
  position: fixed; left: 0; right: 0; top: var(--header-h); z-index: 19; height: 4px;
  background: var(--color-primary); transform: scaleX(0); transform-origin: 0 50%;
}

/* ==========================================================================
   Navigation helpers
   ========================================================================== */

/* Previous / next project at the end of each case study */
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.pager-card { background: #fff; }
.pager-media {
  height: 220px; padding: 24px; overflow: hidden;
  display: flex; align-items: center; justify-content: center; background: var(--color-deep);
}
.pager-media--light { background: var(--color-light-green); }
.pager-media img { width: 100%; height: 100%; object-fit: contain; display: block; transition: transform 900ms cubic-bezier(.16, 1, .3, 1); }
.card:hover .pager-media img { transform: scale(1.04); }
.pager-body { display: flex; flex-direction: column; gap: 6px; padding: 22px 28px 26px; }
.pager-label { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: var(--color-text-light); }
.pager-card--next .pager-body { align-items: flex-end; text-align: right; }
.pager-title { font-family: var(--font-heading); font-size: 26px; font-weight: 700; line-height: 1.2; color: var(--color-secondary); }
.pager-title a { color: inherit; text-decoration: none; }
.card:hover .pager-title a { text-decoration: underline; text-decoration-color: var(--color-primary); text-decoration-thickness: 2px; text-underline-offset: 6px; }
.pager-label svg { transition: transform .3s ease; }
.pager-card--next:hover .pager-label svg { transform: translateX(3px); }
.pager-card--prev:hover .pager-label svg { transform: translateX(-3px); }
@media (max-width: 760px) {
  .pager { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .pager-card--next { order: -1; }
  .pager-media { height: 170px; padding: 16px; }
  .pager-body { padding: 18px 20px 22px; }
  .pager-card--next .pager-body { align-items: flex-start; text-align: left; }
  .pager-title { font-size: 22px; }
}

/* Footer navigation row */
.footer-nav {
  flex-basis: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px 24px; flex-wrap: wrap;
  margin-top: 8px; padding-top: 20px; border-top: 1px solid rgba(212, 241, 222, 0.25);
}
.footer-nav ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0 24px; }
.footer-nav a {
  display: inline-block; padding: 12px 0; font-size: 15px; font-weight: 600; color: var(--color-border); text-decoration: none;
  text-decoration-thickness: 2px; text-underline-offset: 6px;
}
.footer-nav a:hover { color: #fff; text-decoration: underline; text-decoration-color: var(--color-primary); }
.site-footer .footer-copy { margin: 0; font-size: 14px; color: var(--color-border); }
@media (max-width: 760px) {
  .footer-nav { flex-direction: column; align-items: flex-start; gap: 4px; }
  .footer-nav ul { gap: 0 20px; }
}

/* Phone menu: dim the page behind and stop it scrolling */
.menu-backdrop {
  position: fixed; inset: 0; z-index: 19; background: rgba(0, 47, 62, 0.45);
  opacity: 0; pointer-events: none; transition: opacity .25s ease;
}
.menu-backdrop.is-open { opacity: 1; pointer-events: auto; }
html.menu-locked { overflow: hidden; }

/* Back to top */
.to-top {
  position: fixed; right: 24px; bottom: 24px; z-index: 15;
  width: 52px; height: 52px; border: 0; border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  background: var(--color-secondary); color: #fff;
  box-shadow: 0 0 0 2px #fff, 0 8px 20px rgba(0, 47, 62, 0.25); /* white ring keeps it visible over the teal footer */
  opacity: 0; translate: 0 16px; pointer-events: none;
  transition: opacity .3s ease, translate .4s var(--ease-out), background-color .3s ease;
}
.to-top.is-visible { opacity: 1; translate: none; pointer-events: auto; }
.to-top:hover { background: var(--color-deep); }
.to-top:hover svg { transform: translateY(-3px); }
.to-top svg { transition: transform .3s ease; }
@media (max-width: 760px) { .to-top { right: 16px; bottom: 16px; width: 48px; height: 48px; } }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .card:hover, .card:hover .card-img, .card:hover .post-img,.btn:hover svg, .project-tile:hover a svg, .chan:hover .go { transform: none !important; }
  html { scroll-behavior: auto; }
}

/* Copy-to-clipboard buttons (footer email, Contact email card) */
.copy-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; padding: 6px 12px;
  border: 1px solid var(--color-border); border-radius: 8px; background: transparent; color: var(--color-secondary);
  font: 700 14px/1 var(--font-body, Arial, Helvetica, sans-serif); cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}
.copy-btn .i-check { display: none; }
.copy-btn.is-copied .i-copy { display: none; }
.copy-btn.is-copied .i-check { display: inline; }
.copy-btn--light { color: #fff; border-color: rgba(255,255,255,.55); }
.copy-btn--light:hover { background: rgba(255,255,255,.12); border-color: #fff; }
.copy-btn--light.is-copied { color: var(--color-primary); border-color: var(--color-primary); }
.chan-wrap { position: relative; }
.chan--copyable { padding-right: 68px; }
.chan--copyable .chan-value { overflow-wrap: anywhere; }
.chan-copy { position: absolute; top: 50%; right: 14px; transform: translateY(-50%); width: 40px; height: 40px; min-height: 0; padding: 0; background: #fff; }
.chan-copy:hover { background: var(--color-light-green); border-color: var(--color-primary); }
.chan-copy.is-copied { background: var(--color-light-green); border-color: var(--color-primary); }
@media (max-width: 480px) {
  .chan--copyable { padding-right: 60px; gap: 12px; }
  .chan--copyable .chan-value { font-size: 14px; overflow-wrap: normal; }
  .chan-copy { right: 12px; }
}
/* Work page: neutral skill tags, Earlier roles list, Side projects grid */
.earlier-list { list-style: none; padding: 0; margin-top: 18px; display: grid; gap: 0; border-top: 1px solid var(--color-border); }
.earlier-list li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; padding: 14px 0; border-bottom: 1px solid var(--color-border); }
.earlier-company { font-weight: 700; color: var(--color-secondary); }
.earlier-role { color: var(--color-text-light); }
.project-tile .tile-meta { flex-grow: 0; font-size: 13px; font-weight: 700; letter-spacing: .02em; color: var(--color-text-light); }

/* Hero headline: "break" is cracked, "the fix" gets the mint marker */
.word-break { position: relative; display: inline-block; white-space: nowrap; }
.word-break .wb-shard { display: inline-block; user-select: none; }
.word-break .wb-bot { position: absolute; left: 0; top: 0; }
.word-break .wb-top {
  clip-path: polygon(0 0, 100% 0, 100% 40%, 74% 54%, 56% 45%, 37% 62%, 19% 51%, 0 60%);
  transform: translate(-0.015em, -0.045em) rotate(-0.8deg);
  animation: wb-crack-top .5s cubic-bezier(.2, .9, .3, 1.2) .9s both;
}
.word-break .wb-bot {
  clip-path: polygon(0 60%, 19% 51%, 37% 62%, 56% 45%, 74% 54%, 100% 40%, 100% 100%, 0 100%);
  transform: translate(0.035em, 0.055em) rotate(1deg);
  animation: wb-crack-bot .5s cubic-bezier(.2, .9, .3, 1.2) .9s both;
}
@keyframes wb-crack-top { from { transform: none; } }
@keyframes wb-crack-bot { from { transform: none; } }
.word-fix { position: relative; z-index: 0; white-space: nowrap; }
.word-fix::before, .word-fix::after {
  content: ""; position: absolute; z-index: -1; left: -0.08em; right: -0.08em; filter: blur(1px);
  transform-origin: left center; animation: fix-mark .6s cubic-bezier(.3, .7, .2, 1) 1.5s both;
}
.word-fix::before { top: 52%; bottom: 2%; background: rgba(121, 222, 155, 0.6); border-radius: 6px 3px 7px 2px; rotate: -1deg; }
.word-fix::after  { top: 66%; bottom: -6%; background: rgba(121, 222, 155, 0.4); border-radius: 3px 7px 2px 6px; rotate: .8deg; }
@keyframes fix-mark { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media (prefers-reduced-motion: reduce) {
  .word-break .wb-shard, .word-fix::before, .word-fix::after { animation: none; }
}

.hero h1 .nowrap { white-space: nowrap; }
/* Hero headline: always three lines; type scales to the column so the longest line fits */
.hero-copy { container-type: inline-size; }
.hero h1.hero-title .ht-line { display: block; white-space: nowrap; }
.hero h1.hero-title { font-size: min(64px, 9.3cqi); }
/* Hero headline weight contrast: regular sentence, black "break" and "the fix" */
.hero h1.hero-title { font-weight: 400; }
.hero h1.hero-title .word-break, .hero h1.hero-title .word-fix { font-weight: 900; }

/* Previous / next project cards: image fills the whole media area */
.pager-media { padding: 0; }
.pager-media img { object-fit: cover; object-position: center; }
@media (max-width: 760px) { .pager-media { padding: 0; } }
