/* Justice Cycle — noir supernatural palette */
:root {
  --bg-deep: #070708;
  --bg-raised: #0f1014;
  --bg-card: #14151c;
  --text: #e8e6e3;
  --text-muted: #9a9690;
  --gold: #c6a24a;
  --gold-dim: #8a7340;
  --crimson: #8b2942;
  --crimson-bright: #c44a66;
  --line: rgba(198, 162, 74, 0.15);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.65);
  --font-display: "Cinzel", "Times New Roman", serif;
  --font-body: "Source Sans 3", system-ui, sans-serif;
  --font-field: "IM Fell English", "Times New Roman", Georgia, serif;
  --font-hand: "Caveat", cursive;
  --radius: 4px;
  --header-h: 4.25rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg-deep);
  background-image:
    radial-gradient(ellipse 120% 80% at 50% -20%, rgba(139, 41, 66, 0.12), transparent 50%),
    radial-gradient(ellipse 80% 50% at 100% 50%, rgba(198, 162, 74, 0.04), transparent 45%),
    linear-gradient(180deg, var(--bg-deep) 0%, #0a0b0f 100%);
  min-height: 100vh;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--gold);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  color: #e4d4a8;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 1000;
  padding: 0.75rem 1.25rem;
  background: var(--gold);
  color: var(--bg-deep);
  font-weight: 600;
}

.skip-link:focus {
  left: 0;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  border-bottom: 1px solid var(--line);
  background: rgba(7, 7, 8, 0.92);
  backdrop-filter: blur(12px);
}

.site-header__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text);
}

.brand:hover {
  color: var(--text);
}

.brand__name {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.22em;
  font-size: clamp(0.8rem, 2.5vw, 0.95rem);
  text-transform: uppercase;
  color: var(--text);
  white-space: nowrap;
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 1px solid var(--line);
  background: var(--bg-card);
  border-radius: var(--radius);
  cursor: pointer;
}

.nav-toggle__bar {
  display: block;
  height: 2px;
  width: 1.25rem;
  margin: 0 auto;
  background: var(--gold);
  transition: transform 0.2s, opacity 0.2s;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (min-width: 900px) {
  .nav-toggle {
    display: none;
  }
}

.site-nav {
  position: fixed;
  inset: var(--header-h) 0 auto 0;
  background: rgba(7, 7, 8, 0.98);
  border-bottom: 1px solid var(--line);
  padding: 1rem 1.25rem 1.25rem;
  transform: translateY(-120%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.site-nav.is-open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

@media (min-width: 900px) {
  .site-nav {
    position: static;
    inset: auto;
    background: transparent;
    border: 0;
    padding: 0;
    transform: none;
    opacity: 1;
    pointer-events: auto;
  }
}

.site-nav__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

@media (min-width: 900px) {
  .site-nav__list {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
    justify-content: flex-end;
  }
}

.site-nav a {
  display: block;
  padding: 0.5rem 0;
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text-muted);
}

.site-nav a:hover {
  color: var(--gold);
}

/* Hero */
.hero {
  position: relative;
  min-height: min(92vh, 900px);
  display: grid;
  align-items: end;
}

.hero__media {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  filter: saturate(0.85) contrast(1.05) brightness(0.45);
}

.hero__veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, var(--bg-deep) 0%, transparent 45%),
    linear-gradient(120deg, rgba(7, 7, 8, 0.85) 0%, transparent 55%),
    radial-gradient(ellipse at 70% 20%, rgba(139, 41, 66, 0.25), transparent 50%);
}

.hero__rays {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    -28deg,
    transparent,
    transparent 80px,
    rgba(198, 162, 74, 0.03) 80px,
    rgba(198, 162, 74, 0.03) 82px
  );
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), transparent 70%);
  pointer-events: none;
}

.hero__content {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 1.25rem 3.5rem;
  width: 100%;
}

