:root {
  --font-display: "Cormorant Garamond", "Times New Roman", serif;
  --font-body: "Manrope", "Inter", "Segoe UI", sans-serif;
  --bg: #070b12;
  --bg-elev: #111927;
  --card: rgba(19, 27, 39, 0.74);
  --card-strong: rgba(25, 35, 50, 0.86);
  --stroke: rgba(196, 211, 228, 0.16);
  --text: #f2f5f8;
  --muted: #a6b0bc;
  --rose: #9cb6d3;
  --amber: #d8b982;
  --sand: #fff6e8;
  --glow: rgba(216, 185, 130, 0.26);
  --shadow-xl: 0 28px 75px rgba(0, 0, 0, 0.55);
  --shadow-lg: 0 18px 44px rgba(0, 0, 0, 0.4);
  --max-width: 1140px;
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 18px;
  --space-section: clamp(4rem, 8.2vw, 6.25rem);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  letter-spacing: 0.01em;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

.page {
  position: relative;
  min-height: 100vh;
  overflow: clip;
  background:
    radial-gradient(circle at 80% 8%, rgba(156, 182, 211, 0.2), transparent 44%),
    radial-gradient(circle at 12% 16%, rgba(216, 185, 130, 0.14), transparent 48%),
    linear-gradient(180deg, #04070d 0%, #0f1621 58%, #0a111b 100%);
}

.page::before,
.page::after {
  content: "";
  position: fixed;
  pointer-events: none;
  z-index: 0;
}

.page::before {
  inset: 0;
  opacity: 0.2;
  background-image: linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: radial-gradient(circle at center, rgba(0, 0, 0, 0.7), transparent 88%);
}

.page::after {
  top: -18rem;
  right: -18rem;
  width: 40rem;
  height: 40rem;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(216, 185, 130, 0.2), transparent 65%);
  filter: blur(8px);
}

main,
.site-header,
.site-footer {
  position: relative;
  z-index: 1;
}

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

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

.container {
  width: min(100%, var(--max-width));
  margin: 0 auto;
  padding: 0 24px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(18px);
  background: linear-gradient(to bottom, rgba(7, 11, 17, 0.92), rgba(7, 11, 17, 0.68));
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.site-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent 0%,
    rgba(216, 185, 130, 0.42) 20%,
    rgba(156, 182, 211, 0.46) 50%,
    rgba(216, 185, 130, 0.42) 80%,
    transparent 100%
  );
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  position: relative;
  display: grid;
  place-items: center;
  height: 46px;
  width: 46px;
  border-radius: 14px;
  font-family: var(--font-display);
  font-weight: 700;
  background: linear-gradient(140deg, rgba(156, 182, 211, 0.58), rgba(216, 185, 130, 0.36));
  border: 1px solid rgba(255, 255, 255, 0.24);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.32), 0 12px 24px rgba(0, 0, 0, 0.28);
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.06rem;
  letter-spacing: 0.012em;
}

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

.nav {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(20, 22, 29, 0.5);
}

.nav a {
  position: relative;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.92rem;
  transition: color 0.25s ease, background-color 0.25s ease;
}

.nav a:hover {
  color: var(--sand);
  background: rgba(255, 255, 255, 0.05);
}

.btn {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.012em;
  border: 1px solid transparent;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-120%);
  background: linear-gradient(115deg, transparent 20%, rgba(255, 255, 255, 0.38) 50%, transparent 80%);
  transition: transform 0.6s ease;
}

.btn:hover::before {
  transform: translateX(120%);
}

.btn-primary {
  background: linear-gradient(135deg, #efe2c7, #d8b982 54%, #b9945f);
  color: #101722;
  box-shadow: 0 16px 36px rgba(216, 185, 130, 0.28);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 40px rgba(216, 185, 130, 0.34);
}

.btn-ghost {
  border-color: rgba(156, 182, 211, 0.62);
  color: var(--text);
  background: rgba(20, 22, 29, 0.24);
}

.btn-ghost:hover {
  border-color: rgba(216, 185, 130, 0.85);
  box-shadow: 0 14px 28px rgba(156, 182, 211, 0.22);
}

a:focus-visible,
button:focus-visible,
.carousel-viewport:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
}

