:root {
  --bg: #eef0e6;
  --ink: #1f2a22;
  --muted: #5d6a5c;
  --line: #d3d9c8;
  --tint: #f8f5ec;
  --tint-hover: #efe9d8;
  --accent: #3f5a47;
  --hero: #d3dcc0;
  --hero-ink: #1f2a22;
  --font: "Schibsted Grotesk", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { max-width: 100%; display: block; }

.wrap { max-width: 1080px; margin: 0 auto; padding-inline: 32px; }

/* Header */
header { padding-block: 32px; }
header .wrap { display: flex; justify-content: space-between; align-items: center; gap: 24px; }
header .name { font-weight: 600; text-decoration: none; letter-spacing: -0.01em; }
header nav { display: flex; gap: 32px; font-size: 0.95rem; }
header nav a { text-decoration: none; color: var(--muted); transition: color .15s; }
header nav a:hover, header nav a[aria-current] { color: var(--accent); }

/* Type */
h1, h2, h3 { margin: 0; font-weight: 500; letter-spacing: -0.03em; }
h1 { font-size: clamp(2.5rem, 7vw, 5.2rem); line-height: 1.04; text-wrap: balance; }
h2 { font-size: 0.85rem; font-weight: 500; letter-spacing: 0; color: var(--muted); }
p { margin: 0 0 1em; }
.small { font-size: 0.9rem; color: var(--muted); }
.link { color: var(--accent); text-underline-offset: 4px; }

/* Intro */
.intro { padding-block: 120px 120px; }
.intro h1 { max-width: 15em; }
.intro h1 span { color: var(--muted); }
.intro p { margin-top: 40px; max-width: 30em; color: var(--muted); font-size: 1.15rem; }

/* Sections */
.block { border-top: 1px solid var(--ink); padding-block: 28px 120px; display: grid; grid-template-columns: 200px 1fr; gap: 24px 48px; }

/* Project index */
.projects { list-style: none; margin: 0; padding: 0; }
.projects li { border-bottom: 1px solid var(--line); }
.projects li:first-child { margin-top: -8px; }
.projects a, .projects .row { display: grid; grid-template-columns: 1fr 180px; gap: 28px; align-items: center; padding-block: 28px; text-decoration: none; }
.projects .title { display: block; font-size: clamp(1.4rem, 2.6vw, 1.9rem); line-height: 1.2; letter-spacing: -0.025em; font-weight: 500; transition: color .15s; }
.projects .desc { display: block; margin-top: 8px; color: var(--muted); font-size: 0.98rem; max-width: 30em; }
.projects .year { display: block; margin-top: 14px; font-size: 0.85rem; color: var(--muted); }
.projects .thumb { aspect-ratio: 4 / 3; background: var(--tint); transition: background .2s; }
.projects a:hover .title { color: var(--accent); }
.projects a:hover .thumb { background: var(--tint-hover); }

.ph { background: var(--tint); aspect-ratio: 3 / 2; display: grid; place-items: center; font-size: 0.8rem; color: var(--muted); }

/* About */
.about-text { max-width: 36em; }
.about-text .lede { font-size: clamp(1.5rem, 2.8vw, 2rem); line-height: 1.3; letter-spacing: -0.02em; }
.about-text .ph { aspect-ratio: 4 / 5; max-width: 300px; margin-bottom: 48px; }
.methods { margin: 8px 0 0; padding: 0; list-style: none; columns: 2; column-gap: 40px; color: var(--muted); }
.methods li { padding: 5px 0; break-inside: avoid; }
dl.facts { margin: 48px 0 0; display: grid; grid-template-columns: 110px 1fr; gap: 10px 16px; font-size: 0.95rem; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; }

/* Contact */
.contact-line { font-size: clamp(1.8rem, 4.4vw, 3.2rem); line-height: 1.15; letter-spacing: -0.03em; max-width: 14em; }
.contact-line a { color: var(--accent); text-underline-offset: 8px; text-decoration-thickness: 2px; }
.contact-links { margin-top: 28px; display: flex; gap: 28px; font-size: 0.95rem; }

footer { padding-block: 28px 48px; font-size: 0.85rem; color: var(--muted); border-top: 1px solid var(--line); }

/* Case study */
.cs-head { padding-block: 72px 48px; }
.cs-head .back { font-size: 0.9rem; color: var(--muted); text-decoration: none; }
.cs-head .back:hover { color: var(--accent); }
.cs-head h1 { margin: 40px 0 28px; max-width: 14em; font-size: clamp(2.2rem, 5.5vw, 4rem); }
.cs-head .summary { font-size: 1.2rem; color: var(--muted); max-width: 30em; }
.facts-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 20px; margin-block: 48px; padding-block: 20px; border-block: 1px solid var(--ink); font-size: 0.95rem; }
.facts-row b { display: block; font-weight: 400; color: var(--muted); font-size: 0.85rem; }
.cs-cover { aspect-ratio: 16 / 8; margin-bottom: 32px; }
.cs-section { display: grid; grid-template-columns: 200px 1fr; gap: 16px 48px; padding-block: 48px; border-top: 1px solid var(--line); }
.cs-section > div { max-width: 38em; }
.cs-section figure { margin: 32px 0 0; }
.cs-section figure .ph { aspect-ratio: 16 / 9; }
.cs-section figcaption { font-size: 0.85rem; color: var(--muted); margin-top: 10px; }
.quote { font-size: 1.7rem; line-height: 1.3; letter-spacing: -0.02em; margin: 32px 0; color: var(--accent); }
.next { border-top: 1px solid var(--ink); padding-block: 32px 96px; }
.next a { font-size: clamp(1.6rem, 3.5vw, 2.4rem); letter-spacing: -0.025em; text-decoration: none; }
.next a:hover { color: var(--accent); }

