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

@font-face {
  font-family: 'MyPixelFont';
  src: url("neatpixels-standard.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}

/* 头顶览 */
header {
  /* background: rgba(255, 200, 232, 0.5); */
  color: #ffffff, ;
  padding: 2rem;
  font-family: 'MyPixelFont', Arial;
 
}


/* 左上角的标志 */
header a {
  color: #ffffff;
  text-shadow: #ffffff 0px 0px 5px;
  text-decoration: none;
  font-size: 60px;
}

/* 悬停时的效果 */
header a:hover {
  /* background: rgba(147, 139, 156, 0.2); */
  text-shadow: #ffffff 0px 0px 10px;
}



body {
  font-family: Arial, sans-serif;
  /* background: #3f3f3f; */
  color: #333;
  line-height: 1.6;
  background: url('/images/background.png') no-repeat center center fixed;
  background-size: cover;
}


/* 通用导航栏样式 */
nav {
  background: rgba(255, 78, 187, 0.4);
  
  padding: 10px;
  display: flex;
  justify-content: center;
  font-family: 'MyPixelFont', Arial;
  border-radius: 20px 20px 20px 20px;
}



/* 导航链接的基础样式 */
nav a {
  color: #fff;
  text-decoration: none;
  margin: 0 15px;
  padding: 10px 15px;
  border-radius: 5px;
  transition: background-color 0.3s ease, transform 0.2s ease;
  white-space: nowrap;
}

/* 悬停时的效果 */
nav a:hover {
  /* background: rgba(147, 139, 156, 0.2); */
  text-shadow: #ffffff 0px 0px 10px;
}


/* 选中 */
nav a.active {
  text-shadow: #3300ff 0px 0px 10px;
}

main {
  padding: 2rem;
  color: #ffffff;
}




@keyframes slide-fade-in {
  from {
    opacity: 0;
    box-shadow: none;
    transform: scale(0.5 )translateY(1vh);
  }
}

.projects {
  max-height: 250px;
  max-width: 800px;
  margin: 20px auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 80px;
  padding-bottom: 50px;

}

/* project cards */
.project {
  overflow: hidden;

  animation: slide-fade-in both;
  /* 使用浏览器的视图时间线,允许动画根据视口的变化进行同步 */
  animation-timeline: view();
  /* 定义动画时间范围 */
  animation-range: contain -100% contain 50%;

  background: rgba(255, 255, 255, 0.5);

  padding: 130px;
  border-radius: 50px;
  box-shadow: 0px 0px 5px rgba(255, 255, 255, 010);
  cursor: pointer;
  transition: transform 2s ease, background-color 0.5s ease;
}

.project img {
  width: 50%; /* 让图片自适应 */
  max-width: 100px;
  object-fit: cover; /* 裁剪填充 */
  border-radius: 10px; /* 圆角 */
}
/* 鼠标悬停效果 */
.project:hover {
  transform: scale(1.02);
  background-color:rgba(255, 255, 255, 0.8);
}

footer {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  text-align: center;
  padding: 1rem;
  width: 100%;
  position: fixed;
  bottom: 0;
  left: 0;
}
