/* pagemain.css */
:root {
  --primary-color: #ffc91d;
  --secondary-color: #333333;
  --light-color: #f5f5f5;
  --dark-color: #1a1a1a;
  --white-color: #ffffff;
  --gray-100: #f5f5f5;
  --gray-200: #e5e5e5;
  --gray-300: #d4d4d4;
  --gray-400: #a3a3a3;
  --gray-500: #737373;
  --gray-600: #525252;
  --gray-700: #404040;
  --gray-800: #262626;
  --gray-900: #171717;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --transition: all 0.3s ease;
  --transition-transform: transform 0.3s ease;
  --border-radius: 0.75rem;
  --sidebar-width: 16rem;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--light-color);
  color: var(--secondary-color);
  position: relative;
  min-height: 100vh;
}

body.dark {
  background-color: var(--dark-color);
  color: var(--light-color);
}

/* 背景图案 */
.background-pattern {
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image: url('../images/bg-pattern.png'); /* 如果有背景图案 */
  background-size: cover;
  opacity: 0.1;
}

/* 侧边栏 */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
  width: var(--sidebar-width);
  background-color: var(--white-color);
  box-shadow: var(--shadow-lg);
  z-index: 20;
  transition: var(--transition);
  transform: translateX(-100%);
}

body.dark .sidebar {
  background-color: var(--gray-900);
}

@media (min-width: 768px) {
  .sidebar {
    transform: translateX(0);
  }
}

.sidebar.open {
  transform: translateX(0);
}

.sidebar-container {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* 头像区域 */
.avatar-section {
  padding: 1.5rem;
  text-align: center;
}

.avatar-img {
  width: 8rem;
  height: 8rem;
  margin: 0 auto;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--primary-color);
  box-shadow: var(--shadow-xl);
  transition: opacity 0.5s;
}

.avatar-name {
  margin-top: 1rem;
  font-size: 1.25rem;
  font-weight: bold;
}

body.dark .avatar-name {
  color: var(--light-color);
}

.avatar-desc {
  color: var(--gray-500);
  font-size: 0.875rem;
}

body.dark .avatar-desc {
  color: var(--gray-400);
}

/* 导航菜单 */
.nav-menu {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 0;
}

.sidebar-link {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  transition: var(--transition);
  text-decoration: none;
  color: inherit;
}

.sidebar-link.active {
  color: var(--secondary-color);
  font-weight: 500;
}

body.dark .sidebar-link.active {
  color: var(--light-color);
}

.sidebar-link:hover:not(.active) {
  background-color: var(--gray-100);
}

body.dark .sidebar-link:hover:not(.active) {
  background-color: var(--gray-800);
}

.menu-icon {
  margin-right: 0.75rem;
  width: 1.25rem;
  text-align: center;
}

/* 侧边栏底部 */
.sidebar-footer {
  padding: 1.5rem;
}

.dark-mode-container {
  display: flex;
  align-items: center;
  justify-content: center;
}

.dark-mode-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background-color: var(--gray-100);
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

body.dark .dark-mode-toggle {
  background-color: var(--gray-800);
}

.dark-mode-toggle:hover {
  background-color: var(--gray-200);
}

body.dark .dark-mode-toggle:hover {
  background-color: var(--gray-700);
}

.light-mode-icon {
  color: #fbbf24;
}

.dark-mode-icon {
  color: var(--gray-300);
  display: none;
}

body.dark .dark-mode-icon {
  display: block;
}

body.dark .light-mode-icon {
  display: none;
}

