/* ============================================================
   leslielstevens.net
   Site-wide stylesheet

   Contents
   1.  Design tokens
   2.  Reset & base
   3.  Typography
   4.  Layout primitives
   5.  Header / navigation
   6.  Footer
   7.  Homepage — desert dusk composition
   8.  Page header (interior pages)
   9.  Books
   10. Essays & Archive
   11. Publications
   12. About
   13. Contact
   14. 404
   15. Utilities, focus states, reduced motion
   ============================================================ */


/* ---------- 1. Design tokens ---------- */

:root {
  /* Surface */
  --ink:          #17120F;  /* warm charcoal — primary background */
  --ink-deep:     #0D0A08;  /* deepest shadow */
  --ink-raised:   #1E1815;  /* raised panels, cards */
  --hairline:     rgba(242, 234, 224, 0.13);
  --hairline-soft:rgba(242, 234, 224, 0.07);

  /* Text */
  --bone:         #F2EAE0;  /* primary text */
  --bone-dim:     #DED3C6;
  --sand:         #BFB1A0;  /* secondary text — 8.9:1 on --ink */
  --sand-deep:    #A2937F;  /* labels, navigation, dates — 6.2:1 on --ink */

  /* Accent */
  --rust:         #A8442A;  /* structural accent — rules, marks */
  --rust-light:   #C96B44;
  --rust-text:    #D07A50;  /* accent used as text — passes AA on --ink */
  --oxblood:      #6B2418;
  --amber:        #E9A94F;  /* the lights */

  /* Type */
  --display: 'Fraunces', 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, serif;
  --body:    'Newsreader', Georgia, 'Times New Roman', serif;
  --mono:    'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  /* Measure & rhythm */
  --measure: 34rem;
  --gutter: clamp(1.25rem, 5vw, 3.5rem);
  --shell: 68rem;

  /* Motion */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}


/* ---------- 2. Reset & base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  /* Keeps the footer at the bottom of short pages instead of
     leaving it stranded halfway up the screen. */
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background-color: var(--ink);
  color: var(--bone);
  font-family: var(--body);
  font-size: clamp(1.0625rem, 0.98rem + 0.35vw, 1.1875rem);
  line-height: 1.75;
  font-weight: 380;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

/* A very fine film grain over the whole site. Purely atmospheric,
   never over content, and it does not intercept clicks. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}


/* ---------- 3. Typography ---------- */

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 400;
  font-optical-sizing: auto;
  letter-spacing: -0.012em;
  line-height: 1.18;
  margin: 0 0 0.6em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.1rem, 1.5rem + 2.8vw, 3.6rem); }
h2 { font-size: clamp(1.55rem, 1.25rem + 1.3vw, 2.15rem); }
h3 { font-size: clamp(1.2rem, 1.08rem + 0.55vw, 1.45rem); letter-spacing: -0.006em; }

p { margin: 0 0 1.35em; max-width: var(--measure); }

a { color: var(--bone); text-decoration-color: rgba(208, 122, 80, 0.5); text-underline-offset: 0.22em; text-decoration-thickness: 1px; }
a:hover { color: var(--rust-text); text-decoration-color: var(--rust-text); }

strong { font-weight: 600; }
em { font-style: italic; }

/* Small archival label — used for section eyebrows, dates, categories */
.label {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--sand-deep);
  margin: 0 0 1.6rem;
  display: block;
  max-width: none;
}
.label--rule {
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--hairline);
}

.lede {
  font-family: var(--body);
  font-size: clamp(1.15rem, 1.05rem + 0.5vw, 1.35rem);
  line-height: 1.65;
  color: var(--bone-dim);
}

.quiet { color: var(--sand); }



/* ---------- 4. Layout primitives ---------- */

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: clamp(3.5rem, 8vw, 7rem); }
.section--tight { padding-block: clamp(2.5rem, 5vw, 4rem); }
/* A section that follows the page header does not need to restate
   the distance — the header already drew a line under itself. */
.section--after-head { padding-block-start: clamp(2rem, 4vw, 3.25rem); }

