/* ===========================================================
   劉柏毅醫師 — 品牌色彩升級
   午夜藍（Midnight Navy）＋香檳金（Champagne Gold）＋白色
   中文字體：思源黑體 / 英文：Montserrat
   =========================================================== */

:root {
  /* Midnight Navy 系列 */
  --navy-900: #0f1c35;   /* 最深（主背景、大標） */
  --navy-800: #1a2744;   /* 深藍（品牌色） */
  --navy-700: #243460;   /* 中深藍 */
  --navy-100: #e8eaf2;   /* 淡化背景（卡片、分隔） */
  --navy-50:  #f4f5fa;   /* 最淺背景 */

  /* Champagne Gold 系列 */
  --gold-600: #f5d77a;   /* 金色（主點綴） */
  --gold-500: #d4a853;   /* 香檳金（亮） */
  --gold-400: #e2bc7a;   /* 淺金 */
  --gold-100: #faf4e8;   /* 極淡金背景 */

  /* 文字層級 */
  --ink-900: #0f1c35;    /* 主文字（= navy-900） */
  --ink-700: #2c3a5a;    /* 次要文字 */
  --ink-500: #5a6a8a;    /* 輔助文字 */
  --ink-300: #9aa4be;    /* 弱化文字 */

  /* 陰影 */
  --shadow-sm:  0 1px 3px rgba(15, 28, 53, 0.08);
  --shadow-md:  0 8px 24px rgba(15, 28, 53, 0.10);
  --shadow-lg:  0 20px 48px rgba(15, 28, 53, 0.14);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 18px;

  /* 字體：思源黑體 + Montserrat */
  --font-serif: 'Noto Sans TC', 'PingFang TC', 'Microsoft JhengHei', 'Source Han Sans TC', sans-serif;
  --font-sans:  'Montserrat', 'Noto Sans TC', 'PingFang TC', 'Microsoft JhengHei', sans-serif;

  --maxw: 1120px;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink-700);
  background: #ffffff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; display: block; }
a { color: var(--navy-800); text-decoration: none; transition: color 0.18s ease; }
a:hover { color: var(--gold-600); }

h1, h2, h3, h4 {
  font-family: var(--font-sans);
  font-weight: 700;
  color: var(--ink-900);
  letter-spacing: -0.01em;
  line-height: 1.3;
  margin: 0 0 0.5em 0;
}
h1 { font-size: clamp(2rem, 4vw, 2.75rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.2rem; font-weight: 600; }

p { margin: 0 0 1em 0; }

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- 頂部導覽列 ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--navy-100);
}
.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink-900);
}
.brand:hover { color: var(--ink-900); }
.brand-mark {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--navy-800);
  color: #ffffff;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 1.4rem;
  box-shadow: var(--shadow-sm);
  border: 2px solid var(--gold-500);
  object-fit: cover;
  object-position: center;
}
.brand-text { display: flex; flex-direction: row; align-items: baseline; gap: 8px; line-height: 1.2; }
.brand-text strong { font-family: var(--font-sans); font-weight: 700; font-size: 1.2rem; color: var(--navy-800); }
.brand-text em { font-style: normal; font-size: 0.88rem; color: var(--ink-500); }

.primary-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.primary-nav a {
  position: relative;
  padding: 8px 14px;
  font-size: 0.92rem;
  color: var(--ink-700);
  border-radius: var(--radius-sm);
  transition: all 0.18s ease;
}
.primary-nav a:hover { color: var(--navy-800); background: var(--navy-50); }
.primary-nav a.active { color: var(--navy-800); font-weight: 700; }
.primary-nav a.active::after {
  content: "";
  position: absolute;
  left: 14px; right: 14px; bottom: 2px;
  height: 2px;
  background: var(--gold-600);
  border-radius: 2px;
}

