html {
  font-family: Verdana, Geneva, Tahoma, sans-serif;
  /* CSS custom properties: https://developer.mozilla.org/en-US/docs/Web/CSS/Guides/Cascading_variables/Using_custom_properties */
  --color-primary: #fff0db;
  --color-secondary: black;
  --color-accent: #d9b99b;

  --h1-font-size: 2rem;
  --base-margin-vertical: 2rem;
  --base-border-radius: 10px;
}

body {
  text-align: left;
  max-width: 80%;
  margin: auto;
  color: var(--color-secondary);
  background-color: var(--color-primary);
}

header {
  margin-top: var(--base-margin-vertical);
  margin-bottom: var(--base-margin-vertical);
  font-weight: bold;
  font-size: calc(var(--h1-font-size) * 1.25);
}

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

h1,
h2,
h3 {
  color: black;
  font-weight: normal;
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
}

h1 {
  font-weight: bold;
  font-size: var(--h1-font-size);
}

h2 {
  font-size: calc(var(--h1-font-size) / 1.25);
  margin-bottom: 0;
}

h3 {
  font-size: calc(var(--h1-font-size) / 1.5);
}

h4 {
  font-size: 1rem;
  font-weight: bold;
  margin: 0;
}

p {
  margin: 0;
}

.user-greeting {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

button {
  cursor: pointer;
}

figcaption {
  font-size: 0.9rem;
  font-style: italic;
}

code {
  font-size: 1rem;
}

footer {
  margin-top: calc(var(--base-margin-vertical) * 2);
  font-weight: bold;
}

footer a {
  text-decoration: none;
  color: black;
  padding: 0.5rem;
  border-style: double;
  box-sizing: border-box;
}

.hidden {
  display: none;
}

.loading:not(.hidden) {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem;
  align-items: center;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  margin-left: 1rem;
  margin-right: 1rem;
  border: 4px solid var(--color-secondary);
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loading-text {
  animation: loading-pulse 1s ease-in-out infinite alternate;
}

@keyframes loading-pulse {
  from {
    opacity: 0.5;
  }

  to {
    opacity: 1;
  }
}
