/* ─────────────────────────────────────────────────────────────
   設計系統 — 所有視覺都由這裡的 token 控制。
   拿到原站素材後，主要只需要調整 :root 這一段的變數。
   ───────────────────────────────────────────────────────────── */

:root {
  color-scheme: light dark;

  /* 色彩 —— 淺色模式 */
  --bg:            #ffffff;
  --bg-subtle:     #edeff5;
  --bg-inset:      #e1e6f0;
  --text:          #131a2b;
  --text-muted:    #5a6478;
  --border:        #dce1ed;
  /* 整套配色由原站的三個色推導：紅 #df3143、灰藍 #edeff5、深藍 #2e4975。
     中性色帶一點藍調，跟深藍帶是同一個色系，不會像另外拼上去的。 */
  --accent:        #df3143;
  --accent-hover:  #b3212f;
  --accent-text:   #ffffff;
  --accent-wash:   #fdeef0;
  --accent-line:   #f4d3d8;
  --invert-bg:     #2e4975;
  --invert-text:   #ffffff;
  --invert-muted:  #c6d2e6;
  --invert-line:   #47608c;
  /* 品牌標誌帶永遠白底：深色去背的標誌在深色模式會整個消失 */
  --brand-band:    #ffffff;
  --brand-text:    #131a2b;
  --brand-muted:   #5a6478;

  /* 字體 */
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto,
               "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  --font-display: var(--font-sans);

  /* 間距尺度 */
  --space-1: 4px;   --space-2: 8px;   --space-3: 12px;  --space-4: 16px;
  --space-5: 24px;  --space-6: 32px;  --space-7: 48px;  --space-8: 64px;
  --space-9: 96px;  --space-10: 128px;

  --radius:    10px;
  --radius-lg: 16px;
  --container: 1120px;
  --measure:   68ch;

  --shadow: 0 1px 2px rgb(0 0 0 / .04), 0 8px 24px -12px rgb(0 0 0 / .12);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:            #0e1420;
    --bg-subtle:     #161d2c;
    --bg-inset:      #1e2739;
    --text:          #e9edf5;
    --text-muted:    #a2abbf;
    --border:        #28324a;
    --accent:        #ff6b78;
    --accent-hover:  #ff8f99;
    --accent-text:   #0e1420;
    --accent-wash:   #24151a;
    --accent-line:   #3d232b;
    --invert-bg:     #1d2f4d;
    --invert-text:   #ffffff;
    --invert-muted:  #c6d2e6;
    --invert-line:   #35496e;
    --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 8px 24px -12px rgb(0 0 0 / .6);
  }
}

/* ── 基礎 ───────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img, video { max-width: 100%; height: auto; display: block; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.25;
  letter-spacing: -0.015em;
  margin: 0 0 var(--space-4);
  text-wrap: balance;
}
h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.125rem); }
h3 { font-size: clamp(1.125rem, 1.05rem + .5vw, 1.375rem); }
p  { margin: 0 0 var(--space-4); }
p:last-child { margin-bottom: 0; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.skip-link {
  position: absolute; left: -9999px; top: var(--space-3);
  background: var(--accent); color: var(--accent-text);
  padding: var(--space-2) var(--space-4); border-radius: var(--radius); z-index: 100;
}
.skip-link:focus { left: var(--space-3); }

/* ── 版面 ───────────────────────────────────────────────────── */

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--space-5); }

.section { padding-block: var(--space-8); }
@media (min-width: 768px) { .section { padding-block: var(--space-9); } }
.section--tight  { padding-block: var(--space-7); }
.section--subtle { background: var(--bg-subtle); }

/* 強調帶：用主色極淡的底 */
.section--accent {
  background: var(--accent-wash);
  border-block: 1px solid var(--accent-line);
}

/* 品牌帶：不論淺色深色都維持白底，因為標誌是深色去背圖 */
.section--brand {
  background: var(--brand-band);
  --bg: var(--brand-band);
  --text: var(--brand-text);
  --text-muted: var(--brand-muted);
  color: var(--brand-text);
}