main section {
  padding: var(--space-section) 0;
  animation: fade-in 0.85s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

main section:nth-of-type(2) {
  animation-delay: 0.08s;
}

main section:nth-of-type(3) {
  animation-delay: 0.16s;
}

main section:nth-of-type(4) {
  animation-delay: 0.24s;
}

main section:nth-of-type(5) {
  animation-delay: 0.32s;
}

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

.hero {
  padding-top: clamp(3.6rem, 9vw, 5rem);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(1.8rem, 4vw, 3.2rem);
  align-items: center;
}

.hero-text {
  padding: clamp(1.3rem, 2vw, 1.9rem);
  border-radius: var(--radius-xl);
  background: linear-gradient(160deg, rgba(28, 30, 37, 0.62), rgba(16, 17, 21, 0.32));
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(14px);
}

.hero-text h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.2rem, 4.4vw, 3.95rem);
  margin-bottom: 12px;
  line-height: 1.06;
  letter-spacing: 0.01em;
}

.tagline {
  color: var(--rose);
  font-weight: 500;
  margin-bottom: 18px;
}

.hero-description {
  color: var(--muted);
  max-width: 62ch;
  margin-bottom: 24px;
}

.book-meta {
  color: var(--muted);
  font-size: 0.95rem;
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin: 24px 0 28px;
}

.meta-label {
  font-weight: 600;
  color: var(--amber);
  margin-bottom: 4px;
}

.isbn-list {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 0.94rem;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.26em;
  font-size: 0.72rem;
  color: var(--amber);
  margin-bottom: 14px;
}

.cta-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.hero-card {
  position: relative;
  background: linear-gradient(160deg, rgba(42, 45, 54, 0.88), rgba(25, 27, 33, 0.7));
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow-xl), 0 0 24px var(--glow);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(18px);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.16), transparent 30%);
  mix-blend-mode: soft-light;
}

.hero-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 34px 80px rgba(0, 0, 0, 0.58), 0 0 26px var(--glow);
}

.hero-card .image-shell {
  margin-bottom: 16px;
}

.hero-card-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.38rem;
}

.hero-card-sub {
  color: var(--muted);
  margin-top: 6px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 36px;
}

.section-head h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2rem, 3vw, 2.75rem);
  line-height: 1.15;
}

.section-head p {
  color: var(--muted);
  max-width: 42ch;
}

.books {
  padding-top: clamp(2.8rem, 5.8vw, 4.2rem);
}

.books .section-head {
  margin-bottom: clamp(1.15rem, 2.4vw, 2rem);
}

.carousel {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
}

.carousel-viewport {
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  touch-action: pan-x;
  padding: 8px 2px 10px;
  border-radius: 16px;
}

.carousel-viewport::-webkit-scrollbar {
  height: 6px;
}

.carousel-viewport::-webkit-scrollbar-thumb {
  background: rgba(216, 185, 130, 0.38);
  border-radius: 999px;
}

.book-track {
  display: flex;
  gap: 24px;
  padding: 0 2px 16px;
}

.books.single-book .container {
  width: min(100%, 980px);
}

.books.single-book .section-head {
  align-items: flex-start;
  justify-content: flex-start;
  gap: 8px;
}

.books.single-book .section-head p {
  max-width: none;
}

.books.single-book .carousel {
  grid-template-columns: 1fr;
}

.books.single-book .carousel-viewport {
  overflow: visible;
  padding: 2px 0 0;
}

.books.single-book .book-track {
  justify-content: center;
  gap: 0;
  padding: 0;
}

.book-card {
  position: relative;
  flex: 0 0 clamp(190px, 72vw, 270px);
  width: clamp(190px, 72vw, 270px);
  background: linear-gradient(165deg, rgba(31, 34, 41, 0.9), rgba(20, 22, 27, 0.8));
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  backdrop-filter: blur(14px);
  display: flex;
  flex-direction: column;
  scroll-snap-align: start;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.books.single-book .book-card {
  width: min(100%, 860px);
  flex: 0 1 min(100%, 860px);
  min-height: clamp(340px, 44vw, 430px);
  flex-direction: row;
}

.books.single-book .book-card .image-shell {
  width: min(42%, 330px);
  flex: 0 0 min(42%, 330px);
}

.books.single-book .book-card .image-shell img {
  object-fit: cover;
  padding: 0;
}

.books.single-book .book-content {
  justify-content: center;
  padding: clamp(1.05rem, 2.8vw, 1.9rem);
  gap: 12px;
}

.book-card:hover {
  transform: translateY(-5px);
  border-color: rgba(216, 185, 130, 0.44);
  box-shadow: 0 24px 52px rgba(0, 0, 0, 0.5);
}

.book-card .image-shell {
  border-radius: 0;
  background: linear-gradient(180deg, rgba(13, 14, 18, 0.95), rgba(15, 16, 21, 1));
}

.book-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.book-card h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.22rem;
  line-height: 1.25;
}

.book-card.featured {
  border-color: rgba(216, 185, 130, 0.46);
  box-shadow: 0 24px 56px rgba(216, 185, 130, 0.18), 0 16px 36px rgba(0, 0, 0, 0.46);
}