@media (max-width: 760px) {
  body { font-size: 17px; }
  .wrap { padding-inline: 22px; }
  header .wrap { flex-direction: column; align-items: flex-start; gap: 12px; }
  header nav { flex-wrap: wrap; gap: 6px 22px; }
  .intro { padding-block: 56px; }
  .block { grid-template-columns: 1fr; gap: 12px; padding-bottom: 72px; }
  .cs-section { grid-template-columns: 1fr; gap: 8px; }
  .projects a, .projects .row { grid-template-columns: 1fr 96px; gap: 16px; }
  .methods { columns: 1; }
}

/* Writing */
.block-lead { color: var(--muted); max-width: 32em; margin-bottom: 36px; }
.intro-links { margin-top: -12px; font-size: 0.95rem; }
.feature { display: block; text-decoration: none; background: var(--tint); padding: 36px 36px 32px; margin-bottom: 8px; transition: background .2s; }
.feature:hover { background: var(--tint-hover); }
.feature-title { display: block; font-size: clamp(1.6rem, 3.2vw, 2.4rem); line-height: 1.15; letter-spacing: -0.03em; font-weight: 500; margin: 12px 0 14px; max-width: 18em; }
.feature-excerpt { display: block; color: var(--muted); max-width: 34em; margin-bottom: 20px; }
.post-list { display: block; }
.post { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; padding-block: 20px; border-bottom: 1px solid var(--line); text-decoration: none; }
.post:first-child { border-top: 1px solid var(--line); }
.post-title { display: block; font-size: 1.15rem; line-height: 1.3; letter-spacing: -0.015em; font-weight: 500; transition: color .15s; }
.post-meta { display: block; font-size: 0.85rem; color: var(--muted); margin-top: 4px; }
.feature .post-meta { margin: 0; }
.post-go { font-size: 0.9rem; color: var(--accent); white-space: nowrap; }
.post:hover .post-title { color: var(--accent); }
.more { margin-top: 28px; font-size: 0.95rem; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.chip { font: inherit; font-size: 0.9rem; padding: 6px 14px; border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; border-radius: 0; }
.chip:hover { color: var(--ink); border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
@media (max-width: 760px) {
  .feature { padding: 24px 22px; }
  .post { flex-direction: column; gap: 6px; }
}


/* Colour hero */
.hero { background: var(--hero); color: var(--hero-ink); }
.hero header { padding-block: 28px 0; }
.hero header nav a { color: inherit; opacity: .72; }
.hero header nav a:hover { opacity: 1; color: inherit; text-decoration: underline; text-underline-offset: 5px; }
.hero .intro { padding-block: 96px 120px; }
.hero .intro h1 span { color: inherit; opacity: .68; }
.hero .intro p { color: inherit; opacity: .85; }
.hero .intro-links .link { color: inherit; text-decoration-thickness: 2px; }
@media (max-width: 760px) { .hero .intro { padding-block: 56px 72px; } }

/* Experience list: no thumbnail */
.roles .row { grid-template-columns: 1fr; }
.roles .year { margin-top: 10px; }

/* Article */
.article { max-width: 760px; padding-bottom: 72px; }
.article .back { display: inline-block; margin-top: 48px; font-size: 0.9rem; color: var(--muted); text-decoration: none; }
.article .back:hover { color: var(--accent); }
.post-meta { margin: 48px 0 16px; font-size: 0.9rem; color: var(--muted); }
.article h1 { font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.1; }
.article .subtitle { margin: 20px 0 0; font-size: 1.25rem; line-height: 1.4; color: var(--muted); }
.article .cover { width: 100%; margin: 40px 0 0; }
.prose { margin-top: 48px; font-size: 1.1rem; line-height: 1.7; }
.prose p { margin: 0 0 1.3em; }
.prose h2 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 500; letter-spacing: -0.025em; line-height: 1.2; color: var(--ink); margin: 2.2em 0 0.7em; }
.prose h3 { font-size: 1.25rem; font-weight: 500; letter-spacing: -0.015em; margin: 1.9em 0 0.6em; }
.prose ul, .prose ol { margin: 0 0 1.3em; padding-left: 1.3em; }
.prose li { margin: 0.4em 0; padding-left: 0.2em; }
.prose a { color: var(--accent); text-underline-offset: 4px; }
.prose blockquote { margin: 1.6em 0; padding-left: 1.2em; border-left: 3px solid var(--accent); font-size: 1.25rem; line-height: 1.45; letter-spacing: -0.015em; }
.prose img { max-width: 100%; height: auto; margin: 1.6em 0; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.8em 0; font-size: 0.95rem; line-height: 1.5; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 14px 16px; border-bottom: 1px solid var(--line); min-width: 180px; }
.prose th { font-size: 0.8rem; font-weight: 500; color: var(--muted); border-bottom: 1px solid var(--ink); }
.post-actions { display: flex; flex-wrap: wrap; gap: 12px 28px; margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--ink); font-size: 0.95rem; }
.btn-link { color: var(--accent); text-underline-offset: 4px; }
.byline { margin-top: 20px; font-size: 0.9rem; color: var(--muted); }
.byline a { color: inherit; }

