/* ── Reset & base ───────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Georgia, 'Times New Roman', serif;
  background: #f7f5f2;
  color: #222;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: #222;
}

/* ── Navigation ─────────────────────────────────────────── */
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 48px;
  border-bottom: 1px solid #e0ddd8;
}

.logo {
  font-size: 18px;
  font-weight: bold;
  letter-spacing: 0.02em;
}

.logo a {
  text-decoration: none;
  color: #222;
}

.nav nav a {
  margin-left: 24px;
  text-decoration: none;
  font-size: 15px;
  color: #555;
  transition: color 0.15s;
}

.nav nav a:hover {
  color: #222;
  text-decoration: underline;
}

/* ── Hero (homepage) ────────────────────────────────────── */
.hero {
  flex: 1;
  max-width: 800px;
  margin: 80px auto 40px;
  text-align: center;
  padding: 0 24px;
}

.ascii {
  font-family: 'Courier New', Courier, monospace;
  font-size: 14px;
  line-height: 1.3;
  margin-bottom: 32px;
  color: #555;
  display: inline-block;
}

h1 {
  font-size: 48px;
  margin: 0 0 12px;
  font-weight: normal;
  letter-spacing: -0.01em;
}

.tagline {
  font-size: 18px;
  font-style: italic;
  color: #555;
  margin-bottom: 20px;
}

.intro {
  font-size: 17px;
  line-height: 1.7;
  color: #444;
  max-width: 560px;
  margin: 0 auto;
}

/* ── Content pages (about, projects, resume) ────────────── */
.content {
  flex: 1;
  max-width: 720px;
  margin: 60px auto;
  padding: 0 24px;
}

.content h1 {
  font-size: 36px;
  margin-bottom: 24px;
  text-align: left;
}

.content h2 {
  font-size: 22px;
  margin-top: 40px;
  margin-bottom: 10px;
  font-weight: normal;
  border-bottom: 1px solid #ddd;
  padding-bottom: 6px;
}

.content p {
  font-size: 16px;
  line-height: 1.75;
  color: #333;
}

.content ul {
  font-size: 16px;
  line-height: 1.9;
  color: #333;
  padding-left: 20px;
}

.section-intro {
  color: #666;
  font-style: italic;
  margin-top: -8px;
  margin-bottom: 36px;
}

/* ── Project cards ──────────────────────────────────────── */
.project {
  margin: 32px 0;
  padding: 24px 28px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #fff;
}

.project-img {
  display: block;
  width: calc(100% + 56px);
  margin: -24px -28px 20px;
  height: 200px;
  object-fit: cover;
  border-radius: 8px 8px 0 0;
}

.project-img-document {
  height: auto;
  object-fit: cover;
  object-position: top center;
  background: #fff;
}

.project-header {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.project-header h2 {
  font-size: 20px;
  margin: 0;
  border: none;
  padding: 0;
}

.project-tags {
  font-size: 13px;
  color: #888;
  font-family: 'Courier New', Courier, monospace;
}

.project p {
  margin: 8px 0;
}

.project-finding {
  color: #555;
  font-style: italic;
  font-size: 15px !important;
}

.project-link {
  display: inline-block;
  margin-top: 10px;
  margin-right: 16px;
  font-size: 14px;
  text-decoration: none;
  color: #444;
  border-bottom: 1px solid #aaa;
}

.project-link:hover {
  color: #000;
  border-bottom-color: #000;
}

/* ── Resume page (accordion layout) ─────────────────────── */

/* Page wrapper */
.resume-page {
  flex: 1;
  max-width: 760px;
  margin: 56px auto 80px;
  padding: 0 24px;
}

/* Title + controls row */
.resume-top-bar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 48px;
  border-bottom: 2px solid #222;
  padding-bottom: 16px;
}

.resume-title {
  font-size: 52px;
  font-weight: normal;
  letter-spacing: 0.12em;
  margin: 0;
  line-height: 1;
}

.resume-controls {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* PDF download link */
.resume-pdf-link {
  font-size: 13px;
  color: #666;
  text-decoration: none;
  border-bottom: 1px solid #bbb;
  padding-bottom: 1px;
  transition: color 0.15s, border-color 0.15s;
}

.resume-pdf-link:hover {
  color: #222;
  border-bottom-color: #222;
}

.resume-download {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid #ddd;
  text-align: center;
}

.resume-download-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border: 1px solid #1a1a1a;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  color: #1a1a1a;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.resume-download-link:hover {
  background: #1a1a1a;
  color: #f7f5f2;
}

/* Expand All / Collapse All button */
.toggle-all-btn {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 13px;
  color: #444;
  background: none;
  border: 1px solid #bbb;
  border-radius: 3px;
  padding: 5px 12px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.toggle-all-btn:hover {
  background: #222;
  color: #f7f5f2;
  border-color: #222;
}

/* Section block */
.resume-section {
  margin-bottom: 48px;
}

/* Section heading */
.section-heading {
  font-size: 11px;
  font-family: 'Courier New', Courier, monospace;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #888;
  font-weight: normal;
  margin: 0 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e0ddd8;
}

/* Individual accordion entry */
.entry {
  border-left: 3px solid #e0ddd8;
  margin-bottom: 4px;
  transition: border-color 0.15s;
}

.entry:hover {
  border-left-color: #aaa;
}

/* Trigger button (the always-visible row) */
.entry-trigger {
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  font-family: Georgia, 'Times New Roman', serif;
  text-align: left;
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  color: #222;
  transition: background 0.12s;
}

.entry-trigger:hover {
  background: rgba(0, 0, 0, 0.03);
}

.entry-trigger:focus-visible {
  outline: 2px solid #555;
  outline-offset: -2px;
}

/* Left side of trigger: title + meta */
.entry-left {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.entry-title {
  font-size: 16px;
  font-weight: normal;
  line-height: 1.3;
  color: #222;
  transition: color 0.15s;
}

.entry-trigger:hover .entry-title {
  color: #555;
}

.entry-meta {
  font-size: 13px;
  color: #888;
  font-style: italic;
}

/* Right side of trigger: date + expand icon */
.entry-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  padding-top: 2px;
}

.entry-date {
  font-size: 12px;
  font-family: 'Courier New', Courier, monospace;
  color: #999;
  white-space: nowrap;
}

.entry-icon {
  font-size: 18px;
  color: #aaa;
  display: inline-block;
  transition: transform 0.25s ease, color 0.15s;
  line-height: 1;
  width: 16px;
  text-align: center;
}

/* Rotate icon when open */
.entry-trigger[aria-expanded="true"] .entry-icon {
  transform: rotate(90deg);
  color: #555;
}

/* Collapsible body */
.entry-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

.entry-body p {
  font-size: 15px;
  line-height: 1.75;
  color: #444;
  margin: 0 0 10px;
  padding: 0 16px;
}

.entry-body p:first-child {
  padding-top: 4px;
}

.entry-body p:last-child {
  padding-bottom: 14px;
  margin-bottom: 0;
}

/* Bullet list inside entry body */
.entry-body ul {
  font-size: 15px;
  line-height: 1.75;
  color: #444;
  margin: 4px 0 14px;
  padding: 0 16px 0 38px;
}

.entry-body ul li {
  margin-bottom: 6px;
}

.entry-body ul li:last-child {
  margin-bottom: 0;
}

/* Tool tags line inside entry body */
.entry-tools {
  font-size: 12px !important;
  font-family: 'Courier New', Courier, monospace;
  color: #999 !important;
  margin-top: 6px !important;
}

/* Placeholder label (shown in unfilled entries) */
.placeholder-label {
  font-size: 11px;
  font-family: 'Courier New', Courier, monospace;
  color: #bbb;
  font-style: normal;
  margin-left: 6px;
}

/* Skills grid inside accordion */
.skills-accordion-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 20px;
  padding: 8px 16px 18px;
}

.skill-col h3 {
  font-size: 12px;
  font-family: 'Courier New', Courier, monospace;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #888;
  font-weight: normal;
  margin: 0 0 8px;
}

