*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Noto Sans TC', -apple-system, sans-serif;
  background: #FDFDFF;
  color: #1F2937;
  line-height: 1.9;
}

/* ═══════════════════════════════════════════
   NAV — 共用導覽列（文章頁 / 文章列表頁）
   首頁與關於我頁面為 inline style，與此同步
   ═══════════════════════════════════════════ */

.sticky-nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(25px);
  border-bottom: 1px solid rgba(0,0,0,0.03);
}

.nav-container {
  max-width: 1100px; margin: 0 auto;
  padding: 1.25rem 2rem;
  display: flex; justify-content: space-between; align-items: center;
}

.nav-logo {
  font-size: 20px; font-weight: 900;
  color: #1F2937; text-decoration: none;
  letter-spacing: -0.02em; flex-shrink: 0;
}

.nav-logo span { color: #5D5FEF; }

/* 桌面：橫排連結 */
.nav-links {
  display: flex; align-items: center; gap: 2.5rem;
  font-size: 13px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: #94A3B8;
}

.nav-links a {
  text-decoration: none; color: inherit;
  transition: color 0.2s;
}

.nav-links a:hover { color: #5D5FEF; }

.nav-cta {
  background: #5D5FEF;
  color: white !important;
  padding: 0.5rem 1.5rem;
  border-radius: 9999px;
  font-weight: 700;
  white-space: nowrap;
  transition: all 0.3s;
}

.nav-cta:hover {
  opacity: 0.88;
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(93,95,239,0.3);
}

/* 漢堡按鈕（手機才顯示） */
.nav-burger {
  display: none;
  flex-direction: column; justify-content: center; align-items: center;
  gap: 5px; width: 36px; height: 36px;
  background: none; border: none; cursor: pointer; padding: 4px;
  flex-shrink: 0;
}

.nav-burger span {
  display: block; width: 22px; height: 2px;
  background: #1F2937; border-radius: 2px;
  transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
  transform-origin: center;
}

/* 漢堡 → ✕ 動畫 */
.nav-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* 手機下拉選單 */
.nav-mobile {
  display: none;
  flex-direction: column;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(25px);
  padding: 1rem 2rem 1.5rem;
  border-top: 1px solid rgba(93,95,239,0.08);
  gap: 0.25rem;
}

.nav-mobile.open { display: flex; }

.nav-mobile a {
  font-size: 14px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: #64748B; text-decoration: none;
  padding: 0.75rem 0.5rem;
  border-bottom: 1px solid rgba(0,0,0,0.04);
  transition: color 0.2s;
}

.nav-mobile a:last-child { border-bottom: none; }
.nav-mobile a:hover { color: #5D5FEF; }

.nav-mobile .nav-cta {
  margin-top: 0.75rem;
  text-align: center;
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  border-bottom: none !important;
}

/* RWD 斷點 */
@media (max-width: 640px) {
  .nav-links { display: none; }
  .nav-burger { display: flex; }
  .nav-container { padding: 1rem 1.25rem; }
}


/* ═══════════════════════════════════════════
   文章列表頁
   ═══════════════════════════════════════════ */

.blog-wrap {
  max-width: 860px; margin: 4rem auto;
  padding: 0 2rem;
}

.section-title {
  font-size: 32px; font-weight: 900;
  color: #1F2937; margin-bottom: 2rem;
  letter-spacing: -0.02em;
}

.post-list { display: flex; flex-direction: column; }

.post-list-item {
  display: block;
  padding: 2rem 0;
  border-bottom: 1px solid rgba(93,95,239,0.08);
  text-decoration: none;
  color: inherit;
  transition: all 0.2s;
}

.post-list-item:hover .post-list-title { color: #5D5FEF; }

.post-list-meta {
  display: flex; align-items: center;
  gap: 0.75rem; margin-bottom: 0.6rem;
}

.post-list-date { font-size: 12px; color: #9CA3AF; }

.post-list-tags { display: flex; gap: 0.4rem; }

.list-tag {
  font-size: 12px; font-weight: 900;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: #5D5FEF;
  background: rgba(93,95,239,0.08);
  padding: 2px 8px; border-radius: 20px;
}

.post-list-title {
  font-size: 20px; font-weight: 700;
  color: #1F2937; margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
  transition: color 0.2s;
}

.post-list-excerpt {
  font-size: 14px; color: #6B7280;
  line-height: 1.9;
}


/* ═══════════════════════════════════════════
   單篇文章頁
   ═══════════════════════════════════════════ */

.post-wrap {
  max-width: 720px; margin: 4rem auto 0;
  padding: 0 2rem 0.5rem !important;
}

.post-meta {
  display: flex; align-items: center;
  gap: 0.75rem; margin-bottom: 1.5rem;
}

.post-tag {
  font-size: 12px; font-weight: 900;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: #5D5FEF;
  background: rgba(93,95,239,0.08);
  padding: 3px 10px; border-radius: 20px;
}

.post-date { font-size: 12px; color: #9CA3AF; }

.post-title {
  font-size: 36px; font-weight: 900;
  color: #1F2937; line-height: 1.2;
  letter-spacing: -0.02em; margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(93,95,239,0.1);
}

.post-content { font-size: 16px; color: #374151; line-height: 1.9; }

.post-content h1, .post-content h2, .post-content h3 {
  font-weight: 700; color: #1F2937;
  margin: 2rem 0 1rem; letter-spacing: -0.01em;
}

.post-content h1 { font-size: 26px; }
.post-content h2 { font-size: 22px; }
.post-content h3 { font-size: 18px; }
.post-content p { margin-bottom: 1.25rem; }
.post-content a { color: #5D5FEF; }
.post-content strong { font-weight: 700; color: #1F2937; }

.post-content ul, .post-content ol {
  padding-left: 1.5rem; margin-bottom: 1.25rem;
}

.post-content li { margin-bottom: 0.4rem; list-style-type: disc; }

.post-content ul ul,
.post-content ol ul,
.post-content ul ol {
  padding-left: 1.5rem;
  margin-bottom: 0;
  list-style-type: circle;
}

.post-content ul ul ul,
.post-content ol ul ul {
  padding-left: 1.5rem;
  list-style-type: square;
}

@media (max-width: 640px) {
  .blog-wrap, .post-wrap { margin: 2rem auto; padding: 0 1rem; }
  .post-title { font-size: 26px; }
  .section-title { font-size: 24px; }
}


/* ═══════════════════════════════════════════
   Highlight 樣式
   ═══════════════════════════════════════════ */

mark.hl-yellow {
  background: linear-gradient(
    120deg,
    rgba(250,199,117,0) 0%,
    rgba(250,199,117,0.6) 10%,
    rgba(250,199,117,0.6) 90%,
    rgba(250,199,117,0) 100%
  );
  padding: 0 3px;
  border-radius: 2px;
  color: inherit;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.hl-block {
  background: rgba(93,95,239,0.08);
  border-left: 3px solid #5D5FEF;
  padding: 0.75rem 1rem;
  border-radius: 0 6px 6px 0;
  margin: 1rem 0;
  color: #3C3489;
  font-weight: 600;
  line-height: 1.9;
}


/* ═══════════════════════════════════════════
   下載區塊
   ═══════════════════════════════════════════ */

@keyframes dlPulse {
  0%   { transform: scale(1); opacity: 0.5; }
  100% { transform: scale(1.05); opacity: 0; }
}

@keyframes dlFloat {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(5px); }
}

.download-section {
  margin-top: 3rem;
  padding-top: 2.5rem;
  border-top: 1px solid rgba(93,95,239,0.1);
}

.download-block {
  position: relative;
  display: block;
  text-decoration: none;
  border: 1.5px solid rgba(93,95,239,0.25);
  border-radius: 20px;
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  overflow: hidden;
  background: white;
  transition: transform 0.3s cubic-bezier(0.165,0.84,0.44,1), border-color 0.3s, box-shadow 0.3s;
}

.download-block::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(93,95,239,0.08) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.4s;
  border-radius: 20px;
}

.download-block:hover {
  transform: translateY(-6px);
  border-color: #5D5FEF;
  box-shadow: 0 20px 40px rgba(93,95,239,0.18);
}

.download-block:hover::before { opacity: 1; }

.download-block:hover .dl-icon-wrap {
  background: #5D5FEF;
  transform: scale(1.1);
}

.download-block:hover .dl-icon-wrap svg { stroke: white; }

.download-block:hover .dl-arrow {
  opacity: 1;
  transform: translateY(0);
}

.download-block:active { transform: translateY(-3px) scale(0.98); }

.dl-pulse {
  position: absolute; inset: -2px;
  border-radius: 22px;
  border: 2px solid rgba(93,95,239,0.3);
  animation: dlPulse 2.5s ease-out infinite;
  pointer-events: none;
}

.dl-icon-wrap {
  width: 56px; height: 56px;
  background: rgba(93,95,239,0.1);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1rem;
  transition: background 0.3s, transform 0.3s;
}

.dl-icon-wrap svg {
  animation: dlFloat 2s ease-in-out infinite;
  stroke: #5D5FEF;
  transition: stroke 0.3s;
}

.dl-title {
  font-size: 16px; font-weight: 700;
  color: #1F2937;
}

.dl-arrow {
  position: absolute;
  top: 16px; right: 20px;
  font-size: 12px; font-weight: 700;
  color: #5D5FEF;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.3s, transform 0.3s;
  letter-spacing: 0.05em;
}


/* ═══════════════════════════════════════════
   分享按鈕 & 按讚
   ═══════════════════════════════════════════ */

.share-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 1rem;
}

.share-btn {
  width: 46px; height: 46px;
  border-radius: 50%;
  border: none;
  background: transparent;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s;
}

.share-btn:hover { background: rgba(93,95,239,0.08); }
.share-btn svg { width: 24px; height: 24px; }

.post-footer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1.25rem 0 0.75rem;
  border-top: 1px solid rgba(93,95,239,0.1);
}

.like-area {
  display: flex;
  align-items: center;
  gap: 14px;
}

.like-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 8px 10px;
  border-radius: 9999px;
  transition: background 0.2s, transform 0.2s;
}

.like-btn:hover { background: rgba(93,95,239,0.08); }

.like-heart { font-size: 16px; line-height: 1; }

.like-count {
  font-size: 14px;
  font-weight: 700;
  color: #5D5FEF;
}

.like-msg {
  font-size: 13px;
  color: #6B7280;
  line-height: 1.4;
}

@media (max-width: 640px) {
  .post-footer-bar .share-bar { margin-bottom: 0; }
  .post-footer-bar { flex-direction: column; align-items: flex-start; }
  .share-bar--top { display: none; }
}


/* ═══════════════════════════════════════════
   重點資訊卡
   用法：{{card:重點整理 | 標題 | 說明文字}}
   ═══════════════════════════════════════════ */

.info-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border-radius: 10px;
  padding: 0.7rem 1rem;
  margin: 0.75rem 0;
  border: 1px solid transparent;
}

.info-card__icon {
  width: 24px; height: 24px;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  margin-top: -2px;
}

.info-card__body { flex: 1; }

.info-card__row {
  margin-top: 8px;
}

.info-card__row:first-of-type {
  margin-top: 0;
}

.info-card__label {
  font-size: 16px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  margin: 0 0 8px;
  line-height: 1.3;
}

.info-card__title {
  font-size: 16px; font-weight: 700;
  color: #1F2937;
  margin: 0 0 8px !important;
  line-height: 1.4;
}

.info-card__desc {
  font-size: 16px;
  color: #6B7280;
  margin: 0 !important;
  line-height: 1.9;
}

/* 紫色（重點整理） */
.info-card--purple {
  background: rgba(93,95,239,0.06);
  border-color: rgba(93,95,239,0.18);
}
.info-card--purple .info-card__icon {
  background: rgba(93,95,239,0.12);
  color: #534AB7;
}
.info-card--purple .info-card__label { color: #534AB7; }

/* 綠色（實用技巧） */
.info-card--teal {
  background: rgba(29,158,117,0.05);
  border-color: rgba(29,158,117,0.2);
}
.info-card--teal .info-card__icon {
  background: rgba(29,158,117,0.12);
  color: #0F6E56;
}
.info-card--teal .info-card__label { color: #0F6E56; }

/* 橘色（注意事項 / 小提醒） */
.info-card--amber {
  background: rgba(186,117,23,0.05);
  border-color: rgba(186,117,23,0.2);
}
.info-card--amber .info-card__icon {
  background: rgba(186,117,23,0.12);
  color: #854F0B;
}
.info-card--amber .info-card__label { color: #854F0B; }

/* 藍色（延伸閱讀） */
.info-card--blue {
  background: rgba(55,138,221,0.05);
  border-color: rgba(55,138,221,0.2);
}
.info-card--blue .info-card__icon {
  background: rgba(55,138,221,0.12);
  color: #185FA5;
}
.info-card--blue .info-card__label { color: #185FA5; }

/* 喜歡的地方 — B2 上邊線風格 */
.info-card--green {
  background: #ffffff;
  border-color: rgba(93,95,239,0.15);
  border-top: 3px solid #5D5FEF;
  border-radius: 0 0 10px 10px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.info-card--green:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 32px rgba(93,95,239,0.15);
}
.info-card--green .info-card__icon {
  background: rgba(93,95,239,0.08);
  color: #534AB7;
}
.info-card--green .info-card__label { color: #534AB7; }

/* 不喜歡的地方 — B2 上邊線風格（淡） */
.info-card--red {
  background: rgba(93,95,239,0.03);
  border-color: rgba(93,95,239,0.1);
  border-top: 3px solid #AFA9EC;
  border-radius: 0 0 10px 10px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.info-card--red:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 32px rgba(93,95,239,0.08);
}
.info-card--red .info-card__icon {
  background: rgba(175,169,236,0.12);
  color: #AFA9EC;
}
.info-card--red .info-card__label { color: #AFA9EC; }

/* ═══════════════════════════════════════════
   行內 Highlight
   用法：@@文字@@
   ═══════════════════════════════════════════ */

.hl-inline {
  color: #5D5FEF;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: #5D5FEF;
}

/* ═══════════════════════════════════════════
   數據分享區塊
   用法：{{datablock: ... }}
   ═══════════════════════════════════════════ */

.data-block {
  border-left: 3px solid #5D5FEF;
  padding: 4px 0 4px 16px;
  margin: 1.5rem 0;
}

.data-block__header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}

.data-block__label {
  font-size: 13px;
  font-weight: 700;
  color: #5D5FEF;
  letter-spacing: 0.06em;
}

.data-block__item {
  padding: 10px 0;
  border-top: 0.5px solid rgba(93,95,239,0.15);
}

.data-block__item:first-of-type {
  border-top: none;
  padding-top: 0;
}

.data-block__title {
  font-size: 16px;
  color: #1F2937;
  line-height: 1.9;
  margin: 0 0 2px !important;
}

.data-block__desc {
  font-size: 16px;
  color: #6B7280;
  line-height: 1.9;
  margin: 0 !important;
}

/* ═══════════════════════════════════════════
   文章分隔線
   用法：Notion 分隔線 → ---
   ═══════════════════════════════════════════ */

hr.post-divider {
  border: none;
  border-top: 1.5px solid rgba(93,95,239,0.25);
  margin: 2rem 0;
}

/* ═══════════════════════════════════════════
   引言區塊
   用法：{{quote:文字內容}}
   ═══════════════════════════════════════════ */

.quote-block {
  position: relative;
  padding: 1.75rem 2rem;
  margin: 1.5rem 0;
  font-size: 16px;
  color: #374151;
  line-height: 1.9;
}

.quote-block::before,
.quote-block::after {
  content: '';
  position: absolute;
  width: 28px;
  height: 28px;
  border-color: #5D5FEF;
  border-style: solid;
  border-width: 0;
  transition: width 0.3s ease, height 0.3s ease;
}

.quote-block::before {
  top: 0;
  left: 0;
  border-top-width: 4px;
  border-left-width: 4px;
}

.quote-block::after {
  bottom: 0;
  right: 0;
  border-bottom-width: 4px;
  border-right-width: 4px;
}

.quote-block:hover::before,
.quote-block:hover::after {
  width: 48px;
  height: 48px;
}
