/* Layout: a quiet white sheet; type sits on a 12-col grid, images carry the colour. */
:root {
  --bg: #ffffff;
  --fg: #111111;
  --muted: #6b6b6b;
  --rule: #e4e4e4;
  --accent: #c8321e;
  --font: "Instrument Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --measure: 62ch;
  --gutter: clamp(20px, 4vw, 56px);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
img, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
h1, h2, h3 { font-weight: 500; margin: 0; text-wrap: balance; }
p { margin: 0; }

/* Header */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  padding: 22px var(--gutter);
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 5;
}
.brand { font-size: 17px; letter-spacing: 0.01em; font-weight: 600; }
.brand small { display: block; letter-spacing: 0.16em; font-weight: 500; color: var(--muted); font-size: 10px; margin-top: 3px; }
.nav { display: flex; gap: 22px; font-size: 14px; }
.nav a[aria-current="page"] { color: var(--accent); }

main { flex: 1; padding: 8px var(--gutter) 64px; }

/* Home: one moving work, full width, a caption under it. */
.home { display: flex; flex-direction: column; gap: 10px; }
.home-media { display: block; }
.home-media video, .home-media img { width: 100%; max-height: 80vh; object-fit: contain; object-position: left top; background: var(--bg); }
.home-caption { font-size: 13px; color: var(--muted); }
.home-caption a:hover { color: var(--accent); }

/* Work index: one tile per project. */
.page-title { font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 28px; }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 44px 32px; }
.tile { display: flex; flex-direction: column; gap: 4px; }
.tile img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; margin-bottom: 8px; background: #f3f3f3; }
.tile-title { font-size: 20px; font-weight: 500; }
.tile-meta { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.tile:hover .tile-title { color: var(--accent); }
.tile:hover .tile-meta { color: var(--muted); }

/* Project page */
.project-page .back { font-size: 13px; color: var(--muted); display: inline-block; margin-bottom: 28px; }
.project-page .back::before { content: "← "; }
.project-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; margin-bottom: 8px; }
.project-title h1 { font-size: 26px; }
.project-title .year { color: var(--muted); font-variant-numeric: tabular-nums; }
.project-desc { max-width: var(--measure); font-size: 16px; line-height: 1.55; margin: 6px 0 36px; }
.piece { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: 20px 32px; padding: 32px 0; border-top: 1px solid var(--rule); }
.piece-meta { position: sticky; top: 84px; align-self: start; font-size: 14px; line-height: 1.5; }
.piece-meta h2 { font-size: 16px; font-weight: 500; }
.piece-meta .m { color: var(--muted); }
.piece-meta .note { margin-top: 10px; max-width: 30ch; }
.piece-images { display: grid; gap: 24px; }
.piece-images img { width: 100%; max-height: 88vh; object-fit: contain; object-position: left; }
.piece-images video { width: 100%; max-height: 88vh; background: #000; }
.piece-images .detail-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px; }
.piece-images .detail-row img { max-height: none; aspect-ratio: 3 / 4; object-fit: cover; }

/* About */
.about { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: 28px 32px; }
.about h2 { font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); padding-top: 4px; }
.about .text { max-width: var(--measure); display: flex; flex-direction: column; gap: 14px; font-size: 16px; line-height: 1.55; }
.about .text.lead { font-size: clamp(17px, 1.6vw, 20px); }
.cv { display: grid; gap: 28px; max-width: var(--measure); }
.cv h3 { font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.cv ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.cv li { display: grid; grid-template-columns: 4.5em 1fr; gap: 12px; font-size: 15px; }
.cv li span:first-child { color: var(--muted); font-variant-numeric: tabular-nums; }
.about-sep { grid-column: 1 / -1; border-top: 1px solid var(--rule); margin: 12px 0; }

/* Contact */
.contact { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: 28px 32px; }
.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; font-size: clamp(18px, 2vw, 24px); }
.contact-list span { display: block; font-size: 13px; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 2px; }
.contact-list a { border-bottom: 1px solid var(--rule); }
.contact-list a:hover { border-color: var(--accent); }

/* Footer */
.site-footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px;
  padding: 20px var(--gutter) 28px;
  font-size: 12px; color: var(--muted);
  border-top: 1px solid var(--rule);
}
.site-footer a:hover { color: var(--accent); }

@media (max-width: 760px) {
  body { font-size: 15px; }
  .site-header { padding: 16px var(--gutter); }
  .nav { gap: 16px; }
  .tiles { grid-template-columns: 1fr; gap: 32px; }
  .piece, .about, .contact { grid-template-columns: 1fr; }
  .piece-meta { position: static; }
}
@media (prefers-reduced-motion: no-preference) {
  a { transition: color .15s ease, border-color .15s ease; }
}
