* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background: #050010;
  color: #fff;
  font-family: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, monospace;
  font-size: 11px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

#dither {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.grain {
  display: none;
}

.vignette {
  z-index: 1;
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 80% 70% at 50% 45%, transparent 35%, rgba(5, 0, 16, 0.5) 100%);
}

main {
  position: relative;
  z-index: 3;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px 88px;
  text-align: center;
}

.enter > * {
  opacity: 0;
  transform: translateY(10px);
  animation: rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.enter .title { animation-delay: 0.05s; }
.enter .quote { animation-delay: 0.18s; }
.enter .date { animation-delay: 0.28s; }
.enter .links { animation-delay: 0.38s; }

@keyframes rise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.title {
  margin: 0 0 36px;
  font-size: clamp(2.6rem, 11vw, 4.8rem);
  line-height: 1;
  text-transform: lowercase;
}

.tw-wrap {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  color: #fff;
  cursor: default;
  transition: font-family 0.4s ease, letter-spacing 0.4s ease, opacity 0.2s ease;
}

.tw-wrap.is-hover {
  opacity: 0.92;
}

.tw-char {
  display: inline-block;
  transition: opacity 0.08s linear, transform 0.08s linear;
}

.tw-char-lag {
  opacity: 0.55;
  transform: translateY(-1px);
}

#typewriter {
  white-space: pre;
}

.cursor {
  display: inline-block;
  width: 0.09em;
  min-width: 2px;
  height: 0.88em;
  margin-left: 0.05em;
  background: #fff;
  transform: translateY(0.06em);
  opacity: 0.85;
  animation: blink 1.1s ease-in-out infinite;
}

@keyframes blink {
  0%, 45% { opacity: 0.85; }
  50%, 95% { opacity: 0.2; }
  100% { opacity: 0.85; }
}

.quote {
  margin: 0 0 12px 18px;
  padding: 0 0 0 14px;
  border: none;
  border-left: 1px solid rgba(255, 255, 255, 0.18);
  max-width: 24ch;
  text-align: left;
}

.quote p {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  font-size: 12px;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.82);
}

.quote p::before {
  content: "\201C";
  margin-right: 1px;
}

.quote p::after {
  content: "\201D";
  margin-left: 1px;
}

.date {
  margin: 0 0 32px -4px;
  font-size: 10px;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.38);
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
  justify-content: center;
}

.sep {
  color: rgba(255, 255, 255, 0.22);
  user-select: none;
}

.links a {
  position: relative;
  color: #fff;
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: color 0.25s ease;
}

.links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 100%;
  height: 1px;
  background: rgba(255, 255, 255, 0.55);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.links a:hover {
  color: rgba(255, 255, 255, 0.72);
}

.links a:hover::after {
  transform: scaleX(1);
}

.keys {
  position: fixed;
  z-index: 3;
  left: 20px;
  bottom: 44px;
  font-size: 9px;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.22);
  text-align: left;
}

.keys button {
  appearance: none;
  border: none;
  background: none;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-align: left;
  transition: color 0.2s ease;
}

.keys button:hover {
  color: rgba(255, 255, 255, 0.5);
}

footer {
  position: fixed;
  z-index: 3;
  left: 0;
  right: 0;
  bottom: 16px;
  text-align: center;
  font-size: 9px;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.28);
}

@media (max-width: 480px) {
  .title {
    margin-bottom: 28px;
    letter-spacing: 0.1em;
  }

  .quote {
    margin-left: 10px;
  }

  .links {
    flex-direction: column;
    gap: 8px;
  }

  .sep {
    display: none;
  }

  .keys {
    left: 14px;
    bottom: 40px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .enter > * {
    opacity: 1;
    transform: none;
    animation: none;
  }

  .cursor {
    animation: none;
    opacity: 0.85;
  }
}
