:root {
  color-scheme: light;
  --paper: #f9f7f1;
  --ink: #25382e;
  --body: #333b33;
  --muted: #596154;
  --green: #243c34;
  --edge: clamp(1rem, 4.6vw, 3.75rem);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--body);
  font: 400 1.0625rem/1.6 Georgia, "Times New Roman", serif;
}

h1, h2, p, ul { margin: 0; }
h1, h2, cite { font-weight: 400; font-style: normal; }
h1, h2 { color: var(--ink); }
h1 { font-size: clamp(2.8rem, 5.4vw, 4.65rem); line-height: 1.05; letter-spacing: -.035em; }
h2 { font-size: clamp(1.85rem, 3vw, 2.55rem); line-height: 1.15; letter-spacing: -.025em; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: .22em; }
a:hover { color: #704024; text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 5px; }

.wrap {
  width: min(calc(100% - 2 * var(--edge)), 68rem);
  margin-inline: auto;
}

main { flex: 1; }
.skip-link {
  position: absolute;
  z-index: 1;
  padding: .6rem 1rem;
  background: white;
  left: var(--edge);
  top: .35rem;
  transform: translateY(-150%);
}
.skip-link:focus { transform: none; }

.masthead {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  column-gap: .65rem;
  padding-block: clamp(1.3rem, 3.2vw, 2.5rem);
}
.masthead a {
  width: fit-content;
  padding-block: .25rem;
  font-size: clamp(.9375rem, 1.5vw, 1.125rem);
}
.masthead a:last-child { justify-self: end; }
.masthead .masthead-name {
  font-size: clamp(1.5rem, 3.6vw, 2.85rem);
  line-height: 1;
  letter-spacing: -.045em;
  text-decoration: none;
}
.masthead a[aria-current="page"]:not(.masthead-name) { text-decoration-thickness: 2px; }

.feature {
  display: grid;
  grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr);
  background: var(--green);
  color: #faf6e9;
}
.feature-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: clamp(2.1rem, 4.2vw, 3.65rem);
}
.feature-genre { color: #e6d7b1; font-size: 1rem; line-height: 1.45; }
.feature h1 {
  margin: .65rem 0 1.1rem;
  max-width: 9ch;
  color: inherit;
  font-size: clamp(3.4rem, 6.3vw, 5.05rem);
  line-height: .98;
  letter-spacing: -.045em;
}
.feature-intro { max-width: 33ch; color: #f1eee3; font-size: clamp(1.0625rem, 1.53vw, 1.1875rem); line-height: 1.52; }
.feature-links, .edition-links, .footer nav { display: flex; align-items: center; flex-wrap: wrap; }
.feature-links { gap: .85rem 1.35rem; margin-top: 1.75rem; font-size: 1rem; }
.feature-links a { color: inherit; }
.feature-links a:hover { color: #fff; }
.feature-links .button {
  background: #f4efdf;
  color: var(--green);
  text-decoration: none;
  padding: .57rem 1.04rem;
  border-radius: 2px;
}
.feature-links .button:hover { color: var(--green); background: #fffdf7; text-decoration: underline; }
.feature-links .button:focus-visible { outline-color: #fff; }
.feature-art { display: block; position: relative; }
.feature-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 52%; }

.shelf { padding-block: clamp(2.35rem, 4.6vw, 3.8rem) clamp(3rem, 6.4vw, 5rem); }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1.55rem; }
.section-heading a { font-size: 1rem; white-space: nowrap; }
.book-shelf {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 2rem clamp(1.2rem, 3.65vw, 3.2rem);
  list-style: none;
  padding: 0;
}
.shelf-book { display: block; text-decoration: none; }
.cover { width: 100%; height: auto; box-shadow: 0 2px 4px #29251c26, 2px 7px 15px -6px #29251c42; }
.shelf-book span { display: block; margin-top: .9rem; font-size: clamp(1.0625rem, 1.65vw, 1.25rem); line-height: 1.3; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .19em; }
.shelf-book:hover span { text-decoration-thickness: 2px; }

.catalogue { max-width: 52rem; margin: 0 auto; padding: clamp(1.4rem, 3.5vw, 3rem) 0 clamp(3rem, 6.5vw, 5.3rem); }
.page-heading { margin-bottom: clamp(2.6rem, 5vw, 4rem); }
.page-heading p { max-width: 46ch; font-size: clamp(1.15rem, 2vw, 1.42rem); margin-top: .9rem; line-height: 1.5; }
.book-entry {
  display: grid;
  grid-template-columns: minmax(7rem, 10rem) minmax(0, 1fr);
  gap: clamp(1.8rem, 5.2vw, 4rem);
  align-items: center;
  scroll-margin-top: 1.75rem;
}
.book-entry + .book-entry { margin-top: clamp(3rem, 6.2vw, 5rem); }
.book-entry h2 { font-size: clamp(1.7rem, 3.3vw, 2.45rem); }
.book-date, .book-genre { color: var(--muted); font-size: .9375rem; }
.book-date { margin-bottom: .45rem; }
.book-genre { margin-top: .25rem; }
.synopsis { margin-top: .85rem; max-width: 59ch; }
.edition-links { gap: .45rem 1.5rem; margin-top: .85rem; font-size: 1rem; }

.author-profile {
  display: grid;
  grid-template-columns: minmax(0, 19rem) minmax(0, 32rem);
  align-items: start;
  justify-content: center;
  gap: clamp(2rem, 6.5vw, 5.3rem);
  padding-block: clamp(2.1rem, 5.2vw, 4.5rem) clamp(3.5rem, 8vw, 7rem);
}
.profile-text { grid-column: 2; grid-row: 1; }
.profile-text p { margin-top: 1.1rem; }
.profile-intro { font-size: clamp(1.32rem, 2.2vw, 1.6rem); line-height: 1.46; color: var(--ink); }
.profile-link { display: inline-block; margin-top: 1.3rem; }
.portrait-mount { grid-column: 1; grid-row: 1; margin-top: .5rem; padding: clamp(.55rem, 1.4vw, 1.05rem); background: #e8e1d3; }
.portrait { width: 100%; }
.missing { max-width: 45rem; margin: 3rem auto; }
.missing p { margin-top: 1.2rem; }

.footer { border-top: 1px solid #bcbeb0; padding-block: 1.5rem 2.1rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem 2rem; }
.press { display: inline-block; }
.press img { width: 9rem; }
.footer nav { gap: .4rem 1.5rem; font-size: .9375rem; }

@media (max-width: 48rem) {
  .book-shelf { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .feature { grid-template-columns: 1fr; }
  .feature-art { grid-row: 1; aspect-ratio: 2.15; }
  .feature-art img { object-position: center 43%; }
  .feature-copy { padding: 1.65rem max(1.4rem, 4.5vw) 2rem; }
  .feature h1 { max-width: none; font-size: clamp(2.55rem, 7.2vw, 4rem); margin-block: .45rem .8rem; }
  .feature-intro { max-width: 48ch; }
  .feature-links { margin-top: 1.25rem; }
}

@media (max-width: 36rem) {
  .book-shelf { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.75rem 1.25rem; }
  .section-heading { margin-bottom: 1.2rem; }
  .feature-art { aspect-ratio: 1.72; }
  .feature-genre { font-size: .9375rem; }
  .book-entry {
    grid-template-columns: 4.9rem minmax(0, 1fr);
    grid-template-areas: "cover date" "cover title" "cover genre" "copy copy" "links links";
    gap: 0 1.15rem;
    align-items: start;
  }
  .book-entry > div, .profile-text { display: contents; }
  .book-entry .cover { grid-area: cover; }
  .book-date { grid-area: date; align-self: end; margin-bottom: .25rem; }
  .book-entry h2 { grid-area: title; align-self: center; }
  .book-genre { grid-area: genre; line-height: 1.4; }
  .synopsis { grid-area: copy; margin-top: 1.15rem; }
  .edition-links { grid-area: links; }
  .author-profile { display: flex; flex-direction: column; gap: 0; padding-top: 1.4rem; }
  .profile-text h1 { order: -2; }
  .portrait-mount { order: -1; width: min(100%, 15.5rem); margin-top: 1.3rem; }
  .footer { flex-wrap: wrap; }
}

@media (prefers-contrast: more) {
  :root { --muted: #353a32; }
  a { text-decoration-thickness: 2px; }
}
