/* ============================================
   羅世宏個人網站 | 主視覺樣式
   設計方向：學術期刊 × 歐洲報紙 × 台灣知識份子
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+TC:wght@300;400;500;700&family=Noto+Sans+TC:wght@300;400;500&family=EB+Garamond:ital,wght@0,400;0,600;1,400&display=swap');

/* ── 設計代幣 ── */
:root {
  --ink:        #1a1f2e;       /* 深墨藍，主文字色 */
  --ink-mid:    #3d4460;       /* 中階藍，次要文字 */
  --ink-light:  #8890a8;       /* 淺藍灰，輔助元素 */
  --muted:      #8890a8;       /* 舊版輔助文字變數，保留向後相容 */
  --paper:      #f7f5f0;       /* 暖白紙色，底色 */
  --paper-dark: #edeae3;       /* 稍深紙色，區塊分隔 */
  --accent:     #2e4a8c;       /* 學術深藍，強調色 */
  --rule:       #c8c3b8;       /* 細線色 */
  --serif:      'Noto Serif TC', 'EB Garamond', Georgia, serif;
  --sans:       'Noto Sans TC', 'Helvetica Neue', sans-serif;
  --garamond:   'EB Garamond', Georgia, serif;
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 18px; scroll-behavior: smooth; }

body {
  font-family: var(--serif);
  background-color: var(--paper);
  color: var(--ink);
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
}

/* ── 簽名元素：頂部報頭線 ── */
body::before {
  content: '';
  display: block;
  height: 4px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--ink) 60%, var(--accent) 100%);
}

/* ── 排版 ── */
h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink);
}

h1 { font-size: 2.2rem; letter-spacing: -0.02em; }
h2 { font-size: 1.5rem; letter-spacing: -0.01em; }
h3 { font-size: 1.15rem; }
h4 { font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.08em; font-family: var(--sans); font-weight: 500; color: var(--ink-mid); }

p { margin-bottom: 1.2em; }
a { color: var(--accent); text-decoration: none; border-bottom: 1px solid transparent; transition: border-color 0.2s; }
a:hover { border-bottom-color: var(--accent); }

/* ── 導覽列 ── */
.site-header {
  background: var(--ink);
  padding: 0 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.site-logo {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 2px;
  border: none;
  text-decoration: none;
  padding: 6px 0;
  transition: opacity 0.2s;
}
.site-logo:hover { border: none; opacity: 0.8; }

.logo-zh {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: rgba(247,245,240,0.95);
  line-height: 1;
}

.logo-divider {
  display: block;
  width: 100%;
  height: 1px;
  background: rgba(125,164,232,0.45);
  margin: 3px 0 2px;
}

.logo-en {
  font-family: var(--garamond);
  font-style: italic;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: rgba(247,245,240,0.45);
  line-height: 1;
  padding-left: 1px;
}

/* 英文 Bio（首頁 hero 區） */
.hero-desc-en {
  max-width: 680px;
  font-family: var(--garamond);
  font-size: 0.92rem;
  font-style: italic;
  line-height: 1.85;
  color: rgba(247,245,240,0.52);
  margin-top: 0.6rem;
  padding-top: 0.8rem;
  border-top: 1px solid rgba(247,245,240,0.10);
}

@media (max-width: 768px) {
  .logo-zh { font-size: 1rem; }
  .logo-en  { font-size: 0.68rem; }
  .hero-desc-en { font-size: 0.86rem; }
}

.site-nav { display: flex; gap: 0; }
.site-nav a {
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 400;
  color: rgba(247,245,240,0.7);
  padding: 0 1rem;
  height: 60px;
  display: flex;
  align-items: center;
  border: none;
  letter-spacing: 0.03em;
  transition: color 0.2s, background 0.2s;
}
.site-nav a:hover { color: var(--paper); background: rgba(255,255,255,0.06); }
.site-nav a.active { color: var(--paper); border-bottom: 2px solid var(--accent); }

/* ── 首頁英雄區 ── */
.hero {
  background: var(--ink);
  color: var(--paper);
  padding: 5rem 2rem 4rem;
}

.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 220px 1fr 280px;
  gap: 3.5rem;
  align-items: start;
}

/* 照片欄 */
.hero-photo-col {
  padding-top: 0.5rem;
}

.hero-photo-wrap {
  width: 200px;
  height: 200px;
  border-radius: 100%;
  overflow: hidden;
  border: 3px solid rgba(125, 164, 232, 0.4);
  box-shadow: 0 0 0 6px rgba(125, 164, 232, 0.1);
}

