:root {
  --bg: #f3f3f3;
  --panel: #ffffff;
  --text: #2a2a2a;
  --muted: #6a6a6a;
  --line: #d8d8d8;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: linear-gradient(150deg, #efefef 0%, #f8f8f8 100%);
  min-height: 100vh;
  opacity: 0;
  transform: translateY(8px) scale(0.995);
  transition: opacity 0.75s ease, transform 0.75s ease;
}

.container {
  width: min(980px, 92%);
  margin: 0 auto;
}

.single-page-app {
  padding-bottom: 8vh;
}

body.page-ready {
  opacity: 1;
  transform: translateY(0) scale(1);
}

body.page-leave {
  opacity: 0;
  transform: translateY(10px) scale(0.996);
}

.home-page {
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
}

.music-disc-btn {
  position: fixed;
  top: 31px;
  right: 112px;
  width: 52px;
  height: 52px;
  border: 1px solid #c8c8c8;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.14);
  cursor: pointer;
  z-index: 7;
  display: grid;
  place-items: center;
  transition: transform 0.4s ease, box-shadow 0.4s ease, background 0.4s ease;
}

.music-disc-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.18);
}

.music-disc {
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, #f4f4f4 0%, #bdbdbd 55%, #909090 100%);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.2), 0 2px 8px rgba(0, 0, 0, 0.2);
}

.music-disc::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 2px solid rgba(70, 70, 70, 0.45);
  border-radius: 50%;
}

.music-disc::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: #fafafa;
  border: 1px solid #8a8a8a;
}

.music-disc-btn.is-playing .music-disc {
  animation: spin-disc 4.2s linear infinite;
}

@keyframes spin-disc {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.avatar-entry {
  position: fixed;
  top: 22px;
  right: 24px;
  left: auto;
  width: 72px;
  height: 72px;
  border: none;
  padding: 0;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  z-index: 6;
  transform-origin: top right;
  will-change: transform, filter;
  backface-visibility: hidden;
  transition: transform 0.62s cubic-bezier(0.22, 1, 0.36, 1), filter 0.42s ease;
}

.avatar-entry:hover {
  transform: translateY(-2px) scale(1.03);
  filter: brightness(1.05);
}

.avatar-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.18));
}

body.author-cinematic-zoom .avatar-entry {
  transform: scale(1.12);
}

body.author-cinematic-move .avatar-entry {
  transform: translate(calc(-100vw + 112px), 2px) scale(0.92);
  transition-duration: 1.7s;
}

body.author-cinematic-sync .avatar-entry {
  transform: translate3d(calc(-100vw + 112px), 2px, 0) scale(0.92);
  transition-duration: 0.8s;
  transition-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}

body.author-cinematic-reverse .avatar-entry {
  transform: translate3d(0, 0, 0) scale(1);
  transition-duration: 0.8s;
  transition-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}

#interactive-bg {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

#interactive-bg,
.app-home-panel {
  transition: opacity 0.85s ease, transform 0.85s ease, filter 0.65s ease;
}

body.author-cinematic-blur #interactive-bg {
  filter: blur(2px) saturate(0.94);
  opacity: 0.82;
}

body.author-cinematic-blur .app-home-panel {
  opacity: 0.68;
}

.particle-ball {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #e1e1e1 0%, #aaaaaa 78%);
  opacity: 0.88;
  filter: blur(0.2px);
  box-shadow: 0 0 0 1px rgba(120, 120, 120, 0.08);
  will-change: transform;
}

.hero {
  text-align: center;
  margin-top: 10vh;
}

.subtitle {
  letter-spacing: 0.12em;
  color: #808080;
  margin: 0;
  text-transform: uppercase;
  font-size: 0.8rem;
}

h1 {
  margin: 0.6rem 0 0.8rem;
  font-weight: 700;
}

.description {
  margin: 0 auto;
  max-width: 36ch;
  color: var(--muted);
  line-height: 1.6;
}

