/* Modal styles */
.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  overflow: auto;
  background: rgba(44, 44, 52, 0.23);
  backdrop-filter: blur(2.5px);
  transition: opacity 0.2s;
}
.modal.open {
  display: block;
  animation: modalFadeIn 0.20s;
}
@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.modal-content {
  background: #fff;
  margin: 4rem auto;
  border-radius: 1.5rem;
  padding: 3rem 2.5rem 2.2rem 2.5rem;
  max-width: 860px;
  box-shadow: 0 16px 48px rgba(60,60,90,0.25);
  position: relative;
  text-align: left;
  animation: modalSlideIn 0.25s;
}
@keyframes modalSlideIn {
  from { transform: translateY(-36px); opacity: 0;}
  to { transform: translateY(0); opacity: 1;}
}
.modal-header h3 {
  font-size: 1.65rem;
  color: #23223b;
  margin-bottom: .35rem;
  font-weight: 700;
  line-height: 1.2;
}
.modal-date {
  color: #7c7c93;
  font-size: 1.03rem;
  margin-bottom: 1.2rem;
  font-weight: 500;
  line-height: 1.1;
}
.close-btn {
  position: absolute;
  top: 22px;
  right: 28px;
  font-size: 2.1rem;
  color: #888;
  cursor: pointer;
  z-index: 999;
  background: none;
  border: none;
  transition: color 0.15s;
}
.close-btn:hover {
  color: #23223b;
}

/* ==== 圖片排列採 CSS Grid，手機時一行一張 ==== */
.image-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
  margin-bottom: 1.6rem;
  justify-items: center;
}
.modal-img {
  width: 260px;
  height: 180px;
  object-fit: cover;
  border-radius: 16px;
  box-shadow: 0 2px 18px #dedede;
  background: #f5f5f8;
}

.pdf-link {
  margin-top: 1.6rem;
  text-align: center;  /* 置中按鈕 */
}
.pdf-button {
  display: inline-flex;
  align-items: center;
  background: #4563c7;
  color: #fff;
  border-radius: 8px;
  padding: .45rem 1.35rem;
  font-size: 1.18rem;
  text-decoration: none;
  font-weight: 600;
  transition: background .13s;
  box-shadow: 0 2px 10px #b2b6e2;
  margin: 0 auto; /* 置中 */
}
.pdf-button:hover {
  background: #364057;
}
.pdf-icon {
  width: 28px;
  height: 28px;
  margin-right: 12px;
  object-fit: contain;
  vertical-align: middle;
}

/* ====== RWD ====== */
@media (max-width: 1200px) {
  .modal-content {
    max-width: 99vw;
    padding: 2.1rem 1.3rem 1.1rem 1.3rem;
  }
  .image-container {
    gap: 14px;
  }
  .modal-img {
    width: 200px;
    height: 130px;
    border-radius: 12px;
  }
}
@media (max-width: 900px) {
  .modal-content {
    max-width: 99vw;
    padding: 1.5rem .9rem 1.1rem .9rem;
  }
  .image-container {
    gap: 10px;
  }
  .modal-img {
    width: 140px;
    height: 90px;
    border-radius: 8px;
  }
  .pdf-icon {
    width: 21px;
    height: 21px;
    margin-right: 8px;
  }
}
@media (max-width: 600px) {
  .modal-content {
    padding: 1rem .4rem .5rem .4rem;
    max-width: 99vw;
    border-radius: 1rem;
  }
  .image-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
    margin-bottom: 1.2rem;
    margin-top: 0.5rem;
    justify-items: center;
  }
  .modal-img {
    width: 92vw;
    max-width: 370px;
    height: 150px;
    border-radius: 10px;
    margin: 0 auto;
    box-shadow: 0 1px 7px #dedede;
  }
  .modal-header h3 {
    font-size: 1.13rem;
  }
  .modal-date {
    font-size: .92rem;
  }
  .close-btn {
    top: 12px;
    right: 12px;
    font-size: 1.25rem;
  }
  .pdf-button {
    font-size: .96rem;
    padding: .22rem .8rem;
    border-radius: 6px;
    margin: 0 auto;
  }
  .pdf-link {
    text-align: center;
    margin-top: 1.1rem;
  }
}

/* =========================
Footer 就這個色吧！
   ========================= */

.footer {
  background: #23223b;
  color: #fff;
  text-align: center;
  font-size: .98rem;
  padding: 1.2rem 0 .8rem 0;
  border-radius: 1.2rem 1.2rem 0 0;
  margin-top: 3rem;
  letter-spacing: .03em;
}

/* =========================
 NAVBAR 跟 hero 的區域部分哈哈哈哈哈哈
   ========================= */