.skill-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.skill-col ul li {
  font-size: 14px;
  color: #444;
  line-height: 1.8;
}

/* Legacy skills-grid (used on other pages if any) */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  margin-top: 12px;
}

.skill-group h3 {
  font-size: 15px;
  margin: 0 0 6px;
  font-weight: bold;
  color: #444;
}

.skill-group ul {
  margin: 0;
  padding-left: 18px;
}

/* ── Footer ─────────────────────────────────────────────── */
.footer {
  text-align: center;
  padding: 36px 20px;
  border-top: 1px solid #e0ddd8;
  font-size: 14px;
  color: #888;
}

.footer a {
  margin: 0 12px;
  text-decoration: none;
  color: #666;
  transition: color 0.15s;
}

.footer a:hover {
  color: #222;
}

/* ── Testimonials (slider) ───────────────────────────────── */
.testimonial-slider {
  margin: 20px 0 36px;
  position: relative;
  overflow: hidden;
}

.testimonial-track {
  display: flex;
  transition: transform 0.4s ease;
}

.testimonial-track .testimonial {
  min-width: 100%;
  box-sizing: border-box;
}

.testimonial-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 16px;
}

.testimonial-btn {
  background: none;
  border: 1px solid #ccc;
  border-radius: 3px;
  font-size: 22px;
  color: #666;
  cursor: pointer;
  padding: 2px 12px 4px;
  line-height: 1;
  font-family: Georgia, 'Times New Roman', serif;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.testimonial-btn:hover {
  background: #222;
  color: #f7f5f2;
  border-color: #222;
}

.testimonial-dots {
  display: flex;
  gap: 8px;
  align-items: center;
}

.testimonial-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ccc;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background 0.2s;
}

.testimonial-dot.active {
  background: #444;
}

.testimonial {
  background: #fff;
  border: 1px solid #e0ddd8;
  border-radius: 8px;
  padding: 20px 22px;
}

.testimonial-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 4px;
}

.testimonial-name {
  font-size: 15px;
  font-weight: bold;
  color: #222;
}

.testimonial-date {
  font-size: 12px;
  font-family: 'Courier New', Courier, monospace;
  color: #aaa;
}

.testimonial-stars {
  color: #c8a96e;
  font-size: 13px;
  letter-spacing: 1px;
  margin-bottom: 10px;
}

.testimonial-text {
  font-size: 14px;
  line-height: 1.75;
  color: #444;
  margin: 0;
}

/* ── Photo gallery ───────────────────────────────────────── */
.tennis-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
  margin: 20px 0 36px;
}

.tennis-gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 4px;
  cursor: pointer;
  filter: brightness(0.97);
  transition: filter 0.2s, transform 0.2s;
  display: block;
}

.tennis-gallery img:hover {
  filter: brightness(1.04);
  transform: scale(1.02);
}

/* ── Lightbox ────────────────────────────────────────────── */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.lightbox[hidden] {
  display: none;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 28px;
  background: none;
  border: none;
  color: #fff;
  font-size: 36px;
  cursor: pointer;
  line-height: 1;
  opacity: 0.7;
  transition: opacity 0.15s;
}

.lightbox-close:hover { opacity: 1; }

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #fff;
  font-size: 52px;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.15s;
  line-height: 1;
  padding: 0 16px;
  user-select: none;
}

.lightbox-prev { left: 8px; }
.lightbox-next { right: 8px; }
.lightbox-prev:hover,
.lightbox-next:hover { opacity: 1; }

/* ── Tennis coaching cards ──────────────────────────────── */
.coaching-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin: 20px 0 36px;
}

.coaching-card {
  padding: 20px 22px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #fff;
}

.coaching-card h3 {
  font-size: 16px;
  margin: 0 0 8px;
  font-weight: bold;
}

.coaching-card p {
  font-size: 15px;
  margin: 0;
  color: #444;
}

/* ── About page (scoped — does not affect other pages) ──── */
.about-page {
  flex: 1;
  position: relative;
  max-width: 1040px;
  margin: 56px auto 96px;
  padding: 0 32px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Faint grid backdrop — fits the urban data theme */
.about-page::before {
  content: '';
  position: absolute;
  inset: -40px 0 0 0;
  background-image:
    linear-gradient(to right, rgba(40, 40, 40, 0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(40, 40, 40, 0.06) 1px, transparent 1px);
  background-size: 44px 44px;
  pointer-events: none;
  z-index: 0;
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.0) 75%);
          mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.0) 75%);
}

.about-page > * {
  position: relative;
  z-index: 1;
}

/* Hero — two columns */
.about-hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 56px;
  align-items: center;
  min-height: 360px;
  margin-bottom: 96px;
}

.about-hero-text {
  max-width: 540px;
}

.about-eyebrow {
  font-family: 'Courier New', Courier, monospace;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #888;
  margin: 0 0 18px;
}

.about-headline {
  font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
  font-size: 56px;
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.015em;
  color: #1a1a1a;
  margin: 0 0 22px;
}

.about-lede {
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 22px;
  line-height: 1.5;
  font-weight: 400;
  color: #2a2a2a;
  margin: 0;
}

.about-hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.about-graphic {
  width: 100%;
  max-width: 360px;
  height: auto;
  opacity: 0.92;
}

/* Sections */
.about-section {
  max-width: 680px;
  margin: 0 auto 72px;
}

.about-section:last-of-type {
  margin-bottom: 0;
}

.about-section-label {
  font-family: 'Courier New', Courier, monospace;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #8a8a8a;
  font-weight: normal;
  margin: 0 0 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e0ddd8;
}

.about-section p {
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.72;
  color: #2f2f2f;
  margin: 0 0 18px;
}

.about-section a:not(.about-cta) {
  color: #1a1a1a;
  text-decoration: none;
  border-bottom: 1px solid #aaa;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.about-section a:not(.about-cta):hover {
  color: #000;
  border-bottom-color: #000;
}

/* Interest tags / chips */
.about-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.about-tag {
  display: inline-block;
  padding: 7px 16px;
  border: 1px solid #cfcac1;
  border-radius: 999px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: #444;
  background: rgba(255, 255, 255, 0.55);
  transition: transform 0.2s ease, background 0.2s ease,
              border-color 0.2s ease, color 0.2s ease,
              box-shadow 0.2s ease;
  cursor: default;
}

.about-tag:hover {
  transform: translateY(-2px);
  background: #1a1a1a;
  color: #f7f5f2;
  border-color: #1a1a1a;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

/* CTA buttons */
.about-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  padding: 10px 20px;
  border: 1px solid #1a1a1a;
  border-radius: 4px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #1a1a1a;
  background: transparent;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.about-cta .cta-arrow {
  transition: transform 0.2s ease;
  display: inline-block;
}

.about-cta:hover {
  background: #1a1a1a;
  color: #f7f5f2;
}

.about-cta:hover .cta-arrow {
  transform: translateX(3px);
}

.about-medium-cta {
  margin-bottom: 36px;
}

.about-hint {
  max-width: 680px;
  margin: 0 auto;
  padding-top: 18px;
  border-top: 1px solid #e0ddd8;
}

.about-hint p {
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 13px;
  line-height: 1.6;
  color: #777;
  margin: 0;
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* About — responsive */
@media (max-width: 820px) {
  .about-hero {
    grid-template-columns: 1fr;
    gap: 32px;
    margin-bottom: 64px;
    min-height: 0;
  }

  .about-hero-visual {
    order: -1;
  }

  .about-graphic {
    max-width: 240px;
  }

  .about-headline {
    font-size: 42px;
  }

  .about-lede {
    font-size: 19px;
  }
}

@media (max-width: 480px) {
  .about-page {
    padding: 0 22px;
    margin-top: 36px;
  }

  .about-headline {
    font-size: 34px;
  }

  .about-lede {
    font-size: 17px;
  }

  .about-section p {
    font-size: 16px;
  }
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 600px) {
  .nav {
    padding: 16px 20px;
  }

  .nav nav a {
    margin-left: 14px;
  }

  h1 {
    font-size: 34px;
  }

  .hero {
    margin-top: 48px;
  }

  /* Resume accordion: mobile */
  .resume-top-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 36px;
  }

  .resume-title {
    font-size: 38px;
  }

  .entry-trigger {
    flex-direction: column;
    gap: 6px;
  }

  .entry-right {
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 10px;
  }

  .entry-date {
    font-size: 11px;
  }
}

/* ── Book-themed homepage (scoped to .book-page) ─────────── */
.book-page {
  flex: 1;
  padding: 56px 24px 80px;
  background:
    radial-gradient(circle at 18% 12%, rgba(180, 140, 80, 0.07), transparent 45%),
    radial-gradient(circle at 82% 78%, rgba(180, 140, 80, 0.05), transparent 50%);
}

.book {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
  padding: 78px 84px 64px;
  background-color: #f4ecd8;
  background-image:
    radial-gradient(rgba(120, 90, 50, 0.05) 1px, transparent 1px),
    radial-gradient(rgba(120, 90, 50, 0.04) 1px, transparent 1px);
  background-size: 3px 3px, 7px 7px;
  background-position: 0 0, 2px 1px;
  border: 1px solid #d6c9a8;
  border-radius: 2px;
  color: #2a2118;
  font-family: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.55),
    inset 0 0 60px rgba(120, 80, 30, 0.08),
    0 1px 2px rgba(60, 40, 10, 0.06),
    0 14px 38px rgba(60, 40, 10, 0.14);
}

