/* 基础样式 */
html {
  font-family: "Noto Sans SC", sans-serif, -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, "Helvetica Neue", Arial;
  font-size: 16px;
  font-weight: 400;
  color: #91a1b8;
  line-height: 1.5;
  box-sizing: border-box;
  background: #0a192f;
}

*,
*::before,
*::after {
  box-sizing: inherit;
}

body {
  width: 68%;
  max-width: 980px;
  margin: 0 auto;
  padding: 2rem;
}

@media screen and (max-width: 1024px) {
  body {
    width: 95%;
    padding: 0.5rem;
  }
}

/* 标题区域样式 */
.block-title h1 {
  font-size: 2.8rem;
  margin-bottom: 2rem;
  font-weight: 720;
  color: #e2e8f0;
  display: inline-block;
  margin-right: 0.5rem;
}

.block-title .icon_xiongmao-panda {
  display: inline-block;
  transform: scaleX(-1);
  font-size: 2.8em;
  opacity: 0.8;
}

.contact-info {
  font-size: 0.9em;
  color: #94a3b8;
}

.location {
  display: block;
  font-size: 1rem;
  margin-bottom: 6px;
}

.contact-info span {
  display: inline-flex;
  align-items: center;
  margin-right: 16px;
  margin-bottom: 8px;
}

.contact-info .iconfont {
  margin-right: 4px;
  font-size: 1em;
}

.contact-info button {
  background: none;
  border: none;
  padding: 0.3rem;
  color: #94a3b8;
  cursor: pointer;
  font-size: 0.9em;
  display: inline-flex;
  align-items: center;
  text-decoration: underline;
}

.contact-info button:hover {
  color: #5eead4;
}

#email,
#phone {
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

#email:hover,
#phone:hover,
#pdf:hover {
  color: #5eead4;
}

/* 复制提示样式 */
.copy-tooltip {
  position: absolute;
  background-color: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.8rem;
  animation: fadeInOut 1.5s ease-in-out;
  z-index: 1000;
  white-space: nowrap;
  /* 新增定位控制 */
  left: 50%;
  transform: translateX(-50%);
  bottom: -27px;
}

/* 为父元素添加相对定位 */
#email,
#phone {
  position: relative;
  cursor: pointer;
}

/* 保持原有动画 */
@keyframes fadeInOut {
  0% {
    opacity: 0;
    transform: translate(-50%, 5px);
  }
  20% {
    opacity: 1;
    transform: translate(-50%, 0);
  }
  80% {
    opacity: 1;
    transform: translate(-50%, 0);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -5px);
  }
}

/* 简介部分 */
.block-summary {
  margin-top: 1rem;
  border-radius: 2px;
}

.block-summary p {
  font-size: 1rem;
  line-height: 1.8rem;
  text-align: justify;
  hyphens: auto;
  margin: 0;
}

.block-summary strong {
  font-weight: 360;
  color: #e2e8f0;
}

.scrollblock.block-summary strong {
  transition: color 0.3s ease;
}

.scrollblock.block-summary:hover strong {
  color: #5eead4;
}

/* 分隔线样式 */
.block-skills,
.block-work {
  border-top: 1.2px solid transparent;
  margin-top: 1.3rem;
}

.block-projects,
.block-edu {
  border-top: 1.2px solid transparent;
  margin-top: 0rem;
}

/* 模块标题样式 */
.block-skills h2,
.block-work h2,
.block-projects h2,
.block-edu h2 {
  font-size: 0.92rem;
  font-weight: 720;
  color: #e2e8f0;
  margin-bottom: 1.2rem;
  margin-top: 1.2rem;
}

/* 技能项样式 */
.skill-item {
  margin-bottom: 0rem;
  margin-top: 0rem;
}

.skill-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.skill-header h3 {
  font-size: 0.92rem;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
  font-weight: 480;
  color: #e2e8f0;
}

.skill-header .level {
  align-self: flex-start;
  font-size: 0.8rem;
  font-weight: 720;
  padding: 0.1em 0.5em;
  border-radius: 4px;
  color: #ffffff;
}

.level.advanced {
  background-color: #2a730d;
}

.level.intermediate {
  background-color: #c18f39;
}

.keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0;
  list-style: none;
  margin: 0.6rem 0 0;
}

.keywords li {
  background-color: #122b39;
  color: #5eead4;
  padding: 0.3em 0.6em;
  border-radius: 2px;
  font-size: 0.8rem;
  font-weight: 420;
}

/* 技能网格布局 */
.scrollblock.block-skills {
  display: grid;
  grid-template-areas: "title" "skills";
  gap: 0rem;
}

