:root {
  color-scheme: light;
  --paper: #f4f2ec;
  --paper-raised: #fbfaf6;
  --ink: #181d16;
  --muted: #5d6258;
  --soft: #8d9187;
  --faint: rgba(24, 29, 22, 0.12);
  --hairline: rgba(24, 29, 22, 0.08);

  --lilac: #c9b8ff;
  --pink: #f3a8c4;
  --coral: #fb9a6b;
  --amber: #f3c56c;
  --lime: #dcf27e;
  --sky: #a9c9ff;
  --mint: #b4ead2;

  --gradient-sunrise: linear-gradient(180deg, var(--lilac) 0%, var(--pink) 34%, var(--coral) 60%, var(--amber) 82%, var(--lime) 100%);
  --gradient-citrus: linear-gradient(160deg, var(--coral) 0%, var(--amber) 48%, var(--lime) 100%);
  --gradient-dusk: linear-gradient(160deg, var(--sky) 0%, var(--lilac) 45%, var(--pink) 100%);
  --gradient-meadow: linear-gradient(160deg, var(--mint) 0%, var(--lime) 55%, var(--amber) 100%);
  --gradient-text: linear-gradient(90deg, #f0766b 0%, var(--coral) 45%, #e98bb4 100%);

  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .6 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");

  --font-sans: "Inter Tight", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --shadow: 0 1px 2px rgba(24, 29, 22, 0.06), 0 18px 48px -18px rgba(24, 29, 22, 0.28);
  --max: 1280px;
  --gutter: clamp(16px, 4vw, 56px);
  --radius: 14px;
  --radius-small: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  counter-reset: section;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

p {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.65;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  color: var(--ink);
  font-weight: 500;
  letter-spacing: -0.02em;
}

h1 {
  max-width: 760px;
  margin-bottom: 18px;
  font-size: clamp(2rem, 3.6vw, 3.1rem);
  line-height: 1.08;
}

h2 {
  max-width: 720px;
  margin-bottom: 18px;
  font-size: clamp(1.45rem, 2.3vw, 2rem);
  line-height: 1.18;
}

h3 {
  font-size: 1.15rem;
  line-height: 1.3;
}

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

:focus-visible {
  outline: 2px solid var(--coral);
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Gradient surfaces with film grain */

.gradient-surface {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--gradient-sunrise);
}

.gradient-surface::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background-image: var(--grain);
  mix-blend-mode: soft-light;
  opacity: 0.55;
}

.gradient-text {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Header */

.skip-link {
  position: absolute;
  left: 16px;
  top: 16px;
  z-index: 100;
  transform: translateY(-160%);
  border-radius: var(--radius-small);
  background: var(--ink);
  color: var(--paper);
  padding: 10px 14px;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  padding: 18px max(var(--gutter), calc((100% - var(--max)) / 2 + var(--gutter)));
  border-bottom: 1px solid var(--hairline);
  background: rgba(244, 242, 236, 0.82);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand::before {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--gradient-sunrise);
  content: "";
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 26px);
  color: var(--muted);
  font-size: 0.9rem;
}

.site-nav a {
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--ink);
}

.nav-link-out {
  color: var(--ink);
}

.nav-link-out::after {
  content: " \2197";
}

/* Layout */

.section-grid {
  display: grid;
  grid-template-columns: minmax(120px, 200px) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 72px);
  width: min(var(--max), 100%);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.section-kicker {
  counter-increment: section;
  color: var(--soft);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.5;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.section-kicker::before {
  display: block;
  margin-bottom: 6px;
  color: var(--coral);
  content: counter(section, decimal-leading-zero);
}

.section-kicker a,
.section-kicker span {
  color: var(--muted);
  text-decoration: none;
}

.section-kicker a:hover {
  color: var(--ink);
}

.eyebrow {
  margin-bottom: 18px;
  color: var(--soft);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
}

/* Hero */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 380px);
  gap: clamp(32px, 6vw, 96px);
  align-items: stretch;
  width: min(var(--max), 100%);
  margin: 0 auto;
  padding: clamp(56px, 8vw, 112px) var(--gutter) clamp(64px, 8vw, 120px);
}

.hero-content {
  align-self: center;
}