.hero-photo {
  width: 200%;
  height: 200%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.hero-eyebrow {
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  /* accent 在深色背景太暗，改用亮版 */
  color: #7da4e8;
  margin-bottom: 1.2rem;
}

.hero h1 {
  color: var(--paper);
  font-size: 3rem;
  line-height: 1.15;
  margin-bottom: 0.3rem;
}

.hero-name-en {
  font-family: var(--garamond);
  font-style: italic;
  font-size: 1.3rem;
  color: rgba(247,245,240,0.5);
  margin-bottom: 2rem;
  display: block;
}

.hero-rule {
  width: 48px;
  height: 2px;
  background: #7da4e8;
  margin-bottom: 1.8rem;
}

.hero-desc {
  font-size: 1.05rem;
  line-height: 1.9;
  color: rgba(247,245,240,0.82);
  max-width: 560px;
}

.hero-links {
  display: flex;
  gap: 1rem;
  margin-top: 2.5rem;
  flex-wrap: wrap;
}

.btn-primary {
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  padding: 0.65rem 1.5rem;
  background: var(--accent);
  color: var(--paper);
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-primary:hover { background: #4060a8; border: none; }

.btn-ghost {
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  padding: 0.65rem 1.5rem;
  background: transparent;
  color: rgba(247,245,240,0.7);
  border: 1px solid rgba(247,245,240,0.25);
  transition: all 0.2s;
}
.btn-ghost:hover { color: var(--paper); border-color: rgba(247,245,240,0.6); }

/* 右欄：研究領域卡 */
.hero-fields {
  border-left: 1px solid rgba(247,245,240,0.12);
  padding-left: 2.5rem;
  padding-top: 0.5rem;
}

.fields-label {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(247,245,240,0.4);
  margin-bottom: 1.2rem;
}

.field-item {
  font-family: var(--sans);
  font-size: 0.88rem;
  color: rgba(247,245,240,0.75);
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(247,245,240,0.08);
  display: flex;
  align-items: center;
  gap: 0.7rem;
}
.field-item::before { content: '—'; color: #7da4e8; font-size: 0.7rem; }

/* ── 主要內容區 ── */
.page-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

.section-label {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-light);
  margin-bottom: 2rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--rule);
}

/* ── 書籍格狀列表 ── */
.books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 2.5rem;
  margin-top: 2rem;
}

.book-card {
  display: flex;
  flex-direction: column;
}

.book-cover {
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
  display: block;
  border: 1px solid var(--rule);
  transition: opacity 0.2s;
}
.book-cover:hover { opacity: 0.85; }

.book-title {
  font-family: var(--serif);
  font-size: 0.9rem;
  font-weight: 500;
  margin-top: 0.8rem;
  color: var(--ink);
  line-height: 1.5;
}

.book-year {
  font-family: var(--sans);
  font-size: 0.75rem;
  color: var(--ink-light);
  margin-top: 0.3rem;
}

/* ── 論文清單 ── */
.pub-list { list-style: none; }
.pub-item {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 3rem 1fr;
  gap: 1rem;
  align-items: start;
}

.pub-year {
  font-family: var(--sans);
  font-size: 0.8rem;
  color: var(--ink-light);
  padding-top: 0.2rem;
}

.pub-title {
  font-family: var(--serif);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 0.3rem;
}

.pub-meta {
  font-family: var(--sans);
  font-size: 0.8rem;
  color: var(--ink-mid);
  font-style: italic;
}

/* ── 評論文章清單 ── */
.commentary-list { list-style: none; }
.commentary-item {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: baseline;
}

.commentary-title {
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 500;
}
.commentary-title a { color: var(--ink); }
.commentary-title a:hover { color: var(--accent); border: none; }

.commentary-meta {
  font-family: var(--sans);
  font-size: 0.78rem;
  color: var(--ink-light);
  white-space: nowrap;
}

/* ── 一般頁面內文 ── */
.prose {
  max-width: 680px;
  font-size: 1rem;
  line-height: 1.9;
}
.prose h2 { margin: 2.5rem 0 1rem; padding-bottom: 0.5rem; border-bottom: 1px solid var(--rule); }
.prose h3 { margin: 2rem 0 0.8rem; color: var(--ink-mid); }
.prose ul { padding-left: 1.5rem; margin-bottom: 1.2em; }
.prose li { margin-bottom: 0.4em; }

/* ── 頁尾 ── */
.site-footer {
  background: var(--ink);
  color: rgba(247,245,240,0.45);
  padding: 3rem 2rem;
  margin-top: 4rem;
  border-top: 4px solid var(--accent);
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-name {
  font-family: var(--serif);
  font-size: 0.9rem;
  color: rgba(247,245,240,0.65);
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}
.footer-links a {
  font-family: var(--sans);
  font-size: 0.78rem;
  color: rgba(247,245,240,0.4);
  border: none;
  transition: color 0.2s;
}
.footer-links a:hover { color: rgba(247,245,240,0.75); border: none; }

.footer-copy {
  font-family: var(--sans);
  font-size: 0.75rem;
  width: 100%;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(247,245,240,0.08);
}

/* ── 行動裝置 ── */
/* 漢堡按鈕：桌機隱藏 */
.nav-toggle { display: none; }

@media (max-width: 768px) {
  html { font-size: 16px; }
  .hero-inner { grid-template-columns: 1fr; gap: 2rem; }
  .hero-photo-col { display: flex; justify-content: center; }
  .hero-photo-wrap { width: 160px; height: 160px; }
  .hero-fields { border-left: none; padding-left: 0; border-top: 1px solid rgba(247,245,240,0.12); padding-top: 1.5rem; }
  .hero h1 { font-size: 2.2rem; }
  .books-grid { grid-template-columns: repeat(2, 1fr); }
  .commentary-item { grid-template-columns: 1fr; }
  .commentary-meta { margin-top: -0.5rem; }

  /* 漢堡選單按鈕 */
  .nav-toggle {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
  }
  .nav-toggle span {
    display: block;
    width: 100%;
    height: 1.5px;
    background: rgba(247,245,240,0.75);
    transition: all 0.25s;
    transform-origin: center;
  }
  .nav-toggle.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .nav-toggle.open span:nth-child(2) { opacity: 0; }
  .nav-toggle.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

  /* 選單收起與展開 */
  .site-nav {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--ink);
    flex-direction: column;
    border-top: 1px solid rgba(247,245,240,0.08);
    z-index: 99;
  }
  .site-nav.open { display: flex; }
  .site-nav a {
    height: auto;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(247,245,240,0.06);
    font-size: 0.9rem;
  }

  /* header 需要 position: relative 讓選單定位正確 */
  .site-header { position: relative; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* ── 年份清單（Commentary 索引頁） ── */
.year-list { list-style: none; margin-top: 1.5rem; }
.year-item {
  border-bottom: 1px solid var(--rule);
}
.year-link {
  font-family: var(--serif);
  font-size: 1.05rem;
  color: var(--ink);
  display: block;
  padding: 1rem 0;
  border: none;
  transition: color 0.2s, padding-left 0.2s;
}
.year-link:hover {
  color: var(--accent);
  padding-left: 0.5rem;
  border: none;
}

/* ── Commentary 文章列表頁內文樣式 ── */
.prose ol {
  padding-left: 2rem;
  margin-bottom: 1.5em;
}
.prose ol li {
  margin-bottom: 0.6em;
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--ink);
}
.prose ol li a {
  color: var(--accent);
  border-bottom: none;
}
.prose ol li a:hover {
  border-bottom: 1px solid var(--accent);
}
.prose h2 {
  margin-top: 3rem;
}

/* ── Research Themes 區塊 ── */
.themes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 1.5rem;
  margin-bottom: 3rem;
}

.theme-card {
  padding: 1.5rem;
  border: 1px solid var(--rule);
  background: var(--paper-dark);
  transition: border-color 0.2s;
}

.theme-card:hover {
  border-color: var(--accent);
}

.theme-title {
  font-family: var(--serif);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.6rem;
  line-height: 1.4;
}

.theme-desc {
  font-family: var(--sans);
  font-size: 0.82rem;
  color: var(--ink-mid);
  line-height: 1.7;
  margin: 0;
}

@media (max-width: 768px) {
  .themes-grid { grid-template-columns: 1fr; gap: 1rem; }
}

/* ============================================
   Version 2.0 首頁重構：更精簡的首頁、導覽與視覺層次
   ============================================ */
.site-header {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.site-nav a.active {
  border-bottom-color: #7da4e8;
}

.hero-v2 {
  padding: 4.1rem 2rem 3.6rem;
  background:
    radial-gradient(circle at 82% 8%, rgba(125, 164, 232, 0.12), transparent 30%),
    linear-gradient(135deg, #171d2b 0%, #202941 55%, #161b28 100%);
}

.hero-inner-v2 {
  max-width: 1080px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 188px;
  gap: 2.4rem;
  align-items: center;
}

.hero-copy {
  max-width: 760px;
}

.hero-copy h1 {
  font-size: clamp(2.35rem, 5.5vw, 4.15rem);
  letter-spacing: 0.018em;
  margin-bottom: 0.12rem;
}

.hero-tagline {
  font-family: var(--garamond);
  font-size: clamp(1.12rem, 2.2vw, 1.48rem);
  color: rgba(247,245,240,0.86);
  margin: 1.15rem 0 0.85rem;
  line-height: 1.4;
}

.hero-desc-v2 {
  max-width: 680px;
  font-size: 0.96rem;
  line-height: 1.82;
  color: rgba(247,245,240,0.74);
}

.btn-text {
  font-family: var(--sans);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  color: rgba(247,245,240,0.78);
  padding: 0.65rem 0;
  border: none;
}
.btn-text:hover { color: var(--paper); border: none; }

.hero-portrait-card {
  justify-self: end;
  width: 168px;
  padding: 0.42rem;
  border: 1px solid rgba(247,245,240,0.12);
  background: rgba(247,245,240,0.045);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.14);
  border-radius: 999px;
}

.hero-photo-v2 {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  display: block;
  filter: saturate(0.92) contrast(1.02);
}

.portrait-caption {
  display: none;
}

.quick-entry-section {
  background: var(--paper-dark);
  border-bottom: 1px solid var(--rule);
}
.compact-container { padding-top: 2.4rem; padding-bottom: 2.4rem; }
.quick-entry-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.quick-entry-card {
  display: block;
  padding: 1.45rem;
  background: var(--paper);
  border: 1px solid rgba(200,195,184,0.9);
  border-radius: 2px;
  color: var(--ink);
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.quick-entry-card:hover {
  border-color: var(--accent);
  box-shadow: 0 16px 40px rgba(26, 31, 46, 0.08);
  transform: translateY(-2px);
}
.entry-kicker {
  font-family: var(--sans);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-light);
}
.quick-entry-card h2 {
  font-size: 1.15rem;
  margin: 0.55rem 0 0.55rem;
}
.quick-entry-card p {
  font-family: var(--sans);
  font-size: 0.84rem;
  line-height: 1.75;
  color: var(--ink-mid);
  margin: 0;
}

.section-heading-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 1.8rem;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 1rem;
}
.section-heading-row .section-label {
  margin-bottom: 0.35rem;
  padding-bottom: 0;
  border-bottom: none;
}
.section-title {
  font-size: 1.65rem;
}
.section-note {
  max-width: 360px;
  font-family: var(--sans);
  font-size: 0.82rem;
  color: var(--ink-mid);
  line-height: 1.7;
  margin: 0;
  text-align: right;
}
.section-link {
  font-family: var(--sans);
  font-size: 0.82rem;
  white-space: nowrap;
}

.themes-grid-v2 {
  margin-top: 0;
  margin-bottom: 0;
}
.themes-grid-v2 .theme-card {
  background: transparent;
  border-top: 2px solid var(--ink);
}
.books-section-v2 { padding-top: 1rem; }
.books-grid-v2 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.book-card-v2 {
  background: rgba(237,234,227,0.52);
  border: 1px solid rgba(200,195,184,0.72);
  padding: 0.75rem;
}
.book-card-v2 .book-title { margin-bottom: 0; }

@media (max-width: 900px) {
  .hero-inner-v2 { grid-template-columns: minmax(0, 1fr) 160px; gap: 1.6rem; }
  .hero-portrait-card { justify-self: end; width: 144px; }
  .quick-entry-grid { grid-template-columns: 1fr; }
  .books-grid-v2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section-heading-row { align-items: start; flex-direction: column; gap: 0.6rem; }
  .section-note { text-align: left; }
}

@media (max-width: 768px) {
  .hero-v2 { padding: 3.1rem 1.4rem 2.8rem; }
  .hero-inner-v2 { grid-template-columns: 1fr; gap: 1.4rem; }
  .hero-copy h1 { font-size: clamp(2.15rem, 12vw, 3.2rem); }
  .hero-links { gap: 0.7rem; }
  .btn-primary, .btn-ghost, .btn-text { width: 100%; text-align: center; }
  .hero-portrait-card { display: flex; width: 108px; margin: 0 auto; justify-self: center; }
  .page-container { padding-left: 1.4rem; padding-right: 1.4rem; }
  .books-grid-v2 { gap: 1rem; }
  .site-header { position: sticky; }
}

/* ============================================
   Version 3.0：Books + Teaching + Knowledge Hub
   ============================================ */

.core-platform-section {
  padding-top: 3.2rem;
  padding-bottom: 1.2rem;
}

.platform-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.2rem;
}

