:root {
  --page-bg: #f6f6f6;
  --panel-bg: #f0f8ff;
  --header-bg: #345c9c;
  --text: #281a39;
  --muted: #626262;
  --line: #e7e7e7;
  --accent: #fed301;
  --accent-dark: #1f1f1f;
  --hero-alert: #e21c21;
  --shadow: 0 16px 40px rgba(30, 40, 60, 0.12);
  --image-shadow: 0 12px 28px rgba(30, 40, 60, 0.1);
  --radius: 24px;
  --image-radius: 18px;
  --container: 980px;
  --anchor-offset: calc(86px + 1cm);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 0;
}

body {
  margin: 0;
  font-family: "Spinnaker", Arial, sans-serif;
  color: var(--text);
  background: var(--page-bg);
  line-height: 1.6;
}

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

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

.container {
  width: min(calc(100% - 2rem), var(--container));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(52, 92, 156, 0.96);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
  backdrop-filter: blur(8px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 86px;
}

.site-title {
  color: #fff;
  font-family: "EB Garamond", serif;
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 1.25rem;
}

.site-nav a {
  color: #fff;
  font-size: 1rem;
  letter-spacing: 0.05em;
}

.section-tint {
  background: var(--panel-bg);
}

#top {
  scroll-margin-top: 86px;
}

h1[id],
h2[id] {
  scroll-margin-top: var(--anchor-offset);
}

.hero,
.books,
.bio,
.contact {
  padding: 1.5rem 0 3rem;
}

.books,
.bio,
.contact {
  padding-top: 0;
}

.hero,
.books,
.reviews,
.bio,
.contact {
  min-height: calc(100svh - var(--anchor-offset));
}

.hero {
  min-height: calc(100svh - 86px);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 1fr);
  gap: 3.5rem;
  align-items: center;
}

.hero-cover {
  justify-self: start;
  width: min(100%, 420px);
  max-height: calc(100svh - var(--anchor-offset) - 3rem);
  border-radius: var(--image-radius);
  overflow: hidden;
  box-shadow: var(--image-shadow);
}

.hero-cover img {
  width: calc(100% + 18px);
  max-width: none;
  max-height: calc(100svh - var(--anchor-offset) - 3rem);
  height: 100%;
  margin-left: -9px;
  object-fit: cover;
  object-position: center top;
}

.hero-copy {
  max-width: 33rem;
  padding-right: 1rem;
}

.eyebrow,
.section-heading h2 {
  font-family: "EB Garamond", serif;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--hero-alert);
  font-size: clamp(1.4rem, 2vw, 1.75rem);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
}

.hero-copy h1 {
  margin: 0 0 0.75rem;
  font-family: "EB Garamond", serif;
  font-size: clamp(2.5rem, 5vw, 4.4rem);
  line-height: 0.98;
}

.hero-description {
  max-width: 28rem;
  margin: 0 0 1.75rem;
  color: var(--muted);
  font-size: 1.04rem;
  line-height: 1.72;
}

.hero-links {
  display: grid;
  gap: 0.55rem;
}

.hero-links a {
  width: fit-content;
  font-family: "EB Garamond", serif;
  font-size: clamp(1.25rem, 2vw, 1.45rem);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.section-heading {
  margin-bottom: 2.4rem;
  text-align: center;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.2rem);
}

.section-heading-light h2,
.section-heading-light .rule {
  color: #000;
  border-color: var(--accent);
}

.rule {
  width: min(100%, 905px);
  margin: 0.8rem auto 0;
  border-top: 1px solid var(--accent);
}

.book-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2.25rem 1.75rem;
}

.book-card {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 0.95rem;
  padding: 1.35rem;
  background: rgba(255, 255, 255, 0.42);
  border: 1px solid rgba(40, 26, 57, 0.04);
  border-radius: var(--radius);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.04);
}

.book-card > a:first-child {
  display: block;
  aspect-ratio: 220 / 335;
  overflow: hidden;
  border-radius: var(--image-radius);
  box-shadow: var(--image-shadow);
}

.book-card img {
  width: 100%;
  height: auto;
  transform: scaleX(1.032);
  transform-origin: center;
  border-radius: 0;
}