/* Spine shadow on the left edge */
.book::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 16px;
  background: linear-gradient(
    to right,
    rgba(60, 40, 10, 0.22),
    rgba(60, 40, 10, 0.08) 55%,
    transparent
  );
  border-radius: 2px 0 0 2px;
  pointer-events: none;
}

/* Faint right-edge curl */
.book::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  width: 10px;
  background: linear-gradient(
    to left,
    rgba(60, 40, 10, 0.07),
    transparent
  );
  border-radius: 0 2px 2px 0;
  pointer-events: none;
}

/* Decorative corner ornaments */
.book-corner {
  position: absolute;
  font-size: 14px;
  color: #b89968;
  opacity: 0.55;
  pointer-events: none;
}

.book-corner-tl { top: 22px; left: 28px; }
.book-corner-tr { top: 22px; right: 28px; }
.book-corner-bl { bottom: 22px; left: 28px; }
.book-corner-br { bottom: 22px; right: 28px; }

/* Title page */
.book-titlepage {
  text-align: center;
  padding: 16px 0 28px;
}

.book-edition {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-size: 13px;
  letter-spacing: 0.22em;
  color: #9a8154;
  margin: 0 0 36px;
  text-transform: uppercase;
}

.book-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 92px;
  font-weight: 500;
  letter-spacing: 0.04em;
  margin: 0 0 6px;
  color: #1d1812;
  line-height: 1;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
}

.book-subtitle {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-size: 22px;
  color: #5a4a32;
  margin: 0 0 30px;
  font-weight: 400;
  letter-spacing: 0.02em;
}

.book-flourish {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 0 auto 30px;
  max-width: 320px;
}

.book-flourish-rule {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, #b89968, transparent);
}

.book-flourish-mark {
  font-size: 14px;
  color: #b89968;
  letter-spacing: 0.08em;
  flex-shrink: 0;
}

.book-author {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 15px;
  letter-spacing: 0.32em;
  color: #2a2118;
  margin: 0 0 6px;
  text-transform: uppercase;
  font-weight: 500;
}

.book-imprint {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-size: 14px;
  color: #8a7656;
  margin: 0;
  letter-spacing: 0.06em;
}

/* Decorative rule */
.book-rule {
  border: none;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    #b89968 18%,
    #b89968 82%,
    transparent
  );
  margin: 36px 0;
}

/* Epigraph */
.book-epigraph {
  text-align: center;
  max-width: 480px;
  margin: 0 auto;
  padding: 4px 0;
}

.book-epigraph-text {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-size: 19px;
  color: #4a3e2a;
  line-height: 1.5;
  margin: 0 0 10px;
}

.book-epigraph-attr {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 13px;
  color: #8a7656;
  letter-spacing: 0.05em;
  margin: 0;
}

/* Section labels */
.book-label {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-size: 13px;
  letter-spacing: 0.18em;
  color: #9a8154;
  text-align: center;
  margin: 0 0 22px;
  text-transform: uppercase;
}

/* Dust jacket blurb */
.book-jacket {
  max-width: 560px;
  margin: 0 auto;
}

.book-blurb {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 19px;
  line-height: 1.7;
  color: #2f2618;
  text-align: justify;
  hyphens: auto;
  margin: 0;
}

.book-blurb::after {
  content: '';
  display: block;
  clear: both;
}

/* Drop cap */
.book-dropcap {
  float: left;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 76px;
  line-height: 0.85;
  padding: 8px 12px 0 0;
  color: #7a4818;
  font-weight: 600;
  margin-top: 4px;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
}

