* { margin: 0; padding: 0; box-sizing: border-box; }
html { height: 100%; }
body {
  font-family: Karla, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  color: rgba(0, 0, 0, 0.85);
  background: #fffff8;
  height: 100%;
}
main {
  max-width: 38em;
  margin: 0 auto;
  padding: 4em 1.5em;
}
h1 {
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1.5em;
}
p {
  margin-bottom: 1.4em;
}
a {
  color: inherit;
  text-decoration: underline;
  transition: color 0.25s;
}
a:hover, a:focus {
  color: #8b4513;
  outline: 0;
}
.nav-dot {
  position: fixed;
  top: clamp(1rem, 2.4vw, 2rem);
  right: clamp(1rem, 2.4vw, 2rem);
  z-index: 5;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}
.nav-dot::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 10px;
  border-radius: 47% 53% 51% 49% / 45% 48% 52% 55%;
  background: #ba160c;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 1px rgba(186, 22, 12, 0.08), 0 0 12px rgba(186, 22, 12, 0.18);
  transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1), border-radius 0.24s ease;
  animation: dot-liquify 4.8s ease-in-out infinite;
}
.nav-dot::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(186, 22, 12, 0.85);
  transform: translate(-36%, -64%);
  opacity: 0.72;
  filter: blur(0.2px);
  transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.2s ease;
}
.nav-dot:hover::before,
.nav-dot:focus-visible::before,
body.nav-open .nav-dot::before {
  border-radius: 58% 42% 45% 55% / 48% 58% 42% 52%;
  transform: translate(-50%, -50%) scale(1.38, 1.16) rotate(-12deg);
}
.nav-dot:hover::after,
.nav-dot:focus-visible::after,
body.nav-open .nav-dot::after {
  opacity: 0.92;
  transform: translate(-18%, -72%) scale(1.2);
}
.nav-dot:focus-visible {
  outline: 1px solid rgba(186, 22, 12, 0.75);
  outline-offset: 2px;
}
.nav-menu {
  position: fixed;
  top: calc(clamp(1rem, 2.4vw, 2rem) + 2.5rem);
  right: calc(clamp(1rem, 2.4vw, 2rem) + 1rem);
  z-index: 4;
  display: grid;
  gap: 0.22em;
  min-width: 6.5rem;
  padding: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-0.25rem);
  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
}
.nav-menu a {
  color: rgba(0, 0, 0, 0.58);
  font-size: 14px;
  line-height: 1.45;
  text-align: right;
  text-decoration: none;
}
.nav-menu a:hover,
.nav-menu a:focus {
  color: rgba(0, 0, 0, 0.88);
  outline: 0;
}
body.nav-open .nav-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
body[data-page="about"] .nav-menu a[data-page="about"],
body[data-page="books"] .nav-menu a[data-page="books"],
body[data-page="quotes"] .nav-menu a[data-page="quotes"] {
  display: none;
}
@keyframes dot-liquify {
  0%, 100% {
    border-radius: 47% 53% 51% 49% / 45% 48% 52% 55%;
  }
  33% {
    border-radius: 55% 45% 47% 53% / 52% 43% 57% 48%;
  }
  66% {
    border-radius: 44% 56% 54% 46% / 49% 56% 44% 51%;
  }
}
@media (prefers-reduced-motion: reduce) {
  .nav-dot::before {
    animation: none;
  }
  .nav-menu,
  .nav-dot::after {
    transition-duration: 0.01ms;
  }
}
.back {
  display: block;
  font-size: 13px;
  color: rgba(0, 0, 0, 0.4);
  text-decoration: none;
  margin-bottom: 1em;
}
.back:hover {
  color: rgba(0, 0, 0, 0.85);
}
::selection {
  color: #fffff8;
  background: rgba(0, 0, 0, 0.85);
}
