* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Noto Sans TC", "JetBrains Mono", monospace, system-ui, sans-serif;
  background: linear-gradient(135deg, #f8f9fc 0%, #eef2ff 100%);
  color: #2d3748;
  line-height: 1.7;
  min-height: 100vh;
  padding: 5vw 4vw;
  font-size: clamp(16px, 2.5vw, 18px);
}

.container {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  flex-direction: row;
  gap: clamp(40px, 6vw, 80px);
  align-items: flex-start;
  flex-wrap: wrap;
}

.avatar-side {
  flex: 0 0 clamp(180px, 35vw, 260px);
  text-align: center;
}

.avatar-side img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 50%;
  border: 10px solid #ffffff;
  box-shadow: 0 10px 30px rgba(100, 110, 160, 0.15);
  display: block;
  margin: 0 auto 1.5rem;
}

.content-side {
  flex: 1;
  min-width: 300px;
}

.handwriting-wrap {
  width: 100%;
  max-width: 520px;
  margin: 0 auto 1.8rem;
}

.handwriting-svg {
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  overflow: visible;
}

.stroke-path {
  fill: #2d3748;
  stroke: #2d3748;
  stroke-width: 5.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  animation: draw 7.5s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
}

@keyframes draw {
  from { stroke-dashoffset: var(--length); }
  to   { stroke-dashoffset: 0; }
}

.subtitle-wrapper {
  width: 100%;
  max-width: 520px;
  min-height: 5em;
  margin: 0 auto 2.5rem;
  text-align: center;
}

.subtitle {
  font-family: "JetBrains Mono", monospace;
  font-size: clamp(1.1rem, 4.5vw, 1.4rem);
  color: #64748b;
  font-weight: 400;
  letter-spacing: -0.3px;
  white-space: pre-wrap;
  word-break: break-word;
  text-align: center;
}

h2 {
  font-family: "Consolas", monospace;
  font-size: clamp(1.6rem, 5vw, 2rem);
  color: #1e293b;
  margin: 2.5rem 0 1.2rem;
  font-weight: normal;
  position: relative;
  display: inline-block;
}

h2::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 100%;
  height: 3px;
  background: #a0c4ff;
  border-radius: 3px;
}

p {
  font-family: "Consolas", monospace;
  font-size: clamp(1rem, 3.2vw, 1.15rem);
  margin-bottom: 1.4rem;
  color: #475569;
  text-align: left;
}

.projects {
  width: 100%;
  max-width: 520px;
}

.projects .project-item {
  margin-bottom: 2.2rem;
  text-align: left;
}

.projects .project-item h3 {
  font-family: "Consolas", monospace;
  font-size: clamp(1.2rem, 4vw, 1.4rem);
  color: #3b82f6;
  margin-bottom: 0.4rem;
}

.social {
  margin-top: 3.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: clamp(20px, 5vw, 32px);
  font-size: clamp(1rem, 3.5vw, 1.15rem);
  justify-content: flex-start;
}

.social a {
  font-family: "Consolas", monospace;
  color: #475569;
  text-decoration: none;
  transition: color 0.2s;
  position: relative;
  display: inline-block;
}

.social a:hover {
  color: #3b82f6;
}

/* 加群按钮的二维码提示 */
.qq-join {
  position: relative;
  cursor: pointer;
}

.qq-join:hover .qq-qrcode {
  display: block;
}

.qq-qrcode {
  display: none;
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: 12px;
  z-index: 10;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  width: 180px;
  text-align: center;
  font-size: 0.85rem;
  color: #333;
}

.qq-qrcode img {
  width: 160px;
  height: 280px;
  border-radius: 4px;
}

footer {
  margin-top: 4rem;
  text-align: center;
  font-size: 0.95rem;
  color: #64748b;
  opacity: 0.9;
  font-family: "Consolas", monospace;
}

/* 黄色小提示样式 */
.hint-container {
  margin: 3rem auto 2rem;
  padding: 1.2rem 1.8rem;
  background-color: rgba(255, 235, 59, 0.15);
  border: 1px solid #ffeb3b80;
  border-radius: 8px;
  max-width: 520px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.95rem;
  color: #5c4b00;
  line-height: 1.6;
  text-align: center;
  display: none;
}

.hint-container.show {
  display: block;
}

.hint-container br {
  margin-bottom: 0.5em;
}

.hint-container strong {
  color: #e65100;
  font-weight: 500;
}

@media (max-width: 820px) {
  .container {
    flex-direction: column;
    align-items: center;
  }
  .content-side {
    text-align: center;
  }
  .social {
    justify-content: center;
  }
  h2::after {
    left: 50%;
    transform: translateX(-50%);
  }
  p, .projects .project-item {
    text-align: center;
  }
  .hint-container {
    margin-left: 1rem;
    margin-right: 1rem;
  }
  .qq-qrcode {
    left: 0;
    right: 0;
    margin: 0 auto;
    transform: none;
    width: 200px;
  }
}

@media (max-width: 480px) {
  .handwriting-wrap { max-width: 92vw; }
  .stroke-path { stroke-width: 5.8; }
  body { padding: 8vw 6vw; }
}
.project-desc {
  transition: opacity 1s ease;
  opacity: 1;
}
.project-desc.fade-out {
  opacity: 0;
}