.hero__eyebrow {
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 0.75rem;
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.85rem, 4.5vw, 3.25rem);
  line-height: 1.15;
  margin: 0 0 1rem;
  max-width: 18ch;
  text-shadow: 0 2px 40px rgba(0, 0, 0, 0.8);
}

.hero__lead {
  margin: 0 0 1.75rem;
  max-width: 36ch;
  color: var(--text-muted);
  font-size: 1.1rem;
  font-weight: 300;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.35rem;
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.btn--primary {
  background: linear-gradient(145deg, var(--gold) 0%, var(--gold-dim) 100%);
  color: var(--bg-deep);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 24px rgba(198, 162, 74, 0.25);
}

.btn--primary:hover {
  color: var(--bg-deep);
  box-shadow: 0 6px 32px rgba(198, 162, 74, 0.35);
}

.btn--secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--crimson-bright);
}

.btn--secondary:hover {
  background: rgba(139, 41, 66, 0.2);
  color: var(--text);
}

.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
}

.btn--ghost:hover {
  border-color: var(--gold);
  color: var(--gold);
}

/* Sections */
.section {
  padding: 4.5rem 0;
}

.section__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.section__inner--narrow {
  max-width: 640px;
  text-align: center;
}

.section__inner--split {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

@media (min-width: 900px) {
  .section__inner--split {
    grid-template-columns: 1fr 1fr;
    gap: 3.5rem;
  }
}

.section__head {
  text-align: center;
  max-width: 52ch;
  margin: 0 auto 3rem;
}

.section__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.5rem, 3vw, 2rem);
  letter-spacing: 0.06em;
  margin: 0 0 0.75rem;
  color: var(--text);
}

.section__subtitle {
  margin: 0;
  color: var(--text-muted);
  font-weight: 300;
}

.section--books {
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, transparent, rgba(20, 21, 28, 0.5));
}

.section--shepherd {
  border-top: 1px solid var(--line);
}

.section--blog {
  border-top: 1px solid var(--line);
  background: rgba(15, 16, 20, 0.6);
}

.section--connect {
  border-top: 1px solid var(--line);
  padding-bottom: 5rem;
}

.section__footer-cta {
  text-align: center;
  margin: 2rem 0 0;
  color: var(--text-muted);
}

.dot {
  margin: 0 0.5rem;
  opacity: 0.5;
}

.text-link {
  color: var(--gold);
  text-decoration: none;
  border-bottom: 1px solid rgba(198, 162, 74, 0.35);
}

.text-link:hover {
  border-bottom-color: var(--gold);
  color: #e4d4a8;
}

/* Book grid */
.book-grid {
  display: grid;
  gap: 3rem;
}

@media (min-width: 960px) {
  .book-grid {
    gap: 4rem;
  }
}

.book-card {
  display: grid;
  gap: 1.75rem;
  padding: 1.75rem;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 2px;
  box-shadow: var(--shadow);
}

@media (min-width: 800px) {
  .book-card {
    grid-template-columns: min(280px, 38%) 1fr;
    align-items: start;
    gap: 2.25rem;
    padding: 2rem 2.25rem;
  }
}

.book-card--featured {
  border-color: rgba(198, 162, 74, 0.35);
  background:
    linear-gradient(135deg, rgba(139, 41, 66, 0.08) 0%, transparent 50%),
    var(--bg-card);
}

.book-card__cover {
  position: relative;
}

.book-card__cover::after {
  content: "";
  position: absolute;
  inset: -1px;
  border: 1px solid rgba(198, 162, 74, 0.2);
  border-radius: 2px;
  pointer-events: none;
}

.book-card__cover img {
  width: 100%;
  border-radius: 2px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
}

.book-card__badge {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--bg-deep);
  background: var(--gold);
  padding: 0.35rem 0.65rem;
  margin-bottom: 0.75rem;
}

