/* ------------------------------------------------------------
   Colors. Change these to restyle the whole site.
   ------------------------------------------------------------ */
:root {
  --bg: #fbfbfa;
  --surface: #f2f2f0;
  --text: #0d0e10;
  --muted: #6a6d73;
  --line: #e2e2df;
  --strong-line: #0d0e10;
  --accent: #3049d8;        /* cobalt */
  --accent-soft: #e9ecfb;   /* soft cobalt tint behind photo */
  --radius: 4px;
  --max: 1120px;
  --text-max: 680px;
  --serif: "Inter Tight", "Inter Display", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c0d0f;
    --surface: #15171a;
    --text: #f1f1ef;
    --muted: #9a9ea6;
    --line: #26292e;
    --strong-line: #f1f1ef;
    --accent: #8c9dff;
    --accent-soft: #1b2040;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--sans); font-size: 17px; line-height: 1.7;
  -webkit-font-smoothing: antialiased; font-feature-settings: "ss01", "cv11";
}
a { color: inherit; text-decoration-color: var(--line); text-underline-offset: 4px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent); text-decoration-color: currentColor; }
img { max-width: 100%; display: block; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 32px; }
.narrow { max-width: var(--text-max); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 32px; padding-top: 18px; padding-bottom: 18px; }
.site-name { font-weight: 600; font-size: 15px; letter-spacing: -0.01em; text-decoration: none; }
.site-name .dot { display: none; }
.site-nav { display: flex; flex-wrap: wrap; gap: 4px 28px; font-size: 14px; }
.site-nav a { color: var(--muted); text-decoration: none; padding: 2px 0; border-bottom: 1px solid transparent; }
.site-nav a:hover { color: var(--text); }
.site-nav a.active { color: var(--text); border-bottom-color: var(--text); }

main.wrap { padding-top: 72px; padding-bottom: 120px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding-top: 28px; padding-bottom: 36px; }
.footer-links a { color: var(--muted); margin-left: 20px; text-decoration: none; }
.footer-links a:hover { color: var(--text); }
.footer-links a:first-child { margin-left: 0; }

/* Type */
h1 { font-family: var(--serif); font-weight: 600; font-size: 56px; line-height: 1.08; letter-spacing: -0.03em; margin: 0 0 24px; }
h2.section { font-family: var(--serif); font-weight: 600; font-size: 32px; line-height: 1.15; letter-spacing: -0.025em; margin: 0; }
.prose h2, h2.label, .kicker {
  font-family: var(--sans); font-size: 12px; text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--muted); font-weight: 500; margin: 56px 0 16px;
}
h3 { font-size: 18px; line-height: 1.35; margin: 0 0 6px; font-weight: 600; letter-spacing: -0.01em; }
.lede { font-size: 20px; line-height: 1.55; margin: 0 0 24px; color: var(--text); letter-spacing: -0.005em; }
.eyebrow { font-size: 13px; color: var(--muted); margin: 0 0 20px; letter-spacing: 0.02em; }
.eyebrow a { color: var(--muted); text-decoration: none; }
.eyebrow a:hover { color: var(--text); }
.muted { color: var(--muted); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; margin: 120px 0 32px; padding-bottom: 20px; border-bottom: 1px solid var(--strong-line); }
.section-head a { font-size: 14px; text-decoration: none; color: var(--muted); }
.section-head a:hover { color: var(--text); }

