:root {
  --page-bg: #ffffff;
  --text-main: #000000;
  --text-muted: #979797;
  --brand: #06c755;
  --font-en: "Owners Text";
  --font-zh: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --tile-size: 120px;
  --tile-radius: 24px;
  --card-width: 168px;
  --card-height: 199px;
  --card-padding: 24px;
  --card-gap: 8px;
  --grid-gap: 24px;
  --ease: 180ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--page-bg);
  color: var(--text-main);
  font-family: var(--font-en), var(--font-zh);
}

.page {
  width: min(1000px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 120px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 42px;
}

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

h1 {
  margin: 0;
  font-family: var(--font-en), var(--font-zh);
  font-size: 64px;
  font-weight: 700;
  line-height: 1.43;
  white-space: nowrap;
}

.hero-title-main {
  color: #000000;
  margin-right: 14px;
}

.hero-title-accent {
  color: var(--brand);
}

.hero-subtitle {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--text-muted);
  font-size: 20px;
  font-weight: 300;
  line-height: 1.03;
  text-align: center;
  white-space: nowrap;
}

.projects {
  width: 100%;
  max-width: 1000px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: var(--grid-gap);
}

.project {
  width: var(--card-width);
  min-height: var(--card-height);
  padding: var(--card-padding);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--card-gap);
  color: var(--text-main);
  text-decoration: none;
  border-radius: 24px;
}

a.project {
  transition: transform var(--ease), filter var(--ease);
}

a.project:hover {
  transform: translateY(-2px);
  filter: saturate(1.03);
}

a.project:focus-visible {
  outline: 2px solid rgba(6, 199, 85, 0.55);
  outline-offset: 4px;
}

.icon {
  position: relative;
  width: var(--tile-size);
  height: var(--tile-size);
  border-radius: var(--tile-radius);
  overflow: hidden;
  background: var(--brand);
  animation: iconCloudFloat 7.2s ease-in-out infinite;
  transform: translate3d(0, 0, 0);
  will-change: transform;
}

.icon.dressup {
  background: linear-gradient(181.41deg, #e0ebf1 54.82%, #b9c8dd 96.97%);
}

a.project .icon::after {
  content: "";
  position: absolute;
  inset: -30% -70%;
  background: linear-gradient(
    110deg,
    transparent 36%,
    rgba(255, 255, 255, 0.56) 49%,
    rgba(255, 255, 255, 0.14) 53%,
    transparent 66%
  );
  transform: translateX(-140%) rotate(8deg);
  transition: none;
  pointer-events: none;
}

a.project:hover .icon::after,
a.project:focus-visible .icon::after {
  transition: transform 1s cubic-bezier(0.19, 0.8, 0.22, 1);
  transform: translateX(140%) rotate(8deg);
}

.icon img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.projects .project:nth-child(2n) .icon {
  animation-duration: 7.9s;
  animation-delay: -1.5s;
}

.projects .project:nth-child(3n) .icon {
  animation-duration: 8.4s;
  animation-delay: -0.8s;
}

@keyframes iconCloudFloat {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }

  22% {
    transform: translate3d(0.8px, -1.6px, 0);
  }

  50% {
    transform: translate3d(-1.2px, -4.4px, 0);
  }

  78% {
    transform: translate3d(0.7px, -2.3px, 0);
  }
}

.name {
  width: var(--tile-size);
  margin: 0;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.1;
  text-align: center;
}

@media (max-width: 768px) {
  .page {
    width: 100%;
    max-width: 420px;
    padding: 120px 0 90px;
  }

  h1 {
    font-size: 44px;
  }

  .hero-title-main {
    margin-right: 10px;
  }

  .hero-subtitle {
    font-size: 15px;
  }

  .projects {
    width: 100%;
    max-width: 375px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 14px;
    row-gap: 20px;
    padding: 0 20px;
    justify-items: center;
  }

  .project {
    width: 100%;
    max-width: 160px;
    min-height: auto;
    padding: 16px 8px;
  }

}

@media (prefers-reduced-motion: reduce) {
  a.project {
    transition: none;
  }

  a.project .icon::after {
    transition: none;
  }

  .icon {
    animation: none !important;
    transform: none !important;
  }
}
