/* =========================================
   THE CHAPTER CIRCLE - BOOK CLUB STYLES
   ========================================= */

/* CSS CUSTOM PROPERTIES (DESIGN TOKENS)
   ===================================== */
:root {
  /* Color Palette */
  --bg: #ffffff;
  --bg-alt: #fafafa;
  --panel: #ffffff;
  --panel-alt: #f5f5f5;
  --border: #e5e7eb;
  --border-strong: #d1d5db;
  --accent: #2563eb;
  --accent-accent: #1d4ed8;
  --accent-soft: #eff6ff;
  --text: #111827;
  --muted: #6b7280;
  --danger: #dc2626;
  
  /* Border Radius */
  --radius-xs: 3px;
  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 24px;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(0, 0, 0, 0.04);
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  
  /* Effects */
  --gradient-accent: linear-gradient(90deg, #3b82f6, #2563eb);
  --focus: 0 0 0 3px rgba(59, 130, 246, 0.4);
  
  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  
  /* Typography */
  --font-family-sans: "Geist", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif;
  --font-family-serif: "Literata", Georgia, "Times New Roman", serif;
  --font-size-xs: 0.75rem;    /* 12px at 16px base */
  --font-size-sm: 0.875rem;   /* 14px at 16px base */
  --font-size-base: 1rem;     /* 16px - base size */
  --font-size-lg: 1.125rem;   /* 18px at 16px base */
  --font-size-xl: 1.5rem;     /* 24px at 16px base */
  --font-size-2xl: 2rem;      /* 32px at 16px base */
  --font-size-3xl: 2.5rem;    /* 40px at 16px base */
  
  /* Base Settings */
  font-size: 16px;
  color-scheme: light;
}

/* RESET & BASE STYLES
   ================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-family-sans);
  color: var(--text);
  background: var(--bg-alt);
  -webkit-font-smoothing: antialiased;
  line-height: 1.4;
}

/* TYPOGRAPHY
   ========== */
h1,
h2,
h3 {
  font-family: var(--font-family-serif);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.5px;
  margin: 0;
}

h1 {
  font-size: clamp(var(--font-size-2xl), 5vw, var(--font-size-3xl));
}

h2 {
  font-size: clamp(var(--font-size-xl), 4vw, var(--font-size-2xl));
}

h3 {
  font-size: var(--font-size-lg);
}

p {
  line-height: 1.55;
  margin: 0 0 1rem;
}

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

/* SKIP LINK (ACCESSIBILITY)
   ========================= */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--accent);
  color: #fff;
  padding: var(--space-sm) var(--space-md);
  z-index: 1000;
  border-radius: 0 0 var(--radius-sm) 0;
  text-decoration: none;
}

.skip-link:focus {
  top: 0;
  box-shadow: var(--focus);
}
/* MOBILE BAR & HAMBURGER MENU
   ============================ */
.mobile-bar {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  align-items: center;
  justify-content: space-between;
  padding: 0 0.9rem;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  z-index: 130;
}

.hamburger {
  position: relative;
  z-index: 120;
  height: 46px;
  display: none;
  align-items: center;
  justify-content: center;
  background: var(--panel);
  border: none;
  cursor: pointer;
  padding: 0 12px;
  transition: background 0.25s, border-color 0.25s;
  font-family: var(--font-family-sans);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.hamburger:hover,
.hamburger:focus {
  background: var(--panel-alt);
  border-color: var(--border-strong);
}

.hamburger .menu-text {
  transition: opacity 0.2s ease;
}

.menu-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 90;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s, visibility 0.35s;
}

body.menu-open .menu-backdrop {
  opacity: 1;
  visibility: visible;
}

body.menu-open {
  overflow: hidden;
}

/* APP SHELL LAYOUT
   ================ */
.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 150px;
  padding: var(--space-lg) 0.8rem 1.2rem 1.2rem;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  align-self: flex-start;
  height: 100vh;
  border-right: 1px solid var(--border);
}