/* 社交媒体链接 */
.social-links {
  display: flex;
  justify-content: center;
  margin-top: 1.5rem;
  gap: 1rem;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background-color: var(--gray-100);
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

body.dark .social-link {
  background-color: var(--gray-800);
}

.social-link:hover {
  background-color: var(--primary-color);
  color: var(--secondary-color);
}

/* 移动端菜单按钮 */
.menu-toggle {
  position: fixed;
  top: 1rem;
  right: 1rem;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background-color: var(--primary-color);
  color: var(--secondary-color);
  border: none;
  box-shadow: var(--shadow-lg);
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.menu-toggle:hover {
  transform: scale(1.05);
}

@media (min-width: 768px) {
  .menu-toggle {
    display: none;
  }
}

/* 微信二维码弹窗 */
.modal {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.modal.show {
  opacity: 1;
  visibility: visible;
}

.modal.show .modal-content {
  transform: scale(1);
  opacity: 1;
}

.modal-content {
  background-color: var(--white-color);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-xl);
  max-width: 28rem;
  width: 90%;
  transform: scale(0.95);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

body.dark .modal-content {
  background-color: var(--gray-800);
}

.modal-header {
  display: flex;
  justify-content: flex-end;
  padding: 1rem;
}

.close-button {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--gray-500);
  cursor: pointer;
  transition: var(--transition);
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.close-button:hover {
  color: var(--gray-700);
  background-color: var(--gray-100);
}

body.dark .close-button:hover {
  color: var(--gray-200);
  background-color: var(--gray-700);
}

.modal-body {
  text-align: center;
  padding: 0 1.5rem 1.5rem;
}

.modal-title {
  font-size: 1.25rem;
  font-weight: bold;
  margin-bottom: 1rem;
}

.qr-code-img {
  width: 16rem;
  height: 16rem;
  object-fit: contain;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
  margin: 0 auto;
}

.modal-desc {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  color: var(--gray-500);
}

body.dark .modal-desc {
  color: var(--gray-400);
}

/* 主内容区域 */
.main-content {
  position: relative;
  min-height: 100vh;
  z-index: 10;
  transition: var(--transition);
  margin-left: 0;
}

@media (min-width: 768px) {
  .main-content {
    margin-left: var(--sidebar-width);
  }
}

/* 章节 */
.section {
  padding: 4rem 1rem;
}

@media (min-width: 768px) {
  .section {
    padding: 4rem 2rem;
  }
}

.works-section {
  background-color: var(--gray-100);
}

body.dark .works-section {
  background-color: var(--gray-900);
}

/* 容器 */
.container {
  max-width: 66rem;
  margin: 0 auto;
}

/* 修改标题样式 - 使用竖线放在文本前面 */
.section-title {
  margin-bottom: 3rem;
  text-align: center;
  position: relative;
  display: inline-block;
  margin-left: auto;
  margin-right: auto;
  font-size: 1.5rem;
  font-weight: bold;
  padding-left: 1.5rem; /* 为竖线留出空间 */
}

.title-decoration {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0.25rem; /* 改为竖线宽度 */
  height: 100%; /* 贯穿整个高度 */
  background-color: var(--primary-color);
}

/* 个人信息网格 */
.info-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px) {
  .info-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* 信息卡片 */
.info-card {
  background-color: var(--white-color);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-lg);
}

body.dark .info-card {
  background-color: var(--gray-800);
}

.card-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--gray-200);
}

body.dark .card-title {
  border-bottom: 1px solid var(--gray-700);
}

/* 信息项 */
.info-item {
  display: flex;
  align-items: center;
  margin-bottom: 0.75rem;
}

.info-item:last-child {
  margin-bottom: 0;
}

.info-icon {
  color: var(--primary-color);
  margin-right: 0.75rem;
  width: 1.25rem;
  text-align: center;
}

.contact-link {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

.contact-link:hover {
  color: var(--primary-color);
}

/* 时间线部分 */
.timeline-section {
  margin-bottom: 1rem;
}

.timeline-section:last-child {
  margin-bottom: 0;
}
/* 修改工作经历和在校经历的标题样式，使图标紧跟文本 */
.timeline-header {
  display: flex;
  align-items: center;
  justify-content: flex-start; /* 默认左侧对排 space-between后 */
  margin-bottom: 0.5rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 0.5rem;
  transition: var(--transition);
  width: fit-content; /* 使容器宽度适应内容 */
}

.timeline-header:hover {
  background-color: var(--gray-100);
}

body.dark .timeline-header:hover {
  background-color: var(--gray-800);
}

.timeline-title {
  font-size: 1.125rem;
  display: flex;
  align-items: center;
}

.timeline-icon {
  color: var(--primary-color);
  margin-right: 0.5rem;
}

.toggle-icon {
  color: var(--primary-color);
  transition: var(--transition-transform);
}

.toggle-icon.rotated {
  transform: rotate(180deg);
}

.timeline-details {
  overflow: hidden;
  transition: max-height 0.3s ease-out;
  max-height: 1000px;
}

/* 仅在闭合状态限制高度 */
.timeline-details.closed {
  max-height: 0 !important;
  overflow: hidden !important;
}


/* 时间线部分折叠/展开控制，仅依赖data-show属性 */
.timeline-details[data-show="false"] {
  display: none !important;
}
.timeline-details[data-show="true"] {
  display: block !important;
}

/* 增大时间线描述文本的字体大小 */
.timeline-desc {
  margin-top: 0.5rem;
  color: var(--gray-600);
  font-size: 1rem; /* 从 0.875rem 增大到 1rem */
}

body.dark .timeline-desc {
  color: var(--gray-300);
}

/* 技能部分 */
.skills-section {
  padding: 4rem 1rem;
}

@media (min-width: 768px) {
  .skills-section {
    padding: 4rem 2rem;
  }
}

.skills-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .skills-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.skill-card {
  background-color: var(--white-color);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-lg);
  transition: var(--transition);
}

