/*--全局设置--*/
html {
  --color-link: #5f5f5f;
  --color-link-hover: #ff963b;
  --color-enter: #fff;
  --color-title: #fff;
  --color-content: #222325;
  --font-stack:
  "Comic Sans MS", /* 英文手写活泼体 */
  cursive,          /* 回退手写风格 */
  "KaiTi",          /* Windows 中文 */
  "PingFang SC",    /* macOS/iOS 中文 */
  "STHeiti",        /* 旧版 macOS 中文 */
  "WenQuanYi Micro Hei", /* Linux 免费中文 */
  -apple-system,    /* macOS/iOS 系统英文字体 */
  sans-serif;
  font-size: 20px !important;
}
  
* {
  box-sizing: border-box;
  -webkit-text-size-adjust: none;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
}



  
body {
  font-family: var(--font-stack) !important;
  -ms-flex-align: center;
  align-items: center;
  -ms-flex-pack: center;
  justify-content: center;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-touch-callout: none;
}
  
ul {
  margin: 0;
  padding: 0;
}
  
img {
  border: 0;
  vertical-align: middle;
}

a {
  text-decoration: none;
  color: var(--color-link);
  outline: 0;
}

  
/*--淡入淡出动画--*/
.fade {
  opacity: 0;
  transition: all 1s;
  transform: translateY(200px);
}
.fade.in {
  opacity: 1;
  transform: none;
}
  
/*--布局和结构--*/
main {
  overflow: hidden;
}
  
.content,
main {
  height: 100vh;
  width: 100%;
  position: relative;
}
  
