.hero-name { --name-ratio: 11.5; }
:root {
  --paper: #f3f4f2;
  --ink: #15171c;
  --muted: #5b6069;
  --rule: #d3d6d3;
  --pen: #2a3db5;
  --pen-soft: #e3e6f6;
  --foot-bg: #15171c;
  --foot-fg: #f3f4f2;
  --foot-pen: #9aa8ff;
  --serif: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --measure: 38rem;
  --margin: 15rem;
  --gap: clamp(1.5rem, 4vw, 4rem);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #14161a;
    --ink: #e9eae6;
    --muted: #a3a8b0;
    --rule: #33373e;
    --pen: #9aa8ff;
    --pen-soft: #23284a;
    --foot-bg: #0c0d10;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
    --paper: #14161a;
    --ink: #e9eae6;
    --muted: #a3a8b0;
    --rule: #33373e;
    --pen: #9aa8ff;
    --pen-soft: #23284a;
    --foot-bg: #0c0d10;
    color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-stretch: 100%;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-line: underline; text-decoration-color: var(--pen); text-decoration-thickness: 1.5px; text-underline-offset: 0.18em; }
a:hover { color: var(--pen); }
:focus-visible { outline: 2px solid var(--pen); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3 { font-weight: 600; font-stretch: 118%; margin: 0; text-wrap: balance; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
em { font-style: italic; }
strong { font-weight: 600; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--paper); padding: .5rem 1rem; z-index: 10; }

.wrap { max-width: 72rem; margin: 0 auto; padding: 0 16px; }
@media (min-width: 700px) { .wrap { padding: 0 2.5rem; } }

/* Header */
.site-header { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .5rem 2rem; padding-top: 1.5rem; padding-bottom: 1.5rem; font-family: var(--sans); font-size: 1rem; }
.wordmark { font-weight: 700; font-stretch: 118%; text-decoration: none; letter-spacing: -0.01em; }
.site-header ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem 1.4rem; }
.site-header nav a { text-decoration: none; color: var(--muted); }
.site-header nav a:hover, .site-header nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; text-decoration-color: var(--pen); }

/* Margin notes: the thinking layer */
.note { font-family: var(--serif); font-style: italic; font-size: .95rem; line-height: 1.45; color: var(--pen); border-left: 2px solid var(--pen); padding: .1rem 0 .1rem .9rem; }
.note p { margin: 0; }

.row { display: grid; grid-template-columns: minmax(0, 1fr); gap: .75rem; }
.row > .note { margin: -.25rem 0 1.25rem; }
@media (min-width: 960px) {
  .row { grid-template-columns: minmax(0, var(--measure)) var(--margin); column-gap: var(--gap); }
  .row > .note { margin: .3rem 0 0; align-self: start; }
}

/* Hero */
.hero { display: grid; gap: 2rem; padding-top: clamp(2rem, 6vw, 5rem); padding-bottom: clamp(3rem, 7vw, 6rem); }
.hero-name { white-space: nowrap; font-size: min(calc((100vw - 32px) / var(--name-ratio)), calc((72rem - 5rem) / var(--name-ratio))); line-height: .92; letter-spacing: -0.03em; font-weight: 700; font-stretch: 125%; margin-bottom: 2.5rem; overflow-wrap: anywhere; }
.hero-intro { font-size: clamp(1.2rem, 2vw, 1.45rem); line-height: 1.45; max-width: 34rem; }
.hero-sub { color: var(--muted); max-width: 34rem; }
.hero-side { display: grid; gap: 1.25rem; align-content: start; }
.portrait img { aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 30%; width: 100%; }
@media (min-width: 960px) {
  .hero { grid-template-columns: minmax(0, 1fr) 22rem; column-gap: var(--gap); align-items: start; }
  .hero-name { grid-column: 1 / -1; margin-bottom: 1rem; }
  .hero-text { padding-top: .5rem; }
}

@media (min-width: 700px) { .hero-name { font-size: min(calc((100vw - 5rem) / var(--name-ratio)), calc((72rem - 5rem) / var(--name-ratio))); } }

/* Blocks */
.block { padding-top: 2.5rem; padding-bottom: 3.5rem; }
.block h2, .page-head h1 { font-size: clamp(1.9rem, 4vw, 2.75rem); line-height: 1.1; letter-spacing: -0.02em; }
.block-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; border-top: 1px solid var(--ink); padding-top: 1rem; margin-bottom: 1.5rem; }
.more { font-family: var(--sans); font-size: 1rem; white-space: nowrap; }

