:root {
  --bg: #ffffff; --bg-2: #f5f9fc; --blue-bg: #eaf6ff; --sky: #59b8f5;
  --link: #0066cc; --btn: #0071e3; --ink: #1d1d1f; --ink-2: #62676d; --line: #e5eaf0;
  --r: 18px; --w: 1100px; --pad: clamp(20px, 4vw, 40px); --sec: clamp(64px, 9vw, 120px);
  --shadow: 0 1px 2px rgba(16,24,40,.04), 0 12px 32px rgba(30,80,130,.08);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 17px/1.75 -apple-system, BlinkMacSystemFont, "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased; overflow-wrap: break-word;
}
h1, h2, h3, p, ul, dl, dd, figure { margin: 0; }
ul { padding: 0; list-style: none; }
img { max-width: 100%; height: auto; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--btn); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: calc(var(--w) + var(--pad) * 2); margin: 0 auto;
  padding-inline: max(var(--pad), env(safe-area-inset-left)) max(var(--pad), env(safe-area-inset-right)); }
.muted { color: var(--ink-2); }
.skip { position: absolute; left: -999px; top: 8px; z-index: 30; background: var(--bg); padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 12px; }

/* 導覽 */
.nav { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.86);
  -webkit-backdrop-filter: saturate(180%) blur(16px); backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--line); }