.rule { border: 0; border-top: 1px solid var(--hairline); margin: 0; }

main { flex: 1 0 auto; }
main:focus { outline: none; }


/* ---------- 5. Header / navigation ---------- */

.masthead {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  padding: clamp(1.5rem, 3vw, 2.25rem) var(--gutter);
}

/* Over the homepage hero the masthead floats on the image */
.masthead--over {
  position: absolute;
  inset: 0 0 auto 0;
}

.identity {
  font-family: var(--mono);
  font-size: 0.745rem;
  font-weight: 500;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--bone);
  text-decoration: none;
  white-space: nowrap;
}
.identity:hover { color: var(--bone); text-decoration: none; }

.nav-toggle {
  display: none;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--sand);
  background: none;
  border: 1px solid var(--hairline);
  border-radius: 2px;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
}

.nav { }

.nav__list {
  display: flex;
  gap: clamp(1.1rem, 2.4vw, 2rem);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav__link {
  font-family: var(--mono);
  /* Slightly larger and a shade heavier than a caption would be —
     legibility comes from weight and tracking here, not brightness. */
  font-size: 0.745rem;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--sand);
  text-decoration: none;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid transparent;
  transition: color 0.35s var(--ease), border-color 0.35s var(--ease);
  white-space: nowrap;
}
.nav__link:hover { color: var(--bone); border-bottom-color: var(--rust); }
.nav__link[aria-current="page"] { color: var(--bone); border-bottom-color: var(--rust); }

@media (max-width: 46rem) {
  .masthead { flex-wrap: wrap; align-items: center; }
  .nav-toggle { display: block; }
  .nav {
    /* full-bleed: cancel the masthead's side padding */
    flex-basis: calc(100% + var(--gutter) * 2);
    margin-inline: calc(var(--gutter) * -1);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.45s var(--ease);
  }
  .nav[data-open="true"] {
    max-height: 26rem;
    background: rgba(10, 8, 6, 0.95);
    border-top: 1px solid var(--hairline-soft);
    border-bottom: 1px solid var(--hairline);
  }
  @supports (backdrop-filter: blur(6px)) {
    .nav[data-open="true"] { background: rgba(10, 8, 6, 0.82); backdrop-filter: blur(8px); }
  }
  .nav__list {
    flex-direction: column;
    gap: 0;
    padding: 0.35rem var(--gutter) 0.9rem;
  }
  .nav__list li + li { border-top: 1px solid var(--hairline-soft); }
  .nav__link {
    display: block;
    padding: 1rem 0;
    border-bottom: 0;
    font-size: 0.75rem;
  }
  .nav__link[aria-current="page"] { border-bottom: 0; color: var(--rust-text); }
}


/* ---------- 6. Footer ---------- */

.site-footer {
  border-top: 1px solid var(--hairline);
  margin-top: 0;
  padding-block: clamp(2.5rem, 5vw, 3.5rem);
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem 3rem;
  justify-content: space-between;
  align-items: flex-start;
}

.site-footer__nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.75rem;
}
.site-footer a {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sand);
  text-decoration: none;
}
.site-footer a:hover { color: var(--rust-text); }

.colophon {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sand-deep);
  margin: 0;
  max-width: none;
}


