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

body {
  background-color: #f9fafc;
  font-family:
    "Inter",
    "Noto Sans SC",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Helvetica,
    Arial,
    sans-serif;
  color: #1e1e2f;
  line-height: 1.5;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

/* 全局动画关键帧 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes floatSlow {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-15px) rotate(2deg);
  }
}

@keyframes rotateGlow {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes dotPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 123, 156, 0.5);
  }
  70% {
    box-shadow: 0 0 0 12px rgba(255, 123, 156, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 123, 156, 0);
  }
}

@keyframes pulse {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(1.15);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes floatAvatar {
  0% {
    transform: translateY(0) rotate(0deg);
  }
  100% {
    transform: translateY(-12px) rotate(1deg);
  }
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 2;
}

/* 滚动揭示动画 */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.7s cubic-bezier(0.23, 1, 0.32, 1),
    transform 0.7s cubic-bezier(0.23, 1, 0.32, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ========== 导航栏 ========== */
.custom-nav {
  position: relative;
  padding: 20px 0 8px;
  margin-bottom: 8px;
  animation: fadeInUp 0.8s ease both;
}

.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.logo-mark {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  transition: transform 0.3s ease;
}

.logo-mark:hover {
  transform: scale(1.03);
}

.logo-dot {
  width: 14px;
  height: 14px;
  background: #ff7b9c;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 0 4px rgba(255, 123, 156, 0.2);
  animation: dotPulse 2s infinite;
}

.logo-text {
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #15152b 30%, #4a4a7a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logo-text span {
  color: #ff7b9c;
  background: none;
  -webkit-text-fill-color: #ff7b9c;
}

.nav-pills {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.nav-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  background: #ffffff;
  border-radius: 60px;
  font-size: 0.95rem;
  font-weight: 500;
  color: #2d2d44;
  text-decoration: none;
  box-shadow: 0 4px 12px -6px rgba(0, 0, 0, 0.08);
  border: 1px solid #ececf5;
  transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
  position: relative;
  overflow: hidden;
}

.nav-pill::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, #ff7b9c, #ffb6c9);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease;
}

.nav-pill:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav-pill i {
  font-size: 0.9rem;
  color: #7b6bae;
  transition:
    color 0.2s,
    transform 0.3s;
}

.nav-pill:hover {
  border-color: #ffb6c9;
  box-shadow: 0 10px 20px -10px rgba(255, 123, 156, 0.25);
  transform: translateY(-3px);
}

.nav-pill:hover i {
  color: #ff7b9c;
  transform: rotate(8deg) scale(1.1);
}

.nav-status {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  padding: 8px 16px;
  border-radius: 40px;
  font-size: 0.85rem;
  font-weight: 500;
  color: #3d3d5e;
  border: 1px solid #ececf5;
  box-shadow: 0 4px 12px -6px rgba(0, 0, 0, 0.04);
  transition: all 0.3s ease;
  animation: float 4s ease-in-out infinite;
}

.nav-status:hover {
  box-shadow: 0 8px 20px -8px rgba(93, 78, 140, 0.2);
  transform: translateY(-2px);
  animation-play-state: paused;
}

.status-dot {
  width: 10px;
  height: 10px;
  background: #4caf50;
  border-radius: 50%;
  display: inline-block;
  animation: pulse 1.8s infinite;
}

/* ========== 个人信息区 ========== */
.personal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 50px;
  margin: 20px 0 60px;
  padding: 40px 32px;
  background: #ffffff;
  border-radius: 60px;
  box-shadow: 0 25px 50px -20px rgba(0, 0, 0, 0.08);
  border: 1px solid #f0f0f8;
  flex-wrap: wrap;
  position: relative;
  overflow: hidden;
  transition:
    box-shadow 0.4s ease,
    transform 0.4s ease;
  animation: fadeInUp 0.9s ease 0.1s both;
}

.personal-header:hover {
  box-shadow: 0 35px 60px -22px rgba(93, 78, 140, 0.18);
  transform: translateY(-4px);
}

.personal-header::before {
  content: "";
  position: absolute;
  top: -60px;
  right: -60px;
  width: 220px;
  height: 220px;
  background: radial-gradient(
    circle,
    rgba(255, 123, 156, 0.12) 0%,
    transparent 70%
  );
  border-radius: 50%;
  z-index: 0;
  animation: floatSlow 7s infinite alternate ease-in-out;
}

.personal-header::after {
  content: "";
  position: absolute;
  bottom: -80px;
  left: -40px;
  width: 180px;
  height: 180px;
  background: radial-gradient(
    circle,
    rgba(123, 107, 174, 0.08) 0%,
    transparent 70%
  );
  border-radius: 50%;
  z-index: 0;
  animation: floatSlow 9s infinite alternate-reverse ease-in-out;
}

.personal-info {
  flex: 1.2;
  min-width: 300px;
  position: relative;
  z-index: 1;
}