.book-card h3 {
  margin: 0;
  font-family: "EB Garamond", serif;
  font-size: 1.65rem;
  line-height: 1.08;
}

.book-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.68;
}

.card-actions,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.card-actions {
  margin-top: auto;
  align-self: end;
  padding-top: 0.2rem;
}

.card-actions .button {
  min-width: 118px;
  height: 39px;
  min-height: 39px;
  padding: 0 1rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0.62rem 1.15rem;
  border: 1px solid rgba(40, 26, 57, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: #564a62;
  font-family: "Spinnaker", Arial, sans-serif;
  font-size: 0.94rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.button:hover,
.button:focus-visible {
  background: #fff;
  border-color: rgba(40, 26, 57, 0.22);
  color: #281a39;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.05);
}

.button.ghost {
  background: transparent;
  color: #6a5f76;
}

.reviews {
  position: relative;
  overflow: hidden;
  color: #000;
}

.reviews-backdrop {
  position: absolute;
  inset: 0;
  background: var(--panel-bg);
}

.reviews-inner {
  position: relative;
  padding: 0 0 3rem;
}

.review-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.review-card {
  margin: 0;
  padding: 1.6rem;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(40, 26, 57, 0.08);
  border-radius: var(--radius);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.06);
}

.review-card p {
  margin: 0 0 1rem;
  font-family: "EB Garamond", serif;
  font-size: 1.45rem;
  line-height: 1.35;
}

.review-card cite {
  font-style: normal;
  color: #000;
}

.review-card a {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.bio-grid {
  display: grid;
  grid-template-columns: minmax(260px, 388px) 1fr;
  gap: 2rem;
  align-items: start;
}

.bio-photo {
  width: 100%;
  aspect-ratio: 388 / 281;
  object-fit: cover;
  object-position: center 30%;
  border-radius: var(--image-radius);
  box-shadow: var(--image-shadow);
}

.bio-copy {
  display: grid;
  gap: 1rem;
  font-size: 1.05rem;
}

.bio-copy p {
  margin: 0;
  color: var(--muted);
}

.contact {
  padding-top: 0;
}

.contact-panel {
  max-width: 750px;
  margin: 0 auto;
  padding: 2rem;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
}

.contact-panel p {
  margin: 0 0 1.5rem;
  color: var(--muted);
}

.contact-panel a:not(.button) {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.message-me {
  max-width: 34rem;
  margin: 2rem auto 0;
  padding: 1.35rem 1.5rem;
  border: 1px solid rgba(40, 26, 57, 0.08);
  border-radius: var(--image-radius);
  background: linear-gradient(180deg, rgba(240, 248, 255, 0.7), rgba(255, 255, 255, 0.96));
  box-shadow: 0 10px 24px rgba(30, 40, 60, 0.05);
}

.message-me h3 {
  margin: 0 0 0.45rem;
  font-family: "EB Garamond", serif;
  font-size: 1.6rem;
  line-height: 1.1;
}

.message-me p {
  margin: 0;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin: 1.35rem 0 0;
  padding: 0;
  list-style: none;
}

.social-links a {
  display: inline-flex;
  width: 52px;
  height: 52px;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid rgba(40, 26, 57, 0.16);
  border-radius: 999px;
  background: #fafafa;
}

.social-links a:hover,
.social-links a:focus-visible {
  background: #efefef;
}

.social-links svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.site-footer {
  padding: 1.5rem 0 2rem;
  color: var(--muted);
  text-align: center;
}

.site-footer p {
  margin: 0;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.82rem;
}

@media (max-width: 900px) {
  .hero-grid,
  .bio-grid,
  .book-grid,
  .review-grid {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    padding-right: 0;
  }

  .header-inner {
    padding: 1rem 0;
    align-items: flex-start;
    flex-direction: column;
  }

  .site-nav {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .hero,
  .books,
  .bio,
  .contact,
  .reviews-inner {
    padding-top: 2.5rem;
    padding-bottom: 3rem;
  }

  .hero-links a {
    font-size: 1.3rem;
  }

  .review-card p {
    font-size: 1.25rem;
  }

  .contact-panel {
    padding: 1.4rem;
  }

}