.sidebar .logo {
  font-size: var(--font-size-base);
  margin-bottom: var(--space-lg);
}

/* SIDEBAR NAVIGATION
   ================== */
.side-nav {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-bottom: auto;
}

.side-nav-item {
  background: none;
  border: 0;
  padding: 0.15rem;
  text-align: left;
  cursor: pointer;
  font: inherit;
  font-weight: 500;
  color: var(--muted);
  position: relative;
  border-radius: 4px;
  font-size: var(--font-size-sm);
  letter-spacing: 0.5px;
  transition: color 0.2s ease;
}

.side-nav-item:after {
  display: none;
}

.side-nav-item:hover,
.side-nav-item:focus {
  color: var(--text);
}

.side-nav-item.is-active {
  color: var(--text);
  font-weight: 600;
}

.sidebar-footer {
  margin-top: var(--space-xl);
}

/* MAIN CONTENT AREA
   ================= */
.content-area {
  padding: var(--space-lg) 1.2rem 1.2rem 0.8rem;
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.content-area .hero-inner,
.content-area .section {
  width: min(1000px, 92%);
  margin-inline: auto;
}

@media (max-width: 860px) {
  .mobile-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 0.9rem;
    background: var(--panel);
    border-bottom: 1px solid var(--border);
    z-index: 130;
  }
  .mobile-bar .logo {
    margin: 0;
    font-size: var(--font-size-sm);
    line-height: 1.1;
  }
  .mobile-bar .logo-text {
    font-size: var(--font-size-base);
  }
  .hamburger {
    display: flex;
  }
  .sidebar .logo {
    display: none; /* Hide logo in mobile slide-in menu */
  }
  .sidebar {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: auto; /* right-side drawer */
    width: min(340px, 85%);
    height: 100dvh;
    flex-direction: column;
    align-items: flex-start;
    padding: 5.5rem 1.4rem 2rem; /* space for mobile bar */
    background: linear-gradient(155deg, var(--panel), var(--panel-alt));
    /* Hidden off-canvas to the right */
    transform: translateX(100%);
    transition: transform 0.45s cubic-bezier(0.65, 0.05, 0.36, 1);
    z-index: 100;
    overflow-y: auto;
    box-shadow: 0 0 0 1px var(--border), -6px 0 18px -4px rgba(0, 0, 0, 0.25);
    border-left: 1px solid var(--border);
  }
  body.menu-open .sidebar {
    transform: translateX(0);
  }
  .side-nav {
    flex-direction: column;
    align-items: stretch;
    gap: 0.8rem;
    width: 100%;
    margin-top: 0.5rem;
  }
  .side-nav-item {
    font-size: var(--font-size-lg);
    padding: 0.9rem 0.25rem;
    font-weight: 600;
    letter-spacing: 0.5px;
  }
  .sidebar-footer {
    display: block;
    margin-top: 3rem;
  }
  /* Ensure each content section fills viewport (minus header) for swipe feel */
  .content-area .panel.is-active .section {
    min-height: calc(100dvh - 60px);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding-top: 1rem;
  }
  .app-shell {
    flex-direction: column;
  }
  .content-area {
    height: auto;
    padding-top: 4.6rem;
  }
  .panel .section {
    padding-bottom: 2.5rem;
  }
}

/* PANELS & SECTIONS
   ================= */
.panel {
  display: none;
  animation: fadePanel 0.35s ease;
}

.panel.is-active {
  display: block;
}

/* Fix spacing between section element and .section div */
section {
  margin: 0;
  padding: 0;
}

.section {
  margin: 0;
  padding: 0;
}

.section h2 {
  margin-top: 0;
  margin-bottom: 3rem;
}

.section .muted {
  color: var(--muted);
}