/* ---------- 7. Homepage — desert dusk composition ---------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  grid-template-rows: 1fr auto;
  isolation: isolate;
  overflow: hidden;
  background-color: var(--ink-deep);
}

/* -- 7a. Sky ------------------------------------------------ */
.hero__sky {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    /* ember at the horizon */
    radial-gradient(120% 46% at 50% 74%, rgba(214, 116, 52, 0.42) 0%, rgba(150, 63, 30, 0.22) 26%, rgba(60, 26, 22, 0) 58%),
    /* the last violet before night */
    linear-gradient(to bottom,
      #0A0C16 0%,
      #10111D 18%,
      #191527 38%,
      #2A1A25 55%,
      #46231C 68%,
      #6B3117 76%,
      #2A1510 86%,
      #140C09 100%);
}

/* -- 7b. Stars ---------------------------------------------- */
.hero__stars {
  position: absolute;
  inset: 0 0 42% 0;
  z-index: 1;
  opacity: 0.5;
  background-image:
    radial-gradient(1.1px 1.1px at 8% 22%,  #fff, transparent),
    radial-gradient(1px 1px     at 19% 11%, #fff, transparent),
    radial-gradient(1.3px 1.3px at 27% 34%, #fff, transparent),
    radial-gradient(1px 1px     at 38% 17%, #fff, transparent),
    radial-gradient(1.1px 1.1px at 46% 8%,  #fff, transparent),
    radial-gradient(1px 1px     at 57% 27%, #fff, transparent),
    radial-gradient(1.2px 1.2px at 66% 13%, #fff, transparent),
    radial-gradient(1px 1px     at 74% 31%, #fff, transparent),
    radial-gradient(1.15px 1.15px at 83% 19%, #fff, transparent),
    radial-gradient(1px 1px     at 91% 9%,  #fff, transparent),
    radial-gradient(1px 1px     at 3% 38%,  #fff, transparent),
    radial-gradient(1px 1px     at 52% 41%, #fff, transparent);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 52%, transparent 100%);
          mask-image: linear-gradient(to bottom, #000 0%, #000 52%, transparent 100%);
}

/* -- 7c. Optional real photograph -----------------------------
   Drop a file at assets/images/desert-hero.jpg and it appears here,
   sitting over the CSS sky. If the file is absent nothing breaks:
   the layer simply stays empty and the painted dusk shows through. */
.hero__photo {
  position: absolute;
  inset: 0;
  z-index: 2;
  background-image: var(--hero-image, none);
  background-size: cover;
  background-position: center 62%;
  opacity: var(--hero-image-opacity, 1);
}
.hero__photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(10,12,22,0.55) 0%, rgba(20,12,9,0.25) 45%, rgba(20,12,9,0.75) 100%);
  opacity: var(--hero-image-scrim, 0);
}

/* -- 7d. Land ------------------------------------------------
   One drawn SVG: the seam of light left at the horizon, a far
   sierra, the mesa line, and the flat in front of it. Its height
   follows its own width, so the mesas keep their proportions on
   a phone instead of stretching into towers. */
.hero__land {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: auto;
  z-index: 3;
  pointer-events: none;
  display: block;
}
/* On narrow screens the land would otherwise be a thin strip;
   scaling it up a little keeps the horizon where the eye wants it. */
@media (max-width: 46rem) {
  .hero__land { width: 190%; left: -45%; right: auto; }
}
@media (max-width: 30rem) {
  .hero__land { width: 220%; left: -60%; }
}

/* -- 7e. The three lights -----------------------------------
   Slow, irregular, nearly imperceptible. Each has its own period
   (a prime number of seconds) so they never settle into a shared
   rhythm. Movement is a couple of pixels; mostly they just
   change their minds about being there. */
.light { will-change: opacity, transform; }

.light--a { animation: light-a 47s var(--ease) infinite; }
.light--b { animation: light-b 61s var(--ease) infinite; }
.light--c { animation: light-c 73s var(--ease) infinite; }

@keyframes light-a {
  0%, 100% { opacity: 0.22; transform: translate3d(0, 0, 0); }
  17%      { opacity: 0.70; transform: translate3d(2px, -1px, 0); }
  41%      { opacity: 0.34; transform: translate3d(5px, 1px, 0); }
  68%      { opacity: 0.62; transform: translate3d(1px, -2px, 0); }
  84%      { opacity: 0.15; transform: translate3d(3px, 0, 0); }
}
@keyframes light-b {
  0%, 100% { opacity: 0.48; transform: translate3d(0, 0, 0); }
  23%      { opacity: 0.13; transform: translate3d(-4px, 1px, 0); }
  52%      { opacity: 0.66; transform: translate3d(-1px, -1px, 0); }
  79%      { opacity: 0.28; transform: translate3d(-5px, 2px, 0); }
}
@keyframes light-c {
  0%, 100% { opacity: 0.36; transform: translate3d(0, 0, 0); }
  29%      { opacity: 0.64; transform: translate3d(2px, 2px, 0); }
  46%      { opacity: 0.19; transform: translate3d(6px, 0, 0); }
  73%      { opacity: 0.54; transform: translate3d(2px, -1px, 0); }
  91%      { opacity: 0.24; transform: translate3d(0, 1px, 0); }
}

/* -- 7f. Vignette ------------------------------------------- */
.hero__vignette {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  background: radial-gradient(120% 90% at 50% 45%, transparent 42%, rgba(8, 6, 5, 0.55) 100%);
}

/* -- 7g. The line ------------------------------------------- */
.hero__content {
  position: relative;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8rem var(--gutter) 4rem;
}

.hero__line {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(1.65rem, 1.05rem + 3.1vw, 3.4rem);
  line-height: 1.34;
  letter-spacing: -0.014em;
  color: var(--bone);
  text-align: center;
  max-width: 22ch;
  margin: 0;
  text-shadow: 0 1px 34px rgba(0, 0, 0, 0.55);
  animation: settle 2.6s var(--ease) 0.25s both;
}
.hero__line span { display: block; }
.hero__line span + span { margin-top: 0.18em; color: var(--bone-dim); }

@keyframes settle {
  from { opacity: 0; transform: translate3d(0, 10px, 0); }
  to   { opacity: 1; transform: none; }
}

/* -- 7h. The way in ----------------------------------------- */
.hero__foot {
  position: relative;
  z-index: 6;
  padding: 0 var(--gutter) clamp(2rem, 5vw, 3.25rem);
  display: flex;
  justify-content: center;
  animation: settle 2.4s var(--ease) 1.9s both;
}

.enter {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--sand);
  text-decoration: none;
  /* a generous target without a visible edge */
  padding: 0.75rem 1.5rem 0.5rem;
  border-radius: 2px;
  transition: color 0.4s var(--ease), letter-spacing 0.5s var(--ease);
}
.enter:hover,
.enter:focus-visible { color: var(--bone); letter-spacing: 0.25em; }

.enter__mark {
  width: 1px;
  height: 2.4rem;
  background: linear-gradient(to bottom, rgba(191,177,160,0.6), transparent);
  transform-origin: top;
  animation: drift 5.5s ease-in-out infinite;
  transition: height 0.5s var(--ease), background 0.4s var(--ease);
}
.enter:hover .enter__mark,
.enter:focus-visible .enter__mark {
  height: 3.1rem;
  background: linear-gradient(to bottom, var(--rust-text), rgba(208,122,80,0));
}
/* Keyboard focus is shown as a rust rule under the words rather than
   a box around them — visible, but never a button. */
.enter__label {
  display: inline-block;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid transparent;
  transition: border-color 0.35s var(--ease);
}
.enter:hover .enter__label { border-bottom-color: rgba(208, 122, 80, 0.45); }
.enter:focus-visible { outline: none; }
.enter:focus-visible .enter__label { border-bottom-color: var(--rust-text); }

/* In Windows high-contrast mode, fall back to the system outline. */
@media (forced-colors: active) {
  .enter:focus-visible { outline: 2px solid; outline-offset: 4px; }
}
@keyframes drift {
  0%, 100% { transform: scaleY(1); opacity: 0.75; }
  50%      { transform: scaleY(1.22); opacity: 0.35; }
}

/* -- 7i. Doorways below the fold ---------------------------- */
.doorways { border-top: 1px solid var(--hairline-soft); }

.doorway-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--hairline);
}

.doorway {
  display: block;
  border-bottom: 1px solid var(--hairline);
  padding: clamp(1.6rem, 3vw, 2.4rem) 0;
  text-decoration: none;
  color: var(--bone);
  transition: padding-left 0.5s var(--ease), color 0.4s var(--ease);
}
.doorway:hover,
.doorway:focus-visible { padding-left: 0.9rem; color: var(--bone); }

.doorway__index {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.2em;
  color: var(--sand-deep);
  display: block;
  margin-bottom: 0.5rem;
}
.doorway__name {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.6rem, 1.2rem + 1.9vw, 2.5rem);
  line-height: 1.15;
  display: block;
  transition: color 0.4s var(--ease);
}
.doorway:hover .doorway__name { color: var(--rust-text); }
.doorway__note {
  font-family: var(--body);
  font-size: 0.95rem;
  color: var(--sand);
  display: block;
  margin-top: 0.45rem;
  max-width: 34ch;
}


/* ---------- 8. Page header (interior pages) ---------- */

.page-head {
  padding-block: clamp(2.5rem, 6vw, 5rem) clamp(2rem, 4vw, 3rem);
  border-bottom: 1px solid var(--hairline);
}
.page-head h1 { margin-bottom: 0.35em; }
.page-head .lede { margin-bottom: 0; }


/* ---------- 9. Books ---------- */

/* An empty list must not leave a rule floating on the page.
   Two rules rather than one: :empty covers browsers without :has(),
   and :has() covers the case where the markup carries whitespace. */
.book-list:empty, .entry-list:empty { display: none; }
.book-list:not(:has(li)), .entry-list:not(:has(li)) { display: none; }

.book-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: clamp(2.5rem, 6vw, 4.5rem);
}

.book {
  display: grid;
  grid-template-columns: minmax(0, 12rem) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}
@media (max-width: 40rem) {
  .book { grid-template-columns: minmax(0, 1fr); }
  .book__cover { max-width: 11rem; }
}

/* Cover artwork is shown whole: the frame takes the artwork's own
   proportions, the image is contained rather than cropped, and there
   is no rule drawn on top of it. The only treatment is a soft shadow
   outside the edge, so the jacket lifts off the dark page. */
.book__cover {
  aspect-ratio: var(--cover-ratio, 5 / 8);
  box-shadow: 0 22px 52px rgba(0, 0, 0, 0.55);
}
.book__cover img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* -- A single featured title ------------------------------- */
.book--feature {
  grid-template-columns: minmax(0, 19rem) minmax(0, 1fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}
@media (max-width: 46rem) {
  .book--feature { grid-template-columns: minmax(0, 1fr); }
  .book--feature .book__cover { max-width: 16rem; }
}

.book__byline {
  font-family: var(--body);
  font-style: italic;
  font-size: clamp(1.05rem, 1rem + 0.4vw, 1.2rem);
  color: var(--sand);
  margin: 0;
}
.book--feature .book__title {
  font-size: clamp(1.9rem, 1.4rem + 2.2vw, 3rem);
  margin-bottom: 0.45rem;
}
/* A short rule under the byline, so the column has a shape of its
   own before the description is written. */
.book__detail .book__byline::after {
  content: "";
  display: block;
  width: 2.6rem;
  height: 1px;
  background: var(--rust);
  margin-top: clamp(1.5rem, 3vw, 2.1rem);
}
.book__detail .book__byline + p,
.book__detail .book__byline + .book__status,
.book__detail .book__byline + ul { margin-top: clamp(1.5rem, 3vw, 2.1rem); }

.book__series {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--rust-text);
  display: block;
  margin-bottom: 0.6rem;
}
.book__title { margin-bottom: 0.5rem; }
.book__status {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sand-deep);
  border: 1px solid var(--hairline);
  border-radius: 2px;
  padding: 0.3rem 0.6rem;
  display: inline-block;
  margin-bottom: 1.1rem;
}
/* A content note. Set small and quiet — it is information a reader
   needs to decide, not a warning label shouting at the page. */
.book__note {
  font-family: var(--mono);
  font-size: 0.72rem;
  line-height: 1.85;
  letter-spacing: 0.01em;
  color: var(--sand-deep);
  max-width: 46ch;
  margin: clamp(1.4rem, 3vw, 2rem) 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--hairline-soft);
}
.book__note b {
  display: block;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.66rem;
  color: var(--sand);
  margin-bottom: 0.5rem;
}

.book__links {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}
.book__links a {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--sand);
  border-bottom: 1px solid var(--hairline);
  padding-bottom: 0.25rem;
}
.book__links a:hover { color: var(--rust-text); border-bottom-color: var(--rust); }


/* -- The catalogue ------------------------------------------
   Three series, read as three rooms. A series with cover artwork
   runs two columns; a series without one runs full width, so no
   empty frame is ever shown where a jacket has not been made. */
.catalog { display: grid; gap: clamp(3.25rem, 7vw, 5.5rem); }

.series__head {
  border-top: 1px solid var(--hairline);
  padding-top: clamp(1.5rem, 3vw, 2.25rem);
  margin-bottom: clamp(1.75rem, 4vw, 2.75rem);
}
/* The page header already drew a line; the first series does not
   need a second one directly beneath it. */
.series:first-child .series__head { border-top: 0; padding-top: 0; }
.series__meta {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--sand-deep);
  margin: 0 0 0.85rem;
  max-width: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.1rem;
}
.series__genre { color: var(--rust-text); }
.series__name {
  font-size: clamp(1.6rem, 1.25rem + 1.6vw, 2.35rem);
  margin: 0;
}
/* Optional one- or two-sentence series statement. Absent by default. */
.series__statement {
  font-family: var(--body);
  font-size: clamp(1.05rem, 1rem + 0.4vw, 1.2rem);
  line-height: 1.7;
  color: var(--bone-dim);
  margin: 1.1rem 0 0;
  max-width: 46ch;
}

/* A series that has a jacket to show */
.series__body--illustrated {
  display: grid;
  grid-template-columns: minmax(0, 17rem) minmax(0, 1fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}
@media (max-width: 46rem) {
  .series__body--illustrated { grid-template-columns: minmax(0, 1fr); }
  .series__body--illustrated .book__cover { max-width: 15rem; }
}

/* Two or more jackets shown together — the Grimm shelf. */
.series__body--gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11rem, 13.5rem));
  gap: clamp(1.75rem, 4vw, 3rem);
  align-items: start;
}
.shelf-item .book__cover { margin-bottom: 1.1rem; }
.shelf-item__pos {
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--rust-text);
  display: block;
  margin-bottom: 0.45rem;
}
.shelf-item__name {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.15rem, 1.05rem + 0.5vw, 1.4rem);
  line-height: 1.2;
  color: var(--bone);
  display: block;
}
.shelf-item__note {
  font-family: var(--body);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--sand);
  display: block;
  margin-top: 0.4rem;
}

