/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps.
 */

:root {
  color-scheme: light;
  --bg: #f5ecdc;
  --bg-deep: #dfc9aa;
  --surface: #fff9ed;
  --surface-strong: #fff3dc;
  --paper: #fffaf0;
  --paper-edge: #e8cfaa;
  --text: #2a2117;
  --muted: #6d5840;
  --subtle: #8b7354;
  --line: rgba(88, 62, 34, 0.22);
  --accent: #b45f31;
  --accent-strong: #5a2f19;
  --accent-soft: #f3d3ad;
  --ink: #1f170f;
  --cover: #2d1b12;
  --cover-ink: #fff2d7;
  --shadow: 0 24px 70px rgba(57, 37, 19, 0.2);
  --page-shadow: 0 22px 60px rgba(66, 43, 22, 0.22);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --bg: #100d0a;
    --bg-deep: #050403;
    --surface: #1d1712;
    --surface-strong: #261d15;
    --paper: #201811;
    --paper-edge: #4b3523;
    --text: #f4e6cf;
    --muted: #d1b991;
    --subtle: #a98f68;
    --line: rgba(244, 220, 178, 0.2);
    --accent: #f0b56f;
    --accent-strong: #ffd9a0;
    --accent-soft: #4a2c15;
    --ink: #fff4df;
    --cover: #0a0807;
    --cover-ink: #ffe5b3;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
    --page-shadow: 0 22px 60px rgba(0, 0, 0, 0.45);
  }
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #100d0a;
  --bg-deep: #050403;
  --surface: #1d1712;
  --surface-strong: #261d15;
  --paper: #201811;
  --paper-edge: #4b3523;
  --text: #f4e6cf;
  --muted: #d1b991;
  --subtle: #a98f68;
  --line: rgba(244, 220, 178, 0.2);
  --accent: #f0b56f;
  --accent-strong: #ffd9a0;
  --accent-soft: #4a2c15;
  --ink: #fff4df;
  --cover: #0a0807;
  --cover-ink: #ffe5b3;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
  --page-shadow: 0 22px 60px rgba(0, 0, 0, 0.45);
}

html[data-theme="light"],
html.pdf-export {
  color-scheme: light;
  --bg: #f5ecdc;
  --bg-deep: #dfc9aa;
  --surface: #fff9ed;
  --surface-strong: #fff3dc;
  --paper: #fffaf0;
  --paper-edge: #e8cfaa;
  --text: #2a2117;
  --muted: #6d5840;
  --subtle: #8b7354;
  --line: rgba(88, 62, 34, 0.22);
  --accent: #b45f31;
  --accent-strong: #5a2f19;
  --accent-soft: #f3d3ad;
  --ink: #1f170f;
  --cover: #2d1b12;
  --cover-ink: #fff2d7;
  --shadow: 0 24px 70px rgba(57, 37, 19, 0.2);
  --page-shadow: 0 22px 60px rgba(66, 43, 22, 0.22);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 255, 255, 0.55), transparent 24rem),
    radial-gradient(circle at 82% 8%, rgba(180, 95, 49, 0.18), transparent 22rem),
    linear-gradient(135deg, var(--bg), var(--bg-deep));
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  line-height: 1.5;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(90, 55, 20, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(90, 55, 20, 0.025) 1px, transparent 1px);
  background-size: 46px 46px;
}

a {
  color: var(--accent-strong);
  text-decoration: none;
}

a:hover,
a:focus-visible {
  text-decoration: underline;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

.book-site {
  position: relative;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 92px;
}

.topbar {
  position: sticky;
  top: 16px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 64px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 84%, transparent);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.brand-link,
.topbar-actions,
.hero-actions,
.profile-links,
.book-controls {
  display: flex;
  align-items: center;
}

.brand-link {
  gap: 10px;
  color: var(--text);
  font-weight: 900;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: block;
  flex: 0 0 42px;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface-strong);
}

.topbar-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.topbar-actions a,
.theme-toggle,
.button,
.book-control {
  min-height: 42px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
}