.book-card__badge--muted {
  background: rgba(139, 41, 66, 0.35);
  color: var(--crimson-bright);
  border: 1px solid rgba(196, 74, 102, 0.4);
}

.book-card__title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  margin: 0 0 0.25rem;
  letter-spacing: 0.04em;
}

.book-card__meta {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  color: var(--gold-dim);
  font-family: var(--font-display);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.book-card__text {
  margin: 0 0 1rem;
  color: var(--text-muted);
  font-weight: 300;
}

.book-card__note {
  margin: 0 0 1.25rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  font-style: italic;
}

/* Shepherd */
.shepherd-visual {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 2px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.shepherd-visual img {
  width: 100%;
  transition: transform 0.5s ease, filter 0.5s ease;
  filter: brightness(0.92);
}

.shepherd-visual:hover img {
  transform: scale(1.03);
  filter: brightness(1);
}

.shepherd-visual__cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1rem 1.25rem;
  background: linear-gradient(to top, rgba(7, 7, 8, 0.95), transparent);
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
}

.shepherd-copy .section__title {
  text-align: left;
}

.shepherd-copy p {
  color: var(--text-muted);
  font-weight: 300;
}

.shepherd-copy .btn {
  margin-top: 1rem;
}

@media (max-width: 899px) {
  .shepherd-copy .section__title {
    text-align: center;
  }

  .shepherd-copy {
    text-align: center;
  }
}

/* Blog cards */
.post-grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .post-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
  }
}

.post-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 2px;
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.post-card:hover {
  border-color: rgba(198, 162, 74, 0.4);
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.post-card__image {
  aspect-ratio: 1;
  overflow: hidden;
}

.post-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.9) brightness(0.9);
  transition: filter 0.3s, transform 0.4s ease;
}

.post-card:hover .post-card__image img {
  filter: saturate(1) brightness(1);
  transform: scale(1.05);
}

.post-card__title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  line-height: 1.35;
  margin: 0;
  padding: 1rem 1.1rem 1.25rem;
  letter-spacing: 0.02em;
  color: var(--text);
}

.post-card:hover .post-card__title {
  color: var(--gold);
}

/* Connect */
.connect__intro {
  color: var(--text-muted);
  font-weight: 300;
  margin: 0 0 1.5rem;
}

.social-row {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1rem;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.85rem;
  transition: border-color 0.2s, color 0.2s;
}

.social-link:hover {
  color: var(--gold);
  border-color: rgba(198, 162, 74, 0.4);
}

.social-link__icon {
  width: 1.1rem;
  height: 1.1rem;
  flex-shrink: 0;
}

.connect__medium {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 2rem 1.25rem;
  background: var(--bg-raised);
}

.site-footer__inner {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.site-footer__copy {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.site-footer__note {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.site-footer a {
  color: var(--gold);
}

/* Inner pages */
.page-sub .page-hero {
  border-bottom: 1px solid var(--line);
  padding: 3rem 0 2.5rem;
  background: linear-gradient(180deg, rgba(20, 21, 28, 0.6), transparent);
}

.page-hero__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.page-hero__eyebrow {
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold-dim);
  margin: 0 0 0.5rem;
}

.page-hero__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  letter-spacing: 0.06em;
  margin: 0 0 0.75rem;
}

.page-hero__lead {
  margin: 0;
  max-width: 40ch;
  color: var(--text-muted);
  font-weight: 300;
}

.page-hero__lead a {
  color: var(--gold);
  text-decoration: none;
  border-bottom: 1px solid rgba(198, 162, 74, 0.4);
}

.page-hero__lead a:hover {
  color: #e4d4a8;
}

.section--tight {
  padding-top: 2.5rem;
}

.section__inner--readable {
  max-width: 44rem;
}

.site-nav a.is-active {
  color: var(--gold);
}

/* Long-form prose (bestiary, about) */
.prose {
  color: var(--text-muted);
  font-weight: 300;
}

.prose__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.35rem;
  line-height: 1.3;
  color: var(--text);
  letter-spacing: 0.03em;
  margin: 0 0 1rem;
}