.nav-in { height: 52px; display: flex; align-items: center; gap: 8px; }
.brand { color: var(--ink); font-weight: 600; font-size: 16px; letter-spacing: .01em; margin-right: auto; padding: 8px 0; }
.brand:hover { text-decoration: none; }
.nav-links { display: flex; }
.nav-links a { color: var(--ink-2); font-size: 14px; padding: 10px 12px; border-radius: 8px; }
.nav-links a:hover { color: var(--ink); text-decoration: none; }
.nav-links a[aria-current="page"] { color: var(--ink); font-weight: 600; }
.auth { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.auth:empty { display: none; }
.auth img { width: 28px; height: 28px; border-radius: 50%; }
.auth .who { color: var(--ink-2); max-width: 8em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 首頁主視覺：左文右圖 */
.hero { padding: clamp(48px, 7vw, 96px) 0 clamp(48px, 6vw, 80px); overflow: hidden;
  background: linear-gradient(180deg, var(--bg-2) 0%, var(--bg) 72%); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.hello { font-size: clamp(17px, 1.5vw, 20px); color: var(--ink-2); margin-bottom: 10px; }
h1 { font-size: clamp(38px, 5vw, 62px); line-height: 1.14; letter-spacing: -.022em; font-weight: 600; }
.intro { margin-top: 22px; max-width: 27em; font-size: clamp(17px, 1.5vw, 19px); line-height: 1.75; color: var(--ink-2); }
.intro p + p { margin-top: 10px; }
.actions { margin-top: 32px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.more::after { content: " ›"; }
.sub-links { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 4px 20px; font-size: 14px; }
.sub-links:empty { display: none; }
.sub-links a { color: var(--ink-2); }
.sub-links a:hover { color: var(--link); }

.hero-art { position: relative; padding: 0 0 13% 9%; }
.hero-art::before { content: ""; position: absolute; inset: 9% 0 0 0; border-radius: 28px; background: linear-gradient(150deg, var(--blue-bg), #d9eefc); }
.hero-art img { position: relative; display: block; background: var(--bg-2); }
.hero-art .main { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 18px; box-shadow: var(--shadow); }
.hero-art .sub { position: absolute; left: 0; bottom: 4%; width: 46%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top;
  border-radius: 12px; border: 1px solid rgba(255,255,255,.9); box-shadow: 0 14px 36px rgba(20,60,100,.22); }
.hero-art figcaption { position: absolute; right: 16px; bottom: 5%; max-width: 46%; text-align: right; font-size: 13px; line-height: 1.5; color: #3a5a78; }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 20px; font: inherit; font-size: 15px; font-weight: 500;
  color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 12px; cursor: pointer; transition: background .15s ease, border-color .15s ease; }
.btn:hover { background: var(--bg-2); text-decoration: none; }
.btn.primary { color: #fff; background: var(--btn); border-color: transparent; }
.btn.primary:hover { background: #0064c8; }
.btn.danger { color: #b3261e; }
.btn.small { min-height: 36px; padding: 6px 14px; font-size: 14px; }

/* 內頁頁首 */
.page-head { padding: clamp(48px, 7vw, 88px) 0 clamp(32px, 4vw, 48px); border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, var(--blue-bg), var(--bg-2)); }
.page-head h1 { font-size: clamp(34px, 4.4vw, 52px); }
.page-head .intro { margin-top: 14px; max-width: 34em; }
.page-head-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px; }
.about-head { display: flex; align-items: flex-start; gap: 28px; }
.avatar { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; flex: none; border: 3px solid #fff; box-shadow: var(--shadow); }
.lead-big { margin-top: 20px; max-width: 22em; font-size: clamp(22px, 2.6vw, 32px); line-height: 1.5; font-weight: 500; letter-spacing: -.012em; }
.facts { margin-top: clamp(32px, 4vw, 48px); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 32px; border-top: 1px solid rgba(0,102,204,.16); }
.facts:empty { display: none; }
.facts div { padding-top: 18px; }
.facts dt { font-size: 13px; color: var(--ink-2); }
.facts dd { margin-top: 2px; font-size: 16px; font-weight: 500; line-height: 1.6; }

/* 區段 */
.sec { padding: var(--sec) 0; }
.sec.first { padding-top: clamp(36px, 5vw, 64px); }
.hero + .sec.first { padding-top: clamp(8px, 2vw, 24px); }
.sec.entry { border-top: 1px solid var(--line); }
.sec-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; margin-bottom: 28px; }
.after { margin-top: 18px; }
h2 { font-size: clamp(25px, 2.8vw, 32px); line-height: 1.25; letter-spacing: -.015em; font-weight: 600; }
.split { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 24px 56px; align-items: start; }
.lead-quote { max-width: 25em; font-size: clamp(21px, 2.2vw, 28px); line-height: 1.6; font-weight: 500; letter-spacing: -.01em; }

/* 最近在做：淡藍面板 */
.sec.band { padding-top: 0; }
.band > .wrap { background: var(--blue-bg); border-radius: clamp(0px, calc((100vw - 1200px) * 99), 24px); padding-block: clamp(36px, 5vw, 60px); }
.now { counter-reset: n; }
.now li { counter-increment: n; display: grid; grid-template-columns: 36px minmax(0, 190px) minmax(0, 1fr); gap: 4px 20px; padding: 16px 0; border-bottom: 1px solid rgba(0,102,204,.14); }
.now li::before { content: counter(n, decimal-leading-zero); font: 500 13px/2.1 ui-monospace, "SF Mono", Consolas, monospace; color: var(--link); }
.now li:first-child { padding-top: 2px; }
.now li:last-child { border-bottom: 0; padding-bottom: 0; }
.now b { font-weight: 600; }
.now span { color: #3f4a55; }
.now time { display: block; font-size: 13px; color: var(--ink-2); font-weight: 400; }

/* 作品：一大兩小 */
.filters { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 24px -14px; }
.filters:empty { display: none; }
.filters button { min-height: 40px; padding: 8px 14px; font: inherit; font-size: 14px; color: var(--ink-2); background: none; border: 0; border-radius: 10px; cursor: pointer; }
.filters button:hover { color: var(--ink); }
.filters button[aria-pressed="true"] { color: var(--link); background: var(--blue-bg); font-weight: 500; }

.featured { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 20px; }
.featured:empty { display: none; }
.card { display: flex; flex-direction: column; min-width: 0; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; box-shadow: 0 1px 2px rgba(16,24,40,.03); }
.card[hidden], .work-list li[hidden] { display: none; }
.card.lead { grid-row: span 2; box-shadow: var(--shadow); }
.featured.filtered { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.featured.filtered .card.lead { grid-row: auto; box-shadow: 0 1px 2px rgba(16,24,40,.03); }
.shot { aspect-ratio: 16 / 9; overflow: hidden; background: var(--bg-2); border-bottom: 1px solid var(--line); }
.card.lead .shot { aspect-ratio: auto; flex: 1 1 auto; min-height: clamp(220px, 30vw, 380px); }
.card.lead .body { flex: none; }
.featured.filtered .card.lead .shot { aspect-ratio: 16 / 9; flex: none; min-height: 0; }
.shot img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top left; transition: transform .5s ease; }
.card .body { padding: clamp(20px, 2.2vw, 26px); display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card.lead .body { padding: clamp(22px, 2.6vw, 32px); gap: 8px; }
.card.noimg { background: linear-gradient(180deg, var(--bg-2), var(--bg) 70%); }
.card.noimg .body { justify-content: center; }
.card.noimg .body::before { content: ""; width: 28px; height: 3px; border-radius: 2px; background: var(--sky); margin-bottom: 10px; }
.meta { font-size: 13px; color: var(--ink-2); }
h3 { font-size: 19px; line-height: 1.4; font-weight: 600; letter-spacing: -.01em; }
.card.lead h3 { font-size: clamp(22px, 2.2vw, 27px); line-height: 1.3; }
.sum { font-size: 15.5px; line-height: 1.7; }
.card.lead .sum { font-size: 17px; }
.did { font-size: 14.5px; line-height: 1.7; color: var(--ink-2); }
.links { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-top: 6px; font-size: 15px; }
.links:empty { display: none; }
.links a { padding: 6px 0; }
.gh { font-size: 13px; color: var(--ink-2); }

.work-list { margin-top: 28px; border-top: 1px solid var(--line); }
.featured[hidden] + .work-list, .featured:empty + .work-list { margin-top: 0; }
.work-list li { display: grid; grid-template-columns: 220px minmax(0, 1fr) minmax(110px, auto); gap: 6px 32px; padding: 22px 16px; margin: 0 -16px; border-bottom: 1px solid var(--line); border-radius: 2px; align-items: start; transition: background .15s ease; }
.work-list h3 { font-size: 17px; }
.work-list .side { text-align: right; display: grid; gap: 4px; justify-items: end; }
.work-list .side > .meta { padding: 2px 10px; border-radius: 999px; background: var(--bg-2); }
.work-list .links { margin-top: 0; justify-content: flex-end; }
.gh-more { margin-top: 24px; font-size: 15px; }

/* 關於 */
.prose { display: grid; gap: 18px; max-width: 36em; }
.lede p:first-child { font-size: clamp(19px, 1.8vw, 22px); font-weight: 500; line-height: 1.6; }
.exp-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
.exp { padding-top: 20px; border-top: 2px solid var(--sky); }
.exp p { margin-top: 8px; font-size: 15.5px; color: var(--ink-2); }
.contact-list { margin-top: 18px; display: grid; gap: 8px; color: var(--ink-2); }

/* 旅遊 */
.trip-list { display: grid; gap: 16px; }
.trip { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 8px 24px; padding: clamp(20px, 2.4vw, 28px); border: 1px solid var(--line); border-radius: var(--r); background: var(--bg); }
.trip .when { font-size: 14px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.trip .when b { display: block; color: var(--ink); font-size: 16px; font-weight: 600; }
.trip h3 { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 19px; }
.trip .place { color: var(--ink-2); font-size: 15px; }
.trip ol { margin: 12px 0 0; padding: 0 0 0 16px; list-style: none; border-left: 2px solid var(--blue-bg); display: grid; gap: 6px; font-size: 15px; }
.trip .tools { margin-top: 14px; }
.tag { font-size: 12px; font-weight: 500; padding: 2px 9px; border-radius: 999px; background: var(--bg-2); color: var(--ink-2); }
.tag.on { background: var(--blue-bg); color: var(--link); }

footer { border-top: 1px solid var(--line); background: var(--bg-2); padding: clamp(40px, 6vw, 64px) 0 max(28px, env(safe-area-inset-bottom)); font-size: 14px; color: var(--ink-2); }
.foot-cols { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(2, minmax(0, 1fr)); gap: 32px; }
.foot-cols b { display: block; color: var(--ink); font-weight: 600; margin-bottom: 10px; }
.foot-cols li a { display: inline-block; padding: 4px 0; color: var(--ink-2); }
.foot-cols li a:hover { color: var(--ink); }
.foot-cols p { max-width: 24em; }
.foot-base { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 13px; }

/* 對話框 */
dialog { border: 1px solid var(--line); border-radius: 20px; padding: 0; background: var(--bg); color: var(--ink);
  width: min(520px, calc(100vw - 28px)); max-height: calc(100vh - 28px); max-height: calc(100dvh - 28px); overflow: auto; box-shadow: 0 20px 60px rgba(16,24,40,.18); }
dialog::backdrop { background: rgba(29,29,31,.32); }
dialog form { padding: 26px; display: grid; gap: 14px; }
dialog h3 { font-size: 22px; }
label { display: grid; gap: 5px; font-size: 14px; color: var(--ink-2); }
input, select, textarea { font: inherit; font-size: 16px; color: var(--ink); background: var(--bg); border: 1px solid #c9d2dc; border-radius: 10px; padding: 9px 11px; width: 100%; }
textarea { resize: vertical; line-height: 1.5; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.actions-row { display: flex; gap: 8px; margin-top: 6px; }
.grow { flex: 1; }
.err { color: #b3261e; font-size: 14px; min-height: 1em; }

.fade { opacity: 0; transform: translateY(8px); transition: opacity .5s ease, transform .5s ease; }
.fade.in { opacity: 1; transform: none; }
@media (hover: hover) {
  .card:hover .shot img { transform: scale(1.025); }
  .work-list li:hover { background: var(--bg-2); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .fade { opacity: 1; transform: none; transition: none; }
  .btn, .shot img, .work-list li { transition: none; }
  .card:hover .shot img { transform: none; }
}
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { margin-top: 8px; padding: 0 0 0 6%; container-type: inline-size; }
  .hero-art::before { inset: 6cqw 0 0 0; }
  .hero-art .main { margin-bottom: 15cqw; }
  .hero-art .sub { bottom: auto; top: 37cqw; }
  .hero-art figcaption { position: relative; right: auto; bottom: auto; max-width: none; padding: 0 16px 16px 50%; text-align: right; }
  .split { grid-template-columns: 1fr; }
  .featured { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card.lead { grid-column: 1 / -1; grid-row: auto; }
  .featured.filtered .card.lead { grid-column: auto; }
  .work-list li { grid-template-columns: minmax(0, 1fr) auto; }
  .work-list li .mid { grid-column: 1 / -1; grid-row: 2; }
  .now li { grid-template-columns: 36px minmax(0, 1fr); }
  .now li span { grid-column: 2; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .nav-links a { padding: 10px 9px; }
  .auth .who { display: none; }
  .featured, .featured.filtered { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr; }
  .facts div + div { border-top: 1px solid rgba(0,102,204,.12); margin-top: 16px; padding-top: 14px; }
  .about-head { flex-direction: column; gap: 20px; }
  .exp-grid { grid-template-columns: 1fr; }
  .foot-cols { grid-template-columns: 1fr 1fr; }
  .foot-cols > div:first-child { grid-column: 1 / -1; }
  .work-list li { grid-template-columns: 1fr; }
  .work-list .side { text-align: left; justify-items: start; }
  .work-list .links { justify-content: flex-start; }
  .trip { grid-template-columns: 1fr; }
  .row { grid-template-columns: 1fr; }
}