.platform-card {
  display: block;
  min-height: 230px;
  padding: 1.65rem;
  border: 1px solid rgba(200,195,184,0.85);
  background: linear-gradient(180deg, rgba(255,255,255,0.42), rgba(237,234,227,0.62));
  color: var(--ink);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.platform-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 55px rgba(26,31,46,0.09);
  border-color: var(--accent);
}

.platform-number {
  display: inline-block;
  font-family: var(--garamond);
  font-size: 2.15rem;
  line-height: 1;
  color: rgba(46,74,140,0.30);
  margin-bottom: 1.2rem;
}

.platform-card h3 {
  font-size: 1.35rem;
  margin-bottom: 0.65rem;
}

.platform-card p {
  font-family: var(--sans);
  font-size: 0.86rem;
  color: var(--ink-mid);
  line-height: 1.75;
  margin: 0;
}

.page-intro-block {
  padding: 2.2rem;
  margin-bottom: 2.5rem;
  border-left: 4px solid var(--accent);
  background: rgba(237,234,227,0.62);
}

.page-intro-block h1 {
  font-size: 2.05rem;
  margin-bottom: 0.75rem;
}

.page-intro-block p:last-child {
  max-width: 760px;
  margin-bottom: 0;
  color: var(--ink-mid);
}

.intro-kicker {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.68rem;
  color: var(--ink-light);
  margin-bottom: 0.5rem;
}