@keyframes fadePanel {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.container {
  width: min(1200px, 92%);
  margin: 0 auto;
}
.flex {
  display: flex;
}
.center-y {
  align-items: center;
}
.between {
  justify-content: space-between;
}
.grid.two {
  display: grid;
  gap: 3rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.grid.three {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.align-start {
  align-items: start;
}

.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--accent);
  color: #000;
  padding: 0.5rem 1rem;
  z-index: 1000;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus {
  top: 0;
  box-shadow: var(--focus);
}

.site-header {
  position: sticky;
  top: 0;
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.85);
  z-index: 50;
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  padding-block: 0.85rem;
}
.logo {
  font-weight: 600;
  display: flex;
  gap: 0.5rem;
  align-items: center;
  font-size: var(--font-size-lg);
  letter-spacing: 0.5px;
}
.logo-mark {
  font-size: var(--font-size-xl);
}
.logo-text {
  font-family: "Geist", system-ui, sans-serif;
  font-weight: 600;
  letter-spacing: -0.5px;
  font-size: var(--font-size-xl);
}

.site-nav {
  position: relative;
}
.nav-toggle {
  display: none;
  background: var(--panel-alt);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 0.55rem 0.9rem;
  border-radius: var(--radius-sm);
  font-weight: 500;
  cursor: pointer;
}
.nav-toggle:hover {
  background: #ececec;
}
.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 2.2rem;
}
.nav-list a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 500;
  position: relative;
  font-size: var(--font-size-sm);
}
.nav-list a:hover,
.nav-list a:focus {
  color: var(--text);
}
.nav-list a:after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.25s;
  border-radius: 2px;
}
.nav-list a:hover:after,
.nav-list a:focus:after,
.nav-list a:active:after {
  width: 100%;
}

@media (max-width: 760px) {
  .section h2{
    text-align:center;
  }
  .nav-toggle {
    display: inline-block;
  }
  .nav-list {
    position: absolute;
    right: 0;
    top: calc(100% + 0.5rem);
    flex-direction: column;
    background: var(--panel);
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    min-width: 200px;
    box-shadow: var(--shadow);
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition: 0.25s;
  }
  .nav-list.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
}

