/* ================================
   8-BIT BOOKSHELF (Dark Academia)
   ================================ */

@import url('https://fonts.googleapis.com/css2?family=EB+Garamond:wght@400;600&family=Press+Start+2P&family=Pixelify+Sans:wght@400;700&display=swap');

:root {
  --bg: #0f0e0c;
  --wood-dark: #2a1c12;
  --wood-mid: #3d2a1a;
  --wood-hi: #5a3b24;
  --ink: #f5e8c9;
  --shadow: rgba(0,0,0,.55);
}

/* Base page look */
body.bookshelf {
  background: var(--bg);
  color: var(--ink);
  font-family: "VT323", monospace;
}

/* Layout */
body.bookshelf .wrap.bookshelf-wrap {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 16px;
  padding: 16px;
  min-height: 100vh;
}

/* Sidebar */
body.bookshelf .bs-sidebar {
  background: linear-gradient(180deg, var(--wood-mid), var(--wood-dark));
  border: 3px solid #3b2717;
  border-radius: 12px;
  padding: 14px;
  box-shadow: inset 0 0 6px rgba(0,0,0,.6), 0 8px 12px var(--shadow);
}

body.bookshelf .bs-brand .home-link {
  text-decoration: none;
  color: #e3d8b5;
  font-size: 16px;
  letter-spacing: .5px;
}

body.bookshelf .bs-brand .title {
  font-family: "EB Garamond", serif;
  font-size: 40px;
  font-weight: 600;
  color: #f5e8c9;
  text-transform: lowercase;
  letter-spacing: 1px;
  text-shadow: 0 2px 0 #1a120a, 0 3px 8px rgba(0,0,0,.6);
  margin: 6px 0 2px;
}

body.bookshelf .bs-brand .subtitle {
  font-family: "EB Garamond", serif;
  font-size: 14px;
  color: #c7b9a0;
  margin-bottom: 14px;
}

body.bookshelf .bs-nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

body.bookshelf .bs-nav a {
  text-decoration: none;
  color: #f3e7ce;
  background: #2f2216;
  padding: 9px 10px;
  text-align: center;
  border-radius: 8px;
  border: 2px solid #4a3421;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.1);
}

body.bookshelf .bs-nav a.active,
body.bookshelf .bs-nav a:hover {
  background: #4a3421;
  color: #fff7db;
}

/* Main content area */
body.bookshelf .bs-main {
  background: linear-gradient(180deg, var(--wood-hi), var(--wood-mid));
  border-radius: 12px;
  border: 3px solid #3b2717;
  padding: 20px;
  box-shadow: inset 0 0 8px rgba(0,0,0,.5), 0 10px 20px var(--shadow);
}

/* Reading goal */
body.bookshelf .goal {
  margin-bottom: 16px;
}

body.bookshelf .goal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 16px;
  font-weight: 700;
  color: #fff6d5;
}

body.bookshelf .goal-head .label {
  text-transform: uppercase;
  letter-spacing: 1px;
}

body.bookshelf .goal-head .nums {
  font-size: 16px;
  color: #fff9da;
  font-weight: 700;
}

body.bookshelf .goal-bar {
  width: 100%;
  height: 16px;
  margin-top: 6px;
  overflow: hidden;
  border: 2px solid #3b2717;
  border-radius: 6px;
  background: #120d09;
}

body.bookshelf .goal-fill {
  height: 100%;
  width: var(--p, 0%);
  background: linear-gradient(90deg, #c1a260, #e4ca7a);
  transition: width 1.8s ease-out;
}

/* 8-bit shelves */
body.bookshelf .bit-wrap {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

body.bookshelf .bit-shelf {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding: 18px;
  background:
    repeating-linear-gradient(90deg, rgba(0,0,0,.1) 0 2px, transparent 2px 6px),
    linear-gradient(180deg, #3e2c1b, #2a1b10);
  border: 3px solid #1c120a;
  border-radius: 4px;
  box-shadow: 0 4px 0 #1a120a, 0 8px 0 #0d0804, 0 10px 10px rgba(0,0,0,.5);
}

/* Pixel books */
body.bookshelf .bit-book {
  --c: #555;
  width: 100px;
  height: 120px;
  background: var(--c);
  border: 2px solid #000;
  box-shadow:
    inset 0 3px 0 rgba(255,255,255,.15),
    inset 0 -3px 0 rgba(0,0,0,.35),
    3px 3px 0 #000;
  display: flex;
  justify-content: center;
  align-items: center;
  image-rendering: pixelated;
  color: #fff8e1;
  text-align: center;
  text-shadow: 0 1px 0 #000;
  padding: 4px;
}

body.bookshelf .bit-book .ttl {
  font-family: "Pixelify Sans", sans-serif;
  font-size: 10px;
  line-height: 1.2;
  letter-spacing: 0.5px;
  word-wrap: break-word;
  white-space: normal;
  text-align: center;
}

/* Category outlines */
body.bookshelf .bit-book[data-status="tbr"] {
  outline: 2px solid #c2b18d;
}

body.bookshelf .bit-book[data-status="current"] {
  outline: 2px solid #9fb78a;
}

body.bookshelf .bit-book[data-status="reviews"] {
  outline: 2px solid #b78aa8;
}

/* Hover effect */
body.bookshelf .bit-book:hover {
  transform: translateY(-3px);
  box-shadow:
    inset 0 3px 0 rgba(255,255,255,.15),
    inset 0 -3px 0 rgba(0,0,0,.35),
    5px 5px 0 #000,
    0 4px 6px rgba(0,0,0,.5);
}

/* Reviews placeholder */
body.bookshelf .bs-reviews-blurb {
  margin-top: 12px;
  min-height: 40px;
  border-top: 1px dashed rgba(255,255,255,.2);
  color: #d8c8a8;
  font-style: italic;
}

/* Reset bleed from homepage theme */
body.bookshelf .topbar,
body.bookshelf .sidebar,
body.bookshelf .content,
body.bookshelf .newsflash,
body.bookshelf .card,
body.bookshelf .btn { all: unset; }

/* Mobile responsive */
@media (max-width: 760px) {
  body.bookshelf .wrap.bookshelf-wrap { grid-template-columns: 1fr; }
  body.bookshelf .bit-book { width: 80px; height: 100px; }
  body.bookshelf .bit-book .ttl { font-size: 9px; }
}