/* By the Sweat of Your Brow: the public site.
 *
 * A workshop palette: unbleached linen and soot, the blue serge of a
 * workman's coat, brick-and-rust red and harvest ochre.
 * Display type in Fraunces (a warm, ink-trapped old style); reading text
 * in Source Serif 4; labels in Oswald, after the condensed type of
 * factory and union posters.
 */

:root {
  --paper: #f4eee2;
  --paper-deep: #e9dfcc;
  --ink: #231d17;
  --dim: #6b5f51;
  --rule: #d6c7aa;
  --serge: #26394d;
  --rust: #9c3d1e;
  --ochre: #c18a2d;
  --serif: "Source Serif 4", "Iowan Old Style", Georgia, serif;
  --display: "Fraunces", "Source Serif 4", Georgia, serif;
  --label: "Oswald", "Arial Narrow", sans-serif;
}

* { box-sizing: border-box; }

html { background: var(--paper); }

body {
  margin: 0;
  color: var(--ink);
  font: 1.15rem/1.65 var(--serif);
  background:
    radial-gradient(ellipse at 50% 0%, rgba(255, 255, 255, 0.55), transparent 70%),
    var(--paper);
}

a {
  color: var(--serge);
  text-decoration-color: rgba(193, 138, 45, 0.7);
  text-underline-offset: 0.18em;
}
a:hover { color: var(--rust); text-decoration-color: var(--rust); }

/* masthead and footer */

.masthead {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.3rem 1.2rem;
  padding: 0.7rem 1.5rem;
  background: var(--serge);
  color: #e9e1d0;
  border-bottom: 4px solid var(--rust);
  position: sticky;
  top: 0;
  z-index: 2;
}
.masthead .book {
  font: 500 1rem var(--label);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  color: #f4eee2;
}
.masthead .sub {
  font: italic 400 1rem var(--display);
  color: #cdbf9f;
}

footer {
  margin-top: 4rem;
  padding: 2rem 1.5rem 3rem;
  border-top: 1px solid var(--rule);
  text-align: center;
  color: var(--dim);
  font-size: 0.9rem;
}
footer a { color: var(--dim); }
footer p:first-child a {
  font: 500 0.85rem var(--label);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--rust);
  text-decoration: none;
}
footer p:first-child a + a { margin-left: 1.5rem; }
.credit { max-width: 40rem; margin: 0.8rem auto 0; line-height: 1.45; }

.kicker {
  font: 500 0.82rem var(--label);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--rust);
  margin: 0 0 0.6rem;
}

h1, h2 { font-family: var(--display); font-weight: 600; line-height: 1.12; }

h2 {
  font: 500 1rem var(--label);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  text-align: center;
  color: var(--serge);
  margin: 0 0 1.8rem;
}
h2::after {
  content: "";
  display: block;
  width: 3rem;
  height: 3px;
  margin: 0.7rem auto 0;
  background: var(--ochre);
}

/* home: hero */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 3rem;
  align-items: center;
  max-width: 70rem;
  margin: 0 auto;
  padding: 4rem 1.5rem 3rem;
}
.hero h1 {
  font: 800 clamp(2.8rem, 6vw, 4.6rem)/1 var(--display);
  font-variation-settings: "opsz" 144;
  letter-spacing: -0.01em;
  color: var(--serge);
  margin: 0 0 0.6rem;
}
.subtitle {
  font: italic 400 1.35rem/1.35 var(--display);
  color: var(--rust);
  margin: 0 0 1.4rem;
}
.lede {
  font-size: 1.2rem;
  margin: 0 0 1.4rem;
  max-width: 34rem;
}
.epigraph {
  margin: 0 0 1.8rem;
  padding: 0.2rem 0 0.2rem 1.1rem;
  border-left: 3px solid var(--ochre);
  font: italic 400 1.15rem/1.5 var(--display);
  color: var(--dim);
  max-width: 32rem;
}
.epigraph cite {
  display: block;
  margin-top: 0.3rem;
  font: 500 0.75rem var(--label);
  font-style: normal;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.cta a {
  display: inline-block;
  padding: 0.55rem 1.3rem;
  background: var(--rust);
  color: var(--paper);
  font: 500 0.85rem var(--label);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
}
.cta a + a { margin-left: 0.6rem; }
.cta a:hover { background: var(--serge); color: var(--paper); }

.hero-art { margin: 0; }
.hero-art img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 45% 50%;
  border: 8px solid #fbf7ee;
  box-shadow: 0 0 0 1px var(--rule), 0 18px 40px rgba(35, 29, 23, 0.28);
}