/* ---- Hero ---- */
.hero {
  padding: 80px 0 60px;
  background:
    radial-gradient(1100px 500px at 80% -10%, rgba(26, 39, 68, 0.07), transparent 60%),
    radial-gradient(900px 600px at -10% 110%, rgba(255, 255, 255, 0.8), transparent 60%),
    #ffffff;
  border-bottom: 1px solid var(--navy-100);
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 56px;
  align-items: start;
}
.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  color: var(--gold-600);
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 18px;
  font-family: var(--font-sans);
}
.hero h1 {
  margin-top: 0;
  color: var(--ink-900);
  position: relative;
}
.hero h1::after {
  content: "";
  display: block;
  width: 64px;
  height: 3px;
  background: linear-gradient(90deg, var(--gold-600), var(--gold-400));
  margin-top: 18px;
  border-radius: 2px;
}
.lead {
  font-size: 1.08rem;
  color: var(--ink-700);
  margin-bottom: 28px;
  line-height: 1.85;
}
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 32px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 600;
  font-family: var(--font-sans);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-primary {
  background: var(--navy-800);
  color: #ffffff;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--navy-700); color: #ffffff; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-ghost {
  background: transparent;
  color: var(--navy-800);
  border-color: var(--navy-800);
}
.btn-ghost:hover { background: var(--navy-50); color: var(--navy-800); }

.meta-row {
  list-style: none;
  padding: 0;
  margin: 24px 0 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 18px 28px;
  font-size: 0.92rem;
  color: var(--ink-500);
}
.meta-row li { position: relative; padding-left: 0; }
.meta-row li span { color: var(--ink-300); margin-right: 6px; font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; font-family: var(--font-sans); }

/* Hero 照片區（時尚簡約） */
.hero-photo-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.hero-photo-frame {
  width: 300px;
  height: 360px;
  background: #ffffff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(15, 28, 53, 0.15), 0 4px 16px rgba(15, 28, 53, 0.08);
  position: relative;
}
.hero-photo-frame::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--navy-800);
  z-index: 1;
}
.hero-photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--navy-800);
  border-radius: 100px;
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  box-shadow: var(--shadow-sm);
}
.badge-icon { font-size: 1.1rem; }

/* ---- Sections ---- */
.section { padding: 88px 0; }
.section-alt {
  background: var(--navy-50);
  border-top: 1px solid var(--navy-100);
  border-bottom: 1px solid var(--navy-100);
}
.section-head { text-align: center; max-width: 720px; margin: 0 auto 48px; }
.section-head.align-left { text-align: left; margin-left: 0; }
.section-head h2 { margin-top: 0; }
.section-head h2::after {
  content: "";
  display: block;
  width: 48px;
  height: 3px;
  background: var(--gold-600);
  margin: 16px auto 0;
  border-radius: 2px;
}
.section-head.align-left h2::after { margin-left: 0; }
.section-sub { color: var(--ink-500); font-size: 1.02rem; }

/* 專長卡片網格 */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.feature-card {
  background: #ffffff;
  border: 1px solid var(--navy-100);
  border-radius: var(--radius-lg);
  padding: 30px 28px;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}
.feature-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 3px; height: 0;
  background: var(--gold-600);
  transition: height 0.3s ease;
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--gold-400);
}
.feature-card:hover::before { height: 100%; }
.feature-icon {
  width: 52px; height: 52px;
  border-radius: 12px;
  background: var(--gold-100);
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  margin-bottom: 18px;
}
.feature-card h3 { font-size: 1.18rem; margin-bottom: 8px; }
.feature-card p { color: var(--ink-500); margin: 0; font-size: 0.95rem; line-height: 1.7; }

/* 學經歷時間軸 */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  margin-bottom: 64px;
}
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li {
  position: relative;
  padding: 14px 0 14px 28px;
  border-left: 2px solid var(--navy-100);
  margin-left: 8px;
}
.timeline li::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 22px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--gold-600);
  box-shadow: 0 0 0 4px #ffffff;
}
.t-time {
  display: inline-block;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  color: var(--gold-600);
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 4px;
  font-family: var(--font-sans);
}
.t-body {
  font-family: var(--font-sans);
  font-weight: 600;
  color: var(--ink-900);
  font-size: 1.02rem;
}

