/* ---------- Tokens ---------- */
:root {
  --bg: #ffffff;
  --ink: #1c1917;      /* headings */
  --text: #57534d;     /* body */
  --muted: #79716b;
  --faint: #a6a09b;
  --line: rgb(28 25 23 / 0.1);
  --hair: rgb(28 25 23 / 0.06);
  --surface: #f5f5f4;
  --surface-2: #fafaf9;
  --outline: rgb(0 0 0 / 0.06);
  --accent: hsl(270 32% 88%);         /* Miquel's lavender highlight */
  --accent-ink: hsl(270 22% 46%);
  --shadow-sm: 0 1px 2px rgb(28 25 23 / 0.06), 0 1px 1px rgb(28 25 23 / 0.04);
  --shadow-md: 0 2px 4px rgb(28 25 23 / 0.04), 0 10px 24px -6px rgb(28 25 23 / 0.16);

  --serif: "Geist Serif", Georgia, serif;
  --sans: "Geist Serif", Georgia, serif;

  --gutter: 32px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --fast: 150ms;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c0a09; --ink: #f5f5f4; --text: #a8a29e; --muted: #8a837d; --faint: #6b645e;
    --line: rgb(255 255 255 / 0.1); --hair: rgb(255 255 255 / 0.06);
    --surface: #1c1917; --surface-2: #151210; --outline: rgb(255 255 255 / 0.08);
    --accent: hsl(270 22% 30%); --accent-ink: hsl(270 40% 80%);
    --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.4);
    --shadow-md: 0 10px 24px -6px rgb(0 0 0 / 0.6);
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 66px;
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 200 17px/28px var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
::selection { background: var(--accent); color: var(--ink); }
img, svg { display: block; }
a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
h1, h2, h3, p, ul, ol, dl, dd, blockquote { margin: 0; padding: 0; }
ul, ol { list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 6px;
}
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: fixed; top: 12px; left: 12px; z-index: 100;
  padding: 8px 14px; border-radius: 10px;
  background: var(--ink); color: var(--bg);
  font: 500 14px/20px var(--sans);
  transform: translateY(-160%);
  transition: transform 200ms var(--ease-out);
}
.skip:focus-visible { transform: none; }

