/* ───────── Tokens ───────── */
:root {
  --bg: #fbfaf9;
  --dot: #ebeae9;
  --ink: #1a1a19;
  --ink-2: #4a4844;
  --ink-3: #6d6a65;
  --ink-4: #9a978f;
  --tile: #f1f0ee;
  --chip: #efeeec;
  --line: #e6e4e1;
  --nav-bg: rgba(251, 250, 249, 0.86);
  --sans: "Geist", system-ui, -apple-system, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, monospace;
  --script: "Homemade Apple", cursive;
  --col: 556px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: -0.005em;
  color: var(--ink);
  background-color: var(--bg);
  background-image: radial-gradient(circle, var(--dot) 0.9px, transparent 0.9px);
  background-size: 20px 20px;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 140px;
  animation: fade .5s ease both;
}
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { body { animation: none; } * { transition: none !important; } }

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ───────── Type ───────── */
.label {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.prose p { font-size: 13.5px; line-height: 1.75; color: var(--ink-2); }
.prose p + p { margin-top: 14px; }
.prose a, a.u {
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  transition: border-color .2s;
}
.prose a:hover, a.u:hover { border-color: var(--ink); }

/* ───────── Layout ───────── */
.col { max-width: var(--col); margin: 0 auto; padding: 0 16px; }
.wide { max-width: 1220px; margin: 0 auto; padding: 0 16px; }
section { margin-top: 56px; }
section > .label { display: block; margin-bottom: 18px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 40px 0; }

.page-top { padding-top: 64px; }

/* Home header */
.masthead { display: flex; justify-content: space-between; align-items: center; padding-top: 56px; }
.sig { font-family: var(--script); font-size: 17px; line-height: 1; color: var(--ink); letter-spacing: 0; }
.clock { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.08em; color: var(--ink-3); }

.who { display: flex; align-items: center; gap: 14px; margin: 40px 0 26px; }
.avatar {
  width: 50px; height: 50px; border-radius: 999px; flex: none;
  background: linear-gradient(135deg, #2b2a28, #55524c);
  color: #fbfaf9; display: grid; place-items: center;
  font-family: var(--mono); font-size: 13px; letter-spacing: 0.06em;
  overflow: hidden;
}
.avatar:has(img) { background: #e9e7e3; }
.avatar img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.06); }
.who h1 { font-size: 18px; font-weight: 400; letter-spacing: -0.01em; line-height: 1.3; }
.who .role { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }

/* ───────── Selected work cards ───────── */
.work-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 20px; }
.card { display: block; }
.card .thumb {
  aspect-ratio: 5 / 4;
  border-radius: 6px;
  overflow: hidden;
  display: grid; place-items: center;
  padding: 20px;
  text-align: center;
  transition: transform .35s cubic-bezier(.2,.7,.2,1);
}
.card:hover .thumb { transform: translateY(-3px); }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.card .thumb img.logo { width: auto; height: auto; max-width: 66%; max-height: 46%; object-fit: contain; }
.card .meta { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-top: 12px; }
.card h3 { font-size: 15px; font-weight: 400; letter-spacing: -0.01em; }
.card .yr { font-family: var(--mono); font-size: 10.5px; color: var(--ink-3); white-space: nowrap; }
.card p { font-size: 12.5px; line-height: 1.6; color: var(--ink-2); margin-top: 6px; }

/* Wordmark tiles (stand-ins until real project images are added) */
.wm { font-size: 30px; line-height: 1.05; letter-spacing: -0.03em; }
.wm.serif { font-family: Georgia, "Times New Roman", serif; font-style: italic; letter-spacing: -0.01em; }
.wm.mono { font-family: var(--mono); font-size: 20px; letter-spacing: 0.06em; text-transform: uppercase; }
.wm.heavy { font-weight: 600; font-size: 34px; letter-spacing: -0.04em; }
.wm small { display: block; font-family: var(--mono); font-size: 9px; letter-spacing: 0.16em; text-transform: uppercase; opacity: .7; margin-top: 10px; font-style: normal; font-weight: 400; }

