body {
  margin: 0;
  font-family: 'Noto Sans SC', 'Montserrat', Arial, sans-serif;
  background: #121212;
  color: #f0f0f0;
  overflow-x: hidden;
  position: relative;
}

#particles-js {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

header {
  text-align: center;
  padding: 60px 20px 60px 20px;
  animation: fadeInUp 1.2s;
  position: relative;
  overflow: hidden;
  margin-bottom: 40px;
}

header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, rgba(58,134,255,0.05) 0%, rgba(255,0,110,0.05) 100%);
  z-index: 0;
  animation: gradientShift 8s ease infinite;
}

header::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, transparent 0%, rgba(0,0,0,0.1) 100%);
  z-index: 0;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

header h1, header div {
  position: relative;
  z-index: 1;
}

.avatar {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  margin: 0 auto 30px;
  border: 4px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 20px rgba(58,134,255,0.3);
  overflow: hidden;
  position: relative;
  z-index: 1;
  transition: all 0.5s ease;
  animation: avatarFloat 3s ease-in-out infinite;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  background: rgba(255, 255, 255, 0.05);
}

@keyframes avatarFloat {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0px); }
}

.avatar:hover {
  transform: scale(1.05) rotate(5deg);
  box-shadow: 0 0 30px rgba(58,134,255,0.5);
  border: 4px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.avatar:hover img {
  transform: scale(1.1);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

h1 {
  font-size: 2.2rem;
  margin: 0 0 15px 0;
  letter-spacing: 2px;
  font-family: 'Montserrat', sans-serif;
  color: #fff;
  text-shadow: 0 0 10px rgba(58,134,255,0.5);
  animation: titleGlow 2s ease-in-out infinite;
}

@keyframes titleGlow {
  0% { text-shadow: 0 0 10px rgba(58,134,255,0.5); }
  50% { text-shadow: 0 0 20px rgba(58,134,255,0.8); }
  100% { text-shadow: 0 0 10px rgba(58,134,255,0.5); }
}

header div {
  font-size: 1.2rem;
  color: #3a86ff;
  text-shadow: 0 0 8px rgba(58,134,255,0.3);
  animation: subtitleFade 2s ease-in-out infinite;
}

@keyframes subtitleFade {
  0% { opacity: 0.8; }
  50% { opacity: 1; }
  100% { opacity: 0.8; }
}

h2 {
  font-size: 2rem;
  margin: 12px 0 20px 0;
  color: #3a86ff;
  letter-spacing: 1px;
  position: relative;
  display: inline-block;
  animation: fadeInLeft 1s;
  text-shadow: 0 0 8px rgba(58,134,255,0.3);
}

@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-40px); }
  to { opacity: 1; transform: translateX(0); }
}

section {
  max-width: 900px;
  margin: 0 auto 40px auto;
  background: rgba(30, 30, 30, 0.15);
  border-radius: 18px;
  box-shadow: 
      0 4px 24px rgba(58,134,255,0.15),
      inset 0 0 0 1px rgba(255, 255, 255, 0.1),
      inset 0 0 20px rgba(58,134,255,0.05);
  padding: 40px 30px;
  backdrop-filter: blur(8px) saturate(180%);
  -webkit-backdrop-filter: blur(8px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  z-index: 1;
  transition: all 0.3s ease;
}

section:hover {
  transform: translateY(-5px);
  box-shadow: 
      0 8px 32px rgba(58,134,255,0.2),
      inset 0 0 0 1px rgba(255, 255, 255, 0.2),
      inset 0 0 30px rgba(58,134,255,0.1);
  background: rgba(30, 30, 30, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 18px;
  background: linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.1) 0%,
      rgba(255, 255, 255, 0.05) 50%,
      rgba(255, 255, 255, 0) 100%
  );
  pointer-events: none;
}

.info-list {
  list-style: none;
  padding: 0;
  margin: 20px 0 20px;
  font-size: 1.1rem;
}

.info-list li {
  margin-bottom: 12px;
  line-height: 1.7;
  transition: transform 0.2s;
}

.info-list-sub {
  list-style: none;
  padding: 0;
  margin: 10px 0 20px;
  font-size: 1rem;
}

.info-list-sub li {
  margin-bottom: 4px;
  line-height: 1.7;
  transition: transform 0.2s;
}

.info-list li:hover, .info-list-sub li:hover {
  transform: translateX(10px);
}