/* Ornamental divider */
.book-divider {
  text-align: center;
  margin: 48px 0;
  font-size: 22px;
  color: #b89968;
  letter-spacing: 0.4em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.book-divider::before,
.book-divider::after {
  content: '';
  width: 90px;
  height: 1px;
  background: linear-gradient(to right, transparent, #c8af80);
}

.book-divider::after {
  background: linear-gradient(to left, transparent, #c8af80);
}

.book-divider span {
  display: inline-block;
  transform: translateY(-2px);
}

/* Table of Contents */
.book-toc {
  margin: 0 auto;
}

.book-toc-heading {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 34px;
  font-weight: 500;
  text-align: center;
  margin: 0 0 36px;
  color: #1d1812;
  letter-spacing: 0.04em;
  font-style: italic;
}

.book-toc-heading::after {
  content: '';
  display: block;
  width: 64px;
  height: 1px;
  background: #b89968;
  margin: 14px auto 0;
}

.book-chapters {
  list-style: none;
  padding: 0;
  margin: 0;
}

.book-chapters li {
  margin: 0;
  padding: 0;
}

.book-chapter {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 22px;
  padding: 20px 10px;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid rgba(184, 153, 104, 0.28);
  transition: background 0.25s ease;
}

.book-chapters li:last-child .book-chapter {
  border-bottom: none;
}

.book-chapter:hover {
  background: rgba(184, 153, 104, 0.10);
}

.book-chapter:hover .book-numeral {
  color: #7a4818;
}

.book-chapter:hover .book-chapter-title {
  color: #7a4818;
}

.book-numeral {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 36px;
  font-style: italic;
  font-weight: 500;
  color: #b89968;
  text-align: right;
  padding-top: 0;
  line-height: 1;
  transition: color 0.25s ease;
}

.book-row-main {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.book-row-line {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}

.book-chapter-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 24px;
  font-weight: 500;
  color: #1d1812;
  letter-spacing: 0.01em;
  line-height: 1.2;
  flex-shrink: 0;
  transition: color 0.25s ease;
}

.book-leader {
  flex: 1 1 auto;
  border-bottom: 2px dotted #b89968;
  height: 0;
  margin: 0 4px;
  transform: translateY(-4px);
  min-width: 28px;
}

.book-pageno {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-size: 17px;
  color: #6a5a3e;
  letter-spacing: 0.06em;
  flex-shrink: 0;
}

.book-chapter-desc {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-size: 16px;
  color: #6a5a3e;
  line-height: 1.45;
}

.book-ext-mark {
  font-size: 14px;
  color: #b89968;
  margin-left: 4px;
  font-style: normal;
  font-weight: 400;
  vertical-align: 2px;
}

/* Colophon */
.book-colophon {
  text-align: center;
  margin-top: 12px;
}

.book-colophon-mark {
  font-size: 18px;
  color: #b89968;
  margin: 0 0 14px;
  letter-spacing: 0.4em;
}

.book-colophon-text {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-size: 14px;
  color: #8a7656;
  line-height: 1.7;
  max-width: 440px;
  margin: 0 auto;
}

/* Single page-number tag in lower corner */
.book-pagenum-corner {
  position: absolute;
  bottom: 26px;
  right: 36px;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-size: 13px;
  color: #9a8154;
  letter-spacing: 0.18em;
}

.books-read-body {
  background: #efe8d8;
}

.books-read-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.books-read-book {
  width: min(760px, 100%);
}

.books-home-link {
  position: absolute;
  top: 28px;
  left: 34px;
  z-index: 4;
  color: #8a7656;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 24px;
  line-height: 1;
  text-decoration: none;
  transition: color 0.25s ease, transform 0.25s ease;
}

.books-home-link:hover,
.books-home-link:focus-visible {
  color: #2a2118;
  transform: translateX(-3px);
}

.books-home-link:focus-visible {
  outline: 1px solid #8a7656;
  outline-offset: 6px;
}

.books-read-title {
  font-size: clamp(44px, 7.5vw, 82px);
  letter-spacing: 0.01em;
  line-height: 1.05;
}

.books-read-epigraph {
  max-width: 520px;
  margin: 0 auto;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 20px;
  font-style: italic;
  line-height: 1.45;
  color: #5a4a32;
  text-align: center;
}

.books-read-shelf {
  max-width: 580px;
  margin: 0 auto;
}

.books-read-list {
  list-style: decimal-leading-zero;
  margin: 0;
  padding-left: 44px;
}

.books-read-list li {
  padding: 14px 0 13px 10px;
  border-bottom: 1px solid rgba(184, 153, 104, 0.26);
  font-family: 'Cormorant Garamond', Georgia, serif;
  color: #b89968;
}

.books-read-list li:last-child {
  border-bottom: none;
}

.books-read-name {
  display: block;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 21px;
  line-height: 1.25;
  color: #4a3e2a;
}

.books-read-note {
  display: block;
  margin-top: 4px;
  font-size: 15px;
  font-style: italic;
  line-height: 1.35;
  color: #8a7656;
}

/* Book-page responsive */
@media (max-width: 760px) {
  .book {
    padding: 56px 38px 48px;
  }
  .book::before {
    width: 10px;
  }
  .book-title {
    font-size: 68px;
  }
  .book-subtitle {
    font-size: 19px;
  }
  .book-blurb {
    font-size: 17px;
  }
  .book-chapter {
    grid-template-columns: 44px 1fr;
    gap: 16px;
    padding: 16px 6px;
  }
  .book-numeral {
    font-size: 30px;
  }
  .book-chapter-title {
    font-size: 20px;
  }
  .book-chapter-desc {
    font-size: 15px;
  }
  .book-divider::before,
  .book-divider::after {
    width: 50px;
  }
  .book-corner {
    font-size: 12px;
  }
  .book-corner-tl, .book-corner-tr,
  .book-corner-bl, .book-corner-br {
    display: none;
  }
}

@media (max-width: 480px) {
  .book-page {
    padding: 32px 14px 56px;
  }
  .book {
    padding: 42px 26px 36px;
  }
  .book-title {
    font-size: 52px;
  }
  .book-subtitle {
    font-size: 16px;
  }
  .book-edition {
    font-size: 11px;
  }
  .book-row-line {
    flex-wrap: wrap;
    gap: 6px;
  }
  .book-leader {
    display: none;
  }
  .book-pageno {
    font-size: 15px;
  }
  .book-pagenum-corner {
    display: none;
  }
}

/* ── Book — Animations, ornaments, grain, glow ──────────── */

/* Soft fade-in on load */
.book-page {
  opacity: 0;
  transform: translateY(10px);
  animation: book-fade-in 1100ms cubic-bezier(0.16, 1, 0.3, 1) 80ms forwards;
}

@keyframes book-fade-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Slow paper-grain shimmer overlay */
.book {
  isolation: isolate; /* contain z-index: -1 inside the book */
}

.book-grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  border-radius: 2px;
  opacity: 0.42;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.32 0 0 0 0 0.22 0 0 0 0 0.10 0 0 0 0.45 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  background-size: 240px 240px;
  animation: grain-drift 11s steps(60) infinite;
}

@keyframes grain-drift {
  0%   { background-position:    0px    0px; }
  16%  { background-position:   -7px    4px; }
  33%  { background-position:    5px   -8px; }
  50%  { background-position:   -3px    7px; }
  66%  { background-position:    8px   -2px; }
  83%  { background-position:   -6px   -5px; }
  100% { background-position:    0px    0px; }
}

/* Cursor-illumination overlay (a candle on the page) */
.book-cursor-light {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 4;
  opacity: 0;
  transition: opacity 700ms ease;
  background: radial-gradient(
    320px circle at var(--mx, 50%) var(--my, 50%),
    rgba(255, 220, 150, 0.22),
    rgba(255, 220, 150, 0.08) 35%,
    transparent 70%
  );
  mix-blend-mode: soft-light;
}

.book-cursor-light.is-active {
  opacity: 1;
}

/* ── Decorative ornaments (SVG) ─────────────────────────── */

.book-frontispiece {
  display: flex;
  justify-content: center;
  margin: -8px auto 22px;
  color: #b89968;
  will-change: transform;
}

.book-frontispiece svg {
  width: 72px;
  height: 72px;
  opacity: 0.85;
  animation: compass-breathe 9s ease-in-out infinite;
}

@keyframes compass-breathe {
  0%, 100% { transform: rotate(0); opacity: 0.82; }
  50%      { transform: rotate(2deg); opacity: 0.95; }
}

.book-monogram {
  display: flex;
  justify-content: center;
  margin: 22px auto 0;
  color: #7a4818;
  will-change: transform;
}

.book-monogram svg {
  width: 46px;
  height: 46px;
  opacity: 0.78;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.book-monogram:hover svg {
  opacity: 1;
  transform: rotate(-3deg) scale(1.04);
}

/* Tiny archival stamp, top-right of the book */
.book-stamp {
  position: absolute;
  top: 32px;
  right: 36px;
  width: 96px;
  height: 96px;
  z-index: 3;
  color: #8a3a1c;
  opacity: 0.55;
  transform: rotate(-7deg);
  transform-origin: center;
  pointer-events: none;
  transition: opacity 0.6s ease, transform 0.6s ease;
  filter: drop-shadow(0 1px 0 rgba(255,255,255,0.4));
}

.book:hover .book-stamp {
  opacity: 0.78;
  transform: rotate(-5deg) scale(1.02);
}

.book-stamp svg {
  width: 100%;
  height: 100%;
}

/* Chapter marker (icon + numeral stacked) */
.book-chapter-marker {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  padding-top: 2px;
}

.book-chapter-icon {
  display: block;
  width: 36px;
  height: 36px;
  color: #b89968;
  opacity: 0.85;
  transition: color 0.5s ease, opacity 0.5s ease, transform 0.5s ease;
}

.book-chapter-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.book-chapter-icon-faded {
  opacity: 0.65;
}

.book-chapter:hover .book-chapter-icon {
  color: #7a4818;
  opacity: 1;
  transform: scale(1.08) rotate(-2deg);
}

/* ── Slow hover glow on chapter titles ──────────────────── */
.book-chapter-title {
  transition: color 0.6s ease, text-shadow 0.8s ease, letter-spacing 0.6s ease;
}

.book-chapter:hover .book-chapter-title {
  color: #5e3210;
  text-shadow:
    0 0 14px rgba(184, 153, 104, 0.55),
    0 0 28px rgba(184, 153, 104, 0.32);
  letter-spacing: 0.02em;
}

.book-chapter-desc {
  transition: color 0.5s ease;
}

.book-chapter:hover .book-chapter-desc {
  color: #4a3a1e;
}

/* Ornamental hover glow on TOC heading too */
.book-toc-heading,
.book-title {
  transition: text-shadow 0.9s ease, color 0.5s ease;
}

.book-toc-heading:hover {
  text-shadow:
    0 0 16px rgba(184, 153, 104, 0.45),
    0 0 32px rgba(184, 153, 104, 0.22);
}

.book-title:hover {
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.5),
    0 0 22px rgba(184, 153, 104, 0.4),
    0 0 44px rgba(184, 153, 104, 0.22);
}

/* ── Parallax on cover (transforms set by JS) ───────────── */
[data-parallax-depth] {
  transition: transform 250ms cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: transform;
}

/* ── Page-turn transition between chapters ──────────────── */
.book {
  transform-style: preserve-3d;
  transform-origin: left center;
  transition: transform 380ms cubic-bezier(0.55, 0, 0.65, 0.4),
              opacity 380ms ease,
              filter 380ms ease;
}

.book.is-turning {
  transform: perspective(1600px) rotateY(-22deg) translateX(-14px);
  opacity: 0;
  filter: blur(1.5px);
}

/* Hover-leaning idle: the book breathes faintly */
.book {
  animation: book-settle 14s ease-in-out infinite;
}

@keyframes book-settle {
  0%, 100% {
    box-shadow:
      inset 0 0 0 1px rgba(255, 255, 255, 0.55),
      inset 0 0 60px rgba(120, 80, 30, 0.08),
      0 1px 2px rgba(60, 40, 10, 0.06),
      0 14px 38px rgba(60, 40, 10, 0.14);
  }
  50% {
    box-shadow:
      inset 0 0 0 1px rgba(255, 255, 255, 0.55),
      inset 0 0 80px rgba(120, 80, 30, 0.10),
      0 1px 2px rgba(60, 40, 10, 0.06),
      0 18px 46px rgba(60, 40, 10, 0.18);
  }
}

/* ── Reduced motion ─────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .book-page,
  .book,
  .book-grain,
  .book-frontispiece svg,
  [data-parallax-depth] {
    animation: none !important;
    transition: none !important;
  }
  .book-page {
    opacity: 1;
    transform: none;
  }
  .book.is-turning {
    transform: none;
    opacity: 1;
    filter: none;
  }
  .book-cursor-light {
    display: none;
  }
}

/* Smaller stamp + frontispiece on mobile */
@media (max-width: 760px) {
  .book-stamp {
    width: 72px;
    height: 72px;
    top: 22px;
    right: 22px;
  }
  .book-frontispiece svg {
    width: 56px;
    height: 56px;
  }
  .book-chapter-icon {
    width: 28px;
    height: 28px;
  }
  .book-monogram svg {
    width: 38px;
    height: 38px;
  }
}

@media (max-width: 480px) {
  .book-stamp {
    width: 60px;
    height: 60px;
    top: 14px;
    right: 14px;
    opacity: 0.42;
  }
  .book-cursor-light {
    display: none; /* skip on touch / mobile */
  }
}

/* ────────────────────────────────────────────────────────── */
/* ── Threshold homepage ─────────────────────────────────── */
/* ────────────────────────────────────────────────────────── */

body.is-threshold {
  /* ── Dark palette (softer twilight, shown at scroll = 0) ── */
  --th-bg-dark:        #30343d;   /* lifted twilight, less inky */
  --th-bg-deep-dark:   #242830;
  --th-bg-lift-dark:   #3b404a;
  --th-text-dark:      #dcd5c5;
  --th-text-soft-dark: #cfc8b6;
  --th-muted-dark:     #9aa0ae;
  --th-quiet-dark:     #6a707d;
  --th-line-dark:      #4d5460;

  /* ── Light palette (warm parchment, shown at scroll = 1) ── */
  --th-bg-light:        #ded8c8;   /* warm vellum rather than paper-white */
  --th-bg-deep-light:   #cbc4b0;
  --th-bg-lift-light:   #e9e3d2;
  --th-text-light:      #333740;   /* softer ink, not jet-black */
  --th-text-soft-light: #424752;
  --th-muted-light:     #6c707c;
  --th-quiet-light:     #8c8f98;
  --th-line-light:      #b4ae9c;

  /* ── Interpolated palette driven by scroll ──────────────── */
  /* Background-class tokens are static; the daylight layer below fades in. */
  --th-bg:        var(--th-bg-dark);
  --th-bg-deep:   var(--th-bg-deep-dark);
  --th-bg-lift:   var(--th-bg-lift-dark);
  --th-line:      color-mix(in srgb, var(--th-line-dark), var(--th-line-light) calc(var(--th-scroll-text, 0) * 100%));
  /* Text-class tokens use their own eased value so contrast changes
     gradually instead of flipping late in the scroll. */
  --th-text:      color-mix(in srgb, var(--th-text-dark),      var(--th-text-light)      calc(var(--th-scroll-text, 0) * 100%));
  --th-text-soft: color-mix(in srgb, var(--th-text-soft-dark), var(--th-text-soft-light) calc(var(--th-scroll-text, 0) * 100%));
  --th-muted:     color-mix(in srgb, var(--th-muted-dark),     var(--th-muted-light)     calc(var(--th-scroll-text, 0) * 100%));
  --th-quiet:     color-mix(in srgb, var(--th-quiet-dark),     var(--th-quiet-light)     calc(var(--th-scroll-text, 0) * 100%));

  --th-bronze:    #a88a64;        /* accent reads in either theme */
  --th-slate:     #5a6b7a;

  background: var(--th-bg);
  color: var(--th-text);
  font-family: 'Newsreader', Georgia, 'Times New Roman', serif;
  position: relative;
  display: block;
  min-height: 100vh;
  overflow-x: hidden;
}

body.is-threshold::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: calc(var(--th-scroll-glow, 0) * 0.94);
  background:
    radial-gradient(ellipse 80% 54% at 50% 36%,
      rgba(238, 231, 212, 0.70) 0%,
      rgba(226, 219, 201, 0.40) 44%,
      transparent 74%),
    linear-gradient(
      to bottom,
      var(--th-bg-lift-light) 0%,
      var(--th-bg-light) 52%,
      var(--th-bg-deep-light) 100%);
  transform: translateZ(0);
  will-change: opacity;
}

/* Hide the top nav on this page — discovery, not navigation */
body.is-threshold > .nav {
  display: none;
}

/* ── Atmosphere (fixed, behind everything) ──────────────── */
body.is-threshold .threshold-atmosphere {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  /* Fades with scroll — the nocturnal stack (haze, luminance, paper,
     grain, scan, distant lights, cursor glow) recedes as the daylight
     layer takes over. */
  opacity: calc(0.92 - var(--th-scroll-glow, 0) * 0.70);
  contain: paint;
  transform: translateZ(0);
  will-change: opacity;
}

/* Soft radial twilight haze
   Upper bloom dialed back substantially and pushed downward so the
   top portion of the screen reads as quiet sky rather than diffuse glare. */
body.is-threshold .threshold-haze {
  position: absolute;
  inset: -10%;
  background:
    radial-gradient(ellipse 70% 50% at 50% 52%,
      rgba(60, 72, 90, 0.16) 0%,
      rgba(46, 54, 68, 0.08) 32%,
      transparent 62%),
    radial-gradient(ellipse 100% 80% at 50% 110%,
      rgba(20, 24, 31, 0.42) 0%,
      transparent 55%),
    linear-gradient(
      to bottom,
      var(--th-bg-deep) 0%,
      var(--th-bg) 42%,
      var(--th-bg) 70%,
      var(--th-bg-deep) 100%);
  animation: th-haze-drift 28s ease-in-out infinite;
}

@keyframes th-haze-drift {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50%      { transform: translate3d(-8px, -6px, 0); }
}

/* Drifting contour veil (SVG) */
body.is-threshold .threshold-veil {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  color: rgba(190, 200, 215, 0.20);
  animation: th-veil-drift 64s linear infinite;
  will-change: transform;
}

/* Distant points of illumination — each flickers on its own
   slow rhythm, like windows seen across a city at twilight */
body.is-threshold .threshold-veil .distant-light {
  animation: th-distant-flicker 7s ease-in-out infinite;
}
body.is-threshold .threshold-veil .distant-light:nth-of-type(1) {
  fill: rgba(218, 192, 152, 0.85);
  animation-duration: 7.4s;
  animation-delay: 0.3s;
}
body.is-threshold .threshold-veil .distant-light:nth-of-type(2) {
  fill: rgba(190, 205, 222, 0.7);
  animation-duration: 9.8s;
  animation-delay: 1.6s;
}
body.is-threshold .threshold-veil .distant-light:nth-of-type(3) {
  fill: rgba(200, 188, 158, 0.6);
  animation-duration: 11s;
  animation-delay: 2.4s;
}
body.is-threshold .threshold-veil .distant-light:nth-of-type(4) {
  fill: rgba(180, 198, 220, 0.75);
  animation-duration: 8.6s;
  animation-delay: 3.1s;
}
body.is-threshold .threshold-veil .distant-light:nth-of-type(5) {
  fill: rgba(196, 182, 152, 0.55);
  animation-duration: 12.2s;
  animation-delay: 0.9s;
}

@keyframes th-distant-flicker {
  0%, 100% { opacity: 0.42; }
  45%      { opacity: 0.95; }
  55%      { opacity: 0.95; }
}

@keyframes th-veil-drift {
  0%   { transform: translate3d(-12px, 0, 0); }
  50%  { transform: translate3d(12px, -4px, 0); }
  100% { transform: translate3d(-12px, 0, 0); }
}

/* Luminance — light is the protagonist.
   A primary cool moonlit gradient sweeps in from upper-left
   (off-frame), a single distant warm highlight rests in the
   upper-right like a far window or streetlamp, and a quiet
   ambient halo settles where the eye reads.                 */
body.is-threshold .threshold-luminance {
  position: absolute;
  inset: -8%;
  pointer-events: none;
  mix-blend-mode: screen;
  background:
    /* primary moonlit source — softened so the upper-left no longer blooms */
    radial-gradient(
      ellipse 110% 80% at 12% -10%,
      rgba(168, 192, 220, 0.11) 0%,
      rgba(140, 168, 198, 0.05) 22%,
      rgba(118, 140, 168, 0.02) 42%,
      transparent 60%
    ),
    /* isolated warm highlight — kept as a hint, not a glare */
    radial-gradient(
      ellipse 34% 24% at 82% 18%,
      rgba(214, 178, 130, 0.085) 0%,
      rgba(196, 158, 110, 0.03) 28%,
      transparent 55%
    ),
    /* very faint warm pool where the fragment sits — anchors the eye */
    radial-gradient(
      ellipse 56% 40% at 50% 56%,
      rgba(220, 198, 158, 0.055) 0%,
      rgba(220, 198, 158, 0.015) 36%,
      transparent 65%
    ),
    /* low cool wash from below — preserved for grounding */
    radial-gradient(
      ellipse 90% 50% at 50% 118%,
      rgba(124, 148, 178, 0.08) 0%,
      transparent 58%
    );
  animation: th-luminance-breathe 24s ease-in-out infinite;
  will-change: opacity, transform;
}

@keyframes th-luminance-breathe {
  0%, 100% { opacity: 0.7; transform: translate3d(0, 0, 0); }
  50%      { opacity: 0.82; transform: translate3d(-4px, 2px, 0); }
}

/* Paper layer — anisotropic warm fibers + faint corner bleed.
   Sits BELOW the digital grain so the cool screen texture
   reads as if laid over real paper. */
body.is-threshold .threshold-paper {
  position: absolute;
  inset: -3%;
  pointer-events: none;
  mix-blend-mode: soft-light;
  opacity: 0.42;
  background-color: transparent;
  background-image:
    /* warm corner bleed — top corners pulled back so the upper portion
       no longer bloom-warms; bottom corners kept fuller for grounding */
    radial-gradient(ellipse 55% 45% at 0% 0%,    rgba(186, 150, 110, 0.10), transparent 70%),
    radial-gradient(ellipse 55% 45% at 100% 0%,  rgba(186, 150, 110, 0.08), transparent 70%),
    radial-gradient(ellipse 55% 45% at 0% 100%,  rgba(186, 150, 110, 0.16), transparent 70%),
    radial-gradient(ellipse 55% 45% at 100% 100%,rgba(186, 150, 110, 0.18), transparent 70%),
    /* anisotropic fibers — drawn long horizontally like cotton paper */
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='420' height='420'><filter id='f'><feTurbulence type='fractalNoise' baseFrequency='0.55 0.025' numOctaves='2' seed='7' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.64  0 0 0 0 0.52  0 0 0 0 0.36  0 0 0 0.55 0'/></filter><rect width='100%' height='100%' filter='url(%23f)'/></svg>");
  background-repeat: no-repeat, no-repeat, no-repeat, no-repeat, repeat;
  background-size:   100% 100%, 100% 100%, 100% 100%, 100% 100%, 420px 420px;
  animation: th-paper-shift 38s ease-in-out infinite;
}

@keyframes th-paper-shift {
  0%, 100% { background-position: 0 0, 0 0, 0 0, 0 0,  0px 0px; }
  50%      { background-position: 0 0, 0 0, 0 0, 0 0,  6px 4px; }
}

/* Cool grain shimmer */
body.is-threshold .threshold-grain {
  position: absolute;
  inset: -2%;
  pointer-events: none;
  opacity: 0.22;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.62 0 0 0 0 0.66 0 0 0 0 0.72 0 0 0 0.55 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  background-size: 240px 240px;
  animation: th-grain-drift 13s steps(60) infinite;
}

/* Faint scan-line shimmer — the screen half of the hybrid.
   Sits ABOVE the paper + grain, so the whole composite reads as
   "paper viewed through a quiet nocturnal interface." */
body.is-threshold .threshold-scan {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.18;
  mix-blend-mode: overlay;
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 3px,
    rgba(150, 172, 196, 0.06) 3px,
    rgba(150, 172, 196, 0.06) 4px
  );
  background-size: 100% 4px;
  animation: th-scan-drift 9s linear infinite;
  will-change: background-position;
}