/* Work list */
.work-list { list-style: none; margin: 0; padding: 0; }
.work-list li { border-bottom: 1px solid var(--rule); }
.work-list a { display: grid; grid-template-columns: 4.5rem minmax(0, 1fr); gap: .5rem 1.25rem; padding: 1.4rem 0; text-decoration: none; }
.w-year { font-family: var(--sans); font-size: .95rem; color: var(--muted); padding-top: .4rem; }
.w-main { display: grid; gap: .3rem; }
.w-title { font-size: clamp(1.25rem, 2.3vw, 1.65rem); line-height: 1.2; letter-spacing: -0.01em; font-weight: 600; font-stretch: 112%; }
.w-q { font-style: italic; color: var(--muted); max-width: 40rem; line-height: 1.4; }
.w-tags { font-family: var(--sans); font-size: .9rem; color: var(--muted); }
.thumb { display: none; }
.work-list a:hover .w-title { color: var(--pen); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: .15em; }
@media (min-width: 760px) {
  .work-list a { grid-template-columns: 5rem minmax(0, 1fr) 13rem; column-gap: 2rem; align-items: start; }
  .thumb { display: block; width: 13rem; aspect-ratio: 4 / 3; object-fit: cover; border: 1px solid var(--rule); }
}

/* Ways and situations */
.ways-intro, .page-intro { max-width: var(--measure); font-size: 1.25rem; line-height: 1.5; }
.ways-list, .situations, .steps { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; gap: 2rem; }
.ways-list h3, .situations h3, .steps h3 { font-size: 1.45rem; margin-bottom: .4rem; }
.ways-list p, .situations p, .steps p { color: var(--muted); font-size: 1.05rem; }
@media (min-width: 760px) { .ways-list, .situations, .steps { grid-template-columns: repeat(3, 1fr); column-gap: var(--gap); } }
.steps { counter-reset: step; }
.steps li { counter-increment: step; }
.steps h3::before { content: counter(step) ". "; color: var(--pen); }

.way { display: grid; gap: 1rem; padding: 2rem 0; border-top: 1px solid var(--rule); }
.way:first-child { border-top: 1px solid var(--ink); }
.way-head h3 { font-size: clamp(1.7rem, 3vw, 2.3rem); letter-spacing: -0.02em; line-height: 1.1; }
.way-what { font-style: italic; color: var(--pen); margin: .3rem 0 0; }
.way-body { max-width: var(--measure); }
.way-for { font-size: 1.05rem; }
.way-meta { font-family: var(--sans); font-size: .95rem; color: var(--muted); }
@media (min-width: 960px) { .way { grid-template-columns: 18rem minmax(0, var(--measure)); column-gap: var(--gap); } }

.cta-line { margin-top: 2rem; max-width: var(--measure); }
.glasgow img { max-height: 34rem; width: auto; }
.fig { margin: 0; }
.fig figcaption { font-family: var(--sans); font-size: .9rem; color: var(--muted); margin-top: .6rem; }

/* Pages */
.page-head { padding-top: clamp(2rem, 6vw, 4.5rem); padding-bottom: 1rem; }
.page-head h1 { font-size: clamp(2.6rem, 7vw, 5rem); line-height: 1; letter-spacing: -0.03em; margin-bottom: 1.5rem; }

/* Case study */
.case-head { padding-top: clamp(2rem, 6vw, 4.5rem); padding-bottom: 2rem; max-width: 56rem; }
.crumb { font-family: var(--sans); font-size: 1rem; margin-bottom: 1.5rem; }
.case-head h1 { font-size: clamp(2.3rem, 6vw, 4.4rem); line-height: 1.02; letter-spacing: -0.03em; margin-bottom: 1.25rem; }
.dek { font-size: clamp(1.25rem, 2.2vw, 1.55rem); font-style: italic; line-height: 1.35; color: var(--muted); max-width: 44rem; }
.meta { display: flex; flex-wrap: wrap; gap: 1rem 3rem; margin: 2rem 0 0; font-family: var(--sans); font-size: .95rem; }
.meta dt { color: var(--muted); }
.meta dd { margin: 0; }
.tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 .9rem; }
.cover { margin: 0 0 3rem; }
.cover img { width: 100%; border: 1px solid var(--rule); }
.lede { font-size: clamp(1.3rem, 2vw, 1.5rem); line-height: 1.45; }
.cs-section { padding: 1.5rem 0 1rem; }
.cs-section h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); letter-spacing: -0.015em; margin: 1rem 0 1.25rem; padding-top: 1rem; border-top: 1px solid var(--ink); max-width: var(--measure); }
.fig.wide { margin: 1.5rem 0 2.5rem; max-width: calc(var(--measure) + var(--margin) + var(--gap)); }
.fig.wide img { border: 1px solid var(--rule); max-height: 44rem; width: auto; }
.prose-list { margin: 0 0 1em; padding-left: 1.2rem; }
.prose-list li { margin-bottom: .5rem; }
.next { margin: 3rem 0 1rem; border-top: 1px solid var(--ink); }
.next a { display: grid; gap: .3rem; padding: 1.5rem 0; text-decoration: none; }
.next-label { font-family: var(--sans); font-size: .95rem; color: var(--muted); }
.next-title { font-size: clamp(1.4rem, 2.8vw, 2rem); font-weight: 600; font-stretch: 118%; line-height: 1.15; }
.next a:hover .next-title { color: var(--pen); }

