:root {
  --ink: #000;
  --muted: #8a8a8a;
  --paper: #fff;
  --gap: 20px;
  --panel: 300px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 64px; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  background: var(--paper);
  color: var(--ink);
  font: 400 13px/1.45 "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
@media (hover: hover) { a:hover { color: var(--muted); } }
a:focus-visible, summary:focus-visible, button:focus-visible { outline: 1px solid var(--ink); outline-offset: 2px; }
img { display: block; width: 100%; height: auto; }
/* Make casual saving harder: no dragging, selecting or long-press "Save image" */
img { -webkit-user-drag: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
button { font: inherit; line-height: inherit; color: inherit; background: none; border: 0; border-radius: 0; cursor: pointer; -webkit-appearance: none; appearance: none; -webkit-tap-highlight-color: transparent; }
a { -webkit-tap-highlight-color: transparent; }

/* ---------- White bar across the top; photos scroll underneath it ---------- */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 9;
  height: calc(var(--gap) * 2 + 19px + env(safe-area-inset-top, 0px));
  background: rgba(255, 255, 255, .94);
}
/* Frosted glass where the browser supports it: photos show through, softly blurred */
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .topbar {
    background: rgba(255, 255, 255, .62);
    -webkit-backdrop-filter: saturate(160%) blur(18px);
    backdrop-filter: saturate(160%) blur(18px);
  }
}

/* ---------- Menu: hidden until you hover the name ---------- */
.menu { position: fixed; top: 0; left: 0; z-index: 10; }
.menu-toggle {
  position: relative; z-index: 2;
  display: flex; gap: 10px; align-items: baseline;
  padding: calc(var(--gap) + env(safe-area-inset-top, 0px)) var(--gap) var(--gap);
  text-align: left;
}
.menu-toggle .hint { color: var(--muted); padding: 0; }
@media (hover: hover) { .menu-toggle .home:hover { color: var(--ink); } }
.menu-panel {
  position: fixed; top: 0; left: 0; bottom: 0;
  width: var(--panel);
  padding: 64px var(--gap) var(--gap);
  background: var(--paper);
  display: flex; flex-direction: column; justify-content: space-between;
  overflow-y: auto;
  visibility: hidden; opacity: 0; transform: translateX(-12px);
  transition: opacity .18s ease, transform .18s ease, visibility 0s linear .18s;
}
.menu.is-open .menu-panel {
  visibility: visible; opacity: 1; transform: none;
  transition: opacity .18s ease, transform .18s ease;
  box-shadow: 1px 0 0 rgba(0,0,0,.06);
}
@media (hover: hover) and (pointer: fine) {
  .menu:hover .menu-panel {
    visibility: visible; opacity: 1; transform: none;
    transition: opacity .18s ease, transform .18s ease;
    box-shadow: 1px 0 0 rgba(0,0,0,.06);
  }
  .menu:hover .menu-toggle .hint { visibility: hidden; }
}
@media (prefers-reduced-motion: reduce) {
  .menu-panel, .menu.is-open .menu-panel { transition: none; transform: none; }
}
.pages, .index { list-style: none; margin-bottom: 28px; }
.pages a[aria-current="page"] { color: var(--muted); }
.index li { display: grid; grid-template-columns: 28px 1fr; }
.index .n { color: var(--muted); font-variant-numeric: tabular-nums; }
.index a.is-active { color: var(--muted); }
.contact .label { color: var(--muted); }
.fine { color: var(--muted); margin-top: 28px; }

/* ---------- Page area ---------- */
main { padding: 64px var(--gap) 120px; }