.personal-badge {
  display: inline-block;
  background: #f2edfe;
  color: #5d4e8c;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 6px 18px;
  border-radius: 40px;
  letter-spacing: 0.3px;
  margin-bottom: 18px;
  border: 1px solid #e2ddf0;
  transition: all 0.3s ease;
}

.personal-badge:hover {
  background: #ff7b9c;
  color: white;
  border-color: #ff7b9c;
  box-shadow: 0 8px 16px -8px #ff7b9c;
}

.personal-info h1 {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin-bottom: 18px;
  color: #15152b;
}

.personal-info h1 .highlight {
  color: #ff7b9c;
  background: linear-gradient(145deg, #ff7b9c, #ffa5b9);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
  transition: transform 0.3s ease;
}

.personal-info h1:hover .highlight {
  transform: scale(1.04);
}

.personal-desc {
  font-size: 1.1rem;
  color: #4e4e6b;
  max-width: 520px;
  margin-bottom: 28px;
  line-height: 1.7;
}

.contact-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 28px;
  margin-bottom: 32px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.98rem;
  color: #2d2d44;
  background: #f9f9fe;
  padding: 8px 18px;
  border-radius: 60px;
  border: 1px solid #ececf5;
  transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

.contact-item i {
  color: #ff7b9c;
  font-size: 1rem;
  width: 18px;
  text-align: center;
  transition: transform 0.3s ease;
}

.contact-item:hover {
  border-color: #ffb6c9;
  background: #ffffff;
  box-shadow: 0 8px 18px -10px rgba(255, 123, 156, 0.3);
  transform: translateY(-3px);
}

.contact-item:hover i {
  transform: scale(1.2) rotate(10deg);
}

/* 技能图标 */
.skill-icons-list {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 32px;
  align-items: center;
  padding-top: 8px;
}

.skill-icon-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
  cursor: default;
  animation: scaleIn 0.6s ease both;
  animation-delay: calc(0.08s * var(--i, 0));
}

.skill-icon-item:nth-child(1) {
  --i: 1;
}
.skill-icon-item:nth-child(2) {
  --i: 2;
}
.skill-icon-item:nth-child(3) {
  --i: 3;
}
.skill-icon-item:nth-child(4) {
  --i: 4;
}
.skill-icon-item:nth-child(5) {
  --i: 5;
}
.skill-icon-item:nth-child(6) {
  --i: 6;
}

.skill-icon-item i {
  font-size: 2rem;
  color: #5d4e8c;
  background: #f2edfe;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  transition: all 0.35s cubic-bezier(0.23, 1, 0.32, 1);
  box-shadow: 0 4px 8px -4px rgba(0, 0, 0, 0.06);
}

.skill-icon-item span {
  font-size: 0.75rem;
  font-weight: 500;
  color: #6b6b8a;
  transition:
    color 0.2s,
    transform 0.3s;
}

.skill-icon-item:hover {
  transform: translateY(-5px);
}

.skill-icon-item:hover i {
  background: #ff7b9c;
  color: white;
  transform: scale(1.12) rotate(-3deg);
  box-shadow: 0 14px 22px -10px #ff7b9c;
}

.skill-icon-item:hover span {
  color: #ff7b9c;
  transform: scale(1.05);
}

/* 头像 */
.personal-avatar {
  flex: 0 0 260px;
  height: 260px;
  background: linear-gradient(145deg, #e8e2f5, #d9d0f0);
  border-radius: 50% 50% 40% 60% / 60% 40% 60% 40%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 30px 40px -20px rgba(93, 78, 140, 0.3);
  border: 6px solid white;
  position: relative;
  z-index: 1;
  animation: floatAvatar 5s infinite alternate ease-in-out;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.personal-avatar:hover {
  animation-play-state: paused;
  transform: scale(1.03) rotate(2deg);
  box-shadow: 0 40px 55px -25px rgba(255, 123, 156, 0.4);
}

.personal-avatar i {
  font-size: 7rem;
  color: #5d4e8c;
  opacity: 0.85;
  transition: transform 0.3s ease;
}

.personal-avatar:hover i {
  transform: scale(1.06) rotate(-3deg);
}

/* ========== 作品展示区 ========== */
.work-section {
  margin-bottom: 80px;
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-header h2 {
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #15152b;
  margin-bottom: 12px;
  transition: transform 0.3s ease;
}

.section-header h2:hover {
  transform: scale(1.02);
}

.section-header p {
  font-size: 1.1rem;
  color: #5f5f7a;
  max-width: 600px;
  margin: 0 auto;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 32px;
}

.project-card {
  background: white;
  border-radius: 32px;
  padding: 28px;
  box-shadow: 0 12px 30px -12px rgba(0, 0, 0, 0.08);
  transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  border: 1px solid #f0f0f8;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.project-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 123, 156, 0.04),
    transparent
  );
  transition: left 0.6s ease;
}

.project-card:hover::before {
  left: 100%;
}

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 30px 45px -20px rgba(93, 78, 140, 0.25);
  border-color: #e2ddf0;
}

.project-icon {
  width: 60px;
  height: 60px;
  background: #f2edfe;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  transition: all 0.35s ease;
}

.project-card:hover .project-icon {
  background: #ff7b9c;
  transform: rotate(-6deg) scale(1.08);
}

.project-icon i {
  font-size: 2rem;
  color: #5d4e8c;
  transition: color 0.3s ease;
}

.project-card:hover .project-icon i {
  color: white;
}

.project-card h3 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: #15152b;
  transition: color 0.2s ease;
}