/* Talks, writing */
.talks { list-style: none; padding: 0; margin: 0; display: grid; gap: 2.5rem; }
.talks li { border-top: 1px solid var(--ink); padding-top: 1rem; max-width: 46rem; }
.talks h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); margin-bottom: .8rem; }
.talks .for { font-size: 1.05rem; color: var(--muted); }
.plain-list { padding-left: 1.2rem; max-width: var(--measure); }
.essays { list-style: none; margin: 0; padding: 0; }
.essays li { border-bottom: 1px solid var(--rule); padding: 1.2rem 0; display: grid; gap: .25rem; max-width: 46rem; }
.essays a { text-decoration: none; }
.e-title { font-size: 1.3rem; font-weight: 600; font-stretch: 112%; }
.essays a .e-title { text-decoration: underline; text-decoration-color: var(--pen); text-decoration-thickness: 1.5px; text-underline-offset: .15em; }
.e-desc { color: var(--muted); }
.elsewhere { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; gap: 2rem; }
@media (min-width: 760px) { .elsewhere { grid-template-columns: repeat(2, 1fr); column-gap: var(--gap); } }
.elsewhere .kind { font-family: var(--sans); font-size: .9rem; color: var(--muted); }
.elsewhere h3 { font-size: 1.4rem; margin: .2rem 0 .4rem; }
.elsewhere p { color: var(--muted); font-size: 1.05rem; margin-bottom: .4rem; }
.channel-list { list-style: none; margin: 1.5rem 0 0; padding: 0; }
.channel-list li { display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; align-items: baseline; padding: .9rem 0; border-bottom: 1px solid var(--rule); }
.channel-list a { font-size: 1.25rem; font-weight: 600; min-width: 8rem; }
.channel-list span { color: var(--muted); }

/* Hero note */
.hero-note { max-width: 22rem; }

/* Footer */
.site-footer { margin-top: 3rem; padding: 3.5rem 0 2.5rem; background: var(--foot-bg); color: var(--foot-fg); }
.site-footer a { color: var(--foot-fg); text-decoration-color: var(--foot-pen); }
.site-footer a:hover { color: var(--pen-soft); }
.footer-lead { font-size: clamp(1.3rem, 2.4vw, 1.7rem); max-width: 36rem; line-height: 1.35; }
.footer-mail { font-weight: 600; font-stretch: 118%; font-size: clamp(1.4rem, 5vw, 3.2rem); letter-spacing: -0.025em; line-height: 1.1; margin: 1rem 0 2.5rem; overflow-wrap: anywhere; }
.footer-cols { display: grid; gap: 1.5rem; font-family: var(--sans); font-size: 1rem; }
@media (min-width: 760px) { .footer-cols { grid-template-columns: 1fr 1fr; } }
.channels { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; }
.small { font-family: var(--sans); font-size: .9rem; opacity: .6; margin: 2.5rem 0 0; }

/* Interactions */
.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--paper); border-bottom: 1px solid transparent; }
.site-header.scrolled { border-bottom-color: var(--rule); }

/* Links: the underline thickens and turns pen-blue on hover */
a { text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
.site-header nav a { position: relative; text-decoration: none; }
.site-header nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 1.5px; background: var(--pen); transform: scaleX(0); transform-origin: left; }
.site-header nav a:hover::after, .site-header nav a[aria-current="page"]::after { transform: scaleX(1); }
.site-header nav a:hover, .site-header nav a[aria-current="page"] { text-decoration: none; }

