:root {
  --primary: oklch(0.82 0.17 80);
  --light: #fff;
  --dark: #000000;

  --background: var(--light);
  --foreground: var(--dark);
  --primary-hover: oklch(from var(--primary) calc(l + 0.1) c h);
}

/* Dark theme */
@media (prefers-color-scheme: dark) {
  :root {
    --background: var(--dark);
    --foreground: var(--light);
  }
}

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

body {
  font-family: sans-serif;
  background: var(--background);
  color: var(--foreground);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

main {
  text-align: left;
  padding: 2rem;
  width: 100%;
  max-width: 1200px;
}

.main-title {
  font-size: clamp(3rem, 8vw, 8rem);
  font-weight: 900;
  color: var(--primary);
}

.line {
  display: block;
}

a {
  display: inline-block;
  font-size: 2.5rem;
  color: var(--foreground);
  text-decoration: none;
  padding: 0.5rem;
}

a:hover {
  color: var(--primary-hover);
}

/* Typewriter effect */
/* https://dev.to/afif/a-scalable-css-only-typewriter-effect-2opn */
.multiline-type-container {
  display: inline-grid;
  max-width: max-content;
  height: 1em;
  overflow: hidden;
}

.type {
  --duration: 2s;
  display: inline-block;
  max-width: max-content;
  height: 1em;
  width: 0%;
  word-break: break-all;
  overflow: hidden;
  animation:
    type var(--duration) linear infinite alternate,
    multiline calc(var(--duration) * 2 * var(--lines)) steps(var(--lines))
      infinite;
}

.type:before {
  content: " ";
  display: inline-block;
}

@keyframes type {
  90%,
  100% {
    width: 100%;
  }
}

@keyframes multiline {
  100% {
    transform: translateY(calc(-100% * var(--lines)));
  }
}

@media (max-width: 768px) {
  main {
    padding: 1rem;
  }

  .main-title {
    font-size: clamp(2.5rem, 10vw, 6rem);
  }
}
