/* 全局样式重置与基础设置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

:root {
  --primary-color: #2c3e50;
  --secondary-color: #3498db;
  --text-color: #2c3e50;
  --light-text: #7f8c8d;
  --background-color: #f8f9fa;
  --card-background: #ffffff;
  --border-radius: 12px;
  --transition: all 0.3s ease;
  --gradient-1: linear-gradient(120deg, #84fab0 0%, #8fd3f4 100%);
  --gradient-2: linear-gradient(120deg, #a1c4fd 0%, #c2e9fb 100%);
  --gradient-3: linear-gradient(120deg, #fccb90 0%, #d57eeb 100%);
  --gradient-4: linear-gradient(120deg, #e0c3fc 0%, #8ec5fc 100%);
}

body {
  background-color: var(--background-color);
  color: var(--text-color);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* 背景装饰元素 */
.background-shapes {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
}

.shape {
  position: absolute;
  filter: blur(40px);
  opacity: 0.5;
  animation: floatAnimation 20s infinite ease-in-out;
}

.shape-1 {
  background: var(--gradient-1);
  width: 300px;
  height: 300px;
  top: -50px;
  left: -50px;
  border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
  animation-delay: 0s;
}

.shape-2 {
  background: var(--gradient-2);
  width: 400px;
  height: 400px;
  top: 20%;
  right: -100px;
  border-radius: 40% 60% 70% 30% / 40% 70% 30% 60%;
  animation-delay: -5s;
}

.shape-3 {
  background: var(--gradient-3);
  width: 350px;
  height: 350px;
  bottom: -50px;
  left: 30%;
  border-radius: 50% 50% 30% 70% / 50% 30% 70% 50%;
  animation-delay: -10s;
}

.shape-4 {
  background: var(--gradient-4);
  width: 250px;
  height: 250px;
  top: 40%;
  left: -30px;
  border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  animation-delay: -15s;
}

@keyframes floatAnimation {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg);
  }
  25% {
    transform: translate(10px, 10px) rotate(5deg);
  }
  50% {
    transform: translate(0, 20px) rotate(-5deg);
  }
  75% {
    transform: translate(-10px, 10px) rotate(5deg);
  }
}

/* 容器样式 */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
}

/* 毛玻璃效果容器 */
.glass-container {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--border-radius);
  padding: 30px;
  margin: 20px 0;
  box-shadow: 0 8px 32px rgba(31, 38, 135, 0.15);
}

/* 头部区域 */
header {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px rgba(31, 38, 135, 0.15);
  padding: 60px 0;
  margin-bottom: 40px;
  position: relative;
  overflow: hidden;
}

/* 头部内容布局 */
.header-content {
  display: grid;
  grid-template-columns: 350px 350px 533px;  /* 固定列宽 */
  gap: 40px;
  justify-content: center;
  align-items: start;
  position: relative;
  z-index: 1;
  padding: 20px;
}

/* 个人信息区域 */
.profile-section {
  flex: 1;
  max-width: 400px;
  text-align: center;
  position: relative;
}

.profile-section::before {
  content: '';
  position: absolute;
  top: -20px;
  left: -20px;
  right: -20px;
  bottom: -20px;
  background: var(--gradient-2);
  opacity: 0.1;
  border-radius: 30px;
  z-index: -1;
  filter: blur(20px);
}

.profile-img {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 24px;
  border: 4px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 8px 32px rgba(31, 38, 135, 0.2);
  transition: var(--transition);
  position: relative;
  z-index: 1;
}

.profile-img:hover {
  transform: scale(1.05);
  border-color: rgba(255, 255, 255, 1);
  box-shadow: 0 12px 40px rgba(31, 38, 135, 0.3);
}

.profile-info h1 {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 12px;
  font-weight: 700;
}

.profile-info .subtitle {
  font-size: 1.2rem;
  color: var(--light-text);
  margin-bottom: 20px;
}

/* 奖项展示区域 */
.awards-section {
  flex: 1;
  max-width: 350px;
  height: 400px;  /* 设置固定高度 */
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--border-radius);
  padding: 30px;
  box-shadow: 0 8px 32px rgba(31, 38, 135, 0.15);
  position: relative;
  display: flex;
  flex-direction: column;
}

.awards-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--gradient-1);
  opacity: 0.05;
  z-index: -1;
}

.awards-section h3 {
  color: var(--primary-color);
  font-size: 1.5rem;
  margin-bottom: 20px;
  text-align: center;
}

.awards-list {
  list-style: none;
  flex: 1;
  overflow-y: auto;
  padding-right: 10px;  /* 为滚动条留出空间 */
}

/* 自定义滚动条样式 */
.awards-list::-webkit-scrollbar {
  width: 6px;
}

.awards-list::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 3px;
}

.awards-list::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 3px;
}

.awards-list::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.2);
}

