/* colourfulcode — Catppuccin Mocha */

:root {
  --bg: #111827;        /* from personal site */
  --text: #ffffff;      /* white */
  --blue: #89b4fa;      /* blue (reserved) */
  --pink: #f5c2e7;      /* pink (reserved) */
}

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

body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  color: var(--text);
  font-family: "Crimson Pro", system-ui, serif;
  font-size: 1.1rem;
  line-height: 1.6;
}

main {
  width: 100%;
  max-width: 40rem;
  padding: 1.5rem;
  text-align: center;
  /* shift content up so it sits about 1/3 from the top */
  transform: translateY(-18vh);
}

h1 {
  font-size: min(6vw, 3.2rem);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  padding-left: 0.15em; /* compensate trailing letter-spacing so glyphs sit truly centered */
  margin: 0 0 2.5rem;
  font-family: "Nunito", system-ui, sans-serif;
  -webkit-text-stroke: 0.035em currentColor; /* fatten strokes beyond the 900 weight */
  paint-order: stroke fill;
}

main p {
  color: var(--text);
  font-size: 1.7rem;
  max-width: 32rem;
  margin: 0 auto;
}

footer p {
  font-size: 1.3rem;
  font-weight: 400; /* normal weight, explicitly */
  color: rgba(255, 255, 255, 0.75);
}

/* muted rainbow — solid Catppuccin tones per letter, cycling */
h1 span {
  animation: cycle 14s steps(1, end) infinite;
}
h1 span:nth-child(6n+1) { color: #ff5c7a; animation-delay: 0s; }      /* red     */
h1 span:nth-child(6n+2) { color: #ffb454; animation-delay: -2.333s; } /* peach   */
h1 span:nth-child(6n+3) { color: #ffe066; animation-delay: -4.667s; } /* yellow  */
h1 span:nth-child(6n+4) { color: #4be38a; animation-delay: -7s; }     /* green   */
h1 span:nth-child(6n+5) { color: #45d6ff; animation-delay: -9.333s; } /* sky     */
h1 span:nth-child(6n+6) { color: #b57bff; animation-delay: -11.667s; } /* mauve  */

/* slight per-letter tilt, alternating direction */
h1 span:nth-child(odd)  { display: inline-block; transform: rotate(-3deg); }
h1 span:nth-child(even) { display: inline-block; transform: rotate(3deg); }

footer {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100%;
  padding: 1rem;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
}

@keyframes cycle {
  0%     { color: #ff5c7a; } /* red     */
  16.66% { color: #ffb454; } /* peach   */
  33.33% { color: #ffe066; } /* yellow  */
  50%    { color: #4be38a; } /* green   */
  66.66% { color: #45d6ff; } /* sky     */
  83.33% { color: #b57bff; } /* mauve   */
  100%   { color: #ff5c7a; } /* red     */
}
