:root {
  --red: #C4453A;
  --yellow: #E5A92E;
  --ink: #3B3733;
  --cream: #F9EEDF;
  --stone: #BEBDB5;
  --display: 'Josefin Sans', system-ui, sans-serif;
  --body: 'Karla', system-ui, sans-serif;
  --gutter: clamp(16px, 3vw, 44px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--stone); color: var(--ink); font-family: var(--body); font-size: 18px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
.wrap { max-width: 1440px; margin: 0 auto; padding: 0 var(--gutter) var(--gutter); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: var(--cream); padding: 8px 12px; z-index: 10; }

/* type */
.display { font-family: var(--display); font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; line-height: 1.1; }
.label { font-size: 13px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; }
.h-xl { font-family: var(--display); font-weight: 700; text-transform: uppercase; font-size: clamp(48px, 6.4vw, 96px); line-height: 0.95; letter-spacing: 0.02em; margin: 0; }
.h-l { font-family: var(--display); font-weight: 700; text-transform: uppercase; font-size: clamp(34px, 3.8vw, 56px); line-height: 1.02; letter-spacing: 0.02em; margin: 0; }

/* header */
.site-header { display: flex; justify-content: space-between; align-items: center; gap: 16px 24px; flex-wrap: wrap; padding: 26px 0 22px; }
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; font-family: var(--display); font-weight: 700; text-transform: uppercase; font-size: 20px; letter-spacing: 0.14em; }
.logo-mark { display: flex; }
.logo-mark span { width: 14px; height: 28px; }
.logo-mark span:nth-child(1) { background: var(--red); border-radius: 14px 0 0 14px; }
.logo-mark span:nth-child(2) { background: var(--yellow); }
.logo-mark span:nth-child(3) { background: var(--ink); }
.nav { display: flex; gap: 8px 28px; flex-wrap: wrap; font-family: var(--display); font-weight: 600; text-transform: uppercase; font-size: 15px; letter-spacing: 0.14em; }
.nav a { text-decoration: none; padding: 6px 0 3px; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { border-color: currentColor; }

/* tiles */
.row { display: flex; flex-wrap: wrap; }
.tile { padding: 22px 24px; display: flex; flex-direction: column; justify-content: space-between; gap: 24px; text-decoration: none; min-width: 0; }
.tile-top, .tile-bottom { display: flex; justify-content: space-between; gap: 16px; }
.tile-bottom { align-items: flex-end; }
.tile-bottom .display { font-size: clamp(24px, 2.4vw, 36px); }
.wide { flex: 2 1 520px; }
.narrow { flex: 1 1 340px; }
.spacer { flex: 0 1 300px; }
.bg-red { background: var(--red); color: var(--cream); }
.bg-yellow { background: var(--yellow); color: var(--ink); }
.bg-ink { background: var(--ink); color: var(--cream); }
.bg-cream { background: var(--cream); color: var(--ink); }

.shot { aspect-ratio: 16 / 10; width: 100%; overflow: hidden; background: rgba(0, 0, 0, 0.08); }
.shot img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform 0.6s ease; }
.project:hover .shot img { transform: scale(1.03); }
.project .tagline { margin: 0; font-size: 16px; line-height: 1.45; opacity: 0.85; max-width: 46ch; }
.project .tile-bottom { flex-direction: column; align-items: stretch; gap: 10px; }
.project .tile-bottom > div { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; }
.project .tile-bottom .display { font-size: clamp(22px, 2vw, 30px); }
.project .tile-bottom h3 { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.project .tile-bottom h3 + span { flex-shrink: 0; }

/* fixed two-line text blocks so images line up across a row */
.project { justify-content: flex-start; }
.project .tile-bottom { margin-top: auto; }
.project .tagline, .project .tile-bottom h3 { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.project .tagline { min-height: calc(2 * 1.45em); }
.project .tile-bottom h3 { min-height: calc(2 * 1.1em); overflow-wrap: normal; }

/* websites page: plain two-column grid */
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-2 .project[hidden] { display: none; }
@media (max-width: 800px) { .grid-2 { grid-template-columns: 1fr; } }

/* home mosaic: images stretch to the row height, cropped from the top */
@media (min-width: 900px) {
  .mosaic .project .shot { flex: 1; aspect-ratio: auto; min-height: clamp(260px, 24vw, 380px); position: relative; }
  .mosaic .project .shot img { position: absolute; inset: 0; }
}

/* hero */
.hero { min-height: clamp(360px, 38vw, 540px); position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; }
.hero .tile-top { padding: 22px 24px; }
.cropped { margin: 0 0 -0.12em -0.04em; font-family: var(--display); font-weight: 700; text-transform: uppercase; font-size: clamp(96px, 15vw, 230px); line-height: 1; letter-spacing: -0.01em; white-space: nowrap; }
.cropped.sm { font-size: clamp(84px, 12vw, 190px); }
.circle { position: absolute; left: 50%; top: 54%; transform: translate(-50%, -50%); width: clamp(110px, 12vw, 180px); aspect-ratio: 1; border: 1px solid var(--cream); border-radius: 50%; background: var(--red); display: flex; align-items: center; justify-content: center; text-decoration: none; font-size: clamp(44px, 4.6vw, 70px); line-height: 1; transition: transform 0.3s ease; }
.circle:hover { transform: translate(-50%, -50%) rotate(45deg); }

.section { padding-top: clamp(64px, 8vw, 120px); }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 12px 24px; padding-bottom: 20px; }
.section-head p { margin: 0; }

/* filters */
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filters button { font: inherit; font-size: 13px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; cursor: pointer; background: transparent; color: var(--ink); border: 1px solid var(--ink); border-radius: 999px; padding: 8px 14px; }
.filters button[aria-pressed="true"] { background: var(--ink); color: var(--cream); }

.pills { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.pills li { border: 1px solid currentColor; border-radius: 999px; padding: 8px 14px; }

/* graphics */
.gallery { columns: 2 340px; column-gap: 0; }
.gallery figure { margin: 0; break-inside: avoid; }
.gallery figcaption { padding: 18px 24px 22px; display: flex; justify-content: space-between; gap: 16px; align-items: flex-end; }

.hero-portrait { flex: 1.4 1 260px; min-height: clamp(360px, 38vw, 540px); background: var(--ink); overflow: hidden; }
.hero-portrait img { width: 100%; height: 100%; object-fit: cover; object-position: 45% 45%; filter: grayscale(1) contrast(1.05); transition: transform 0.6s ease; }
.hero-portrait:hover img { transform: scale(1.03); }
@media (max-width: 900px) { .hero-portrait { min-height: 0; aspect-ratio: 4 / 5; flex-basis: 100%; } }

.portrait { flex: 1 1 340px; min-height: 440px; background: var(--yellow); }
.portrait img { width: 100%; height: 100%; object-fit: cover; }
.links { display: flex; flex-direction: column; gap: 12px; font-size: clamp(22px, 2vw, 28px); font-weight: 500; }
.links a { text-decoration: none; }
.links a:hover { text-decoration: underline; }
.footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding-top: 22px; }

a:focus-visible, button:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.bg-red a:focus-visible, .bg-ink a:focus-visible { outline-color: var(--cream); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .shot img, .circle { transition: none; }
}