@keyframes th-scan-drift {
  0%   { background-position: 0  0px; }
  100% { background-position: 0  4px; }
}

@keyframes th-grain-drift {
  0%   { background-position:    0px    0px; }
  18%  { background-position:   -6px    4px; }
  36%  { background-position:    5px   -7px; }
  54%  { background-position:   -3px    6px; }
  72%  { background-position:    7px   -2px; }
  90%  { background-position:   -5px   -4px; }
  100% { background-position:    0px    0px; }
}

/* Cool moonlight cursor glow */
body.is-threshold .threshold-cursor-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.4s ease;
  background: radial-gradient(
    360px circle at var(--mx, 50%) var(--my, 60%),
    rgba(178, 192, 212, 0.10),
    rgba(178, 192, 212, 0.04) 35%,
    transparent 70%
  );
  mix-blend-mode: screen;
}

body.is-threshold .threshold-cursor-glow.is-on {
  opacity: 1;
}

body.is-threshold.is-scrolling .threshold-haze,
body.is-threshold.is-scrolling .threshold-veil,
body.is-threshold.is-scrolling .threshold-luminance,
body.is-threshold.is-scrolling .threshold-paper,
body.is-threshold.is-scrolling .threshold-grain,
body.is-threshold.is-scrolling .threshold-scan,
body.is-threshold.is-scrolling .threshold-glyph,
body.is-threshold.is-scrolling .threshold-glyph::before,
body.is-threshold.is-scrolling .threshold-descent-line {
  animation-play-state: paused;
}