/* ───────── Impact list ───────── */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.stat { background: var(--bg); padding: 16px 16px 18px; }
.stat b { display: block; font-weight: 400; font-size: 22px; letter-spacing: -0.03em; }
.stats:has(> .stat:nth-child(4):last-child) { grid-template-columns: repeat(2, 1fr); }
.stat span { display: block; font-size: 11.5px; line-height: 1.5; color: var(--ink-3); margin-top: 4px; }

/* ───────── Simple rows (experiments / writing) ───────── */
.rows { display: flex; flex-direction: column; }
.row { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 14px 0; border-top: 1px solid var(--line); }
.row:last-child { border-bottom: 1px solid var(--line); }
.row h3 { font-size: 14px; font-weight: 400; }
.row .tag { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); align-self: center; }
.row p { grid-column: 1 / -1; font-size: 12.5px; color: var(--ink-2); line-height: 1.6; }
a.row.press h3 { transition: color .2s; }
a.row.press h3::after { content: " ↗"; color: var(--ink-4); }
a.row.press:hover h3 { color: var(--ink-3); }

/* ───────── Playground masonry ───────── */
.intro p { margin-top: 14px; font-size: 13.5px; line-height: 1.65; color: var(--ink-2); }
.masonry { columns: 3 300px; column-gap: 24px; margin-top: 40px; }
.tile {
  break-inside: avoid; display: block; margin-bottom: 24px;
  border-radius: 6px; overflow: hidden; background: var(--tile);
  transition: transform .35s cubic-bezier(.2,.7,.2,1);
}
.tile:hover { transform: translateY(-3px); }
.tile img { width: 100%; height: auto; }
.tile.ph { display: grid; place-items: center; text-align: center; padding: 24px; }
.tile.ph .label { line-height: 1.8; }
.r43 { aspect-ratio: 4 / 3; } .r34 { aspect-ratio: 3 / 4; } .r11 { aspect-ratio: 1 / 1; } .r1610 { aspect-ratio: 16 / 10; }

/* ───────── About ───────── */
.job + .job { margin-top: 36px; }
.job h3 { font-size: 17px; font-weight: 500; letter-spacing: -0.015em; }
.job .sub { font-size: 12.5px; color: var(--ink-3); margin: 4px 0 14px; }

/* ───────── Chips ───────── */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font-size: 12px; padding: 6px 12px; border-radius: 999px;
  background: var(--chip); color: var(--ink-2);
  transition: background .2s, color .2s;
}
.chip.mono { font-family: var(--mono); font-size: 11px; }
a.chip:hover { background: var(--ink); color: var(--bg); }

/* ───────── Footer ───────── */
footer.col { margin-top: 88px; }
footer p { margin: 12px 0 18px; font-size: 13.5px; line-height: 1.65; color: var(--ink-2); }
footer hr { margin: 32px 0 20px; }
.now { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; font-size: 13px; }
.now .muted { color: var(--ink-3); font-size: 12px; }
.credit { display: flex; justify-content: space-between; align-items: center; margin-top: 24px; }
.top {
  width: 28px; height: 28px; border-radius: 999px; border: 0;
  background: var(--chip); color: var(--ink-2); cursor: pointer;
  display: grid; place-items: center; transition: background .2s, color .2s;
}
.top:hover { background: var(--ink); color: var(--bg); }

/* ───────── Floating pill nav ───────── */
nav.pill {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%);
  display: flex; gap: 2px; padding: 4px; border-radius: 999px;
  background: var(--nav-bg);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 2px rgba(26,26,25,.06), 0 8px 26px rgba(26,26,25,.1);
  z-index: 10;
}
nav.pill a {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-3); padding: 10px 16px; border-radius: 999px;
  transition: color .2s, background .2s;
}
nav.pill a:hover { color: var(--ink); }
nav.pill a.active { background: var(--ink); color: var(--bg); }

/* ───────── Small screens ───────── */
@media (max-width: 560px) {
  .masthead { padding-top: 32px; }
  .page-top { padding-top: 40px; }
  .work-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  nav.pill { bottom: 16px; }
  nav.pill a { padding: 9px 11px; font-size: 9.5px; letter-spacing: 0.1em; }
}
