@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@300;400;700&display=swap");

/* 基本樣式 */
body {
  font-family: "Noto Sans TC", sans-serif;
  line-height: 1.8;
  margin: 0;
  padding: 0;
  background-color: #161c25;
  color: #cdd5e0;
}

.container {
  max-width: 1000px;
  margin: 40px auto;
  padding: 40px;
  background-color: #222327;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  border-radius: 20px;
}

/* 頁首 */
header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 30px;
  border-bottom: 2px solid #3b475b;
  margin-bottom: 30px;
}

.header-left {
  display: flex;
  align-items: flex-start;
}

.avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 5px solid #3b475b;
  box-shadow: 0 0 15px rgba(59, 71, 91, 0.5);
  margin-right: 30px;
  object-fit: cover;
  flex-shrink: 0;
}

.header-text h1 {
  margin: 0;
  color: #ffffff;
  font-size: 2.8em;
  font-weight: 700;
}

.header-text h2 {
  margin: 5px 0;
  font-weight: 400;
  color: #8a9eb2;
  font-size: 1.4em;
}

.header-text .summary {
  margin-top: 15px;
  font-style: normal;
  color: #cdd5e0;
}

.header-right .contact-info {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: right;
}

.header-right .contact-info li {
  margin-bottom: 10px;
  font-size: 1em;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.header-right .contact-info i {
  margin-right: 12px;
  color: #8a9eb2;
  width: 20px;
  text-align: center;
  transition: transform 0.3s;
}

.header-right .contact-info li:hover i {
  transform: scale(1.2);
  color: #fff;
}

.header-right .contact-info a {
  text-decoration: none;
  color: #66aeff;
  font-weight: 500;
  transition: color 0.3s;
}

.header-right .contact-info a:hover {
  color: #8dc0ff;
}

/* 主要內容 */
main section {
  margin-bottom: 40px;
  padding: 25px;
  background: #1d2025;
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

main h3 {
  color: #ffffff;
  border-bottom: 2px solid #3b475b;
  padding-bottom: 12px;
  margin-bottom: 25px;
  font-size: 1.8em;
  display: flex;
  align-items: center;
}

main h3 i {
  margin-right: 15px;
  font-size: 1.2em;
  color: #8a9eb2;
}

/* 工作經驗 */
#experience .job {
  margin-bottom: 25px;
  padding-left: 25px;
  border-left: 4px solid #3b475b;
  position: relative;
}

#experience .job::before {
  content: "";
  position: absolute;
  left: -15px;
  top: 0px;
  width: 20px;
  height: 20px;
  background: #222327;
  border: 4px solid #8a9eb2;
  border-radius: 50%;
}

#experience .job:last-child {
  margin-bottom: 0;
}

#experience h4 {
  margin: 0 0 5px 0;
  color: #ffffff;
  font-size: 1.3em;
}

#experience h5 {
  margin: 0 0 12px 0;
  font-weight: 500;
  color: #8a9eb2;
  font-style: normal;
}

#experience ul {
  margin: 0;
  padding-left: 20px;
  list-style-type: "✓ ";
  color: #cdd5e0;
}

#experience ul li {
  margin-bottom: 8px;
}

/* 學歷 */
#education .education-item {
  padding-left: 20px;
}
#education .education-item h4 {
  margin: 0 0 5px 0;
  font-size: 1.3em;
  color: #ffffff;
}

#education .education-item h5 {
  margin: 0;
  font-weight: 500;
  color: #8a9eb2;
}

/* 技能 */
#skills .skill-category {
  margin-bottom: 20px;
}

#skills h4 {
  margin: 0 0 15px 0;
  color: #ffffff;
  font-size: 1.2em;
  font-weight: 700;
}

#skills .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
p a,
ul a {
  color: #fd0303;
}
#skills .tags span {
  background-color: #3b475b;
  color: #b2c8e8;
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 0.95em;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

#skills .tags span:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.3);
  background-color: #8a9eb2;
  color: #161c25;
}

/* 自傳 */
#autobiography h4 {
  margin-top: 20px;
  margin-bottom: 10px;
  color: #ffffff;
  font-size: 1.2em;
  font-weight: 700;
}

#autobiography p {
  margin-bottom: 15px;
  text-align: justify;
  color: #cdd5e0;
}

/* 頁尾 */
footer {
  text-align: center;
  padding: 20px 0;
  margin-top: 30px;
  border-top: 2px solid #3b475b;
  color: #8a9eb2;
  background-color: #222327;
  margin: 40px -40px -40px;
  border-bottom-left-radius: 20px;
  border-bottom-right-radius: 20px;
}

/* 響應式設計 */
@media (max-width: 768px) {
  .container {
    margin: 20px;
    padding: 20px;
  }
  header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .header-left {
    flex-direction: column;
    align-items: center;
  }

  .avatar {
    margin-right: 0;
    margin-bottom: 20px;
  }

  .header-right {
    width: 100%;
    margin-top: 20px;
    text-align: center;
  }

  .header-right .contact-info {
    text-align: center;
    display: inline-block;
  }

  .header-right .contact-info li {
    justify-content: left;
  }

  .header-text h1 {
    font-size: 2.2em;
  }
}

@media (max-width: 480px) {
  .container {
    margin: 10px;
    padding: 15px;
  }

  .header-text h1 {
    font-size: 2em;
  }

  .header-text h2 {
    font-size: 1.2em;
  }

  main h3 {
    font-size: 1.5em;
  }

  footer {
    margin: 20px -15px -15px;
  }
}