.skill-card:hover {
  box-shadow: var(--shadow-xl);
}

body.dark .skill-card {
  background-color: var(--gray-800);
}

.skill-header {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}

.skill-icon-container {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background-color: rgba(255, 201, 29, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1rem;
}

.skill-icon {
  color: var(--primary-color);
  font-size: 1.25rem;
}

.skill-title {
  font-size: 1.25rem;
  font-weight: bold;
}

.skill-desc {
  color: var(--gray-600);
  margin-bottom: 1rem;
  font-size: 0.875rem;
}

body.dark .skill-desc {
  color: var(--gray-300);
}

.progress-bar {
  width: 100%;
  height: 0.5rem;
  background-color: var(--gray-200);
  border-radius: 9999px;
  margin-bottom: 0.5rem;
  overflow: hidden;
}

body.dark .progress-bar {
  background-color: var(--gray-700);
}

.progress-fill {
  height: 100%;
  background-color: var(--primary-color);
  border-radius: 9999px;
  transition: width 1s ease-in-out;
}

.progress-text {
  font-size: 0.875rem;
  color: var(--gray-500);
}

body.dark .progress-text {
  color: var(--gray-400);
}

/* 证书容器 */
.certificates-container {
  margin-top: 3rem;
}

.certificates-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.certificate-link {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  background-color: var(--white-color);
  border-radius: 0.5rem;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

.certificate-link:hover {
  box-shadow: var(--shadow-lg);
}

body.dark .certificate-link {
  background-color: var(--gray-800);
}

.certificate-icon {
  color: var(--primary-color);
  margin-right: 0.5rem;
}

/* 时间线容器 */
.timeline-container {
  /* 样式保持空，可根据需要添加 */
}

.timeline-section-title {
  font-size: 1.5rem;
  font-weight: bold;
  display: flex;
  align-items: center;
}

.timeline-section-icon {
  color: var(--primary-color);
  margin-right: 0.75rem;
}

.timeline-section-subtitle {
  margin-left: 0.5rem;
  font-size: 0.875rem;
  color: var(--gray-500);
}

body.dark .timeline-section-subtitle {
  color: var(--gray-400);
}

/* 工作简述时间轴样式 - 调整圆点位置到黄线中间 */
.timeline-list {
  position: relative;
  padding-left: 2rem;
  list-style-type: none; /* 移除默认的列表符号 */
}

/* 时间轴主线 */
.timeline-list::before {
  content: '';
  position: absolute;
  left: 0.5rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background-color: rgba(255, 201, 29, 0.3);
}

body.dark .timeline-list::before {
  background-color: rgba(255, 201, 29, 0.5);
}

.timeline-item {
  position: relative;
  margin-bottom: 1.5rem;
  list-style: none; /* 确保移除列表符号 */
}

.timeline-item:last-child {
  margin-bottom: 0;
}

/* 时间轴节点圆点 - 精确调整位置到黄线中间 */
.timeline-marker {
  position: absolute;
  left: -1.9rem; /*更精确地居中 */
  top: 0.375rem;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background-color: var(--primary-color);
  border: 2px solid var(--white-color);
  z-index: 1;
}

body.dark .timeline-marker {
  border-color: var(--gray-900);
}

/* 其他样式保持不变 */
.timeline-content {
  padding: 1rem;
  background-color: var(--white-color);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.timeline-content:hover {
  box-shadow: var(--shadow-lg);
}

body.dark .timeline-content {
  background-color: var(--gray-800);
}

.timeline-header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.timeline-item-title {
  font-weight: bold;
  font-size: 1.125rem;
  color: var(--secondary-color);
}

body.dark .timeline-item-title {
  color: var(--light-color);
}

.timeline-date {
  font-size: 0.875rem;
  color: var(--gray-500);
  font-weight: 500;
}

body.dark .timeline-date {
  color: var(--gray-400);
}

.timeline-position {
  font-size: 1rem;
  margin-bottom: 0.75rem;
  color: var(--gray-600);
}

body.dark .timeline-position {
  color: var(--gray-300);
}

.timeline-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.timeline-link {
  font-size: 0.875rem;
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
}

.timeline-link:hover {
  text-decoration: underline;
}

.link-icon {
  margin-right: 0.25rem;
}

/* 响应式调整 */
@media (max-width: 767px) {
  .timeline-content {
    padding: 0.75rem;
  }
  
  .timeline-item-title {
    font-size: 1rem;
  }
  
  .timeline-position {
    font-size: 0.875rem;
  }
}

.timeline-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.timeline-link {
  font-size: 0.875rem;
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition);
}

.timeline-link:hover {
  text-decoration: underline;
}

.link-icon {
  margin-right: 0.25rem;
}



.works-link-container {
  text-align: center;
  margin: 0;
}

.works-link {
  color: var(--primary-color);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.works-link:hover {
  text-decoration: none;
}

/* 作品集链接 */
.works-portfolio-container {
  margin-top: 3rem;
  text-align: center;
}

.portfolio-link {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1.5rem;
  background-color: var(--primary-color);
  color: var(--secondary-color);
  font-weight: 600;
  border-radius: var(--border-radius);
  text-decoration: none;
  box-shadow: var(--shadow-lg);
  transition: var(--transition);
}

.portfolio-link:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-2px);
}

/* 关于部分 */
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px) {
  .about-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.about-card {
  background-color: var(--white-color);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-lg);
}

