:root {
  --text: #2c2c2c;
  --bg: #fdfbf7;
  --muted: #6b6356;
  --link: #3f98e6;
  --border: #d0d7dc;
  --code-bg: #eef2f5;
  --footer-border: #d0d7dc;
}

* {
  box-sizing: border-box;
  font-family: 'Crimson Text', serif;
}

html {
  font-size: 18px;
  background: #1a2038;
  min-height: 100vh;
}

html::before,
html::after {
  content: '';
  position: fixed;
  left: 0;
  right: 0;
  pointer-events: none;
  z-index: -1;
}

html::before {
  top: -25vh;
  height: 25vh;
  background: #1a2038;
}

html::after {
  bottom: -25vh;
  height: 25vh;
  background: var(--bg);
}

.nav-container {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  h1 {
    margin: 0;
    a {
      color: inherit;
      text-decoration: none;
      &:hover {
        text-decoration: underline;
      }
    }
  }
}

body {
  line-height: 1.4;
  color: var(--text);
  background: var(--bg);
  background-attachment: fixed;
  min-height: 100vh;
  margin: 0;
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

body > * {
  width: 100%;
  max-width: 560px;
}

h1,
h2,
h3 {
  font-weight: normal;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

h1 {
  font-size: 1.5rem;
}

h2 {
  font-size: 1.25rem;
}

p {
  margin: 0 0 1rem 0;
}

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

a:hover {
  text-decoration: underline;
}

nav {
  margin-bottom: 2rem;
}

nav a {
  margin-right: 0.5rem;
}

nav a.active {
  font-weight: bold;
  text-decoration: underline;
}

/* nav a::before {
  content: "{";
}

nav a::after {
  content: "}";
} */

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

.blurb {
  color: var(--muted);
  font-style: italic;
}


.accoutrement {
}

.double-border {
  border: 1px solid var(--border);
  outline: 1px solid var(--border);
  outline-offset: 3px;
  padding: 1rem;
  padding-top: 0;
  margin: 4px;
}

.double-border-thin {
  border: 1px solid var(--border);
  outline: 1px solid var(--border);
  outline-offset: 2px;
  padding: 0.75rem;
  margin: 3px;
}

.double-border-thick {
  border: 1px solid var(--border);
  outline: 2px solid var(--border);
  outline-offset: 4px;
  padding: 1.25rem;
  margin: 6px;
}

footer {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--footer-border);
  color: var(--muted);
  font-size: 0.9rem;
  flex-shrink: 0;
}

.footer-stars {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.footer-stars svg {
  width: 12px;
  height: 12px;
  fill: #e8c547;
}

.inline-star {
  width: 0.8em;
  height: 0.8em;
  fill: #e8c547;
  vertical-align: baseline;
  display: inline-block;
}

ul {
  padding-left: 1.25rem;
  list-style: none;
}

ol {
  padding-left: 1.5rem;
}

li {
  margin-bottom: 0.5rem;
}

ul li {
  position: relative;
}

ul li::before {
  content: '';
  position: absolute;
  left: -1rem;
  top: 0.45em;
  width: 8px;
  height: 8px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath fill='%23e8c547' d='M50 0 L54 40 L85 15 L60 46 L100 50 L60 54 L85 85 L54 60 L50 100 L46 60 L15 85 L40 54 L0 50 L40 46 L15 15 L46 40 Z'/%3E%3C/svg%3E");
  background-size: contain;
}

blockquote {
  border-left: 3px solid var(--border);
  margin-left: 0;
  padding-left: 1rem;
  color: var(--muted);
}

code {
  background: var(--code-bg);
  padding: 0.2em 0.4em;
  border-radius: 3px;
  font-size: 0.9em;
}

pre {
  background: var(--code-bg);
  padding: 1rem;
  overflow-x: auto;
  border-radius: 3px;
}

pre code {
  background: none;
  padding: 0;
}

pre.poetry {
  background: none;
  font-family: 'Crimson Text', serif;
  font-size: 1rem;
  line-height: 1.6;
  white-space: pre-wrap;
  padding: 0;
  margin: 1rem 0;
  color: var(--text);
}

.secretLink {
  display: inline;
  border: none;
  padding: 0;
  margin: 0;
  font-size: inherit;
  line-height: inherit;
  text-decoration: none;
  color: inherit;
  background: none;
  cursor:pointer;
  &:hover {
    text-decoration: underline;
  }
}

.center {
  display: flex;
  justify-content: center;
  align-items: center;
}

@media (max-width: 480px) {
  .love {
    font-size: 16px !important;
  }
}

.book-list {
  font-size: 0.85rem;
  line-height: 1.8;
}

.book-list p {
  margin: 0;
  padding: 0.2rem 0;
}

.book-list em {
  font-style: normal;
  font-weight: 500;
}

.random-list {
  margin: 1rem 0;
}

.random-list .random-item {
  display: block;
  margin-bottom: 0.25rem;
}

#stars {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 40vh;
  z-index: 0;
  max-width: 100%;
}

#moon {
  position: fixed;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  z-index: 2;
  transition: opacity 0.5s ease, left 1s ease-out, top 1s ease-out;
}

#stars.night-active {
  cursor: crosshair;
}

#stars .star {
  position: absolute;
  fill: #e8c547;
  animation: twinkle 3s ease-in-out infinite;
}

#stars .star.whoosh {
  pointer-events: none;
  will-change: transform, opacity, filter;
  animation:
    whoosh-in 120ms cubic-bezier(0.2, 0.9, 0.2, 1) forwards,
    settle 140ms cubic-bezier(0.2, 0.7, 0.2, 1) 120ms forwards;
}

@keyframes whoosh-in {
  from {
    opacity: 0;
    transform: translate3d(var(--sx), var(--sy), 0) scale(0.7);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: translate3d(var(--x), var(--y), 0) scale(1.1);
    filter: blur(0);
  }
}

@keyframes settle {
  from {
    transform: translate3d(var(--x), var(--y), 0) scale(1.1);
  }
  to {
    transform: translate3d(var(--x), var(--y), 0) scale(1);
  }
}

@keyframes twinkle {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.6;
  }
}

nav,
main,
footer {
  position: relative;
  z-index: 1;
}

main {
  margin-bottom: 1rem;
  flex: 1 0 auto;
}

main p:last-child {
  margin-bottom: 0;
}