.block-skills h2 {
  grid-area: title;
  margin-bottom: 1rem;
}

.block-skills .skill-container {
  grid-area: skills;
  display: grid;
  /* 默认响应式（小屏1-2列） */
  grid-template-columns: repeat(auto-fill, minmax(228px, 1fr));
  gap: 1rem;
}

@media (min-width: 900px) {
  /* 当宽度足够时强制三列 */
  .block-skills .skill-container {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* 工作经历样式 */
.block-work strong,
.block-projects strong {
  color: #e2e8f0;
  font-weight: 400;
}

.block-work .work-item {
  margin-bottom: 0rem;
}

.block-work .position {
  font-weight: bold;
  font-size: 1.2rem;
  display: inline;
  color: #e2e8f0;
}

.block-work .company::before {
  content: " | ";
  font-size: 1.1rem;
  margin: 0 0.4rem;
  color: #e2e8f0;
}

.block-work .company {
  display: inline;
  font-size: 1.1rem;
  color: #e2e8f0;
}

.block-work .time {
  float: right;
  font-size: 0.92rem;
  font-weight: 630;
  color: #64748b;
}

.block-work .company-website {
  display: block;
  margin-top: 0.2rem;
}

.block-work .company-website a {
  color: #e2e8f0;
  text-decoration: underline;
  font-size: 0.92rem;
}

.block-work .summary p {
  font-size: 0.92rem;
  margin: 1.2rem 0;
  text-align: justify;
}

.block-work .highlights {
  padding-left: 2.2rem;
}

.block-work .highlights li {
  font-size: 0.92rem;
  line-height: 1.6rem;
  margin-bottom: 0.5rem;
}

.block-work .mark {
  font-size: 0.8rem;
  margin-left: 0.2rem;
}
/* 项目经历样式 */
.block-projects .project-item {
  margin-bottom: 0rem;
}

.block-projects .title {
  font-weight: bold;
  font-size: 1.2rem;
  display: inline;
  color: #e2e8f0;
}

.block-projects .time {
  float: right;
  font-size: 0.92rem;
  color: #64748b;
  font-weight: 630;
}

.block-projects .summary p {
  font-size: 0.92rem;
  margin: 1.2rem 0;
  text-align: justify;
}

.block-projects .highlights {
  padding-left: 2.2em;
}

.block-projects .highlights li {
  font-size: 0.92rem;
  line-height: 1.6rem;
  margin-bottom: 0.5rem;
}

/* 教育经历样式 */
.block-edu .edu-item {
  margin-bottom: 2rem;
}

.block-edu .school {
  font-weight: bold;
  font-size: 1.2rem;
  display: inline;
  color: #e2e8f0;
}

.block-edu .major::before {
  content: " | ";
  font-size: 1.1rem;
  margin: 0 0.4rem;
  color: #e2e8f0;
}

.block-edu .major {
  display: inline;
  font-size: 1.1rem;
  color: #e2e8f0;
}

.block-edu .time {
  float: right;
  font-size: 0.92rem;
  color: #64748b;
  font-weight: 630;
}

.block-edu .school-website {
  display: block;
  margin-top: 0.2rem;
}

.block-edu .school-website a {
  color: #e2e8f0;
  text-decoration: underline;
  font-size: 0.92rem;
}

/* 页脚样式 */
.scroll-to-top-container {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-top: 1rem;
  margin-bottom: 1.8rem;
}

.scroll-to-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  opacity: 0.6;
  transition: all 0.3s ease;
}

.scroll-to-top:hover {
  opacity: 1;
  transform: translateY(-5px);
}

.scroll-to-top .iconfont {
  font-size: 2.5rem;
  margin-bottom: -0.5rem;
}

.scroll-to-top span {
  font-family: "Bitcount", system-ui;
  font-size: 1rem;
  color: #e2e8f0;
}

/* ---背景电筒照亮效果--- */
:root {
  --bg-color: #0f172a;
  --light-color-1: rgba(17, 32, 68, 1);
  --light-color-2: rgba(16, 29, 60, 0.8);
  --light-color-3: rgba(16, 27, 53, 1);
  --mouse-x: -9999px;
  --mouse-y: -9999px;
}

body {
  position: relative;
  min-height: 100vh;
  background: transparent;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
    circle 420px at var(--mouse-x) var(--mouse-y),
    var(--light-color-1) 0px,
    var(--light-color-2) 140px,
    var(--light-color-3) 280px,
    var(--bg-color) 420px
  );
  pointer-events: none;
  z-index: 0;
  transition: background 0.2s ease-out;
  will-change: background;
}

.main-content,
.block-title-container {
  position: relative;
  z-index: 1;
}