.project-card:hover h3 {
  color: #ff7b9c;
}

.project-card p {
  color: #5f5f7a;
  margin-bottom: 24px;
  flex: 1;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.project-tags span {
  background: #f2edfe;
  color: #4a3f6e;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 40px;
  letter-spacing: 0.2px;
  transition: all 0.25s ease;
}

.project-card:hover .project-tags span {
  background: #ffe4ec;
  color: #b3446a;
}

.project-link {
  text-decoration: none;
  font-weight: 600;
  color: #ff7b9c;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.95rem;
  margin-top: 8px;
  transition: gap 0.3s ease;
}

.project-link i {
  font-size: 0.8rem;
  transition: transform 0.3s ease;
}

.project-link:hover {
  gap: 12px;
}

.project-link:hover i {
  transform: translateX(5px);
}

/* ========== 联系区域 ========== */
.contact-footer {
  text-align: center;
  padding: 56px 32px;
  background: #1e1e2f;
  border-radius: 64px;
  margin-bottom: 60px;
  color: white;
  position: relative;
  overflow: hidden;
  transition:
    transform 0.4s ease,
    box-shadow 0.4s ease;
}

.contact-footer::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle at 30% 40%,
    rgba(255, 123, 156, 0.08) 0%,
    transparent 50%
  );
  animation: rotateGlow 20s linear infinite;
  pointer-events: none;
}

.contact-footer:hover {
  transform: translateY(-6px);
  box-shadow: 0 30px 50px -25px #1e1e2f;
}

.contact-footer h2 {
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}

.contact-footer p {
  color: #b9b9d0;
  font-size: 1.1rem;
  max-width: 500px;
  margin: 0 auto 28px;
  position: relative;
  z-index: 1;
}

.contact-email {
  font-size: 1.5rem;
  font-weight: 600;
  color: #ff9bb4;
  text-decoration: none;
  display: inline-block;
  margin-bottom: 36px;
  border-bottom: 2px solid transparent;
  transition:
    border 0.2s ease,
    transform 0.3s ease;
  position: relative;
  z-index: 1;
}

.contact-email:hover {
  border-bottom-color: #ff9bb4;
  transform: scale(1.03);
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  color: white;
  font-size: 1.4rem;
  transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
  text-decoration: none;
  animation: scaleIn 0.5s ease both;
  animation-delay: calc(0.06s * var(--i, 0));
}

.social-links a:nth-child(1) {
  --i: 1;
}
.social-links a:nth-child(2) {
  --i: 2;
}
.social-links a:nth-child(3) {
  --i: 3;
}
.social-links a:nth-child(4) {
  --i: 4;
}
.social-links a:nth-child(5) {
  --i: 5;
}

.social-links a:hover {
  background: #ff7b9c;
  transform: translateY(-6px) scale(1.08);
  color: white;
  box-shadow: 0 14px 20px -10px #ff7b9c;
}

.copyright {
  text-align: center;
  padding: 24px 0 32px;
  color: #8a8aa3;
  font-size: 0.9rem;
  border-top: 1px solid #e8e8f0;
}

/* ========== 响应式 ========== */
@media (max-width: 900px) {
  .personal-header {
    flex-direction: column-reverse;
    text-align: center;
    padding: 36px 24px;
  }

  .personal-info h1 {
    font-size: 2.4rem;
  }

  .personal-desc {
    margin-left: auto;
    margin-right: auto;
  }

  .contact-quick {
    justify-content: center;
  }

  .skill-icons-list {
    justify-content: center;
  }

  .personal-avatar {
    flex: 0 0 200px;
    height: 200px;
  }

  .personal-avatar i {
    font-size: 5.5rem;
  }

  .nav-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-pills {
    width: 100%;
    justify-content: flex-start;
  }
}

@media (max-width: 600px) {
  .nav-pills {
    gap: 8px;
  }

  .nav-pill {
    padding: 8px 16px;
    font-size: 0.85rem;
  }

  .nav-status {
    align-self: flex-start;
  }

  .personal-info h1 {
    font-size: 2rem;
  }

  .contact-item {
    font-size: 0.85rem;
    padding: 6px 14px;
  }

  .section-header h2 {
    font-size: 1.9rem;
  }

  .contact-footer h2 {
    font-size: 1.8rem;
  }

  .contact-email {
    font-size: 1.2rem;
  }

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

@media (max-width: 400px) {
  .skill-icons-list {
    gap: 16px;
  }

  .skill-icon-item i {
    width: 48px;
    height: 48px;
    font-size: 1.6rem;
  }
}
