:root {
  --bg: #fbfaf8;
  --ink: #1c1b1a;
  --ink-soft: #6a655f;
  --ink-faint: #9a948c;
  --line: #e6e2dc;
  --accent: #a8432a;
  --display: "Bricolage Grotesque", system-ui, sans-serif;
  --sans: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #151413;
    --ink: #eeebe6;
    --ink-soft: #a7a199;
    --ink-faint: #7a756e;
    --line: #2c2a27;
    --accent: #e48a6e;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration-color: color-mix(in srgb, var(--accent) 55%, transparent); text-underline-offset: 3px; text-decoration-thickness: 1px; transition: color .15s; }
a:hover { color: var(--accent); text-decoration-color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }
img { max-width: 100%; height: auto; display: block; }

.wrap { width: 100%; max-width: 960px; margin: 0 auto; padding: 0 24px; }

/* Header */
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px 32px; padding-top: 28px; padding-bottom: 28px; flex-wrap: wrap;
}
.brand {
  display: inline-flex; align-items: center; gap: 11px;
  font-family: var(--display); font-weight: 600; font-size: 1.05rem; letter-spacing: -0.01em; text-decoration: none;
}
.brand img { width: 32px; height: 32px; border-radius: 50%; }
.brand:hover { color: var(--ink); }
.nav { display: flex; gap: 4px 26px; flex-wrap: wrap; font-size: 0.95rem; }
.nav a { text-decoration: none; color: var(--ink-soft); padding: 4px 0; border-bottom: 1px solid transparent; }
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }

/* Type */
h1, h2, h3 { font-family: var(--display); font-weight: 500; line-height: 1.1; margin: 0 0 0.5em; letter-spacing: -0.03em; }
h1 { font-size: clamp(2.5rem, 6.4vw, 4rem); }
h2 { font-size: clamp(1.5rem, 3.2vw, 1.9rem); letter-spacing: -0.02em; }
h3 { font-size: 1.3rem; letter-spacing: -0.015em; }
p { margin: 0 0 1.1em; }
.lede { font-size: 1.2rem; line-height: 1.6; color: var(--ink-soft); max-width: 31em; }
.label { font-size: 0.9rem; color: var(--ink-faint); margin: 0 0 14px; }
.prose { max-width: 36em; }
.hl { color: var(--accent); }
.wave { display: inline-block; transform-origin: 70% 70%; animation: wave 2.4s ease-in-out 0.6s 2; }
@keyframes wave {
  0%, 60%, 100% { transform: rotate(0); }
  10%, 30% { transform: rotate(14deg); }
  20%, 40% { transform: rotate(-8deg); }
}
@media (prefers-reduced-motion: reduce) { .wave { animation: none; } }

main { padding: 48px 0 112px; }
.section { margin-top: 112px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 8px; }

/* Hero */
.hero { display: grid; grid-template-columns: 1.4fr 1fr; gap: 72px; align-items: center; }
.photo { margin: 0; }
.photo img { border-radius: 20px; width: 100%; }
.photo figcaption { font-size: 0.88rem; color: var(--ink-faint); padding-top: 12px; }

.socials { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 32px; }
.social {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.97rem; font-weight: 500; text-decoration: none; color: var(--ink-soft);
}
.social:hover { color: var(--accent); }
.social svg { width: 16px; height: 16px; fill: currentColor; flex: none; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 20px; border-radius: 999px; background: var(--ink); color: var(--bg);
  text-decoration: none; font-size: 0.95rem; font-weight: 500; transition: background .15s;
}
.btn:hover { background: var(--accent); color: var(--bg); }

/* Project rows */
.rows { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.rows li { border-bottom: 1px solid var(--line); }
.rows a {
  display: grid; grid-template-columns: 140px 1fr auto; gap: 6px 32px; align-items: baseline;
  padding: 30px 0; text-decoration: none;
}
.rows .kind { font-size: 0.9rem; color: var(--ink-faint); }
.rows h3 { margin: 0 0 4px; transition: color .15s; }
.rows p { margin: 0; color: var(--ink-soft); max-width: 34em; }
.rows .arrow { color: var(--ink-faint); transition: transform .2s, color .15s; }
.rows a:hover { color: var(--ink); }
.rows a:hover h3, .rows a:hover .arrow { color: var(--accent); }
.rows a:hover .arrow { transform: translateX(4px); }

/* Lists */
.facts { list-style: none; padding: 0; margin: 0 0 32px; }
.facts li { padding: 12px 0 12px 26px; position: relative; border-bottom: 1px solid var(--line); }
.facts li:first-child { border-top: 1px solid var(--line); }
.facts li::before { content: "—"; position: absolute; left: 0; color: var(--accent); }

.aside {
  margin: 48px 0; padding: 4px 0 4px 24px; border-left: 2px solid var(--accent);
  font-family: var(--display); font-weight: 500; font-size: 1.4rem; line-height: 1.4; letter-spacing: -0.015em;
}

.links { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.links li { border-bottom: 1px solid var(--line); }
.links a { display: flex; justify-content: space-between; gap: 16px; padding: 16px 0; text-decoration: none; }
.links a::after { content: "↗"; color: var(--ink-faint); }
.links a:hover::after { color: var(--accent); }

.split { display: grid; grid-template-columns: 1fr 280px; gap: 72px; align-items: start; }
.split .photo { position: sticky; top: 32px; margin-top: 64px; }

.back { display: inline-block; margin-bottom: 28px; font-size: 0.93rem; color: var(--ink-faint); text-decoration: none; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 32px 0 48px; font-size: 0.9rem; color: var(--ink-faint); }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.site-footer nav { display: flex; gap: 22px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--accent); }

@media (max-width: 760px) {
  .wrap { padding: 0 20px; }
  .hero, .split { grid-template-columns: 1fr; gap: 40px; }
  .hero .photo { max-width: 280px; order: -1; }
  .split .photo { max-width: 280px; position: static; margin-top: 0; }
  main { padding: 24px 0 72px; }
  .section { margin-top: 80px; }
  .site-header .wrap { padding-top: 20px; padding-bottom: 20px; }
  .rows a { grid-template-columns: 1fr auto; padding: 24px 0; }
  .rows .kind { grid-column: 1 / -1; }
  .rows .arrow { grid-row: 2; grid-column: 2; }
}