::selection {
  background-color: #5eead4;
  color: #134e4a;
}

/* ---毛玻璃效果--- */
.work-item,
.project-item,
.edu-item {
  padding-top: 1.2rem;
  padding-bottom: 1.2rem;
  padding-left: 1.6rem;
  padding-right: 1.6rem;
  border-radius: 10px;
  transition: all 0.3s ease-in-out;
  background-clip: padding-box; /* 防止背景色延伸到 border 外 */
}

/* 鼠标悬停毛玻璃效果 */
.work-item:hover,
.project-item:hover,
.edu-item:hover {
  backdrop-filter: blur(12px);
  background-color: rgba(34, 48, 73, 0.4);
  box-shadow: 0 4px 24px rgba(94, 234, 212, 0.15);
}

.work-item:hover .position,
.work-item:hover .company,
.project-item:hover .title,
.edu-item:hover .school,
.edu-item:hover .major {
  color: #5eead4 !important;
}

.block-work:hover .work-item:not(:hover),
.block-projects:hover .project-item:not(:hover),
.block-edu:hover .edu-item:not(:hover) {
  opacity: 0.5;
  transition: all 0.3s ease-in-out;
}

.work-item:hover,
.project-item:hover,
.edu-item:hover {
  opacity: 1;
  filter: none;
  z-index: 2; /* 确保显示在上方 */
}

/* ===== 打印优化样式 ===== */
@media print {
  /* 基础页面设置 */
  body {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 1.2cm !important;
    background: white !important;
    color: #333 !important;
  }

  html {
    background: white !important;
    font-size: 14px !important;
  }

  /* 移除视觉特效 */
  body::before,
  .copy-tooltip {
    display: none !important;
  }

  .work-item,
  .project-item,
  .edu-item {
    background: none !important;
    box-shadow: none !important;
    filter: none !important;
    backdrop-filter: none !important;
    padding: 0 !important;
    border-radius: 0 !important;
  }

  /* 去除 hover 效果 */
  .work-item:hover,
  .project-item:hover,
  .edu-item:hover {
    all: unset !important;
  }

  .contact-info button:hover,
  #email:hover,
  #phone:hover,
  #pdf:hover {
    all: unset !important;
  }

  /* 链接样式处理 */
  a {
    color: #333 !important;
    text-decoration: underline;
  }

  /* 适应打印纸张宽度（A4） */
  @page {
    size: A4 portrait;
    margin: 1.5cm;
  }

  /* 标题字体调整 */
  .block-title h1 {
    font-size: 2rem !important;
    font-weight: 188 !important;
    color: #333 !important;
  }

  .block-summary p {
    font-size: 0.92rem !important;
    line-height: 1.6rem !important;
  }

  .block-title .icon_xiongmao-panda {
    display: none !important;
  }

  .contact-info {
    font-size: 0.95em !important;
    color: #888 !important;
  }

  .contact-info .iconfont {
    color: black !important;
  }

  /* 标题栏字体修正 */
  h2 {
    color: #5eead4 !important;
  }

  .block-projects,
  .block-edu {
    border-top: 1.2px solid transparent;
    margin-top: 1rem !important;
  }

  h3 {
    color: #333 !important;
    font-size: 0.9rem !important;
    font-weight: 630 !important;
    text-decoration: underline;
  }

  /* 技能标签颜色和样式简化 */
  .keywords li {
    color: #888 !important;
    border: 1px solid #e2e2e2 !important;
    font-size: 0.8rem !important;
  }

  .level.advanced,
  .level.intermediate {
    background: #e2e2e2 !important;
    color: #888 !important;
    font-weight: 320;
  }

  .block-work .work-item {
    margin-bottom: 1.5rem !important;
  }

  .block-projects .project-item {
    margin-bottom: 1.5rem !important;
  }

  .block-work .summary p,
  .block-projects .summary p {
    margin: 1rem 0 !important;
  }

  .block-work .position {
    color: #333 !important;
  }

  .block-work .company::before {
    color: #e2e2e2 !important;
  }

  .block-work .company {
    color: #888 !important;
  }

  .block-projects .title {
    color: #333 !important;
  }

  .block-edu .school {
    color: #333 !important;
  }

  .block-edu .major::before {
    color: #e2e2e2 !important;
  }

  .block-edu .major {
    color: #888 !important;
  }

  strong {
    font-weight: 400 !important;
    color: #333 !important;
  }

  /* 删除浮动，统一时间位置
  .block-work .time,
  .block-projects .time {
    float: none !important;
    display: block !important;
    margin-top: 0.2rem;
    color: #888 !important;
  } */
}
