:root {
  --bg: #F3F2EE;
  --ink: #111111;
  --muted: #6B6A66;
  --line: #111111;
  --faint: #D6D4CE;
  --sans: "Inter Tight", -apple-system, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --pad: clamp(20px, 3vw, 40px);
}
* { box-sizing: border-box; margin: 0; padding: 0; border-radius: 0; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 17px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
.mono { font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.lc { text-transform: none; }
.muted { color: var(--muted); }

.frame { position: relative; border-inline: 1px solid var(--line); max-width: 1440px; margin: 0 auto; min-height: 100vh; }

/* Drawn lines. The script below swaps each border for one of these and draws it in. */
.lines-wait .frame, .lines-wait .frame *:not(.btn):not(.top):not(.top *) { border-color: transparent !important; }
.lines { position: absolute; inset: 0; pointer-events: none; z-index: 4; }
.ln { position: absolute; clip-path: inset(0 100% 0 0); transition: clip-path var(--dur, .6s) cubic-bezier(.65, 0, .35, 1) var(--delay, 0s); }
.ln.v { clip-path: inset(0 0 100% 0); }
.ln.on { clip-path: inset(0); }
.ln.now { transition: none; }

/* The sticky top bar draws its own lines, so they stay with it as it sticks. */
.top.row { border-bottom-color: transparent; }
.top > * { position: relative; border-right-color: transparent !important; }
.top::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: var(--line); transform-origin: left; animation: drawX .9s cubic-bezier(.65, 0, .35, 1) .05s both; }
.top > *:not(:last-child)::after { content: ""; position: absolute; right: -1px; top: 0; bottom: 0; width: 1px; background: var(--line); transform-origin: top; animation: drawY .35s cubic-bezier(.65, 0, .35, 1) both; }
.top > :nth-child(1)::after { animation-delay: .25s; }
.top > :nth-child(2)::after { animation-delay: .45s; }
.top > :nth-child(3)::after { animation-delay: .65s; }
@keyframes drawX { from { transform: scaleX(0); } }
@keyframes drawY { from { transform: scaleY(0); } }
@media (prefers-reduced-motion: reduce) { .top::after, .top > *::after { animation: none; } }
.row { border-bottom: 1px solid var(--line); }

/* Top bar */
.top { display: grid; grid-template-columns: repeat(4, 1fr); position: sticky; top: 0; background: var(--bg); z-index: 5; }
.top > * { padding: 14px var(--pad); border-right: 1px solid var(--line); }
.top > *:last-child { border-right: 0; text-align: right; }
.top a:hover { background: var(--ink); color: var(--bg); }
.top .status::before { content: ""; display: inline-block; width: 7px; height: 7px; background: var(--ink); margin-right: 10px; vertical-align: 1px; animation: blink 1.4s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* Hero */
.hero-top { position: relative; }
.hero-top aside { position: absolute; right: 0; bottom: 0; padding: var(--pad); text-align: right; display: flex; flex-direction: column; gap: 6px; }
.name { display: grid; grid-template-columns: 1fr 1fr; align-items: center; }
.name .face { justify-self: center; }
.name h1 { font: inherit; letter-spacing: inherit; }
.face { display: block; flex: none; width: 1.5em; height: 1.5em; border: 1px solid var(--line); overflow: hidden; position: relative; }
.face img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.05); mix-blend-mode: multiply; }
.name { padding: calc(var(--pad) * 1.6) var(--pad); font-size: clamp(64px, 14.2vw, 210px); font-weight: 600; line-height: .82; letter-spacing: -.06em; text-transform: uppercase; }
.intro { display: grid; grid-template-columns: repeat(4, 1fr); }
.intro > div { padding: var(--pad); border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.intro > div:last-child { border-right: 0; }
.intro .lead { grid-column: span 2; font-size: clamp(20px, 1.9vw, 26px); line-height: 1.3; letter-spacing: -.015em; }
.intro .lead p { font-size: inherit; text-wrap: pretty; }
.intro .lead p + p { margin-top: .8em; }
.intro p { font-size: 15px; }

/* Section heading row */
.sec { display: grid; grid-template-columns: 1fr 3fr; }
.sec > .label { padding: var(--pad); border-right: 1px solid var(--line); }
.sec > .label h2 { font-size: 15px; font-weight: 600; margin-top: 6px; }
.sec > .body { min-width: 0; }

/* Now list */
.list a, .list > div { display: grid; grid-template-columns: 60px 1fr 2fr 140px; gap: 24px; padding: 22px var(--pad); border-bottom: 1px solid var(--faint); align-items: baseline; transition: background .15s, color .15s; }
.list > *:last-child { border-bottom: 0; }
.list a:hover { background: var(--ink); color: var(--bg); }
.list a:hover .muted { color: #A9A8A3; }
.list h3 { font-size: 22px; font-weight: 500; letter-spacing: -.02em; }
.list p { font-size: 15px; }
.list .end { text-align: right; }

/* Projects */
.projects { display: grid; grid-template-columns: 1fr 1fr; }
.project { display: flex; flex-direction: column; border-right: 1px solid var(--line); }
.project:last-child { border-right: 0; }
.shot { aspect-ratio: 2 / 1; border-bottom: 1px solid var(--line); overflow: hidden; position: relative; }
.shot.mello { background: #E9EAF2; }
.shot.mello img { width: 100%; height: 100%; object-fit: cover; }
.shot.devdctr { background: #111; }
.shot.devdctr img { width: 100%; height: 100%; object-fit: cover; }
/* Shots start black and white. Desktop: colour on hover. Touch: colour fades in as they scroll into view (script below sets --colour). */
.shot img { filter: grayscale(calc(1 - var(--colour, 0))); }
@media (hover: hover) and (pointer: fine) {
  .shot img { transition: filter .5s ease; }
  .project:hover .shot img { --colour: 1; }
}
.project .meta { display: flex; justify-content: space-between; padding: 14px var(--pad); border-bottom: 1px solid var(--line); }
.project .copy { padding: var(--pad); display: grid; grid-template-columns: 1fr 1fr; gap: 10px var(--pad); flex: 1; align-items: start; }
.project .copy .side { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.project .copy .side p { font-size: 15px; }
.project h3 { font-size: clamp(36px, 3.6vw, 52px); font-weight: 600; letter-spacing: -.05em; line-height: .9; }
.project .tagline { margin-top: 10px; font-size: 17px; line-height: 1.3; letter-spacing: -.01em; }

.btn { display: inline-flex; justify-content: space-between; align-items: center; gap: 32px; border: 1px solid var(--ink); padding: 14px 18px; font-family: var(--mono); font-size: 13px; text-transform: uppercase; letter-spacing: .04em; transition: background .15s, color .15s; }
.btn:hover { background: var(--ink); color: var(--bg); }
.btn.solid { background: var(--ink); color: var(--bg); }
.btn.solid:hover { background: var(--bg); color: var(--ink); }

/* Experience */
table { width: 100%; border-collapse: separate; border-spacing: 0; }
th, td { text-align: left; padding: 18px var(--pad); border-bottom: 1px solid var(--faint); vertical-align: baseline; }
th { font-family: var(--mono); font-size: 12px; font-weight: 400; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); border-bottom: 1px solid var(--line); }
td { font-size: 15px; vertical-align: middle; padding-block: 14px; }
td.mono { font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .02em; white-space: nowrap; }
td.end, th:last-child { text-align: right; }
td strong { font-weight: 500; font-size: 16px; display: block; }
td .co { display: flex; align-items: center; gap: 16px; }
td .co img { width: 40px; height: 40px; flex: none; }
td .co span { font-size: 14px; }
tr:last-child td { border-bottom: 0; }

/* Clients */
.logos { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); list-style: none; }
.logos li { position: relative; aspect-ratio: 16 / 9; min-width: 0; border-right: 1px solid var(--faint); border-bottom: 1px solid var(--faint); }
.logos li:nth-child(5n) { border-right: 0; }
.logos li:nth-last-child(-n+5) { border-bottom: 0; }
.logos img { position: absolute; inset: 0; margin: auto; width: calc(58% * var(--s, 1)); height: calc(42% * var(--s, 1)); object-fit: contain; filter: brightness(0); opacity: .86; }
.logos img.keep { filter: grayscale(1) contrast(1.1); }
.logos img.raw { filter: none; }

/* CTA */
.cta { background: var(--ink); color: var(--bg); display: grid; grid-template-columns: 1fr 3fr; }
.cta .label { padding: var(--pad); border-right: 1px solid #333; }
.cta .body { padding: calc(var(--pad) * 1.6) var(--pad); }
.cta h2 { font-size: clamp(40px, 6.4vw, 96px); font-weight: 600; letter-spacing: -.05em; line-height: .9; text-transform: uppercase; max-width: 12ch; }
.cta .split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--pad); margin-top: calc(var(--pad) * 1.4); padding-top: var(--pad); border-top: 1px solid #333; align-items: end; }
.cta p { color: #B9B7B1; max-width: 42ch; }
.cta p strong { color: var(--bg); font-weight: 500; }
.cta .actions { display: flex; flex-direction: column; gap: 10px; }
.cta .btn { border-color: var(--bg); }
.cta .btn.solid { background: var(--bg); color: var(--ink); }
.cta .btn.solid:hover { background: var(--ink); color: var(--bg); }
.cta .btn:not(.solid):hover { background: var(--bg); color: var(--ink); }

footer { display: grid; grid-template-columns: repeat(4, 1fr); }
footer > * { padding: 14px var(--pad); border-right: 1px solid var(--line); }
footer > *:last-child { border-right: 0; text-align: right; }
footer a:hover { text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 900px) {
  .hero-top aside { display: none; }
  .name { grid-template-columns: auto 1fr; }
  .top { grid-template-columns: 1fr 1fr; }
  .top > :nth-child(2), .top > :nth-child(3) { display: none; }
  .top > :first-child { border-right: 1px solid var(--line); }
  .intro { grid-template-columns: 1fr 1fr; }
  .intro .lead { grid-column: span 2; border-right: 0; border-bottom: 1px solid var(--line); }
  .sec, .cta { grid-template-columns: 1fr; }
  .logos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .logos li:nth-child(5n) { border-right: 1px solid var(--faint); }
  .logos li:nth-child(2n) { border-right: 0; }
  .logos li:nth-last-child(-n+5) { border-bottom: 1px solid var(--faint); }
  .logos li:nth-last-child(-n+2) { border-bottom: 0; }
  .sec > .label, .cta .label { border-right: 0; border-bottom: 1px solid var(--line); }
  .cta .label { border-color: #333; }
  .list a, .list > div { grid-template-columns: 40px 1fr; gap: 6px 16px; }
  .list p, .list .end { grid-column: 2; text-align: left; }
  .projects { grid-template-columns: 1fr; }
  .project { border-right: 0; border-bottom: 1px solid var(--line); }
  .project:last-child { border-bottom: 0; }
  .cta .split { grid-template-columns: 1fr; }
  .project .copy { grid-template-columns: 1fr; padding-bottom: calc(var(--pad) * 2.5); }
  footer { grid-template-columns: 1fr 1fr; }
  footer > :nth-child(2) { border-right: 0; }
  footer > :nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  td:nth-child(2), th:nth-child(2), td:nth-child(3), th:nth-child(3) { display: none; }
}