.hero-echo {
  margin: 0 0 32px;
  padding: 0;
  list-style: none;
  font-size: clamp(1.35rem, 2.4vw, 2rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.hero-echo li {
  color: rgba(24, 29, 22, 0.3);
}

.hero-echo li:nth-child(2) {
  color: rgba(24, 29, 22, 0.22);
}

.hero-echo li:nth-child(3) {
  color: rgba(24, 29, 22, 0.15);
}

.hero-echo li:nth-child(4) {
  color: rgba(24, 29, 22, 0.1);
}

.hero-copy {
  max-width: 600px;
  font-size: 1.06rem;
}

.hero-panel {
  display: flex;
  min-height: 420px;
  flex-direction: column;
  justify-content: space-between;
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  animation: glow 14s ease-in-out infinite alternate;
  background-size: 100% 160%;
}

.hero-portrait {
  width: 136px;
  height: 136px;
  align-self: center;
  margin: auto 0;
  border: 3px solid rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  object-fit: cover;
}

.hero-stats {
  display: grid;
  gap: 14px;
  /* Top margin matches the panel padding, so the portrait sits centred above */
  margin: 22px 0 20px;
}

.hero-stats div {
  display: flex;
  flex-direction: column-reverse;
  gap: 2px;
  border-top: 1px solid rgba(24, 29, 22, 0.18);
  padding-top: 10px;
}

.hero-stats dt {
  color: rgba(24, 29, 22, 0.62);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.hero-stats dd {
  margin: 0;
  color: var(--ink);
  font-size: 1.6rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.hero-panel-caption {
  display: grid;
  gap: 2px;
  margin: 0;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.45;
}

.hero-panel-caption span:last-child {
  color: rgba(24, 29, 22, 0.62);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--faint);
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
  transition: transform 180ms ease, background-color 180ms ease;
}

.button-primary {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

.button-secondary {
  background: var(--paper-raised);
  color: var(--ink);
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
}

.button-secondary:hover {
  background: #fff;
}

/* Sections */

.work-section,
.text-section,
.skills-section {
  padding-top: clamp(56px, 8vw, 104px);
  padding-bottom: clamp(56px, 8vw, 104px);
  border-top: 1px solid var(--hairline);
}

.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 820px;
  padding: 0;
  margin: 28px 0 0;
  list-style: none;
}

.skills-list li,
.skill-pill {
  border: 1px solid var(--faint);
  border-radius: 999px;
  background: var(--paper-raised);
  color: var(--ink);
  font-size: 0.86rem;
  line-height: 1.2;
  padding: 8px 13px;
}

.skills-list li:has(.skill-pill) {
  border: 0;
  background: none;
  padding: 0;
}

.skill-pill {
  cursor: pointer;
  font-family: inherit;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease;
}

.skill-pill:hover {
  border-color: rgba(24, 29, 22, 0.28);
  background: #fff;
}

.skill-pill[aria-expanded="true"] {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

.skill-detail {
  position: relative;
  isolation: isolate;
  max-width: 820px;
  margin-top: 20px;
  overflow: hidden;
  border-radius: var(--radius);
  padding: 20px 24px 22px;
  background: var(--gradient-dusk);
  animation: rise 280ms ease both;
}

.skill-detail::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background-image: var(--grain);
  mix-blend-mode: soft-light;
  opacity: 0.55;
}

.skill-detail[hidden] {
  display: none;
}

.skill-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.skill-detail-close {
  border: 1px solid rgba(24, 29, 22, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 0.8rem;
  padding: 5px 12px;
}

.skill-detail-close:hover {
  background: rgba(255, 255, 255, 0.8);
}

.skill-detail-title {
  margin: 0;
}

.skill-detail-text {
  max-width: 640px;
  margin: 0;
  color: rgba(24, 29, 22, 0.78);
  font-size: 0.96rem;
}

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

.section-intro {
  max-width: 620px;
}

/* Project cards */

.project-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 20px;
  width: min(var(--max), 100%);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.project-card {
  position: relative;
  grid-column: span 4;
  overflow: hidden;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background: var(--paper-raised);
  animation: rise 520ms ease both;
  animation-delay: var(--delay);
  transition: box-shadow 300ms ease, transform 300ms ease;
}

.project-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.project-card-featured {
  grid-column: span 6;
}

.project-image-link {
  position: relative;
  isolation: isolate;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  padding: 9% 0 0 9%;
  background: var(--gradient-sunrise);
}

.project-card:nth-child(4n + 2) .project-image-link {
  background: var(--gradient-dusk);
}

.project-card:nth-child(4n + 3) .project-image-link {
  background: var(--gradient-citrus);
}

.project-card:nth-child(4n + 4) .project-image-link {
  background: var(--gradient-meadow);
}

.project-image-link::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background-image: var(--grain);
  mix-blend-mode: soft-light;
  opacity: 0.55;
}

.project-lock-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 6px 11px;
  background: rgba(24, 29, 22, 0.82);
  backdrop-filter: blur(6px);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.project-lock-badge svg {
  width: 12px;
  height: 12px;
}

.project-image-link img {
  width: 100%;
  height: 100%;
  border-top-left-radius: var(--radius-small);
  object-fit: cover;
  object-position: left top;
  box-shadow: -1px -1px 0 rgba(255, 255, 255, 0.5), 0 20px 40px -12px rgba(24, 29, 22, 0.35);
  transition: transform 600ms ease;
}

.project-card:hover img {
  transform: translate(-6px, -6px);
}

.project-card-body {
  padding: 20px 22px 24px;
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--soft);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.project-meta span:not(:last-child)::after {
  margin-left: 8px;
  color: var(--faint);
  content: "/";
}

.project-card h3 {
  margin-bottom: 8px;
}

.project-card h3 a {
  text-decoration: none;
}

.project-card:hover h3 a {
  text-decoration: underline;
}

/* Stretch the title link over the whole card */
.project-card-link::after {
  position: absolute;
  inset: 0;
  z-index: 1;
  content: "";
  border-radius: inherit;
}

.project-card-link:focus-visible {
  outline: none;
}

.project-card:has(.project-card-link:focus-visible) {
  outline: 2px solid var(--coral);
  outline-offset: 3px;
}

.project-card p {
  min-height: 3.3em;
  margin-bottom: 0;
  font-size: 0.94rem;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 16px;
}

.tag-row span,
.highlight-list li {
  border: 1px solid var(--faint);
  border-radius: 999px;
  padding: 4px 10px;
  color: var(--muted);
  font-size: 0.76rem;
}

/* Approach, about, story */

.approach-grid,
.story-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 32px;
  margin-top: 32px;
}

.approach-intro {
  max-width: 680px;
  margin-top: 20px;
}

.approach-grid-three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.approach-more {
  margin: 32px 0 0;
}

.approach-grid article,
.story-grid article {
  border-top: 1px solid var(--faint);
  padding-top: 18px;
}

.approach-grid h3,
.story-grid h2 {
  margin-bottom: 8px;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.approach-grid p,
.story-grid p {
  font-size: 0.95rem;
}

.about-section p {
  max-width: 680px;
}

/* Footer */

.site-footer {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px;
  width: min(var(--max), calc(100% - var(--gutter) * 2));
  margin: clamp(24px, 4vw, 48px) auto var(--gutter);
  overflow: hidden;
  border-radius: var(--radius);
  padding: clamp(40px, 6vw, 80px) clamp(24px, 5vw, 64px);
  background: var(--gradient-citrus);
}

.site-footer::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background-image: var(--grain);
  mix-blend-mode: soft-light;
  opacity: 0.6;
}

.site-footer .eyebrow {
  color: rgba(24, 29, 22, 0.62);
}

.site-footer h2 {
  max-width: 560px;
  margin-bottom: 0;
  font-size: clamp(1.7rem, 3vw, 2.5rem);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-self: end;
  font-weight: 500;
}

/* Case study */

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  border: 1px solid var(--faint);
  border-radius: 999px;
  padding: 8px 16px 8px 12px;
  background: var(--paper-raised);
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 180ms ease, border-color 180ms ease;
}

.back-link span {
  transition: transform 180ms ease;
}

.back-link:hover,
.back-link:focus-visible {
  border-color: rgba(24, 29, 22, 0.28);
  background: #fff;
}

.back-link:hover span,
.back-link:focus-visible span {
  transform: translateX(-3px);
}

.case-hero {
  padding-top: clamp(48px, 7vw, 96px);
  padding-bottom: 40px;
}

.case-hero h1 {
  font-size: clamp(2.1rem, 4vw, 3.4rem);
}

.case-details {
  display: flex;
  flex-wrap: wrap;
  gap: 1px;
  margin: 32px 0 0;
  overflow: hidden;
  border: 1px solid var(--faint);
  border-radius: var(--radius-small);
  background: var(--faint);
}

.case-details div {
  flex: 1 1 180px;
  background: var(--paper-raised);
  padding: 16px;
}

.case-details dt {
  margin-bottom: 6px;
  color: var(--soft);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.case-details dd {
  margin: 0;
  font-size: 0.94rem;
  line-height: 1.45;
}

.results-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1px;
  padding: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--faint);
  border-radius: var(--radius-small);
  background: var(--faint);
  list-style: none;
}