.hero {
  position: relative;
  padding: 4.5rem 0 3.5rem;
}
.hero-inner {
  max-width: 880px;
}
.hero-copy h1 {
  font-size: clamp(var(--font-size-2xl), 5.2vw, 3.6rem);
  font-weight: 600;
  background: none;
  color: var(--text);
  margin: 0 0 1.5rem;
}
.hero-copy p {
  font-size: var(--font-size-lg);
  color: var(--muted);
  max-width: 60ch;
  margin: 0;
}
.hero-actions {
  display: flex;
  gap: 0.9rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

/* LOGO COMPONENT
   ============== */
.logo {
  font-weight: 600;
  display: flex;
  gap: var(--space-sm);
  align-items: center;
  font-size: var(--font-size-lg);
  letter-spacing: 0.5px;
}

.logo-text {
  font-family: var(--font-family-sans);
  font-weight: 600;
  letter-spacing: -0.5px;
  font-size: var(--font-size-xl);
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  padding: 1.5rem 1.35rem 1.6rem;
  border-radius: var(--radius);
  position: relative;
  box-shadow: var(--shadow-sm);
}
.card.highlight {
  background: var(--accent-soft);
  border-color: var(--accent-soft);
}
.quote {
  font-size: var(--font-size-base);
}
.quote p {
  margin: 0 0 0.8rem;
}
.quote .attribution {
  margin: 0;
  color: var(--muted);
  font-size: var(--font-size-xs);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.checklist {
  list-style: none;
  padding: 0;
  margin: 1.2rem 0;
  display: grid;
  gap: 0.6rem;
}
.checklist li {
  position: relative;
  padding-left: 1.65rem;
}
.checklist li:before {
  content: "✔";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--accent);
  font-size: var(--font-size-sm);
}

/* .featured wrapper inherits spacing utilities */
.featured-grid {
  display: flex;
  gap: 3rem;
  align-items: start;
  flex-direction: column;
}

.featured-meta {
  max-width: 600px;
}

.book-description {
  max-width: 500px;
}

@media (min-width: 768px) {
  .featured-grid {
    flex-direction: row;
  }
}
.cover.big-cover {
  width: 100%;
  max-width: 130px; /* enlarged from 260px */
  aspect-ratio: 3/4.2;
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  border-radius: calc(var(--radius) - 4px);
  box-shadow: 0 2px 14px -2px rgba(0,0,0,0.10), 0 0 0 1px rgba(0,0,0,0.05);
  position: relative;
  /* margin-inline: auto; */
  transition: transform 0.3s ease;
  overflow: hidden; /* Ensure images don't overflow rounded corners */
}
.cover.big-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: calc(var(--radius) - 4px);
  transition: opacity 0.3s ease;
}
.cover.big-cover.loading {
  background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
}
.cover.big-cover.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 24px;
  height: 24px;
  margin: -12px 0 0 -12px;
  border: 2px solid #d1d5db;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (min-width: 900px) {
  .featured-grid {
    grid-template-columns: minmax(220px, 300px) 1fr; /* widened to match larger cover */
  }
}
.featured-grid + .featured-grid {
  margin-top: 3.5rem;
}
.book-title {
  margin: 0 0 0.5rem;
  font-size: var(--font-size-lg);
}
.book-date {
  font-size: var(--font-size-xl);
  margin: 0 0 0.8rem;
  font-weight: 600;
  color: var(--text);
}
/* Smaller themed lists & essays */
ul.themes, ul.essay-links {
  font-size: var(--font-size-xs);
  line-height: 1.4;
  margin: 0 0 1rem;
  padding-left: 1.05rem;
}
ul.themes li, ul.essay-links li { margin-bottom: 0.35rem; }
ul.essay-links a { text-decoration: none; color: var(--accent-accent); }
ul.essay-links a:hover, ul.essay-links a:focus { text-decoration: underline; }
.author {
  margin: 0 0 1rem;
  font-weight: 500;
  color: var(--accent-accent);
}
.tags {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin: 1rem 0 1.2rem;
}
.tag {
  background: var(--panel-alt);
  color: var(--muted);
  padding: 0.35rem 0.7rem;
  font-size: var(--font-size-xs);
  letter-spacing: 0.5px;
  border-radius: 999px;
  border: 1px solid var(--border);
  text-transform: uppercase;
  font-weight: 600;
}
.details summary {
  cursor: pointer;
  font-weight: 600;
}
.details ul {
  margin: 0.8rem 0 0;
  padding-left: 1.2rem;
}

.timeline {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  border-left: 2px solid var(--border);
  display: grid;
  gap: 2rem;
}
.timeline > li {
  position: relative;
  padding-left: 1.5rem;
}
.timeline > li:before {
  content: "";
  position: absolute;
  left: -9px;
  top: 4px;
  width: 14px;
  height: 14px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 0 3px #fff, 0 0 0 5px rgba(37, 99, 235, 0.35);
}
.timeline time {
  display: inline-block;
  font-weight: 600;
  letter-spacing: 0.5px;
  background: var(--accent-soft);
  padding: 0.3rem 0.6rem;
  border-radius: var(--radius-xs);
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  color: var(--accent-accent);
  margin-bottom: 0.4rem;
}
.timeline.horizontal {
  display: flex;
  gap: 2.5rem;
  border-left: 0;
  border-top: 2px solid var(--border);
  padding-top: 1.5rem;
  overflow-x: auto;
  scrollbar-width: thin;
}
.timeline.horizontal > li {
  padding-left: 0;
  padding-top: 1.2rem;
  min-width: 200px;
}
.timeline.horizontal > li:before {
  left: 50%;
  top: 0;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 3px #fff, 0 0 0 5px rgba(37, 99, 235, 0.25);
}
.timeline.horizontal > li {
  position: relative;
}
.timeline.horizontal > li:after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0;
}
.timeline.horizontal h3 {
  font-size: var(--font-size-sm);
}
.timeline.horizontal p {
  font-size: var(--font-size-xs);
}
@media (max-width: 680px) {
  .timeline.horizontal {
    gap: 1.8rem;
  }
}
.timeline h3 {
  margin: 0 0 0.2rem;
  font-size: var(--font-size-lg);
}
.timeline p {
  margin: 0;
}