/* home: editor */

.editors {
  background: var(--paper-deep);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 2.5rem 1.5rem 2.8rem;
}
.editor-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2rem 4rem;
}
.editor {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: var(--ink);
}
.editor img, .portrait {
  width: 8.5rem;
  height: 8.5rem;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid var(--paper);
  outline: 2px solid var(--ochre);
  box-shadow: 0 6px 18px rgba(35, 29, 23, 0.2);
}
img[src$="callahan.jpg"] { object-position: 48% 22%; }
.editor .name {
  margin-top: 0.8rem;
  font: 600 1.35rem var(--display);
  color: var(--serge);
}
.editor:hover .name { color: var(--rust); }
.editor .role { font-style: italic; color: var(--dim); font-size: 1rem; }

/* home: table of contents */

main {
  max-width: 46rem;
  margin: 0 auto;
  padding: 3.5rem 1.5rem 0;
}

.toc { list-style: none; margin: 0; padding: 0; }
.toc li {
  display: grid;
  grid-template-columns: 2.8rem 1fr;
  gap: 0.9rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--rule);
}
.toc .num {
  font: 500 1.6rem/1.15 var(--label);
  color: var(--ochre);
  text-align: right;
}
.toc .title {
  display: block;
  font: 600 1.3rem/1.25 var(--display);
}
.toc .title a { text-decoration: none; color: var(--ink); }
.toc .title a:hover { color: var(--rust); }
.byline { display: block; margin-top: 0.25rem; font-size: 1rem; }
.affil { color: var(--dim); font-style: italic; }
.byline .affil::before { content: ", "; font-style: normal; }
.bio-head .affil::before { content: none; }
.hint {
  text-align: center;
  font-style: italic;
  color: var(--dim);
  font-size: 1rem;
  margin-top: 1.8rem;
}

/* abstract and bio pages */

.banner {
  height: 15rem;
  background: var(--serge) center 50% / cover no-repeat;
  border-bottom: 4px solid var(--rust);
}
.banner.tall { height: 30rem; }
.bio .banner {
  background-image: url("images/harvesters.jpg");
  background-position: center 62%;
}

.paper {
  position: relative;
  margin-top: -4rem;
  padding: 2.6rem 3rem 2.4rem;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-top: 4px solid var(--ochre);
  box-shadow: 0 10px 30px rgba(35, 29, 23, 0.12);
}
.paper h1 {
  font-size: clamp(1.9rem, 4vw, 2.5rem);
  color: var(--serge);
  margin: 0 0 0.6rem;
}
.paper > .byline { margin-bottom: 1.8rem; font-size: 1.1rem; }
.paper h2 { margin-top: 2.4rem; }

.text p { margin: 0 0 1.1rem; text-align: justify; hyphens: auto; }
.text ul { padding-left: 1.3rem; }
.abstract .text > p:first-of-type::first-letter {
  float: left;
  font: 800 3.7rem/0.85 var(--display);
  color: var(--rust);
  padding: 0.3rem 0.5rem 0 0;
}

.bio-head {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  margin-bottom: 1.4rem;
}
.bio-head .portrait { flex: none; width: 7.5rem; height: 7.5rem; }

.chapters { list-style: none; padding: 0; margin: 0; text-align: center; }
.chapters li { font: 600 1.25rem/1.3 var(--display); margin-bottom: 0.8rem; }
.chapters .num {
  display: block;
  font: 500 0.78rem var(--label);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ochre);
}

.chapnav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1rem;
  align-items: start;
  margin-top: 2.4rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--rule);
  font: 400 1rem/1.3 var(--display);
}
.chapnav a { text-decoration: none; }
.chapnav .next { text-align: right; }
.chapnav .contents {
  font: 500 0.8rem var(--label);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--rust);
  padding-top: 0.15rem;
}

@media (max-width: 760px) {
  body { font-size: 1.08rem; }
  .hero { grid-template-columns: 1fr; padding-top: 2.5rem; gap: 2rem; }
  .hero-art { max-width: 26rem; margin: 0 auto; }
  .banner { height: 9rem; }
  .banner.tall { height: 16rem; }
  .paper { margin-top: -2rem; padding: 1.8rem 1.3rem; border-left: 0; border-right: 0; }
  .bio-head { flex-direction: column; text-align: center; }
  .chapnav { grid-template-columns: 1fr 1fr; }
  .chapnav .contents { grid-column: 1 / -1; grid-row: 1; text-align: center; }
  .masthead .sub { display: none; }
}
