
:root {
  --bg-color: 255;
  --text-color: 0;
}

body {
  margin: 0;
  font-family: Georgia, serif;
  overflow-x: hidden;
  background-color: rgb(var(--bg-color), var(--bg-color), var(--bg-color));
  color: rgb(var(--text-color), var(--text-color), var(--text-color));
  transition: background-color 0.2s linear, color 0.2s linear;
}

header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 1em;
  z-index: 1000;
  background: transparent;
  transition: opacity 1s ease;
}
header.fade-out {
  opacity: 0;
  pointer-events: none;
}

#left-link, #center-text, #right-link {
  text-decoration: none;
  font-size: 0.9em;
  color: rgb(var(--text-color), var(--text-color), var(--text-color));
}
#left-link {
  justify-self: start;
}
#right-link {
  justify-self: center;
}
#center-text {
  justify-self: center;
  font-style: italic;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
#center-text::after {
  content: "↓";
  font-size: 1.5em;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(5px); }
}

#poem-container {
  padding-top: 25vh;
  padding-bottom: 40vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8vh;
}

.block {
  opacity: 0;
  transition: opacity 1.5s ease;
  font-size: clamp(1.6em, 6vw, 2.4em);
  max-width: 95vw;
  text-align: center;
  white-space: normal;
  line-height: 1.6;
  color: inherit;
}
.block.visible {
  opacity: 1;
}
.highlight-black {
  background-color: white;
  color: black;
  padding: 0 0.2em;
}
.highlight-red {
  background-color: red;
  color: white;
  padding: 0 0.2em;
}
.highlight-blue {
  background-color: blue;
  color: white;
  padding: 0 0.2em;
}