.content {
  background: radial-gradient(#313131, #0a0a0a);
}
  
.content-intro {
  z-index: 100;
  height: 200vh;
}
  
.content-main {
  position: fixed;
  top: 0;
  left: 0;
}
  
.content-inner {
  position: relative;
  padding-top: 48px;
  box-sizing: border-box;
  height: 100vh;
}
  
.content-inner,
.wrap {
  width: 100%;
  height: 100vh;
}
  
.wrap {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  text-align: center;
}
  
/*--内容简介具体--*/
.content-intro .content-inner {
  background: var(--color-content);
  user-select: none;
}
  

/*--排版--*/
.content-title {
  font-size: 4.7rem;
  font-weight: 200;
  color: var(--color-title);
  line-height: 1;
  margin-top: 0em;
  margin-bottom: 0.3em;
  animation: whiteShadow 1.5s ease-in-out infinite alternate;
  text-shadow: #452d2d 0 0 1px, #fffffb 0 0 1px, #fffffb 0 0 2px;
}
  
@media screen and (max-width: 50em) {
  .content-title {
    font-size: 2rem;
  }
}
  
/*--白影动画--*/
@keyframes whiteShadow {
  0% {
    text-shadow: 0 0 1px #fff, 0 0 2px #fff, 0 0 3px #fff, 0 0 5px #333, 0 0 8px #333, 0 0 9px #333;
  }
  to {
    text-shadow: 0 0 0.5px #fff, 0 0 1px #fff, 0 0 1.5px #fff, 0 0 2px #333, 0 0 4px #333, 0 0 5px #333;
  }
}
  




  /*--内容字幕和字母发光--*/
.content-subtitle {
  color: #fff;
  font-size: 1.2rem;
  font-weight: 200;
  margin-bottom: 2em;
  text-shadow: 0 0 4px #fff;
}
  
@media screen and (max-width: 1024px) {
  .content-subtitle {
    font-size: 1rem;
  }
}
@media screen and (max-width: 768px) {
  .content-subtitle {
    font-size: 0.8rem;
  }
}
@media screen and (max-width: 560px) {
  .content-subtitle {
    font-size: 0.7rem;
  }
}
@media screen and (max-width: 480px) {
  .content-subtitle {
    font-size: 0.6rem;
  }
}
  
@keyframes letter-glow {
  0% {
    opacity: 0;
    text-shadow: 0 0 1px hsla(0, 0%, 100%, 0.1);
  }
  66% {
    opacity: 1;
    text-shadow: 0 0 20px hsla(0, 0%, 100%, 0.9);
  }
  77% {
    opacity: 1;
  }
  to {
    opacity: 0.7;
    text-shadow: 0 0 20px hsla(0, 0%, 100%, 0.2);
  }
}




.content-subtitle span {
  animation: letter-glow 0.7s 0s ease both;
}
  

/*--各个字母的动画延时--*/
.content-subtitle span:nth-child(1) { animation-delay: 0.05s; }
.content-subtitle span:nth-child(2) { animation-delay: 0.1s; }
.content-subtitle span:nth-child(3) { animation-delay: 0.15s; }
.content-subtitle span:nth-child(4) { animation-delay: 0.2s; }
.content-subtitle span:nth-child(5) { animation-delay: 0.25s; }
.content-subtitle span:nth-child(6) { animation-delay: 0.3s; }
.content-subtitle span:nth-child(7) { animation-delay: 0.35s; }
.content-subtitle span:nth-child(8) { animation-delay: 0.4s; }
.content-subtitle span:nth-child(9) { animation-delay: 0.45s; }
.content-subtitle span:nth-child(10) { animation-delay: 0.5s; }
.content-subtitle span:nth-child(11) { animation-delay: 0.55s; }
.content-subtitle span:nth-child(12) { animation-delay: 0.6s; }
.content-subtitle span:nth-child(13) { animation-delay: 0.65s; }
.content-subtitle span:nth-child(14) { animation-delay: 0.7s; }
.content-subtitle span:nth-child(15) { animation-delay: 0.75s; }
.content-subtitle span:nth-child(16) { animation-delay: 0.8s; }
.content-subtitle span:nth-child(17) { animation-delay: 0.85s; }
.content-subtitle span:nth-child(18) { animation-delay: 0.9s; }
.content-subtitle span:nth-child(19) { animation-delay: 0.95s; }
.content-subtitle span:nth-child(20) { animation-delay: 1s; }
.content-subtitle span:nth-child(21) { animation-delay: 1.05s; }
.content-subtitle span:nth-child(22) { animation-delay: 1.1s; }
.content-subtitle span:nth-child(23) { animation-delay: 1.15s; }
.content-subtitle span:nth-child(24) { animation-delay: 1.2s; }
.content-subtitle span:nth-child(25) { animation-delay: 1.25s; }
.content-subtitle span:nth-child(26) { animation-delay: 1.3s; }
.content-subtitle span:nth-child(27) { animation-delay: 1.35s; }
.content-subtitle span:nth-child(28) { animation-delay: 1.4s; }
.content-subtitle span:nth-child(29) { animation-delay: 1.45s; }
.content-subtitle span:nth-child(30) { animation-delay: 1.5s; }
.content-subtitle span:nth-child(31) { animation-delay: 1.55s; }
.content-subtitle span:nth-child(32) { animation-delay: 1.6s; }
.content-subtitle span:nth-child(33) { animation-delay: 1.65s; }
.content-subtitle span:nth-child(34) { animation-delay: 1.7s; }
.content-subtitle span:nth-child(35) { animation-delay: 1.75s; }
.content-subtitle span:nth-child(36) { animation-delay: 1.8s; }
.content-subtitle span:nth-child(37) { animation-delay: 1.85s; }





/*--背景和卡片样式--*/
#background {
  position: absolute;
  width: 100%;
  height: 100%;
  z-index: -1;
}

#card {
  position: relative;
  width: 100vw;
  height: 100vh;
  color: #93979e;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  transition: width 0.5s ease, height 0.5s ease;
}

#card .card-inner {
  padding: 0;
  border: 0;
  width: 35%;
}

@media screen and (max-width: 1024px) {
  #card .card-inner {
    width: 45%;
  }
}

@media screen and (max-width: 768px) {
  #card .card-inner {
    width: 50%;
  }
}

@media screen and (max-width: 540px) {
  #card .card-inner {
    width: 60% !important;
  }
  #card .card-inner header h1 {
    font-size: 1rem !important;
  }
  #card .card-inner header h2,
  #card .card-inner ul li {
    font-size: 0.8rem !important;
  }
}

@media screen and (max-width: 480px) {
  #card .card-inner {
    width: 90% !important;
  }
}

