/* 使用阿里巴巴普惠体（免费商用） */
@font-face {
  font-family: 'AlibabaPuHuiTi';
  src: url('/fonts/AlibabaSans-Regular.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

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

:root {
  --primary: #1a1a1a;
  --secondary: #4a4a4a;
  --light: #f5f5f5;
  --accent: #5e72e4;
  --transition: all 0.3s ease;
}






/* 添加在:root变量之后 */
body {
  position: relative;
  font-family: 'AlibabaPuHuiTi',
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    Roboto,
    'PingFang SC',
    'Microsoft YaHei',
    sans-serif;
  background-color: #fff;
  color: var(--primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url('https://api.cuteyun.top/v2/wppc');
  /* 随机背景图 */
  background-size: cover;
  background-position: center;
  z-index: -2;
}

body::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.85);
  /* 半透明白色遮罩 */
  backdrop-filter: blur(2px);
  /* 毛玻璃效果 */
  z-index: -1;
}

.container {  
  position: relative;
  /* 确保内容在遮罩之上 */
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}


#underline a {
    color: blue;
    text-decoration: none;
    font-size: 16px;
    position: relative; /* 确保::after伪元素可以相对于链接定位 */
}

#underline a::after {
    content: '';
    position: absolute;
    left: 0; /* 从链接的左侧开始 */
    bottom: -2px; /* 根据链接文本的底部位置调整 */
    width: 100%; /* 与链接文本宽度一致 */
    height: 2px; /* 下划线的厚度 */
    background-color: transparent;
    transition: background-color 0.3s; /* 平滑过渡效果 */
}

#underline a:hover::after, 
#underline a.active::after {
    background-color: #2575fc; /* 激活或悬停时的下划线颜色 */
}


/* 头部样式 */
header {
  padding: 40px 0;
  text-align: center;
}

.logo {
  font-size: 2.5rem;
  font-weight: 600;
  letter-spacing: -1px;
  margin-bottom: 10px;
}

.tagline {
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--secondary);
  max-width: 600px;
  margin: 0 auto 30px;
}

/* 导航样式 */
nav {
  display: flex;
  justify-content: center;
  margin-bottom: 50px;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 30px;
}

.nav-links a {
  text-decoration: none;
  color: var(--primary);
  font-weight: 500;
  position: relative;
  padding-bottom: 5px;
  transition: var(--transition);
}

.nav-links a:after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent);
  transition: var(--transition);
}

.nav-links a:hover:after {
  width: 100%;
}

/* 主要内容区 */
.hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 50px 0;
  gap: 50px;
}

.hero-content {
  flex: 1;
}

.hero-image {
  flex: 1;
  display: flex;
  justify-content: center;
}

.profile {
  width: 220px;
  height: 220px;
  background: linear-gradient(45deg, #f0f0f0, #e0e0e0);
  border-radius: 50%;
  overflow: hidden;
  position: relative;
  align-items: center;
  justify-content: center;
}



.section-title {
  font-size: 1.8rem;
  font-weight: 600;
  margin-bottom: 25px;
  position: relative;
  display: inline-block;
}

.section-title:after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 60px;
  height: 3px;
  background-color: var(--accent);
}

.hero-text {
  margin-bottom: 30px;
  font-size: 1.1rem;
  color: var(--secondary);
  max-width: 700px;
}

/* 技能部分 */
.skills-section {
  padding: 80px 0;
  position: relative;
  background: none;
  /* 移除原本的var(--light)背景 */
}

.skills-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.2);
  /* 更透明的遮罩 */
  backdrop-filter: blur(12px);
  /* 更强的模糊 */
  z-index: -1;
}


.skills {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 30px;
}

.skill-card {
  background: #fff;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.03);
  transition: var(--transition);
}

.skill-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.06);
}

.skill-icon {
  font-size: 2.5rem;
  margin-bottom: 20px;
  color: var(--accent);
}

.skill-title {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 15px;
}

.skill-desc {
  color: var(--secondary);
}

/* 作品部分 */
.projects-section {
  padding: 80px 0;
}

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

.project-card {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

.project-image {
  height: 200px;
  background: linear-gradient(45deg, #f5f7fa, #e4edff);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 1.2rem;
}

.project-content {
  padding: 25px;
}

.project-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.project-desc {
  color: var(--secondary);
  margin-bottom: 20px;
  font-size: 0.95rem;
}

.project-link {
  display: inline-flex;
  align-items: center;
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
}

.project-link i {
  margin-left: 5px;
  transition: var(--transition);
}

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

/* 联系部分 */
.contact-section {
  padding: 80px 0;
  position: relative;
  background: none;
  /* 移除原本的var(--light)背景 */
  text-align: center;
}


.contact-text {
  max-width: 600px;
  margin: 0 auto 40px;
  color: var(--secondary);
}

.contact-btn {
  display: inline-block;
  background-color: var(--primary);
  color: #fff;
  padding: 15px 35px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
  border: 2px solid var(--primary);
}

.contact-btn:hover {
  background-color: transparent;
  color: var(--primary);
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 25px;
  margin-top: 40px;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #fff;
  color: var(--primary);
  text-decoration: none;
  font-size: 1.2rem;
  transition: var(--transition);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

.social-link:hover {
  background-color: var(--accent);
  color: #fff;
  transform: translateY(-3px);
}

/* 页脚 */
footer {
  padding: 30px 0;
  text-align: center;
  position: relative;
  background: none;
  /* 纯白背景 */
  /* color: var(--secondary); */
  font-size: 0.9rem;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  margin-top: auto;
}


footer .container {
  padding: 30px 0;
  text-align: center;
  position: relative;
  background: none;
  /* 纯白背景 */
  /* color: var(--secondary); */
  font-size: 0.9rem;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  margin-top: auto;
}

footer .container ::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.2);
  /* 更透明的遮罩 */
  backdrop-filter: blur(3px);
  /* 更强的模糊 */
  z-index: -1;
}

/* 响应式设计 */
@media (max-width: 900px) {
  .hero {
    flex-direction: column;
    text-align: center;
  }

  .section-title:after {
    left: 50%;
    transform: translateX(-50%);
  }

  .hero-text {
    margin: 0 auto 30px;
  }

  nav {
    margin-bottom: 30px;
  }
}

@media (max-width: 600px) {
  .nav-links {
    gap: 15px;
    flex-wrap: wrap;
  }

  .logo {
    font-size: 2rem;
  }

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

  .profile {
    width: 220px;
    height: 220px;
  }

  .profile::before {
    width: 200px;
    height: 200px;
  }
}