.info-list a, .info-list-sub a {
  color: #fff;
  text-decoration: none;
  transition: color 0.3s ease;
}

.info-list a:hover, .info-list-sub a:hover {
  color: #3a86ff;
  text-decoration: underline;
}

.skills {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 18px;
  align-items: center;
}

.skill {
  background: rgba(58, 134, 255, 0.15);
  color: #fff;
  border-radius: 20px;
  padding: 4px 20px;
  font-weight: 700;
  font-size: 1rem;
  box-shadow: 0 2px 8px rgba(58,134,255,0.2);
  transition: all 0.3s ease;
  cursor: pointer;
  animation: popIn 0.7s, breathe 4s ease-in-out infinite;
  position: relative;
  overflow: hidden;
  height: 40px;
  display: flex;
  align-items: center;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.skill-large {
  background: linear-gradient(90deg, #3a86ff 0%, #8338ec 100%);
  color: #fff;
  border-radius: 25px;
  padding: 8px 24px;
  font-weight: 700;
  font-size: 1.3rem;
  box-shadow: 0 4px 12px rgba(58,134,255,0.3);
  transition: all 0.3s ease;
  cursor: pointer;
  animation: popIn 0.7s, breatheLarge 4s ease-in-out infinite;
  position: relative;
  overflow: hidden;
  height: 56px;
  display: flex;
  align-items: center;
  z-index: 1;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

@keyframes breathe {
  0% {
    transform: scale(1);
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.08);
  }
  50% {
    transform: scale(1.03);
    box-shadow: 0 0 25px rgba(0, 0, 0, 0.15);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.08);
  }
}

@keyframes breatheLarge {
  0% {
    transform: scale(1);
    box-shadow: 0 4px 12px rgba(58,134,255,0.3);
    background: linear-gradient(90deg, #3a86ff 0%, #8338ec 100%);
  }
  50% {
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(58,134,255,0.4);
    background: linear-gradient(90deg, #3a86ff 0%, #8338ec 100%);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 4px 12px rgba(58,134,255,0.3);
    background: linear-gradient(90deg, #3a86ff 0%, #8338ec 100%);
  }
}

.skill::before,
.skill-large::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: 0.5s;
}

.skill:hover,
.skill-large:hover {
  background: rgba(58, 134, 255, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.3);
  transform: scale(1.08) rotate(-2deg);
  box-shadow: 0 0 25px rgba(58,134,255,0.5);
  animation: none;
}

.skill-large:hover {
  background: linear-gradient(90deg, #3a86ff 0%, #8338ec 100%);
  border: 1px solid rgba(255, 255, 255, 0.4);
  transform: scale(1.08) rotate(-2deg);
  box-shadow: 0 0 30px rgba(58,134,255,0.6);
}

.skill:hover::before,
.skill-large:hover::before {
  left: 100%;
}

/* 为不同技能标签添加不同的动画延迟，使动画错开 */
.skill:nth-child(2n) {
  animation-delay: 0.5s;
}

.skill:nth-child(3n) {
  animation-delay: 1s;
}

.skill:nth-child(4n) {
  animation-delay: 1.5s;
}

.skill:nth-child(5n) {
  animation-delay: 2s;
}

.skill-large:nth-child(2n) {
  animation-delay: 0.5s;
}

.skill-large:nth-child(3n) {
  animation-delay: 1s;
}

@keyframes popIn {
  from { opacity: 0; transform: scale(0.7); }
  to { opacity: 1; transform: scale(1); }
}

.portfolio {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 20px;
}

/* 证书部分特殊样式 - 一行4列 */
.portfolio.certificates {
  grid-template-columns: repeat(4, 1fr);
}

.work {
  background: rgba(40, 40, 40, 0.4);
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(58,134,255,0.1);
  overflow: hidden;
  transition: all 0.3s ease;
  position: relative;
  animation: fadeInUp 1.2s;
  transform-style: preserve-3d;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.work:hover {
  transform: translateY(-8px) scale(1.03) rotateX(5deg) rotateY(5deg);
  box-shadow: 0 8px 24px rgba(58,134,255,0.2);
  background: rgba(40, 40, 40, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.work::after {
  content: '点击查看详情';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(58,134,255,0.9);
  color: white;
  padding: 8px 16px;
  border-radius: 16px;
  font-size: 0.85rem;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  white-space: nowrap;
  max-width: 120px;
  text-align: center;
}

.work:hover::after {
  opacity: 1;
}

.work img, .work video {
  width: 100%;
  display: block;
  aspect-ratio: 3/2;
  object-fit: cover;
  transition: transform 0.3s ease;
  pointer-events: none;
}

.work-title {
  font-size: 1.1rem;
  font-weight: 700;
  padding: 12px 16px 10px 16px;
  color: #3a86ff;
  background: rgba(58,134,255,0.1);
  border-bottom-left-radius: 14px;
  border-bottom-right-radius: 14px;
  transition: background 0.3s ease;
  pointer-events: none;
}

.bonus {
  column-count: 3;
  column-gap: 16px;
  margin-top: 20px;
  padding: 0 10px;
}

.bonus-video {
  break-inside: avoid;
  margin-bottom: 16px;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(58,134,255,0.1);
  background: rgba(40, 40, 40, 0.8);
  animation: fadeInUp 1.2s;
  transition: all 0.3s ease;
  transform-style: preserve-3d;
}

/* 视频容器样式 */
.bonus-video .video-container {
  position: relative;
  width: 100%;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 16/9; /* 默认比例 */
}

/* 9:16 比例视频 */
.bonus-video .video-container.portrait {
  aspect-ratio: 9/16; /* 竖屏视频比例 */
}

/* 16:9 比例视频 */
.bonus-video .video-container.landscape {
  aspect-ratio: 16/9; /* 横屏视频比例 */
}

.bonus-video .video-container video {
  width: 100%;
  height: 100%;
  object-fit: contain; /* 改为contain以保持原始比例 */
  background: #000;
  transition: transform 0.3s ease;
}

/* 全屏模式下的视频样式 */
.bonus-video .video-container video:fullscreen {
  width: auto;
  height: 100vh;
  object-fit: contain;
  background: #000;
}

.bonus-video .video-container video::-webkit-full-screen {
  width: auto;
  height: 100vh;
  object-fit: contain;
  background: #000;
}

.bonus-video .video-container video::-moz-full-screen {
  width: auto;
  height: 100vh;
  object-fit: contain;
  background: #000;
}

.bonus-video:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 8px 24px rgba(58,134,255,0.2);
}

.bonus-video:hover .video-container video {
  transform: scale(1.05);
}

.bonus-title {
  font-size: 0.95rem;
  font-weight: 700;
  padding: 10px 12px;
  color: #ff006e;
  background: rgba(255,0,110,0.1);
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
  transition: background 0.3s ease;
}

.bonus-video:hover .bonus-title {
  background: rgba(255,0,110,0.2);
}

/* 响应式布局 */
@media (max-width: 1200px) {
  .bonus {
    column-count: 2;
  }
}

@media (max-width: 768px) {
  .portfolio {
    grid-template-columns: repeat(2, 1fr);
  }
  
  /* 证书部分在平板端保持4列 */
  .portfolio.certificates {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .bonus {
    column-count: 2;
    column-gap: 12px;
  }
  
  .bonus-video .video-container {
    aspect-ratio: 16/9;
  }
  
  .bonus-video .video-container.portrait {
    aspect-ratio: 9/16;
  }
  
  .bonus-video .video-container.landscape {
    aspect-ratio: 16/9;
  }
}

@media (max-width: 480px) {
  .bonus {
    column-count: 1;
  }
  
  .bonus-video .video-container {
    aspect-ratio: 16/9;
  }
  
  .bonus-video .video-container.portrait {
    aspect-ratio: 9/16;
  }
  
  .bonus-video .video-container.landscape {
    aspect-ratio: 16/9;
  }
}

footer {
  text-align: center;
  color: #fff;
  padding: 30px 0 30px 0;
  font-size: 0.95rem;
  position: relative;
  z-index: 1;
}

@media (max-width: 600px) {
  section { padding: 24px 8px; }
  .portfolio { grid-template-columns: 1fr; }
  
  /* 证书部分在手机端改为2列 */
  .portfolio.certificates {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .avatar {
    width: 120px;
    height: 120px;
  }
  
  /* 证书弹窗在手机端的样式 */
  .modal.certificate-modal .modal-content {
    width: 95%;
    max-width: 400px;
  }
  
  .modal.certificate-modal .image-gallery {
    background-color: #fff;
    padding: 10px;
  }
  
  .modal.certificate-modal .image-gallery img {
    max-width: 250px;
    max-height: 200px;
    background-color: #fff;
  }
  
  .certificate-placeholder {
    padding: 30px 20px;
    max-width: 300px;
  }
  
  .certificate-placeholder h4 {
    font-size: 1.3rem;
  }
  
  .certificate-placeholder p {
    font-size: 0.9rem;
  }
  
  .certificate-status {
    font-size: 1rem;
    padding: 8px 16px;
  }
}

/* 弹窗样式 */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  overflow-y: auto;
  padding: 20px 0;
}

.modal-content {
  position: relative;
  background: rgba(26, 26, 26, 0.8);
  margin: 20px auto;
  padding: 20px;
  width: 80%;
  max-width: 1000px;
  border-radius: 15px;
  box-shadow: 0 0 20px rgba(58,134,255,0.2);
  animation: modalFadeIn 0.3s ease;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.close {
  position: absolute;
  right: 20px;
  top: 15px;
  color: #fff;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.3s;
}

.close:hover {
  color: #3a86ff;
}

.modal-header {
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid rgba(58,134,255,0.2);
}

.modal-header h3 {
  color: #3a86ff;
  margin: 0;
  font-size: 1.8rem;
}

.modal-body {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.modal-media {
  width: 100%;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  background-color: #000;
  padding: 0;
}

.image-gallery {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.image-gallery img {
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 10px;
  cursor: zoom-in;
  transition: transform 0.3s ease;
  background-color: #000;
}

/* 证书弹窗特殊样式 */
.modal.certificate-modal .modal-content {
  width: 60%;
  max-width: 600px;
}

.modal.certificate-modal .image-gallery {
  background-color: #fff;
  padding: 20px;
  border-radius: 10px;
}

.modal.certificate-modal .image-gallery img {
  max-width: 400px;
  max-height: 300px;
  width: auto;
  height: auto;
  object-fit: contain;
  margin: 0 auto;
  display: block;
  background-color: #fff;
}

/* 证书占位符样式 */
.certificate-placeholder {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 40px;
  border-radius: 15px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  max-width: 400px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}

.certificate-placeholder::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
  animation: shimmer 3s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
  100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.certificate-icon {
  font-size: 4rem;
  margin-bottom: 20px;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-10px); }
  60% { transform: translateY(-5px); }
}

.certificate-placeholder h4 {
  font-size: 1.5rem;
  margin: 0 0 15px 0;
  font-weight: bold;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.certificate-placeholder p {
  margin: 8px 0;
  font-size: 1rem;
  opacity: 0.9;
}

.certificate-status {
  background: rgba(255,255,255,0.2);
  padding: 10px 20px;
  border-radius: 25px;
  margin-top: 20px;
  font-weight: bold;
  font-size: 1.1rem;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.3);
}

.image-gallery img:hover {
  transform: scale(1.02);
}

.modal-info {
  color: #fff;
  margin-top: 20px;
}

.modal-info p {
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 20px;
}

.modal-info p a {
  color: #3a86ff;
  text-decoration: none;
  transition: color 0.3s ease;
}

.modal-info p a:hover {
  color: #8338ec;
  text-decoration: underline;
}

.modal-details {
  background: rgba(58,134,255,0.1);
  padding: 20px;
  border-radius: 10px;
}

.detail-item {
  margin-bottom: 10px;
}

.detail-item:last-child {
  margin-bottom: 0;
}

.detail-item strong {
  color: #3a86ff;
  margin-right: 10px;
}

@media (max-width: 768px) {
  .modal {
    padding: 10px 0;
  }
  
  .modal-content {
    width: 95%;
    margin: 10px auto;
    padding: 15px;
  }
  
  .modal-header h3 {
    font-size: 1.5rem;
  }
  
  .modal-info p {
    font-size: 1rem;
  }
  
  /* 证书弹窗在平板端的样式 */
  .modal.certificate-modal .modal-content {
    width: 80%;
    max-width: 500px;
  }
  
  .modal.certificate-modal .image-gallery {
    background-color: #fff;
    padding: 15px;
  }
  
  .modal.certificate-modal .image-gallery img {
    max-width: 300px;
    max-height: 250px;
    background-color: #fff;
  }
  
  .certificate-placeholder {
    padding: 35px 25px;
    max-width: 350px;
  }
}

/* 应用呼吸动画到卡片 */
.card {
  background: white;
  border-radius: 15px;
  padding: 30px;
  margin-bottom: 30px;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.08);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  animation: breathe 4s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  will-change: transform;
  backface-visibility: hidden;
  transform: translateZ(0);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 30px rgba(0, 0, 0, 0.15);
  animation: none;
} 