html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  font-family: 'Sora', 'Noto Sans TC', sans-serif;
}

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

.nav-header {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 80px;
  width: 100%;
  background-color:transparent;
  position: fixed;
  z-index: 999;
  
}

.navbar:hover{
  background-color: white;
  border-radius: 30px;
}

.logo {
  display: none;
  justify-content: center;
  align-items: center;
  color: white;
  margin-left: 50px;
  width: 60px;
  height: 60px;
  border: none;
  border-radius: 50%;
  text-decoration: none;
  background-image: url('/Lirong\ IG\ Logo\ 1.png');
  background-position: center;     /* ⬅️ 就是這一行讓圖置中 */
}

.menu-icon {
  display: none;
  line-height: 1; /* 或與父元素高度一致 */
}

.navbar {
  transition: background-color 0.3s ease, border-radius 0.3s ease; /* ✅ 加上 border-radius 過渡動畫 */
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-right: 2%;
  margin-left: 2%;
  gap: 20px;
  border: none;
  border-radius: 30px; 
  height: 60%;
}

.navbar a {
  position: relative;  /* 為了定位 ::after */
  display: flex;
  justify-content: center;
  align-items: center;
  width: 170px;
  height: 70%;
  font-size: 16px;
  text-decoration: none;
  padding: 10px;
  border: none;
  color: #000000;
  background-color:transparent;
  transition: color 0.3s; /* 文字顏色動畫 */

  opacity: 0;
  animation: slideTop .5s ease forwards;
  animation-delay: calc(.2s * var(--i));
}

.navbar a::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 0%;
  height: 2px;
  background-color: #000;
  transition: width 0.3s ease;
}

/* 滑過或是 active 狀態時觸發動畫 */
.navbar a:hover::after {
  width: 80%;
}




.section {
  height: 100vh;
  width: 100%;
  scroll-snap-align: start;
  display: flex;
  justify-content: center;
  align-items: center;
}

#info {
  background-image: url('/Iphone\ 桌布\ 1.png');
  background-size: cover;             /* 填滿區塊，等比例裁切 */
  background-position: center center; /* 圖片置中對齊 */
  flex-direction: column;
  justify-content: start;
}

#cisVi {
  background-image: url('/LiRong\ Logo\ 1.png') ;
  background-position: center;
}

#socialPosts {
  background-color: #f5f5f5;
}

#illustration {
  background-color: aliceblue;
}

#graphic {
  background-color: purple;
}

#logotype {
  background-color: bisque;
}

#contact {
  background-color: wheat;
}

.aboutMe{
  display: flex;
  flex-direction: row;
  height: 36%;
  width: 100%;
  margin-top: 100px;
  margin-bottom: 20px;
}


.aboutMe-context p span{
  display: none;
}

.aboutMe-photo{
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  width: 50%;
  height: auto;
}


.aboutMe-photo img{
  display: flex;
  justify-content: center;
  align-items: center;
  width: 250px;
  height: 250px;
  padding: 0;
  margin: 0;
  border: none;
  border-radius: 50%;
  opacity: 0;
  animation: zoomIn 1s ease forwards,floatImage 3s ease-in-out infinite;

  z-index: 998;
}

.aboutMe-context{
  width: 50%;
  margin: 0 20px 0 20px ;
  padding: 0 20px 0 20px ;
  border: 1px solid black;
}

.aboutMe-context p{
  margin: 0;
}


.divider {
  display: none;
  width: 100%;
  margin: 0;
  border: none;
  border-top: 1px solid #ccc; /* 顏色與樣式可調整 */
}

.skillset{
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 20px;
  width: 100%;
  flex-direction: row;
  left: 0;
  right: 0;
  height: 32%;
  margin-bottom: 20px;
  
}

.skillset-left{
  display: flex;
  justify-content: center;
  align-items: center;
  width: 30%;
  background-color: pink;
  height: 100%;
  margin-left: 20px;
  border: none;
  border-radius: 30px;
}

.skillset-left p{
  font-size: 46px;
}

.skillset-right{
  width: 70%;
}

.grid-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 三欄 */
  grid-template-rows: repeat(2, auto);   /* 兩列 */
  gap: 20px; /* 格子之間間距 */
  width: 100%; /* 改成吃滿右側寬度 */
  padding: 0 20px 0 20px ;
}

.grid-item {
  background-color: #f2f2f2;
  padding: 20px;
  text-align: center;
  border-radius: 30px;
}
  
.exp-motto{
  height: 32%;
  padding-top: 0px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: row;
  width: 100%;
}