.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.chip {
  display: inline-block;
  padding: 8px 16px;
  background: var(--navy-50);
  border: 1px solid var(--navy-100);
  border-radius: 100px;
  font-size: 0.88rem;
  color: var(--ink-700);
  transition: all 0.2s ease;
  font-family: var(--font-sans);
}
.chip:hover {
  background: var(--gold-100);
  border-color: var(--gold-500);
  color: var(--navy-800);
}

/* CTA Band */
.cta-band {
  background: linear-gradient(135deg, var(--navy-800), var(--navy-700));
  color: #ffffff;
  padding: 56px 0;
}
.cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.cta-band h2 { color: #ffffff; margin: 0 0 8px 0; font-family: var(--font-sans); }
.cta-band p { margin: 0; opacity: 0.88; }
.cta-band .btn-primary {
  background: var(--gold-500);
  color: var(--navy-900);
}
.cta-band .btn-primary:hover { background: var(--gold-400); color: var(--navy-900); }

/* ---- Page Hero (sub pages) ---- */
.page-hero {
  padding: 80px 0 56px;
  background:
    radial-gradient(800px 400px at 90% 0%, rgba(26, 39, 68, 0.08), transparent 60%),
    #ffffff;
  border-bottom: 1px solid var(--navy-100);
}
.page-hero h1 { margin-top: 0; font-family: var(--font-sans); }
.page-hero h1::after {
  content: "";
  display: block;
  width: 56px; height: 3px;
  background: var(--gold-600);
  margin-top: 18px;
  border-radius: 2px;
}
.page-hero .lead { max-width: 720px; }

/* ---- News / Articles grid ---- */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
}
.news-card {
  background: #ffffff;
  border: 1px solid var(--navy-100);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.25s ease;
  position: relative;
}
.news-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--gold-400);
}
.news-link {
  display: block;
  padding: 28px 28px 24px;
  color: var(--ink-700);
}
.news-link:hover { color: var(--ink-700); }
.news-tag {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: var(--gold-600);
  background: var(--gold-100);
  padding: 4px 10px;
  border-radius: 100px;
  margin-bottom: 14px;
  text-transform: uppercase;
  font-family: var(--font-sans);
}
.news-card h2 {
  font-size: 1.18rem;
  line-height: 1.5;
  margin: 0 0 12px 0;
  color: var(--ink-900);
  transition: color 0.18s ease;
  font-family: var(--font-sans);
}
.news-card:hover h2 { color: var(--gold-600); }
.news-card p {
  font-size: 0.94rem;
  color: var(--ink-500);
  line-height: 1.7;
  margin: 0 0 18px 0;
}
.news-meta {
  font-size: 0.78rem;
  color: var(--ink-300);
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}
.news-more {
  display: inline-block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--navy-800);
  font-family: var(--font-sans);
}

/* ---- Schedule ---- */
.schedule-card {
  background: var(--navy-50);
  border: 1px solid var(--navy-100);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 48px;
}
.schedule-eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  color: var(--gold-600);
  font-weight: 700;
  margin-bottom: 20px;
  text-transform: uppercase;
  font-family: var(--font-sans);
}
.schedule-table { width: 100%; }
.sched-row {
  display: grid;
  grid-template-columns: 110px repeat(5, 1fr);
  border-top: 1px solid var(--navy-100);
}
.sched-row:first-of-type { border-top: 0; }
.sched-head {
  font-family: var(--font-sans);
  font-weight: 700;
  color: var(--ink-900);
  border-top: 0;
  border-bottom: 2px solid var(--gold-600);
  padding-bottom: 8px;
  margin-bottom: 8px;
}
.sched-head > div { padding: 12px 8px; text-align: center; }
.sched-head > div:first-child { text-align: left; color: var(--gold-600); }
.sched-time {
  padding: 18px 12px;
  font-family: var(--font-sans);
  color: var(--ink-900);
  font-weight: 700;
  font-size: 1.02rem;
  line-height: 1.4;
}
.sched-time span {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--ink-500);
  margin-top: 4px;
}
.sched-cell {
  display: grid;
  place-items: center;
  color: var(--ink-300);
  font-size: 1.1rem;
}
.sched-cell.on {
  color: var(--gold-600);
  font-weight: 700;
}
.sched-cell.on::before {
  content: "✔";
  display: inline-block;
  background: var(--gold-100);
  width: 32px; height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1rem;
  color: var(--gold-600);
  border: 1px solid var(--gold-400);
}
.schedule-legend {
  margin-top: 24px;
  font-size: 0.88rem;
  color: var(--ink-500);
  display: flex;
  align-items: center;
  gap: 8px;
}
.schedule-legend .dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--gold-600);
  display: inline-block;
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.info-card {
  background: #ffffff;
  border: 1px solid var(--navy-100);
  border-radius: var(--radius-lg);
  padding: 28px;
}
.info-eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  color: var(--gold-600);
  font-weight: 700;
  margin-bottom: 12px;
  text-transform: uppercase;
  font-family: var(--font-sans);
}
.info-card h3 { font-size: 1.18rem; margin: 0 0 12px 0; }
.info-card p { margin: 0 0 8px 0; color: var(--ink-700); }
.info-card .muted { color: var(--ink-500); font-size: 0.92rem; }

