/* RocketPad style: Elegant */
:root {
  --paper: #efeee7;
  --paper-deep: #e4e2d8;
  --ink: #1e1c19;
  --ink-soft: #57524a;
  --rubric: #b3301a;
  --rule: #c7c3b7;
  --print-paper: #ffffff;
  --heading: "Cormorant Garamond", "EB Garamond", Garamond, "Times New Roman", serif;
  --body: "Jost", "Futura", "Century Gothic", "Helvetica Neue", sans-serif;
  --radius: 0;
  /* Layout: a recto book page. One 36rem text block set left of centre, with a 13rem outer margin for notes and figure captions. */
  --measure: 36rem;
  --margin-col: 13rem;
  --gutter: 3rem;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--paper);
  color: var(--ink);
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 4.5rem;
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-weight: 400;
  font-size: 1.125rem;
  line-height: 1.65;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; height: auto; display: block; }
p { margin: 0; }

a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-color: var(--rubric);
  text-decoration-thickness: 1px;
  text-underline-offset: .22em;
}
a:hover { color: var(--rubric); }
:focus-visible { outline: 2px solid var(--rubric); outline-offset: 3px; }
::selection { background: var(--rubric); color: var(--paper); }

h1, h2, h3, h4 {
  font-family: var(--heading);
  font-weight: 500;
  line-height: 1.1;
  margin: 0;
  text-wrap: balance;
}
h4 {
  font-family: var(--body);
  font-weight: 500;
  font-size: 1.125rem;
  line-height: 1.45;
}
em, cite { font-style: italic; }
h4 cite { font-family: var(--heading); font-size: 1.35rem; }

.skip {
  position: absolute;
  left: 1rem;
  top: -5rem;
  z-index: 30;
  background: var(--paper);
  padding: .6rem 1rem;
}
.skip:focus { top: 1rem; }

/* ---------- Running head ---------- */

.running-head {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  padding: .25rem clamp(1.25rem, 4vw, 3rem);
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
  transition: transform .35s ease, visibility .35s;
}
.running-head.is-hidden { transform: translateY(-100%); visibility: hidden; }

