/* Design D: sidebar index, fuller. Hairline rules, a section index in the sidebar,
   image counts, numbered figures, previous and next links, a footer. */
:root { --gray: #767676; --rule: 1px solid #000; }
html {
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 13px;
  line-height: 1.4;
  -webkit-text-size-adjust: 100%;
}
body { margin: 0; background: #fff; color: #000; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2 { font-size: 20px; font-weight: bold; line-height: 1.2; margin: 0 0 6px; }
p { margin: 0 0 1em; }
img { display: block; max-width: 100%; height: auto; }

/* sidebar */
.site-header { padding: 16px 16px 8px; }
.site-name { display: block; font-size: 20px; font-weight: bold; line-height: 1.2; margin-bottom: 16px; }
.site-header nav { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.nav-group { margin: 0; }
.nav-head { display: block; font-weight: bold; }
.subnav { list-style: none; margin: 2px 0 6px; padding: 0; }
details.nav-group[open] { flex-basis: 100%; }
summary.nav-head { cursor: pointer; list-style: none; }
summary.nav-head::-webkit-details-marker { display: none; }
summary.nav-head::after { content: " -"; font-weight: normal; color: var(--gray); }
details[open] > summary.nav-head::after { content: " -"; }
summary.nav-head:hover { text-decoration: underline; }
.subnav a { display: block; color: var(--gray); padding: 1px 0; }
.subnav a:hover, .subnav a[aria-current] { color: #000; }
a[aria-current] { text-decoration: underline; }

main { padding: 16px; }

/* section and page heads sit on a rule */
.pli, .work, .page-head, .show, .text > h1 { border-top: var(--rule); padding-top: 10px; }
.page-head { margin-bottom: 24px; }
.meta { color: var(--gray); }
.page-head .meta { margin-bottom: 0; }

.column { max-width: 1000px; }
.text { max-width: 600px; }
.text > h1 { margin-bottom: 24px; }
.text a, .caption a { text-decoration: underline; }
.plain { list-style: none; margin: 0 0 1em; padding: 0; }
.toc { margin: 12px 0 40px; }

/* home: work as an index, one row per project */
.work, .books { margin-bottom: 48px; border-top: var(--rule); padding-top: 10px; }
.index { margin-top: 12px; }
.index li { display: flex; justify-content: space-between; gap: 16px; border-bottom: 1px solid #d6d6d6; padding: 7px 0; }
.index li:first-child { border-top: 1px solid #d6d6d6; }

/* figures */
.stack figure { margin: 0 0 40px; }
/* Never shown larger than the file itself; tall images fit the screen height. */
.stack video { display: block; width: 100%; height: auto; }
.stack img { width: 100%; height: auto; max-height: 92vh; object-fit: contain; object-position: left top; }
/* The inline max-width on each image is its real width, so nothing is ever enlarged. */
.caption { margin: 6px 0 0; }
.fig-num { color: var(--gray); display: inline-block; min-width: 2.2em; }
.show { margin-bottom: 48px; }
.show h2 { margin-bottom: 16px; }

/* PLI */
.pli { margin-bottom: 56px; }
.pli h1 { margin-bottom: 2px; }
.pli > .caption { color: var(--gray); margin: 0; }
.pli-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px 10px; margin: 18px 0 18px; }
.pli-grid figure { margin: 0; }
/* every PLI thumbnail in the same 4:3 frame; other shapes are cropped to fill it, centered */
.pli-grid img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; object-position: center; }
.pli-links { border-top: 1px solid #d6d6d6; padding-top: 8px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 16px; }
.pli-more { font: inherit; color: inherit; background: none; border: 1px solid #000; padding: 4px 14px; cursor: pointer; }
.pli-more:hover { background: #000; color: #fff; }
.pli-links a { margin-right: 16px; text-decoration: underline; }

/* previous / next */
.pager { display: flex; justify-content: space-between; gap: 16px; border-top: var(--rule); padding-top: 10px; margin-top: 8px; }
.pager .next { margin-left: auto; text-align: right; }

.site-footer { display: flex; flex-wrap: wrap; gap: 4px 20px; border-top: var(--rule); margin: 32px 16px 0; padding: 10px 0 24px; color: var(--gray); }
.site-footer a:hover { color: #000; }

@media (min-width: 760px) {
  .site-header { position: fixed; top: 0; bottom: 0; left: 0; width: 220px; box-sizing: border-box;
                 padding: 24px 20px; border-bottom: 0; overflow-y: auto; }
  .site-header nav { display: block; }
  details.nav-group[open] { flex-basis: auto; }
  .nav-group { margin-bottom: 10px; }
  main { margin-left: 220px; padding: 24px 32px; }
  .site-footer { margin: 32px 32px 0 252px; }
  .pli-grid { grid-template-columns: repeat(4, 1fr); gap: 24px 14px; }
}

.statement { max-width: 600px; margin: 16px 0 32px; }
.book { margin: 6px 0 0; }
.book a { text-decoration: underline; }
.statement h2 { font-size: 1rem; margin: 0 0 1em; }
.book-spreads img { max-height: none; box-shadow: 0 0 0 1px #e2e2e2; }
/* a single page (the first) sits at half width, like a right-hand page */
.book-spreads figure:first-child img { max-width: 50% !important; }
.book-spreads figure { margin-bottom: 32px; }
.book-spreads .fig-num { display: none; }

/* Even rows: one height per row, rows fill the column (project "layout": "rows") */
.rows { display: flex; flex-wrap: wrap; gap: 12px; }
.rows::after { content: ""; flex: 10 1 0; }
.rows figure { margin: 0 0 6px; }
.rows .caption { margin-top: 6px; }
.rows img, .rows video { display: block; width: 100%; height: auto; max-width: none !important; }

/* Even grid: square cells, images fitted inside, uncropped (project "layout": "grid") */
.cells { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.cells figure { margin: 0; aspect-ratio: 1; display: flex; align-items: center; justify-content: center; }
.cells img { max-width: 100%; max-height: 100%; width: auto; height: auto; }
@media (min-width: 760px) { .cells { grid-template-columns: repeat(3, 1fr); gap: 24px; } }
