:root {
  color-scheme: dark;
  --black: #050505;
  --white: #ffffff;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  overflow: hidden;
}

body {
  margin: 0;
  background: var(--black);
  color: var(--white);
  font-family:
    "Helvetica Neue", Helvetica, Arial, ui-sans-serif, system-ui, sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  color: inherit;
  font: inherit;
}

input,
textarea {
  color: inherit;
  font: inherit;
}

.page {
  align-items: center;
  display: grid;
  height: 100svh;
  min-height: 420px;
  padding: clamp(28px, 6vw, 86px);
  position: relative;
}

.logo-link {
  animation: fadeSlide 900ms ease-out both;
  left: clamp(22px, 5vw, 72px);
  max-width: min(260px, 30vw);
  position: absolute;
  top: clamp(22px, 5vw, 72px);
  width: 100%;
}

.logo {
  display: block;
  height: auto;
  width: 100%;
}

.menu {
  animation: fadeSlide 900ms ease-out 80ms both;
  display: flex;
  gap: clamp(22px, 4vw, 44px);
  left: 50%;
  position: absolute;
  top: clamp(62px, 8vw, 116px);
  transform: translateX(-50%);
}

.menu button {
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  opacity: 0.74;
  padding: 0;
}

.menu button:hover,
.menu button:focus-visible,
.menu button.is-active {
  opacity: 1;
  outline: none;
}

.stage {
  grid-area: 1 / 1;
  justify-self: center;
  max-width: min(900px, 84vw);
  width: 100%;
}

.statement {
  animation: fadeSlide 900ms ease-out 160ms both;
  height: clamp(6rem, 14vw, 13rem);
  margin: 0 auto;
  max-width: min(760px, 100%);
  position: relative;
  transition: opacity 260ms ease, transform 260ms ease;
  width: 100%;
}

.statement.is-hidden {
  display: none;
}

.phrase {
  animation: phraseCycle 9s ease-in-out infinite;
  font-size: clamp(1.7rem, 4.8vw, 4.8rem);
  font-weight: 300;
  letter-spacing: 0;
  line-height: 0.94;
  margin: 0;
  opacity: 0;
  position: absolute;
  left: 0;
  text-align: center;
  top: 50%;
  transform: translateY(-42%);
  width: 100%;
}

.phrase:nth-child(2) {
  animation-delay: 3s;
}

.phrase:nth-child(3) {
  animation-delay: 6s;
}

.view {
  display: none;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
}

.view.is-visible {
  animation: fadeSlide 320ms ease-out both;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.about-view {
  margin: 0 auto;
  max-width: min(680px, 100%);
  text-align: center;
}

.about-view p {
  font-size: clamp(1.2rem, 2.7vw, 2.35rem);
  font-weight: 300;
  line-height: 1.18;
  margin: 0;
}

.portfolio-view {
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0 auto;
  width: 100%;
}

.portfolio-view.is-visible {
  display: grid;
}

.about-view.is-visible {
  display: block;
}

.contact-view {
  margin: 0 auto;
  max-width: min(520px, 100%);
}

.contact-view.is-visible {
  display: block;
}

.contact-view form {
  display: grid;
  gap: 18px;
}

.contact-view label {
  color: rgba(255, 255, 255, 0.56);
  display: grid;
  font-size: 0.78rem;
  gap: 8px;
  letter-spacing: 0.02em;
}

.contact-view input,
.contact-view textarea {
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 0;
  color: var(--white);
  outline: none;
  padding: 8px 0 10px;
  resize: none;
}

.contact-view input:focus,
.contact-view textarea:focus {
  border-bottom-color: rgba(255, 255, 255, 0.82);
}

.contact-view button {
  background: var(--white);
  border: 0;
  border-radius: 999px;
  color: var(--black);
  cursor: pointer;
  font-size: 0.86rem;
  justify-self: center;
  margin-top: 4px;
  min-height: 42px;
  padding: 0 28px;
}

.project {
  display: grid;
  gap: 12px;
  opacity: 0.82;
  transition: opacity 180ms ease, transform 180ms ease;
}

.project:hover,
.project:focus-visible {
  opacity: 1;
  outline: none;
  transform: translateY(-4px);
}

.project img {
  aspect-ratio: 10 / 7;
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: block;
  height: auto;
  object-fit: cover;
  width: 100%;
}

.project span {
  font-size: 0.86rem;
  font-weight: 400;
  opacity: 0.78;
}

.contact {
  bottom: clamp(22px, 5vw, 58px);
  display: flex;
  font-size: 0.82rem;
  font-weight: 400;
  gap: 14px;
  left: clamp(28px, 6vw, 86px);
  letter-spacing: 0.02em;
  opacity: 0.78;
  position: absolute;
  white-space: nowrap;
}

.contact span {
  opacity: 0.54;
}

.contact a {
  font-weight: 500;
}

@media (max-width: 560px) {
  .page {
    align-content: center;
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .logo-link {
    left: 50%;
    max-width: 178px;
    transform: translateX(-50%);
  }

  .menu {
    top: 118px;
  }

  .statement,
  .view {
    align-self: center;
  }

  .stage {
    max-width: min(360px, 86vw);
  }

  .statement {
    height: 220px;
  }

  .phrase {
    text-align: center;
  }

  .portfolio-view {
    gap: 10px;
    grid-template-columns: 1fr;
  }

  .project {
    gap: 6px;
  }

  .project img {
    aspect-ratio: 16 / 7;
  }

  .about-view p {
    font-size: clamp(1.15rem, 6vw, 1.8rem);
  }
}

@keyframes fadeSlide {
  from {
    opacity: 0;
    translate: 0 14px;
  }

  to {
    opacity: 1;
    translate: 0 0;
  }
}

@keyframes phraseCycle {
  0% {
    opacity: 0;
    transform: translateY(-30%);
  }

  8%,
  28% {
    opacity: 1;
    transform: translateY(-50%);
  }

  38%,
  100% {
    opacity: 0;
    transform: translateY(-68%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .logo,
  .logo-link,
  .menu,
  .statement,
  .view,
  .phrase {
    animation: none;
  }

  .phrase {
    opacity: 0;
  }

  .phrase:first-child {
    opacity: 1;
  }
}
