:root {
  --ink: #111;
  --mute: #6e6e6e;
  --rule: #d9d9d9;
  --bg: #fff;
  --max: 1560px;
  --gut: clamp(16px, 4vw, 40px);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 300 16px/1.75 "Jost", "Helvetica Neue", Arial, sans-serif;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--mute); }
img { display: block; max-width: 100%; height: auto; }
main, header.site, footer.site { max-width: var(--max); margin: 0 auto; padding: 0 var(--gut); }

/* header */
header.site {
  display: flex; align-items: baseline; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  padding-top: clamp(28px, 6vw, 64px); padding-bottom: clamp(28px, 6vw, 72px);
}
.name { font-weight: 400; font-size: clamp(18px, 2.4vw, 24px); letter-spacing: .32em; }
nav { display: flex; gap: clamp(16px, 3vw, 36px); }
nav a { font-size: 12px; letter-spacing: .24em; text-transform: uppercase; }
nav a[aria-current] { border-bottom: 1px solid var(--ink); }

/* section bars, as on the reference page: title left, controls right, hairline under */
.bar {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  border-bottom: 1px solid var(--rule); padding-bottom: 12px; margin: 0 0 clamp(28px, 4vw, 48px);
}
.bar h2 { margin: 0; font-weight: 400; font-size: 13px; letter-spacing: .28em; text-transform: uppercase; }

/* intro */
.intro {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(28px, 5vw, 72px);
  align-items: start; margin-bottom: clamp(64px, 10vw, 128px);
}
.portrait { width: 100%; aspect-ratio: 1; object-fit: cover; }
.bio { max-width: 34em; }
.bio p { margin: 0 0 1.2em; font-size: clamp(16px, 1.5vw, 18px); text-wrap: pretty; }
.bio .more a, .more a { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; border-bottom: 1px solid var(--ink); }

/* work: pure-CSS view and category switches */
.work input { position: absolute; opacity: 0; pointer-events: none; }
.views, .cats { display: flex; gap: 20px; font-size: 13px; }
.views label, .cats label { cursor: pointer; color: var(--mute); }
#v-featured:checked ~ .bar label[for=v-featured],
#v-thumbs:checked ~ .bar label[for=v-thumbs],
#c-all:checked ~ .all label[for=c-all],
#c-panel:checked ~ .all label[for=c-panel],
#c-paper:checked ~ .all label[for=c-paper] { color: var(--ink); border-bottom: 1px solid var(--ink); }
.work .all { display: none; }
#v-thumbs:checked ~ .featured { display: none; }
#v-thumbs:checked ~ .all { display: block; }
#c-panel:checked ~ .all .group[data-cat=paper],
#c-paper:checked ~ .all .group[data-cat=panel] { display: none; }
.cats { margin: -16px 0 32px; }

/* featured grid: works sit on a shared baseline with room around them */
.featured { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(48px, 6vw, 96px) clamp(24px, 3.4vw, 48px); }
figure { margin: 0; }
.ft a { display: block; aspect-ratio: 1; }
.ft img { width: 100%; height: 100%; object-fit: contain; object-position: center bottom; }
figcaption { margin-top: 14px; font-size: 13px; line-height: 1.55; color: var(--mute); text-align: center; }
figcaption span { display: block; }
figcaption .t { color: var(--ink); }

/* thumbnails */
.group { margin-bottom: clamp(40px, 6vw, 72px); }
.group h3 { margin: 0 0 18px; font-weight: 400; font-size: 12px; letter-spacing: .24em; text-transform: uppercase; }
.group h3 span { color: var(--mute); letter-spacing: 0; margin-left: 6px; }
/* whole works, never cropped: each sits on a shared baseline in a square slot */
.thumbs { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: clamp(28px, 3vw, 44px) clamp(16px, 2.2vw, 32px); }
.th a { display: block; aspect-ratio: 1; }
.th img { width: 100%; height: 100%; object-fit: contain; object-position: center bottom; transition: opacity .2s; }
.th a:hover img { opacity: .82; }
.th figcaption { margin-top: 8px; font-size: 11.5px; line-height: 1.4; }
.th figcaption span:not(.s) { display: none; }

