/*
  custom.css — site-specific additions on top of The Proportional Web.
  Kept deliberately minimal and monochrome to match the base stylesheet's
  own philosophy (see their §1.2 Colors): reserve color for the rare
  moment it actually carries meaning.
*/

/* ---------- Page transitions (View Transitions API) ---------- */

@view-transition {
  navigation: auto;
}

::view-transition-old(root) {
  animation: 120ms ease-out both vt-fade-out;
}

::view-transition-new(root) {
  animation: 180ms ease-in both vt-fade-in;
}

@keyframes vt-fade-out {
  to { opacity: 0; }
}

@keyframes vt-fade-in {
  from { opacity: 0; }
}

/* ---------- Business card ---------- */

.business-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: calc(var(--line-height) * 2) 0 calc(var(--line-height) * 3);
}

.card-name {
  margin: var(--line-height) 0 0;
  border-bottom: none;
  padding: 0;
  letter-spacing: 0.2em;
}

.card-role {
  margin-top: calc(var(--line-height) / 2);
  font-family: "Alegreya SC", serif;
  font-variant: all-small-caps;
  font-size: 0.875rem;
  letter-spacing: 0.1em;
  text-indent: 0;
}

.card-links {
  display: flex;
  gap: 3ch;
  margin-top: calc(var(--line-height) * 1.5);
  font-family: "Alegreya SC", serif;
  font-variant: all-small-caps;
  font-size: 0.875rem;
  letter-spacing: 0.1em;
}

.card-links > * {
  margin-top: 0;
}

.card-links a {
  text-decoration: none;
}

.card-links a:hover {
  text-decoration: underline;
  text-decoration-thickness: var(--border-thickness);
}

/* ---------- HR divider ---------- */

hr::after {
  content: "◆  ◆  ◆";
  font-size: 0.75rem;
  letter-spacing: 0.75em;
  width: 7ch;
  left: calc(50% - 3.5ch);
}

/* ---------- Site header / navigation ---------- */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0 2ch;
  border-bottom: var(--border-thickness) solid var(--text-color);
  padding-bottom: calc(var(--line-height) - var(--border-thickness));
  margin-bottom: var(--line-height);
}

.nav-monogram {
  display: block;
  width: 2rem;
  height: 2rem;
}

/* Suppress *+* margin-top on flex children (brand + nav) */
.site-header > *,
.site-header nav > * {
  margin-top: 0;
}

.site-header .brand {
  font-family: "Alegreya SC", serif;
  font-variant: titling-caps;
  font-size: 1.25rem;
  letter-spacing: 0.15em;
  text-decoration: none;
}

.site-header nav {
  display: flex;
  gap: 2ch;
}

.site-header nav a {
  font-family: "Alegreya SC", serif;
  font-variant: all-small-caps;
  font-size: 1rem;
  letter-spacing: 0.1em;
  text-decoration: none;
}

.site-header nav a:hover,
.site-header nav a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-thickness: var(--border-thickness);
}

.site-footer {
  margin-top: calc(var(--line-height) * 3);
  padding-top: calc(var(--line-height) - var(--border-thickness));
  border-top: var(--border-thickness) solid var(--text-color);
  font-size: 0.875rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
}

/* Suppress *+* margin-top on footer flex children */
.site-footer > * {
  margin-top: 0;
}

/* ---------- Status tags (reading / finished / dnf / shelved) ---------- */

.status-tag {
  font-family: "Alegreya SC", serif;
  font-variant: all-small-caps;
  font-size: 0.875em;
  letter-spacing: 0.1em;
  border: var(--border-thickness) solid var(--text-color);
  padding: 0 0.75ch;
  white-space: nowrap;
}

/* ---------- Rating marks ---------- */

.rating {
  letter-spacing: 0.2em;
  font-size: 0.9em;
}

.rating .empty {
  opacity: 0.25;
}

/* ---------- Entry list (books / posts index pages) ---------- */

.entry-list {
  list-style: none;
  padding: 0;
  margin: var(--line-height) 0 0;
}

.entry-list > li {
  padding: var(--line-height) 0;
  border-bottom: 1px solid var(--text-color);
}

.entry-list > li:first-child {
  padding-top: 0;
}

.entry-list > li:last-child {
  border-bottom: none;
}

/* Base CSS adds a bullet via ul li::before — suppress it here */
.entry-list > li::before {
  content: none;
}

.entry-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 2ch;
  text-decoration: none;
  flex-wrap: wrap;
}

/* Suppress *+* margin-top on flex children so baseline alignment holds */
.entry-row > * {
  margin-top: 0;
}

.entry-row .entry-title {
  font-size: 1.125rem;
}

.entry-row:hover .entry-title {
  text-decoration: underline;
  text-decoration-thickness: var(--border-thickness);
}

.entry-meta {
  font-size: 0.875rem;
  white-space: nowrap;
}

.entry-description {
  margin-top: calc(var(--line-height) / 2);
  font-size: 0.9375rem;
  text-indent: 0;
}

.entry-group-heading {
  margin-top: calc(var(--line-height) * 2);
}

/* ---------- Homepage hero ---------- */

.hero-eyebrow {
  font-family: "Alegreya SC", serif;
  font-variant: all-small-caps;
  letter-spacing: 0.15em;
  font-size: 0.9375rem;
}

.hero-current {
  border-left: calc(var(--border-thickness) * 2) solid var(--text-color);
  padding-left: 2ch;
  margin-top: var(--line-height);
}

.hero-current .entry-title {
  font-size: 1.5rem;
}

.tag-list {
  font-size: 0.8125rem;
  font-style: italic;
  text-indent: 0;
}

/* ---------- Book cover ---------- */

.book-cover-wrap {
  float: right;
  margin: 0 0 var(--line-height) calc(var(--line-height) * 2);
  line-height: 0;
}

.book-cover-wrap img {
  width: 12ch;
  display: block;
  border: var(--border-thickness) solid var(--text-color);
}

/* Clear the float after the prose so the footer doesn't ride up */
.book-cover-clear {
  clear: both;
}
