* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

header{
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: absolute;
    top: 0px;
    width: 100%;
}
.logo a{
	color: black;
	text-decoration: none;
    font-size: 1.5rem;
    font-weight: 700;
}

.navbar .nav-links {
    display: flex;
    gap: 1rem;
    list-style: none;
}
.navbar a {
    display: inline-block;
    background-color: white;
    color: black;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    padding: 10px 20px;
    border-radius: 9999px; /* 左右半圆 */
    min-width: 120px; /* 保持按钮大小统一 */
    text-align: center;
    transition: background-color 0.3s, color 0.3s;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2); /* 按钮阴影 */
}

.navbar a:hover {
    background-color: #FFA500;
    color: white;
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.3); /* 悬停时阴影更明显 */
}
.main-name{
    text-align: center;
    font-size: 32px;
    margin-top: 40%;
    margin-bottom: 40%;
}
.main-name h2{
    font-size: 30px;
}
body {
    background: linear-gradient(
         to bottom,  /* 改为垂直方向 */
        #ffed97 0%,     /* 顶部暖黄色 */
        #fff5c4 25%,    /* 过渡浅黄色 */
        #ffffff 50%,    /* 中部纯白色 */
        #FFF2CA 75%,    /* 过渡浅黄色 */
        #ffed97 100%   /* 底部暖黄色 */
    );
    height: auto;
    margin: 0;
    font-family: "Kaisei Tokumin", serif;
    color: #333;
}
.Gallery-main{
    margin: 0 auto;
    text-align: center;
}
.Gallery-main h3{
    padding: 5%;
    margin: 5;
    font-size: 2rem;
}
.img img{
    display: block;
  max-width: 100%;
  max-height: 300px;
  height: auto;
  width: auto;
}
.project{
    display: inline-block;
    margin: 5%;
    border: 5px solid #F2ECCC;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3); /* 阴影：水平 垂直 模糊颜色 */
    border-radius: 8px;              /* 可选：圆角 */
}
.about h3{
    margin: 5%;
    text-align: center;
    font-size: 2rem;
}
.about-grid{
    display: grid;
    grid-template-columns: repeat(1, 1fr); /* 2列布局 */
    gap: px;
    padding: 0;
    text-align: center;
    place-items: center;
}
.my-skill{
      padding: 3%;
      display: grid;
      grid-template-columns: 1 1fr;  /* 内部网格 */
      gap: 0px;
}
.web-skill{
    margin: 0;
    padding: 5%;
}
.web-skill h4{
    margin-bottom: 5%;
    font-size: 1.5rem;
}
.web-skill a{
    color: #333;
    font-size: 1.2rem;
    font-weight: 800;
    font-style: normal;
    padding: 2%;
}  
.pic{
    border-radius: 50%;
    border: 5px solid #F2ECCC;
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.5);
} 
.pic img{
    border-radius: 50%;
    max-height: 500px;
}
.scroll-row {
  display: none;
  animation: none;
}
.list-project{
    display: block;
}
html, body {
  overflow-x: hidden;
  scroll-behavior: smooth;
}

.myGallery {
  overflow: hidden;
  max-width: 100%;
  position: relative;
}
.popup {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: rgba(0, 0, 0, 0.8); /* 半透明黑灰色 */
      backdrop-filter: blur(8px); /* 高斯模糊背景 */
      display: flex;
      align-items: center;
      opacity: 0;
      justify-content: center;
      transition: opacity 0.3s ease-out;
      z-index: 1000;
      visibility: hidden;
    }

    .popup-content {
      background: #fff5c4;
      padding: 2rem;
      border-radius: 8px;
      box-shadow: 0 8px 30px rgba(0,0,0,0.5);
      border: 5px solid orange; /* 紫色边框 */
      text-align: center;
      transform: scale(0.8);
      transition: transform 0.5s ease;
      max-width: 1000px;
      width: 90%;
      color: black;
    }

    .popup-img {
      width: 100%;
      max-height: 500px;
      object-fit: cover;
      border-radius: 15px;
      margin-bottom: 20px;
    }


    .popup.show {
      visibility: visible;
      opacity: 1;
    }
    .popup.hide {
      transform: scale(0);
    }

    .popup.show .popup-content {
      transform: scale(1);
    }
    /*turn btn*/
    .turn-btn {
    display: inline-block;
      margin-top: 20px;
      padding: 10px 20px;
      background: white;
      color: orange;
      border: none;
      border-radius: 10px;
      font-weight: bold;
      cursor: pointer;
      transition: background 0.3s, color 0.3s;
    }

    .turn-btn:hover {
      background: orange;
      color: white;
    }


@media (min-width: 768px){
    .navbar .nav-links{
        gap: 2rem;
    }
    .main-name{
        margin-top: 20%;
        margin-bottom: 20%;
    }
    .about-grid{
        border-top: 5px dotted orange;
        grid-template-columns: repeat(2, 1fr);
        padding:0;
        align-items: stretch;
    }
    .my-skill{
        border-left: 5px dotted orange;
        grid-template-columns: 1fr;
        margin: 0;
        max-height: 100%;
        padding: 0;
    }
    .pic{
        margin: 5%;
    }
    .pic img{
        max-width: 100%;
        max-height: 500px;
    }
    .project{
        margin: 20px;
    }
    .img img{
        max-height: 400px;
    }
    #SEO{
        border-top: 5px dotted orange;
    }
    #Interactive{
        border-top: 5px dotted orange;
    }
    #email{
        border-top: 5px dotted orange;
    }
    .list-project{
        display: none;
    }
    .scroll-row {
        display: flex;
        gap: 10px;
        animation: scrollLeft 20s linear infinite;
        animation-play-state: running;
        width: max-content;
    }
    .scroll-row.paused {
      animation-play-state: paused;
    }
    .scroll-row:hover {
      animation-play-state: paused;
    }
    .project{
      transition: transform 0.3s ease;
    }
    .project:hover {
      transform: scale(1.15);
    }
    
}
@media (min-width: 1024px){
    .logo a{
        font-size: 2rem;
    }
    .main-name{
        font-size: 3rem;
    }
    .navbar .nav-links{
        gap: 3rem;
    }
    .my-skill{
        grid-template-columns: 2fr 2fr;
        max-height: 100%;
    }
    .web-skill{
        padding: 12%;
    }
    .scroll-row {
        margin-top: 5%;
        margin-bottom: 5%;
        display: flex;
        gap: 10px;
        animation: scrollLeft 20s linear infinite;
        width: max-content;
    }
    #SEO{
        border-top: 0px dotted orange;
        border-left: 5px dotted orange;
    }
    #Interactive{
        border-top: 5px dotted orange;
    }
    #email{
        border-top: 5px dotted orange;
        border-left: 5px dotted orange;
    }


}
@keyframes scrollLeft {
  from {
    transform: translateX(0%);
  }
  to {
    transform: translateX(-50%);
  }
}