.book-card.featured .book-content::before {
  content: "Featured";
  display: inline-flex;
  width: fit-content;
  margin-bottom: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #111927;
  background: linear-gradient(145deg, #d8b982, #f2e3c4);
}

.text-link {
  color: var(--amber);
  font-weight: 600;
}

.text-link:hover {
  color: #f2e3c4;
}

.text-link.muted {
  color: rgba(216, 185, 130, 0.65);
}

.carousel-btn {
  height: 46px;
  width: 46px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: linear-gradient(160deg, rgba(27, 30, 37, 0.95), rgba(18, 20, 25, 0.9));
  color: var(--text);
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.carousel-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(216, 185, 130, 0.66);
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.42);
}

.carousel-btn:disabled {
  opacity: 0.36;
  cursor: not-allowed;
  transform: none;
}

.media-shell {
  background: linear-gradient(175deg, rgba(30, 32, 39, 0.9), rgba(18, 20, 25, 0.86));
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  position: relative;
  padding-top: 56.25%;
}

.media-shell iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.media-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 24px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.32rem, 3vw, 2rem);
  color: var(--rose);
  background:
    radial-gradient(circle at 15% 20%, rgba(216, 185, 130, 0.15), transparent 45%),
    linear-gradient(120deg, rgba(156, 182, 211, 0.22), rgba(15, 16, 18, 0.6));
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
  gap: 36px;
  align-items: center;
}

.about-card {
  background: linear-gradient(170deg, rgba(30, 33, 39, 0.88), rgba(20, 22, 28, 0.8));
  border-radius: 24px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow-lg);
}

.about-text h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2rem, 3vw, 2.72rem);
  margin-bottom: 16px;
  line-height: 1.12;
}

.about-text p {
  color: var(--muted);
  margin-bottom: 14px;
}

.about-text .tagline {
  color: var(--rose);
}

.about-bio {
  white-space: pre-line;
}

.about-meta {
  color: var(--amber);
  font-weight: 500;
}

.contact-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  background: linear-gradient(165deg, rgba(36, 39, 48, 0.88), rgba(25, 27, 33, 0.8));
  border-radius: var(--radius-xl);
  padding: clamp(1.6rem, 3.3vw, 2.4rem);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
}

.contact-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(125deg, rgba(216, 185, 130, 0.18), transparent 26%, transparent 70%, rgba(156, 182, 211, 0.14));
}

.contact-details {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.site-footer {
  padding: 34px 0 54px;
  color: var(--muted);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.9rem;
}

.image-shell {
  position: relative;
  background: #0c0d10;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.cover-shell {
  aspect-ratio: 3 / 4;
}

.headshot-shell {
  aspect-ratio: 4 / 5;
}

.image-shell img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 14px;
}

.headshot {
  object-fit: cover;
  padding: 0;
}

.image-shell.is-fallback {
  background:
    radial-gradient(circle at 15% 20%, rgba(216, 185, 130, 0.35), transparent 55%),
    radial-gradient(circle at 85% 80%, rgba(156, 182, 211, 0.25), transparent 50%),
    linear-gradient(140deg, #1a1b20, #101116 65%);
}

.image-shell.is-fallback img {
  opacity: 0;
  pointer-events: none;
}

.image-shell.is-fallback::after {
  content: attr(data-fallback-label);
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 18px;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  color: #dbe5f1;
}

@media (max-width: 980px) {
  .nav {
    display: none;
  }

  .nav-wrap {
    flex-wrap: wrap;
  }

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

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

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

  .carousel-btn {
    display: none;
  }
}

@media (max-width: 860px) {
  .books.single-book .carousel-viewport {
    overflow-x: auto;
    padding: 8px 2px 10px;
  }

  .books.single-book .book-track {
    justify-content: flex-start;
    gap: 24px;
    padding: 0 2px 16px;
  }

  .books.single-book .book-card {
    flex: 0 0 clamp(220px, 78vw, 320px);
    width: clamp(220px, 78vw, 320px);
    min-height: unset;
    flex-direction: column;
  }

  .books.single-book .book-card .image-shell {
    width: 100%;
    flex: 0 0 auto;
  }

  .books.single-book .book-card .image-shell img {
    object-fit: contain;
    padding: 12px;
  }
}

@media (max-width: 720px) {
  .hero {
    padding-top: 56px;
  }

  .container {
    padding: 0 18px;
  }

  .btn-primary {
    width: 100%;
  }

  .cta-row .btn-ghost {
    width: 100%;
  }
}

@media (max-width: 540px) {
  .brand-sub {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .carousel-viewport {
    scroll-behavior: auto;
  }
}