/* Titles listed without artwork — the backlist voice, quieter than
   the featured entry but set on the same spine. */
.titles { list-style: none; margin: 0; padding: 0; }
.titles li { border-top: 1px solid var(--hairline-soft); }
.titles li:first-child { border-top: 1px solid var(--hairline); }
.titles li:last-child { border-bottom: 1px solid var(--hairline); }
.series__body--illustrated .titles { margin-top: clamp(2rem, 4vw, 3rem); }

.title-row { display: block; padding: clamp(1.15rem, 2.4vw, 1.6rem) 0; }
.title-row__pos {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--sand-deep);
  display: block;
  margin-bottom: 0.45rem;
}
.title-row__name {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.25rem, 1.1rem + 0.7vw, 1.6rem);
  line-height: 1.2;
  color: var(--bone);
  display: block;
}
.title-row .book__status { margin: 0.75rem 0 0; }
.title-row p { color: var(--sand); font-size: 1rem; margin: 0.55rem 0 0; max-width: 44ch; }

/* ---------- 10. Essays & Archive ---------- */

.strands {
  list-style: none;
  margin: 0 0 clamp(3rem, 7vw, 5rem);
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1px;
  background: var(--hairline);
  border: 1px solid var(--hairline);
}
.strand { background: var(--ink); padding: clamp(1.4rem, 3vw, 2rem); }
.strand h2 {
  font-size: 1.05rem;
  font-family: var(--mono);
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bone);
  margin-bottom: 0.7rem;
}
.strand p { font-size: 0.97rem; color: var(--sand); margin: 0; }

