:root {
  color-scheme: dark;
  font-family: Inter, "Helvetica Neue", system-ui, -apple-system, sans-serif;
  background: #040d06;
  color: #e8f2eb;
}

* {
  box-sizing: border-box;
  margin: 0;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: radial-gradient(circle at top, #0d2015, #040d06 55%);
  letter-spacing: 0.05em;
}

/* Nav */

nav {
  display: flex;
  gap: 2rem;
  padding: 1.5rem 2rem;
}

nav a {
  color: #4e7060;
  text-decoration: none;
  font-size: 0.8rem;
  letter-spacing: 0.25em;
  text-transform: lowercase;
  transition: color 0.2s;
}

nav a:hover,
nav a.active {
  color: #e8f2eb;
}

/* Main */

main {
  flex: 1;
  width: 100%;
  max-width: 48rem;
  margin: 0 auto;
  padding: 2rem 2rem 6rem;
}

/* Homepage: center the h1 */

body.home main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-bottom: 8rem;
}

/* Typography */

h1 {
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 300;
  text-transform: lowercase;
  letter-spacing: 0.2em;
  color: #e8f2eb;
  margin-bottom: 1.5rem;
}

body.home h1 {
  font-size: clamp(3rem, 8vw, 6rem);
  letter-spacing: 0.25em;
  margin-bottom: 0;
}

h2 {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: lowercase;
  color: #7ab890;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
}

p {
  font-size: 0.95rem;
  font-weight: 300;
  line-height: 1.75;
  color: #9ab8a4;
  max-width: 62ch;
  margin-bottom: 1rem;
}

/* Footer */

footer {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: #2e5040;
  text-align: center;
  width: min(100% - 2rem, 40rem);
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

@media (width <= 480px) {
  body.home h1 {
    letter-spacing: 0.12em;
  }

  nav {
    gap: 1.25rem;
    padding: 1.25rem;
  }

  footer {
    letter-spacing: 0.18em;
    font-size: 0.68rem;
  }
}
