/* ===========================================================
   楊夢凡 個人求職網站 — 樣式
   設計沿用 A4 CV：深藍 + 金色。單頁滾動、RWD（斷點 768px）。
   =========================================================== */

:root {
  --navy: #22324a;
  --navy-dark: #1a2738;
  --gold: #b08d57;
  --gold-soft: #c9a877;
  --ink: #2b2b2b;
  --muted: #6b7280;
  --line: #e2e6ec;
  --bg: #ffffff;
  --bg-soft: #f6f7f9;
  --nav-h: 62px;
  --maxw: 1080px;
  --radius: 12px;
  --shadow: 0 6px 24px rgba(26, 39, 56, 0.08);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: "PingFang TC", "Noto Sans TC", "Microsoft JhengHei",
               "Hiragino Sans GB", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ---------- 語言切換：顯示/隱藏 ---------- */
[data-show="en"] { display: none; }
body[data-lang="en"] [data-show="zh"] { display: none; }
body[data-lang="en"] [data-show="en"] { display: initial; }

/* ---------- 導覽列 ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: rgba(26, 39, 56, 0.96);
  backdrop-filter: saturate(140%) blur(8px);
  color: #fff;
  z-index: 1000;
  border-bottom: 2px solid var(--gold);
  transition: height .28s ease, background .28s ease, box-shadow .28s ease;
}
.nav.scrolled {
  height: 52px;
  background: rgba(20, 30, 44, 0.98);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.22);
}
.nav.scrolled .brand { font-size: 16px; }

/* 捲動進度條 */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, var(--gold), var(--gold-soft));
  z-index: 1100;
  transition: width .1s linear;
}
.nav-inner {
  max-width: var(--maxw);
  height: 100%;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand { font-size: 18px; font-weight: 700; letter-spacing: 1px; white-space: nowrap; }
.brand .dot { color: var(--gold); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  list-style: none;
  margin: 0; padding: 0;
}
.nav-links a {
  font-size: 14.5px;
  color: #dbe2ec;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
}
.nav-links a:hover { color: #fff; }
.nav-links a.active { color: #fff; border-bottom-color: var(--gold); }

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

.lang-toggle {
  display: inline-flex;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 20px;
  overflow: hidden;
  font-size: 13px;
}
.lang-toggle button {
  background: transparent;
  color: #cdd6e3;
  border: 0;
  padding: 5px 14px;
  cursor: pointer;
  font: inherit;
  transition: background .15s, color .15s;
}
.lang-toggle button.active { background: var(--gold); color: var(--navy-dark); font-weight: 700; }

.hamburger {
  display: none;
  background: transparent; border: 0; cursor: pointer;
  width: 40px; height: 40px; padding: 8px;
}
.hamburger span {
  display: block; height: 2px; background: #fff; border-radius: 2px;
  margin: 5px 0; transition: transform .25s, opacity .2s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- 版面通用 ---------- */
main { padding-top: var(--nav-h); }
.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 72px 20px;
  scroll-margin-top: var(--nav-h);
}
.section.alt { max-width: none; background: var(--bg-soft); }
.section.alt > .section-inner { max-width: var(--maxw); margin: 0 auto; }

.section-title {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-size: 26px;
  font-weight: 800;
  color: var(--navy);
  margin: 0 0 6px;
}
.section-title::before {
  content: "";
  width: 16px; height: 16px;
  background: var(--gold);
  border-radius: 4px;
  transform: translateY(2px);
}
.section-title .sub { font-size: 14px; font-weight: 500; color: var(--muted); letter-spacing: .5px; }
.section-lead { color: var(--muted); margin: 0 0 30px; max-width: 60ch; }

/* ---------- 重點標示 ---------- */
.hl {
  font-weight: 700;
  color: var(--navy);
  background: linear-gradient(transparent 58%, rgba(176, 141, 87, 0.38) 58%);
  padding: 0 1px;
}

/* ---------- 捲動進場動畫 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.in { opacity: 1; transform: translateY(0); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 100%);
  color: #fff;
}
/* 水潤氣泡層 */
.bubbles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.bubble {
  position: absolute;
  bottom: -60px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, rgba(255,255,255,.28), rgba(176,141,87,.10) 60%, rgba(255,255,255,0) 70%);
  border: 1px solid rgba(255,255,255,.10);
  animation: rise linear infinite;
  will-change: transform, opacity;
}
@keyframes rise {
  0%   { transform: translateY(0) scale(.9); opacity: 0; }
  10%  { opacity: .8; }
  90%  { opacity: .6; }
  100% { transform: translateY(-115vh) scale(1.1); opacity: 0; }
}
.hero-inner {
  position: relative;
  z-index: 1;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 64px 20px 72px;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 44px;
  align-items: center;
}
.hero-photo {
  width: 220px; height: 268px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 4px solid rgba(255,255,255,.85);
  box-shadow: 0 0 0 6px rgba(176,141,87,.28), 0 14px 40px rgba(0,0,0,.35);
  animation: fadeUp .7s ease both;
}
.hero h1 {
  font-size: 42px; line-height: 1.12; margin: 0; letter-spacing: 1px;
  background: linear-gradient(90deg, #ffffff 0%, #e9d9bf 55%, var(--gold-soft) 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: fadeUp .6s ease .05s both;
}
.hero .alt-name { color: #cdd6e3; font-size: 17px; margin: 8px 0 14px; animation: fadeUp .6s ease .12s both; }
.hero .role { animation: fadeUp .6s ease .2s both; }
.hero .tagline { animation: fadeUp .6s ease .28s both; }
.hero-stats { animation: fadeUp .6s ease .36s both; }
.hero-cta { animation: fadeUp .6s ease .44s both; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero .role {
  display: inline-block;
  background: var(--gold); color: var(--navy-dark);
  font-weight: 700; font-size: 15px;
  padding: 5px 16px; border-radius: 6px; margin-bottom: 16px;
}
.hero .tagline { color: #e8edf4; max-width: 56ch; margin: 0 0 24px; }

.hero-stats { display: flex; gap: 30px; flex-wrap: wrap; margin-bottom: 26px; }
.hero-stats .num { font-size: 24px; font-weight: 800; color: var(--gold-soft); }
.hero-stats .lbl { font-size: 13px; color: #cdd6e3; }

.btn {
  display: inline-block;
  padding: 11px 22px;
  border-radius: 8px;
  font-weight: 700; font-size: 15px;
  cursor: pointer;
  transition: transform .12s, box-shadow .12s, background .15s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--gold); color: var(--navy-dark); }
.btn-outline { border: 2px solid rgba(255,255,255,.6); color: #fff; }
.btn-outline:hover { background: rgba(255,255,255,.12); }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- 專業摘要卡 ---------- */
.summary-box {
  background: var(--bg-soft);
  border-left: 5px solid var(--gold);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 22px 26px;
  font-size: 17px;
  line-height: 1.9;
}

/* ---------- 產業亮點 Industry Fit ---------- */
.fit-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.fit-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-top: 4px solid var(--gold);
  border-radius: var(--radius);
  padding: 26px 24px;
  box-shadow: var(--shadow);
  transition: transform .15s, box-shadow .15s;
}
.fit-card:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(26,39,56,.12); }
.fit-card .ico { font-size: 34px; }
.fit-card h3 { margin: 12px 0 8px; font-size: 19px; color: var(--navy); }
.fit-card p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.75; }

/* ---------- MBTI 標章 ---------- */
.mbti {
  display: flex;
  align-items: center;
  gap: 22px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 100%);
  color: #fff;
  border-left: 5px solid var(--gold);
  border-radius: var(--radius);
  padding: 22px 26px;
  margin-bottom: 26px;
  box-shadow: var(--shadow);
}
.mbti-code {
  flex: 0 0 auto;
  font-size: 40px;
  font-weight: 800;
  letter-spacing: 3px;
  line-height: 1;
  color: var(--gold-soft);
  background: linear-gradient(90deg, #e9d9bf, var(--gold-soft));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.mbti-type { font-size: 17px; font-weight: 700; color: #fff; margin-bottom: 4px; }
.mbti-text p { margin: 0; color: #dbe2ec; font-size: 14.5px; line-height: 1.7; }

/* ---------- 個性卡 ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.p-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  transition: transform .15s, box-shadow .15s;
}
.p-card:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(26,39,56,.12); }
.p-card .ico { font-size: 30px; }
.p-card h3 { margin: 12px 0 6px; font-size: 18px; color: var(--navy); }
.p-card p { margin: 0; color: var(--muted); font-size: 14.5px; }
.note { color: var(--muted); font-size: 13.5px; font-style: italic; margin: -18px 0 26px; }

/* ---------- 專長 ---------- */
.skills-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 26px;
  align-items: start;
}
.panel {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}
.panel h3 {
  margin: 0 0 14px; font-size: 17px; color: var(--navy);
  display: flex; align-items: center; gap: 8px;
}
.panel h3::before { content: ""; width: 10px; height: 10px; background: var(--gold); border-radius: 3px; }

.lang-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 15px;
}
.lang-row:last-child { border-bottom: none; }
.lang-row .lv { color: var(--navy); font-weight: 600; }
.lang-row .cert {
  font-size: 12px; color: #fff; background: var(--navy);
  padding: 2px 9px; border-radius: 12px; margin-left: 8px;
}

/* 語言能力進度條 */
.lang-item { padding: 10px 0; border-bottom: 1px dashed var(--line); }
.lang-item:last-child { border-bottom: none; }
.lang-item .lang-head {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 15px; margin-bottom: 7px;
}
.lang-flag { margin-right: 8px; font-size: 17px; letter-spacing: 1px; }
.lang-item .lv { color: var(--navy); font-weight: 600; }
.lang-item .cert {
  font-size: 12px; color: #fff; background: var(--navy);
  padding: 2px 9px; border-radius: 12px; margin-left: 8px;
}
.bar {
  height: 8px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}
.bar > span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--navy), var(--gold));
  transition: width 1.1s cubic-bezier(.2,.7,.2,1);
}

.panel.ai { border-left: 5px solid var(--gold); }
.panel.ai .badge {
  display: inline-block; font-size: 12px; font-weight: 700;
  color: var(--navy-dark); background: var(--gold);
  padding: 2px 10px; border-radius: 12px; margin-left: auto;
}
.panel.ai p { color: var(--muted); font-size: 14.5px; margin: 0 0 14px; }

/* 軟體 / AI logo 圖示 */
.logo-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}
.logo-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 7px 13px 7px 9px;
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
}
.logo-chip img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  border-radius: 4px;
  flex: 0 0 auto;
}

