body {
  margin: 0;
  background: #fff;
  color: #444; /* soft dark grey instead of black */
  font: 15px/1.4 Helvetica, Arial, sans-serif;
}

.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 20px 32px;
}

h1, h2 {
  margin: 0 0 1.4em;
  font-size: inherit;
  font-weight: normal;
}

p { margin: 0 0 1.4em; }
p:last-child { margin-bottom: 0; }

a { color: inherit; }

img {
  display: block;
  max-width: 100%;
  height: auto;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Header + tabs */
.top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1em;
  margin-bottom: 48px;
}

.top a { text-decoration: none; }

.top nav {
  display: flex;
  gap: 1.2em;
}

.top nav a[aria-current="page"] { text-decoration: underline; }

/* Without JS every section stays visible, one after another */
html:not(.js) .view + .view { margin-top: 4.2em; }

/* Home: the blurred portrait fills the whole window, click anywhere to enter */
.home-image { display: block; }

.home-image img {
  width: 100%;
  opacity: 0.75;
  filter: grayscale(20%) contrast(105%);
}

.home-caption {
  margin-top: 8px;
  font-size: 12px;
  color: #767676;
}

.js .home {
  position: fixed;
  inset: 0;
  z-index: 0;
}

.js .home-image,
.js .home-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.js .home-caption {
  position: absolute;
  left: 20px;
  bottom: 20px;
  margin: 0;
}

.top {
  position: relative;
  z-index: 1;
}

.is-home .foot { display: none; }

/* Bio: statement, then CV (side by side on desktop) */
.bio {
  display: grid;
  gap: 2.8em;
}

.statement,
.cv { max-width: 36em; }

.cv h2 { margin: 2.8em 0 1em; }
.cv h2:first-child { margin-top: 0; }

.cv table { border-collapse: collapse; }

.cv td {
  padding: 0 0 0.6em;
  vertical-align: top;
}

.cv td:first-child { padding-right: 1.6em; }

/* Manifesto */
.text { max-width: 36em; }

.text ol {
  margin: 0;
  padding-left: 1.6em;
}

.text li { margin-bottom: 0.8em; }

.text h2 { margin-top: 3.5em; }

/* Footer */
.foot {
  display: grid;
  gap: 1em;
  margin-top: 96px;
  font-size: 12px;
  color: #767676;
}

/* Work pages: image + caption side by side */
.piece {
  display: grid;
  gap: 24px;
}

.piece-text { max-width: 32em; }

/* Previous / next work: grey < >. Phones: right under the image.
   Desktop: pinned to the same spot in the window on every work page,
   so clicking through never means hunting for the arrow. */
.pager {
  display: flex;
  gap: 16px;
  margin: 12px 0 0 -12px;
  font-size: 28px;
  line-height: 1;
  color: #949494;
}

.pager a,
.pager-gap {
  padding: 8px 12px;
  text-decoration: none;
}

.pager-gap { visibility: hidden; }

@media (min-width: 760px) {
  /* Fit one screen: footer sits at the bottom of the window, spacing kept tight */
  .page {
    padding: 28px 40px;
    min-height: 100vh;
    min-height: 100dvh;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
  }

  main { flex: 1; }

  .top { margin-bottom: 40px; }

  .page h2 { margin-bottom: 1em; }

  .cv h2 { margin: 2em 0 0.8em; }

  .text h2 { margin-top: 2.2em; }

  .bio {
    grid-template-columns: 1fr 1fr;
    gap: 64px;
  }

  /* line up with the page content (max 1200 px, centred) */
  .js .home-caption {
    left: calc(max(0px, (100vw - 1200px) / 2) + 40px);
    bottom: 28px;
  }

  .foot {
    grid-template-columns: 1fr auto;
    align-items: end;
    margin-top: 40px;
  }

  .foot p:last-child { text-align: right; }

  .piece {
    grid-template-columns: 2fr 1fr;
    gap: 48px;
    align-items: start;
  }

  .piece-image img {
    max-height: calc(100vh - 180px);
    width: auto;
  }

  .pager {
    position: fixed;
    left: calc(max(0px, (100vw - 1200px) / 2) + 40px - 12px);
    bottom: 16px;
    margin: 0;
  }
}
