/* reading — cozy parchment bookshelf */

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

html {
  background: #efe3c8;
  background-image:
    radial-gradient(ellipse at 50% 0%, #f5ecd7 0%, #efe3c8 60%);
  background-attachment: fixed;
}

body {
  font-family: "Lora", "Libre Caslon Text", "Iowan Old Style", "Palatino Linotype",
    Palatino, Georgia, serif;
  font-size: 16px;
  line-height: 1.6;
  color: #2a1f10;
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 32px 96px 32px;
}

a {
  color: #7a3e1a;
  text-decoration: none;
  border-bottom: 1px solid rgba(122, 62, 26, 0.4);
}

a:hover {
  color: #3a1a00;
  border-bottom-color: #3a1a00;
}

/* ============ Header ============ */

.back {
  display: inline-block;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 13px;
  color: #6a5638;
  border-bottom: none;
  margin-bottom: 36px;
}

.back:hover {
  color: #2a1f10;
}

.page-header {
  text-align: center;
  margin-bottom: 56px;
  padding-bottom: 36px;
  position: relative;
}

.page-header::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 140px;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    #7a5a2a 20%,
    #7a5a2a 80%,
    transparent 100%
  );
}

.page-header h1 {
  font-family: "Libre Caslon Display", "Playfair Display", "Didot", Georgia,
    serif;
  font-size: 72px;
  font-weight: 400;
  font-style: italic;
  letter-spacing: 0.02em;
  color: #3a2712;
  line-height: 1;
  margin-bottom: 14px;
}

.page-header .subtitle {
  font-size: 14px;
  font-style: italic;
  color: #6a5638;
  letter-spacing: 0.08em;
  text-transform: lowercase;
}

.page-header .page-links {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  justify-content: center;
  font-size: 14px;
  font-style: italic;
}

.page-header .page-links a {
  display: inline-block;
  padding: 4px 12px;
  color: #3a2712;
  background: rgba(181, 152, 114, 0.22);
  border: 1px solid #b59872;
  border-radius: 2px;
  border-bottom: 1px solid #b59872;
}

.page-header .page-links a:hover {
  background: #3a2712;
  color: #fdf8ea;
  border-color: #3a2712;
}

/* ============ Year sections ============ */

.year-shelf {
  margin-bottom: 72px;
  position: relative;
}

.year-shelf h2 {
  font-family: "Libre Caslon Display", "Playfair Display", "Didot", Georgia,
    serif;
  font-size: 44px;
  font-weight: 400;
  font-style: italic;
  color: #7a5a2a;
  margin-bottom: 28px;
  padding-left: 8px;
  display: inline-block;
  border-bottom: 1px dashed #b59872;
  padding-bottom: 4px;
}

.year-shelf h2 .count {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 14px;
  font-style: normal;
  color: #a08868;
  margin-left: 10px;
  vertical-align: middle;
}

/* ============ Books row ============ */

.books {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px 20px;
  padding: 12px 0 28px 0;
}

/* ============ Book card (looks like a book cover) ============ */

.book {
  position: relative;
  background: var(--cover, #6a5a4a);
  color: #fdf8ea;
  padding: 22px 22px 22px 30px;
  border-radius: 2px 8px 8px 2px;
  box-shadow:
    inset 8px 0 0 rgba(0, 0, 0, 0.18),
    inset 14px 0 1px rgba(255, 255, 255, 0.08),
    4px 6px 10px rgba(60, 40, 10, 0.3),
    8px 10px 22px rgba(60, 40, 10, 0.18);
  min-height: 320px;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
}

.book::before {
  /* subtle linen texture overlay */
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
      45deg,
      rgba(255, 255, 255, 0.015) 0 2px,
      transparent 2px 4px
    ),
    repeating-linear-gradient(
      -45deg,
      rgba(0, 0, 0, 0.02) 0 2px,
      transparent 2px 4px
    );
  pointer-events: none;
}

.book::after {
  /* vertical gloss line near the spine */
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 16px;
  width: 1px;
  background: rgba(255, 255, 255, 0.15);
  pointer-events: none;
}

.book:hover {
  transform: translateY(-4px) rotate(-0.4deg);
  box-shadow:
    inset 8px 0 0 rgba(0, 0, 0, 0.18),
    inset 14px 0 1px rgba(255, 255, 255, 0.08),
    6px 10px 16px rgba(60, 40, 10, 0.38),
    10px 14px 28px rgba(60, 40, 10, 0.22);
}

.book-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  padding-bottom: 12px;
  margin-bottom: 14px;
}

.book-title {
  font-family: "Libre Caslon Display", "Playfair Display", "Didot", Georgia,
    serif;
  font-size: 22px;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: 0.005em;
  margin-bottom: 6px;
}

.book-author {
  font-size: 13px;
  font-style: italic;
  opacity: 0.88;
}

.book-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin-top: 8px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.82;
}

.book-meta .genre {
  padding: 1px 7px;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 2px;
}

.book-meta .lang {
  padding: 1px 7px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 2px;
}

.book-stars {
  font-size: 15px;
  letter-spacing: 2px;
  color: #ffd76a;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.3);
  margin-bottom: 12px;
}

.book-stars .off {
  color: rgba(255, 255, 255, 0.22);
}

.book-tldr {
  font-size: 14px;
  font-style: italic;
  line-height: 1.5;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.08);
  border-left: 2px solid rgba(255, 255, 255, 0.4);
  margin-bottom: 12px;
}

.book-notes {
  font-size: 13px;
  line-height: 1.55;
  opacity: 0.92;
  flex: 1;
}

.book-notes p + p {
  margin-top: 8px;
}

.book-notes ul {
  margin: 8px 0 8px 18px;
}

.book-notes li {
  margin-bottom: 4px;
}

.book-notes strong {
  color: #fff7d9;
}

.book-footer {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  opacity: 0.75;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
}

.book-footer .via {
  font-style: italic;
}

/* ============ Wooden shelf plank ============ */

.plank {
  height: 22px;
  margin: 0 -12px;
  border-radius: 2px;
  background:
    linear-gradient(180deg, #5a3a1a 0%, #3e2410 100%),
    repeating-linear-gradient(
      90deg,
      rgba(0, 0, 0, 0.1) 0 20px,
      rgba(255, 255, 255, 0.05) 20px 40px
    );
  background-blend-mode: overlay;
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.12),
    inset 0 -2px 0 rgba(0, 0, 0, 0.4),
    0 6px 12px rgba(60, 40, 10, 0.25);
  position: relative;
}

.plank::before,
.plank::after {
  content: "";
  position: absolute;
  width: 4px;
  height: 4px;
  background: #2a1708;
  border-radius: 50%;
  top: 50%;
  transform: translateY(-50%);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.plank::before {
  left: 16px;
}

.plank::after {
  right: 16px;
}

/* ============ Footer ============ */

footer {
  margin-top: 72px;
  padding-top: 24px;
  border-top: 1px dashed #b59872;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 12px;
  color: #8a7250;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
}

footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

footer a {
  border-bottom: none;
  color: #6a5638;
}

footer a:hover {
  color: #2a1f10;
}

/* ============ Responsive ============ */

@media (max-width: 720px) {
  body {
    padding: 28px 18px 64px 18px;
  }
  .page-header h1 {
    font-size: 48px;
  }
  .year-shelf h2 {
    font-size: 32px;
  }
  .books {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .book {
    min-height: auto;
  }
}
