/* Justifying the State: the public site.
 *
 * A civic-humanist palette taken from Lorenzetti's Siena frescoes:
 * parchment and ink, lapis blue, oxblood and a little gold.
 * Display type in Cinzel (Roman capitals) and Cormorant Garamond;
 * reading text in EB Garamond.
 */

:root {
  --paper: #f6f0e3;
  --paper-deep: #ece2cc;
  --ink: #221c15;
  --dim: #6d6253;
  --rule: #d7c9ab;
  --lapis: #1f3566;
  --oxblood: #7d2320;
  --gold: #a8843a;
  --serif: "EB Garamond", "Iowan Old Style", Georgia, serif;
  --display: "Cormorant Garamond", "EB Garamond", Georgia, serif;
  --carved: "Cinzel", "Trajan Pro", var(--serif);
}

* { box-sizing: border-box; }

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

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

a {
  color: var(--lapis);
  text-decoration-color: rgba(168, 132, 58, 0.6);
  text-underline-offset: 0.18em;
}
a:hover { color: var(--oxblood); text-decoration-color: var(--oxblood); }

/* masthead and footer */

.masthead {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.3rem 1.2rem;
  padding: 0.75rem 1.5rem;
  background: var(--lapis);
  color: #efe6cf;
  border-bottom: 3px solid var(--gold);
  position: sticky;
  top: 0;
  z-index: 2;
}
.masthead .book {
  font: 700 1rem var(--carved);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: #f6eed8;
}
.masthead .sub {
  font: italic 1rem var(--display);
  color: #d9cba8;
}

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: 600 0.8rem var(--carved);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--oxblood);
  text-decoration: none;
}
.credit { max-width: 40rem; margin: 0.8rem auto 0; line-height: 1.45; }

.kicker {
  font: 600 0.78rem var(--carved);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--oxblood);
  margin: 0 0 0.6rem;
}

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

h2 {
  font: 600 0.95rem var(--carved);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-align: center;
  color: var(--lapis);
  margin: 0 0 1.8rem;
}
h2::after {
  content: "";
  display: block;
  width: 3rem;
  height: 2px;
  margin: 0.7rem auto 0;
  background: var(--gold);
}

/* home: hero */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 3rem;
  align-items: center;
  max-width: 68rem;
  margin: 0 auto;
  padding: 4rem 1.5rem 3rem;
}
.hero h1 {
  font: 500 clamp(2.8rem, 6vw, 4.6rem)/1.02 var(--carved);
  letter-spacing: 0.04em;
  color: var(--lapis);
  margin: 0 0 1.2rem;
}
.lede {
  font: 500 1.4rem/1.5 var(--display);
  margin: 0 0 1.6rem;
  max-width: 34rem;
}
.cta a {
  display: inline-block;
  padding: 0.55rem 1.3rem;
  border: 1px solid var(--oxblood);
  color: var(--oxblood);
  font: 600 0.8rem var(--carved);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
}
.cta a:hover { background: var(--oxblood); color: var(--paper); }

.hero-art { margin: 0; }
.hero-art img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: 50% 0;
  border: 1px solid var(--rule);
  outline: 1px solid var(--gold);
  outline-offset: 6px;
  box-shadow: 0 18px 40px rgba(34, 28, 21, 0.25);
  filter: sepia(0.25) contrast(1.05);
}

/* home: editors */

.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: 1px solid var(--gold);
  box-shadow: 0 6px 18px rgba(34, 28, 21, 0.2);
}
img[src$="callahan.jpg"] { object-position: 48% 22%; }
img[src$="komolafe.jpg"] { object-position: 50% 30%; }
.editor .name {
  margin-top: 0.8rem;
  font: 600 1.35rem var(--display);
  color: var(--lapis);
}
.editor:hover .name { color: var(--oxblood); }
.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.8rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--rule);
}
.toc .num {
  font: 500 1.5rem/1.2 var(--carved);
  color: var(--gold);
  text-align: right;
}
.toc .title {
  display: block;
  font: 600 1.35rem/1.25 var(--display);
}
.toc .title a { text-decoration: none; color: var(--ink); }
.toc .title a:hover { color: var(--oxblood); }
.byline { display: block; margin-top: 0.25rem; font-size: 1.05rem; }
.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(--lapis) center 35% / cover no-repeat;
  border-bottom: 3px solid var(--gold);
}
.abstract .banner { background-image: url("images/good-government.jpg"); }
.bio .banner { background-image: url("images/good-city.jpg"); }

.paper {
  position: relative;
  margin-top: -4rem;
  padding: 2.6rem 3rem 2.4rem;
  background: var(--paper);
  border: 1px solid var(--rule);
  box-shadow: 0 10px 30px rgba(34, 28, 21, 0.12);
}
.paper h1 {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  color: var(--lapis);
  margin: 0 0 0.6rem;
}
.paper > .byline { margin-bottom: 1.8rem; font-size: 1.15rem; }
.paper h2 { margin-top: 2.4rem; }

.text p { margin: 0 0 1.1rem; text-align: justify; hyphens: auto; }
.abstract .text > p:first-of-type::first-letter {
  float: left;
  font: 500 3.6rem/0.85 var(--carved);
  color: var(--oxblood);
  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.3rem/1.3 var(--display); margin-bottom: 0.6rem; }
.chapters .num {
  display: block;
  font: 600 0.72rem var(--carved);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
}

.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: 500 1.05rem/1.3 var(--display);
}
.chapnav a { text-decoration: none; }
.chapnav .next { text-align: right; }
.chapnav .contents {
  font: 600 0.75rem var(--carved);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--oxblood);
  padding-top: 0.2rem;
}

@media (max-width: 760px) {
  body { font-size: 1.1rem; }
  .hero { grid-template-columns: 1fr; padding-top: 2.5rem; gap: 2rem; }
  .hero-art { max-width: 24rem; margin: 0 auto; }
  .banner { height: 9rem; }
  .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; }
}