body.dark .about-card {
  background-color: var(--gray-800);
}

.movie-link {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition);
}

.movie-link:hover {
  text-decoration: none;
}

.about-image-container {
  display: flex;
  align-items: center;
  justify-content: center;
}

.team-img {
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
  max-width: 100%;
  height: auto;
}

/* 页脚 */
.footer {
  padding: 2rem 1rem;
  background-color: var(--white-color);
}

@media (min-width: 768px) {
  .footer {
    padding: 2rem 2rem;
  }
}

body.dark .footer {
  background-color: var(--gray-900);
}

.footer-note {
  text-align: center;
  margin-bottom: 1rem;
  font-size: 0.75rem;
  color: #C2C2C2;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.footer-link {
  font-size: 0.875rem;
  color: var(--gray-500);
  text-decoration: none;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
}

.footer-link:hover {
  color: var(--primary-color);
}

.runtime-container {
  text-align: center;
}

.runtime-text {
  color: #C2C2C2;
  font-size: 0.875rem;
}

/* 返回顶部按钮 */
.back-to-top {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background-color: var(--primary-color);
  color: var(--secondary-color);
  border: none;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  opacity: 0;
  visibility: hidden;
  z-index: 40;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-xl);
}

/* 响应式调整 */
@media (max-width: 767px) {
  .section {
    padding: 2rem 1rem;
  }
  
  .section-title {
    font-size: 1.25rem;
  }
  
  .info-grid {
    gap: 1rem;
  }
  
  .info-card {
    padding: 1rem;
  }
  
  .skills-grid {
    gap: 1rem;
  }
  
  .skill-card {
    padding: 1rem;
  }
  
  .works-grid {
    gap: 1rem;
  }
  
  .works-content {
    padding: 0.75rem;
  }
}

/* 在校经历列表 - 调整样式 */
.school-experience-list {
  list-style-type: none;
  padding-left: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-size: 1rem;
  position: relative;
  margin: 0;
}

.school-experience-list li {
  line-height: 1.6;
  position: relative;
  padding-left: 2rem;
  margin-bottom: 0;
}

/* 移除原有的自定义圆点 */
.school-experience-list li::before {
  display: none;
}

/* 去除在校经历的白色容器背景 */
#school-experience .timeline-content {
  background: transparent;
  box-shadow: none;
  padding: 0;
}

#school-experience .timeline-content:hover {
  box-shadow: none;
}

/* 在校经历时间轴样式 */
#school-experience .timeline-list {
  position: relative;
  padding-left: 2rem;
  list-style-type: none;
}

#school-experience .timeline-list::before {
  content: '';
  position: absolute;
  left: 0.5rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background-color: rgba(255, 201, 29, 0.3);
}