.rh-name,
.rh-contents {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.rh-name {
  justify-self: start;
  font-family: var(--heading);
  font-size: 1.3rem;
  text-decoration: none;
}
.rh-chapter {
  font-family: var(--heading);
  font-style: italic;
  font-size: 1.3rem;
  white-space: nowrap;
}
.rh-right {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.rh-contents { font-size: 1rem; }
.rh-folio {
  min-width: 3ch;
  text-align: right;
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
  color: var(--ink-soft);
}

@media (max-width: 40rem) {
  .running-head { grid-template-columns: 1fr auto; }
  .rh-name { display: none; }
  .rh-chapter { justify-self: start; }
}

/* ---------- Title page and edition notice ---------- */

.title-page {
  min-height: min(94svh, 62rem);
  display: grid;
  grid-template-rows: 1fr auto 1fr auto;
  justify-items: center;
  text-align: center;
  padding: 3rem 1.25rem 2.5rem;
}
.tp-block { grid-row: 2; }
.tp-name {
  font-size: clamp(4.2rem, 14vw, 11.5rem);
  line-height: .86;
  letter-spacing: -.015em;
}
.tp-name span { display: block; }
.tp-sub {
  margin-top: 1.75rem;
  font-family: var(--heading);
  font-style: italic;
  font-size: clamp(1.45rem, 2.6vw, 2rem);
  line-height: 1.25;
}
.tp-rule {
  width: 4.5rem;
  height: 0;
  margin: 2rem auto;
  border: 0;
  border-top: 2px solid var(--rubric);
}
.tp-place { letter-spacing: .02em; }
.tp-imprint {
  grid-row: 4;
  font-family: var(--heading);
  font-size: 1.3rem;
}

@media (prefers-reduced-motion: no-preference) {
  .tp-name, .tp-sub, .tp-place, .tp-imprint {
    animation: ink-in 1.2s cubic-bezier(.2, .7, .2, 1) both;
  }
  .tp-sub { animation-delay: .2s; }
  .tp-place { animation-delay: .55s; }
  .tp-imprint { animation-delay: .75s; }
  .tp-rule { animation: rule-in .9s .35s cubic-bezier(.6, 0, .2, 1) both; }
}
@keyframes ink-in {
  from { opacity: 0; filter: blur(7px); }
  to { opacity: 1; filter: blur(0); }
}
@keyframes rule-in {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

.verso {
  min-height: 55svh;
  display: flex;
  align-items: flex-end;
  padding: 4rem clamp(1.25rem, 7vw, 7rem);
}
.verso-text {
  max-width: 25rem;
  display: grid;
  gap: .8rem;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink-soft);
}
.verso-text .availability { color: var(--ink); }
.availability::before {
  content: "\00B6\00A0";
  color: var(--rubric);
}

/* ---------- The page grid ---------- */

.page {
  display: grid;
  grid-template-columns:
    [full-start] minmax(1.25rem, 1fr)
    [text-start] minmax(0, var(--measure))
    [text-end] minmax(1.25rem, 1fr)
    [full-end];
}
.page > * { grid-column: text; }

.para .note { margin-top: .75rem; }
.para + .para > p:not(.note) { text-indent: 1.6em; }

.note {
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ink-soft);
  padding-left: 1rem;
  border-left: 1px solid var(--rubric);
}
.note-num {
  color: var(--rubric);
  margin-right: .05em;
}
.ref {
  font-size: .72em;
  line-height: 0;
  margin-left: .08em;
}
.ref a {
  color: var(--rubric);
  text-decoration: none;
  padding: 0 .1em;
}

@media (min-width: 62rem) {
  .page {
    grid-template-columns:
      [full-start] minmax(2rem, 1fr)
      [text-start] var(--measure)
      [text-end] var(--gutter)
      [notes-start] var(--margin-col)
      [notes-end] minmax(2rem, 1.5fr)
      [full-end];
  }
  .page > .wide { grid-column: text-start / notes-end; }

  .para,
  .work,
  .fig {
    display: grid;
    grid-template-columns: var(--measure) var(--margin-col);
    column-gap: var(--gutter);
  }
  .para > p { grid-column: 1; }
  .para .note {
    grid-column: 2;
    align-self: end;
    margin-top: 0;
    padding-left: 0;
    border-left: 0;
  }
}

/* ---------- Contents ---------- */

.contents { padding-block: clamp(4rem, 12vh, 7rem); }
.contents h2,
.chapter-title {
  font-size: clamp(2.5rem, 5vw, 3.6rem);
}
.contents h2 { font-style: italic; margin-bottom: 2.5rem; }

.toc {
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--heading);
  font-size: clamp(1.45rem, 2.6vw, 1.9rem);
  line-height: 1.2;
}
.toc ol {
  list-style: none;
  margin: 0 0 .5rem;
  padding: 0 0 0 2.6em;
  font-size: .78em;
  font-style: italic;
}
.toc a {
  display: flex;
  align-items: baseline;
  gap: .6rem;
  min-height: 44px;
  padding-block: .4rem;
  text-decoration: none;
}
.toc-num {
  flex: none;
  min-width: 2.2em;
  color: var(--rubric);
  font-style: italic;
}
.toc ol .toc-num { min-width: 1.9em; font-style: normal; font-family: var(--body); font-size: .8em; }
.toc-leader {
  flex: 1 1 1.5rem;
  min-width: 1.5rem;
  border-bottom: 2px dotted var(--rule);
  transform: translateY(-.28em);
}
.toc-folio {
  flex: none;
  min-width: 3ch;
  text-align: right;
  font-family: var(--body);
  font-style: normal;
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
  color: var(--ink-soft);
}
.toc a:hover .toc-title { color: var(--rubric); }

/* ---------- Chapters ---------- */

.chapter { padding-block: clamp(5rem, 16vh, 9rem) 1rem; }
.chapter-open { margin-bottom: 2.5rem; }
.chapter-num {
  display: block;
  margin-bottom: .2rem;
  font-style: italic;
  font-size: clamp(3.6rem, 7vw, 5.5rem);
  line-height: 1;
  color: var(--rubric);
}
.chapter-intro { margin-bottom: 1rem; }