/* Hero */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 72px; align-items: center; padding-bottom: 72px; border-bottom: 1px solid var(--line); }
.hero h1 { font-size: 76px; line-height: 1; margin-bottom: 28px; }
.hero .lede { font-size: 22px; line-height: 1.5; max-width: 600px; }
.hero p { max-width: 600px; color: var(--muted); margin: 0; }
.hero p.lede { color: var(--text); margin: 0 0 20px; }
.hero .kicker { margin: 0 0 28px; }
.portrait { justify-self: end; width: 260px; margin: 0; position: relative; isolation: isolate; }
.portrait::before { content: ""; position: absolute; inset: 28px -18px -18px 28px; background: var(--accent-soft); border-radius: 18px; z-index: -1; }
.portrait .frame { padding: 8px; background: var(--bg); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 16px 40px rgba(13,14,16,.08); }
.portrait .mat { border-radius: 12px; overflow: hidden; }
.portrait .photo { aspect-ratio: 4 / 5; overflow: hidden; background: var(--surface); }
.portrait img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; filter: saturate(.95) contrast(1.02); }
.monogram { width: 100%; height: 100%; display: grid; place-items: center; font-family: var(--serif); font-weight: 600; font-size: 48px; color: var(--muted); }
.links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 40px; }
.button { display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border-radius: 999px; font-size: 14px; font-weight: 500; text-decoration: none; border: 1px solid var(--line); color: var(--text); transition: border-color .2s, background .2s, color .2s; }
.button:hover { border-color: var(--text); color: var(--text); }
.button.primary { background: var(--text); color: var(--bg); border-color: var(--text); }
.button.primary:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

/* Pillars */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 0; }
.pillar { padding: 40px 32px 8px 0; }
.pillar + .pillar { padding-left: 32px; border-left: 1px solid var(--line); }
.pillar .num { font-family: var(--serif); font-weight: 600; font-size: 15px; letter-spacing: 0.04em; color: var(--accent); display: block; margin-bottom: 16px; }
.pillar .icon { display: none; }
.pillar p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.6; }

/* Work index (rows) */
.work-list { list-style: none; padding: 0; margin: 0; }
.work-row { border-bottom: 1px solid var(--line); }
.work-row a { display: grid; grid-template-columns: 56px minmax(0, 1fr) 260px; gap: 32px; align-items: center; padding: 28px 0; text-decoration: none; color: var(--text); }
.work-row .idx { font-family: var(--serif); font-weight: 600; font-size: 15px; color: var(--muted); }
.work-row h3 { font-size: 22px; margin: 0 0 6px; transition: color .2s; }
.work-row p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.55; max-width: 560px; }
.work-row .thumb { aspect-ratio: 16 / 10; overflow: hidden; border-radius: var(--radius); background: var(--surface); }
.work-row .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.work-row a:hover h3 { color: var(--accent); }
.work-row a:hover .thumb img { transform: scale(1.04); }
.meta { font-size: 12px; color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 8px; }
.tag { display: inline-block; font-size: 11px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; }

/* Simple lists */
.items { list-style: none; padding: 0; margin: 0; }
.items > li { padding: 24px 0; border-bottom: 1px solid var(--line); }
.items > li:first-child { border-top: 1px solid var(--strong-line); }
.items a.title { text-decoration: none; }
.items p { margin: 6px 0 0; color: var(--muted); font-size: 15px; }
.items .meta { margin: 4px 0 0; }