.countdown-card {
  margin: 1.4rem auto 0;
  width: min(560px, 100%);
  padding: 1rem 1.1rem;
  border: 2px solid #9c9c9c;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.12);
}

.countdown-label {
  margin: 0;
  font-size: 0.95rem;
  color: #666666;
}

.countdown-time {
  margin: 0.35rem 0 0;
  font-size: clamp(1.4rem, 4vw, 2.2rem);
  font-weight: 800;
  letter-spacing: 0.03em;
  color: #111111;
}

.countdown-target {
  margin: 0.45rem 0 0;
  font-size: 0.9rem;
  color: #555555;
}

.entry-buttons {
  margin: 3rem auto 0;
  width: min(700px, 100%);
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 1rem;
  padding-bottom: 12vh;
}

.hero,
.entry-buttons {
  position: relative;
  z-index: 2;
}

.app-home-panel {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.62s ease, transform 0.62s ease;
}

body.view-subpage .app-home-panel {
  opacity: 0;
  transform: translateY(32px);
  pointer-events: none;
  position: absolute;
}

body.author-cinematic-reverse .app-home-panel {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
  position: relative;
  transition-duration: 0.8s;
  pointer-events: none;
}

body.author-panel-hidden .author-panel,
body.author-panel-hidden .author-panel.is-visible {
  opacity: 0 !important;
  transform: translateY(10px);
  max-height: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
}

.card-btn {
  text-decoration: none;
  color: var(--text);
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--line);
  border-radius: 16px;
  min-height: 150px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 0.5rem;
  backdrop-filter: blur(2px);
  box-shadow: var(--shadow);
  transition: transform 0.45s ease, border-color 0.45s ease, background 0.45s ease;
}

.card-btn:hover {
  transform: translateY(-5px);
  border-color: #bababa;
  background: #ffffff;
}

.btn-title {
  font-size: 1.5rem;
  font-weight: 700;
}

.btn-hint {
  font-size: 0.92rem;
  color: var(--muted);
}

.sub-header {
  width: min(980px, 92%);
  margin: 2rem auto 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.back-link {
  color: #4a4a4a;
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.42rem 0.9rem;
  background: var(--panel);
  cursor: pointer;
  font: inherit;
}

.gallery,
.article-list {
  padding-bottom: 3rem;
}

.content-panel {
  position: relative;
  z-index: 2;
  opacity: 0;
  transform: translateY(42px);
  pointer-events: none;
  max-height: 0;
  overflow: hidden;
  transition: opacity 0.62s ease, transform 0.62s ease;
}

.content-panel.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  max-height: 5000px;
  overflow: visible;
}

.author-panel .sub-header {
  margin-top: 0.75rem;
}

.author-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 1rem;
  padding-bottom: 3rem;
  overflow: hidden;
}

.author-block {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 1.15rem 1rem;
  opacity: 0;
  transform: translate3d(28vw, 8px, 0) scale(0.97);
  transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform, opacity;
  backface-visibility: hidden;
}

body.author-cinematic-reveal .author-panel.is-visible .author-block {
  opacity: 1;
  transform: translateY(0) scale(1);
}

body.author-cinematic-sync .author-panel.is-visible .author-block {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
}

body.author-cinematic-reverse .author-panel.is-visible .author-block {
  opacity: 0;
  transform: translate3d(28vw, 8px, 0) scale(0.97);
}

body.author-click-locked .avatar-entry,
body.author-click-locked .js-back-home {
  pointer-events: none;
}


.author-block h2 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}

.author-block p {
  margin: 0;
  line-height: 1.7;
  color: #4f4f4f;
}

.site-footer {
  position: relative;
  z-index: 2;
  width: min(980px, 92%);
  margin: 0 auto 1.8rem;
  padding-top: 0.6rem;
  text-align: center;
  color: #666666;
}

.footer-text {
  margin: 0.3rem 0;
  font-size: 0.9rem;
}