.results-grid li {
  display: grid;
  flex: 1 1 240px;
  align-content: start;
  gap: 8px;
  background: var(--paper-raised);
  padding: 20px;
}

.results-grid strong {
  font-size: clamp(1.4rem, 2.6vw, 2rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.results-grid span {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.case-hero-image,
.case-not-found {
  width: min(var(--max), calc(100% - (var(--gutter) * 2)));
  margin: 0 auto;
}

.case-hero-image {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: var(--radius);
  padding: clamp(20px, 5vw, 64px) clamp(20px, 5vw, 64px) 0;
  background: var(--gradient-sunrise);
}

.case-hero-image::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background-image: var(--grain);
  mix-blend-mode: soft-light;
  opacity: 0.55;
}

.case-hero-image img {
  width: 100%;
  max-height: 680px;
  border-radius: var(--radius-small) var(--radius-small) 0 0;
  object-fit: cover;
  object-position: top;
  box-shadow: 0 24px 60px -20px rgba(24, 29, 22, 0.4);
}

.image-zoom-trigger {
  display: block;
  width: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  cursor: zoom-in;
  font: inherit;
  text-align: inherit;
}

.image-zoom-trigger:focus-visible {
  outline: 2px solid var(--coral);
  outline-offset: 4px;
}

.case-story,
.evidence-section {
  padding-top: clamp(56px, 8vw, 104px);
  padding-bottom: clamp(24px, 4vw, 64px);
}

.case-lock {
  min-height: 60vh;
  padding-top: clamp(48px, 7vw, 96px);
  padding-bottom: clamp(56px, 8vw, 104px);
}

.case-lock-panel {
  max-width: 640px;
}

.case-lock-panel h1 {
  margin-bottom: 16px;
  font-size: clamp(2.1rem, 4vw, 3.4rem);
}

.case-lock-panel p:not(.eyebrow) {
  font-size: 1rem;
}

.case-lock-form {
  margin-top: 24px;
}

.case-lock-form label {
  display: block;
  margin-bottom: 8px;
  color: var(--soft);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.case-lock-field {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.case-lock-field input {
  flex: 1 1 220px;
  min-height: 42px;
  border: 1px solid var(--faint);
  border-radius: 999px;
  padding: 10px 18px;
  background: var(--paper-raised);
  color: var(--ink);
  font: inherit;
  font-size: 0.95rem;
}

.case-lock-field input:focus-visible {
  outline: 2px solid var(--coral);
  outline-offset: 2px;
}

.case-lock-field input[aria-invalid="true"] {
  border-color: #c4553a;
}

.case-lock-field .button:disabled {
  opacity: 0.6;
  transform: none;
}

.case-lock-error {
  margin: 10px 0 0;
  color: #b0452c;
  font-size: 0.9rem;
}

.highlight-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0;
  margin: 0 0 28px;
  list-style: none;
}

.case-gallery {
  display: grid;
  gap: 36px;
}

.case-figure {
  margin: 0;
}

.case-figure img {
  width: 100%;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-small);
  background: var(--paper-raised);
  box-shadow: var(--shadow);
}

.case-figure figcaption {
  max-width: 680px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.55;
}

.case-figure figcaption::before {
  margin-right: 8px;
  color: var(--coral);
  font-family: var(--font-mono);
  content: "\2197";
}

.case-gallery-pair {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 36px 24px;
}

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

.case-gallery-mobile {
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 36px 24px;
}

.case-gallery-mobile .case-figure img {
  border-radius: 20px;
}

@media (max-width: 480px) {
  .case-gallery-mobile {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 16px;
  }
}

.journey {
  position: relative;
  display: grid;
  gap: 28px;
  padding: 0 0 0 64px;
  margin: 0;
  list-style: none;
}

.journey::before {
  position: absolute;
  top: 20px;
  bottom: 20px;
  left: 19px;
  width: 2px;
  border-radius: 1px;
  background: var(--gradient-sunrise);
  content: "";
}

.journey-step {
  position: relative;
  border: 1px solid var(--faint);
  border-radius: var(--radius-small);
  background: var(--paper-raised);
  padding: 20px 22px;
}

.journey-dot {
  position: absolute;
  top: 16px;
  left: -64px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 3px solid var(--paper);
  border-radius: 50%;
  background: var(--lilac);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
}

.journey-step:nth-child(2) .journey-dot { background: var(--pink); }
.journey-step:nth-child(3) .journey-dot { background: var(--coral); }
.journey-step:nth-child(4) .journey-dot { background: var(--amber); }
.journey-step:nth-child(5) .journey-dot { background: var(--lime); }

.journey-step h4 {
  margin: 0 0 14px;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.journey-step dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 28px;
  margin: 0;
}

.journey-step dt {
  margin-bottom: 6px;
  color: var(--soft);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.journey-step dd {
  margin: 0;
  font-size: 0.94rem;
  line-height: 1.55;
}

@media (max-width: 720px) {
  .journey {
    padding-left: 52px;
  }

  .journey::before {
    left: 15px;
  }

  .journey-dot {
    left: -52px;
    width: 32px;
    height: 32px;
    font-size: 0.7rem;
  }

  .journey-step dl {
    grid-template-columns: 1fr;
  }
}

.case-phase + .case-phase {
  margin-top: clamp(56px, 8vw, 96px);
}

.case-phase-header {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 28px;
  border-top: 1px solid var(--faint);
  padding-top: 24px;
}

.case-phase-label {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  height: 52px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--gradient-sunrise);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 500;
}

.case-phase:nth-of-type(2) .case-phase-label {
  background: var(--gradient-dusk);
}

.case-phase-header h3 {
  margin-bottom: 6px;
  font-size: clamp(1.2rem, 1.8vw, 1.5rem);
}

.case-phase-header p {
  max-width: 640px;
  margin-bottom: 0;
  font-size: 0.96rem;
}

.case-phase-header p + p {
  margin-top: 12px;
}

.case-end {
  padding-top: clamp(24px, 4vw, 48px);
  padding-bottom: clamp(24px, 4vw, 48px);
}

.case-not-found {
  min-height: 56vh;
  padding-top: 96px;
}

/* Lightbox */

.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  overflow: auto;
  background: rgba(244, 242, 236, 0.94);
  backdrop-filter: blur(8px);
  padding: clamp(16px, 3vw, 40px);
}

.image-lightbox[hidden] {
  display: none;
}

.image-lightbox-stage {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
}

.image-lightbox-stage img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(100dvh - 2 * clamp(16px, 3vw, 40px));
  object-fit: contain;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-small);
  background: var(--paper-raised);
  box-shadow: var(--shadow);
}