/* Project screenshots */
.shot { margin: 18px 0 4px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.shot img { width: 100%; height: auto; }

/* Project groups */
.group { margin-bottom: 8px; }

/* Page header */
.page-head { padding-bottom: 48px; margin-bottom: 56px; border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: 60px; margin-bottom: 16px; }
.page-head .lede { margin: 0; max-width: 620px; color: var(--muted); }
.note { border-left: 2px solid var(--accent); padding: 4px 0 4px 18px; font-size: 15px; color: var(--muted); margin: -24px 0 48px; max-width: 640px; }

/* Case study */
.case-study h1 { font-size: 50px; }
.case-hero { border-radius: var(--radius); overflow: hidden; margin: 48px 0 48px; aspect-ratio: 2 / 1; background: var(--surface); }
.case-hero img { width: 100%; height: 100%; object-fit: cover; }
.facts { display: flex; flex-wrap: wrap; gap: 8px 48px; margin: 0 0 40px; font-size: 14px; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.facts div { display: flex; gap: 10px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 500; }
.results { list-style: none; padding: 0; margin: 0 0 8px; display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0; border-top: 1px solid var(--strong-line); }
.results li { padding: 20px 20px 4px 0; }
.results li + li { padding-left: 20px; border-left: 1px solid var(--line); }
.results strong { display: block; font-family: var(--serif); font-weight: 600; font-size: 42px; line-height: 1; letter-spacing: -0.03em; color: var(--text); }
.results span { font-size: 13px; color: var(--muted); line-height: 1.45; display: block; margin-top: 10px; }
.prose { font-size: 17.5px; line-height: 1.75; }
.prose ul { padding-left: 18px; }
.prose li { margin-bottom: 10px; }
.prose li::marker { color: var(--muted); }
.back { margin-top: 72px; font-size: 14px; }
.back a { text-decoration: none; color: var(--muted); }
.back a:hover { color: var(--text); }

/* Flow diagrams */
.flow { display: flex; align-items: stretch; margin: 24px 0 8px; flex-wrap: wrap; }
.flow .step { flex: 1 1 0; min-width: 130px; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; font-size: 13.5px; line-height: 1.45; background: var(--bg); }
.flow .step b { display: block; font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.flow .step span { color: var(--muted); }
.flow .step.hl { border-color: var(--text); }
.flow .step.hl2 { border-color: var(--accent); }
.flow .step.hl2 b { color: var(--accent); }
.flow .arrow { flex: 0 0 28px; display: grid; place-items: center; color: var(--muted); font-size: 16px; }
.org { display: grid; gap: 0; justify-items: center; margin: 24px 0 8px; padding: 32px 16px; border: 1px solid var(--line); border-radius: var(--radius); }
.org .row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; width: 100%; }
.org .node { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 18px; font-size: 13.5px; text-align: center; background: var(--bg); }
.org .node.me { background: var(--text); color: var(--bg); border-color: var(--text); font-weight: 600; }
.org .node.lead { border-color: var(--text); }
.org .node.team { border-color: var(--accent); color: var(--accent); width: 100%; max-width: 480px; }
.org .line { width: 1px; height: 20px; background: var(--muted); }

/* Books */
.books { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 0 40px; list-style: none; padding: 0; margin: 0; }
h2.label + .books { border-top: 1px solid var(--strong-line); }
.book { display: flex; gap: 20px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.book .cover { position: relative; flex: 0 0 72px; height: 108px; border-radius: 2px; overflow: hidden; background: var(--text); color: var(--bg); display: grid; place-items: center; font-family: var(--serif); font-weight: 600; font-size: 28px; box-shadow: 0 1px 2px rgba(0,0,0,.12), 0 8px 20px rgba(0,0,0,.08); }
.book .cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.book h3 { font-size: 16px; margin-bottom: 2px; }
.book h3 a { text-decoration: none; }
.book .meta { text-transform: none; letter-spacing: 0; font-size: 14px; margin: 0 0 8px; }
.book p { margin: 8px 0 0; font-size: 14px; color: var(--muted); line-height: 1.55; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 40px; }
  .hero h1 { font-size: 60px; }
  .portrait { justify-self: start; width: 220px; margin-right: 18px; }
  .work-row a { grid-template-columns: 40px minmax(0, 1fr); }
  .work-row .thumb { grid-column: 2; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .wrap { padding: 0 20px; }
  main.wrap { padding-top: 40px; }
  .hero h1 { font-size: 44px; margin-bottom: 20px; }
  .hero .lede { font-size: 19px; }
  .portrait { width: 160px; order: -1; }
  .portrait::before { inset: 20px -12px -12px 20px; }
    .pillars { grid-template-columns: 1fr; }
  .pillar, .pillar + .pillar { padding: 28px 0 4px; border-left: none; border-top: 1px solid var(--line); }
  h1, .page-head h1, .case-study h1 { font-size: 38px; }
  h2.section { font-size: 26px; }
  .section-head { margin-top: 80px; }
  .work-row a { grid-template-columns: 1fr; gap: 14px; }
  .work-row .idx { display: none; }
  .work-row .thumb { grid-column: 1; order: -1; }
  .flow { flex-direction: column; }
  .flow .arrow { flex: 0 0 24px; transform: rotate(90deg); }
  .results li + li { padding-left: 0; border-left: none; }
  .results { grid-template-columns: 1fr 1fr; }
  .results strong { font-size: 34px; }
}