body.dark #school-experience .timeline-list::before {
  background-color: rgba(255, 201, 29, 0.5);
}

/* 在校经历时间轴节点 - 精确调整位置 */
#school-experience .timeline-marker {
  position: absolute;
  left: -1.9rem;
  top: 0.375rem;
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 50%;
  background-color: var(--primary-color);
  border: 2px solid var(--white-color);
  z-index: 1;
}

body.dark #school-experience .timeline-marker {
  border-color: var(--gray-900);
}

/* 处理额外的圆点问题 - 隐藏第一个时间轴节点 */
#school-experience .timeline-item:first-child .timeline-marker {
  display: none;
}

/* 为在校经历列表项添加时间轴节点 */
#school-experience .school-experience-list li::after {
  content: "";
  position: absolute;
  left: -1.9rem;
  top: 0.5em;
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 50%;
  background-color: var(--primary-color);
  border: 2px solid var(--white-color);
  z-index: 1;
}

body.dark #school-experience .school-experience-list li::after {
  border-color: var(--gray-900);
}

.school-experience-list p {
  margin-top: 0.25rem;
  font-size: 1rem;
  margin-bottom: 0;
}

.school-experience-list a {
  color: var(--primary-color);
  text-decoration: none;
  margin: 0 0.25rem;
  transition: var(--transition);
}

.school-experience-list a:hover {
  text-decoration: underline;
}

.software-versions {
  text-indent: 2em;
  margin-top: 0.25rem;
  font-size: 1rem;
}

/* 作品部分 */
.works-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .works-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .works-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.works-item {
  overflow: hidden;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

.works-item:hover {
  box-shadow: var(--shadow-xl);
}

.works-img {
  width: 100%;
  height: 12rem;
  object-fit: cover;
  transition: var(--transition-transform);
}

.works-item:hover .works-img {
  transform: scale(1.1);
}

.works-content {
  background-color: var(--white-color);
  padding: 1rem;
}

body.dark .works-content {
  background-color: var(--gray-800);
}

.works-link-container {
  text-align: center;
  margin: 0;
}

.works-link {
  color: var(--primary-color);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.works-link:hover {
  text-decoration: none;
}

/* 作品集链接 */
.works-portfolio-container {
  margin-top: 3rem;
  text-align: center;
}

.portfolio-link {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1.5rem;
  background-color: var(--primary-color);
  color: var(--secondary-color);
  font-weight: 600;
  border-radius: var(--border-radius);
  text-decoration: none;
  box-shadow: var(--shadow-lg);
  transition: var(--transition);
}

.portfolio-link:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-2px);
}

/* 关于部分 */
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px) {
  .about-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.about-card {
  background-color: var(--white-color);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-lg);
}

body.dark .about-card {
  background-color: var(--gray-800);
}

.movie-link {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition);
}

.movie-link:hover {
  text-decoration: none;
}

.about-image-container {
  display: flex;
  align-items: center;
  justify-content: center;
}

.team-img {
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
  max-width: 100%;
  height: auto;
}

/* 页脚 */
.footer {
  padding: 2rem 1rem;
  background-color: var(--white-color);
}

@media (min-width: 768px) {
  .footer {
    padding: 2rem 2rem;
  }
}

body.dark .footer {
  background-color: var(--gray-900);
}

.footer-note {
  text-align: center;
  margin-bottom: 1rem;
  font-size: 0.75rem;
  color: #C2C2C2;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.footer-link {
  font-size: 0.875rem;
  color: var(--gray-500);
  text-decoration: none;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
}

.footer-link:hover {
  color: var(--primary-color);
}

.runtime-container {
  text-align: center;
}

.runtime-text {
  color: #C2C2C2;
  font-size: 0.875rem;
}

/* 返回顶部按钮 */
.back-to-top {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background-color: var(--primary-color);
  color: var(--secondary-color);
  border: none;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  opacity: 0;
  visibility: hidden;
  z-index: 40;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-xl);
}

/* 响应式调整 */
@media (max-width: 767px) {
  .section {
    padding: 2rem 1rem;
  }
  
  .section-title {
    font-size: 1.25rem;
  }
  
  .info-grid {
    gap: 1rem;
  }
  
  .info-card {
    padding: 1rem;
  }
  
  .skills-grid {
    gap: 1rem;
  }
  
  .skill-card {
    padding: 1rem;
  }
  
  .works-grid {
    gap: 1rem;
  }
  
  .works-content {
    padding: 0.75rem;
  }
}