/* 反白區塊（原站的聯絡區是深藍底白字）。在區塊內重新定義色票，
   裡面的元件不必知道自己被放在深色底上，照常用 var() 就對了。 */
.section--invert {
  background: var(--invert-bg);
  --text: var(--invert-text);
  --text-muted: var(--invert-muted);
  --border: var(--invert-line);
  --bg: var(--invert-bg);
  color: var(--invert-text);
}
.section--invert .contact-list__label { color: var(--invert-muted); }
.section--invert a { color: #fff; text-decoration-color: rgb(255 255 255 / .5); }
.section--invert a:hover { color: #fff; text-decoration-color: #fff; }

.prose { max-width: var(--measure); }
.prose--center { margin-inline: auto; text-align: center; }

.eyebrow {
  font-size: .8125rem; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: var(--text-muted); margin: 0 0 var(--space-3);
}
.lead { font-size: clamp(1.0625rem, 1rem + .35vw, 1.25rem); color: var(--text-muted); }

/* ── 按鈕 ───────────────────────────────────────────────────── */

.actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-6); }
.prose--center .actions { justify-content: center; }

.btn {
  display: inline-flex; align-items: center; gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius); border: 1px solid transparent;
  font-size: .9375rem; font-weight: 600; text-decoration: none;
  transition: background-color .15s, border-color .15s, color .15s;
}
.btn--primary   { background: var(--accent); color: var(--accent-text); }
.btn--primary:hover { background: var(--accent-hover); color: var(--accent-text); }
.btn--secondary { border-color: var(--border); color: var(--text); background: transparent; }
.btn--secondary:hover { border-color: var(--accent); color: var(--accent); background: transparent; }

/* ── 頁首 ───────────────────────────────────────────────────── */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-5); min-height: 64px;
}
.site-brand {
  font-weight: 700; font-size: 1.0625rem; letter-spacing: -0.01em;
  color: var(--text); text-decoration: none;
}
.site-brand img { max-height: 36px; width: auto; }

.site-nav ul { display: flex; gap: var(--space-5); list-style: none; margin: 0; padding: 0; }
.site-nav a {
  color: var(--text-muted); text-decoration: none; font-size: .9375rem; font-weight: 500;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--text); }

/* 手機版選單：純 CSS，不需要 JavaScript */
.nav-toggle { display: none; }
.nav-toggle__label {
  display: none; cursor: pointer; padding: var(--space-2);
  color: var(--text); border: 1px solid var(--border); border-radius: var(--radius);
  line-height: 1;
}
@media (max-width: 719px) {
  .nav-toggle__label { display: inline-flex; }
  .site-nav {
    display: none; position: absolute; inset-inline: 0; top: 100%;
    background: var(--bg); border-bottom: 1px solid var(--border); padding: var(--space-4) var(--space-5);
  }
  .nav-toggle:checked ~ .site-nav { display: block; }
  .site-nav ul { flex-direction: column; gap: var(--space-4); }
  .site-header__inner { position: relative; }
}

/* ── 區塊：hero ─────────────────────────────────────────────── */

.hero { padding-block: var(--space-9); }
@media (min-width: 768px) { .hero { padding-block: var(--space-10); } }
.hero--with-image .hero__grid {
  display: grid; gap: var(--space-7); align-items: center;
}
@media (min-width: 900px) {
  .hero--with-image .hero__grid { grid-template-columns: 1.1fr 1fr; gap: var(--space-8); }
}
.hero__media img { border-radius: var(--radius-lg); box-shadow: var(--shadow); width: 100%; }

/* ── 區塊：圖文並排 ─────────────────────────────────────────── */

.split__grid { display: grid; gap: var(--space-6); align-items: center; }
@media (min-width: 900px) {
  .split__grid { grid-template-columns: 1fr 1fr; gap: var(--space-8); }
  .split--media-right .split__media { order: 2; }
}
.split__media img { border-radius: var(--radius-lg); box-shadow: var(--shadow); width: 100%; }

