/* BlueSky butterfly icon in dark grey */
.fa-bluesky::before {
  content: "";
  display: inline-block;
  width: 1em;
  height: 1em;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 568 501" fill="%23787878"><path d="M123.121 33.664C188.241 82.553 258.281 181.68 284 234.873c25.719-53.192 95.759-152.32 160.879-201.21C491.866-1.611 568-28.906 568 57.947c0 17.346-9.945 145.713-15.778 166.555-20.275 72.453-94.155 90.933-159.875 79.748C507.222 323.8 536.444 388.56 473.333 453.32c-119.86 122.992-172.272-30.859-185.702-70.281-2.462-7.227-3.614-10.608-3.631-7.733-.017-2.875-1.169.506-3.631 7.733-13.43 39.422-65.842 193.273-185.702 70.281-63.111-64.76-33.889-129.52 80.986-149.071-65.72 11.185-139.6-7.295-159.875-79.748C9.945 203.659 0 75.291 0 57.946 0-28.906 76.135-1.612 123.121 33.664Z"/></svg>');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  vertical-align: -0.125em;
}

/* Ensure proper display in sidebar */
a[href*="bsky.app"] i.fa-bluesky {
  color: transparent;
}

/* Match other social icon styling - turn white on hover */
.sidebar a[href*="bsky.app"]:hover .fa-bluesky::before,
a[href*="bsky.app"]:hover .fa-bluesky::before {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 568 501" fill="%23ffffff"><path d="M123.121 33.664C188.241 82.553 258.281 181.68 284 234.873c25.719-53.192 95.759-152.32 160.879-201.21C491.866-1.611 568-28.906 568 57.947c0 17.346-9.945 145.713-15.778 166.555-20.275 72.453-94.155 90.933-159.875 79.748C507.222 323.8 536.444 388.56 473.333 453.32c-119.86 122.992-172.272-30.859-185.702-70.281-2.462-7.227-3.614-10.608-3.631-7.733-.017-2.875-1.169.506-3.631 7.733-13.43 39.422-65.842 193.273-185.702 70.281-63.111-64.76-33.889-129.52 80.986-149.071-65.72 11.185-139.6-7.295-159.875-79.748C9.945 203.659 0 75.291 0 57.946 0-28.906 76.135-1.612 123.121 33.664Z"/></svg>');
}

/* Substack icon in dark grey */
.fa-substack::before {
  content: "";
  display: inline-block;
  width: 1em;
  height: 1em;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512" fill="%23787878"><path d="M0 64h448v64H0V64zm0 128h448v64H0v-64zm0 192v64h448v-64H0zm0-64h448v-64H0v64z"/></svg>');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  vertical-align: -0.125em;
}

/* Ensure proper display in sidebar */
a[href*="substack.com"] i.fa-substack {
  color: transparent;
}

/* Match other social icon styling - turn white on hover */
.sidebar a[href*="substack.com"]:hover .fa-substack::before,
a[href*="substack.com"]:hover .fa-substack::before {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512" fill="%23ffffff"><path d="M0 64h448v64H0V64zm0 128h448v64H0v-64zm0 192v64h448v-64H0zm0-64h448v-64H0v64z"/></svg>');
}

/* ===========================
   Book Reviews Page
   =========================== */

.books-page {
  padding: 2rem 0;
}

.books-intro {
  font-size: 1.1rem;
  color: var(--text-muted-color);
  margin-bottom: 3rem;
  text-align: center;
}

.reading-years {
  max-width: 1000px;
  margin: 0 auto;
}

.year-section {
  margin-bottom: 4rem;
}

.year-heading {
  font-size: 2rem;
  font-weight: bold;
  margin-bottom: 2rem;
  padding-bottom: 0.5rem;
  border-bottom: 3px solid var(--link-color);
  color: var(--heading-color);
}

.books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2rem;
}