/* 在校经历列表 - 调整样式 */
.school-experience-list {
  list-style-type: none;
  padding-left: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-size: 1rem;
  position: relative;
  margin: 0;
}

.school-experience-list li {
  line-height: 1.6;
  position: relative;
  padding-left: 2rem;
  margin-bottom: 0;
}

/* 移除原有的自定义圆点 */
.school-experience-list li::before {
  display: none;
}

/* 去除在校经历的白色容器背景 */
#school-experience .timeline-content {
  background: transparent;
  box-shadow: none;
  padding: 0;
}

#school-experience .timeline-content:hover {
  box-shadow: none;
}

/* 在校经历时间轴样式 */
#school-experience .timeline-list {
  position: relative;
  padding-left: 2rem;
  list-style-type: none;
}

#school-experience .timeline-list::before {
  content: '';
  position: absolute;
  left: 0.5rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background-color: rgba(255, 201, 29, 0.3);
}

body.dark #school-experience .timeline-list::before {
  background-color: rgba(255, 201, 29, 0.5);
}

/* 在校经历时间轴节点 - 精确调整位置 */
#school-experience .timeline-marker {
  position: absolute;
  left: -1.9rem;
  top: 0.375rem;
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 50%;
  background-color: var(--primary-color);
  border: 2px solid var(--white-color);
  z-index: 1;
}

body.dark #school-experience .timeline-marker {
  border-color: var(--gray-900);
}

/* 处理额外的圆点问题 - 隐藏第一个时间轴节点 */
#school-experience .timeline-item:first-child .timeline-marker {
  display: none;
}

/* 为在校经历列表项添加时间轴节点 */
#school-experience .school-experience-list li::after {
  content: "";
  position: absolute;
  left: -1.9rem;
  top: 0.5em;
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 50%;
  background-color: var(--primary-color);
  border: 2px solid var(--white-color);
  z-index: 1;
}

body.dark #school-experience .school-experience-list li::after {
  border-color: var(--gray-900);
}

.school-experience-list p {
  margin-top: 0.25rem;
  font-size: 1rem;
  margin-bottom: 0;
}

.school-experience-list a {
  color: var(--primary-color);
  text-decoration: none;
  margin: 0 0.25rem;
  transition: var(--transition);
}

.school-experience-list a:hover {
  text-decoration: underline;
}

.software-versions {
  text-indent: 2em;
  margin-top: 0.25rem;
  font-size: 1rem;
}

/* 统一所有图标颜色为黑色 */
.menu-icon,
.info-icon,
.timeline-icon,
.timeline-section-icon,
.link-icon,
.certificate-icon,
.fa {
  color: #333 !important;
}

/* 去除所有超链接的下划线 */
a,
.works-link,
.portfolio-link,
.movie-link,
.certificate-link,
.footer-link {
  text-decoration: none !important;
}

/* 保持悬停时的下划线移除 */
.works-link:hover,
.portfolio-link:hover,
.movie-link:hover,
.certificate-link:hover,
.footer-link:hover {
  text-decoration: none !important;
}

/* 在校经历时间轴内容区域，确保内容完整显示 */
.timeline-details {
  max-height: none !important; /* 移除固定最大高度限制 */
  overflow: visible !important; /* 确保内容可见 */
  transition: max-height 0.5s ease-out; /* 保持过渡动画 */
}

/* 在 pagemain.css 文件中添加以下样式 */

.year-section {
  margin-bottom: 1rem;
}

.year-section:last-child {
  margin-bottom: 0;
}

.year-details {
  overflow: hidden;
  transition: max-height 0.3s ease-out;
  max-height: 1000px;
  margin-top: 0.5rem;
}

.year-details.closed {
  max-height: 0;
}

/* 年份标题样式 - 修改为行内布局，使图标紧跟文字 */
.year-section .timeline-header {
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 0.5rem;
  transition: var(--transition);
  background-color: var(--gray-100);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  width: fit-content;
}

body.dark .year-section .timeline-header {
  background-color: var(--gray-800);
}

.year-section .timeline-header:hover {
  background-color: var(--gray-200);
}

body.dark .year-section .timeline-header:hover {
  background-color: var(--gray-700);
}

.year-section .timeline-item-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
}