/* ── 區塊：卡片 ─────────────────────────────────────────────── */

.cards {
  display: grid; gap: var(--space-5); margin-top: var(--space-6);
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
}
.card {
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: var(--space-5); display: flex; flex-direction: column; gap: var(--space-2);
  transition: border-color .15s, transform .15s;
}
a.card { text-decoration: none; color: inherit; }
a.card:hover { border-color: var(--accent); transform: translateY(-2px); }
.card img { border-radius: var(--radius); margin-bottom: var(--space-2); aspect-ratio: 16/10; object-fit: cover; width: 100%; }
.card h3 { margin: 0; }
.card p  { color: var(--text-muted); font-size: .9375rem; margin: 0; }

/* ── 區塊：圖庫 ─────────────────────────────────────────────── */

.gallery {
  display: grid; gap: var(--space-4); margin-top: var(--space-6);
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
}
.gallery figure { margin: 0; }
.gallery img { border-radius: var(--radius); width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.gallery figcaption { color: var(--text-muted); font-size: .875rem; margin-top: var(--space-2); }

/* ── 區塊：聯絡資訊 ─────────────────────────────────────────── */

.contact-list { list-style: none; margin: var(--space-6) 0 0; padding: 0; display: grid; gap: var(--space-4); }
@media (min-width: 700px) { .contact-list { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); } }
.contact-list dt, .contact-list__label {
  font-size: .8125rem; font-weight: 600; letter-spacing: .04em;
  color: var(--text-muted); margin-bottom: var(--space-1);
}
.contact-list__value { font-size: 1.0625rem; }

/* ── 頁尾 ───────────────────────────────────────────────────── */

.site-footer {
  border-top: 1px solid var(--border); background: var(--bg-subtle);
  padding-block: var(--space-7); margin-top: var(--space-8);
  color: var(--text-muted); font-size: .9375rem;
}
.site-footer__inner { display: flex; flex-wrap: wrap; gap: var(--space-5); justify-content: space-between; align-items: center; }
.site-footer a { color: var(--text-muted); }
.site-footer a:hover { color: var(--accent); }
.social { display: flex; gap: var(--space-4); list-style: none; margin: 0; padding: 0; }

/* ── 時間軸 ─────────────────────────────────────────────────
   單一時間序，左右自動交錯。手機版收成單欄靠左，中線移到最左邊。
   ───────────────────────────────────────────────────────── */

.timeline {
  list-style: none; margin: var(--space-7) 0 0; padding: 0;
  position: relative; display: grid; gap: var(--space-5);
}

/* 中軸線 */
.timeline::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: 11px;
  width: 2px; background: var(--border); border-radius: 1px;
}

.timeline__item { position: relative; padding-left: 40px; }

.timeline__marker {
  position: absolute; left: 4px; top: 6px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--bg); border: 3px solid var(--accent);
}
.timeline__item--highlight .timeline__marker { background: var(--accent); }

.timeline__date {
  font-size: .8125rem; font-weight: 700; letter-spacing: .06em;
  color: var(--accent); margin: 0 0 var(--space-1);
  font-variant-numeric: tabular-nums;
}
.timeline__title { font-size: 1.0625rem; margin: 0; line-height: 1.45; }
.timeline__list {
  margin: var(--space-2) 0 0; padding-left: 1.15em;
  color: var(--text-muted); font-size: .9375rem;
}
.timeline__list li { margin: var(--space-1) 0; }

@media (min-width: 820px) {
  .timeline { gap: 0; }
  .timeline::before { left: 50%; transform: translateX(-50%); }
  .timeline__item {
    width: 50%; padding-left: 0; padding-block: var(--space-3);
  }
  /* 交錯：奇數項靠左、偶數項靠右 */
  .timeline__item[data-side="left"]  { padding-right: 36px; text-align: right; }
  .timeline__item[data-side="right"] { margin-left: 50%; padding-left: 36px; }

  .timeline__item[data-side="left"] .timeline__marker  { left: auto; right: -8px; }
  .timeline__item[data-side="right"] .timeline__marker { left: -8px; }
  .timeline__item[data-side="left"] .timeline__list {
    padding-left: 0; padding-right: 1.15em; list-style-position: inside;
  }
}

