:root {
  color-scheme: light;
  color: #202020;
  background: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

.page {
  display: grid;
  min-height: 100vh;
  min-height: 100svh;
  padding: 48px 24px;
  place-items: center;
}

.intro {
  display: flex;
  width: min(100%, 640px);
  flex-direction: column;
  align-items: center;
  gap: 28px;
}

.portrait {
  display: block;
  width: 96px;
  height: 96px;
  flex: none;
  border-radius: 24px;
  object-fit: cover;
  background: #f3f3f3;
  animation: portrait-entrance 550ms ease both;
}

.intro-copy {
  max-width: 620px;
  margin: 0;
  font-size: clamp(24px, 2.3vw, 28px);
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -0.025em;
  text-align: center;
  text-wrap: balance;
}

.intro-word {
  display: inline-block;
  white-space: nowrap;
}

.intro-character {
  display: inline-block;
  animation: letter-entrance 450ms cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: calc(var(--index) * 7ms);
}

.intro-complete .intro-character {
  animation: none;
}

.contact-link {
  display: inline-flex;
  min-width: 144px;
  min-height: 56px;
  align-items: center;
  justify-content: center;
  margin-top: 12px;
  padding: 14px 32px;
  border-radius: 16px;
  color: #202020;
  background: #f1f1f1;
  font-size: clamp(18px, 1.65vw, 20px);
  font-weight: 500;
  line-height: 1.4;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 180ms ease, transform 180ms ease;
}

.contact-link.is-animated {
  animation: contact-entrance 450ms cubic-bezier(0.22, 1, 0.36, 1) backwards;
  animation-delay: var(--contact-delay, 0ms);
}

@media (hover: hover) {
  .contact-link:hover {
    background: #e6e6e6;
    transform: translateY(-2px);
  }
}

.contact-link:focus-visible {
  outline: 2px solid #202020;
  outline-offset: 4px;
}

.contact-link:active {
  background: #ddd;
  transform: translateY(0);
}

@keyframes contact-entrance {
  from {
    visibility: hidden;
    opacity: 0;
    filter: blur(4px);
    transform: translateY(6px);
  }
  to {
    visibility: visible;
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
  }
}

@keyframes letter-entrance {
  from {
    opacity: 0;
    filter: blur(6px);
  }
  to {
    opacity: 1;
    filter: blur(0);
  }
}

@keyframes portrait-entrance {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

::selection {
  color: #202020;
  background: #e9e9e9;
}

@media (max-width: 600px) {
  .page {
    padding: 40px 24px;
  }

  .intro {
    gap: 24px;
  }

  .portrait {
    width: 80px;
    height: 80px;
    border-radius: 20px;
  }

  .intro-copy {
    font-size: 22px;
    line-height: 1.45;
  }
}

@media (max-width: 359px) {
  .page {
    padding: 32px 16px;
  }

  .intro-copy {
    font-size: clamp(18px, 6vw, 20px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .portrait,
  .intro-character,
  .contact-link.is-animated {
    animation: none;
  }

  .contact-link {
    transition: none;
  }

  .contact-link:hover {
    transform: none;
  }
}