.drop::first-letter {
  float: left;
  margin: .1em .1em 0 0;
  font-family: var(--heading);
  font-size: 6.2em;
  line-height: .78;
  color: var(--rubric);
}
@supports (initial-letter: 3) or (-webkit-initial-letter: 3) {
  .drop::first-letter {
    float: none;
    margin: 0 .14em 0 0;
    font-size: inherit;
    line-height: inherit;
    -webkit-initial-letter: 3;
    initial-letter: 3;
  }
}

/* Selected work */
.work { margin-top: 4.5rem; }
.work > * { grid-column: 1; }
.work > .para,
.work > .fig { grid-column: 1 / -1; }
.work-num {
  display: block;
  margin-bottom: .45rem;
  font-family: var(--body);
  font-size: 1rem;
  color: var(--rubric);
  font-variant-numeric: tabular-nums;
}
.work h3 { font-size: clamp(2.1rem, 4vw, 2.8rem); }
.work-dek {
  margin-top: .5rem;
  font-family: var(--heading);
  font-style: italic;
  font-size: 1.5rem;
  line-height: 1.3;
}
.work-meta {
  margin: .8rem 0 1.4rem;
  font-size: 1rem;
  color: var(--ink-soft);
}

.fig {
  margin: 2.25rem 0 .5rem;
  row-gap: .9rem;
}
.fig-plate {
  display: grid;
  gap: 0;
  margin: 0;
  padding: clamp(.75rem, 2.5vw, 1.5rem);
  background: var(--paper-deep);
}
.fig figcaption {
  margin-top: .9rem;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ink-soft);
}
.fig-label {
  margin-right: .25em;
  font-family: var(--heading);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--ink);
}
@media (min-width: 62rem) {
  .fig > .fig-plate { grid-column: 1; }
  .fig > figcaption { grid-column: 2; align-self: end; margin-top: 0; }
}

.further-title { margin-top: 5rem; font-size: 2rem; font-style: italic; }
.dated {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  border-top: 1px solid var(--rule);
}
.dated li {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: 1rem;
  padding: .75rem 0;
  border-bottom: 1px solid var(--rule);
}
.yr {
  color: var(--rubric);
  font-variant-numeric: tabular-nums;
}

/* Curriculum vitae */
.cv-actions { margin-top: 1.5rem; }
.btn {
  min-height: 44px;
  padding: .5rem 1.25rem .6rem;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink);
  font-family: var(--body);
  font-weight: 500;
  font-size: 1.1rem;
  font-variant-caps: all-small-caps;
  letter-spacing: .08em;
  cursor: pointer;
}
.btn:hover { background: var(--ink); color: var(--paper); }
html:not(.js) .btn-print { display: none; }
.print-only { display: none; }

.cv-group-title {
  margin: 3.25rem 0 1.25rem;
  font-size: 2rem;
  font-style: italic;
}
.cv-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.75rem;
}
.cv-list li {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 1.25rem;
}
.cv-when {
  padding-top: .1rem;
  font-size: 1rem;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}
.cv-where {
  font-family: var(--heading);
  font-style: italic;
  font-size: 1.3rem;
  line-height: 1.3;
}
.cv-what { margin-top: .35rem; }
.cv-pointer { margin-top: 3rem; }
@media (max-width: 30rem) {
  .cv-list li { grid-template-columns: 1fr; gap: .2rem; }
}

/* Index */
.index-cols {
  columns: 9.5rem 3;
  column-gap: clamp(1.25rem, 3vw, 2.5rem);
  margin-top: 2rem;
}
.index-group {
  break-inside: avoid;
  margin-bottom: 1.75rem;
}
.index-group h3 {
  margin-bottom: .35rem;
  font-style: italic;
  font-size: 2.2rem;
  line-height: 1;
  color: var(--rubric);
}
.index-group ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.index-group li {
  padding-left: 1.2em;
  text-indent: -1.2em;
}
.index-group a { font-variant-numeric: tabular-nums; }