.topbar-actions a,
.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  color: var(--muted);
}

.theme-toggle,
.book-control {
  border: 1px solid var(--line);
  background: var(--surface-strong);
  color: var(--text);
  cursor: pointer;
}

.theme-toggle {
  justify-content: center;
  width: 42px;
  padding: 0;
}

.theme-toggle:hover,
.theme-toggle:focus-visible,
.book-control:hover,
.book-control:focus-visible {
  border-color: var(--accent);
  color: var(--accent-strong);
}

.book-control:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.theme-toggle__icon {
  display: inline-flex;
  width: 18px;
  height: 18px;
  line-height: 1;
}

.theme-toggle__icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.theme-toggle__icon--sun {
  display: none;
}

html[data-theme="dark"] .theme-toggle__icon--moon {
  display: none;
}

html[data-theme="dark"] .theme-toggle__icon--sun {
  display: inline-flex;
}

.book-ambient-canvas {
  position: fixed;
  inset: 0;
  z-index: -1;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
}

.book-stage {
  position: relative;
  z-index: 1;
  padding: clamp(14px, 3vw, 36px) 0 36px;
}

.book-shell {
  position: relative;
}

.book-controls {
  position: fixed;
  right: 50%;
  bottom: 18px;
  z-index: 50;
  justify-content: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 84%, transparent);
  box-shadow: var(--shadow);
  transform: translateX(50%);
  backdrop-filter: blur(18px);
}

.book-control {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  padding: 0;
}

.book-indicator {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.book-control svg,
.book-controls .theme-toggle svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.5;
}

.book-spread {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  min-height: clamp(760px, 82vh, 980px);
  border-radius: 28px;
  box-shadow: var(--shadow);
  perspective: 2200px;
}

.book-spread::before {
  position: absolute;
  top: 2.5%;
  bottom: 2.5%;
  left: 50%;
  z-index: 3;
  width: 34px;
  pointer-events: none;
  content: "";
  transform: translateX(-50%);
  background:
    linear-gradient(90deg, transparent, rgba(61, 38, 18, 0.2), transparent),
    radial-gradient(ellipse at center, rgba(255, 255, 255, 0.45), transparent 68%);
}

.book-page {
  position: relative;
  display: none;
  min-height: clamp(760px, 82vh, 980px);
  max-height: none;
  overflow: auto;
  padding: clamp(28px, 4vw, 54px);
  border: 1px solid var(--paper-edge);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.45), transparent 16%, transparent 84%, rgba(110, 70, 30, 0.08)),
    radial-gradient(circle at 12% 8%, rgba(255, 255, 255, 0.72), transparent 14rem),
    var(--paper);
  box-shadow: var(--page-shadow);
  transform-style: preserve-3d;
}

.book-page::after {
  position: absolute;
  inset: 10px;
  pointer-events: none;
  content: "";
  border: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  border-radius: 18px;
}

.book-page.is-visible {
  display: flex;
  flex-direction: column;
}

.book-page.is-left-page {
  border-radius: 28px 8px 8px 28px;
  transform-origin: right center;
}

.book-page.is-right-page {
  border-radius: 8px 28px 28px 8px;
  transform-origin: left center;
}

.book-page.is-turning.is-left-page {
  animation: left-page-settle 520ms ease both;
}

.book-page.is-turning.is-right-page {
  animation: right-page-settle 520ms ease both;
}

.book-page--cover {
  justify-content: space-between;
  color: var(--cover-ink);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 28%),
    radial-gradient(circle at 78% 14%, rgba(240, 181, 111, 0.22), transparent 18rem),
    linear-gradient(135deg, var(--cover), #5a2f19);
  border-color: rgba(255, 230, 185, 0.18);
}

.book-page--cover::after {
  border-color: rgba(255, 230, 185, 0.24);
}

@keyframes left-page-settle {
  from {
    opacity: 0.7;
    transform: rotateY(7deg) translateX(10px);
  }
  to {
    opacity: 1;
    transform: rotateY(0deg) translateX(0);
  }
}

