:root {
  --bg: #08090d;
  --text: #eef0f4;
  --muted: #8a919e;
  --line: rgba(255, 255, 255, 0.08);
  --card: rgba(255, 255, 255, 0.035);
  --card-hover: rgba(255, 255, 255, 0.06);
  --accent-a: #7c6cf0;
  --accent-b: #5b9cf5;
  --accent-c: #e879a9;
  --radius: 20px;
  --font: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.bg__mesh {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 50% at 15% 20%, rgba(124, 108, 240, 0.22), transparent 60%),
    radial-gradient(50% 40% at 85% 15%, rgba(91, 156, 245, 0.16), transparent 55%),
    radial-gradient(45% 35% at 50% 90%, rgba(232, 121, 169, 0.12), transparent 60%),
    var(--bg);
}

.bg__grain {
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
}

.bg__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  animation: drift 12s ease-in-out infinite;
}

.bg__orb--1 {
  width: 320px;
  height: 320px;
  top: -80px;
  right: 10%;
  background: rgba(124, 108, 240, 0.35);
}

.bg__orb--2 {
  width: 260px;
  height: 260px;
  bottom: 10%;
  left: -40px;
  background: rgba(91, 156, 245, 0.25);
  animation-delay: -4s;
}

.page {
  width: min(680px, calc(100% - 2.5rem));
  margin: 0 auto;
  padding: 4rem 0 3rem;
}

.hero {
  text-align: center;
  padding: 2rem 0 3rem;
}

.avatar {
  position: relative;
  width: 112px;
  height: 112px;
  margin: 0 auto 1.75rem;
}

.avatar__ring {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-a), var(--accent-b), var(--accent-c));
  animation: spin 8s linear infinite;
}

.avatar__img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--bg);
}

.avatar__fallback {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 3px solid var(--bg);
  background: linear-gradient(145deg, #1a1d28, #12141c);
  display: grid;
  place-items: center;
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--text);
}

.avatar:has(.avatar__img) .avatar__fallback {
  display: none;
}

.hero__tag {
  display: inline-block;
  margin-bottom: 1rem;
  padding: 0.35rem 0.9rem;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-b);
  border: 1px solid rgba(91, 156, 245, 0.25);
  border-radius: 999px;
  background: rgba(91, 156, 245, 0.08);
}

.hero__title {
  font-size: clamp(2.2rem, 8vw, 3.2rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.15;
  margin-bottom: 0.75rem;
  background: linear-gradient(135deg, #fff 20%, #c4b5fd 50%, #93c5fd 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__roles {
  font-size: 0.95rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
}

.hero__roles span {
  white-space: nowrap;
}

.hero__roles span:not(:last-child)::after {
  content: " · ";
  opacity: 0.5;
}

.hero__bio {
  max-width: 28em;
  margin: 0 auto;
  font-size: 0.98rem;
  color: var(--muted);
  line-height: 1.85;
}

.links {
  display: grid;
  gap: 0.85rem;
  margin: 2.5rem 0;
}

.link-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  text-decoration: none;
  color: inherit;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform 0.35s var(--ease), background 0.35s var(--ease), border-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.link-card:hover {
  transform: translateY(-3px);
  background: var(--card-hover);
  border-color: rgba(124, 108, 240, 0.35);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
}

.link-card__icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  font-size: 1.15rem;
  background: rgba(124, 108, 240, 0.12);
  border: 1px solid rgba(124, 108, 240, 0.2);
}

.link-card--blue .link-card__icon {
  background: rgba(91, 156, 245, 0.12);
  border-color: rgba(91, 156, 245, 0.2);
}

.link-card--pink .link-card__icon {
  background: rgba(232, 121, 169, 0.12);
  border-color: rgba(232, 121, 169, 0.2);
}

.link-card__body {
  flex: 1;
  min-width: 0;
}

.link-card__title {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.15rem;
}

.link-card__desc {
  font-size: 0.82rem;
  color: var(--muted);
}

.link-card__arrow {
  flex-shrink: 0;
  color: var(--muted);
  font-size: 1.1rem;
  transition: transform 0.35s var(--ease), color 0.35s var(--ease);
}

.link-card:hover .link-card__arrow {
  transform: translateX(4px);
  color: var(--accent-a);
}

.page--sub {
  padding-top: 2.5rem;
}

.subpage__back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 2rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.25s var(--ease);
}

.subpage__back:hover {
  color: var(--accent-b);
}

.subpage__header {
  text-align: center;
  padding-bottom: 2rem;
}

.subpage__tag {
  display: inline-block;
  margin-bottom: 0.85rem;
  padding: 0.35rem 0.9rem;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-a);
  border: 1px solid rgba(124, 108, 240, 0.25);
  border-radius: 999px;
  background: rgba(124, 108, 240, 0.08);
}

