html, body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', 'Noto Sans TC', 'Noto Sans SC', 'Noto Sans JP', 'PingFang TC', 'PingFang SC', 'PingFang HK', 'Microsoft JhengHei', 'Heiti TC', 'Source Han Sans', 'Source Han Sans TC', Arial, sans-serif;
  background: #f9f7f4;
  color: #232323;
  box-sizing: border-box;
  font-weight: 400;
  letter-spacing: 0.01em;
}
*, *:before, *:after {
  box-sizing: inherit;
}
a {
  color: inherit;
  text-decoration: none;
}

.hero {
  font-family: 'Inter', 'Noto Sans TC', 'PingFang TC', 'Microsoft JhengHei', Arial, sans-serif;
  font-weight: 400;
}

.hero .hero-title.typewriter {
  font-family: 'Fira Mono', 'Consolas', monospace;
  font-weight: 600;
}

.hero .hero-desc,
.hero .hero-badges,
.hero .hero-cert-badges,
.hero .socials,
.hero .email-btn {
  font-family: inherit;
  font-weight: 400;
}

/* 只針對 icon 顯示用 Font Awesome */
.hero i, .hero .fa, .hero [class^="fa-"], .hero [class*=" fa-"] {
  font-family: "Font Awesome 6 Free", "Font Awesome 5 Free", "FontAwesome", "Font Awesome 6 Brands", "Font Awesome 5 Brands", sans-serif !important;
  font-style: normal !important;
  font-weight: 900 !important;
}
.navbar,
.navbar *,
.nav-list a,
.nav-brand {
  font-weight: 400 !important;
  font-family: 'Inter', 'Noto Sans TC', 'Noto Sans SC', 'Noto Sans JP', 'PingFang TC', 'PingFang SC', 'PingFang HK', 'Microsoft JhengHei', 'Heiti TC', 'Source Han Sans', 'Source Han Sans TC', Arial, sans-serif !important;
  letter-spacing: 0.04em;
}

.section-title,
.timeline-title,
.competition-title,
.portfolio-title,
.cert-cards-title,
.main-card h2,
.timeline-title2,
.competition-table thead th,
.portfolio-v-card h3,
.cert-card h3,
.modal-header h3 {
  font-weight: 500 !important;
  font-family: 'Inter', 'Noto Sans TC', 'Noto Sans SC', 'Noto Sans JP', 'PingFang TC', 'PingFang SC', 'PingFang HK', 'Microsoft JhengHei', 'Heiti TC', 'Source Han Sans', 'Source Han Sans TC', Arial, sans-serif !important;
}

.competition-table .modal-trigger {
  color: #232323 !important;
  cursor: pointer;
  text-decoration: underline;
  font-weight: 500;
  background: none;
  border: none;
  padding: 0;
  font-size: inherit;
  font-family: inherit;
  transition: color .14s;
}
.competition-table .modal-trigger:hover,
.competition-table .modal-trigger:focus {
  color: #4563c7 !important;
  text-decoration: underline;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding-left: 1.1rem;
  padding-right: 1.1rem;
}

/* 主要的區域 */
.main-cards {
  width: 100%;
  max-width: 1000px;
  margin: 2.5rem auto 1.5rem auto;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  box-sizing: border-box;
}

.main-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  max-width: 900px;
  background: transparent;
  border-radius: 0.7rem;
  box-shadow: none;
  padding: 0;
  margin: 0 auto;
  box-sizing: border-box;
}

/* 左半部：內容 */
.main-card-left {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  flex: 1 1 0;
  min-width: 0;
}

.main-card-icon {
  flex: 0 0 46px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  margin-right: 1.1rem;
}

.main-card-icon img {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  object-fit: contain;
  background: #f4f4f6;
  box-shadow: 0 2px 12px #e3e4ee;
}

.main-card-content {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  max-width: 560px;
}

.main-card-content h1 {
  font-size: 1.3rem;
  margin: 0 0 .5rem 0;
  color: #23223b;
  text-align: left;
  font-weight: 500;
  font-family: 'Noto Sans TC', 'Inter', Arial, sans-serif;
  letter-spacing: .02em;
  width: 100%;
  box-sizing: border-box;
}

.main-card-content p {
  color: #444;
  text-align: left;
  font-size: 1rem;
  margin-bottom: .6rem;
  line-height: 1.7;
  word-break: break-word;
  width: 100%;
  box-sizing: border-box;
}

/* 右半部：證照照片(輪播區) */
.main-card-right {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-left: 0;
}