/* 调整图标样式，使其紧挨着文字 */
.year-section .toggle-icon {
  margin-left: 0.5rem;
  transition: var(--transition-transform);
  font-size: 0.875rem;
}

/* 确保所有超链接文本颜色为黑色 */
a,
a:link,
a:visited {
  color: #333333 !important;
}

/* 悬停时保持色 */
a:hover {
  color: #5066e4; /* 保持原有的蓝色 */
}

/* 特定区域的链接颜色 */
.contact-link,
.timeline-link,
.certificate-link,
.movie-link,
.footer-link,
.works-link,
.portfolio-link {
  color: #333333 !important;
}

/* 特定区域链接悬停效果 */
.contact-link:hover,
.timeline-link:hover,
.certificate-link:hover,
.movie-link:hover,
.footer-link:hover,
.works-link:hover,
.portfolio-link:hover {
  color: #677cef !important; 
}

/* 保留折叠/展开功能，同时确保内容完整显示 */
#school-experience .timeline-details {
  /* 展开时使用足够大的最大高度，确保内容不被截断 */
  max-height: 2000px !important;
  transition: max-height 0.5s ease-out !important;
}

#school-experience .timeline-details.closed {
  /* 仅在闭合状态限制高度 */
  max-height: 0 !important;
  overflow: hidden !important;
}

.year-details {
  max-height: 2000px !important;
  transition: max-height 0.5s ease-out !important;
}

.year-details.closed {
  max-height: 0 !important;
  overflow: hidden !important;
}
/* 分割线 - 更短的版本 */
.custom-hr {
  height: 1px;
  background-color: #ccc;
  margin: 20px auto;
  width: 50%; /* 设置宽度为父元素的50%，使分割线变短 */
  border-radius: 1px; /* 添加轻微圆角 */
}

/* 暗色模式优化 */

/* 暗色模式下的链接颜色 */
body.dark a,
body.dark a:link,
body.dark a:visited {
  color: #e6e6e6 !important; /* 更亮的蓝色 */
}

body.dark a:hover {
  color: #8cb3ff !important;
}

/* 暗色模式下特定链接颜色优化 */
body.dark .contact-link,
body.dark .timeline-link,
body.dark .certificate-link,
body.dark .movie-link,
body.dark .footer-link,
body.dark .works-link,
body.dark .portfolio-link {
  color: #64a0ff !important;
}

body.dark .contact-link:hover,
body.dark .timeline-link:hover,
body.dark .certificate-link:hover,
body.dark .movie-link:hover,
body.dark .footer-link:hover,
body.dark .works-link:hover,
body.dark .portfolio-link:hover {
  color: #8cb3ff !important;
}

/* 暗色模式下信息图标颜色 */
body.dark .info-icon,
body.dark .timeline-icon,
body.dark .timeline-section-icon,
body.dark .link-icon,
body.dark .certificate-icon,
body.dark .menu-icon {
  color: #e2e2e2 !important; /* 使用主题色 */
}

/* 暗色模式下的时间线描述文字 */
body.dark .timeline-desc,
body.dark .school-experience-list {
  color: #e2e2e2 !important;
}

/* 暗色模式下的技能描述文字 */
body.dark .skill-desc {
  color: #d4d4d4 !important;
}

/* 暗色模式下的页脚文字 */
body.dark .footer-note,
body.dark .runtime-text {
  color: #a3a3a3 !important;
}

/* 暗色模式下的模态框标题 */
body.dark .modal-title {
  color: #f5f5f5 !important;
}

/* 暗色模式下作品描述文字 */
body.dark .works-content {
  color: #e2e2e2;
}

/* 暗色模式下详细信息项文字 */
body.dark .info-item {
  color: #e2e2e2;
}

/* 暗色模式下卡片标题 */
body.dark .card-title,
body.dark .skill-title,
body.dark .timeline-item-title,
body.dark .year-section .timeline-item-title {
  color: #f0f0f0 !important;
}

/* 暗色模式下时间文字 */
body.dark .timeline-date,
body.dark .timeline-position {
  color: #c7c7c7 !important;
}

/* 暗色模式下进度条文字 */
body.dark .progress-text {
  color: #d4d4d4 !important;
}

/* 暗色模式下年份标题悬停效果 */
body.dark .year-section .timeline-header:hover {
  background-color: #525252 !important;
}

/* 暗色模式下分割线 */
body.dark .custom-hr {
  background-color: #525252;
}