:root {
  color-scheme: light;
  --ink: #141414;
  --ink-dim: #5c5c5c;
  --parchment: #fdfdfb;
  --parchment-raised: #f3f3f0;
  --rule: #e2e2de;
  --accent: #2b2b2b;
}

* {
  box-sizing: border-box;
}

.ginkgo-wind {
  position: fixed;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.app {
  position: relative;
}

body {
  margin: 0;
  background: var(--parchment);
  color: var(--ink);
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  line-height: 1.6;
}

h1, h2, h3 {
  font-weight: 400;
  letter-spacing: 0.02em;
}

h1 {
  font-size: 1.8rem;
  font-variant-caps: small-caps;
}

h2 {
  font-size: 1.2rem;
  color: var(--accent);
  border-bottom: 1px solid var(--rule);
  padding-bottom: 0.3rem;
  margin-top: 2rem;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.site-header {
  position: relative;
  z-index: 1;
  background: var(--parchment);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1.5rem 2rem;
  border-bottom: 1px double var(--rule);
}

.site-title {
  margin: 0;
}

.site-title-block {
  display: flex;
  flex-direction: column;
}

.site-tagline {
  margin: 0.1rem 0 0;
  font-size: 1rem;
  font-style: italic;
  letter-spacing: 0.03em;
  color: var(--ink-dim);
  background-image:
    linear-gradient(
      248deg,
      transparent 0%,
      #ffffff66 22%,
      transparent 46%,
      #ffffff40 74%,
      transparent 100%
    ),
    linear-gradient(
      112deg,
      hsl(0 44% 44%) 0%,
      hsl(35 50% 44%) 16%,
      hsl(52 46% 38%) 30%,
      hsl(140 36% 38%) 44%,
      hsl(210 40% 44%) 58%,
      hsl(258 34% 50%) 72%,
      hsl(300 36% 46%) 86%,
      hsl(0 44% 44%) 100%
    );
  background-size: 220% 100%, 280% 100%;
  background-position: 100% 50%, 20% 50%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: spectrum-shimmer 120s ease-in-out infinite alternate;
}

.site-attribution {
  margin: 0.15rem 0 0;
  font-size: 0.75rem;
  font-variant-caps: small-caps;
  letter-spacing: 0.06em;
  color: var(--ink-dim);
}

@keyframes spectrum-shimmer {
  0% {
    background-position: 100% 50%, 0% 50%;
  }
  8% {
    background-position: 97.5% 49.5%, 6% 50.5%;
  }
  18% {
    background-position: 96% 50%, 9.5% 50%;
  }
  30% {
    background-position: 89% 49%, 26% 51%;
  }
  42% {
    background-position: 87.5% 50%, 30% 50%;
  }
  56% {
    background-position: 78% 51%, 52% 49%;
  }
  70% {
    background-position: 71% 49.5%, 69% 50.5%;
  }
  82% {
    background-position: 65% 50%, 83% 50%;
  }
  92% {
    background-position: 61% 50.5%, 93% 49.5%;
  }
  100% {
    background-position: 58% 50%, 100% 50%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-tagline {
    animation: none;
    background: none;
    color: var(--ink-dim);
    -webkit-text-fill-color: currentColor;
  }
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  font-variant-caps: small-caps;
  letter-spacing: 0.04em;
}

.site-nav-rss {
  display: inline-flex;
  color: var(--ink);
}

.site-nav-rss:hover {
  color: var(--accent);
  text-decoration: none;
}

.site-nav-rss-icon {
  display: block;
  width: 1.1rem;
  height: 1.1rem;
}

main {
  position: relative;
  z-index: 1;
  max-width: 48rem;
  margin: 0 auto;
  padding: 1rem 2rem 3rem;
}

.overview-section {
  margin-bottom: 0.5rem;
}

.home-page .overview-section h2 {
  margin-top: 0.5rem;
}

.home-page .current-reading h2 {
  border-bottom: none;
}

.home-page .last-read h2,
.home-page .shelves h2 {
  margin-top: 2rem;
}

.ornate-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 0.5rem 0;
  color: var(--ink-dim);
  font-size: 1.2rem;
}

.ornate-divider::before,
.ornate-divider::after {
  content: "";
  flex: 1;
  border-top: 1px solid var(--rule);
}

.shelf-list {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-top: 0.5rem;
  font-variant-caps: small-caps;
  letter-spacing: 0.04em;
}

.writing-summary {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  margin-top: 1rem;
}

.cover {
  width: 5rem;
  height: 7.5rem;
  object-fit: cover;
  background: var(--parchment-raised);
  border: 1px solid var(--rule);
  flex-shrink: 0;
}

.cover-empty {
  display: block;
}

.writing-summary-text h3 {
  margin: 0 0 0.3rem;
}

.byline {
  margin: 0;
  color: var(--ink-dim);
  font-style: italic;
}

/* author links keep the text colour of the byline and table cell they sit in */
.byline a, .col-authors a {
  color: inherit;
}

.byline a:hover, .col-authors a:hover {
  color: var(--accent);
}

.portrait {
  display: block;
  width: 10rem;
  height: 10rem;
  object-fit: cover;
  border: 1px solid var(--rule);
  margin: 1.5rem 0 0.5rem;
}

.author-identifiers {
  margin: 0.3rem 0 1rem;
  font-size: 0.9em;
}

.progress {
  margin: 0.2rem 0 0;
  color: var(--accent);
  font-variant-caps: small-caps;
  letter-spacing: 0.03em;
}

.reread {
  margin: 0.2rem 0 0;
  color: var(--ink-dim);
  font-size: 0.9em;
  font-style: italic;
  white-space: pre-line;
}

.empty, .loading {
  color: var(--ink-dim);
  font-style: italic;
}

.shelf-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

.shelf-table th, .shelf-table td {
  text-align: left;
  padding: 0.5rem 0.6rem;
  border-bottom: 1px solid var(--rule);
}

.shelf-table th {
  font-variant-caps: small-caps;
  color: var(--ink-dim);
  font-weight: 400;
}

.col-cover {
  width: 3rem;
  padding-right: 0;
}

.cover-thumb {
  display: block;
  width: 2.2rem;
  height: 3.3rem;
}

.col-rating {
  color: var(--accent);
  white-space: nowrap;
}

.col-genre,
.col-sensitivity {
  color: var(--ink-dim);
}

.genres,
.tags,
.sensitivity {
  margin: 0.3rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.genre-tag,
.tag,
.sensitivity-tag {
  font-size: 0.85em;
  font-variant-caps: small-caps;
  color: var(--ink-dim);
  border: 1px solid var(--rule);
  padding: 0.05rem 0.4rem;
}

.genre-tag:hover,
.tag:hover {
  color: var(--accent);
  border-color: var(--accent);
  text-decoration: none;
}

.writing-detail {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  margin-top: 1rem;
}

.cover-large {
  width: 11rem;
  height: 16.5rem;
}

.writing-detail-text h2 {
  margin: 0 0 0.3rem;
  border-bottom: none;
  padding-bottom: 0;
}

.meta-table {
  margin-top: 1.25rem;
  border-collapse: collapse;
}

.meta-table th, .meta-table td {
  text-align: left;
  padding: 0.3rem 1rem 0.3rem 0;
  border-bottom: 1px solid var(--rule);
}

.meta-table th {
  font-variant-caps: small-caps;
  color: var(--ink-dim);
  font-weight: 400;
  white-space: nowrap;
}