/* Case study rows */
.work-list a { position: relative; }
.work-list .w-main { transition: transform .25s ease; }
.work-list a:hover .w-main { transform: translateX(6px); }
.thumb { transition: transform .35s ease, border-color .2s ease; }
.work-list a:hover .thumb { transform: scale(1.035) rotate(-0.6deg); border-color: var(--pen); }
.work-list a:hover .w-year { color: var(--pen); }

/* Margin notes */
.note { transition: border-color .2s ease, background-color .2s ease; }
.js .note.will-draw { border-left-color: transparent; background-image: linear-gradient(var(--pen), var(--pen)); background-repeat: no-repeat; background-size: 2px 0; background-position: 0 0; }
.js .note.will-draw.drawn { background-size: 2px 100%; }
.note.lit { background-color: var(--pen-soft); }

/* Ways index and sections */
.way-index li { transition: padding-left .2s ease; }
.way-index li:hover { padding-left: .5rem; }
.way.flash { animation: flash 1.6s ease; }
@keyframes flash { 0% { background: var(--pen-soft); } 100% { background: transparent; } }

/* Situations and steps lift a little */
.situations li, .steps li, .ways-list li { transition: transform .2s ease; }
.situations li:hover, .steps li:hover, .ways-list li:hover { transform: translateY(-2px); }

/* Next case study */
.next-title { display: inline-block; transition: transform .25s ease, color .15s ease; }
.next a:hover .next-title { transform: translateX(8px); }

/* Copy button */
.copy { font: inherit; font-family: var(--sans); font-size: .9rem; font-weight: 500; margin-left: 1rem; vertical-align: middle; padding: .35rem .8rem; border-radius: 999px; border: 1px solid currentColor; background: transparent; color: var(--foot-fg); cursor: pointer; transition: background-color .15s ease, color .15s ease, transform .1s ease; }
.copy:hover { background: var(--foot-fg); color: var(--foot-bg); }
.copy:active { transform: scale(.96); }
.copy.ok { background: var(--foot-pen); border-color: var(--foot-pen); color: var(--foot-bg); }

/* Image viewer */
.case .fig img { cursor: zoom-in; transition: border-color .2s ease; }
.case .fig img:hover { border-color: var(--pen); }
.viewer { border: 0; padding: 0; background: transparent; max-width: 94vw; max-height: 94vh; }
.viewer::backdrop { background: rgba(10, 11, 14, .82); }
.viewer img { max-width: 94vw; max-height: 84vh; width: auto; height: auto; margin: 0 auto; }
.viewer-cap { color: #e9eae6; font-size: .95rem; margin: .6rem 0 0; text-align: center; }
.viewer-close { position: fixed; top: 1rem; right: 1rem; font: inherit; font-weight: 600; padding: .4rem .9rem; border-radius: 999px; border: 0; background: #f3f4f2; color: #15171c; cursor: pointer; }

/* Reading progress on case studies */
.progress { position: fixed; left: 0; right: 0; top: 0; height: 3px; background: var(--pen); transform: scaleX(0); transform-origin: left; z-index: 30; }

/* Portrait */
.portrait img { transition: transform .4s ease; }
.portrait:hover img { transform: scale(1.02); }
.portrait { overflow: hidden; }

/* Hero entrance: one load moment, resting state visible */
@keyframes rise { from { transform: translateY(14px); opacity: .001; } to { transform: none; opacity: 1; } }

@media (prefers-reduced-motion: no-preference) {
  a, .w-title, .next-title { transition: color .15s ease, transform .25s ease; }
  .site-header nav a::after { transition: transform .25s ease; }
  .js .note.will-draw { transition: background-size .6s ease .1s, background-color .2s ease; }
  .hero-name { animation: rise .7s cubic-bezier(.2,.7,.2,1) both; }
  .hero-text { animation: rise .7s cubic-bezier(.2,.7,.2,1) .12s both; }
  .hero-side { animation: rise .7s cubic-bezier(.2,.7,.2,1) .22s both; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* Working together */
.wt-intro p { margin-bottom: 1em; }
.way-index { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.way-index li { display: grid; gap: .2rem; padding: .9rem 0; border-bottom: 1px solid var(--rule); }
.way-index a { font-weight: 600; font-stretch: 112%; font-size: 1.2rem; }
.way-index span { color: var(--muted); }
@media (min-width: 760px) { .way-index li { grid-template-columns: 18rem 1fr; column-gap: var(--gap); align-items: baseline; } }
.way-head .way-meta { margin-top: .6rem; }
.way-example { font-size: 1rem; }
.way { scroll-margin-top: 1.5rem; }