/* Portrait */
.about-text .portrait { display: block; width: 100%; height: auto; max-width: 340px; aspect-ratio: 1 / 1; object-fit: cover; margin-bottom: 48px; }

/* Companies */
.companies { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); border-block: 1px solid var(--line); }
.companies li { padding: 44px 12px; display: grid; place-items: center; text-align: center; }
.companies li + li { border-left: 1px solid var(--line); }
.companies img { max-width: 100%; max-height: 34px; width: auto; height: auto; filter: grayscale(1); opacity: .7; transition: filter .2s, opacity .2s; }
.companies li:hover img { filter: none; opacity: 1; }
.logo-text { font-size: 1.05rem; font-weight: 600; letter-spacing: -0.02em; line-height: 1.25; color: var(--muted); transition: color .2s; }
.companies li:hover .logo-text { color: var(--ink); }
@media (max-width: 760px) {
  .companies { grid-template-columns: repeat(2, 1fr); }
  .companies li { padding: 28px 12px; border-left: 0; border-bottom: 1px solid var(--line); }
  .companies li + li { border-left: 0; }
  .companies li:nth-child(odd) { border-right: 1px solid var(--line); }
  .companies li:last-child { grid-column: 1 / -1; border-right: 0; border-bottom: 0; }
}

/* Template-driven content */
.about-text .label { margin-top: 48px; }
.about-text .methods { margin-top: 8px; }
.projects .no-thumb { grid-template-columns: 1fr; }
.projects img.thumb { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; background: var(--tint); }

/* Images inside articles */
.prose img { display: block; max-width: 100%; height: auto; }
.prose figure { margin: 2em 0; }
.prose figure img { width: 100%; margin: 0; }
.prose figcaption { margin-top: 10px; font-size: 0.85rem; line-height: 1.5; color: var(--muted); }

/* Staging preview marker (only present in staging builds) */
.staging-bar { position: sticky; top: 0; z-index: 50; padding: 7px 16px; background: #1f2a22; color: #eef0e6; font-size: 0.8rem; text-align: center; letter-spacing: 0.01em; }
