@import url("https://fonts.googleapis.com/css2?family=DM+Mono:wght@300;400;500&family=DM+Serif+Display:ital@0;1&family=DM+Serif+Text:ital@0;1&display=swap");

@font-face {
  font-family: "Geist Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("https://cdn.jsdelivr.net/npm/@fontsource/geist-mono@5.2.7/files/geist-mono-latin-400-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Geist Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("https://cdn.jsdelivr.net/npm/@fontsource/geist-mono@5.2.7/files/geist-mono-latin-500-normal.woff2") format("woff2");
}

:root {
  --paper: #1c1b18;
  --ink: #ece8e0;
  --mute: #9a958c;
  --rule: rgba(236, 232, 224, 0.16);
  --orange: #ff8738;
  --sky: #38bdf8;
  --arrow: #77736c;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sans: "DM Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --serif: "DM Serif Text", "Times New Roman", serif;
  --serif-display: "DM Serif Display", "Times New Roman", serif;
  --page-pad-x: clamp(1.25rem, 4vw, 4rem);
  --page-measure: 68rem;
  --edge-bleed: max(var(--page-pad-x), calc((100vw - var(--page-measure)) / 2 + var(--page-pad-x)));
  --section-label: 4rem;
  --title-column: 13rem;
}

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

html {
  -webkit-text-size-adjust: 100%;
  color-scheme: dark;
  background: var(--paper);
  overflow-x: clip;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.45;
  max-width: var(--page-measure);
  margin: 0 auto;
  padding: clamp(2rem, 4vw, 4rem) var(--page-pad-x) 0;
}

.name,
.lede,
section,
footer {
  max-width: none;
  padding-right: 0;
}

header {
  padding-bottom: 1.75rem;
  border-bottom: 1px solid var(--rule);
}

.name {
  font-size: 0.8125rem;
  line-height: 1.3;
  margin-bottom: 0.4rem;
}

.terminal-cursor {
  display: inline-block;
  width: 0.45em;
  height: 0.9em;
  margin-left: 0.65em;
  vertical-align: -0.05em;
  background: var(--arrow);
  pointer-events: none;
}

.lede {
  font-family: var(--serif-display);
  font-weight: 400;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  line-height: 1.25;
  max-width: 60rem;
}

section {
  display: grid;
  grid-template-columns: var(--section-label) minmax(0, 1fr);
  column-gap: 2rem;
  align-items: start;
  padding: 1.75rem 0;
}

h2,
h3 {
  color: var(--mute);
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: 0.025em;
}

.rows {
  display: flex;
  flex-direction: column;
  gap: 1.125rem;
}

.write-content {
  min-width: 0;
}

.write-catalogue {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
}

.collection-nonfiction {
  grid-column: auto;
}

.collection {
  padding-bottom: 1.5rem;
}

.index > section > h2 {
  position: relative;
  z-index: 1;
}

.collection-fiction {
  grid-column: auto;
}

.collection-intro {
  min-height: 0;
  margin-bottom: 1rem;
}

.collection-intro h3 {
  color: var(--ink);
  font-family: var(--serif-display);
  font-size: 1.625rem;
  font-weight: 400;
  letter-spacing: -0.025em;
  margin-top: 0.4rem;
}

.eyebrow,
.collection-intro .eyebrow {
  color: var(--mute);
  font-size: 0.6875rem;
  font-family: var(--mono);
  line-height: 1.5;
  letter-spacing: 0.035em;
  text-transform: uppercase;
  margin: 0;
}

.collection-intro p {
  max-width: 36rem;
  margin-top: 0.5rem;
  color: var(--mute);
  font-family: var(--sans);
  font-size: 0.8125rem;
  line-height: 1.5;
  text-wrap: pretty;
}

.collection-link {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  font-size: 0.75rem;
}

.bookshelf {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.75rem 1.5rem;
  list-style: none;
}

.book {
  display: grid;
  min-width: 0;
}

.collection-fiction .bookshelf {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.book-object--traditional-tabloid {
  aspect-ratio: 289 / 380;
}

.book-object--traditional-broadsheet {
  aspect-ratio: 380 / 578;
}

.row .titles {
  display: grid;
  gap: 0.35rem;
  justify-items: start;
}

.book-link {
  display: grid;
  grid-template-rows: auto auto;
  align-content: start;
  min-width: 0;
}

.book-cover {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: auto;
  margin-bottom: 0.75rem;
  box-shadow: 0 0 0 1px var(--rule);
}

.book-object {
  --book-depth: 3px;
  position: relative;
  display: block;
  width: calc(100% - 8px);
  aspect-ratio: 170 / 250;
  background: #eee8dc;
  border-radius: 1px 3px 3px 1px;
  box-shadow: 1px 2px 3px #00000020, 5px 8px 12px #00000014;
  transition: transform 350ms ease, box-shadow 350ms ease;
}

.book-object--b6 {
  --book-depth: 7px;
  aspect-ratio: 125 / 176;
}

.book-object > img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: inherit;
  margin: 0;
  box-shadow: none;
}

