/* ====== 品牌設定（依 design.md）：只用這四色 ====== */
:root {
  --yellow: #FFE512;
  --light-grey: #ebebec;
  --dark-grey: #595959;
  --white: #FFFFFF;

  --radius: 12px;
  --max: 1080px;
  --font: "Lato", "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--white);
  color: var(--dark-grey);
  font-family: var(--font);
  font-weight: 400;
  line-height: 1.8;
  font-size: 17px;
}
h1, h2, h3, strong { font-weight: 700; }
img { max-width: 100%; display: block; }
a {
  color: var(--dark-grey);
  text-decoration: underline;
  text-decoration-color: var(--yellow);
  text-decoration-thickness: 3px;
  text-underline-offset: 4px;
}
.container { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* ====== 頁首 ====== */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: var(--white);
  border-bottom: 1px solid var(--light-grey);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px; gap: 16px;
}
.logo { font-weight: 700; font-size: 18px; text-decoration: none; display: flex; align-items: center; gap: 10px; }
.logo::before { content: ""; width: 14px; height: 14px; border-radius: 4px; background: var(--yellow); flex: none; }
.logo small { display: block; font-weight: 400; font-size: 12px; line-height: 1.2; }
.nav { display: flex; gap: 24px; }
.nav a { text-decoration: none; font-size: 15px; padding: 4px 0; border-bottom: 3px solid transparent; white-space: nowrap; }
.logo { white-space: nowrap; }
.nav a:hover { border-bottom-color: var(--yellow); }
.nav { align-items: center; }
/* 語言下拉選單 */
.lang-menu { position: relative; }
.lang-menu summary {
  list-style: none; cursor: pointer; user-select: none;
  display: flex; align-items: center; gap: 10px;
  padding: 6px 12px; min-width: 84px; justify-content: space-between;
  border: 1px solid var(--dark-grey); border-radius: var(--radius);
  background: var(--white); font-size: 14px; font-weight: 700; line-height: 1.4;
}
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu summary:hover { border-color: var(--yellow); background: var(--yellow); }
.lang-menu summary svg { width: 12px; height: 12px; flex: none; transition: transform .15s; }
.lang-menu[open] summary svg { transform: rotate(180deg); }
.lang-menu ul {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 20;
  margin: 0; padding: 6px; list-style: none; min-width: 150px;
  background: var(--white); border: 1px solid var(--light-grey); border-radius: var(--radius);
}
.nav .lang-menu a { display: block; padding: 8px 12px; border: 0; border-radius: 8px; font-size: 14px; }
.nav .lang-menu a:hover { background: var(--light-grey); }
.nav .lang-menu a[aria-current="page"] { background: var(--yellow); font-weight: 700; }

/* 簡體頁面用簡體字形 */
html:lang(zh-Hans) body { font-family: "Lato", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif; }

/* ====== 首頁大橫幅 ====== */
.hero {
  min-height: 68vh;
  display: grid; place-items: center;
  text-align: center;
  background: var(--light-grey);
  /* 想換成照片：把 hero.jpg 放進資料夾，取消下一行註解（文字會改白色） */
  /* background: url("hero.jpg") center/cover; color: var(--white); */
  padding: 96px 20px;
}
.hero h1 {
  font-size: clamp(30px, 5vw, 50px);
  line-height: 1.35; margin: 0 0 20px;
}
.hero h1 .mark { box-shadow: inset 0 -0.4em 0 var(--yellow); } /* 螢光筆底線（純色） */
.hero p { font-size: clamp(16px, 2.2vw, 19px); margin: 0 auto 36px; max-width: 620px; }

.btn {
  display: inline-block; padding: 13px 30px; border-radius: var(--radius);
  background: var(--yellow); color: var(--dark-grey);
  font-weight: 700; text-decoration: none;
  border: 2px solid var(--yellow);
  transition: background .15s, color .15s;
}
.btn:hover { background: var(--dark-grey); border-color: var(--dark-grey); color: var(--yellow); }
.btn.solid { background: var(--yellow); }

/* ====== 區塊 ====== */
section { padding: 96px 0; }
.section-title { font-size: clamp(24px, 3.5vw, 32px); text-align: center; margin: 0 0 12px; }
.section-title::after {
  content: ""; display: block; width: 40px; height: 4px; border-radius: 2px;
  background: var(--yellow); margin: 14px auto 0;
}
.section-sub { text-align: center; margin: 0 auto 52px; max-width: 620px; }