/* ---------- Layout ---------- */
.col { width: 100%; max-width: calc(560px + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.col--wide { max-width: calc(840px + var(--gutter) * 2); }
.col--hero { max-width: calc(520px + var(--gutter) * 2); text-align: center; }
.label {
  font: 600 24px/28px var(--sans);
  color: var(--ink);
  letter-spacing: -0.005em;
}

/* ---------- Hero ---------- */
.hero { padding-top: 134px; }
.hero—title {
  width: min(720px, calc(100vw - var(--gutter) * 2));
  margin-top: 32px;
  margin-left: calc(50% - min(360px, 50vw - var(--gutter)));
  font: 900 64px/60px "Geist Sans", sans-serif;
  letter-spacing: -0.025em;
  color: var(--ink);
  text-wrap: balance;
}
.hero—lede {
  margin: 24px auto 0;
  max-width: 420px;
  font-family: "Geist Serif", Georgia, serif;
  font-size: 24px; line-height: 28px;
  color: var(--muted);
  text-wrap: balance;
}
.hero—meta {
  margin-top: 16px;
  font-family: "Geist Sans", sans-serif;
  font-size: 18px; font-weight: 300; line-height: 20px;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}
.hero—meta span { margin: 0 6px; }

/* Highlighted projects */
.fan { position: relative; margin-top: 64px; }
.highlighted—projects { position: relative; margin: 0 auto; }
.highlighted—card { display: block; border-radius: 14px; font-size: 18px; }
.highlighted—meta { font-family: "Geist Sans", sans-serif; font-size: 16px; font-weight: 200; }
.highlighted—card:focus-visible { outline-offset: 5px; border-radius: 16px; }

.media {
  position: relative; display: block; overflow: hidden;
  background-color: var(--tint, var(--surface));
}
.media::after { /* hairline outline that never shifts layout */
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  box-shadow: inset 0 0 0 1px var(--outline); pointer-events: none;
}
.media img { width: 100%; height: 100%; object-fit: cover; }
.js .media img { opacity: 0; filter: blur(10px); transform: scale(1.03); transition: opacity 500ms var(--ease), filter 600ms var(--ease-out), transform 800ms var(--ease-out); }
.js .media img.is-loaded { opacity: 1; filter: none; transform: none; }

.media--card {
  aspect-ratio: 4 / 3; border-radius: 14px;
  box-shadow: var(--shadow-md);
  transition: box-shadow 300ms var(--ease);
}

/* ---------- Prose ---------- */
.prose { margin-top: 144px; }
.prose p { margin-top: 24px; font-family: "Geist Sans", sans-serif; font-size: 18px; font-weight: 400; text-wrap: pretty; }
.prose .label + p { margin-top: 16px; }
.inline {
  color: var(--ink); font-weight: 500;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: color-mix(in srgb, currentColor 28%, transparent);
  transition: text-decoration-color var(--fast) var(--ease), color var(--fast) var(--ease);
  border-radius: 2px;
}
@media (hover: hover) { .inline:hover { text-decoration-color: var(--accent-ink); color: var(--ink); } }

/* ---------- Proof ---------- */
.proof { margin: 96px auto 0; padding: 0 var(--gutter); max-width: calc(640px + var(--gutter) * 2); text-align: center; }
.proof—quote { padding: 0 0 64px; }
.proof—quote p {
  max-width: 500px; margin: 0 auto;
  font: 400 24px/34px var(--serif);
  color: var(--ink);
  text-wrap: balance;
  hanging-punctuation: first last;
}
.proof—facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; padding-bottom: 96px; }
.fact dt { font: 800 24px/1.15 "Geist Sans", sans-serif; color: var(--ink); letter-spacing: -0.01em; }
.fact dd { margin-top: 8px; font-size: 16px; line-height: 20px; color: var(--muted); text-wrap: balance; }
.proof—facts .fact:first-child dd { font-weight: 100; }
.fact—link {
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px;
  text-decoration-color: color-mix(in srgb, currentColor 18%, transparent);
  transition: text-decoration-color var(--fast) var(--ease);
}
@media (hover: hover) { .fact—link:hover { text-decoration-color: var(--accent-ink); } }

/* ---------- Work index ---------- */
.work { margin-top: 96px; }
.work—head { display: flex; align-items: baseline; justify-content: space-between; padding-bottom: 12px; }
.work—count { font-size: 14px; line-height: 20px; color: var(--faint); font-variant-numeric: tabular-nums; }
.rows { border-top: 1px solid var(--line); }
.rows li { border-bottom: 1px solid var(--hair); }
.row {
  position: relative;
  display: grid; align-items: center;
  grid-template-columns: 64px minmax(0, 1fr) 215px 96px 16px;
  column-gap: 24px;
  padding: 12px 0;
  border-radius: 10px;
  isolation: isolate;
}
.row::before { /* hover surface that bleeds past the column edge */
  content: ""; position: absolute; inset: 0 -12px; z-index: -1; border-radius: 12px;
  background: var(--surface-2); opacity: 0;
  transition: opacity var(--fast) var(--ease);
}
.row:focus-visible { outline-offset: 2px; }
.media--thumb { width: 64px; aspect-ratio: 4 / 3; border-radius: 6px; box-shadow: var(--shadow-sm); }
.media--thumb img { transition: opacity 500ms var(--ease), filter 600ms var(--ease-out), transform 400ms var(--ease-out); }
.row—text { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.row—title { font-weight: 500; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row—co { color: var(--muted); font-family: "Geist Sans", sans-serif; font-size: 15px; font-weight: 400; white-space: nowrap; }
.row—disc { color: var(--muted); font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row—year { color: var(--faint); font-family: "Geist Sans", sans-serif; font-size: 14px; font-weight: 400; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.row—go {
  color: var(--ink); opacity: 0; transform: translateX(-6px);
  transition: opacity var(--fast) var(--ease), transform 220ms var(--ease-out);
}
@media (hover: hover) {
  .row:hover::before { opacity: 1; }
  .row:hover .row—go { opacity: 1; transform: none; }
  .row:hover .media--thumb img.is-loaded { transform: scale(1.06); }
  .row:hover .row—year { color: var(--muted); }
}
.row:focus-visible::before { opacity: 1; }
.row:focus-visible .row—go { opacity: 1; transform: none; }

/* ---------- Contact ---------- */
.contact { margin-top: 144px; }
.contact p { margin-top: 16px; font-family: "Geist Sans", sans-serif; text-wrap: pretty; }
.contact—actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 22px; border-radius: 999px;
  font: 500 16px/1 var(--sans);
  transition: background-color var(--fast) var(--ease), color var(--fast) var(--ease), transform 160ms var(--ease-out);
}
.btn:active { transform: scale(0.97); }
.btn--primary { background: var(--ink); color: var(--bg); }
.btn--quiet { background: var(--surface); color: var(--ink); font-family: "Geist Sans", sans-serif; }
.btn:focus-visible { outline-offset: 3px; border-radius: 999px; }
@media (hover: hover) {
  .btn--primary:hover { background: color-mix(in srgb, var(--ink) 86%, var(--bg)); }
  .btn--quiet:hover { background: color-mix(in srgb, var(--surface) 70%, var(--ink) 8%); }
}
.arrow { width: 16px; height: 16px; }
.copy { min-width: 124px; }
.copy.is-copied { color: var(--accent-ink); }

/* ---------- Footer ---------- */
.foot {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 144px var(--gutter) calc(48px + env(safe-area-inset-bottom, 0px));
  text-align: center;
}
.foot—social {
  display: flex;
  flex-flow: row nowrap;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  margin: 0 0 16px;
  color: var(--ink);
}
.foot—social a {
  display: flex;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  align-items: center;
  justify-content: center;
  line-height: 0;
}
.foot—social svg, .foot—social img { width: 24px; height: 24px; }
@media (hover: hover) { .foot—social a:hover { opacity: 0.7; } }
@media (prefers-color-scheme: dark) { .foot—social img { filter: invert(1); } }
.foot p { font-size: 13px; line-height: 20px; color: var(--faint); text-wrap: balance; }

/* ---------- Motion ---------- */
@keyframes enter { from { opacity: 0; filter: blur(6px); transform: translateY(8px); } }
@keyframes deckIn { from { opacity: 0; filter: blur(8px); transform: translateY(80px) scale(0.86); } }
@keyframes nudge { 0% { transform: none; animation-timing-function: ease-in; } 10.5% { transform: translateX(4px); animation-timing-function: ease-out; } 21%, 100% { transform: none; } }

@media (prefers-reduced-motion: no-preference) {
  .enter { animation: enter 700ms var(--ease-out) backwards; animation-delay: calc(80ms + var(--d) * 70ms); }
  .highlighted—projects { animation: deckIn 600ms var(--ease-out) 360ms backwards; }
  .js .reveal { opacity: 0; filter: blur(4px); transform: translateY(12px); transition: opacity 700ms var(--ease-out), filter 700ms var(--ease-out), transform 700ms var(--ease-out); }
  .js .reveal.is-in { opacity: 1; filter: none; transform: none; }
  .btn--primary .arrow { animation: nudge 3.8s 2s infinite; }
}
@media (prefers-reduced-motion: reduce) {
  .row—go, .media img { transition-duration: 1ms !important; }
  .js .media img { filter: none; transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .row { grid-template-columns: 64px minmax(0, 1fr) 96px 16px; }
  .row—disc { display: none; }
}
@media (max-width: 760px) {
  :root { --gutter: 24px; }
  body { font-size: 16px; line-height: 26px; }
  .label { font-size: 22px; line-height: 28px; }
  .hero { padding-top: 109px; }
  .hero—title { margin-top: 24px; font-size: 40px; line-height: 44px; }
  .hero—lede { font-size: 17px; line-height: 26px; max-width: 320px; }

  /* Edge-to-edge snap row */
  .fan { margin-top: 48px; }
  .highlighted—projects {
    scale: none; height: auto; max-width: none;
    display: flex; gap: 16px;
    overflow-x: auto; overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter);
    padding: 4px var(--gutter) 12px;
    scrollbar-width: none;
  }
  .highlighted—projects::-webkit-scrollbar { display: none; }
  .highlighted—item { position: static; flex: 0 0 92%; max-width: 400px; margin: 0; scroll-snap-align: start; }
  .media--card { box-shadow: var(--shadow-sm); border-radius: 12px; }
  .highlighted—label { display: block; margin-top: 12px; padding: 0 2px; }
  .highlighted—title { display: block; font: 400 18px/24px var(--serif); color: var(--ink); }
  .highlighted—meta { display: block; margin-top: 2px; font-size: 16px; font-weight: 200; line-height: 20px; color: var(--muted); }

  .prose { margin-top: 96px; }
  .proof { margin-top: 64px; }
  .proof—quote { padding: 0 0 48px; }
  .proof—quote p { font-size: 20px; line-height: 30px; }
  .proof—facts { grid-template-columns: 1fr; gap: 24px; padding-bottom: 64px; }
  .work { margin-top: 64px; }
  .row { grid-template-columns: 56px minmax(0, 1fr) auto; column-gap: 16px; padding: 10px 0; }
  .media--thumb { width: 56px; border-radius: 5px; }
  .row—text { flex-direction: column; gap: 0; }
  .row—title { font-size: 16px; line-height: 22px; white-space: normal; }
  .row—co { font-size: 14px; line-height: 20px; }
  .row—year { font-size: 13px; }
  .row—go { display: none; }
  .row::before { inset: 0 -8px; }
  .contact { margin-top: 96px; }
  .contact—actions { flex-direction: column; }
  .btn { width: 100%; }
  .foot { padding-top: 96px; }
}


/* ---------- Header (Geist Sans links, frosted on scroll) ---------- */
.hdr {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1400px; margin: 0 auto;
  height: calc(4.875rem + env(safe-area-inset-top, 0px));
  padding: env(safe-area-inset-top, 0px) max(3rem, env(safe-area-inset-right)) 0 max(3rem, env(safe-area-inset-left));
}
.hdr::before {
  content: ""; position: absolute; inset: 0 auto 0 50%; width: 100vw; transform: translateX(-50%);
  z-index: -1; pointer-events: none;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  box-shadow: 0 1px 0 var(--hair);
  opacity: 0; transition: opacity 0.4s ease;
}
.is-scrolled .hdr::before { opacity: 1; }
.hdr—logo { display: inline-block; line-height: 0; border-radius: 4px; }
.hdr—logo-img { display: block; height: 24.75px; width: auto; }
.hdr—nav { display: flex; gap: 1.5rem; }
.hdr—link {
  font-family: "Geist Serif", Georgia, serif; font-weight: 500;
  font-size: clamp(0.84375rem, 1.5vw + 0.375rem, 1.40625rem);
  color: var(--ink); border-radius: 6px;
  transition: color 1s ease;
}
@media (hover: hover) { .hdr—link:hover { color: hsl(270, 30%, 78%); } }
@media (prefers-color-scheme: dark) { .hdr—logo-img { filter: invert(1); } }
@media (max-width: 768px) {
  .hdr { height: calc(3.5625rem + env(safe-area-inset-top, 0px)); padding-left: max(1.25rem, env(safe-area-inset-left)); padding-right: max(1.25rem, env(safe-area-inset-right)); }
  .hdr—logo-img { height: 19.5px; }
  .hdr—nav { gap: 0.9375rem; }
}
@media (max-width: 480px) {
  .hdr—nav { gap: 0.825rem; }
  .hdr—link { font-size: 0.7875rem; }
  .hdr—logo-img { height: 16.5px; }
}

/* ---------- Desktop carousel (same snap row as mobile) ---------- */
@media (min-width: 761px) {
  .fan { margin-top: 64px; --edge: max(var(--gutter), calc((100vw - 840px) / 2)); }
  .highlighted—projects {
    scale: none; height: auto; max-width: none;
    display: flex; gap: 24px;
    overflow-x: auto; overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory; scroll-padding-inline: var(--edge);
    padding: 4px var(--edge) 12px;
    scrollbar-width: none;
    scroll-behavior: smooth;
  }
  .highlighted—projects::-webkit-scrollbar { display: none; }
  .highlighted—item { position: static; flex: 0 0 480px; max-width: none; margin: 0; scroll-snap-align: start; }
  .media--card { box-shadow: var(--shadow-sm); border-radius: 14px; }
  .media--card img { transition: opacity 500ms var(--ease), filter 600ms var(--ease-out), transform 700ms var(--ease-out); }
  .highlighted—label { display: block; margin-top: 12px; padding: 0 2px; text-align: left; }
  .highlighted—title { display: block; font: 400 18px/26px var(--serif); color: var(--ink); }
  .highlighted—meta { display: block; margin-top: 2px; font-size: 16px; font-weight: 200; line-height: 20px; color: var(--muted); }

  .highlighted—nav { display: flex; justify-content: flex-end; gap: 8px; padding: 12px var(--edge) 0; }
  .highlighted—btn {
    width: 40px; height: 40px; border-radius: 999px; display: grid; place-items: center;
    border: 1px solid var(--outline); background: var(--bg); color: var(--ink); cursor: pointer;
    transition: background-color 160ms var(--ease), opacity 160ms var(--ease), transform 160ms var(--ease);
  }
  .highlighted—btn:active { transform: scale(0.94); }
  .highlighted—btn[disabled] { opacity: 0.35; cursor: default; }
  .highlighted—btn svg { width: 16px; height: 16px; }
}
@media (min-width: 761px) and (hover: hover) {
  .highlighted—card:hover .media--card img.is-loaded { transform: scale(1.03); }
  .highlighted—card:hover .highlighted—title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
  .highlighted—btn:not([disabled]):hover { background: var(--surface); }
}
@media (max-width: 760px) { .highlighted—nav { display: none; } }
