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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: Arial, "Noto Sans TC", sans-serif;
  color: #333;
  background: #fff;
  line-height: 1.7;
  letter-spacing: 0.04rem;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.text-green{
  color: #6aa84f;
}

.text-orange{
  color: #e69138;
}

.text-gray{
  color: #666;
}

/* =========================
   Layout
========================= */
.container {
  width: min(1200px, calc(100% - 48px));
  margin: 0 auto;
}

.site-main {
  padding-top: 60px;
}

.section {
  padding: 56px 0;
  border-bottom: 1px solid #dddddd;
}

/* =========================
   Header / Nav
========================= */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.8);
}

@media (max-width: 640px) {
  .site-header {
    border-bottom: 1px solid #dddddd;
  }
}

.site-nav {
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 28px;
}

.site-nav a {
  color: #666;
  font-size: 15px;
  letter-spacing: 0.04em;
  transition: color 0.25s ease;
}

.site-nav a:hover,
.site-nav a.is-active {
  color: #000;
  font-weight: 800;
}

/* =========================
   Typography
========================= */
.page-heading {
  padding: 48px 0;
}

.page-heading--center {
  text-align: center;
}

.page-heading__title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #222;
}

.page-heading__title--articles {
  font-size: 28px;
  letter-spacing: 0.06em;
}

.section-title {
  font-size: 20px;
  margin-bottom: 16px;
}

/* =========================
   Grid System
========================= */
.grid {
  display: grid;
  gap: 60px;
}

.grid--3 .col {
  flex: 1;
}

.col {
  flex: 1;
}