.members {
  background: var(--bg-alt);
}
.cards.three {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  margin-top: 2rem;
}
.cards.three .card {
  background: var(--panel);
}

/* Upcoming Books (vertical list) */
.upcoming-books {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  max-height: 420px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  scrollbar-width: thin;
}
.upcoming-books li {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 1.2rem;
  align-items: start;
  background: var(--panel);
  border: 1px solid var(--border);
  padding: 1rem 1rem 1rem 0.9rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
@media (max-width: 600px) {
  .upcoming-books li {
    grid-template-columns: 70px 1fr;
  }
}
.upcoming-books time {
  display: inline-block;
  font-size: var(--font-size-xs);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  background: var(--accent-soft);
  padding: 0.4rem 0.55rem;
  border-radius: var(--radius-xs);
  color: var(--accent-accent);
  font-weight: 600;
  margin-top: 0.2rem;
}
.upcoming-books h3 {
  margin: 0.2rem 0 0.4rem;
  font-size: var(--font-size-lg);
  letter-spacing: -0.3px;
}
.upcoming-books p {
  margin: 0;
  color: var(--muted);
}
.upcoming-books li:hover,
.upcoming-books li:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent-soft), var(--shadow-sm);
}

/* Previous Books (grid) */
.previous-books {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  display: grid;
  gap: 1.4rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.previous-books .book-card {
  display: flex;
  gap: 1rem;
  background: var(--panel);
  border: 1px solid var(--border);
  padding: 1rem 1rem 1.05rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}
.previous-books .book-card:after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    120deg,
    transparent 70%,
    rgba(255, 255, 255, 0.4) 85%,
    transparent 92%
  );
  opacity: 0;
  transition: opacity 0.35s;
}
.previous-books .book-card:hover:after,
.previous-books .book-card:focus-within:after {
  opacity: 0.9;
}
.previous-books .cover.small-cover {
  width: 54px;
  flex: 0 0 54px;
  aspect-ratio: 3/4.4;
  background: var(--cover-accent, #e5e7eb);
  border-radius: calc(var(--radius-sm) + 2px);
  box-shadow: 0 2px 6px -2px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.05);
}
.previous-books .meta {
  flex: 1;
  min-width: 0;
}
.previous-books .title {
  margin: 0 0 0.35rem;
  letter-spacing: -0.3px;
}
.previous-books .author {
  margin: 0 0 0.4rem;
  font-size: var(--font-size-xs);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--accent-accent);
}
.previous-books .blurb {
  margin: 0;
  color: var(--muted);
  line-height: 1.35;
}
.previous-books .tags {
  margin: 0 0 0.5rem;
  gap: 0.35rem;
}
.previous-books .tag {
  font-size: var(--font-size-xs);
  padding: 0.3rem 0.55rem;
}
@media (max-width: 640px) {
  .previous-books {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
  .previous-books .book-card {
    flex-direction: row;
  }
}

.join .form {
  max-width: 640px;
}
.join.minimal .card {
  padding: 1.25rem 1.25rem 1.4rem;
}
.join-intro {
  margin-bottom: 1.5rem;
}
.form.simple .field-inline {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.form.simple .field-inline .field {
  flex: 1 1 220px;
}
.xsmall {
  font-size: var(--font-size-xs);
}
.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1rem;
}
label {
  font-size: var(--font-size-xs);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--muted);
}
input,
select,
textarea {
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text);
  font: inherit;
  padding: 0.7rem 0.8rem;
  border-radius: var(--radius-sm);
  resize: vertical;
}
input:focus,
select:focus,
textarea:focus {
  outline: none;
  box-shadow: var(--focus);
  border-color: var(--accent);
}
select option {
  background: #ffffff;
}
.form-status {
  margin-top: 1rem;
}
.success {
  color: #16a34a;
}