.entry-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--hairline); }

.entry {
  display: block;
  border-bottom: 1px solid var(--hairline);
  padding: clamp(1.4rem, 3vw, 2rem) 0;
  text-decoration: none;
  color: var(--bone);
  transition: padding-left 0.5s var(--ease);
}
.entry:hover, .entry:focus-visible { padding-left: 0.9rem; }
.entry__meta {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sand-deep);
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.2rem;
  margin-bottom: 0.6rem;
}
.entry__title {
  font-family: var(--display);
  font-size: clamp(1.25rem, 1.1rem + 0.8vw, 1.7rem);
  line-height: 1.25;
  display: block;
  transition: color 0.4s var(--ease);
}
.entry:hover .entry__title { color: var(--rust-text); }
.entry__note { color: var(--sand); font-size: 0.98rem; margin: 0.5rem 0 0; max-width: 46ch; }


/* ---------- 11. Publications ---------- */

.pubs { display: grid; gap: 1px; background: var(--hairline); border-block: 1px solid var(--hairline); }

.pub {
  background: var(--ink);
  display: grid;
  grid-template-columns: minmax(0, 15rem) minmax(0, 1fr);
  gap: clamp(1rem, 4vw, 3rem);
  padding-block: clamp(2.25rem, 5vw, 3.5rem);
  align-items: start;
}
@media (max-width: 44rem) {
  .pub { grid-template-columns: minmax(0, 1fr); gap: 0.75rem; }
}