.awards-list li {
  display: flex;
  align-items: center;
  padding: 15px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  transition: var(--transition);
}

.awards-list li:last-child {
  border-bottom: none;
}

.awards-list li:hover {
  background: rgba(52, 152, 219, 0.05);
  transform: translateX(5px);
}

.award-icon {
  margin-right: 15px;
  font-size: 1.2rem;
}

/* 照片展示区域 */
.photo-showcase {
  width: 100%;
  position: relative;
}

.photo-container {
  width: 100%;
  height: 400px;
  border-radius: var(--border-radius);
  overflow: hidden;
  position: relative;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px rgba(31, 38, 135, 0.15);
  display: flex;
  flex-direction: column;
}

.photo-item {
  width: 100%;
  height: 100%;
  position: relative;
}

.showcase-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.photo-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 15px;
  background: linear-gradient(to top, rgba(0,0,0,0.8), rgba(0,0,0,0));
  color: white;
  border-bottom-left-radius: var(--border-radius);
  border-bottom-right-radius: var(--border-radius);
}

.photo-info h3 {
  font-size: 1.2rem;
  margin-bottom: 8px;
}

.photo-info p {
  font-size: 0.9rem;
  opacity: 0.9;
}

.error-message {
  color: #ef4444;
  text-align: center;
  padding: 40px;
}

/* 淡入动画 */
.fade-in {
  animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 联系方式区域 */
.contact {
  padding: 40px 30px;
  margin-bottom: 40px;
}

.contact h2 {
  font-size: 1.8rem;
  margin-bottom: 25px;
  position: relative;
  display: inline-block;
}

.contact h2::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--gradient-1);
}

.contact-content {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.contact-intro {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.contact-intro p {
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--text-color);
  opacity: 0.9;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-top: 20px;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--border-radius);
  transition: transform 0.3s ease, background-color 0.3s ease;
}

.contact-item:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.1);
}

.contact-icon {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  transition: transform 0.3s ease;
}

.contact-item:hover .contact-icon {
  transform: scale(1.1);
}

.icon {
  font-size: 1.5rem;
}

.contact-info {
  flex: 1;
}

.contact-info h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
  color: var(--text-color);
}

.contact-link,
.social-link {
  color: var(--text-color);
  text-decoration: none;
  font-size: 1rem;
  opacity: 0.9;
  transition: opacity 0.3s ease;
  display: inline-block;
}

.contact-link:hover,
.social-link:hover {
  opacity: 1;
  text-decoration: underline;
}

.location,
.school {
  font-size: 1rem;
  opacity: 0.9;
}

.social-links {
  display: flex;
  gap: 15px;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .contact {
    padding: 30px 20px;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .contact-intro p {
    font-size: 1rem;
  }

  .contact-item {
    padding: 15px;
  }

  .contact-icon {
    width: 40px;
    height: 40px;
  }

  .icon {
    font-size: 1.2rem;
  }
}

@media (max-width: 480px) {
  .contact h2 {
    font-size: 1.6rem;
  }

  .contact-item {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
  }

  .contact-info h3 {
    font-size: 1rem;
  }
}

/* 页脚 */
footer {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding: 30px 0;
  margin-top: 60px;
  text-align: center;
  color: var(--light-text);
  position: relative;
  overflow: hidden;
}

footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--gradient-2);
  opacity: 0.05;
  z-index: -1;
}

/* 加载状态 */
.loading {
  text-align: center;
  padding: 40px;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(0, 0, 0, 0.1);
  border-left-color: var(--secondary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

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

/* 响应式设计 */
@media (max-width: 1200px) {
  .header-content {
    gap: 20px;
  }

  .profile-section,
  .awards-section,
  .photo-showcase {
    max-width: none;
  }
}

@media (max-width: 1200px) {
  .header-content {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .profile-section,
  .awards-section {
    width: 100%;
    max-width: 350px;
    margin: 0 auto;
  }
  
  .photo-showcase {
    width: 100%;
    max-width: 533px;
    margin: 0 auto;
  }

  .awards-section,
  .photo-container {
    height: 350px;  /* 调整响应式布局高度 */
  }

  .shape {
    opacity: 0.3;
  }

  .awards-section,
  .contact-info {
    padding: 20px;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
    padding: 15px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 15px;
  }

  .profile-img {
    width: 120px;
    height: 120px;
  }

  .shape {
    opacity: 0.2;
  }

  .glass-container {
    padding: 20px;
  }

  .awards-section,
  .photo-container {
    height: 300px;  /* 调整响应式布局高度 */
  }

  .photo-info {
    padding: 15px;
  }

  .photo-info h3 {
    font-size: 1rem;
  }

  .photo-info p {
    font-size: 0.8rem;
  }
}

.github-btn {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  color: var(--text-color);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  transition: var(--transition);
  border-radius: 20px;
  margin-top: 15px;
  background: rgba(255, 255, 255, 0.1);
}

.github-btn:hover {
  color: var(--secondary-color);
  transform: translateY(-2px);
}

/* 关于我和项目区域 */
.about-and-projects .container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin: 40px 0;
}

/* 项目和论文展示 */
.projects {
  padding: 30px;
  height: 600px;  /* 设置固定高度 */
  display: flex;
  flex-direction: column;
}

.projects-papers-tabs {
  display: flex;
  gap: 20px;
  margin-bottom: 30px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 10px;
}

.tab-btn {
  background: none;
  border: none;
  color: var(--text-color);
  font-size: 1.2rem;
  font-weight: 500;
  padding: 8px 16px;
  cursor: pointer;
  opacity: 0.7;
  transition: var(--transition);
  position: relative;
}

.tab-btn::after {
  content: '';
  position: absolute;
  bottom: -12px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--gradient-1);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.tab-btn.active {
  opacity: 1;
}

.tab-btn.active::after {
  transform: scaleX(1);
}

.tab-content {
  display: none;
  flex: 1;
  overflow-y: auto;
  padding-right: 10px;  /* 为滚动条留出空间 */
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.5s ease;
}

/* 自定义滚动条样式 */
.tab-content::-webkit-scrollbar {
  width: 6px;
}

.tab-content::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 3px;
}

.tab-content::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 3px;
}