.btn {
  --btn-bg: var(--panel-alt);
  --btn-border: var(--border);
  --btn-color: var(--text);
  --btn-bg-hover: #ebeff5;
  --btn-border-hover: var(--border-strong);
  cursor: pointer;
  font-weight: 500;
  border-radius: var(--radius-sm);
  padding: 0.8rem 1.25rem;
  border: 1px solid var(--btn-border);
  color: var(--btn-color);
  font-size: var(--font-size-sm);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  position: relative;
}
.btn:hover,
.btn:focus {
  background: var(--btn-bg-hover);
  border-color: var(--btn-border-hover);
}
.btn.primary {
  --btn-bg: var(--accent);
  --btn-border: var(--accent);
  --btn-color: #fff;
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 2px 6px -1px rgba(37, 99, 235, 0.4),
    0 1px 3px rgba(0, 0, 0, 0.08);
}
.btn.primary:hover,
.btn.primary:focus {
  filter: brightness(1.05);
}
.btn.outline {
  background: transparent;
  border-color: var(--border);
}
.btn.full {
  width: 100%;
}

.site-footer {
  background: #ffffff;
  border-top: 1px solid var(--border);
  padding: 2.25rem 0 2.8rem;
  margin-top: 3rem;
  font-size: var(--font-size-sm);
}
.site-footer.minimal .footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}
.social {
  list-style: none;
  display: flex;
  gap: 0.9rem;
  padding: 0;
  margin: 0;
}
.social a {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--muted);
  text-decoration: none;
  transition: 0.2s background, 0.2s color, 0.2s border-color;
}
.social a:hover,
.social a:focus {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.footer-grid {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  align-items: start;
}
.footer-nav {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.5rem;
}
.footer-nav a {
  color: var(--muted);
  text-decoration: none;
}
.footer-nav a:hover {
  color: var(--text);
}
.footer-meta {
  margin-top: 0.5rem;
}

.muted {
  color: var(--muted);
}
.bullets {
  margin: 0.8rem 0 1.2rem;
}
.bullets li {
  margin-bottom: 0.4rem;
}
.bullets.small {
  font-size: var(--font-size-sm);
}

/* Utilities */
.primary-text {
  color: var(--accent-accent);
}
.muted-text {
  color: var(--muted);
}

/* Scrollbar (webkit) */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: #ffffff;
}
::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 6px;
}
::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}

/* Vertical Timeline Styles */
.timeline-vertical {
  position: relative;
  margin: 2rem 0;
  padding-left: 0;
}

.timeline-vertical::before {
  content: '';
  position: absolute;
  left: 40px;
  top: 0;
  bottom: 5rem;
  width: 1px;
  background: var(--border);
  z-index: 1;
}

.timeline-item {
  position: relative;
  padding-left: 100px;
  padding-bottom: 5rem;
  display: flex;
  align-items: flex-start;
  gap: 2rem;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item:last-child::before {
  content: '';
  position: absolute;
  left: 40px;
  top: 80px;
  width: 1px;
  height: calc(100% - 80px);
  background: var(--bg);
  z-index: 2;
}

.timeline-marker {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 2;
}

.timeline-date {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 80px;
  height: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}

.timeline-month {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--text);
  line-height: 1;
  text-transform: uppercase;
}

.timeline-year {
  font-size: var(--font-size-xs);
  color: var(--muted);
  font-weight: 500;
  line-height: 1;
}