.pub__index {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--sand-deep);
  padding-top: 0.6rem;
}
.pub__name { margin-bottom: 0.55rem; font-size: clamp(1.5rem, 1.2rem + 1.3vw, 2.1rem); }
.pub__desc { color: var(--bone-dim); margin-bottom: 0.9rem; }
.pub__desc--quote { font-style: italic; }
.pub__link {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--sand);
  border-bottom: 1px solid var(--hairline);
  padding-bottom: 0.3rem;
  display: inline-block;
}
.pub__link:hover { color: var(--rust-text); border-bottom-color: var(--rust); }


/* ---------- 12. About ---------- */

.about-open {
  padding-block: clamp(3.5rem, 9vw, 7rem) clamp(2rem, 5vw, 3.5rem);
}
.about-open h1 {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(1.5rem, 1.1rem + 2.1vw, 2.6rem);
  line-height: 1.32;
  letter-spacing: -0.014em;
  color: var(--bone);
  max-width: 24ch;
  margin: 0;
}

.about-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 23rem);
  gap: clamp(2rem, 6vw, 4.5rem);
  align-items: start;
  padding-bottom: clamp(3rem, 7vw, 5rem);
}
@media (max-width: 48rem) {
  .about-body { grid-template-columns: minmax(0, 1fr); }
}