/* about */
.about .cols { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); margin-bottom: clamp(64px, 10vw, 112px); }
.text { max-width: 40em; }
.text p { margin: 0 0 1.3em; font-size: clamp(16px, 1.5vw, 18px); text-wrap: pretty; }
.sig { color: var(--mute); }
aside h3 { margin: 0 0 8px; font-weight: 400; font-size: 12px; letter-spacing: .24em; text-transform: uppercase; }
aside p, aside ul { margin: 0 0 28px; font-size: 15px; }
ul.plain, ul.ex { list-style: none; padding: 0; }
ul.ex { margin: 0 0 clamp(64px, 10vw, 112px); font-size: 15px; }
ul.ex li { display: grid; grid-template-columns: 64px 1fr; gap: 16px; padding: 10px 0; border-bottom: 1px solid #efefef; text-wrap: balance; }
aside li, figcaption span { text-wrap: balance; }
ul.ex span { color: var(--mute); }

/* footer */
footer.site { padding-top: clamp(48px, 8vw, 96px); padding-bottom: 48px; }
.contact { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; font-size: 15px; }
.contact p { margin: 0; }
.contact a { border-bottom: 1px solid var(--rule); }
.fine { margin-top: 64px; font-size: 12px; color: var(--mute); }

/* lightbox */
.lb { position: fixed; inset: 0; z-index: 10; background: rgba(255,255,255,.98); display: flex; align-items: center; justify-content: center; padding: 56px 64px; }
.lb[hidden] { display: none; }
.lb figure { display: flex; flex-direction: column; align-items: center; max-width: 100%; max-height: 100%; }
.lb img { max-width: min(100%, 1400px); max-height: calc(100dvh - 190px); width: auto; height: auto; object-fit: contain; }
.lb button:focus:not(:focus-visible) { outline: none; }
.lb button { position: absolute; background: none; border: 0; padding: 12px; font: inherit; color: var(--ink); cursor: pointer; }
.lb .x { top: 12px; right: 16px; font-size: 12px; letter-spacing: .24em; text-transform: uppercase; }
.lb .prev, .lb .next { top: 50%; transform: translateY(-50%); font-size: 24px; }
.lb .prev { left: 8px; } .lb .next { right: 8px; }

@media (max-width: 900px) {
  .featured { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .thumbs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  body { font-size: 15px; }
  header.site { flex-direction: column; align-items: flex-start; gap: 6px; padding-top: 28px; padding-bottom: 24px; }
  .name { font-size: 19px; letter-spacing: .26em; }
  nav { gap: 4px 20px; flex-wrap: wrap; margin-left: -2px; }
  nav a { font-size: 11.5px; letter-spacing: .18em; padding: 12px 2px; }
  nav a[aria-current] { border-bottom: 0; text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1px; }
  .intro, .about .cols { grid-template-columns: 1fr; }
  .intro { gap: 24px; margin-bottom: 56px; }
  .bio p, .text p { font-size: 16px; }
  .bar { margin-bottom: 24px; }
  .views, .cats { gap: 4px 18px; }
  .views label, .cats label { padding: 10px 0; }
  #v-featured:checked ~ .bar label[for=v-featured],
  #v-thumbs:checked ~ .bar label[for=v-thumbs],
  #c-all:checked ~ .all label[for=c-all],
  #c-panel:checked ~ .all label[for=c-panel],
  #c-paper:checked ~ .all label[for=c-paper] { border-bottom: 0; text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1px; }
  .cats { margin: -12px 0 20px; }
  .featured { grid-template-columns: 1fr; gap: 44px; }
  .ft a { aspect-ratio: auto; }
  .ft img { width: 100%; }
  figcaption { margin-top: 10px; font-size: 12.5px; }
  .thumbs { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px 10px; }
  .th figcaption { font-size: 10.5px; }
  .group h3 { margin-bottom: 12px; }
  ul.ex li { grid-template-columns: 44px 1fr; gap: 12px; }
  .contact { grid-template-columns: 1fr; gap: 18px; }
  .contact a { display: inline-block; padding: 6px 0; border-bottom: 0; text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 5px; }
  .fine { margin-top: 40px; }
  .lb { padding: 52px 0 76px; }
  .lb img { max-width: 100vw; max-height: calc(100dvh - 210px); }
  .lb figcaption { padding: 0 16px; }
  .lb .prev, .lb .next { top: auto; bottom: 10px; transform: none; font-size: 26px; padding: 14px 22px; }
  .lb .x { top: 6px; right: 6px; padding: 14px; }
}
