/* 設定背景圖片 */
body {
  background-image: url("./images/background.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  box-sizing: border-box;
  overflow: hidden;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

/* 添加黑色半透明濾鏡 */
body::before {
  content: "";
  position: fixed;
  top: 0px;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.2);
  z-index: -1;
}

/* 名片樣式 */
.namecard {
  width: 90%;
  max-width: 600px;
  padding: 20px;
  background-color: #061325;
  letter-spacing: 1px;
  font-weight: 100;
  color: #FCECC9;
  overflow: hidden;
  border: solid 2px #4a8e96;
  border-radius: 8px;
  box-shadow: 10px 10px 15px #4a8e96;
  position: relative;
  transition: 0.3s;
}

.namecard:hover {
  background-color: #0d1936;
  transform: translateY(-5px);
  box-shadow: 10px 10px 20px #4a8e96;
}

/* 讓名稱與圖片區塊分開 */
h2 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 25px;
  font-weight: 700;
}

.namecard h2 span {
  font-size: 12px;
}

.namecard h5 {
  color: #4af6ff;
  font-weight: 500;
}

.namecard p {
  font-size: 12px;
  line-height: 22px;
}

/* 圖片區塊樣式 */
.square-images {
  display: flex;
  gap: 10px;
  flex-grow: 1;
  justify-content: flex-end;
}

/* 讓圖片根據 .namecard 自适應大小 */
.square-image {
  flex: 1 1 60px;
  max-width: 80px;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  background-size: cover;
  background-position: center;
}

/* 技能區塊 */
.skills-container {
  display: flex;
  justify-content: space-between;
  margin-top: 15px;
}

.skill {
  width: 45%;
}

#courses h4, 
#skills h4 {
  margin: 5px 0;
  font-size: 16px;
  color: #4af6ff;
}

#courses ul {
  padding: 0;
  list-style: none;
}

#courses li {
  margin-bottom: 5px;
}

#skills .skill-bar {
  margin-bottom: 10px;
}

#skills .skill-bar label {
  display: block;
  font-size: 14px;
  margin-bottom: 5px;
}

#skills .skill-bar .bar {
  width: 100%;
  height: 10px;
  background-color: #ddd;
  border-radius: 5px;
  overflow: hidden;
}

#skills .skill-bar .level {
  height: 100%;
  background: linear-gradient(90deg, #00d5ff,#00ff77);
  border-radius: 5px;
  transition: background-position 0.5s ease-in-out;
  background-size: 200% 200%;
}

.namecard:hover #skills .skill-bar .level {
  animation: waveEffect 1.5s infinite alternate;
}

@keyframes waveEffect {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 100% 50%;
  }
}

/* 學校網站按鈕 */
.website-link {
  margin-top: 15px;
  text-align: center;
}

.btn {
  display: inline-block;
  margin: 10px;
  padding: 8px 15px;
  font-size: 14px;
  color: #fff;
  background-color: #347c85;
  border-radius: 5px;
  text-decoration: none;
  transition: 0.3s;
}

.btn:hover {
  background-color: #004C99;
  box-shadow: 0px 4px 10px rgba(0, 128, 255, 0.5);
}

@media (max-width: 600px) {
  .skills-container {
    flex-direction: column;
    align-items: center;
    gap: 15px;
  }

  .skill {
    width: 100%;
    text-align: center;
  }
}