body.is-threshold.is-scrolling .threshold-cursor-glow {
  opacity: 0;
  transition-duration: 120ms;
}

/* ── Edge marginalia ────────────────────────────────────── */
body.is-threshold .edge-mark {
  position: fixed;
  width: 14px;
  height: 14px;
  z-index: 2;
  opacity: 0;
  animation: th-fade-in 1.6s ease 1.6s forwards;
  pointer-events: none;
}

body.is-threshold .edge-mark::before,
body.is-threshold .edge-mark::after {
  content: '';
  position: absolute;
  background: var(--th-quiet);
}

body.is-threshold .edge-mark::before { width: 14px; height: 1px; }
body.is-threshold .edge-mark::after  { width: 1px;  height: 14px; }

body.is-threshold .edge-mark-tl { top: 28px; left: 28px; }
body.is-threshold .edge-mark-tl::before { top: 0; left: 0; }
body.is-threshold .edge-mark-tl::after  { top: 0; left: 0; }

body.is-threshold .edge-mark-tr { top: 28px; right: 28px; }
body.is-threshold .edge-mark-tr::before { top: 0; right: 0; }
body.is-threshold .edge-mark-tr::after  { top: 0; right: 0; }

body.is-threshold .edge-mark-bl { bottom: 28px; left: 28px; }
body.is-threshold .edge-mark-bl::before { bottom: 0; left: 0; }
body.is-threshold .edge-mark-bl::after  { bottom: 0; left: 0; }