/* ---------- Projects ---------- */
.project { padding-bottom: 140px; }
.head {
  display: grid;
  /* number | title + Info, details below | description (always starts at the middle of the page) */
  grid-template-columns: 28px minmax(0, 1fr) 50%;
  grid-template-rows: auto 1fr;
  gap: 0;
  margin-bottom: 14px;
}
.head h1, .head h2 { font-size: inherit; font-weight: 400; }
@media (hover: hover) { .head h2 a:hover { color: var(--muted); } }
.head .n { color: var(--muted); font-variant-numeric: tabular-nums; }
.info-toggle { color: var(--muted); padding: 0; margin-top: 2px; }
@media (hover: hover) { .info-toggle:hover { color: var(--ink); } }
.info-toggle::after { content: " +"; }
.info-toggle[aria-expanded="true"]::after { content: " –"; }
.title, .details { padding-right: var(--gap); }
.head .n { grid-row: 1; }
.title { grid-column: 2; grid-row: 1; }
/* details sit under Info, level with the last line of the description */
.details { grid-column: 2; grid-row: 2; align-self: end; padding-top: 16px; color: var(--muted); }
.text { grid-column: 3; grid-row: 1 / span 2; }
.details p + p { margin-top: 0.6em; }
.text p { max-width: 60ch; }
.project:not(.is-open) .details,
.project:not(.is-open) .text { display: none; }
.project.is-open .head { margin-bottom: 28px; }
.hero { display: block; }
.hero img { transition: opacity .2s ease; }
@media (hover: hover) { .hero:hover img { opacity: .92; } }
.project-page { padding-bottom: 80px; }
.project-nav { display: flex; justify-content: space-between; gap: 20px; padding-top: 24px; }
.project-nav .label { display: block; color: var(--muted); }
.project-nav a:nth-child(2) { align-self: flex-end; }
.project-nav a:last-child { text-align: right; }
.media { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); }
.media figure.wide { grid-column: 1 / -1; }
.media video { display: block; width: 100%; height: auto; }
figcaption { color: var(--muted); font-size: 11px; margin-top: 6px; }

/* ---------- About ---------- */
.about {
  display: grid;
  grid-template-columns: minmax(0, 52ch) minmax(200px, 340px);
  justify-content: space-between;
  gap: 40px;
}
.about-text p + p { margin-top: 1em; }
.about-text a { color: var(--muted); }
@media (hover: hover) { .about-text a:hover { color: var(--ink); } }
.lists { margin-top: 48px; }
.lists dl { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 0 24px; }
.lists dl + dl { margin-top: 24px; }
.lists dt { color: var(--muted); }
.lists dd a { color: var(--muted); }
@media (hover: hover) { .lists dd a:hover { color: var(--ink); } }

/* ---------- Playground ---------- */
.playground {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 64px var(--gap);
  align-items: start;
}
.entry .shots { display: grid; gap: 8px; }
.entry .caption { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; }
.entry .year { color: var(--muted); font-variant-numeric: tabular-nums; }
.entry .note { color: var(--muted); margin-top: 2px; max-width: 48ch; }
.empty { color: var(--muted); }
.shuffle {
  position: fixed; top: 0; right: 0; z-index: 10;
  padding: calc(var(--gap) + env(safe-area-inset-top, 0px)) var(--gap) var(--gap);
  color: var(--muted);
}
@media (hover: hover) { .shuffle:hover { color: var(--ink); } }

/* ---------- Smaller screens ---------- */
@media (max-width: 1100px) {
  .playground { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  :root { --gap: 16px; }
  main { padding: 56px 16px 80px; }
  .project { padding-bottom: 80px; }
  .head { grid-template-columns: 28px minmax(0, 1fr); }
  .head { grid-template-rows: none; }
  .details, .text { grid-column: 2; grid-row: auto; align-self: auto; padding-top: 0; margin-top: 12px; }
  .media { grid-template-columns: 1fr; gap: 12px; }
  .about { grid-template-columns: 1fr; gap: 24px; }
  .portrait { order: -1; max-width: 340px; }
  .lists dl { grid-template-columns: 1fr; gap: 2px; }
  .playground { grid-template-columns: 1fr; gap: 48px; }
  .menu-panel { width: 100%; }
  .project-nav { flex-wrap: wrap; }
}