.timeline-content {
  flex: 1;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  transition: none;
  padding: 0;
  overflow: visible;
}

.timeline-content:hover {
  box-shadow: none;
  transform: none;
  border-color: transparent;
}

.timeline-book {
  display: flex;
  gap: 1.5rem;
  padding: 0;
  align-items: flex-start;
}

.timeline-meta {
  flex: 1;
}

.timeline-meta .book-title {
  font-size: var(--font-size-xl);
  margin: 0 0 0.5rem;
  color: var(--text);
  font-weight: 600;
}

.timeline-meta .book-description {
  color: var(--muted);
  margin: 0 0 1rem;
  line-height: 1.5;
}

.timeline-details {
  margin-top: 1rem;
}

.timeline-details .label {
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--text);
  margin: 1rem 0 0.3rem;
}

.timeline-details .label:first-child {
  margin-top: 0;
}

.theme-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.theme-tag {
  display: inline-block;
  background: var(--panel-alt);
  color: var(--muted);
  padding: 0.25rem 0.6rem;
  font-size: var(--font-size-xs);
  border-radius: 999px;
  border: 1px solid var(--border);
  text-transform: none;
  font-weight: 500;
}

.timeline-vertical .cover.big-cover {
  width: 120px;
  max-width: 120px;
  margin: 0;
  flex-shrink: 0;
}

/* Mobile timeline adjustments */
@media (max-width: 768px) {
  .timeline-vertical::before {
    display: none;
  }
  
  .timeline-item {
    padding-left: 0;
    gap: 1rem;
    flex-direction: column;
    align-items: flex-start;
  }
  
  .timeline-item:last-child::before {
    display: none;
  }
  
  .timeline-marker {
    position: static;
    align-self: flex-start;
  }
  
  .timeline-date {
    width: 60px;
    height: 60px;
    margin: 0 0 1rem 0;
  }
  
  .timeline-month {
    font-size: var(--font-size-sm);
  }
  
  .timeline-year {
    font-size: var(--font-size-xs);
  }
  
  .timeline-content {
    width: 100%;
  }
  
  .timeline-book {
    flex-direction: column;
    gap: 1rem;
    padding: 0;
    align-items: flex-start;
    text-align: left;
  }
  
  .timeline-vertical .cover.big-cover {
    width: 100px;
    max-width: 100px;
    align-self: flex-start;
  }
  
  .timeline-details {
    text-align: left;
  }
}

/* Extra small screens */
@media (max-width: 480px) {
  .timeline-vertical::before {
    display: none;
  }
  
  .timeline-item {
    padding-left: 0;
    flex-direction: column;
    align-items: flex-start;
  }
  
  .timeline-item:last-child::before {
    display: none;
  }
  
  .timeline-marker {
    position: static;
    align-self: flex-start;
  }
  
  .timeline-date {
    width: 50px;
    height: 50px;
    margin: 0 0 1rem 0;
  }
  
  .timeline-month {
    font-size: var(--font-size-xs);
  }
  
  .timeline-year {
    font-size: var(--font-size-xs);
  }
  
  .timeline-content {
    width: 100%;
  }
  
  .timeline-book {
    padding: 0;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
  }
  
  .timeline-vertical .cover.big-cover {
    width: 80px;
    max-width: 80px;
    align-self: flex-start;
  }
}

/* Typography Utility Classes
   ========================= */
.text-xs { font-size: var(--font-size-xs); }
.text-sm { font-size: var(--font-size-sm); }
.text-base { font-size: var(--font-size-base); }
.text-lg { font-size: var(--font-size-lg); }
.text-xl { font-size: var(--font-size-xl); }
.text-2xl { font-size: var(--font-size-2xl); }
.text-3xl { font-size: var(--font-size-3xl); }

/* Motion reduction */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition: none !important;
  }
}