.footer-link {
  color: #444444;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer-link:hover {
  color: #111111;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.image-card,
.article-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.image-card {
  cursor: pointer;
  transition: transform 0.45s ease, box-shadow 0.45s ease;
}

.image-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.14);
}

.image-card img {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.image-card figcaption {
  padding: 0.9rem;
  color: #505050;
}

.article-list {
  display: grid;
  gap: 1rem;
}

.article-card {
  padding: 1.2rem 1.1rem;
}

.article-card h2 {
  margin: 0 0 0.6rem;
  font-size: 1.1rem;
}

.article-card p {
  margin: 0;
  line-height: 1.7;
  color: #505050;
}

/* ── 关系网组件 ── */
.network-section {
  padding: 1rem 0 2rem;
}

.network-top-bar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 0.5rem 0.5rem;
}

.network-title {
  text-align: center;
  font-size: 1.2rem;
  font-weight: 700;
  margin: -0.2rem 0 1.2rem;
  color: var(--text);
  letter-spacing: 0.04em;
}

.network-container {
  position: relative;
  width: 100%;
  height: 520px;
  overflow: visible;
}

.network-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.network-node {
  position: absolute;
  left: 50%;
  top: 50%;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  user-select: none;
  font-weight: 600;
  backface-visibility: hidden;
  transition: box-shadow 0.5s ease;
  transform-origin: center center;
  will-change: transform;
  box-shadow: 0 6px 20px rgba(0,0,0,0.10);
  text-shadow: 0 1px 2px rgba(0,0,0,0.06);
}

.network-node.center-node {
  width: 96px;
  height: 96px;
  background: linear-gradient(145deg, #2a2a2a, #4a4a4a);
  color: #fff;
  font-size: 1rem;
  z-index: 3;
  box-shadow: 0 8px 28px rgba(0,0,0,0.22);
}

.network-node:not(.center-node) {
  width: 78px;
  height: 78px;
  font-size: 0.85rem;
  border: 2px solid rgba(140,140,140,0.25);
}

.network-node[data-category="interest"] {
  background: linear-gradient(145deg, #f7f7f7, #e2e2e2);
  color: #333;
}

.network-node[data-category="skill"] {
  background: linear-gradient(145deg, #edf0f6, #d8dde6);
  color: #2c3e50;
}

.network-node.center-node:hover,
.network-node:not(.center-node):hover {
  box-shadow: 0 12px 36px rgba(0,0,0,0.28);
}

/* ── Toast ── */
.network-toast {
  position: fixed;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: rgba(42,42,42,0.92);
  color: #eee;
  padding: 10px 28px;
  border-radius: 999px;
  font-size: 0.92rem;
  opacity: 0;
  pointer-events: none;
  z-index: 999;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
              opacity 0.45s ease;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,0.12);
}

.network-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 640px) {
  .network-container {
    height: 420px;
  }
  .network-node.center-node {
    width: 78px;
    height: 78px;
    font-size: 0.82rem;
  }
  .network-node:not(.center-node) {
    width: 62px;
    height: 62px;
    font-size: 0.7rem;
  }
}

@media (max-width: 640px) {
  .music-disc-btn {
    width: 44px;
    height: 44px;
    top: 24px;
    right: 82px;
  }

  .music-disc {
    width: 28px;
    height: 28px;
  }

  .avatar-entry {
    width: 60px;
    height: 60px;
    top: 16px;
    right: 14px;
    left: auto;
  }

  body.author-cinematic-move .avatar-entry {
    transform: translate(calc(-100vw + 84px), 0) scale(0.92);
  }

  body.author-cinematic-sync .avatar-entry {
    transform: translate3d(calc(-100vw + 84px), 0, 0) scale(0.92);
  }

  body.author-cinematic-reverse .avatar-entry {
    transform: translate3d(0, 0, 0) scale(1);
  }

  .entry-buttons {
    grid-template-columns: 1fr;
  }

  .author-grid {
    grid-template-columns: 1fr;
  }

  .sub-header {
    flex-direction: column;
    align-items: flex-start;
  }
}