.prose__byline {
  font-family: var(--font-display);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.75rem;
  color: var(--gold);
  margin: 0 0 0.35rem;
}

.prose__affil {
  margin: 0 0 2rem;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.prose p {
  margin: 0 0 1rem;
}

.prose__quote {
  margin: 1.25rem 0;
  padding: 1rem 1.25rem;
  border-left: 3px solid var(--crimson-bright);
  background: rgba(139, 41, 66, 0.08);
  color: var(--text);
  font-style: italic;
}

/* Bestiary — field notebook (paper column on dark site chrome) */
.section--bestiary {
  padding-bottom: 5rem;
}

.section__inner--notebook {
  position: relative;
  max-width: 48rem;
  margin: 0 auto;
  padding: 2.5rem 1.75rem 3rem 2.75rem;
  background-color: #e8e0d0;
  background-image:
    linear-gradient(
      90deg,
      transparent 0,
      transparent 2.25rem,
      rgba(160, 64, 64, 0.42) 2.25rem,
      rgba(160, 64, 64, 0.42) calc(2.25rem + 2px),
      transparent calc(2.25rem + 2px)
    ),
    repeating-linear-gradient(
      transparent 0,
      transparent calc(1.65em - 1px),
      rgba(35, 45, 75, 0.055) calc(1.65em - 1px),
      rgba(35, 45, 75, 0.055) 1.65em
    ),
    radial-gradient(ellipse 140% 90% at 12% -10%, rgba(255, 252, 245, 0.5), transparent 52%),
    radial-gradient(ellipse 80% 50% at 100% 100%, rgba(120, 90, 50, 0.06), transparent 50%);
  background-size: 100% 100%, 100% 1.65em, 100% 100%, 100% 100%;
  background-position: 0 0, 0 0.35rem, 0 0, 0 0;
  border-radius: 3px;
  border: 1px solid rgba(45, 38, 28, 0.2);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.28) inset,
    0 20px 50px rgba(0, 0, 0, 0.55);
}

.section__inner--notebook::before {
  content: "";
  pointer-events: none;
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  opacity: 1;
  z-index: 0;
}

.section__inner--notebook::after {
  content: "";
  pointer-events: none;
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow:
    inset 0 0 100px rgba(62, 48, 28, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  z-index: 0;
}

.section__inner--notebook .notebook-prose {
  position: relative;
  z-index: 1;
}

@media (min-width: 720px) {
  .section__inner--notebook {
    padding: 3rem 2.25rem 3.5rem 3.25rem;
  }
}

.notebook-prose {
  font-family: var(--font-field);
  color: #252018;
  font-weight: 400;
  font-size: 1.06rem;
  line-height: 1.72;
}

.notebook-prose .prose__title {
  font-family: var(--font-display);
  color: #14110e;
}

.notebook-prose .prose__byline {
  font-family: var(--font-display);
  color: #5c4d2e;
}

.notebook-prose .prose__affil {
  font-family: var(--font-body);
  color: #4a4338;
}

.notebook-prose .prose__quote {
  font-family: var(--font-field);
  border-left-color: #8b2942;
  background: rgba(139, 41, 66, 0.07);
  color: #1f1a14;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.35) inset;
}

.notebook-prose .prose__notation {
  font-family: var(--font-hand);
  font-size: 1.35rem;
  line-height: 1.45;
  color: #3d3428;
  margin: 1.35rem 0 1.5rem;
  padding: 0.85rem 0 0.85rem 1.15rem;
  border-left: 2px dashed rgba(100, 80, 55, 0.35);
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.22), transparent 55%);
  transform: rotate(-0.2deg);
}

