:root {
  --bg: #FAF8F5;
  --text: #1F2328;
  --muted: #5B6169;
  --primary: #2F4BD8;
  --primary-dark: #2038B0;
  --card: #FFFFFF;
  --line: #E6E2DB;
  --todo-bg: #FFF3C4;
  --todo-text: #6B4E00;
  --font: system-ui, -apple-system, "Segoe UI", "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
}

.wrap { max-width: 960px; margin: 0 auto; padding: 0 20px; }

h1, h2, h3 { line-height: 1.3; margin: 0; }
p { margin: 0 0 8px; }
ul, ol { margin: 0; padding: 0; }

a { color: var(--primary); }
a:focus-visible, .btn:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; }

section { padding: 48px 0 8px; }
h2 { font-size: 1.5rem; margin-bottom: 20px; }
h2::after { content: ""; display: block; width: 40px; height: 4px; background: var(--primary); margin-top: 8px; border-radius: 2px; }
h3 { font-size: 1.05rem; margin-bottom: 6px; }

/* 待補標記 */
.todo { background: var(--todo-bg); color: var(--todo-text); padding: 1px 6px; border-radius: 4px; font-size: .9em; }

/* Hero */
.hero { padding: 40px 0 24px; border-bottom: 1px solid var(--line); }
.hero-inner { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 24px; }
.portrait { width: 160px; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 16px; border: 1px solid var(--line); background: #fff; }
.eyebrow { color: var(--muted); font-size: .9rem; margin-bottom: 4px; }
h1 { font-size: 2.2rem; }
.tagline { font-size: 1.2rem; font-weight: 600; margin: 8px 0 20px; }
.actions { display: flex; flex-direction: column; gap: 12px; width: 100%; }

.btn {
  display: inline-block; text-align: center; text-decoration: none;
  padding: 12px 24px; min-height: 48px; border-radius: 999px;
  font-weight: 600; font-size: 1rem; border: 2px solid var(--primary);
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-ghost { background: transparent; color: var(--primary); }
.btn-ghost:hover { background: rgba(47, 75, 216, .08); }

/* 作品 */
.cards { display: grid; gap: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 20px; }
.role { color: var(--muted); font-size: .92rem; }
.card .link { margin: 12px 0 0; }

/* 經歷時間軸 */
.timeline { list-style: none; border-left: 3px solid var(--line); margin-left: 6px; padding-left: 20px; }
.timeline > li { position: relative; padding-bottom: 28px; }
.timeline > li::before {
  content: ""; position: absolute; left: -29px; top: 7px;
  width: 13px; height: 13px; border-radius: 50%;
  background: var(--primary); border: 3px solid var(--bg);
}
.when { color: var(--muted); font-size: .88rem; margin-bottom: 2px; }
.timeline ul { list-style: disc; padding-left: 1.2em; }
.timeline ul li { margin-bottom: 4px; }

/* 技能 */
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; }
.tags li { background: #E9EDFC; color: var(--primary-dark); padding: 6px 14px; border-radius: 999px; font-size: .92rem; font-weight: 500; }

/* 聯絡 */
.contact { padding-bottom: 56px; }
.contact-list { list-style: none; margin-bottom: 24px; }
.contact-list li { display: flex; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); word-break: break-all; }
.label { flex: 0 0 76px; color: var(--muted); font-weight: 600; }
.contact .btn { width: 100%; }

footer { text-align: center; color: var(--muted); font-size: .85rem; padding: 24px 20px 32px; border-top: 1px solid var(--line); }

/* 電腦版 */
@media (min-width: 768px) {
  section { padding: 72px 0 16px; }
  .hero { padding: 72px 0 56px; }
  .hero-inner { flex-direction: row; text-align: left; gap: 56px; }
  .portrait { width: 240px; flex: none; }
  h1 { font-size: 3rem; }
  .tagline { font-size: 1.5rem; }
  .actions { flex-direction: row; width: auto; }
  .btn { min-width: 150px; }
  .cards { grid-template-columns: repeat(3, 1fr); }
  .contact .btn { width: auto; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
