:root {
  color-scheme: light;
  --ink: #111827;
  --muted: #4b5563;
  --paper: #E7F7FD;
  --card: #ffffff;
  --accent: #3EC0EF;
  --accent-soft: #C3EBFA;
  --border: #E7F7FD;
  --shadow: 0 18px 48px rgba(17, 24, 39, 0.12);
}

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

html {
  min-height: 100%;
  background: radial-gradient(circle at top, #C6E6F1 0%, #A1D6E8 45%, #7CC6DF 100%);
}

body {
  font-family: "Source Sans 3", "Gill Sans", "Helvetica Neue", sans-serif;
  color: var(--ink);
  min-height: 100%;
  background: radial-gradient(circle at top, #C6E6F1 0%, #A1D6E8 45%, #7CC6DF 100%);
  line-height: 1.6;
}

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

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

a:hover,
a:focus-visible {
  color: var(--accent);
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 2.5rem 6vw 1.5rem;
}

.header-text h1 {
  font-family: "Playfair Display", "Times New Roman", serif;
  font-size: clamp(2rem, 3vw, 3rem);
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.name-logo {
  display: inline-block;
  width: 64px;
  height: 64px;
  order: -1;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--accent-soft);
}

.subtitle {
  color: var(--muted);
  font-size: 1rem;
  margin-top: 0.4rem;
}

.sidebar-toggle {
  display: none;
  border: 1px solid var(--border);
  background: var(--card);
  padding: 0.55rem 1rem;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.03em;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(17, 24, 39, 0.08);
}

.page-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 2rem;
  padding: 0 6vw 3rem;
  align-items: start;
}

.main-content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.main-content section {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 2rem;
  box-shadow: var(--shadow);
}

.main-content h2 {
  font-family: "Playfair Display", "Times New Roman", serif;
  font-size: clamp(1.5rem, 2vw, 2.1rem);
  margin-bottom: 1.2rem;
}

.intro-body {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 1.5rem;
  align-items: center;
}

.intro-body img {
  border-radius: 16px;
  border: 1px solid var(--border);
}

.intro-text p {
  margin-bottom: 0.8rem;
}

.latest-book .book-entry {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}

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

.book-list .book-entry {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.25rem;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--paper);
}

.book-list .book-entry img {
  width: 100%;
  border-radius: 14px;
}

.book-info h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

.book-meta {
  color: var(--muted);
  margin-bottom: 1rem;
}

.highlights-list {
  list-style: none;
  display: grid;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.highlights-list li {
  padding: 0.75rem 1rem;
  border-radius: 14px;
  background: var(--accent-soft);
  border: 1px solid var(--border);
}

.sidebar {
  position: sticky;
  top: 1.5rem;
  align-self: start;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.side-nav ul {
  list-style: none;
  display: grid;
  gap: 0.8rem;
}

.side-nav a {
  display: block;
  padding: 0.5rem 0.6rem;
  border-radius: 12px;
  transition: background 0.2s ease, color 0.2s ease;
}

.side-nav a:hover,
.side-nav a:focus-visible {
  background: var(--accent-soft);
}

.side-nav a.active {
  background: var(--accent);
  color: white;
  font-weight: 600;
}

.sidebar-widget {
  margin-top: 1.8rem;
  padding-top: 1.2rem;
  border-top: 1px dashed var(--border);
}

.sidebar-widget h3 {
  font-family: "Playfair Display", "Times New Roman", serif;
  margin-bottom: 0.6rem;
}

.site-footer {
  padding: 1.5rem 6vw 2.5rem;
  color: var(--muted);
}

.sidebar-scrim {
  display: none;
}

@media (max-width: 1000px) {
  .book-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sidebar-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .page-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    top: 5rem;
    right: 1.5rem;
    width: min(320px, 88vw);
    max-height: calc(100vh - 6rem);
    overflow: auto;
    transform: translateX(120%);
    transition: transform 0.25s ease;
    z-index: 20;
  }

  body[data-sidebar-open="true"] .sidebar {
    transform: translateX(0);
  }

  .sidebar-scrim {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(17, 24, 39, 0.35);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 10;
  }

  body[data-sidebar-open="true"] .sidebar-scrim {
    opacity: 1;
    pointer-events: auto;
  }
}

@media (max-width: 720px) {
  .book-list {
    grid-template-columns: 1fr;
  }

  .site-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .intro-body,
  .latest-book .book-entry {
    grid-template-columns: 1fr;
  }
}