/* Full-bleed section headers (matches original Wix image + title treatment) */
.notebook-field-header {
  position: relative;
  margin: 2rem -0.85rem 2.25rem;
  min-height: clamp(10.5rem, 28vw, 15rem);
  border-radius: 2px;
  overflow: hidden;
  border: 1px solid rgba(35, 28, 20, 0.25);
  box-shadow:
    0 2px 0 rgba(255, 255, 255, 0.2) inset,
    0 12px 28px rgba(0, 0, 0, 0.22);
}

@media (min-width: 720px) {
  .notebook-field-header {
    margin-left: -1.35rem;
    margin-right: -1.35rem;
  }
}

.notebook-field-header__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 28%;
}

.notebook-field-header__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(12, 10, 8, 0.25) 0%,
    rgba(12, 10, 8, 0.5) 45%,
    rgba(8, 6, 5, 0.82) 100%
  );
}

.notebook-field-header__title {
  position: relative;
  z-index: 1;
  margin: 0;
  padding: clamp(2rem, 6vw, 3.25rem) 1.25rem;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.05rem, 3.2vw, 1.65rem);
  letter-spacing: 0.18em;
  line-height: 1.35;
  text-transform: uppercase;
  color: #f7f2e8;
  text-shadow:
    0 0 40px rgba(0, 0, 0, 0.9),
    0 2px 12px rgba(0, 0, 0, 0.85),
    0 0 1px rgba(0, 0, 0, 1);
}

/* Beast subsections: title → plate → description (matches Wix labels + field-note layout) */
.notebook-beast {
  margin-bottom: 2rem;
}

.notebook-prose .notebook-beast-heading {
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 2.4vw, 1.3rem);
  font-weight: 600;
  text-align: center;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.38em;
  letter-spacing: 0.1em;
  color: #1a1511;
  margin: 2rem 0 0.65rem;
  line-height: 1.35;
}

.notebook-field-header + .notebook-beast .notebook-beast-heading {
  margin-top: 1.2rem;
}

.notebook-beast .notebook-plate--beast {
  margin: 0 0 1.15rem;
}

.notebook-beast--case .prose__quote {
  margin-top: 0.35rem;
}

.notebook-beast--closing .notebook-beast-heading {
  font-size: clamp(0.98rem, 2.2vw, 1.15rem);
  letter-spacing: 0.14em;
}

.notebook-plate--beast .notebook-plate__frame {
  max-width: none;
  transform: rotate(-0.15deg);
}

.notebook-plate {
  margin: 1.75rem 0 2.25rem;
  clear: both;
}

.notebook-plate__frame {
  display: inline-block;
  width: 100%;
  max-width: min(100%, 38rem);
  padding: 0.55rem 0.55rem 1.1rem;
  background: #f7f4ec;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow:
    1px 2px 0 rgba(0, 0, 0, 0.04),
    0 14px 32px rgba(0, 0, 0, 0.18);
  transform: rotate(-0.4deg);
}

.notebook-plate__frame img {
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.notebook-prose > figure.notebook-plate:nth-of-type(even) .notebook-plate__frame {
  transform: rotate(0.35deg);
}

.notebook-plate__cap {
  margin-top: 0.6rem;
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #5a5245;
}

.notebook-plate-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 1.15rem;
  margin: 1.75rem 0 2.25rem;
}