body.is-threshold .edge-mark-br { bottom: 28px; right: 28px; }
body.is-threshold .edge-mark-br::before { bottom: 0; right: 0; }
body.is-threshold .edge-mark-br::after  { bottom: 0; right: 0; }

/* Coordinate text in corners */
body.is-threshold .threshold-coord {
  position: fixed;
  z-index: 2;
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 10.5px;
  letter-spacing: 0.18em;
  font-weight: 400;
  color: var(--th-quiet);
  text-transform: uppercase;
  pointer-events: none;
  opacity: 0;
  animation: th-fade-in 1.6s ease 2.0s forwards;
}

body.is-threshold .threshold-coord-tl {
  top: 56px;
  left: 28px;
}

body.is-threshold .threshold-coord-br {
  bottom: 56px;
  right: 28px;
  letter-spacing: 0.32em;
}

body.is-threshold .threshold-coord {
  text-shadow: 0 0 14px rgba(140, 162, 188, 0.12);
}

body.is-threshold .coord-tick {
  display: inline-block;
  margin-right: 4px;
  color: var(--th-bronze);
  opacity: 0.7;
  transform: translateY(-1px);
}

/* ── Main first-viewport composition ────────────────────── */
body.is-threshold .threshold {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 80px 32px 120px;
}

body.is-threshold .threshold-vista {
  text-align: center;
  max-width: 620px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 38px;
}

/* The symbolic motif — also the most concentrated point of light */
body.is-threshold .threshold-glyph {
  position: relative;
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  color: var(--th-text);
  opacity: 0;
  transform: translateY(8px) scale(0.96);
  animation: th-rise 2.4s cubic-bezier(0.16, 1, 0.3, 1) 0.6s forwards,
             th-glyph-breathe 14s ease-in-out 3s infinite;
}

/* Soft luminous halo — the glyph appears to emit light */
body.is-threshold .threshold-glyph::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 280px;
  height: 280px;
  transform: translate(-50%, -50%);
  background: radial-gradient(
    circle,
    rgba(220, 198, 158, 0.14) 0%,
    rgba(190, 200, 218, 0.08) 22%,
    rgba(150, 170, 196, 0.04) 44%,
    transparent 64%
  );
  filter: blur(1.5px);
  pointer-events: none;
  animation: th-halo-breathe 9s ease-in-out infinite;
}

@keyframes th-halo-breathe {
  0%, 100% { opacity: 0.78; transform: translate(-50%, -50%) scale(1); }
  50%      { opacity: 1;    transform: translate(-50%, -50%) scale(1.10); }
}

body.is-threshold .threshold-symbol {
  position: relative;
  display: block;
  font-family: 'Newsreader', Georgia, 'Times New Roman', serif;
  font-size: 64px;
  line-height: 1;
  filter: drop-shadow(0 0 18px rgba(220, 200, 168, 0.18))
          drop-shadow(0 0 4px rgba(220, 213, 197, 0.10));
}

@keyframes th-glyph-breathe {
  0%, 100% { opacity: 0.9; transform: scale(1); }
  50%      { opacity: 1;   transform: scale(1.025); }
}

/* ── Marginal ornaments: pen (left) & book (right) ───────── */
/* Sized at ~2.5× the rendered line-block of the largest quote
   (.threshold-fragment: clamp(24px, 3.4vw, 34px) × 1.45 line-height). */
body.is-threshold .threshold-pen,
body.is-threshold .threshold-book {
  position: absolute;
  top: 50%;
  z-index: 0;
  color: var(--th-text);
  pointer-events: none;
  opacity: 0;
  animation: th-fade-in 2.4s ease 1.4s forwards;
}

body.is-threshold .threshold-pen svg,
body.is-threshold .threshold-book svg {
  display: block;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 14px rgba(220, 200, 168, 0.10));
  opacity: 0.42;
}

body.is-threshold .threshold-book {
  /* Pushed inward — sits roughly halfway between the right edge and the
     center-right of the composition, well clear of the corner. */
  right: clamp(110px, 14vw, 240px);
  /* height ≈ 3.0 × (quote font-size × line-height) */
  height: calc(clamp(24px, 3.4vw, 34px) * 1.45 * 3.0);
  width: calc(clamp(24px, 3.4vw, 34px) * 1.45 * 3.0 * (152 / 198));
  transform: translateY(-50%) rotate(2deg);
}

body.is-threshold .threshold-secret-book {
  display: block;
  pointer-events: auto;
  cursor: pointer;
  text-decoration: none;
  outline-offset: 12px;
  transition: opacity 0.6s ease, transform 0.6s ease, filter 0.6s ease;
}

body.is-threshold .threshold-secret-book:hover,
body.is-threshold .threshold-secret-book:focus-visible {
  opacity: 0.92;
  transform: translateY(-50%) rotate(1deg) scale(1.04);
  filter: drop-shadow(0 0 18px rgba(220, 200, 168, 0.18));
}

body.is-threshold .threshold-secret-book:focus-visible {
  outline: 1px solid var(--th-quiet);
}

body.is-threshold .threshold-pen {
  /* Pulled inward toward the center of the composition */
  left: clamp(110px, 14vw, 240px);
  /* Same scale-up factor as the book (3.0 vs 2.5), preserving the
     pen-to-book ratio (1.35) so they feel proportionally matched. */
  height: calc(clamp(24px, 3.4vw, 34px) * 1.45 * 3.0 * 1.35);
  width: calc(clamp(24px, 3.4vw, 34px) * 1.45 * 3.0 * 1.35 * (60 / 240));
  /* 180° flip so the nib points down (cap/finial up) — natural at-rest pose */
  transform: translateY(-50%) rotate(186deg);
}

/* The fragment — main protagonist, lit ambiently */
body.is-threshold .threshold-fragment {
  font-family: 'Newsreader', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(24px, 3.4vw, 34px);
  line-height: 1.45;
  letter-spacing: 0.005em;
  color: var(--th-text);
  margin: 0;
  text-wrap: balance;
  max-width: 18ch;
  opacity: 0;
  transform: translateY(10px);
  animation: th-rise 2.4s cubic-bezier(0.16, 1, 0.3, 1) 1.4s forwards;
  text-shadow:
    0 0 32px rgba(220, 198, 158, 0.10),
    0 0 90px rgba(180, 198, 218, 0.05);
}

/* The name — quiet wordmark beneath, faintly lit */
body.is-threshold .threshold-name {
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.5em;
  color: var(--th-muted);
  text-transform: uppercase;
  margin: 8px 0 0;
  padding-left: 0.5em; /* compensate for tracking */
  opacity: 0;
  transform: translateY(6px);
  animation: th-rise 2.4s cubic-bezier(0.16, 1, 0.3, 1) 2.4s forwards;
  text-shadow: 0 0 18px rgba(180, 195, 215, 0.12);
}

/* Descent indicator (single thin line) */
body.is-threshold .threshold-descent {
  position: absolute;
  bottom: 96px;
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: 56px;
  opacity: 0;
  animation: th-fade-in 2s ease 3.4s forwards;
}