/* =========================
   Home / Profile
========================= */
.profile .grid{
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.about-page .profile .grid{
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.profile-info{
  grid-column: span 2 / span 2;
}

.about-page .profile-image{
  grid-column: span 1 / span 1;
}

.about-page .profile-info{
  grid-column: span 3 / span 3;
  margin: auto;
}

.profile-image{
  grid-column: span 1 / span 1;
}

.profile-name {
  font-size: 2rem;
}

.profile-role {
  display: flex;
  gap: 12px;
  font-size: 18px;
  font-weight: 600;
}

.profile-desc {
  line-height: 1.6;
  margin: 24px 0 20px 0;
}

.profile-desc span{
  display: block;
  margin-top: 12px;
}

.profile-contact {
  font-size: 15px;
}

.profile-image img {
  width: 100%;
  margin-left: auto;
  object-fit: cover;
}

.profile-intro .grid,
.course .grid{
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.profile-intro .left-col,
.profile-intro .right-col,
.course .left-col,
.course .right-col{
  grid-column: span 1 / span 1;
}

.profile-intro .right-col{
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.about-page .profile-intro .left-col{
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.profile-intro .right-col{
  gap: 0;
}

.criticism ul{
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 15px;
}

.profile-intro ul,
.course ul{
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 15px;
}

.profile-intro ul a,
.criticism ul a {
  color: #005A78;
  text-decoration: underline;
  transition: color 0.2s ease;
}

.profile-intro ul a:hover,
.criticism ul a:hover{
  color: #000;
}

.criticism ul span{
  color: #666;
  font-size: 14px;
  display: block;
  line-height: 1.5;
}

.profile-intro ul span,
.course ul span{
  color: #999;
  font-size: 14px;
  display: inline;
  line-height: 1.5;
  margin-left: 12px;
}

.criticism .grid{
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.criticism .col{
  grid-column: span 1 / span 1;
}

.external .container{
  display: flex;
  gap: 36px;
}

.external a{
  background-color: #3a7ca5;
  border: 1px solid #3a7ca5;
  color: rgba(255, 255, 255, 1);
  font-size: 14px;
  padding: 12px 48px;
  border-radius: 4px;
  transition: color 0.2s ease;
}

.external a:hover{
  background-color: white;
  color: #3a7ca5;
}

@media (max-width: 900px) {
  .profile-info,
  .profile-image{
    grid-column: span 3 / span 3;
  }
  .about-page .profile-info,
  .about-page .profile-image{
    grid-column: span 4 / span 4;
  }
  .profile-intro .left-col,
  .profile-intro .right-col,
  .course .left-col,
  .course .right-col{
    grid-column: span 2 / span 2;
  }
  .criticism .col{
    grid-column: span 3 / span 3;
  }
  .about-page .profile-intro .left-col {
    gap: 60px;
  }
}

@media (max-width: 640px) {
  .course ul span{
    display: block;
    margin-left: 0;
  }
  .external .container{
    flex-direction: column;
    gap: 28px;
  }
}

/* =========================
   List
========================= */
.list {
  list-style: none;
  margin-top: 10px;
}

.list--linked a {
  color: #2f6e93;
  transition: color 0.2s ease;
}

.list--linked a:hover {
  color: #1f5675;
}

/* =========================
   Button
========================= */
.btn {
  display: inline-block;
  margin-top: 24px;
  padding: 10px 18px;
  border: 1px solid #3a7ca5;
  background: transparent;
  color: #3a7ca5;
  cursor: pointer;
  transition: all 0.25s ease;
  width: 100%;
  font-size: 14px;
  text-align: center;
  border-radius: 4px;
}

.btn:hover {
  background: #3a7ca5;
  color: #fff;
}

/* =========================
   About
========================= */
.section--intro {
  padding-top: 40px;
}

.about-intro {
  max-width: 880px;
}

.about-intro__name {
  font-size: 42px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #222;
  margin-bottom: 10px;
}

.about-intro__meta {
  color: #6a9d3b;
  font-size: 16px;
  margin-bottom: 24px;
}

.about-intro__text p + p {
  margin-top: 16px;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.about-card {
  background: #ffffff;
  border: 1px solid #e3e3e3;
  padding: 28px;
}

.about-card__title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 14px;
  color: #222;
}

.about-list {
  list-style: none;
}

.about-list li + li {
  margin-top: 10px;
}

/* =========================
   Articles
========================= */
.article-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px 24px;
}

.article-card {
  background: #ffffff;
  border: 1px solid #e5e5e5;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.06);
}

.article-card__media {
  aspect-ratio: 16 / 9;
  background: #ddd;
  overflow: hidden;
}

.article-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-card__media--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #ececec, #dcdcdc);
  color: #666;
  font-size: 13px;
  letter-spacing: 0.08em;
}

.article-card__body {
  padding: 20px;
}

.article-card__meta {
  font-size: 13px;
  color: #6f6f6f;
  margin-bottom: 10px;
}

.article-card__title {
  font-size: 22px;
  line-height: 1.4;
  margin-bottom: 10px;
  color: #222;
}

.article-card__title a {
  transition: color 0.2s ease;
}

.article-card__title a:hover {
  color: #2f6e93;
}

.article-card__excerpt {
  color: #555;
  font-size: 15px;
  line-height: 1.8;
}

/* =========================
   Footer
========================= */
.site-footer {
  padding: 32px 20px;
  text-align: center;
  color: #666;
  font-size: 14px;
}

@media (max-width: 900px) {
  .grid {
    flex-direction: column;
  }

  .about-grid,
  .article-list {
    grid-template-columns: 1fr;
  }

  .profile-image img {
    margin-left: 0;
  }
  .btn{
    width: fit-content;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(100%, calc(100% - 40px));
  }

  .nav-right {
    gap: 18px;
  }

  .site-nav a {
    font-size: 13px;
  }

  .page-heading {
    padding: 36px 0 20px;
  }

  .page-heading__title--articles {
    font-size: 22px;
  }

  .about-intro__name {
    font-size: 32px;
  }

  .section {
    padding: 40px 0;
  }

  .about-card,
  .article-card__body {
    padding: 22px;
  }

  .section-title {
    font-size: 22px;
  }

  .article-card__title {
    font-size: 20px;
  }
  .btn{
    width: 100%;
  }
}

.articles .page-heading h1{
  margin-bottom: 16px;
}

.articles .page-heading h2{
  font-size: 15px;
  font-weight: 500;
  line-height: 1.8;
  font-size: 15px;
  margin-bottom: 2px;
}

.articles .page-heading h2 span{
  background-color: #666;
  color: #fff;
  padding: 4px 8px;
  margin-right: 8px;
}

.articles .page-heading a:hover{
 text-decoration: underline;
}

.articles-wrap a{
  color: #005A78;
  text-decoration: underline;
}

.articles-wrap .list-title{
  margin-bottom: 16px;
  font-size: 20px;
}

.articles-wrap a:hover{
  color: #000;
}

.articles-wrap .grid{
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  width: 100%;
}

.articles-wrap .grid .left-col{
  grid-column: span 3 / span 3;
}

.articles-wrap .grid .right-col{
  grid-column: span 2 / span 2;
}

@media (max-width: 900px) {
  .articles-wrap .grid .left-col,
  .articles-wrap .grid .right-col{
    grid-column: span 5 / span 5;
  }
}

.articles-wrap{
  font-size: 15px;
}

.articles-wrap .col{
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.articles-wrap ul{
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.articles-wrap ul span{
  color: #333;
  font-size: 15px;
}