.portrait { margin: 0; position: sticky; top: 2.5rem; }
@media (max-width: 48rem) { .portrait { position: static; } }

.portrait__frame {
  aspect-ratio: 4 / 5;
  background-color: #191310;
  border: 1px solid var(--hairline);
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}
.portrait__frame img {
  width: 100%;
  height: 100%;
  /* The file is already cut to 4:5, so nothing is cropped again here.
     If a future photograph needs shifting inside the frame, change
     object-position — for example "50% 32%" to favour the top. */
  object-fit: cover;
  object-position: 50% 50%;
  display: block;
}

.portrait figcaption {
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sand-deep);
  margin-top: 0.9rem;
  line-height: 1.8;
}

.about-close {
  border-top: 1px solid var(--hairline);
  padding-block: clamp(4rem, 12vw, 9rem);
}
.about-close p {
  text-wrap: balance;
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(1.45rem, 1.05rem + 2.1vw, 2.5rem);
  line-height: 1.36;
  letter-spacing: -0.014em;
  color: var(--bone);
  max-width: 26ch;
  margin: 0 auto;
  text-align: center;
}


/* ---------- 13. Contact ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: clamp(2rem, 5vw, 3.5rem);
  padding-block: clamp(2.5rem, 6vw, 4rem);
}

.contact-block h2 {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--sand);
  margin-bottom: 1rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--hairline);
}
.contact-block p { font-size: 1rem; color: var(--bone-dim); }

/* The one address on the site. Set in mono so it reads as a piece
   of record rather than as a marketing button. */
