:root {
  --ocean-deep: #0c4a6e;
  --ocean-blue: #0369a1;
  --ocean-cyan: #0891b2;
  --ocean-teal: #0d9488;
  --ocean-light: #e0f2fe;
  --sand: #fbbf24;
  --coral: #fb923c;
  --ink: #0f172a;
  --slate: #475569;
  --bg-soft: #f8fafc;
}

* { -webkit-font-smoothing: antialiased; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Noto Sans TC', system-ui, -apple-system, 'Microsoft JhengHei', sans-serif;
  color: var(--ink);
  background: var(--bg-soft);
}

/* ===== Hero gradient ===== */
.hero-gradient {
  background:
    radial-gradient(ellipse at top right, rgba(8, 145, 178, 0.35), transparent 60%),
    radial-gradient(ellipse at bottom left, rgba(13, 148, 136, 0.25), transparent 50%),
    linear-gradient(135deg, #0c4a6e 0%, #075985 50%, #0e7490 100%);
}

.page-hero-gradient {
  background:
    radial-gradient(ellipse at top right, rgba(8, 145, 178, 0.25), transparent 55%),
    linear-gradient(135deg, #0c4a6e 0%, #0e7490 100%);
}

/* ===== Wave divider ===== */
.wave-divider {
  position: relative;
  height: 80px;
  overflow: hidden;
}
.wave-divider svg {
  position: absolute;
  bottom: -1px;
  width: 100%;
  height: 100%;
}

/* ===== Animated entrance ===== */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .8s ease, transform .8s ease;
}
.fade-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Cards ===== */
.card {
  background: white;
  border-radius: 16px;
  padding: 1.75rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .06), 0 1px 2px rgba(15, 23, 42, .04);
  transition: transform .3s ease, box-shadow .3s ease;
  border: 1px solid rgba(226, 232, 240, .8);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px -8px rgba(8, 145, 178, .15), 0 4px 12px rgba(15, 23, 42, .08);
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .85rem 1.75rem;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: .03em;
  transition: all .25s ease;
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, #fb923c, #f97316);
  color: white;
  box-shadow: 0 8px 20px -6px rgba(251, 146, 60, .55);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -6px rgba(251, 146, 60, .7);
}
.btn-ghost {
  background: rgba(255, 255, 255, .12);
  color: white;
  border: 1.5px solid rgba(255, 255, 255, .35);
  backdrop-filter: blur(8px);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, .22);
  border-color: rgba(255, 255, 255, .6);
}
.btn-ocean {
  background: linear-gradient(135deg, #0891b2, #0e7490);
  color: white;
  box-shadow: 0 8px 20px -6px rgba(8, 145, 178, .5);
}
.btn-ocean:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -6px rgba(8, 145, 178, .65);
}

/* ===== Nav ===== */
.nav-link {
  position: relative;
  padding: .5rem .25rem;
  color: var(--slate);
  font-weight: 500;
  transition: color .2s;
}
.nav-link:hover { color: var(--ocean-deep); }
.nav-link.active { color: var(--ocean-deep); font-weight: 600; }
.nav-link::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: linear-gradient(90deg, #0891b2, #0d9488);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s ease;
}
.nav-link.active::after,
.nav-link:hover::after { transform: scaleX(1); }

/* ===== Section ===== */
.section-title {
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  font-weight: 800;
  color: var(--ocean-deep);
  letter-spacing: -.02em;
  position: relative;
  padding-bottom: .85rem;
  margin-bottom: 2rem;
}
.section-title::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 56px; height: 4px;
  background: linear-gradient(90deg, #0891b2, #fbbf24);
  border-radius: 2px;
}
.section-title.center {
  text-align: center;
}
.section-title.center::after {
  left: 50%;
  transform: translateX(-50%);
}

