/* Palette and type follow chidush.org: navy, teal, cream, DM Mono + Inter, 12px radius. */
:root {
  --navy: #1e3a5f;
  --teal: #0d7377;
  --teal-light: #4a9da1;
  --teal-pale: #a0c4c6;
  --cream: #f7f4ed;

  /* Light by default. Add class="navy" to <body> for the dark treatment. */
  --bg: var(--cream);
  --text: var(--navy);
  --muted: rgba(30, 58, 95, 0.7);
  --accent: var(--teal);
}

body.navy {
  --bg: var(--navy);
  --text: var(--cream);
  --muted: rgba(247, 244, 237, 0.72);
  --accent: var(--teal-pale);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 3rem 1.5rem;
  background: var(--bg);
  color: var(--text);
  font: 400 1rem/1.7 Inter, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

main {
  width: 100%;
  max-width: 34rem;
  text-align: center;
}

.mark {
  display: flex;
  justify-content: center;
  gap: 0.3125rem;
  margin-bottom: 2rem;
}

.mark span {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: 8px;
  background: var(--teal);
  color: var(--cream);
  font: 500 1.375rem/1 "DM Mono", ui-monospace, monospace;
}

.mark span + span {
  background: var(--teal-light);
}

h1 {
  margin: 0;
  font: 400 clamp(1.5rem, 6vw, 2.125rem) / 1.2 "DM Mono", ui-monospace, monospace;
  letter-spacing: 0.14em;
  /* Balances the trailing tracking so the name sits optically centered. */
  margin-right: -0.14em;
  text-transform: uppercase;
}

.lede {
  margin: 1rem auto 0;
  color: var(--muted);
}

.links {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}

.links a {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  color: var(--text);
  transition: color 0.2s, transform 0.2s;
}

.links a:hover {
  color: var(--accent);
  transform: translateY(-2px);
}

.links svg {
  width: 1.5rem;
  height: 1.5rem;
}

a {
  color: var(--accent);
  text-underline-offset: 0.2em;
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* The two blocks arrive one after the other, then the rest fades in. */
@keyframes block-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.85);
  }
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

.mark span {
  animation: block-in 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) backwards;
}

.mark span + span {
  animation-delay: 0.15s;
}

.rise {
  animation: rise-in 0.6s ease-out 0.45s backwards;
}

@media (prefers-reduced-motion: reduce) {
  .mark span,
  .rise {
    animation: none;
  }

  .links a {
    transition: none;
  }

  .links a:hover {
    transform: none;
  }
}