/* 年份篩選 */
.timeline-filter {
  display: flex; flex-wrap: wrap; gap: var(--space-2);
  margin-top: var(--space-5); justify-content: center;
}
.timeline-filter button {
  appearance: none; cursor: pointer; font: inherit; font-size: .875rem;
  padding: 5px 14px; border-radius: 999px;
  border: 1px solid var(--border); background: transparent; color: var(--text-muted);
  transition: color .15s, border-color .15s;
}
.timeline-filter button:hover { color: var(--text); border-color: var(--accent); }
.timeline-filter button[aria-pressed="true"] {
  color: var(--accent-text); background: var(--accent); border-color: var(--accent); font-weight: 600;
}
.timeline-filter button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.timeline__note { text-align: center; color: var(--text-muted); font-size: .875rem; margin-top: var(--space-5); }

/* ── 圖示牆 ─────────────────────────────────────────────── */

.icon-grid {
  display: grid; gap: var(--space-5); margin-top: var(--space-6);
  grid-template-columns: repeat(auto-fit, minmax(104px, 1fr));
}
.icon-grid__item {
  display: flex; flex-direction: column; align-items: center; gap: var(--space-2);
  text-align: center;
}
.icon-grid__badge {
  display: grid; place-items: center; width: 62px; height: 62px;
  border-radius: 16px; background: var(--bg-inset); color: var(--accent);
  transition: background-color .18s, color .18s, transform .18s;
}
.icon-grid__item:hover .icon-grid__badge {
  background: var(--accent); color: var(--accent-text); transform: translateY(-3px);
}
.icon-grid__label { font-size: .875rem; color: var(--text-muted); }

/* ── 捲動淡入 ───────────────────────────────────────────── */

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .55s ease, transform .55s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* 不支援 JS 或使用者不要動畫時，直接顯示 —— 內容永遠不會因為動畫而看不到 */
.no-js .reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .icon-grid__item:hover .icon-grid__badge { transform: none; }
}

/* ── 首屏封面 ───────────────────────────────────────────────
   背景照上疊 Logo，頭像壓在下緣。姓名放在照片外，維持對比與可讀性。
   ───────────────────────────────────────────────────────── */

.cover { position: relative; }
.cover__stage { position: relative; }
.cover__bg { position: relative; height: clamp(260px, 42vw, 460px); overflow: hidden; }
.cover__bg img { width: 100%; height: 100%; object-fit: cover; object-position: center 38%; }
/* 上下漸層讓整張照片壓暗，再疊一層中央暗角 —— 背景照的中間可能是淺色
   （椅背、牆面），白色 Logo 疊上去會糊掉，暗角保證它在任何照片上都讀得到。*/
.cover__bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 46% 58% at 50% 46%, rgb(0 0 0 / .5) 0%, rgb(0 0 0 / 0) 70%),
    linear-gradient(180deg, rgb(0 0 0 / .45) 0%, rgb(0 0 0 / .25) 55%, rgb(0 0 0 / .5) 100%);
}

.cover__inner {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: var(--space-3);
  text-align: center;
}
.cover__logo img { width: clamp(190px, 30vw, 330px); height: auto; }
.cover__tagline {
  margin: 0; color: #fff; font-size: clamp(.75rem, .6rem + .5vw, .95rem);
  letter-spacing: .42em; text-indent: .42em; text-transform: uppercase;
  text-shadow: 0 1px 12px rgb(0 0 0 / .5);
}
.cover__avatar {
  position: absolute; left: 50%; transform: translateX(-50%);
  bottom: calc(-1 * clamp(52px, 8vw, 78px));
  width: clamp(104px, 16vw, 156px); aspect-ratio: 1;
}
.cover__avatar img {
  width: 100%; height: 100%; object-fit: cover; border-radius: 50%;
  border: 5px solid var(--bg); box-shadow: var(--shadow);
}
.cover__name {
  margin: calc(clamp(52px, 8vw, 78px) + var(--space-6)) 0 0;
  text-align: center; font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.125rem);
}