@media (min-width: 720px) {
  .notebook-plate-row {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.notebook-plate-row--three {
  grid-template-columns: 1fr;
  gap: 1rem 1.15rem;
}

@media (min-width: 520px) {
  .notebook-plate-row--three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.notebook-plate-mosaic {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.05rem 1.15rem;
  margin: 2rem 0 2.5rem;
}

@media (min-width: 540px) {
  .notebook-plate-mosaic {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.notebook-plate--mosaic {
  margin: 0;
}

.notebook-plate--mosaic .notebook-plate__frame {
  max-width: none;
  transform: rotate(-0.2deg);
}

.notebook-plate-mosaic .notebook-plate:nth-child(even) .notebook-plate__frame {
  transform: rotate(0.25deg);
}

.notebook-plate--mosaic .notebook-plate__cap {
  font-size: 0.6rem;
  letter-spacing: 0.11em;
  line-height: 1.35;
}

.notebook-plate--typesheet .notebook-plate__frame {
  max-width: none;
}

.notebook-plate--small .notebook-plate__frame {
  max-width: none;
  padding: 0.4rem 0.4rem 0.75rem;
  transform: rotate(-0.25deg);
}

.notebook-plate-row > figure:nth-child(even) .notebook-plate__frame {
  transform: rotate(0.3deg);
}

.notebook-plate--small .notebook-plate__cap {
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  line-height: 1.35;
}

/* Image grids */
.section--gallery {
  border-top: 1px solid var(--line);
  padding-top: 3rem;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.media-grid__cell {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 2px;
  overflow: hidden;
  background: var(--bg-card);
}

.media-grid__cell img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.media-grid__cell:hover img {
  transform: scale(1.04);
}

.media-grid__trigger {
  display: block;
  width: 100%;
  padding: 0;
  margin: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
  font: inherit;
  color: inherit;
}

.lightbox {
  position: relative;
  width: min(96vw, 1200px);
  max-width: none;
  max-height: none;
  height: min(92vh, 900px);
  padding: 0;
  margin: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-raised);
  box-shadow: var(--shadow);
  overflow: visible;
}

.lightbox::backdrop {
  background: rgba(7, 7, 8, 0.92);
}

.lightbox__stage {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 3rem 4.5rem 3.5rem;
}

.lightbox__image {
  max-width: 100%;
  max-height: calc(92vh - 7rem);
  width: auto;
  height: auto;
  object-fit: contain;
}

.lightbox__close,
.lightbox__nav {
  position: absolute;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(20, 21, 28, 0.92);
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.lightbox__close:hover,
.lightbox__nav:hover {
  color: var(--gold);
  border-color: rgba(198, 162, 74, 0.45);
}

.lightbox__close {
  top: 0.75rem;
  right: 0.75rem;
  font-size: 1.5rem;
}

.lightbox__nav {
  top: 50%;
  transform: translateY(-50%);
}

.lightbox__nav--prev {
  left: 0.75rem;
}

.lightbox__nav--next {
  right: 0.75rem;
}

.lightbox__counter {
  position: absolute;
  left: 50%;
  bottom: 0.85rem;
  transform: translateX(-50%);
  margin: 0;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

@media (max-width: 599px) {
  .lightbox__stage {
    padding: 3rem 1rem 3.5rem;
  }

  .lightbox__nav {
    width: 2.25rem;
    height: 2.25rem;
    font-size: 1.35rem;
  }

  .lightbox__nav--prev {
    left: 0.35rem;
  }

  .lightbox__nav--next {
    right: 0.35rem;
  }
}

/* Blog index */
.blog-index {
  list-style: none;
  margin: 0;
  padding: 0;
}

.blog-index__item {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--line);
}

.blog-index__link {
  font-family: var(--font-display);
  font-size: 1rem;
  line-height: 1.35;
  color: var(--text);
  text-decoration: none;
  border: 0;
}

.blog-index__link:hover {
  color: var(--gold);
}

.blog-index__date {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.books-other {
  margin-top: 3.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--line);
}

.books-other__title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin: 0 0 0.75rem;
  letter-spacing: 0.05em;
}

.books-other__meta {
  color: var(--gold-dim);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 1rem;
}

.about-layout {
  display: grid;
  gap: 2rem;
  align-items: start;
}

@media (min-width: 720px) {
  .about-layout {
    grid-template-columns: min(280px, 36%) 1fr;
    gap: 2.5rem;
  }
}

.about-layout__portrait {
  width: 100%;
  max-width: 280px;
  margin: 0 auto;
  border-radius: 2px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