.book-feature-list {
  display: grid;
  gap: 1.15rem;
  margin-bottom: 2.8rem;
}

.book-feature-card {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 1.35rem;
  align-items: start;
  padding: 1.2rem;
  border: 1px solid rgba(200,195,184,0.85);
  background: rgba(255,255,255,0.28);
}

.book-feature-cover {
  width: 120px;
  max-height: 170px;
  object-fit: contain;
  background: var(--paper-dark);
  box-shadow: 0 10px 30px rgba(26,31,46,0.13);
}

.book-feature-card h2 {
  font-size: 1.25rem;
  margin-bottom: 0.45rem;
}

.book-feature-card p {
  font-family: var(--sans);
  font-size: 0.9rem;
  color: var(--ink-mid);
  line-height: 1.75;
}

.program-grid,
.hub-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.15rem;
  margin-bottom: 2.8rem;
}

.program-card,
.hub-card {
  padding: 1.35rem;
  border-top: 2px solid var(--ink);
  background: rgba(237,234,227,0.52);
}

.program-card h2,
.hub-card h2 {
  font-size: 1.15rem;
  margin-bottom: 0.55rem;
}

.program-card ul {
  margin-left: 1.2rem;
  font-family: var(--sans);
  font-size: 0.88rem;
  color: var(--ink-mid);
  line-height: 1.85;
}

