/* ------------------------------------------------------------------ */
/* Fonts & reset                                                        */
/* ------------------------------------------------------------------ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Lora:ital,wght@0,400;0,600;1,400&display=swap');

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

/* ------------------------------------------------------------------ */
/* Page layout                                                          */
/* ------------------------------------------------------------------ */
body {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: #222;
  background: #f7f5f0;
}

.page-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 1.25rem 4rem;
}

/* ------------------------------------------------------------------ */
/* Year nav (sticky)                                                    */
/* ------------------------------------------------------------------ */
.year-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #f7f5f0;
  border-bottom: 1px solid #ddd;
  padding: 0.6rem 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.75rem;
  align-items: center;
}

.year-nav .nav-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #888;
  margin-right: 0.25rem;
}

.year-nav a {
  font-size: 0.875rem;
  font-weight: 500;
  color: #555;
  text-decoration: none;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  transition: background 0.15s, color 0.15s;
}

.year-nav a:hover {
  background: #e8e4dc;
  color: #111;
}

/* ------------------------------------------------------------------ */
/* Site header                                                          */
/* ------------------------------------------------------------------ */
.site-header {
  padding: 2.5rem 0 1.5rem;
  border-bottom: 2px solid #222;
  margin-bottom: 2rem;
}

.site-header h1 {
  font-family: 'Lora', serif;
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #111;
}

.site-header .intro {
  margin-top: 0.6rem;
  font-size: 0.9rem;
  color: #666;
  max-width: 580px;
}

/* ------------------------------------------------------------------ */
/* Year section                                                         */
/* ------------------------------------------------------------------ */
.year-section {
  margin-top: 2.5rem;
}

/* ------------------------------------------------------------------ */
/* Month / period header                                                */
/* ------------------------------------------------------------------ */
.period-heading {
  font-family: 'Lora', serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: #444;
  margin: 2rem 0 1rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid #ddd;
}

.year-anchor {
  font-size: 1.5rem;
  font-weight: 600;
  color: #111;
  font-family: 'Lora', serif;
  display: block;
  margin-bottom: 0.25rem;
}

/* ------------------------------------------------------------------ */
/* Book card                                                            */
/* ------------------------------------------------------------------ */
.book-card {
  display: flex;
  gap: 1.1rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid #e8e4dc;
  scroll-margin-top: 60px;
}

.book-card:last-child {
  border-bottom: none;
}

/* Lasting impression: amber left accent */
.book-card.lasting {
  padding-left: 0.75rem;
  border-left: 3px solid #6abf3a;
  margin-left: -0.75rem;
}

/* ------------------------------------------------------------------ */
/* Cover image                                                          */
/* ------------------------------------------------------------------ */
.book-cover {
  flex: 0 0 90px;
  width: 90px;
  height: 135px;
  border-radius: 3px;
  overflow: hidden;
  background: #e0ddd6;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 4px rgba(0,0,0,0.12);
}

.book-cover img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* Placeholder when no cover */
.book-cover .placeholder {
  font-family: 'Lora', serif;
  font-size: 2rem;
  font-weight: 600;
  color: #aaa;
  user-select: none;
}

/* ------------------------------------------------------------------ */
/* Book text                                                            */
/* ------------------------------------------------------------------ */
.book-text {
  flex: 1;
  min-width: 0;
}

.book-title {
  font-family: 'Lora', serif;
  font-size: 1rem;
  font-weight: 600;
  font-style: italic;
  color: #111;
  line-height: 1.3;
}

.book-author {
  font-size: 0.875rem;
  color: #666;
  margin-top: 0.15rem;
}

.book-review {
  font-size: 0.9rem;
  color: #333;
  margin-top: 0.5rem;
  line-height: 1.65;
}

.book-review p + p {
  margin-top: 0.65rem;
}

/* Lasting impression badge */
.lasting-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6abf3a;
  margin-left: 0.5rem;
  vertical-align: middle;
  position: relative;
  top: -1px;
}

/* ------------------------------------------------------------------ */
/* Book deeplink button                                                */
/* ------------------------------------------------------------------ */
.book-link-btn {
  -webkit-appearance: none;
  appearance: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0 0.2rem;
  color: #bbb;
  font-family: 'Inter', sans-serif;
  font-style: normal;
  font-weight: 400;
  font-size: 0.85rem;
  vertical-align: middle;
  position: relative;
  top: -1px;
  transition: color 0.15s;
  line-height: 1;
}

.book-link-btn:hover {
  color: #777;
}

/* ------------------------------------------------------------------ */
/* Link-copied toast                                                   */
/* ------------------------------------------------------------------ */
.link-toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(0.4rem);
  background: rgba(30, 30, 30, 0.88);
  color: #fff;
  font-size: 0.78rem;
  font-family: 'Inter', sans-serif;
  padding: 0.35rem 0.9rem;
  border-radius: 20px;
  opacity: 0;
  transition: opacity 0.18s, transform 0.18s;
  pointer-events: none;
  white-space: nowrap;
  z-index: 100;
}

.link-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ------------------------------------------------------------------ */
/* Footer                                                              */
/* ------------------------------------------------------------------ */
.site-footer {
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid #ddd;
  font-size: 0.8rem;
  color: #aaa;
  text-align: center;
}

/* ------------------------------------------------------------------ */
/* Responsive                                                           */
/* ------------------------------------------------------------------ */
@media (max-width: 520px) {
  .book-cover {
    flex: 0 0 70px;
    width: 70px;
    height: 105px;
  }

  .book-title {
    font-size: 0.95rem;
  }

  .book-review {
    font-size: 0.85rem;
  }

  .site-header h1 {
    font-size: 1.4rem;
  }
}