/* Correspondence */
.letter-email {
  display: inline-block;
  margin: 1.75rem 0 .5rem;
  font-family: var(--heading);
  font-style: italic;
  font-size: clamp(2.1rem, 6vw, 3.4rem);
  line-height: 1.1;
  overflow-wrap: anywhere;
}
.elsewhere-title { margin: 3.5rem 0 1rem; font-size: 2rem; font-style: italic; }
.elsewhere {
  margin: 0;
  display: grid;
  grid-template-columns: 8rem 1fr;
  border-top: 1px solid var(--rule);
}
.elsewhere dt,
.elsewhere dd {
  margin: 0;
  padding: .65rem 0;
  border-bottom: 1px solid var(--rule);
}
.elsewhere dt a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  margin-block: -.65rem;
}
.elsewhere dd { color: var(--ink-soft); }
.based { margin-top: 2.5rem; }
@media (max-width: 30rem) {
  .elsewhere { grid-template-columns: 1fr; }
  .elsewhere dt { border-bottom: 0; padding-bottom: 0; }
  .elsewhere dd { padding-top: 0; }
}

/* Colophon */
.colophon {
  padding: clamp(7rem, 20vh, 11rem) 1.25rem 5rem;
  text-align: center;
}
.colophon h2 { font-size: 2.2rem; font-style: italic; margin: 1.5rem 0 1.25rem; }
.colophon-text {
  max-width: 30rem;
  margin: 0 auto;
  display: grid;
  gap: .7rem;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink-soft);
}
.colophon .mark { width: 76px; margin: 0 auto; }
.colophon-back { margin-top: 2.5rem; font-size: 1rem; }
.colophon-back a { display: inline-flex; min-height: 44px; align-items: center; }

/* ---------- Line drawings ---------- */

.drawing rect, .drawing path, .drawing line, .drawing circle, .drawing polyline { fill: none; }
.drawing .ln { stroke: var(--ink); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.drawing .soft { stroke: var(--ink-soft); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.drawing .faint { stroke: var(--rule); stroke-width: 1.5; stroke-linecap: round; }
.drawing .rub { stroke: var(--rubric); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.drawing .thick { stroke-width: 3.5; }
.drawing .dash { stroke-dasharray: 3 6; }
.drawing .fill-paper { fill: var(--paper); }
.drawing .fill-deep { fill: var(--paper-deep); }
.drawing .fill-ink { fill: var(--ink); }
.drawing .fill-rub { fill: var(--rubric); }
.drawing text {
  font-family: var(--body);
  font-size: 14px;
  fill: var(--ink);
  font-variant-numeric: tabular-nums;
}
.drawing .t-soft { fill: var(--ink-soft); }
.drawing .t-rub { fill: var(--rubric); }
.drawing .t-paper { fill: var(--paper); }
.drawing .t-sm { font-size: 12px; }
.drawing .t-serif { font-family: var(--heading); }
.drawing .t-lg { font-size: 20px; }
.drawing .t-xl { font-size: 46px; }
.drawing .t-glyph { font-family: var(--heading); font-size: 300px; }
.drawing .t-mark { font-family: var(--heading); font-style: italic; font-size: 30px; }

/* ---------- Print: the CV on paper ---------- */

@media print {
  @page { margin: 16mm 15mm; }
  html, body { background: var(--print-paper); font-size: 10.5pt; }
  .running-head, .skip, .btn-print, .verso, .tp-imprint, .colophon, .ref { display: none !important; }
  .title-page { min-height: 0; padding: 0 0 8mm; }
  .tp-name { font-size: 40pt; }
  .chapter { padding-block: 10mm 0; }
  .fig-plate { background: var(--print-paper); border: 1px solid var(--rule); }
  .fig, .work, .cv-list li, .index-group { break-inside: avoid; }
  a { text-decoration: none; }

  body.printing-cv main > :not(#cv) { display: none !important; }
  body.printing-cv #cv { padding-top: 0; }
  body.printing-cv #cv .chapter-open,
  body.printing-cv #cv .chapter-intro,
  body.printing-cv #cv .cv-actions,
  body.printing-cv #cv .cv-pointer { display: none; }
  body.printing-cv .print-only { display: block; margin-bottom: 6mm; }
  .print-name { font-size: 28pt; }
  .print-line { margin-top: 2mm; color: var(--ink-soft); }
}
