/* ===== Change these to restyle the whole site ===== */
:root {
  --bg: #000000;
  --text: #ffffff;
  --muted: #9a9a9a;
  --accent: #42AEEE;
  --font: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
/* ================================================== */

* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0 auto;
  max-width: 42rem;
  padding: 2.5rem 1.25rem 5rem;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

.site-header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 3rem; }
.site-name { color: var(--text); font-weight: 700; }
.site-header nav a { color: var(--muted); }
.site-header nav a:hover { color: var(--accent); }

.page-title { font-size: 1.5rem; margin: 0 0 .25rem; }
.year { font-size: 2.25rem; line-height: 1; margin: 3.5rem 0 1.75rem; padding-bottom: .75rem; border-bottom: 1px solid #222; }
.views { display: flex; gap: 1.5rem; margin: 1rem 0 0; }
.views a { color: var(--muted); padding-bottom: .3rem; border-bottom: 2px solid transparent; }
.views a:hover { color: var(--text); text-decoration: none; }
.views a.active { color: var(--text); border-bottom-color: var(--accent); }
.page-title + .views + .year { margin-top: 2.5rem; }
.rating-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.rating-head .stars { font-size: 1em; letter-spacing: .08em; }
.rating-head .count { font-size: .9rem; font-weight: 400; color: var(--muted); }
.card .read-year { color: var(--muted); font-size: .8em; margin: 0 0 .35rem; }

body.wide { max-width: 68rem; }

/* Cover grid */
.book-grid {
  list-style: none; padding: 0; margin: 0;
  display: grid; gap: 2.5rem 1.75rem;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}
.card { display: flex; flex-direction: column; color: var(--text); }
a.card:hover { text-decoration: none; }
a.card:hover .cover { outline: 2px solid var(--accent); outline-offset: 3px; }
a.card .title { color: var(--accent); }
.card .cover { margin-bottom: .85rem; }
.card .title { font-weight: 700; line-height: 1.35; }
.card .author { color: var(--muted); font-size: .9em; margin: .2rem 0 .35rem; }

.row { display: flex; align-items: center; flex-wrap: wrap; gap: .6rem; min-height: 1.5rem; }
.tag {
  font-size: .7rem; font-weight: 700; letter-spacing: .1em; line-height: 1;
  color: var(--accent); border: 1px solid var(--accent); border-radius: 2px; padding: .3rem .45rem .25rem;
}
.is-dnf .cover { opacity: .4; }

/* Covers */
.cover {
  position: relative; aspect-ratio: 2 / 3; overflow: hidden;
  background: #111; border: 1px solid #222; border-radius: 2px;
}
.cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cover-fallback {
  position: absolute; inset: 0; display: flex; align-items: flex-end;
  padding: .9rem; font-weight: 700; font-size: .85rem; line-height: 1.35; color: var(--muted);
}

.stars { color: var(--accent); font-size: 1.75em; letter-spacing: .06em; line-height: 1; }
.stars .dim { color: #333; }
.stars .half {
  background: linear-gradient(90deg, var(--accent) 50%, #333 50%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.book-head { display: grid; grid-template-columns: 220px 1fr; gap: 2rem; align-items: end; margin-bottom: 2.5rem; }
.book-head .row { margin: 0; }
.book h1 { font-size: 1.6rem; line-height: 1.25; margin: 0; }
.book .subtitle { color: var(--muted); margin: .25rem 0 0; }
.book .meta { color: var(--muted); margin: 1rem 0 .75rem; }
.review p { margin: 0 0 1.2em; }
.review blockquote { margin: 0 0 1.2em; padding-left: 1rem; border-left: 2px solid var(--accent); color: var(--muted); }
.review img { display: block; max-width: 100%; height: auto; margin: 0 0 1.2em; border-radius: 2px; }
.back { margin-top: 3rem; }

@media (max-width: 560px) {
  .book-grid { grid-template-columns: repeat(2, 1fr); gap: 2rem 1rem; }
  .book-head { grid-template-columns: 1fr; }
  .book-head .cover { width: 60%; }
}