.hub-card p {
  font-family: var(--sans);
  font-size: 0.88rem;
  color: var(--ink-mid);
  line-height: 1.75;
  margin: 0;
}

.workflow-list {
  display: grid;
  gap: 0.85rem;
  margin-top: 1.2rem;
}

.workflow-list div {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 1rem;
  padding: 1rem 0;
  border-top: 1px solid var(--rule);
}

.workflow-list strong {
  font-family: var(--sans);
  color: var(--ink);
  font-size: 0.86rem;
}

.workflow-list span {
  font-family: var(--sans);
  color: var(--ink-mid);
  font-size: 0.9rem;
  line-height: 1.7;
}

@media (max-width: 960px) {
  .platform-grid,
  .program-grid,
  .hub-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .page-intro-block { padding: 1.4rem; }
  .book-feature-card { grid-template-columns: 88px 1fr; gap: 1rem; }
  .book-feature-cover { width: 88px; max-height: 126px; }
  .workflow-list div { grid-template-columns: 1fr; gap: 0.25rem; }
}

/* Version 3.2：首頁 Hero 精修，縮小個人照片並改善比例與留白。 */


/* ============================================
   Version 4.1：語意頁首與 SEO 友善頁面標題
   ============================================ */
.page-header {
  max-width: 760px;
  margin-bottom: 2.2rem;
}

.page-title {
  font-size: clamp(2rem, 4vw, 2.65rem);
  letter-spacing: 0.01em;
  margin: 0 0 0.85rem;
}

.page-description {
  font-family: var(--sans);
  font-size: 0.95rem;
  line-height: 1.85;
  color: var(--ink-mid);
  max-width: 720px;
  margin-bottom: 0;
}

@media (max-width: 1060px) {
  .site-nav a {
    padding-left: 0.68rem;
    padding-right: 0.68rem;
    font-size: 0.76rem;
  }
}

/* Version 4.3：Phase 2 知識檔案館深化。 */

.research-topic-card h3 {
  margin-top: 1rem;
  margin-bottom: 0.35rem;
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
}

.research-topic-card ul,
.topic-index-block ul {
  margin: 0.25rem 0 0 1.05rem;
  padding: 0;
  font-family: var(--sans);
  font-size: 0.83rem;
  line-height: 1.72;
  color: var(--ink-mid);
}

.research-topic-card li,
.topic-index-block li {
  margin-bottom: 0.35rem;
}

.book-meta-list {
  display: grid;
  gap: 0.35rem;
  margin: 0.55rem 0 0.85rem;
  font-family: var(--sans);
  font-size: 0.84rem;
}

.book-meta-list div {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 0.7rem;
  border-top: 1px solid rgba(200,195,184,0.75);
  padding-top: 0.35rem;
}

.book-meta-list dt {
  color: var(--ink-light);
  font-weight: 700;
}

.book-meta-list dd {
  margin: 0;
  color: var(--ink-mid);
}

.publication-list {
  display: grid;
  gap: 0.75rem;
  margin: 1rem 0 2.2rem;
}

.compact-publication-list {
  gap: 0.6rem;
}

.publication-item {
  padding: 0.9rem 1rem;
  border-left: 3px solid var(--rule);
  background: rgba(237,234,227,0.36);
  font-family: var(--sans);
  font-size: 0.9rem;
  line-height: 1.75;
  color: var(--ink-mid);
}

.publication-item strong {
  color: var(--ink);
}

.topic-index-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.2rem 0 2.6rem;
}

.topic-index-block {
  padding: 1.15rem;
  border: 1px solid rgba(200,195,184,0.9);
  background: rgba(255,255,255,0.24);
}