.experience{
  display: flex;
  justify-content: start;
  align-items: center;
  flex-direction: column;
  width: 50%;
  height: 100%;
  padding-left: 20px;
  padding-top: 20px;
}

.experience h1{
  font-size: 36px;
  padding-bottom: 12px;
}

.experience li{
  padding-bottom: 12px;
  font-size: 24px;
}


.motto {
  width: 50%;
  height: 50%;
  font-family: 'Playfair Display', serif;
  font-size: 26px;
  font-weight: 700;
  padding: 20px 30px;
  border-radius: 36px;
  border: none;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  display: flex;
  justify-content: center;
  align-items: center;
  margin-right: 20px;
}

.italic-1,
.motto .italic-2 {
  font-style: italic;
}


@media screen and (max-width: 1100px) {
  * {
    box-sizing: border-box;
  }

  html,
  body {
    width: 100%;
    overflow-x: hidden;
  }

  .section {
    width: 100% !important;
    scroll-snap-align: none !important; /* ✅ 移除 snap 對齊效果 */
    display: flex;
    flex-direction: column; /* ✅ 手機端改為縱向排列 */
  }

  .nav-header {
    background-color: white;
    height: 80px;
    justify-content:space-between;
    align-items: center;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
  }

  .logo{
    display: flex;
    margin-left: 10px !important;
  }

  .menu-icon {
    display: block;
    padding-right: 20px; /* 改成 padding */
    font-size: 46px;
  }

  .navbar{
    left: 0;
    right: 0;
    margin: 0;
    padding: 0;
  }
  .navbar a {
    animation: none;
    opacity: 1; /* ✅ 很關鍵，加上這個才會顯示出來 */
    width: 100%;
    text-align: center;
    padding: 10px 0;
    border: none;
    transition: 0.3s;
    border-radius: 0px;
    z-index: 999;
    background-color: white;
  }

  .navbar a:hover {
    background-color: black;
    color: white;
  }

  .navbar.show {
    display: flex;
    width: 100%;
  }


  .navbar {
    left: 0; /* 新增這行 */
    right: 0; /* 可選，雙保險 */
    position: absolute;
    top: 80px;
    right: 0;
    width: 100%;
    background-color: #fff;
    flex-direction: column;
    align-items: center;
    display: none;
    gap: 0;
  }
  
  #info {
    margin-top: 80px;
    height: auto;
  }

  #cisVi {
    height: 500px;
  }

  #socialPosts {
    height: 500px;
  }

  #illustration {
    height: 500px;
  }

  #graphic {
    height: 500px;
  }

  #logotype {
    height: 500px;
  }

  #contact {
    height: 500px;
  }

  .aboutMe-context p span{
    display: block;
    height: 50px;
    width: 100%;
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  font-weight: 700;
  padding: 12px 12px;
  border-radius: 36px;
  border: none;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  display: flex;
  justify-content: center;
  align-items: center;
  margin-right: 20px;
  margin-bottom: 20px;
  }

  .aboutMe{
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-top: 40px;
    width: 100%;
  }
  
  .aboutMe-photo img{
    width: 200px;
    height: 200px;
  }

  .aboutMe-context{
    padding-top: 20px;
    width: 100%;
    line-height: 1.4;
    font-size: 18px;
  }

  .skillset{
    display:flex;
    flex-direction: column;
  }

  .skillset-left{
    margin-bottom: 20px;
  }

  .grid-container {
    display: grid;
    grid-template-columns: repeat(1, 1fr); /* 三欄 */
    grid-template-rows: repeat(2, auto);   /* 兩列 */
    gap: 20px; /* 格子之間間距 */
    width: 100%; /* 改成吃滿右側寬度 */
    padding: 0 20px 0 20px ;
  }

  .exp-motto{
    display: flex;
    flex-direction: column;
  }

  .experience{
    width: 100%;
    padding: 12px 20px 12px 20px;
  }

  .experience ul{
   padding-left: 20px;
  }

  .experience li{
    font-size: 16px;
  }

  .motto{
    display: none;
  }
}


@keyframes zoomIn {
  0% {
    transform: scale(0.8);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes floatImage {
  0%{
      transform: translateY(0);
  }
  50%{
      transform: translateY(-24px);
  }
  100%{
      transform: translateY(1);
  }
}

@keyframes slideTop {
  0%{
      transform: translateY(100px);
      opacity: 0;
  }
  100%{
      transform: translateY(0);
      opacity: 1;
  }
}