/* 關於我 */
.about { display: grid; grid-template-columns: 280px 1fr; gap: 64px; align-items: center; }
.avatar {
  width: 280px; height: 280px; border-radius: var(--radius);
  background: var(--light-grey); object-fit: cover;
  display: grid; place-items: center; font-size: 14px;
}
.about h3 { font-size: 26px; margin: 0 0 8px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; padding: 0; list-style: none; }
.tags li { background: var(--yellow); padding: 3px 14px; border-radius: var(--radius); font-size: 14px; font-weight: 700; }

/* 文章卡片 */
.alt { background: var(--light-grey); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.card {
  background: var(--white); border: 2px solid var(--white); border-radius: var(--radius);
  padding: 30px; text-decoration: none;
  display: flex; flex-direction: column; gap: 10px;
  transition: border-color .15s;
}
.card:hover { border-color: var(--yellow); }
.card .meta { font-size: 13px; font-weight: 700; letter-spacing: .05em; }
.card .meta::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 2px; background: var(--yellow); margin-right: 8px; vertical-align: middle; }
.card h3 { margin: 0; font-size: 20px; line-height: 1.5; }
.card p { margin: 0; font-size: 15px; }
.card .more { margin-top: auto; font-size: 14px; font-weight: 700; }

/* 讀者回饋 */
.quotes { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.quote { background: var(--white); border-radius: var(--radius); padding: 28px; border: 1px solid var(--light-grey); border-top: 4px solid var(--yellow); }
.quote p { margin: 0 0 12px; }
.quote cite { font-style: normal; font-size: 14px; font-weight: 700; }

/* 聯絡 */
.contact { text-align: center; }
.socials { display: flex; justify-content: center; gap: 20px; margin-top: 28px; flex-wrap: wrap; }

/* 頁尾 */
.site-footer { text-align: center; font-size: 14px; padding: 32px 0; background: var(--dark-grey); color: var(--white); }

/* ====== 文章頁 ====== */
.article { max-width: 720px; margin: 0 auto; padding: 56px 20px 96px; }
.article .back { font-size: 14px; }
.article h1 { font-size: clamp(28px, 4.5vw, 38px); line-height: 1.4; margin: 20px 0 8px; }
.article .meta { font-size: 14px; margin-bottom: 36px; }
.article h2 { font-size: 24px; margin: 52px 0 12px; padding-left: 14px; border-left: 5px solid var(--yellow); line-height: 1.4; }
.callout {
  background: var(--light-grey); border-left: 5px solid var(--yellow);
  padding: 18px 22px; border-radius: var(--radius); margin: 28px 0;
}
.overview { background: var(--light-grey); border-radius: var(--radius); padding: 22px 28px; }
.overview ol { margin: 8px 0 0; padding-left: 22px; }

/* 表格 */
.table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 16px 0; }
.table th, .table td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--light-grey); }
.table th { background: var(--light-grey); }
.table td:first-child { font-weight: 700; min-width: 6em; }
.disclaimer { font-size: 14px; border-top: 1px solid var(--light-grey); padding-top: 16px; margin-top: 40px; }

/* 流程步驟 */
.steps { list-style: none; padding: 0; margin: 32px 0; counter-reset: step; }
.steps > li { position: relative; padding: 0 0 36px 64px; counter-increment: step; }
.steps > li::before {
  content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 42px; height: 42px; border-radius: var(--radius);
  background: var(--yellow); color: var(--dark-grey); font-weight: 700;
  display: grid; place-items: center;
}
.steps > li::after {
  content: ""; position: absolute; left: 20px; top: 48px; bottom: 6px;
  width: 2px; background: var(--light-grey);
}
.steps > li:last-child::after { display: none; }
.steps h3 { margin: 6px 0 6px; font-size: 20px; }
.steps .time { display: inline-block; font-size: 13px; font-weight: 700; background: var(--light-grey); padding: 2px 12px; border-radius: var(--radius); margin-bottom: 6px; }

/* ====== 手機版 ====== */
@media (max-width: 760px) {
  .nav { gap: 12px; }
  .nav a { font-size: 14px; }
  .logo small { display: none; }
}

/* 手機：頁首改兩行（第一行名字＋語言切換，第二行選單） */
@media (max-width: 560px) {
  .site-header .container { flex-wrap: wrap; height: auto; padding-top: 12px; padding-bottom: 6px; row-gap: 2px; position: relative; }
  .nav { width: 100%; gap: 20px; }
  .lang-menu { position: absolute; right: 20px; top: 10px; }
  .about { grid-template-columns: 1fr; text-align: center; gap: 28px; }
  .avatar { width: 200px; height: 200px; margin: 0 auto; }
  .tags { justify-content: center; }  section { padding: 64px 0; }
}