.topic-index-block h3 {
  font-size: 1.05rem;
  margin-bottom: 0.55rem;
}

.media-note-block {
  padding: 1rem 1.1rem;
  border-left: 3px solid var(--accent);
  background: rgba(237,234,227,0.54);
  margin: 1rem 0 2rem;
}

.media-note-block p {
  margin: 0;
  font-family: var(--sans);
  font-size: 0.9rem;
  color: var(--ink-mid);
  line-height: 1.75;
}

@media (max-width: 768px) {
  .topic-index-list {
    grid-template-columns: 1fr;
  }

  .book-meta-list div {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }
}


/* Version 4.4：Phase 3 SEO、社群分享與英文入口。 */

.english-entry-block p {
  font-family: var(--sans);
}

.prose .english-entry-block h1 {
  margin-bottom: 0.55rem;
}

@media (max-width: 1120px) {
  .site-nav a {
    padding-left: 0.55rem;
    padding-right: 0.55rem;
    font-size: 0.73rem;
  }
}

/* ============================================
   Version 4.5：Phase 4 視覺與閱讀體驗升級
   ============================================ */

/* 首頁：最新更新 */
.latest-updates-section {
  padding-top: 3.2rem;
  padding-bottom: 2rem;
}

.updates-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.update-card {
  display: block;
  min-height: 175px;
  padding: 1.25rem;
  color: var(--ink);
  border: 1px solid rgba(200,195,184,0.92);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.42), rgba(237,234,227,0.58));
  box-shadow: 0 12px 35px rgba(26,31,46,0.055);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.update-card:hover {
  transform: translateY(-2px);
  border-color: rgba(46,74,140,0.55);
  box-shadow: 0 18px 45px rgba(26,31,46,0.08);
}

.update-date {
  display: inline-block;
  margin-bottom: 0.7rem;
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-light);
}

.update-card h3 {
  margin-bottom: 0.5rem;
  font-size: 1.08rem;
}

.update-card p {
  margin: 0;
  font-family: var(--sans);
  font-size: 0.84rem;
  line-height: 1.68;
  color: var(--ink-mid);
}

/* 本地化書封：讓自製圖片更接近實體書視覺 */
.book-cover,
.book-feature-cover {
  border-radius: 2px;
  box-shadow: 0 16px 38px rgba(26,31,46,0.14);
}

.book-card-v2 {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.book-card-v2:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 45px rgba(26,31,46,0.08);
}

/* Commentary 年份頁：日期、標題、來源分離 */
.article-archive-list,
.media-archive-list {
  display: grid;
  gap: 0.72rem;
  margin: 1.35rem 0 2.5rem;
}

.article-archive-item,
.media-archive-item {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  gap: 1rem;
  padding: 1rem 1.05rem;
  border: 1px solid rgba(200,195,184,0.78);
  border-left: 4px solid rgba(46,74,140,0.48);
  background: rgba(255,255,255,0.30);
}