/* 輪播區域 */
.main-card-carousel {
  position: relative;
  width: 400px;
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 輪播圖片區 */
.carousel-images {
  width: 400px;
  aspect-ratio: 4 / 3;
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  box-shadow: 0 4px 18px rgba(60,60,90,0.14);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 輪播圖片4:3橫向比例 */
.main-card-license {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 20px;
  opacity: 0;
  transition: opacity 0.5s;
  pointer-events: none;
  position: absolute;
  top: 0;
  left: 0;
  box-shadow: 0 2px 10px rgba(60,60,90,0.07);
}

.main-card-license.active {
  opacity: 1;
  pointer-events: auto;
}

/* 美化透明輪播按鈕 */
.carousel-btn {
  background: rgba(255,255,255,0.15);
  border: none;
  border-radius: 50%;
  width: 42px;
  height: 42px;
  font-size: 1.8rem;
  color: #fff;
  box-shadow: 0 2px 12px rgba(40,40,60,0.18);
  cursor: pointer;
  z-index: 20;
  margin: 0 13px;
  transition: background 0.22s, transform 0.18s;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(2px);
  opacity: 0.83;
}

.carousel-btn:hover {
  background: rgba(80,80,120,0.22);
  color: #ffe100;
  transform: scale(1.07);
  opacity: 1;
  box-shadow: 0 4px 18px rgba(40,40,60,0.33);
}

.carousel-btn:active {
  transform: scale(0.96);
  background: rgba(120,120,180,0.28);
}

/* RWD 小螢幕 */
@media (max-width: 1000px) {
  .main-cards {
    max-width: 99vw;
    margin-left: auto;
    margin-right: auto;
  }

  .main-card {
    flex-direction: column;
    align-items: center;
    max-width: 99vw;
    margin-left: auto;
    margin-right: auto;
  }

  .main-card-left {
    flex-direction: row;
    align-items: flex-start;
    width: 100%;
    min-width: 0;
    margin-bottom: 1.2rem;
    justify-content: center;
  }

  .main-card-right {
    flex: 0 0 auto;
    width: 100%;
    padding-left: 0;
    justify-content: center;
    margin-bottom: 0;
  }

  .main-card-carousel {
    width: 100%;
    max-width: 400px;
    height: auto;
    aspect-ratio: 4 / 3;
  }

  .carousel-images {
    width: 100%;
    max-width: 400px;
    height: auto;
    background: transparent;
  }

  .main-card-license {
    width: 100%;
    height: 100%;
  }

  .carousel-btn {
    width: 38px;
    height: 38px;
    font-size: 1.3rem;
    margin: 0 8px;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
  }

  .carousel-btn:first-child {
    left: -46px;
  }

  .carousel-btn:last-child {
    right: -46px;
  }

  .carousel-btn:hover {
    transform: translateY(-50%) scale(1.07);
  }

  .carousel-btn:active {
    transform: translateY(-50%) scale(0.96);
  }
}

/* 極小螢幕（小於350px） */
@media (max-width: 350px) {
  .carousel-btn {
    width: 36px;
    height: 36px;
    font-size: 1.2rem;
    margin: 0;
  }

  .carousel-btn:first-child {
    left: -42px;
  }

  .carousel-btn:last-child {
    right: -42px;
  }
}

/* 補充：針對 iOS/Android 某些狀況，強制 aspect-ratio 4:3 */
@supports (aspect-ratio: 4 / 3) {
  .carousel-images,
  .main-card-license {
    aspect-ratio: 4 / 3;
    height: auto;
  }
}
/**/

.section-title {
  font-size: 1.3rem;
  color: #23223b;
  margin-bottom: 1.2rem;
  text-align: center;
  letter-spacing: .04em;
  font-family: 'Inter', 'Noto Sans TC', Arial, sans-serif;
}
.timeline-section {
  max-width: 700px;
  margin: 2.7rem auto 2rem auto;
  padding: 1.2rem 0 1.1rem 0;
}
.timeline-title {
  font-size: 1.3rem;
  color: #23223b;
  margin-bottom: 1.2rem;
  text-align: center;
  letter-spacing: .04em;
  font-family: 'Inter', 'Noto Sans TC', Arial, sans-serif;
}
.timeline {
  border-left: 3px solid #9a8c98;
  margin-left: 1.5rem;
  padding-left: 2.6rem;
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
}
.timeline-item {
  position: relative;
  margin-bottom: .6rem;
}
.timeline-item:before {
  content: '';
  position: absolute;
  left: -2.05rem;
  top: .2rem;
  width: 1.2rem;
  height: 1.2rem;
  background: #9a8c98;
  border-radius: 50%;
  border: 2.5px solid #fff;
  box-shadow: 0 0 0 2px #e8e4ea;
}
.timeline-date {
  font-size: .97rem;
  color: #9a8c98;
  margin-bottom: .12rem;
}
.timeline-title2 {
  color: #22223b;
  font-size: 1.07rem;
  margin-bottom: .1rem;
}
.timeline-desc {
  color: #555;
  font-size: .99rem;
  margin-bottom: .1rem;
}
.competition-portfolio-section {
  display: flex;
  gap: 2.2rem;
  max-width: 1100px;
  margin: 2.7rem auto 2rem auto;
  align-items: flex-start;
  padding-left: 1.1rem;
  padding-right: 1.1rem;
  box-sizing: border-box;
}
.competition-col,
.portfolio-cert-col {
  min-width: 320px;
  background: #ffffff00;
  border-radius: 0.7rem;
  box-shadow: 0 4px 15px rgba(60, 60, 90, 0);
  padding: 1.1rem 1.1rem 1.1rem 1.1rem;
  box-sizing: border-box;
  margin: 0;
  height: fit-content;
  flex: 1 1 0;
  max-width: 500px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
}
.competition-title,
.portfolio-title {
  font-size: 1.3rem;
  color: #23223b;
  margin-bottom: 1.2rem;
  text-align: center;
  letter-spacing: .04em;
  font-family: 'Inter', 'Noto Sans TC', Arial, sans-serif;
}
.competition-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.97rem;
  margin-bottom: 1.6rem;
  background: #fff;
}
.competition-table th,
.competition-table td {
  padding: 8px 7px;
  text-align: left;
}
.competition-table thead th {
  background: #f5f5f8;
  color: #23223b;
  border-bottom: 2px solid #e2e2e2;
  font-size: 1.02rem;
}
.competition-table tbody tr {
  border-bottom: 1px solid #ececec;
}
.competition-table tbody tr:last-child {
  border-bottom: none;
}
.competition-table td {
  color: #444;
}

/* =========================
   作品集卡片（與競賽表格同寬，卡片置中）【重點修正區】
   ========================= */
.portfolio-v-cards {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  gap: 1.3rem;
}
.portfolio-v-card {
  background: #ffffff00;
  border-radius: 0.7rem;
  box-shadow: 0 4px 15px rgba(60,60,90,0.09);
  padding: 2.7rem 2.1rem 2.2rem 2.1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: box-shadow .13s;
  min-width: 0;
  max-width: 100%;
  width: 100%;
  margin: 0;
  box-sizing: border-box;
}
.portfolio-v-card img {
  width: 100%;
  max-width: 430px;
  height: auto;
  max-height: 180px;
  margin-bottom: 1.2rem;
  border-radius: 22px;     /* 圓角更明顯 */
  object-fit: contain;     /* 不裁切圖片，全部顯示 */
  background: #f4f4f6;
  display: block;
  margin-left: auto;
  margin-right: auto;
  box-shadow: 0 2px 16px #e3e4ee;
}
.portfolio-v-card h3 {
  font-size: 1.35rem;
  color: #22223b;
  margin-bottom: .62rem;
  letter-spacing: .02em;
  font-family: 'Inter', 'Noto Sans TC', Arial, sans-serif;
  font-weight: 500;
  text-align: center;
}
.portfolio-v-card p {
  color: #444;
  font-size: 1.08rem;
  margin-bottom: .58rem;
  text-align: center;
  line-height: 1.7;
  font-family: 'Inter', 'Noto Sans TC', Arial, sans-serif;
}
.portfolio-v-card .links {
  margin-top: .39rem;
  display: flex;
  gap: .9rem;
  justify-content: center;
  width: 100%;
}
.portfolio-v-card .links a {
  display: inline-block;
  background: #4563c7;
  color: #fff;
  padding: .33rem 1.2rem;
  border-radius: 4px;
  font-size: 1.08rem;
  transition: background .18s;
  text-align: center;
  font-weight: 500;
}
.portfolio-v-card .links a:hover {
  background: #364057;
}

/* --- 作品集輪播指示器調整 --- */
.portfolio-carousel-indicator {
  margin-top: 1.1rem;
  display: flex;
  justify-content: center;
  gap: 0.65rem;
}
.carousel-dot {
  display: inline-block;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #d5d7e7;
  cursor: pointer;
  transition: background .14s;
}
.carousel-dot.active {
  background: #4563c7;
}


/* =========================
   證照卡片專區（比作品集更寬，與表格左右貼齊）
   ========================= */
.cert-cards-section {
  max-width: 1100px;
  margin: 2.5rem auto 2rem auto;
  padding-left: 1.1rem;
  padding-right: 1.1rem;
  box-sizing: border-box;
}
.cert-cards-title {
  font-size: 1.3rem;
  color: #23223b;
  margin-bottom: 1.2rem;
  text-align: center;
  letter-spacing: .04em;
  font-family: 'Inter', 'Noto Sans TC', Arial, sans-serif;
}
.cert-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 2.2rem;
  justify-content: center;
  margin-bottom: 1.5rem;
}
.cert-card {
  flex: 1 1 330px;
  min-width: 250px;
  max-width: 410px;
  background: #fff;
  border-radius: 0.7rem;
  box-shadow: 0 4px 15px rgba(60,60,90,0.09);
  padding: 2.2rem 1.7rem 1.6rem 1.7rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: transform .13s, box-shadow .13s;
  margin: 0;
  box-sizing: border-box;
}
.cert-card:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 10px 25px rgba(60,60,90,0.13);
}
.cert-card .cert-icon {
  font-size: 1.8rem;
  margin-bottom: .6rem;
  color: #4563c7;
  background: #f2f4fa;
  border-radius: 8px;
  padding: .23em .28em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.cert-card h3 {
  font-size: 1.12rem;
  color: #22223b;
  margin-bottom: .49rem;
  letter-spacing: .02em;
  font-family: 'Inter', 'Noto Sans TC', Arial, sans-serif;
  font-weight: 500;
  text-align: center;
}
.cert-card ul {
  padding-left: 1.2rem;
  text-align: left;
  font-size: 0.97rem;
  color: #444;
  margin: 0 auto;
  display: table;
}
.cert-card ul li {
  margin-bottom: .39rem;
  line-height: 1.5;
}

/* =========================
   RWD
   ========================= */
@media (max-width: 1100px) {
  .competition-portfolio-section {
    flex-direction: column;
    gap: 2.3rem;
    padding-left: 1.1rem;
    padding-right: 1.1rem;
    align-items: center;
  }
  .competition-col,
  .portfolio-cert-col {
    max-width: 600px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    align-items: center;
  }
  .portfolio-v-cards {
    gap: 1.1rem;
  }
  .cert-cards {
    gap: 1.2rem;
  }
  .cert-card {
    min-width: 220px;
    max-width: 98vw;
  }
  .portfolio-v-card img {
    max-width: 98vw;
  }
}
/* 響應式：螢幕小於 800px 圖片自動縮小 */
@media (max-width: 800px) {
  .carousel-images {
    width: 90vw;
    height: calc(90vw * 0.75); /* 4:3 比例 */
    max-width: 360px;
    max-height: 270px;
  }

  .competition-col,
  .portfolio-cert-col {
    max-width: 600px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    align-items: center;
  }
  .portfolio-v-cards, .cert-cards {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.2rem;
  }
  .portfolio-v-card {
    padding: 1.5rem .8rem 1.1rem .8rem;
  }
  .portfolio-v-card img {
    max-width: 98vw;
  }
}
@media (max-width: 700px) {
  .portfolio-v-card,
  .cert-card {
    padding: 1.1rem .5rem .8rem .5rem;
  }
  .portfolio-v-card h3 {
    font-size: 1.13rem;
  }
  .portfolio-v-card p {
    font-size: .97rem;
  }
  .portfolio-v-card .links a {
    font-size: .96rem;
  }
  .portfolio-v-card img {
    max-width: 96vw;
  }
}
@media (max-width: 600px) {
  .competition-portfolio-section,
  .cert-cards-section,
  .main-cards {
    padding-left: .5rem;
    padding-right: .5rem;
  }
  .competition-col,
  .portfolio-cert-col {
    max-width: 98vw;
    margin-left: auto;
    margin-right: auto;
  }
  .portfolio-v-card,
  .cert-card {
    min-width: 90vw;
    max-width: 99vw;
    width: 100%;
    padding: .8rem .18rem .8rem .18rem;
  }
  .portfolio-v-card img {
    max-width: 97vw;
    border-radius: 10px;
  }
}
@media (max-width: 480px) {
  .portfolio-v-cards,
  .cert-cards {
    gap: 0.6rem;
  }
  .portfolio-v-card,
  .cert-card {
    min-width: 90vw;
    max-width: 99vw;
    width: 100%;
    padding: .42rem .11rem .42rem .11rem;
  }
  .portfolio-v-card img {
    max-width: 96vw;
    border-radius: 7px;
  }
  .portfolio-v-card h3 {
    font-size: 1.01rem;
  }
  .portfolio-v-card p {
    font-size: .91rem;
  }
}