body.is-threshold .threshold-descent-line {
  display: block;
  width: 1px;
  height: 100%;
  background: linear-gradient(
    to bottom,
    transparent,
    var(--th-quiet) 30%,
    var(--th-muted) 100%
  );
  animation: th-descent-pulse 4.5s ease-in-out infinite;
  transform-origin: top;
}

@keyframes th-descent-pulse {
  0%, 100% { opacity: 0.4; transform: scaleY(0.85); }
  50%      { opacity: 0.85; transform: scaleY(1); }
}

/* ── Reverie (below the threshold) ──────────────────────── */
body.is-threshold .reverie {
  position: relative;
  z-index: 1;
  max-width: 640px;
  margin: 0 auto;
  padding: 80px 32px 120px;
}

body.is-threshold .reverie-fragments {
  list-style: none;
  margin: 0 0 88px;
  padding: 0;
}

body.is-threshold .reverie-fragments li {
  font-family: 'Newsreader', Georgia, serif;
  font-weight: 300;
  font-size: clamp(18px, 2.2vw, 22px);
  line-height: 1.7;
  color: var(--th-text-soft);
  margin: 0 0 44px;
  padding: 0;
  text-wrap: balance;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 1.6s ease, transform 1.6s ease;
}

body.is-threshold .reverie-fragments li.is-visible {
  opacity: 1;
  transform: translateY(0);
}

body.is-threshold .reverie-fragments li:nth-child(1) {
  padding-left: 0;
}
body.is-threshold .reverie-fragments li:nth-child(2) {
  padding-left: 12%;
}
body.is-threshold .reverie-fragments li:nth-child(3) {
  padding-left: 24%;
}

/* Quiet paths to other pages */
body.is-threshold .reverie-paths {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 22px;
  margin-top: 96px;
  padding-top: 56px;
  border-top: 1px solid var(--th-line);
  position: relative;
}

body.is-threshold .reverie-paths::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 0;
  width: 32px;
  height: 1px;
  background: var(--th-bronze);
  opacity: 0.55;
}

body.is-threshold .reverie-paths a {
  position: relative;
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 12.5px;
  font-weight: 400;
  letter-spacing: 0.34em;
  color: var(--th-muted);
  text-transform: uppercase;
  text-decoration: none;
  padding: 4px 0 4px 28px;
  transition: color 0.6s ease, letter-spacing 0.6s ease, padding-left 0.5s ease;
}

body.is-threshold .reverie-paths a::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 14px;
  height: 1px;
  background: var(--th-quiet);
  transform: translateY(-50%) scaleX(0.5);
  transform-origin: left;
  transition: width 0.6s ease, background 0.6s ease, transform 0.6s ease;
}

body.is-threshold .reverie-paths a:hover {
  color: var(--th-text);
  letter-spacing: 0.4em;
  padding-left: 36px;
}

body.is-threshold .reverie-paths a:hover::before {
  width: 22px;
  background: var(--th-bronze);
  transform: translateY(-50%) scaleX(1);
}

/* ── Footer ─────────────────────────────────────────────── */
body.is-threshold .threshold-footer {
  position: relative;
  z-index: 1;
  max-width: 640px;
  margin: 0 auto;
  padding: 0 32px 96px;
  text-align: left;
}

body.is-threshold .threshold-footer-line {
  width: 100%;
  height: 1px;
  margin: 0 0 28px;
  background: linear-gradient(
    to right,
    var(--th-line),
    transparent
  );
}

body.is-threshold .threshold-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
}

body.is-threshold .threshold-footer-links a {
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--th-muted);
  text-decoration: none;
  text-transform: lowercase;
  transition: color 0.5s ease;
}

body.is-threshold .threshold-footer-links a:hover {
  color: var(--th-text);
}

/* ── Load reveal helper (used internally above) ────────── */
@keyframes th-rise {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes th-fade-in {
  to { opacity: 1; }
}

/* ── Reduced motion ─────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  body.is-threshold .threshold-haze,
  body.is-threshold .threshold-veil,
  body.is-threshold .threshold-luminance,
  body.is-threshold .threshold-paper,
  body.is-threshold .threshold-grain,
  body.is-threshold .threshold-scan,
  body.is-threshold .threshold-glyph,
  body.is-threshold .threshold-glyph::before,
  body.is-threshold .threshold-veil .distant-light,
  body.is-threshold .threshold-fragment,
  body.is-threshold .threshold-name,
  body.is-threshold .threshold-descent,
  body.is-threshold .threshold-descent-line,
  body.is-threshold .edge-mark,
  body.is-threshold .threshold-coord,
  body.is-threshold .reverie-fragments li {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  body.is-threshold .threshold-cursor-glow {
    display: none;
  }
  /* Pen & book: keep their centering transform, just stop the fade-in */
  body.is-threshold .threshold-pen,
  body.is-threshold .threshold-book {
    animation: none !important;
    opacity: 1 !important;
  }
}

/* ── Page-leave fade (for nav clicks) ───────────────────── */
body.is-threshold.is-leaving {
  opacity: 0;
  transition: opacity 520ms ease;
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 760px) {
  body.is-threshold .threshold {
    padding: 64px 24px 100px;
  }
  body.is-threshold .threshold-vista {
    gap: 30px;
  }
  body.is-threshold .threshold-glyph {
    width: 60px;
    height: 60px;
  }
  body.is-threshold .threshold-fragment {
    font-size: clamp(22px, 5.6vw, 28px);
    max-width: 16ch;
  }
  body.is-threshold .threshold-coord-tl {
    font-size: 9.5px;
    letter-spacing: 0.15em;
    top: 44px;
    left: 22px;
  }
  body.is-threshold .threshold-coord-br {
    font-size: 9.5px;
    bottom: 44px;
    right: 22px;
  }
  body.is-threshold .edge-mark-tl,
  body.is-threshold .edge-mark-tr { top: 22px; }
  body.is-threshold .edge-mark-bl,
  body.is-threshold .edge-mark-br { bottom: 22px; }
  body.is-threshold .edge-mark-tl,
  body.is-threshold .edge-mark-bl { left: 22px; }
  body.is-threshold .edge-mark-tr,
  body.is-threshold .edge-mark-br { right: 22px; }
  body.is-threshold .threshold-descent {
    bottom: 64px;
    height: 40px;
  }
  body.is-threshold .reverie {
    padding: 64px 24px 100px;
  }
  body.is-threshold .reverie-fragments li:nth-child(2) { padding-left: 8%; }
  body.is-threshold .reverie-fragments li:nth-child(3) { padding-left: 16%; }
  body.is-threshold .reverie-paths a {
    letter-spacing: 0.28em;
    font-size: 11.5px;
  }
}

/* Hide marginal ornaments where they would crowd the centered vista
   (book is now larger and sits further inward, so reserve more room) */
@media (max-width: 1180px) {
  body.is-threshold .threshold-pen,
  body.is-threshold .threshold-book {
    display: none;
  }

  body.is-threshold .threshold-secret-book {
    display: block;
    top: auto;
    right: clamp(28px, 6vw, 64px);
    bottom: clamp(72px, 10vh, 112px);
    height: 78px;
    width: 60px;
    transform: rotate(2deg);
  }

  body.is-threshold .threshold-secret-book:hover,
  body.is-threshold .threshold-secret-book:focus-visible {
    transform: rotate(1deg) scale(1.05);
  }
}

@media (max-width: 480px) {
  body.is-threshold .threshold-cursor-glow { display: none; }
  body.is-threshold .threshold-coord-tl { font-size: 9px; }
  body.is-threshold .threshold-name { letter-spacing: 0.42em; }
  body.is-threshold .reverie-fragments li:nth-child(2),
  body.is-threshold .reverie-fragments li:nth-child(3) { padding-left: 0; }
  body.is-threshold .threshold-secret-book {
    right: 22px;
    bottom: 34px;
    height: 58px;
    width: 45px;
  }
}