.article-date {
  padding-top: 0.15rem;
  font-family: var(--sans);
  font-size: 0.76rem;
  line-height: 1.45;
  color: var(--ink-light);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.article-title {
  margin: 0 0 0.28rem;
  font-size: 1rem;
  line-height: 1.52;
}

.media-archive-item .article-title {
  font-size: 0.98rem;
}

.article-title a {
  color: var(--ink);
  border: none;
}

.article-title a:hover {
  color: var(--accent);
}

.article-meta {
  margin: 0;
  font-family: var(--sans);
  font-size: 0.78rem;
  color: var(--ink-light);
  line-height: 1.5;
}

.article-source {
  display: inline-block;
  padding: 0.12rem 0.5rem;
  border: 1px solid rgba(200,195,184,0.82);
  border-radius: 999px;
  background: rgba(237,234,227,0.58);
}

.media-year-block {
  margin: 1.6rem 0 2.2rem;
}

.media-year-block h3 {
  margin-bottom: 0.7rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid var(--rule);
  font-family: var(--garamond);
  font-size: 1.35rem;
  color: var(--ink);
}

/* Publications 頁：輕量分段與卡片感 */
.page-section-publications > h2 {
  margin-top: 3rem;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(200,195,184,0.82);
  border-left: 4px solid var(--accent);
  background: rgba(237,234,227,0.42);
  font-size: 1.32rem;
}

.page-section-publications .publication-list {
  gap: 0.82rem;
}

.page-section-publications .publication-item {
  border-left-color: rgba(46,74,140,0.38);
  background: rgba(255,255,255,0.34);
  box-shadow: 0 10px 30px rgba(26,31,46,0.035);
}

.page-section-publications .publication-item a {
  margin-left: 0.4rem;
  font-family: var(--sans);
  font-size: 0.78rem;
}

/* About 頁：正式照片但不搶主文 */
.about-profile-card {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 1.25rem;
  align-items: center;
  padding: 1.2rem;
  margin-bottom: 2rem;
  border: 1px solid rgba(200,195,184,0.84);
  background: rgba(255,255,255,0.30);
}

.about-profile-photo {
  width: 128px;
  height: 128px;
  object-fit: cover;
  border-radius: 100%;
  border: 3px solid rgba(46,74,140,0.22);
  box-shadow: 0 14px 34px rgba(26,31,46,0.14);
}

.about-profile-card p:last-child {
  margin-bottom: 0;
  font-family: var(--sans);
  color: var(--ink-mid);
  line-height: 1.75;
}

/* 頁尾：公開平台入口更清楚 */
.footer-inner-v2 {
  align-items: flex-start;
}

.footer-main {
  max-width: 520px;
}

.footer-desc {
  margin: 0.35rem 0 0;
  font-family: var(--garamond);
  font-size: 0.95rem;
  font-style: italic;
  color: rgba(247,245,240,0.38);
}

.footer-links-v2 {
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.footer-links-v2 a {
  padding: 0.35rem 0.65rem;
  border: 1px solid rgba(247,245,240,0.12);
  border-radius: 999px;
}

.footer-links-v2 a:hover {
  border-color: rgba(247,245,240,0.32);
}

/* 導覽：桌機壓縮，行動版改為雙欄，避免 9 個項目過長 */
@media (max-width: 1180px) {
  .header-inner { max-width: 1180px; }
  .site-nav a {
    padding-left: 0.48rem;
    padding-right: 0.48rem;
    font-size: 0.70rem;
    letter-spacing: 0.01em;
  }
}

@media (max-width: 860px) {
  .site-nav {
    max-height: calc(100vh - 60px);
    overflow-y: auto;
  }
}

@media (max-width: 768px) {
  .site-nav.open {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    padding: 0.55rem;
  }

  .site-nav a {
    justify-content: center;
    margin: 0.22rem;
    padding: 0.82rem 0.5rem;
    border: 1px solid rgba(247,245,240,0.08);
    background: rgba(255,255,255,0.035);
    font-size: 0.84rem;
    text-align: center;
  }

  .site-nav a.active {
    border-color: rgba(125,164,232,0.45);
    border-bottom-color: rgba(125,164,232,0.45);
    background: rgba(125,164,232,0.10);
  }

  .updates-grid {
    grid-template-columns: 1fr;
  }

  .article-archive-item,
  .media-archive-item {
    grid-template-columns: 1fr;
    gap: 0.4rem;
  }

  .article-date {
    white-space: normal;
  }

  .about-profile-card {
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 0.9rem;
    padding: 1rem;
  }

  .about-profile-photo {
    width: 88px;
    height: 88px;
  }

  .footer-inner-v2 {
    display: block;
  }

  .footer-links-v2 {
    justify-content: flex-start;
    margin-top: 1rem;
  }
}
/* 議題策展總覽頁專用美學 */
.container-topics-hub {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 15px;
}

.topic-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: #ffffff;
    border-radius: 12px !important;
    border: 1px solid #f2f4f4 !important;
}

.topic-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.08) !important;
}

.topic-icon {
    font-size: 2rem;
    background: #f4f6f7;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.topic-card .card-title a:hover {
    color: #007bff !important; /* 主題亮色交互 */
}
/* ============================================
   Version 4.5.4：公共評論頁視覺統一
   ============================================ */
.commentary-page {
  max-width: 1100px;
}

.commentary-intro-block {
  margin-bottom: 3rem;
}

.section-heading-compact {
  max-width: 760px;
  margin: 0 0 1.35rem;
}

.section-heading-compact .section-label {
  margin-bottom: 0.75rem;
}

.section-heading-compact h2 {
  margin-bottom: 0.5rem;
  font-size: 1.45rem;
}

.section-heading-compact p:not(.section-label) {
  margin: 0;
  font-family: var(--sans);
  font-size: 0.9rem;
  line-height: 1.75;
  color: var(--ink-mid);
}

.commentary-section {
  margin: 0 0 3.2rem;
}

.commentary-topic-grid {
  margin-bottom: 0;
}

.commentary-topic-card {
  display: flex;
  flex-direction: column;
  min-height: 205px;
  border-top-color: rgba(46,74,140,0.72);
  background: linear-gradient(180deg, rgba(255,255,255,0.36), rgba(237,234,227,0.58));
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.commentary-topic-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 42px rgba(26,31,46,0.07);
  border-top-color: var(--accent);
}

.commentary-topic-card h2 {
  font-size: 1.12rem;
}

.commentary-topic-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  margin-top: auto;
  padding-top: 0.9rem;
}

.commentary-topic-card a {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.78rem;
  line-height: 1.55;
  color: var(--accent);
  border-bottom-color: rgba(46,74,140,0.22);
}

.commentary-year-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
}