.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  font-size: 13px; background: var(--bg-soft); border: 1px solid var(--line);
  color: var(--navy); padding: 4px 12px; border-radius: 14px;
}
.tag.solid { background: var(--navy); color: #fff; border-color: var(--navy); }

.strengths { margin: 18px 0 0; padding-left: 20px; }
.strengths li { margin-bottom: 8px; color: var(--ink); }
.full-span { grid-column: 1 / -1; }

/* ---------- 學歷時間軸 ---------- */
.timeline { position: relative; padding-left: 28px; }
.timeline::before {
  content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px;
  width: 2px; background: var(--line);
}
.tl-item { position: relative; margin-bottom: 26px; }
.tl-item:last-child { margin-bottom: 0; }
.tl-item::before {
  content: ""; position: absolute; left: -28px; top: 6px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--gold); border: 3px solid #fff; box-shadow: 0 0 0 2px var(--gold);
}
.tl-item .date { font-size: 13px; font-weight: 700; color: var(--gold); }
.tl-item h3 { margin: 3px 0 2px; font-size: 18px; color: var(--navy); }
.tl-item .deg { font-weight: 600; }
.tl-item .meta { color: var(--muted); font-size: 14px; }

/* ---------- 工作經歷 ---------- */
.exp-item {
  background: var(--bg);
  border: 1px solid var(--line);
  border-left: 4px solid var(--navy);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.exp-head {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 14px; flex-wrap: wrap;
}
.exp-head .role { font-size: 18px; font-weight: 700; color: var(--ink); }
.exp-head .date { font-size: 13px; font-weight: 700; color: var(--gold); white-space: nowrap; }
.exp-item .org { color: var(--navy); font-weight: 600; font-size: 14.5px; margin: 2px 0 8px; }
.exp-item ul { margin: 0; padding-left: 20px; }
.exp-item li { margin-bottom: 5px; font-size: 14.5px; color: var(--ink); }

/* ---------- 專案 ---------- */
.proj-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.proj-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: var(--shadow);
  transition: transform .15s, box-shadow .15s;
}
.proj-card:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(26,39,56,.12); }
.proj-card .ptag {
  display: inline-block; font-size: 12px; font-weight: 700;
  color: var(--gold); background: rgba(176,141,87,.12);
  padding: 3px 11px; border-radius: 12px; margin-bottom: 10px;
}
.proj-card h3 { margin: 0 0 8px; font-size: 17px; color: var(--navy); }
.proj-card p { margin: 0; color: var(--muted); font-size: 14.5px; }

