/* crotich.com: same book setting as poetry.crotich.com. White page, black ink, Libre Caslon. */

@font-face { font-family: 'Libre Caslon Text'; src: url(/fonts/libre-caslon-text-latin-400-normal.woff2) format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Libre Caslon Text'; src: url(/fonts/libre-caslon-text-latin-400-italic.woff2) format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'Libre Caslon Text'; src: url(/fonts/libre-caslon-text-latin-700-normal.woff2) format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --paper: #fff;
  --ink: #141414;
  --soft: #4a4a4a;
  --faint: #767676;
  --rule: #e4e4e4;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root { --paper: #111; --ink: #ececec; --soft: #bdbdbd; --faint: #9a9a9a; --rule: #2c2c2c; color-scheme: dark; }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.125rem/1.7 'Libre Caslon Text', Georgia, 'Times New Roman', serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* Letterspaced capitals for labels, as in the poetry site's running heads. */
.masthead, .row > h2, .colophon p:last-child, .role .aside, .plain .aside {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.masthead {
  max-width: 52rem;
  margin: 0 auto;
  padding: 1.4rem 1.25rem 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem 1.5rem;
}
.wordmark { text-decoration: none; letter-spacing: 0.24em; }
.masthead nav { display: flex; flex-wrap: wrap; gap: 0 1.4rem; }
.masthead nav a { color: var(--soft); text-decoration: none; padding: 0.4rem 0; }
.masthead nav a:hover { color: var(--ink); text-decoration: underline; }

main { max-width: 52rem; margin: 0 auto; padding: 0 1.25rem; }

/* Title page */
.intro { text-align: center; padding: 4rem 0 3.5rem; border-bottom: 1px solid var(--rule); }
.portrait { display: block; width: 10rem; margin: 0 auto 2rem; }
.portrait img { display: block; width: 100%; height: auto; filter: grayscale(1); }
.intro h1 {
  margin: 0;
  font-weight: 400;
  font-size: clamp(2.1rem, 7vw, 2.9rem);
  line-height: 1.15;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.intro p { max-width: 34rem; margin: 1.2rem auto 0; }
.intro .lede { font-style: italic; font-size: 1.2rem; line-height: 1.6; margin-top: 1rem; }
.intro p:not(.lede) { color: var(--soft); font-size: 1rem; }

/* Sections: a small label in the margin, the text beside it */
.row {
  display: grid;
  grid-template-columns: 10rem 1fr;
  gap: 0 2.5rem;
  padding: 2.75rem 0;
  border-bottom: 1px solid var(--rule);
}
.row > h2 { margin: 0.35rem 0 1rem; font-weight: 400; color: var(--faint); }
.row p { margin: 0 0 0.9rem; }
.row p:last-child { margin-bottom: 0; }

.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.also h3, .job h3 { margin: 0 0 0.3rem; font-weight: 400; font-style: italic; font-size: 1.45rem; line-height: 1.25; }
.also h3 a { text-decoration: none; }
.also h3 a:hover { text-decoration: underline; text-decoration-thickness: 1px; }
.also p { font-size: 1rem; }
.aside { color: var(--faint); }
.also .aside { font-size: 0.9rem; }

.job + .job { margin-top: 2.2rem; }
.role { margin: 0 0 0.15rem !important; font-size: 1rem; }
.role .aside { display: block; margin-top: 0.1rem; }
.job ul { margin: 0.7rem 0 0; padding-left: 1.1rem; font-size: 1rem; color: var(--soft); }
.job li + li { margin-top: 0.25rem; }

.plain { list-style: none; margin: 0; padding: 0; }
.plain li { padding: 0.35rem 0; font-size: 1rem; }
.plain li + li { border-top: 1px solid var(--rule); }
.plain .aside { display: block; }

.colophon {
  max-width: 52rem;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 3.5rem;
  text-align: center;
  color: var(--soft);
  font-size: 0.95rem;
}
.colophon p { margin: 0 0 0.6rem; }
.colophon p:last-child { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.3rem 1.4rem; }
.colophon p:last-child a { text-decoration: none; padding: 0.3rem 0; }
.colophon p:last-child a:hover { text-decoration: underline; }

@media (max-width: 44rem) {
  body { font-size: 1.0625rem; }
  .masthead { justify-content: center; padding-top: 1rem; }
  .masthead nav { justify-content: center; gap: 0 0.9rem; }
  .masthead nav a { font-size: 0.68rem; letter-spacing: 0.14em; }
  .intro .lede { font-size: 1.05rem; }
  .intro { padding: 3rem 0 2.75rem; }
  .portrait { width: 8rem; }
  .row { grid-template-columns: 1fr; padding: 2.2rem 0; }
  .row > h2 { text-align: center; margin-bottom: 1.2rem; }
  .cols { grid-template-columns: 1fr; gap: 1.6rem; }
}

@media print {
  .masthead nav, .colophon p:last-child { display: none; }
  .row { break-inside: avoid; }
}