.book-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border-color);
  border-radius: 8px;
  padding: 1.5rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.book-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.book-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 0.75rem 0;
  color: var(--heading-color);
  line-height: 1.3;
}

.book-rating {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-bottom: 1rem;
}

.star {
  color: #ddd;
  font-size: 1.1rem;
}

.star.filled {
  color: #f39c12;
}

.rating-number {
  margin-left: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted-color);
}

.book-authors {
  font-size: 0.95rem;
  color: var(--text-muted-color);
  font-style: italic;
  margin-bottom: 1rem;
}

.book-review {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-color);
  margin-bottom: 1rem;
}

.book-card-link {
  text-decoration: none;
  color: inherit;
}

.book-card-link:hover .book-title {
  color: var(--link-color);
  text-decoration: underline;
}

.book-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--card-border-color);
}

.book-tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: var(--tag-bg);
  color: var(--text-muted-color);
  border-radius: 15px;
  font-size: 0.85rem;
  text-decoration: none;
  transition: all 0.2s ease;
}

.book-tag:hover {
  background: var(--link-color);
  color: white;
  text-decoration: none;
}

/* Individual Book Review Page */
.book-review-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 0;
}

.book-review-header {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 2px solid var(--card-border-color);
}

.book-review-title {
  font-size: 2.5rem;
  font-weight: bold;
  margin-bottom: 1.5rem;
  color: var(--heading-color);
  line-height: 1.2;
}

.book-review-meta {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.book-date {
  font-size: 0.95rem;
  color: var(--text-muted-color);
  font-style: italic;
}

.book-review-content {
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: 2rem;
}

.book-review-tags {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: var(--card-bg);
  border-radius: 8px;
  border: 1px solid var(--card-border-color);
}

.book-review-tags strong {
  margin-right: 0.75rem;
  color: var(--heading-color);
}

.book-review-footer {
  padding-top: 2rem;
  border-top: 1px solid var(--card-border-color);
}

.back-to-books {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: var(--link-color);
  color: white;
  border-radius: 5px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.back-to-books:hover {
  background: var(--link-hover-color);
  text-decoration: none;
  transform: translateX(-4px);
}

.back-to-albums {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: var(--link-color);
  color: white;
  border-radius: 5px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.back-to-albums:hover {
  background: var(--link-hover-color);
  text-decoration: none;
  transform: translateX(-4px);
}

/* Album cover - index card thumbnail */
.album-cover-thumb {
  display: block;
  margin-bottom: 1rem;
}

.album-cover-thumb img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 4px;
}

/* Album cover - review page */
.album-review-header-inner {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

.album-cover-full {
  flex-shrink: 0;
  width: 200px;
}

.album-cover-full img {
  width: 100%;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

@media (max-width: 768px) {
  .album-review-header-inner {
    flex-direction: column;
  }

  .album-cover-full {
    width: 100%;
    max-width: 250px;
  }
}

/* Album score widget */
.album-score {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #2a2a2a;
  border-radius: 4px;
  width: 120px;
  height: 120px;
  margin-bottom: 0.5rem;
}

.album-score-card {
  width: 90px;
  height: 90px;
}

.album-score-number {
  font-size: 3.5rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1;
  margin-bottom: 0.6rem;
}

.album-score-card .album-score-number {
  font-size: 2.25rem;
}

.album-score-bar-track {
  width: 80%;
  height: 4px;
  background: #444;
  border-radius: 2px;
}

.album-score-bar {
  height: 100%;
  border-radius: 2px;
  transition: width 0.3s ease;
}

.score-red    { background: #e74c3c; }
.score-yellow { background: #f39c12; }
.score-green  { background: #2ecc71; }

/* Responsive adjustments */
@media (max-width: 768px) {
  .books-grid {
    grid-template-columns: 1fr;
  }

  .year-heading {
    font-size: 1.75rem;
  }

  .book-review-title {
    font-size: 2rem;
  }

  .book-review-content {
    font-size: 1rem;
  }
}