/* ---------- 聯絡 ---------- */
.contact { text-align: center; }
.contact .section-title { justify-content: center; }
.contact .contact-lead { color: var(--muted); margin: 0 auto 22px; max-width: 46ch; }
.email-show {
  display: inline-block;
  font-size: 22px;
  font-weight: 700;
  color: var(--navy);
  padding: 6px 4px;
  margin-bottom: 24px;
  border-bottom: 2px solid var(--gold);
  transition: color .15s;
  word-break: break-all;
}
.email-show:hover { color: var(--gold); }
.contact-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn-navy { background: var(--navy); color: #fff; }
.btn-gold { background: var(--gold); color: var(--navy-dark); }
.contact .region { margin-top: 22px; color: var(--muted); font-size: 14px; }

/* ---------- Footer ---------- */
.footer {
  background: var(--navy-dark); color: #aeb8c6;
  text-align: center; font-size: 13.5px;
  padding: 26px 20px;
}

/* ===========================================================
   RWD — 手機 / 平板（≤ 768px）
   =========================================================== */
@media (max-width: 768px) {
  .hamburger { display: block; }

  .nav-links {
    position: fixed;
    top: var(--nav-h); left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--navy-dark);
    border-bottom: 2px solid var(--gold);
    padding: 8px 0;
    transform: translateY(-140%);
    transition: transform .28s ease;
    max-height: calc(100vh - var(--nav-h));
    overflow-y: auto;
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links a {
    padding: 14px 24px;
    border-bottom: 1px solid rgba(255,255,255,.06);
  }
  .nav-links a.active { border-bottom-color: rgba(255,255,255,.06); background: rgba(176,141,87,.15); }

  .hero-inner { grid-template-columns: 1fr; text-align: center; gap: 26px; padding: 40px 20px 50px; }
  .hero-photo { width: 172px; height: 210px; margin: 0 auto; }
  .hero h1 { font-size: 32px; }
  .hero .tagline { margin-left: auto; margin-right: auto; }
  .hero-stats { justify-content: center; gap: 24px; }
  .hero-cta { justify-content: center; }

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

  .mbti { flex-direction: column; text-align: center; gap: 12px; padding: 22px; }
  .card-grid { grid-template-columns: 1fr; }
  .fit-grid { grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: 1fr; }
  .proj-grid { grid-template-columns: 1fr; }

  .exp-head .date { width: 100%; }
}

@media (min-width: 481px) and (max-width: 768px) {
  .card-grid, .proj-grid, .fit-grid { grid-template-columns: 1fr 1fr; }
}

/* 尊重使用者的減少動態偏好 */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