.contact-address { margin: 1.5rem 0 0; max-width: none; }
.contact-address a {
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  color: var(--bone);
  text-decoration: none;
  border-bottom: 1px solid var(--hairline);
  padding-bottom: 0.4rem;
  display: inline-block;
  transition: color 0.35s var(--ease), border-color 0.35s var(--ease);
  word-break: break-word;
}
.contact-address a:hover { color: var(--rust-text); border-bottom-color: var(--rust); }

.link-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.9rem; }
.link-list a {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--bone);
  display: inline-flex;
  gap: 0.75rem;
  align-items: baseline;
}
.link-list a:hover { color: var(--rust-text); }
.link-list .link-list__host { color: var(--sand-deep); font-size: 0.66rem; letter-spacing: 0.1em; text-transform: none; }

.form {
  display: grid;
  gap: 1.25rem;
  max-width: 34rem;
  padding-block: clamp(1rem, 3vw, 2rem) clamp(3rem, 7vw, 5rem);
}
.form label {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sand);
  display: block;
  margin-bottom: 0.5rem;
}
.form input, .form textarea, .form select {
  width: 100%;
  background: var(--ink-raised);
  border: 1px solid var(--hairline);
  border-radius: 2px;
  color: var(--bone);
  font-family: var(--body);
  font-size: 1rem;
  padding: 0.8rem 0.9rem;
}
.form input:focus, .form textarea:focus, .form select:focus {
  outline: 2px solid var(--rust-text);
  outline-offset: 1px;
  border-color: transparent;
}
.form textarea { min-height: 9rem; resize: vertical; }
.form button {
  justify-self: start;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--bone);
  background: transparent;
  border: 1px solid var(--rust);
  border-radius: 2px;
  padding: 0.85rem 1.6rem;
  cursor: pointer;
  transition: background-color 0.35s var(--ease);
}
.form button:hover { background: rgba(168, 68, 42, 0.18); }


/* ---------- 14. 404 ---------- */

.notfound {
  min-height: 70svh;
  display: grid;
  place-content: center;
  text-align: center;
  padding-block: clamp(4rem, 10vw, 8rem);
}
.notfound h1 {
  font-weight: 300;
  font-size: clamp(1.5rem, 1.1rem + 2vw, 2.5rem);
  max-width: 22ch;
  margin-inline: auto;
}
.notfound p { margin-inline: auto; color: var(--sand); }


/* ---------- 15. Utilities, focus, reduced motion ---------- */

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  background: var(--ink-raised);
  color: var(--bone);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 0.75rem 1.1rem;
  border: 1px solid var(--rust);
  border-radius: 2px;
  text-decoration: none;
  transition: top 0.25s var(--ease);
}
.skip-link:focus { top: 1rem; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

:focus-visible {
  outline: 2px solid var(--rust-text);
  outline-offset: 3px;
  border-radius: 1px;
}

::selection { background: rgba(168, 68, 42, 0.4); color: var(--bone); }

/* Sections fade in gently on scroll; JS adds .is-in. Without JS or
   with reduced motion they are simply visible. */
.reveal { opacity: 0; transform: translate3d(0, 14px, 0); transition: opacity 1.1s var(--ease), transform 1.1s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
html.no-js .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .hero__line, .hero__foot { animation: none; opacity: 1; transform: none; }
  .light { animation: none !important; }
  .light--a { opacity: 0.52; }
  .light--b { opacity: 0.42; }
  .light--c { opacity: 0.46; }
  .enter__mark { animation: none; }
  .enter, .enter__mark { transition: color 0.001ms, none; }
  .reveal { opacity: 1; transform: none; }
  .doorway:hover, .entry:hover { padding-left: 0; }
}

@media print {
  body { background: #fff; color: #000; }
  .hero, .site-footer, .masthead { display: none; }
}