.commentary-year-card {
  display: block;
  min-height: 128px;
  padding: 1rem;
  border: 1px solid rgba(200,195,184,0.86);
  background: rgba(255,255,255,0.32);
  color: var(--ink);
  box-shadow: 0 10px 28px rgba(26,31,46,0.035);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.commentary-year-card:hover {
  transform: translateY(-2px);
  border-color: rgba(46,74,140,0.52);
  box-shadow: 0 16px 40px rgba(26,31,46,0.065);
}

.commentary-year-label {
  display: block;
  margin-bottom: 0.45rem;
  font-family: var(--serif);
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--ink);
}

.commentary-year-desc {
  display: block;
  font-family: var(--sans);
  font-size: 0.78rem;
  line-height: 1.62;
  color: var(--ink-mid);
}

.commentary-latest-list {
  margin-bottom: 0;
}

.commentary-latest-item {
  background: rgba(255,255,255,0.34);
  box-shadow: 0 10px 30px rgba(26,31,46,0.035);
}

.article-tags {
  display: inline-block;
  margin-left: 0.45rem;
  color: var(--ink-light);
}

.article-summary {
  margin: 0.55rem 0 0;
  font-family: var(--sans);
  font-size: 0.84rem;
  line-height: 1.75;
  color: var(--ink-mid);
}

@media (max-width: 960px) {
  .commentary-year-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .commentary-year-grid {
    grid-template-columns: 1fr;
  }

  .commentary-topic-card {
    min-height: auto;
  }

  .article-tags {
    display: block;
    margin: 0.35rem 0 0;
  }
}

.article-note {
  display: inline-block;
  margin-left: 0.55rem;
  color: var(--ink-light);
  font-size: 0.92em;
}


/* ============================================
   Version 4.6：公共評論資料化與策展系統整理
   ============================================ */
.topics-hub-page,
.topic-dossier-page,
.commentary-archive-page {
  max-width: 1100px;
}

.topics-hub-intro,
.topic-dossier-intro {
  margin-bottom: 2.4rem;
}

.dossier-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.2rem 0 3rem;
}

.dossier-card {
  min-height: 245px;
  border: 1px solid rgba(200,195,184,0.86);
  border-top: 3px solid rgba(46,74,140,0.72);
  background: linear-gradient(180deg, rgba(255,255,255,0.38), rgba(237,234,227,0.58));
  box-shadow: 0 12px 34px rgba(26,31,46,0.045);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.dossier-card:hover {
  transform: translateY(-2px);
  border-top-color: var(--accent);
  box-shadow: 0 18px 44px rgba(26,31,46,0.075);
}

.dossier-card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 1.25rem;
  color: var(--ink);
  border: none;
}

.dossier-label,
.inline-label {
  display: inline-block;
  width: fit-content;
  margin-bottom: 0.65rem;
  padding: 0.14rem 0.55rem;
  border: 1px solid rgba(46,74,140,0.24);
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: var(--accent);
  background: rgba(255,255,255,0.34);
}

.dossier-card h2 {
  margin-bottom: 0.2rem;
  font-size: 1.22rem;
}

.dossier-title-en,
.topic-dossier-en {
  margin-bottom: 0.85rem;
  font-family: var(--garamond);
  font-size: 0.95rem;
  font-style: italic;
  color: var(--ink-light);
}

.dossier-card p:not(.dossier-title-en) {
  font-family: var(--sans);
  font-size: 0.86rem;
  line-height: 1.75;
  color: var(--ink-mid);
}

.dossier-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  margin-top: auto;
  padding-top: 0.9rem;
  border-top: 1px solid rgba(200,195,184,0.74);
  font-family: var(--sans);
  font-size: 0.76rem;
  color: var(--accent);
}

.topic-dossier-content {
  margin-bottom: 2rem;
}

.topic-featured-section {
  margin-top: 1.8rem;
}

.archive-summary {
  font-family: var(--sans);
  font-size: 0.92rem;
  color: var(--ink-mid);
}

.back-link {
  margin-top: 2.2rem;
  font-family: var(--sans);
  font-size: 0.85rem;
}

.commentary-topic-card h2 a {
  color: var(--ink);
  border: none;
}

.commentary-topic-card h2 a:hover {
  color: var(--accent);
}

.single-article-meta {
  margin-bottom: 1rem;
}

@media (max-width: 820px) {
  .dossier-grid {
    grid-template-columns: 1fr;
  }

  .dossier-card {
    min-height: auto;
  }

  .dossier-meta {
    flex-direction: column;
    gap: 0.25rem;
  }
}

/* ============================================
   Version 4.6.4：一般導覽頁版心統一
   目標：讓 About／Books／Research／Publications／Media／Contact 等頁面
   與公共評論頁使用一致的 1100px 版心。
   ============================================ */
.page-content {
  max-width: 1100px;
  width: 100%;
}

/* 純文字段落維持較適合閱讀的行長；卡片、清單、格狀內容則使用完整版心。 */
.page-content > p,
.page-content > ul,
.page-content > ol,
.page-content > blockquote {
  max-width: 760px;
}

.page-content > hr {
  max-width: 1100px;
}