.image-lightbox-close {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 101;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 9px 16px;
}

.has-open-lightbox {
  overflow: hidden;
}

/* Motion */

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes glow {
  from {
    background-position: 50% 0%;
  }
  to {
    background-position: 50% 100%;
  }
}

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

/* Responsive */

@media (max-width: 980px) {
  .site-header {
    position: static;
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .site-nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .section-grid,
  .hero {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    min-height: 220px;
    flex-direction: row;
    align-items: flex-end;
    gap: 28px;
  }

  .hero-portrait {
    width: 96px;
    height: 96px;
    align-self: auto;
    margin: 0;
  }

  .hero-stats {
    flex: 1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: end;
    gap: 20px;
    margin: 0;
  }

  .hero-stats dd {
    font-size: 1.3rem;
  }

  .project-card,
  .project-card-featured {
    grid-column: span 6;
  }

  .case-details {
    flex-direction: column;
  }

  .case-details div {
    flex-basis: auto;
  }
}

@media (max-width: 680px) {
  .hero-panel {
    min-height: 180px;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .hero-stats {
    grid-template-columns: 1fr;
    gap: 14px;
    margin: 28px 0 20px;
  }

  .hero-stats dd {
    font-size: 1.6rem;
  }

  .approach-grid,
  .approach-grid-three,
  .story-grid,
  .site-footer {
    grid-template-columns: 1fr;
  }

  .project-grid {
    grid-template-columns: 1fr;
  }

  .project-card,
  .project-card-featured {
    grid-column: span 1;
  }

  .project-card p {
    min-height: 0;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .button {
    width: 100%;
  }
}

/* Blog */

.blog-hero {
  padding-top: clamp(48px, 7vw, 96px);
  padding-bottom: clamp(32px, 5vw, 56px);
}

.blog-hero h1 {
  font-size: clamp(2.1rem, 4vw, 3.4rem);
}

.post-list {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}

.post-item {
  border-top: 1px solid var(--faint);
  padding: 28px 0 32px;
}

.post-item:last-child {
  border-bottom: 1px solid var(--faint);
}

.post-item h2 {
  margin-bottom: 10px;
  font-size: clamp(1.3rem, 2vw, 1.65rem);
}

.post-item h2 a {
  text-decoration: none;
}

.post-item h2 a:hover {
  text-decoration: underline;
}

.post-item p:not(.project-meta) {
  max-width: 640px;
  margin-bottom: 0;
}

.post-empty {
  border-top: 1px solid var(--faint);
  padding-top: 28px;
}

.post-draft {
  display: inline-block;
  margin-left: 12px;
  border-radius: 999px;
  padding: 3px 10px;
  background: var(--amber);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  vertical-align: middle;
}

.prose {
  max-width: 680px;
  padding-bottom: clamp(24px, 4vw, 48px);
}

.prose > :first-child {
  margin-top: 0;
}

.prose p,
.prose li {
  color: var(--ink);
  font-size: 1.06rem;
  line-height: 1.75;
}

.prose p,
.prose ul,
.prose ol,
.prose pre,
.prose table {
  margin: 0 0 1.4em;
}

.prose h2 {
  margin: 2.2em 0 0.6em;
  font-size: clamp(1.35rem, 2vw, 1.6rem);
}

.prose h3 {
  margin: 1.8em 0 0.5em;
}

.prose li + li {
  margin-top: 0.35em;
}

.prose a {
  text-decoration-color: var(--coral);
}

.prose img {
  margin: 2em 0;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-small);
  box-shadow: var(--shadow);
}

.prose mark {
  border-radius: 3px;
  padding: 0 3px;
  background: var(--lime);
  color: var(--ink);
}

.prose code {
  border-radius: 4px;
  padding: 0.1em 0.35em;
  background: var(--hairline);
  font-family: var(--font-mono);
  font-size: 0.88em;
}

.prose pre {
  overflow-x: auto;
  border-radius: var(--radius-small);
  padding: 18px 20px;
  background: var(--ink);
  color: var(--paper);
}

.prose pre code {
  padding: 0;
  background: none;
  color: inherit;
}

.prose blockquote {
  margin: 1.8em 0;
  border-left: 3px solid var(--coral);
  padding-left: 20px;
}

.prose blockquote p {
  color: var(--muted);
  font-size: 1.15rem;
}

.prose hr {
  margin: 2.5em 0;
  border: 0;
  border-top: 1px solid var(--faint);
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.prose th,
.prose td {
  border-bottom: 1px solid var(--faint);
  padding: 10px 12px 10px 0;
  text-align: left;
}

.callout {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin: 1.8em 0;
  border-radius: var(--radius-small);
  padding: 18px 22px;
  background: var(--gradient-dusk);
}

.callout-tip,
.callout-success,
.callout-example {
  background: var(--gradient-meadow);
}

.callout-warning,
.callout-caution,
.callout-danger,
.callout-important {
  background: var(--gradient-citrus);
}

.callout::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background-image: var(--grain);
  mix-blend-mode: soft-light;
  opacity: 0.55;
}

.callout p {
  font-size: 1rem;
}

.callout > :last-child {
  margin-bottom: 0;
}

.prose .callout-title {
  margin-bottom: 6px;
  font-weight: 600;
}

.post-pager {
  padding-bottom: clamp(24px, 4vw, 48px);
}

.post-pager > div {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  max-width: 680px;
  border-top: 1px solid var(--faint);
  padding-top: 24px;
}

.post-pager a {
  display: flex;
  flex-direction: column;
  font-weight: 500;
  text-decoration: none;
}

.post-pager a:last-child:not(:first-child) {
  text-align: right;
}

.post-pager .eyebrow {
  margin-bottom: 4px;
}

.post-pager a:hover {
  text-decoration: underline;
}

.post-cover {
  width: min(880px, calc(100% - (var(--gutter) * 2)));
  margin-bottom: clamp(40px, 6vw, 72px);
  padding: clamp(16px, 4vw, 40px);
}

.post-cover img {
  max-height: none;
  border-radius: var(--radius-small);
}

.post-figure {
  margin: 2em 0;
}

.post-figure img {
  margin: 0;
}

.post-figure figcaption {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.55;
}

.post-figure figcaption::before {
  margin-right: 8px;
  color: var(--coral);
  font-family: var(--font-mono);
  content: "\2197";
}

.post-cover figcaption {
  margin-top: 12px;
  color: rgba(24, 29, 22, 0.62);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-align: right;
}
