:root {
  --bg: #fcfcfb;
  --fg: #1a1a1a;
  --muted: #6a6a66;
  --rule: #e4e3df;
  --meta: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --body: 13px;
  --nav: 13px;
  --h: 1.5;
  --track: 0;
  --navw: 210px;
  --accent: #7a2e2a;
  --active: #b0b0ac;
}

html, body { margin: 0; padding: 0; height: 100%; }
* { box-sizing: border-box; }

/* hide scrollbars, keep scrolling */
* { scrollbar-width: none; -ms-overflow-style: none; }
::-webkit-scrollbar { width: 0; height: 0; display: none; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: var(--body);
  line-height: var(--h);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--fg);
  text-decoration: underline;
  text-underline-offset: 2px;
}
a:visited { color: var(--fg); }
a:hover { color: var(--active); }

.italic { font-style: italic; }
.muted { color: var(--muted); }

/* ---- layout ---- */
.layout {
  display: flex;
  height: 100vh;
  width: 100%;
  overflow: hidden;
}

nav.side {
  flex: 0 0 var(--navw);
  width: var(--navw);
  height: 100%;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  padding: 90px 20px 40px 48px;
}
nav.side .nav-item {
  font-size: var(--nav);
  letter-spacing: var(--track);
  line-height: 1.75;
  cursor: pointer;
  color: var(--fg);
  font-weight: 400;
  user-select: none;
}
nav.side .nav-item:hover { color: var(--fg); font-weight: 500; }
nav.side .nav-item.active { color: var(--active); }
nav.side .nav-item.gap { margin-top: 1.6em; }

.wrap {
  display: flex;
  flex: 1 1 0;
  height: 100%;
  min-width: 0;
}

main.center {
  flex: 2.6 1 0;
  height: 100%;
  overflow-y: auto;
  padding: 90px 52px 140px 48px;
}

aside.right {
  flex: 1 1 0;
  min-width: 300px;
  height: 100%;
  overflow-y: auto;
  padding: 90px 48px 140px 40px;
}

/* ---- content pieces ---- */
.head {
  font-family: var(--meta);
  font-size: 12px;
  line-height: 1.5;
  margin-bottom: 56px;
}

.block { margin-bottom: 56px; }
.block img {
  display: block;
  width: 100%;
  /* With the width/height attributes in the markup this holds the image's slot
     open before it arrives, so nothing below it jumps. */
  height: auto;
}

/* Only the first page painted can reach a visitor mid-download; navigation
   waits for its images, so those are already .ready and never fade. */
.block img,
.portrait img {
  opacity: 0;
  transition: opacity .3s ease;
}
.block img.ready,
.portrait img.ready { opacity: 1; }

body.loading { cursor: progress; }
.block.framed img {
  border: 1px solid var(--rule);
  box-shadow: 0 2px 18px rgba(0, 0, 0, .08);
}

.caption {
  font-family: var(--meta);
  font-size: 12px;
  line-height: 1.45;
  margin-top: 10px;
  color: var(--fg);
}

.statement p,
.bio p {
  margin: 0 0 18px 0;
  line-height: var(--h);
}
.statement p { white-space: pre-line; }

.section-title {
  font-family: var(--meta);
  font-size: 12px;
  margin-bottom: 28px;
}

/* press */
.press-header {
  font-family: var(--meta);
  font-size: 12px;
  padding-bottom: 12px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--rule);
}
.press-item { margin-bottom: 18px; line-height: 1.5; }
.press-item .meta { color: var(--muted); }

.article { max-width: 600px; margin-top: 8px; }
.article .dek { font-style: italic; margin: 0 0 12px 0; line-height: var(--h); }
.article .credit {
  font-family: var(--meta);
  font-size: 12px;
  margin-bottom: 26px;
  color: var(--muted);
}
.article p { margin: 0 0 16px 0; line-height: var(--h); }
.article p.quote { font-style: italic; }

/* info / cv */
.info-block { max-width: 720px; }
.cv-head { margin-bottom: 2em; }
.cv-section { margin-bottom: 2em; }
.cv-section .heading {
  text-decoration: underline;
  text-underline-offset: 2px;
  margin-bottom: .5em;
}
.cv-section .row { line-height: 1.7; margin-bottom: .15em; }
.contact { margin-top: 2em; line-height: 1.9; }

.portrait { max-width: 760px; margin-bottom: 44px; }
.portrait img { display: block; width: 364px; height: 241px; max-width: 640px; }
.portrait .credit {
  font-family: var(--meta);
  font-size: 12px;
  line-height: 1.45;
  margin-top: 10px;
  color: var(--muted);
}

.center-narrow { max-width: 760px; }

.footer {
  margin-top: 80px;
  padding-top: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-family: var(--meta);
  font-size: 11px;
  color: var(--muted);
}

/* Desktop keeps the footer inside the centre column, which scrolls on its own. */
#page-footer { display: none; }

/* ---- mobile ---- */
@media (max-width: 760px) {
  nav.side {
    flex: 0 0 118px;
    width: 118px;
    padding: 24px 10px 24px 16px;
  }
  .wrap {
    flex-direction: column;
    flex: 1 1 0;
    overflow-y: auto;
  }
  main.center {
    width: 100%;
    flex: none;
    height: auto;
    overflow: visible;
    padding: 24px 16px 32px 16px;
  }
  aside.right {
    width: 100%;
    flex: none;
    height: auto;
    overflow: visible;
    min-width: 0;
    padding: 0 16px 0 16px;
  }
  /* Columns are stacked now, so hand the footer over to the copy that comes
     after both of them. */
  main.center .footer { display: none; }
  /* The fixed 364px portrait is wider than the column left beside the nav, so
     let it shrink; the ratio holds its slot open while it loads. */
  .portrait img {
    width: 100%;
    height: auto;
    max-width: 364px;
    aspect-ratio: 3130 / 2075;
  }
  #page-footer {
    display: block;
    width: 100%;
    flex: none;
    padding: 0 16px 40px 16px;
  }
  #page-footer .footer { margin-top: 40px; }
}