/* ── 自介 ───────────────────────────────────────────────── */

.profile { display: grid; gap: var(--space-6); margin-top: var(--space-5); }
@media (min-width: 860px) { .profile { grid-template-columns: 1fr 1fr; gap: var(--space-8); } }
.profile__bio { color: var(--text-muted); }
.profile__highlights, .profile__roles { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); }
.profile__highlights { font-weight: 600; margin-bottom: var(--space-5); }
.profile__roles { color: var(--text-muted); }
.profile__note { margin-top: var(--space-5); font-weight: 600; }

/* ── 品牌標誌 ───────────────────────────────────────────── */

.logos {
  list-style: none; margin: var(--space-6) 0 0; padding: 0;
  display: grid; gap: var(--space-6); align-items: center;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
.logos__item { display: flex; flex-direction: column; align-items: center; gap: var(--space-3); text-align: center; }

/* 標誌尺寸固定，一整排才會像同一組物件；用 contain 置中，
   不論原圖是寬是高都不會變形。整塊帶子永遠白底，所以不需要白色卡片。 */
.logos__item img {
  width: 100%; max-width: 210px; height: 96px;
  object-fit: contain; object-position: center;
}
.logos__label { color: var(--text-muted); font-size: .9375rem; }

/* ── 經歷 ───────────────────────────────────────────────── */

.experience {
  list-style: none; margin: var(--space-6) 0 0; padding: 0;
  display: grid; gap: var(--space-6);
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
}
.experience__item { border-left: 3px solid var(--accent); padding-left: var(--space-4); }
.experience__role { font-size: 1.0625rem; margin: 0 0 var(--space-1); }
.experience__org { margin: 0; font-size: .9375rem; }
.experience__period { margin: var(--space-1) 0 0; color: var(--text-muted); font-size: .875rem; font-variant-numeric: tabular-nums; }

/* 頁尾社群連結在窄螢幕要能換行，否則會把頁面撐出橫向捲軸 */
.site-footer__inner { flex-direction: column; text-align: center; }
@media (min-width: 640px) { .site-footer__inner { flex-direction: row; text-align: left; } }
.social { flex-wrap: wrap; justify-content: center; }

/* ── 文章頁 ─────────────────────────────────────────────────
   內文限制在易讀寬度；圖片、引用與分隔線可以突出到更寬，
   讓長文有節奏而不是一路平鋪。
   ───────────────────────────────────────────────────────── */

.post__header { padding-block: var(--space-8) var(--space-6); }
.post__head-inner { max-width: var(--measure); }
.post__back {
  display: inline-block; margin-bottom: var(--space-4);
  font-size: .9375rem; text-decoration: none; color: var(--text-muted);
}
.post__back:hover { color: var(--accent); }
.post__header h1 { margin: 0 0 var(--space-3); font-size: clamp(1.625rem, 1.3rem + 1.6vw, 2.375rem); }
.post__meta {
  margin: 0; color: var(--text-muted); font-size: .9375rem;
  display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center;
}
.post__meta span[aria-hidden] { opacity: .5; }

.post__cover { margin-bottom: var(--space-7); }
.post__cover img { width: 100%; border-radius: var(--radius-lg); box-shadow: var(--shadow); }

.post__body { max-width: var(--measure); padding-bottom: var(--space-9); }
.post__body > * { margin-block: 0 var(--space-5); }
.post__body h2 { margin-top: var(--space-8); font-size: 1.5rem; }
.post__body h3 { margin-top: var(--space-7); font-size: 1.1875rem; }
.post__body ul, .post__body ol { padding-left: 1.4em; }
.post__body li { margin-block: var(--space-2); }
.post__body figure { margin-block: var(--space-6); }
.post__body figure img { width: 100%; border-radius: var(--radius); }
.post__body figcaption {
  margin-top: var(--space-2); color: var(--text-muted);
  font-size: .875rem; text-align: center;
}
.post__body blockquote {
  margin-block: var(--space-6); padding: var(--space-4) var(--space-5);
  border-left: 3px solid var(--accent); background: var(--bg-subtle);
  border-radius: 0 var(--radius) var(--radius) 0; color: var(--text);
}
.post__body hr {
  border: 0; height: 1px; background: var(--border);
  margin-block: var(--space-7);
}
.post__body strong { font-weight: 700; }

/* 文章卡片上的日期與閱讀時間 */
.card__meta {
  margin: 0; font-size: .8125rem; color: var(--text-muted);
  font-variant-numeric: tabular-nums; letter-spacing: .02em;
}

/* ── 社群連結列 ─────────────────────────────────────────────
   圖示以主色圓框呈現，滑過翻轉成實心；名稱交給 aria-label。
   ───────────────────────────────────────────────────────── */

.social-row {
  display: flex; flex-wrap: wrap; gap: var(--space-3);
  list-style: none; margin: var(--space-5) 0 0; padding: 0;
}
.social-row a {
  display: grid; place-items: center; width: 40px; height: 40px;
  border-radius: 50%; color: var(--accent);
  border: 1px solid var(--border); background: var(--bg);
  transition: background-color .15s, color .15s, border-color .15s, transform .15s;
}
.social-row a:hover {
  background: var(--accent); color: var(--accent-text);
  border-color: var(--accent); transform: translateY(-2px);
}
.social-row a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.site-footer .social-row { margin: 0; }
@media (prefers-reduced-motion: reduce) { .social-row a:hover { transform: none; } }

/* 自介右欄最上方的社群列（對齊原站位置） */
.profile__side .social-row { margin: 0 0 var(--space-5); }
.section--invert .social-row a {
  border-color: var(--invert-line); background: transparent; color: #fff;
}
.section--invert .social-row a:hover { background: #fff; color: var(--invert-bg); }

/* ── 聯絡區（快速聯絡 + 表單並排，對齊原站）───────────────── */

.contact-grid { display: grid; gap: var(--space-7); }
@media (min-width: 900px) { .contact-grid { grid-template-columns: 1fr 1fr; gap: var(--space-8); } }
.contact-grid .contact-list { margin-top: var(--space-5); }
.contact-form h3 { margin: 0 0 var(--space-5); font-size: 1.375rem; }
.contact-form__row { display: grid; gap: var(--space-4); }
@media (min-width: 520px) { .contact-form__row { grid-template-columns: 1fr 1fr; } }

.field { display: block; margin-bottom: var(--space-4); }
.field__label {
  display: block; font-size: .8125rem; letter-spacing: .03em;
  color: var(--text-muted); margin-bottom: var(--space-1);
}
.field__input {
  width: 100%; font: inherit; color: var(--text);
  background: transparent; border: 0; border-bottom: 1px solid var(--border);
  padding: 6px 2px; border-radius: 0; transition: border-color .15s;
}
.field__input:focus { outline: none; border-bottom-color: var(--accent); }
.field__input::placeholder { color: var(--text-muted); }
textarea.field__input { resize: vertical; min-height: 96px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ── 訂閱條 ─────────────────────────────────────────────── */

.newsletter { display: grid; gap: var(--space-4); justify-items: center; text-align: center; }
.newsletter__title { margin: 0; font-size: clamp(1.125rem, 1rem + .6vw, 1.375rem); }
.newsletter__form {
  display: flex; flex-wrap: wrap; gap: var(--space-3);
  align-items: end; justify-content: center; width: min(520px, 100%);
}
.newsletter__form .field { flex: 1 1 240px; margin: 0; }
.newsletter__form .field__input {
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 10px var(--space-4);
}
.newsletter__form .field__input:focus { border-color: var(--accent); }