/* ---- Footer ---- */
.site-footer {
  background: var(--navy-800);
  border-top: 1px solid var(--navy-800);
  padding: 32px 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.88rem;
  color: rgba(255,255,255,0.7);
}
.footer-meta { color: rgba(255,255,255,0.45); font-size: 0.82rem; }

/* ---- Responsive ---- */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; gap: 36px; }
  .two-col { grid-template-columns: 1fr; gap: 36px; }
  .info-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .nav-wrap { flex-direction: column; align-items: flex-start; gap: 12px; }
  .primary-nav { width: 100%; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; }
  .primary-nav a { white-space: nowrap; font-size: 0.88rem; padding: 6px 10px; }
  .hero, .page-hero { padding: 56px 0 40px; }
  .section { padding: 56px 0; }
  .sched-row { grid-template-columns: 80px repeat(5, 1fr); }
  .sched-time { font-size: 0.92rem; padding: 12px 6px; }
  .sched-time span { font-size: 0.7rem; }
  .schedule-card { padding: 20px 16px; }
  .sched-cell.on::before { width: 26px; height: 26px; font-size: 0.85rem; }
}
@media (max-width: 480px) {
  .sched-row { grid-template-columns: 70px repeat(5, 1fr); font-size: 0.85rem; }
  .sched-head > div { padding: 8px 2px; font-size: 0.85rem; }
}

/* ---- Subtle entrance animation ---- */
@media (prefers-reduced-motion: no-preference) {
  .feature-card, .news-card, .timeline li { opacity: 0; transform: translateY(8px); animation: fadeUp 0.6s ease forwards; }
  .feature-card:nth-child(1) { animation-delay: 0.05s; }
  .feature-card:nth-child(2) { animation-delay: 0.10s; }
  .feature-card:nth-child(3) { animation-delay: 0.15s; }
  .feature-card:nth-child(4) { animation-delay: 0.20s; }
  .feature-card:nth-child(5) { animation-delay: 0.25s; }
  .feature-card:nth-child(6) { animation-delay: 0.30s; }
  .feature-card:nth-child(7) { animation-delay: 0.35s; }
  .news-card:nth-child(1) { animation-delay: 0.05s; }
  .news-card:nth-child(2) { animation-delay: 0.10s; }
  .news-card:nth-child(3) { animation-delay: 0.15s; }
  .news-card:nth-child(4) { animation-delay: 0.20s; }
  .news-card:nth-child(5) { animation-delay: 0.25s; }
  .news-card:nth-child(6) { animation-delay: 0.30s; }
  .timeline li { animation-delay: 0.1s; }
  .timeline li:nth-child(2) { animation-delay: 0.15s; }
  .timeline li:nth-child(3) { animation-delay: 0.20s; }
  .timeline li:nth-child(4) { animation-delay: 0.25s; }
  .timeline li:nth-child(5) { animation-delay: 0.30s; }
  @keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }
}
