:root {
  --bg: #060910;
  --cyan: #5fd3f3;
  --cyan-soft: rgba(95, 211, 243, 0.28);
  --cyan-faint: rgba(95, 211, 243, 0.14);
  --text: #d7e0e8;
  --text-title: #eef4f8;
  --text-muted: #8b97a6;
  --text-faint: #6e7c8a;
  --max: 52rem;
  --pad: 1.75rem;
  --avatar: 8.25rem;
  --avatar-border: 0.3rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  color: var(--text);
  -webkit-text-size-adjust: 100%;
}

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

body {
  font-family: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC",
    "Source Han Sans SC", "Microsoft YaHei UI", "Microsoft YaHei",
    system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.75;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--cyan);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

a:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 2px;
}

.page {
  max-width: var(--max);
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ----- hero / banner ----- */

.hero {
  position: relative;
  background: #05080e;
}

.hero img {
  display: block;
  width: 100%;
  height: clamp(10.5rem, 28vw, 18.5rem);
  object-fit: cover;
  object-position: right center;
}

/* ----- profile body ----- */

.profile {
  position: relative;
  flex: 1;
  padding: 0 var(--pad) 4.5rem;
}

.avatar {
  width: var(--avatar);
  height: var(--avatar);
  margin-top: calc(var(--avatar) / -2);
  position: relative;
  z-index: 1;
}

.avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: var(--avatar-border) solid var(--bg);
  background: var(--bg);
  box-shadow:
    0 0 0 1px var(--cyan-soft),
    0 0 22px rgba(95, 211, 243, 0.2);
  animation: ring-glow 12s ease-in-out infinite;
}

@keyframes ring-glow {
  0%,
  100% {
    box-shadow:
      0 0 0 1px var(--cyan-soft),
      0 0 18px rgba(95, 211, 243, 0.16);
  }
  50% {
    box-shadow:
      0 0 0 1px rgba(95, 211, 243, 0.55),
      0 0 34px rgba(95, 211, 243, 0.32);
  }
}

@media (prefers-reduced-motion: reduce) {
  .avatar img {
    animation: none;
  }
}

.identity {
  margin-top: 1.35rem;
}

h1 {
  margin: 0 0 0.55rem;
  font-size: 1.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.2;
  color: var(--text-title);
}

.bio {
  margin: 0;
  max-width: 38em;
  color: var(--text);
  font-size: 1.0625rem;
  text-wrap: pretty;
}

.links {
  margin: 1.35rem 0 0;
}

.x-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  transition: color 0.2s ease;
}

.x-link:hover,
.x-link:focus-visible {
  color: var(--cyan);
  text-decoration: none;
}

.x-link svg {
  width: 1rem;
  height: 1rem;
  fill: currentColor;
  flex-shrink: 0;
}

/* ----- making ----- */

.making {
  margin-top: 3.25rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--cyan-faint);
  max-width: 38em;
}

.making h2 {
  margin: 0 0 0.4rem;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: none;
  color: var(--text-faint);
}

.making p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.98rem;
}

/* ----- footer ----- */

footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
  padding: 1.25rem var(--pad) 1.75rem;
  color: var(--text-faint);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
}

/* ----- mobile ----- */

@media (max-width: 640px) {
  :root {
    --pad: 1.35rem;
    --avatar: 6.5rem;
    --avatar-border: 0.25rem;
  }

  h1 {
    font-size: 1.6rem;
  }

  .bio {
    font-size: 1rem;
  }

  .hero img {
    height: clamp(8.75rem, 36vw, 12rem);
    object-position: 92% 42%;
  }

  .making {
    margin-top: 2.6rem;
  }
}
