:root {
  /* 基礎設定 */
  --width: 720px;
  --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-secondary: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-scale: 1em;
  
  /* 🎨 質感奢華配色 - 淺色模式 */
  --background-color: #fefefe;           /* 溫暖米白背景 */
  --heading-color: #2d2d2d;              /* 深灰標題 */
  --text-color: #4a4a4a;                 /* 柔和文字灰 */
  --link-color: #b8954d;                 /* 深金色連結 */
  --visited-color: #9a7d42;              /* 訪問過的連結 */
  --blockquote-color: #666666;           /* 引用文字 */
  
  /* 質感延伸色彩 */
  --bg-primary: #f8f7f4;                 /* 主背景 */
  --bg-secondary: #ffffff;               /* 次要背景（卡片） */
  --text-primary: #2d2d2d;               /* 主文字 */
  --text-secondary: #666666;             /* 次要文字 */
  --accent-gold: #c9a961;                /* 主金色 */
  --accent-gold-dark: #b8954d;           /* 深金色 */
  --accent-gold-light: #e5d4a6;          /* 淺金色 */
  --border-color: #e8e6e3;               /* 邊框色 */
  --muted-text: #999999;                 /* 柔和文字 */

  /* 陰影系統 */
  --shadow-subtle: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-medium: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 8px 24px rgba(201, 169, 97, 0.15);
}

@media (prefers-color-scheme: dark) {
  :root {
    /* 🌙 深色模式配色（柔和版本） */
    --background-color: #2a2a2a;         /* 柔和深灰背景 */
    --heading-color: #e8e6e3;            /* 淺色標題 */
    --text-color: #c0c0c0;               /* 柔和灰文字 */
    --link-color: #d4b77a;               /* 淺金色連結 */
    --visited-color: #b8954d;            /* 訪問過的連結 */
    --blockquote-color: #d0d0d0;         /* 引用文字 */
    
    /* 深色模式延伸色彩 */
    --bg-primary: #2a2a2a;               /* 主背景（柔和深灰） */
    --bg-secondary: #353535;             /* 次要背景（略亮） */
    --text-primary: #e8e6e3;             /* 主文字 */
    --text-secondary: #b0b0b0;           /* 次要文字 */
    --accent-gold: #d4b77a;              /* 主金色（深色模式調亮） */
    --accent-gold-dark: #c9a961;         /* 深金色 */
    --accent-gold-light: #e5d4a6;        /* 淺金色 */
    --border-color: #454545;             /* 邊框色（更明顯） */
    --muted-text: #909090;               /* 柔和文字 */

    /* 深色模式陰影（較柔和） */
    --shadow-subtle: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-medium: 0 4px 16px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 8px 24px rgba(212, 183, 122, 0.15);
  }
}

html {
  overflow-y: scroll;
}

/* layouts/shortcodes/figure.html */
figure {
  margin: 1.5rem 0;
  text-align: center;
}

figure img {
  max-width: 100%;
  height: auto;
  border-radius: 8px; /* 可選 */
}

figure figcaption {
  color: var(--muted-text);              /* 淺灰色 */
  font-size: 0.9em;         /* 比正文小 */
  line-height: 1.4;
  font-style: normal;       /* 若不想斜體可刪掉 */
}

figure figcaption p {
  margin: 0;                /* 避免 caption 過度 spacing */
}

/* layouts/shortcodes/avatar.html */
/* Avatar Card 基礎樣式 */
.avatar-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0;
}

.avatar-img {
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent-gold);
  flex-shrink: 0;
}

.avatar-info {
  flex: 1;
}

.avatar-name {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--heading-color);
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.avatar-bio {
  margin: 0.2rem 0 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* 尺寸變化 */
.avatar .avatar-img {
  width: 80px;
  height: 80px;
}

.avatar .avatar-name {
  font-size: 1rem;
}

.avatar .avatar-bio {
  font-size: 0.85rem;
}

/* calendar icon */
.post-date i {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}

.icon-calendar {
  width: 14px;
  height: 14px;
  margin-bottom: 2px;
  fill: currentColor;
}

/* timeline */
.timeline-wrapper {
  max-width: 800px;
  margin: 2rem auto;
}

.timeline-year-block {
  margin-bottom: 3rem;
}

.year-title {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 1.5rem;
  color: var(--text-color, #333);
}

.post-count {
  font-size: 14px;
  color: var(--muted-text, #666);
}

.timeline-list {
  list-style: none;
  padding: 0;
  margin: 0;
  position: relative;
}

/* 時間軸主線 */
.timeline-list::before {
  content: '';
  position: absolute;
  left: 67px; /* 45px (date width) + 15px (date padding-right) + 16px (marker center) */
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border-color, #e0e0e0);
}

.timeline-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 20px;
  position: relative;
}

.timeline-date {
  flex-shrink: 0;
  width: 50px;          /* ⭐ 固定寬度，依你的設計可調 */
  font-size: 14px;
  color: var(--muted-text, #666);
  text-align: left;
  padding-top: 6px;
}

.timeline-marker {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--background-color);
  border: 2px solid;
  margin-right: 15px;
  position: relative;
  z-index: 1;
}

.timeline-icon {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* Icon colors */
.icon-gray { border-color: var(--muted-text); color: var(--muted-text); }
.icon-blue { border-color: #2196f3; color: #2196f3; }
.icon-green { border-color: #4caf50; color: #4caf50; }
.icon-red { border-color: #f44336; color: #f44336; }
.icon-orange { border-color: #ff9800; color: #ff9800; }
.icon-purple { border-color: #9c27b0; color: #9c27b0; }
.icon-pink { border-color: #e91e63; color: #e91e63; }
.icon-teal { border-color: #009688; color: #009688; }

.timeline-content {
  flex: 1;
  padding-top: 6px;
}

.timeline-post-link {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-color, #333);
  text-decoration: none;
  display: inline-block;
  transition: color 0.2s;
}

.timeline-post-link:hover {
  color: var(--link-color, #2196f3);
}

.timeline-post-tags {
  margin: 0;
  font-size: 14px;
}

.timeline-post-tags a {
  color: var(--muted-text, #666);
  text-decoration: none;
  margin-right: 0.5rem;
  transition: color 0.2s;
}

.timeline-post-tags a:hover {
  color: var(--link-color, #2196f3);
  text-decoration: underline;
}

/* Tag Filter Header Styles */
.tag-filter-header {
  max-width: 800px;
  margin: 0 auto 2rem;
  padding: 0 1rem;
}

.filter-title {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-color, #333);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.filter-icon {
  width: 20px;
  height: 20px;
  color: var(--link-color, #2196f3);
}

.remove-filter {
  color: var(--muted-text, #666);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.remove-filter:hover {
  color: var(--link-color, #2196f3);
}

/* timeline shortcode */
.timeline-shortcode {
  list-style: none;
  padding: 0;
  margin: 0;
  position: relative;
}

.timeline-shortcode::before {
    content: '';
    position: absolute;
    left: 17px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-color, #e0e0e0);