.tab-content::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.2);
}

.project-item,
.paper-item {
  padding: 20px;
  border-radius: var(--border-radius);
  background: rgba(255, 255, 255, 0.05);
  margin-bottom: 20px;
  transition: var(--transition);
}

.project-item:hover,
.paper-item:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.project-item h3,
.paper-item h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
  color: var(--text-color);
}

.project-desc,
.paper-desc {
  font-size: 0.95rem;
  color: var(--text-color);
  opacity: 0.8;
  margin-bottom: 15px;
  line-height: 1.5;
}

.project-meta,
.paper-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
}

.date {
  color: var(--text-color);
  opacity: 0.7;
}

.project-link,
.paper-link {
  color: var(--text-color);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: var(--transition);
}

.project-link:hover,
.paper-link:hover {
  opacity: 0.8;
}

.arrow {
  font-size: 1.1em;
  transition: transform 0.3s ease;
}

.project-link:hover .arrow,
.paper-link:hover .arrow {
  transform: translateX(5px);
}

/* 响应式调整 */
@media (max-width: 1024px) {
  .content-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}

@media (max-width: 768px) {
  .projects {
    padding: 20px;
  }

  .projects-papers-tabs {
    gap: 15px;
  }

  .tab-btn {
    font-size: 1.1rem;
    padding: 6px 12px;
  }
}

@media (max-width: 480px) {
  .project-meta,
  .paper-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .project-link,
  .paper-link {
    width: 100%;
    justify-content: space-between;
  }
}

/* 关于我区域样式 */
.about {
  padding: 30px;
}

.about h2 {
  font-size: 1.8rem;
  margin-bottom: 25px;
  position: relative;
  display: inline-block;
}

.about h2::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--gradient-1);
}

.about-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.about-section {
  margin-bottom: 15px;
}

.greeting {
  font-size: 1.4rem;
  font-weight: 500;
  margin-bottom: 5px;
}

.highlight {
  background: var(--gradient-2);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 600;
}

.welcome {
  font-size: 1.2rem;
  margin-bottom: 20px;
  opacity: 0.9;
}

.intro, .projects-intro, .hobby-intro, .thanks {
  line-height: 1.8;
  font-size: 1.05rem;
  color: var(--text-color);
  opacity: 0.85;
}

.emoji {
  font-size: 1.2em;
  margin-right: 8px;
  display: inline-block;
  vertical-align: middle;
}

.thanks {
  font-style: italic;
  opacity: 0.8;
  margin-top: 10px;
  padding-top: 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* 添加渐入动画 */
.about-section {
  animation: fadeInUp 0.6s ease forwards;
  opacity: 0;
}

.about-section:nth-child(1) { animation-delay: 0.1s; }
.about-section:nth-child(2) { animation-delay: 0.2s; }
.about-section:nth-child(3) { animation-delay: 0.3s; }
.about-section:nth-child(4) { animation-delay: 0.4s; }
.about-section:nth-child(5) { animation-delay: 0.5s; }

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 响应式调整 */
@media (max-width: 768px) {
  .about {
    padding: 20px;
  }

  .about h2 {
    font-size: 1.6rem;
  }

  .greeting {
    font-size: 1.2rem;
  }

  .welcome {
    font-size: 1.1rem;
  }

  .intro, .projects-intro, .hobby-intro, .thanks {
    font-size: 1rem;
    line-height: 1.6;
  }
} 