/* ===== Tag ===== */
.tag {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .25rem .75rem;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .02em;
}
.tag-ocean { background: #e0f2fe; color: #0369a1; }
.tag-teal  { background: #ccfbf1; color: #0f766e; }
.tag-sand  { background: #fef3c7; color: #b45309; }
.tag-coral { background: #ffedd5; color: #c2410c; }

/* ===== Timeline (agenda) ===== */
.timeline-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 1.25rem;
  padding: 1.5rem 0;
  border-top: 1px dashed #cbd5e1;
}
.timeline-row:first-child { border-top: 0; }
.timeline-time {
  font-weight: 700;
  color: var(--ocean-deep);
  font-variant-numeric: tabular-nums;
  font-size: 1.05rem;
  position: relative;
  padding-left: 1.25rem;
}
.timeline-time::before {
  content: '';
  position: absolute;
  left: 0; top: .55rem;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0891b2, #0d9488);
  box-shadow: 0 0 0 4px rgba(8, 145, 178, .15);
}

@media (max-width: 640px) {
  .timeline-row {
    grid-template-columns: 1fr;
    gap: .75rem;
  }
  .timeline-time { font-size: 1rem; }
}

/* ===== Track box (parallel session) ===== */
.track-box {
  border-radius: 14px;
  padding: 1rem 1.25rem;
  border: 1px solid #e2e8f0;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}
.track-label {
  display: inline-block;
  font-weight: 700;
  font-size: .8rem;
  padding: .15rem .55rem;
  border-radius: 6px;
  margin-bottom: .35rem;
  letter-spacing: .04em;
}

/* ===== Decorative dots ===== */
.dot-pattern {
  background-image: radial-gradient(circle at 1px 1px, rgba(8, 145, 178, .15) 1px, transparent 0);
  background-size: 24px 24px;
}

/* ===== Footer ===== */
.footer-bg {
  background:
    radial-gradient(ellipse at top, rgba(8, 145, 178, 0.18), transparent 60%),
    linear-gradient(180deg, #0c4a6e 0%, #082f49 100%);
}

/* ===== Markdown 內容（CMS 富文字欄位渲染出的 HTML） ===== */
[x-html] img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  margin: 0.75em 0;
  display: block;
  box-shadow: 0 4px 12px rgba(8, 145, 178, 0.12);
}
[x-html] a {
  color: var(--ocean-blue);
  text-decoration: underline;
  text-underline-offset: 2px;
}
[x-html] a:hover { color: var(--ocean-cyan); }
[x-html] ul { list-style: disc; padding-left: 1.25em; margin: 0.5em 0; }
[x-html] ol { list-style: decimal; padding-left: 1.25em; margin: 0.5em 0; }
[x-html] li { margin: 0.25em 0; }
[x-html] h1 { font-size: 1.5em; font-weight: 700; margin: 0.6em 0 0.3em; color: var(--ocean-deep); }
[x-html] h2 { font-size: 1.3em; font-weight: 700; margin: 0.6em 0 0.3em; color: var(--ocean-deep); }
[x-html] h3 { font-size: 1.15em; font-weight: 700; margin: 0.5em 0 0.25em; color: var(--ocean-deep); }
[x-html] h4 { font-size: 1.05em; font-weight: 700; margin: 0.4em 0 0.2em; }
[x-html] blockquote {
  border-left: 4px solid var(--ocean-cyan);
  padding: 0.4em 0 0.4em 1em;
  margin: 0.5em 0;
  color: #475569;
  background: rgba(8, 145, 178, 0.05);
  border-radius: 0 6px 6px 0;
}
[x-html] code {
  background: #f1f5f9;
  padding: 0.1em 0.35em;
  border-radius: 4px;
  font-size: 0.9em;
  color: #be185d;
}
[x-html] pre {
  background: #0f172a;
  color: #e2e8f0;
  padding: 0.75em 1em;
  border-radius: 8px;
  overflow-x: auto;
  font-size: 0.9em;
}
[x-html] pre code { background: transparent; color: inherit; padding: 0; }
[x-html] table {
  border-collapse: collapse;
  margin: 0.75em 0;
  width: 100%;
}
[x-html] th, [x-html] td {
  border: 1px solid #e2e8f0;
  padding: 0.4em 0.7em;
  text-align: left;
}
[x-html] th { background: #f8fafc; font-weight: 600; }