.book-object::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  background: linear-gradient(90deg, #00000025, #ffffff16 1.5%, #00000014 3%, transparent 5%, transparent 97%, #00000010);
  pointer-events: none;
}

.book-object::after {
  content: "";
  position: absolute;
  top: 2px;
  bottom: 1px;
  left: 100%;
  width: var(--book-depth);
  background: repeating-linear-gradient(90deg, #e0d9c9 0 1px, #f6f1e7 1px 2px);
  border: 1px solid #b9af9c;
  border-left: 0;
  border-radius: 0 2px 2px 0;
  transform: skewY(12deg);
  transform-origin: left top;
  pointer-events: none;
}

.book-link > .book-object {
  margin-bottom: 1rem;
}

.book-object:not(.book-object--b6) {
  width: 100%;
  aspect-ratio: auto;
  background: transparent;
  border-radius: 0;
  box-shadow: 0 1px 3px #00000024;
  transition: none;
}

.book-object:not(.book-object--b6) > img {
  position: static;
  height: auto;
  border-radius: 0;
}

.book-object:not(.book-object--b6)::before,
.book-object:not(.book-object--b6)::after {
  display: none;
}

.book-link:hover .book-object:not(.book-object--b6),
.product-art:hover .book-object:not(.book-object--b6) {
  transform: none;
  box-shadow: 0 1px 3px #00000024;
}

.physical-spec {
  font: 0.625rem/1.6 var(--mono);
  color: var(--mute);
}

@media (hover: hover) and (pointer: fine) {
  .book-link:hover .book-object,
  .product-art:hover .book-object {
    transform: translateY(-2px);
    box-shadow: 1px 3px 4px #00000020, 6px 11px 16px #00000018;
  }
}

.book h4 {
  position: relative;
  min-height: 0;
  padding-left: 0;
  font-family: var(--serif-display);
  font-size: 0.9375rem;
  font-weight: 400;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.book-link .title::before {
  position: absolute;
  left: 0;
  top: 0;
}

.book-edition,
.book-format,
.book-status {
  font-size: 0.75rem;
  line-height: 1.5;
}

.book-edition {
  margin-top: 0.3rem;
  color: var(--mute);
}

.book-format {
  margin-top: 0.5rem;
  font-family: var(--sans);
}

.book-status {
  margin-top: 0.25rem;
  font-family: var(--sans);
  color: var(--mute);
}

.notes {
  margin-top: 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
}

.notes h3 {
  margin-bottom: 1.25rem;
}

.build-link .title,
.research-link .title {
  font-family: var(--serif-display);
  font-size: 1.625rem;
  font-weight: 400;
  letter-spacing: -0.025em;
}

.collection + .collection {
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
}

.book-label {
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.book-label h4 {
  font-family: var(--serif-display);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.3;
}

.book-label .book-format,
.book-label .book-status {
  font-family: var(--mono);
  font-size: 0.625rem;
  line-height: 1.35;
  margin: 0;
}

.book-label .book-format { margin-top: 0.125rem; padding-top: 0; }
.book-status::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  margin: 0 0.45rem 0.125rem 0;
}
.book-link .title::before { content: none; }
.newsprint-details { max-width: 36rem; }
.newsprint-details > p { color: var(--mute); line-height: 1.7; margin-bottom: 1.25rem; }
.newsprint-details .book-label { max-width: 15rem; }
.buy-pending { margin-top: 0.75rem; padding: 0.75rem 1rem; border: 1px solid var(--rule); background: transparent; color: var(--mute); font: 0.75rem var(--mono); }
.notes-intro { color: var(--mute); margin: -0.5rem 0 1.5rem; max-width: 35rem; line-height: 1.65; }
.index > section > h2 { font-family: var(--mono); }
.notes h3 { font-family: var(--serif-display); font-size: 1.625rem; color: var(--ink); }

.row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  color: inherit;
  text-decoration: none;
}

.title,
.dek {
  transition: color 200ms ease-out;
}

.title {
  flex-shrink: 0;
  font-family: var(--serif-display);
  font-weight: 400;
  line-height: 1.35;
}

.dek {
  color: var(--mute);
  line-height: 1.45;
}

a.row:hover .title,
a.row:focus-visible .title,
.collection-link:hover .title,
.collection-link:focus-visible .title,
.book-link:hover .title,
.book-link:focus-visible .title {
  color: var(--orange);
}

a.row:hover .dek,
a.row:focus-visible .dek {
  color: var(--sky);
}

a.row,
.collection-link,
.book-link {
  --arrow-nudge: 0px;
}

a.row:not(.build-link):not(.research-link) .title::before,
.collection-link .title::before,
.book-link:not(:has(.book-label)) .title::before {
  content: "→";
  display: inline-block;
  width: 1.5rem;
  color: var(--arrow);
  font-weight: 400;
  transform: translateX(var(--arrow-nudge));
  transition: color 200ms ease-out;
}

a.row:hover .title::before,
a.row:focus-visible .title::before,
.collection-link:hover .title::before,
.collection-link:focus-visible .title::before,
.book-link:hover .title::before,
.book-link:focus-visible .title::before {
  color: var(--ink);
}

.collection-link:focus-visible,
.book-link:focus-visible {
  outline: 1px solid var(--ink);
  outline-offset: 4px;
}

@media (max-width: 899px) {
  .write-catalogue {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 0;
  }

  .collection-nonfiction,
  .collection-fiction {
    grid-column: auto;
  }

  .collection-intro {
    min-height: 0;
  }

  .collection + .collection {
    border-top: 1px solid var(--rule);
    padding-top: 1.5rem;
  }

  .bookshelf {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-width: none;
    gap: 1.25rem 1rem;
  }

  .collection-fiction .bookshelf {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 719px) {
  section {
    grid-template-columns: 4rem minmax(0, 1fr);
    column-gap: 1.25rem;
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
  }

  .notes {
    margin-top: 0;
    padding-top: 1.5rem;
  }

}

@media (max-width: 599px) {
  body {
    padding-top: 1.5rem;
  }

  header {
    padding-bottom: 1.25rem;
  }

  section {
    grid-template-columns: 1fr;
    row-gap: 1rem;
    padding-top: 1.25rem;
    padding-bottom: 1.25rem;
  }

  .rows {
    gap: 1rem;
  }

  .notes {
    margin-top: 0;
    padding-top: 1.5rem;
  }

  .collection + .collection {
    padding-top: 1.5rem;
  }

  .collection-intro {
    margin-bottom: 1rem;
  }

  .bookshelf {
    gap: 1.25rem 0.875rem;
  }

  .book-cover {
    margin-bottom: 0.75rem;
  }

  .notes h3 {
    margin-bottom: 1rem;
  }

  footer {
    margin-top: 2rem;
    margin-bottom: 2rem;
  }
}

@media (max-width: 519px) {
  .bookshelf,
  .collection-fiction .bookshelf {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: none;
  }
}

@media (max-width: 419px) {
  .bookshelf,
  .collection-fiction .bookshelf {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (min-width: 720px) {
  .row {
    display: grid;
    grid-template-columns: var(--title-column) minmax(0, 1fr);
    column-gap: 2.5rem;
    align-items: baseline;
  }

  .title {
    width: auto;
    max-width: none;
  }
}

hr {
  border: 0;
  height: 1px;
  background: var(--rule);
  margin: 0;
  width: 100%;
}

.index > hr {
  margin: 0;
  width: calc(100% + var(--edge-bleed));
}

body > header,
.collection + .collection,
.notes {
  position: relative;
  border-color: transparent;
}

body > header::after,
.collection + .collection::before,
.notes::before {
  content: "";
  position: absolute;
  left: 0;
  right: calc(-1 * var(--edge-bleed));
  height: 1px;
  background: var(--rule);
  pointer-events: none;
}

body > header::after { bottom: -1px; }
.collection + .collection::before,
.notes::before { top: -1px; }

a {
  color: inherit;
  text-decoration: none;
}

a:visited {
  color: inherit;
}

footer a {
  transition: color 0.2s;
}

footer a:hover,
footer a:focus-visible {
  color: var(--orange);
}

footer {
  margin-top: 3rem;
  margin-bottom: 2.5rem;
  font-size: 12px;
  color: var(--mute);
}

.social {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: 0.5rem;
  vertical-align: middle;
}

.social a {
  display: inline-flex;
  color: var(--mute);
}

.social svg {
  display: block;
}

@media (prefers-reduced-motion: reduce) {
  .book-object,
  .title,
  .dek,
  a.row .title::before,
  .collection-link .title::before,
  .book-link .title::before,
  footer a {
    transition: none;
  }
}

@media screen {

:root {
  --beta-rule-inset: calc(var(--page-pad-x) / 2);
  --edge-bleed: var(--beta-rule-inset);
}

body {
  position: relative;
  min-height: 100svh;
  display: flow-root;
}

body::before,
body::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: repeating-linear-gradient(to bottom, var(--rule) 0 2px, transparent 2px 6px);
  pointer-events: none;
}

body::before { left: var(--beta-rule-inset); }
body::after { right: var(--beta-rule-inset); }

}