@media screen and (max-width: 360px) {
  #card .card-inner {
    width: 100% !important;
  }
}

#card .card-inner header {
  border-bottom: 1px solid hsla(0, 0%, 100%, 0.1);
  margin-bottom: 40px;
}

#card .card-inner header img {
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 1px 1px rgba(0, 0, 0, 0.3);
  transition: 0.4s ease-in-out;
}

#card .card-inner header h1 {
  margin: 15px 15px 0;
  color: #fff;
  font-size: 2rem;
  line-height: 1.2em;
  font-weight: 300;
}

#card .card-inner header h2 {
  color: #ccc;
  letter-spacing: 3px;
  font-size: 0.8rem;
  font-weight: lighter;
}

#card .card-inner ul {
  position: relative;
  margin: 0;
  list-style-type: none;
  display: inline-flex;
  width: 100%;
  justify-content: space-around;
  border-bottom: 1px solid hsla(0, 0%, 100%, 0.1);
  padding-bottom: 40px;
}

#card .card-inner ul li {
  display: inline-block;
  transition: all 0.2s;
  width: 100%;
  height: 100%;
  border-left: 0.1px solid hsla(0, 0%, 100%, 0.1);
  border-right: 0.1px solid hsla(0, 0%, 100%, 0.1);
}

#card .card-inner ul li a {
  color: #b6b6b6;
  transition: all 0.2s;
}

#card .card-inner ul li a:hover {
  color: #f6f6f6;
  text-shadow: 0 0 2px #f6f6f6;
}

#card .card-inner ul li:hover {
  transform: translateY(-2px);
}


 /*Nav导航栏部分*/
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background-color: #2b2b2b;
  z-index: 1000;
}
nav ul.navbar {
  list-style: none;
  display: flex;
  gap: 30px;
  align-items: center;
  padding: 10px 20px;
}
nav ul.navbar li {
  position: relative;
}
nav ul.navbar li a {
  color: #fff;
  text-decoration: none;
  font-size: 1rem;
}
nav ul.navbar li:hover { background-color: #444; }

nav ul.navbar li.dropdown ul.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #444;
  list-style: none;
  padding: 5px 0;
  min-width: 100px;
  z-index: 1001;
}
nav ul.navbar li.dropdown:hover ul.dropdown-menu {
  display: block;
}
nav ul.navbar li.dropdown ul.dropdown-menu li {
  padding: 5px 10px;
}
nav ul.navbar li.dropdown ul.dropdown-menu li a {
  color: #fff;
}

/* 页面容器 */
.pages-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* 初始位置 */
  transform: translateY(0);
}
.page {
  height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
}


/* 为了区分不同页面，可设置不同背景色 */
#home { background: #1e1e1e; color: #333; }
#about { background: #1e1e1e; color: #333; }
#project { background: #1e1e1e; color: #333; }
#resume { background: #1e1e1e; color: #333; }
#contact { background: #1e1e1e; color: #333; }

/* 首页特有：背景动画 canvas */
#home canvas#background {
  position: absolute;
  top:0;
  left:0;
  width: 100%;
  height: 100%;
  z-index: -1;
}
#home .home-content { z-index: 1; }
button {
  margin-top: 20px;
  padding: 10px 20px;
  font-size: 1rem;
}


/* About */
.about-content {
  /* 使用 flex 实现照片左、文字右的并排布局 */
  display: flex;
  align-items: center;
  justify-content: center;
  /* 如果希望控制最大宽度，让内容居中，可添加： */
  max-width: 800px;
  margin: 0 auto;
  text-align: left; /* 确保文字左对齐 */

  /*遮罩层*/
  pointer-events: none;
  user-select: none;
}