.subpage__title {
  font-size: clamp(1.8rem, 6vw, 2.4rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.2;
  margin-bottom: 0.65rem;
  background: linear-gradient(135deg, #fff 20%, #c4b5fd 50%, #93c5fd 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.subpage__desc {
  max-width: 26em;
  margin: 0 auto;
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.75;
}

.page--sub .links {
  margin-top: 0;
}

.page--article {
  width: min(720px, calc(100% - 2.5rem));
}

.post-list {
  display: grid;
  gap: 0.85rem;
  margin-bottom: 2.5rem;
}

.post-list--external {
  margin-top: 1rem;
}

.post-list--external .links {
  margin: 0.75rem 0 0;
}

.post-list__label {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.post-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.15rem 1.25rem;
  text-decoration: none;
  color: inherit;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform 0.35s var(--ease), background 0.35s var(--ease), border-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.post-card:hover {
  transform: translateY(-3px);
  background: var(--card-hover);
  border-color: rgba(124, 108, 240, 0.35);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
}

.post-card__date {
  flex-shrink: 0;
  width: 5.5rem;
  padding-top: 0.15rem;
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  color: var(--accent-b);
  letter-spacing: 0.02em;
}

.post-card__body {
  flex: 1;
  min-width: 0;
}

.post-card__title {
  display: block;
  font-size: 0.98rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  line-height: 1.4;
}

.post-card__excerpt {
  display: block;
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.65;
}

.post-card__arrow {
  flex-shrink: 0;
  padding-top: 0.2rem;
  color: var(--muted);
  font-size: 1.1rem;
  transition: transform 0.35s var(--ease), color 0.35s var(--ease);
}

.post-card:hover .post-card__arrow {
  transform: translateX(4px);
  color: var(--accent-a);
}

.post__header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
}

.post__date {
  display: block;
  margin-bottom: 0.75rem;
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
  color: var(--accent-b);
  letter-spacing: 0.04em;
}

.post__title {
  font-size: clamp(1.6rem, 5vw, 2.1rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.35;
  background: linear-gradient(135deg, #fff 20%, #c4b5fd 50%, #93c5fd 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.post__body {
  font-size: 0.98rem;
  line-height: 1.9;
  color: rgba(238, 240, 244, 0.92);
}

.post__body > * + * {
  margin-top: 1.15rem;
}

.post__body h2 {
  margin-top: 2rem;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.02em;
}

.post__body h2:first-child {
  margin-top: 0;
}

.post__body p {
  color: rgba(238, 240, 244, 0.88);
}

.post__body a {
  color: var(--accent-b);
  text-decoration: none;
  border-bottom: 1px solid rgba(91, 156, 245, 0.35);
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease);
}

.post__body a:hover {
  color: #93c5fd;
  border-color: rgba(147, 197, 253, 0.6);
}

.post__body ul,
.post__body ol {
  padding-left: 1.35rem;
  color: rgba(238, 240, 244, 0.88);
}

.post__body li + li {
  margin-top: 0.4rem;
}

.post__body blockquote {
  padding: 0.85rem 1.1rem;
  border-left: 3px solid var(--accent-a);
  border-radius: 0 12px 12px 0;
  background: rgba(124, 108, 240, 0.08);
}

.post__body blockquote p {
  margin: 0;
  color: var(--muted);
  font-style: italic;
}

.post__body code {
  padding: 0.15rem 0.45rem;
  font-size: 0.88em;
  font-family: "Cascadia Code", "Consolas", monospace;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.post__body pre {
  padding: 1rem 1.1rem;
  overflow-x: auto;
  font-size: 0.85rem;
  line-height: 1.7;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.post__body pre code {
  padding: 0;
  background: none;
  border: none;
}

.post__body img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--line);
}

.page--game {
  width: min(960px, calc(100% - 2rem));
}

.subpage__header--compact {
  padding-bottom: 1.25rem;
}

.game-player {
  margin-bottom: 2rem;
}

.game-player__frame {
  display: block;
  width: 100%;
  height: min(600px, 70vh);
  min-height: 400px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #231f20;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.game-player__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.75rem;
  padding: 0 0.15rem;
}

.game-player__hint {
  font-size: 0.78rem;
  color: var(--muted);
}

.game-player__fullscreen {
  flex-shrink: 0;
  padding: 0.45rem 0.85rem;
  font-family: var(--font);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.25s var(--ease), border-color 0.25s var(--ease), color 0.25s var(--ease);
}

.game-player__fullscreen:hover {
  background: var(--card-hover);
  border-color: rgba(124, 108, 240, 0.35);
  color: var(--accent-b);
}

.footer {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
  font-size: 0.78rem;
  color: var(--muted);
}

.footer p + p {
  margin-top: 0.4rem;
}

.footer a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.25s;
}

.footer a:hover {
  color: var(--accent-b);
}

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

.reveal-d1 { transition-delay: 0.08s; }
.reveal-d2 { transition-delay: 0.16s; }
.reveal-d3 { transition-delay: 0.24s; }
.reveal-d4 { transition-delay: 0.32s; }
.reveal-d5 { transition-delay: 0.4s; }

@keyframes drift {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(20px, -24px); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .bg__orb,
  .avatar__ring {
    animation: none;
  }

  .post-card:hover {
    transform: none;
  }

  html {
    scroll-behavior: auto;
  }
}

@media (max-width: 480px) {
  .page {
    padding-top: 2.5rem;
  }

  .hero {
    padding-top: 1rem;
  }

  .post-card {
    flex-wrap: wrap;
  }

  .post-card__date {
    width: 100%;
    padding-top: 0;
  }
}