.navbar {
  width: 100vw;
  background: #fff;
  color: #23223b;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  height: 64px;
  box-shadow: 0 3px 16px 0 rgba(60,60,90,0.08);
  border-bottom: 2px solid #f2f2f2;
  position: sticky;
  top: 0;
  left: 0;
  z-index: 100;
  backdrop-filter: blur(6px);
  transition: background .19s;
}
.nav-brand {
  display: flex;
  align-items: center;
  font-size: 1.4rem;
  color: #364057;
  letter-spacing: 0.5px;
  padding: 0 12px;
  user-select: none;
}
.nav-list {
  display: flex;
  gap: 18px;
  align-items: center;
  margin: 0 8px 0 0;
}
.nav-list a {
  color: #313144;
  font-size: 1.08rem;
  padding: 8px 26px;
  border-radius: 0;
  border: 2px solid transparent;
  background: transparent;
  transition: background .15s, color .15s, border .15s;
  position: relative;
  letter-spacing: 0.01em;
  outline: none;
  box-shadow: none;
  border-bottom: 2.5px solid transparent;
}
.nav-list a.active,
.nav-list a:focus,
.nav-list a:hover {
  background: #f2f4fa;
  color: #4563c7;
  border-bottom: 2.5px solid #7986ae;
  border-radius: 0;
}
.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 14px;
}
.nav-lang-flag {
  width: 24px;
  height: 18px;
  border-radius: 2.5px;
  object-fit: cover;
  box-shadow: 0 0 2px #bbb;
  display: inline-block;
  border: 1px solid #dde3f4;
  background: #fff;
  margin-left: 8px;
  max-width: 100%;
}
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  width: 35px;
  height: 35px;
  cursor: pointer;
  margin-left: 10px;
  border-radius: 6px;
  border: none;
  background: none;
  transition: background .16s;
}
.nav-hamburger span {
  height: 3.5px;
  background: #364057;
  margin: 5px 0;
  width: 100%;
  border-radius: 2px;
  transition: all .23s;
}
.nav-hamburger:active,
.nav-hamburger:focus {
  background: #e3e7fa;
  outline: none;
}
@media (max-width: 900px) {
  .navbar {
    padding: 0 0px;
    height: auto;
  }
  .nav-brand {
    font-size: 1.18rem;
    padding: 0 10px;
  }
  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: #fff;
    width: 100vw;
    display: none;
    box-shadow: 0 10px 28px #b0b4c722;
    z-index: 101;
    border-radius: 0 0 10px 10px;
    border-bottom: 2px solid #e8e8f3;
    animation: navSlideIn .28s;
  }
  @keyframes navSlideIn {
    from {
      opacity: 0;
      transform: translateY(-18px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  .nav-list.open {
    display: flex;
  }
  .nav-list a {
    border-radius: 0;
    padding: 1.2rem 2rem;
    font-size: 1.06rem;
    border-bottom: 1px solid #f0f2f6;
    width: 100%;
    text-align: left;
  }
  .nav-actions {
    margin: 6px 0;
  }
  .nav-hamburger {
    display: flex;
  }
}
@media (max-width: 500px) {
  .nav-brand {
    font-size: 1.01rem;
  }
  .nav-lang-flag {
    width: 22px;
    height: 16px;
  }
  .navbar {
    padding-left: 0;
    padding-right: 0;
  }
}
.hero {
  background: #f9f7f4;
  color: #232323;
  padding: 3.5rem 0 1.2rem 0;
  text-align: left;
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: flex-start;
}
.hero-content {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  margin-left: 0;
  padding-left: 1.7rem;
}
.hero-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.hero .avatar {
  width: 110px;
  height:110px;
  border-radius: 50%;
  border: 4px solid #fff;
  object-fit: cover;
  background: #fff;
  margin-bottom: 1.3rem;
  margin-top: 1.5rem;
  box-shadow: 0 2px 18px #d1cfd1;
  display: block;
}
.hero-center {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  margin-left: 2rem;
  min-width: 250px;
  flex: 1;
}
.hero-title.typewriter {
  font-size: 3.6rem;
  letter-spacing: 1px;
  margin-bottom: 1.3rem;
  color: #364057;
  white-space: nowrap;
  overflow: hidden;
  border-right: .12em solid #4563c7;
  width: 0;
  animation: typing 2s steps(12, end) 0.2s forwards, blink-caret .7s step-end infinite;
  text-align: left;
}
@keyframes typing {
  from { width: 0 }
  to { width: 10em }
}
@keyframes blink-caret {
  0%, 100% { border-color: transparent; }
  30% { border-color: #4563c7; }
}
.hero-desc {
  font-size: 2rem;
  color: #6a6a6a;
  margin-bottom: 2.5rem;
  line-height: 1.4;
  text-align: left;
}
.hero .socials {
  margin-top: 1.5rem;
  display: flex;
  gap: 1.2rem;
  justify-content: flex-start;
  padding-left: 0;
}
.hero .socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e7e7e7;
  color: #232323;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  font-size: 1.3rem;
  transition: background .2s, color .2s;
}
.hero .socials a:hover {
  background: #bdbdbd;
  color: #fff;
}
.hero .email-btn {
  color: #fff;
  background: #4563c7;
  border-radius: 8px;
  padding: .4rem 1.2rem;
  font-size: 1rem;
  display: inline-block;
  margin-top: 1.4rem;
  box-shadow: 0 2px 6px #b2b6e2;
  transition: background .16s;
}
.hero .email-btn:hover {
  background: #364057;
}
.hero-right {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  margin-left: 2.2rem;
  min-width: 220px;
  max-width: 330px;
}
.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-bottom: 7px;
  align-items: center;
  margin-top: 10px;
}
.hero-cert-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  align-items: center;
}
@media (max-width: 900px) {
  .hero {
    flex-direction: column;
    text-align: center;
    align-items: center;
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
  }
  .hero-content {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-left: 0;
  }
  .hero-left, .hero-center, .hero-right {
    align-items: center;
    justify-content: center;
    margin-left: 0;
    min-width: unset;
    max-width: unset;
    width: 100%;
  }
  .hero-title.typewriter, .hero-desc {
    text-align: center !important;
    margin-left: 0;
    margin-right: 0;
  }
  .hero-desc {
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
  }
  .hero-badges, .hero-cert-badges {
    justify-content: center;
    margin-left: 0;
  }
  .hero .avatar {
    margin-top: 0.7rem;
    margin-bottom: 1.1rem;
  }
  .hero .socials {
    justify-content: center;
    padding-left: 0;
  }
  .hero .email-btn {
    margin-left: 0;
  }
}
@media (max-width: 700px) {
  .hero-title.typewriter { font-size: 2.1rem; }
  .hero-desc { font-size: 1.12rem; }
}