@keyframes right-page-settle {
  from {
    opacity: 0.7;
    transform: rotateY(-7deg) translateX(-10px);
  }
  to {
    opacity: 1;
    transform: rotateY(0deg) translateX(0);
  }
}

.page-kicker,
.folio-card span,
.contact-panel span {
  margin: 0 0 10px;
  color: var(--accent-strong);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.book-page--cover .page-kicker {
  color: var(--cover-ink);
}

.page-number {
  align-self: flex-end;
  color: var(--subtle);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 8ch;
  margin-bottom: 18px;
  color: var(--cover-ink);
  font-size: clamp(2.2rem, 5.5vw, 4.6rem);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.03em;
}

h2 {
  max-width: 780px;
  color: var(--ink);
  font-size: clamp(1.15rem, 2vw, 2rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

h3 {
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.book-page--cover h2,
.book-page--cover h3,
.book-page--cover a,
.book-page--cover .metric-value,
.book-page--cover .metric-label {
  color: var(--cover-ink);
}

.book-lede {
  max-width: 640px;
  color: color-mix(in srgb, var(--cover-ink) 86%, transparent);
  font-size: clamp(0.85rem, 1.3vw, 1rem);
  font-weight: 600;
}

.prose {
  color: var(--muted);
  font-size: 0.84rem;
}

.prose p:last-child,
.folio-card p:last-child,
.contact-panel p:last-child {
  margin-bottom: 0;
}

.cover-profile {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 20px;
  align-items: center;
  margin: 18px 0 28px;
}

.profile-photo {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid rgba(255, 236, 201, 0.22);
  border-radius: 22px;
  background: var(--surface-strong);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
}

.metric-value {
  margin-bottom: 4px;
  color: var(--ink);
  font-size: clamp(1.3rem, 2vw, 1.9rem);
  font-weight: 800;
  line-height: 1;
}

.metric-label {
  display: block;
  color: var(--subtle);
  font-size: 0.78rem;
  font-weight: 700;
}

.hero-actions {
  flex-wrap: wrap;
  gap: 12px;
  margin-top: auto;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
}

.button-primary {
  background: var(--accent-strong);
  color: var(--paper);
}

.button-primary:hover,
.button-primary:focus-visible {
  color: var(--paper);
}

.button-secondary,
.button-ghost {
  border-color: var(--line);
  background: color-mix(in srgb, var(--surface-strong) 78%, transparent);
  color: var(--text);
}

.book-page--cover .button-secondary,
.book-page--cover .button-ghost {
  border-color: rgba(255, 230, 185, 0.28);
  background: rgba(255, 245, 222, 0.1);
  color: var(--cover-ink);
}

.book-page--cover .button-primary {
  background: var(--cover-ink);
  color: var(--cover);
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
  text-decoration: none;
}

.chapter-list {
  display: grid;
  gap: 14px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.chapter-list li,
.folio-card,
.contact-panel article,
.timeline article {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: color-mix(in srgb, var(--surface-strong) 76%, transparent);
}

.chapter-list li {
  padding: 18px;
}

.chapter-list span {
  display: block;
  color: var(--subtle);
  font-size: 0.68rem;
  font-weight: 700;
}

.chapter-list strong {
  display: block;
  color: var(--ink);
  font-size: 0.9rem;
  line-height: 1.35;
}

.folio-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.folio-grid--compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.folio-card {
  padding: 16px;
}

.folio-card h3 {
  margin-bottom: 6px;
  font-size: 0.82rem;
}

.folio-card p,
.timeline p,
.contact-panel p {
  color: var(--muted);
  font-size: 0.78rem;
}

.timeline,
.contact-panel {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}

.timeline article,
.contact-panel article {
  padding: 18px;
}

.contact-panel strong {
  display: block;
  color: var(--ink);
}

.profile-links {
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.profile-links a {
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
}

.site-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 28px;
}

.section-block {
  margin-top: 28px;
}

.site-shell .hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 32px;
  align-items: stretch;
  min-height: 520px;
  padding: clamp(28px, 4.5vw, 54px);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: color-mix(in srgb, var(--paper) 90%, transparent);
  box-shadow: var(--shadow);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.eyebrow,
.project-kicker,
.detail-item span {
  margin: 0 0 12px;
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-shell h1 {
  max-width: 13ch;
  margin-bottom: 18px;
  color: var(--ink);
  font-size: clamp(1.8rem, 4vw, 3.4rem);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.03em;
}

.site-shell h2 {
  max-width: 860px;
  font-size: clamp(1rem, 1.6vw, 1.5rem);
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -0.02em;
}

.hero-lede {
  max-width: 660px;
  margin-bottom: 24px;
  color: var(--muted);
  font-size: clamp(0.88rem, 1.1vw, 0.95rem);
}

.hero-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 22px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: color-mix(in srgb, var(--surface-strong) 78%, transparent);
}

.summary-grid,
.section-block:not(.hero):not(.detail-band) {
  padding: clamp(24px, 4vw, 44px) 0;
}

.summary-grid {
  display: grid;
  grid-template-columns: minmax(240px, 0.9fr) minmax(0, 1.1fr);
  gap: 30px;
}

.section-heading {
  margin-bottom: 24px;
}

.section-heading h2 {
  max-width: none;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.project-card,
.experience-group,
.detail-item {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: color-mix(in srgb, var(--surface-strong) 78%, transparent);
}

.project-card,
.detail-item {
  padding: 20px;
}

.project-card h3,
.experience-group h3 {
  margin-bottom: 10px;
}

.project-card p,
.experience-group li,
.experience-group p,
.detail-item p {
  color: var(--muted);
}

.experience-list {
  display: grid;
  gap: 14px;
}

.experience-group {
  padding: 22px;
}

.experience-group ul {
  display: grid;
  gap: 12px;
  margin: 0;
  padding-left: 20px;
}

.experience-group li::marker {
  color: var(--accent);
}

.detail-band {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.detail-item strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
}

.site-footer {
  margin-top: 18px;
  padding: 16px 0 0;
  text-align: center;
}

.site-footer p {
  margin: 0;
  color: var(--subtle);
  font-size: 0.82rem;
}

.pdf-avoid-break,
section,
article,
header,
h2,
h3,
ul {
  break-inside: avoid;
  page-break-inside: avoid;
}

html.pdf-export body {
  background: #ffffff !important;
  color: #000000 !important;
}

html.pdf-export .web-only,
html.pdf-export .book-controls,
html.pdf-export .book-ambient-canvas {
  display: none !important;
}

html.pdf-export .book-site {
  width: min(8.2in, 100%);
  padding: 0;
}

html.pdf-export .book-spread,
html.pdf-export .book-page {
  display: block !important;
  min-height: auto;
  max-height: none;
  box-shadow: none;
}

@media (max-width: 1120px) {
  .folio-grid--compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .book-site,
  .site-shell {
    width: min(100% - 24px, 760px);
    padding-top: 12px;
  }

  .topbar {
    position: static;
    align-items: flex-start;
    border-radius: 24px;
  }

  .topbar,
  .topbar-actions {
    flex-wrap: wrap;
  }

  .book-spread {
    display: block;
    min-height: auto;
    box-shadow: none;
    perspective: none;
  }

  .book-spread::before {
    display: none;
  }

  .book-page {
    min-height: calc(100vh - 260px);
    max-height: none;
    overflow: visible;
    border-radius: 24px;
    transform: none;
  }

  .book-page.is-visible {
    display: flex;
  }

  .book-page.is-left-page,
  .book-page.is-right-page {
    border-radius: 24px;
    transform: none;
    transform-origin: unset;
    animation: none;
  }

  .book-page::after {
    border-radius: 16px;
  }

  .book-controls {
    bottom: 12px;
  }

  .site-shell .hero,
  .summary-grid,
  .detail-band {
    grid-template-columns: 1fr;
  }

  .site-shell .hero {
    min-height: auto;
  }

  .hero-card {
    order: -1;
  }

  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .book-site,
  .site-shell {
    width: min(100% - 16px, 100%);
    padding: 12px 0 80px;
  }

  .topbar {
    gap: 12px;
    border-radius: 20px;
    padding: 8px 10px;
  }

  .brand-link,
  .topbar-actions {
    width: 100%;
  }

  .topbar-actions a {
    flex: 1 1 auto;
    justify-content: center;
    font-size: 0.82rem;
  }

  .theme-toggle {
    flex: 0 0 38px;
  }

  .book-page {
    padding: 22px 16px;
    margin-bottom: 12px;
    border-radius: 20px;
  }

  .book-page::after {
    border-radius: 12px;
  }

  .cover-profile,
  .folio-grid,
  .folio-grid--compact {
    grid-template-columns: 1fr;
  }

  .cover-profile {
    align-items: start;
    gap: 14px;
  }

  .cover-profile .profile-photo {
    max-width: 180px;
  }

  h1 {
    font-size: clamp(1.8rem, 9vw, 2.6rem);
  }

  h2 {
    font-size: clamp(1rem, 3.5vw, 1.5rem);
  }

  .book-lede {
    font-size: 0.8rem;
  }

  .hero-actions {
    flex-direction: column;
    gap: 8px;
    margin-top: 18px;
  }

  .hero-actions .button {
    width: 100%;
  }

  .button {
    font-size: 0.78rem;
    min-height: 38px;
  }

  .page-kicker,
  .folio-card span,
  .contact-panel span {
    font-size: 0.58rem;
    margin-bottom: 6px;
  }

  .page-number {
    font-size: 0.6rem;
  }

  .book-page h2 {
    font-size: clamp(1rem, 3.5vw, 1.3rem);
  }

  .book-page h3,
  .folio-card h3,
  .timeline h3,
  .contact-panel h3 {
    font-size: 0.78rem;
  }

  .chapter-list,
  .folio-grid,
  .timeline,
  .contact-panel {
    gap: 10px;
    margin-top: 14px;
  }

  .chapter-list li {
    padding: 14px;
  }

  .chapter-list span {
    font-size: 0.62rem;
  }

  .chapter-list strong {
    font-size: 0.82rem;
  }

  .folio-card {
    padding: 12px;
    border-radius: 14px;
  }

  .folio-card p,
  .timeline p,
  .contact-panel p {
    font-size: 0.72rem;
  }

  .timeline article,
  .contact-panel article {
    padding: 14px;
    border-radius: 14px;
  }

  .timeline h3 {
    margin-bottom: 6px;
  }

  .profile-links a {
    padding: 6px 10px;
    font-size: 0.72rem;
  }

  .book-controls {
    padding: 6px;
    gap: 4px;
    bottom: 10px;
  }

  .book-control {
    width: 38px;
    min-height: 38px;
  }

  .site-shell .hero {
    padding: 22px;
  }

  .site-shell h1 {
    font-size: clamp(1.7rem, 10vw, 2.4rem);
  }

  .card-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .book-ambient-canvas {
    display: none;
  }
}

@media print {
  html,
  body {
    height: auto !important;
    overflow: visible !important;
  }

  body {
    background: #ffffff !important;
    color: #000000 !important;
  }

  .web-only,
  .topbar,
  .hero-actions,
  .book-controls,
  .book-ambient-canvas {
    display: none !important;
  }

  .book-site {
    width: 100%;
    padding: 0;
  }

  .book-stage {
    padding: 0;
  }

  .book-spread {
    display: block;
    min-height: auto;
    box-shadow: none;
  }

  .book-spread::before {
    display: none;
  }

  .book-page,
  .book-page.is-visible {
    display: block !important;
    min-height: auto;
    max-height: none;
    margin-bottom: 14px;
    border-color: #000000;
    box-shadow: none;
  }

  * {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}