.about-photo {
  width: 230px;/* 你可以根据需要调整 */
  height: auto;
  border-radius: 20%; /* 若想让照片变成圆形头像 */
  margin-right: 20px; /* 照片与文字之间间距 */

  /*遮罩层（禁止选中）*/
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

.about-text{
  margin-bottom: 1em; /* 段落之间的间距 */
  color: #fff;
}



/*Project*/

.project-text{
  margin-bottom: 1em; /* 段落之间的间距 */
  color: #fff;
}



/*Resume*/

.resume-text{
  margin-bottom: 0px; /* 段落之间的间距 */
  color: #fff;
}

/* Resume 预览 */
.resume-preview {
  width: 80%;
  max-width: 800px;
  height: 60%;
  aspect-ratio: 8 / 5;  /* 保持宽高比例 */
  margin-top: 0px;
  margin-bottom: 10px;
  border: 2px solid #fff;
  border-radius: 12px;
  overflow: hidden;
}


.resume-preview iframe {
  width: 100%;
  height: 100%;
}




/*联系方式*/

.contact-text{
  margin-bottom: 1em; /* 段落之间的间距 */
  color: #fff;
}


.icon-container {
  position: relative;       /* 使子元素能相对于此容器定位 */
  display: inline-block;    /* 并排展示多个图标 */
  margin: 0 10px;           /* 调整左右间距 */
}

/* 隐藏二维码，绝对定位使其浮动，不影响整体布局 */
.icon-container img.qr {
  display: none;
  position: absolute;
  transition: none;
  top: -220px;                /* 根据需要调整出现的位置（向上 220px） */
  left: 50%;                /* 使二维码水平居中 */
  transform: translateX(-50%);
  border-radius: 10%;
  max-width: 200px;         /* 控制二维码宽度 */
  border: 5px solid #ccc;   /* 可选：边框或阴影 */
  z-index: 999;             /* 确保图片在前面 */
}

/* 当鼠标移到 .icon-container 时，显示二维码 */
.icon-container:hover img.qr {
  display: block;
}



/*Project*/
/* 外层容器 */
.pj_card_wrap {
  position: relative;
  width: 1200px;
  height: 360px;
  margin: 30px auto;
  overflow: hidden;
}

.project-title-link {
  color: #fff; /* 或你想要的颜色 */
}
.project-title-link:hover {
  color: var(--color-link-hover); /* 可选：悬停时变色 */
}

/* project-link */
.card-text .project-link {
  display: inline-block;
  color: #fff;              /* 白色文字 */
  padding-bottom: 2px;
  transition: color 0.2s, border-color 0.2s;
}
.card-text .project-link:hover {
  color: var(--color-link-hover);       /* #ff963b */
  border-color: var(--color-link-hover);
}

/* 每个幻灯片（li）用绝对定位，由 animate 动画控制位置、大小、透明度 */
.project_content li {
  position: absolute;
  overflow: hidden;
}

/* 卡片内部结构：左右布局 */
.card {
  display: flex;
  width: 100%;
  height: 100%;
}

/* 左侧图片部分 */
.card-image {
  flex: 0 0 40%;
  background-size: cover;
  background-position: center;
}

/* 右侧文字描述部分 */
.card-text {
  flex: 1;
  padding: 20px;
  background-color: #2b2b2b;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

/* 按钮样式 */
/* 只作用于左右箭头 */
.pj_card_wrap a.prev,
.pj_card_wrap a.next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: none;        /* 由 JS 在鼠标移入/移出时切换显示 */
  width: 60px;
  height: 60px;
  line-height: 60px;    /* 让箭头垂直居中 */
  font-size: 36px;      /* 原来写法里的“36px/60px”可以拆成 font-size + line-height */
  text-align: center;
  color: #fff;
  background: rgba(65,65,65,0.6);
  z-index: 2;           /* 确保在卡片之上 */
  transition: background 0.3s ease;
}
/* 恢复水平定位 */
.pj_card_wrap a.prev { left: 30px; }
.pj_card_wrap a.next { right: 30px; }
/* 悬停加深背景 */
.pj_card_wrap a.prev:hover,
.pj_card_wrap a.next:hover {
  background: rgb(40,40,40);
}


.prev {
  left: 30px;
}
.next {
  right: 30px;
}


.nav-logo {
  height: 100%;
  max-height: 32px;
  object-fit: contain;
  display: block;
}


.home-logo {
  height: 10rem; /* 与 .content-title 字体大小一致 */
  width: auto;
  display: block;
  margin-bottom: 0em;
  /*遮罩层（禁止选中）*/
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}
