/* ===== 导航栏样式 ===== */
.navbar {
  font-family: "EB Garamond", serif !important;
  display: flex;              
  justify-content: center !important;    
  gap: 20px;                  
  padding: 10px 0;            
}

/* ===== 左侧栏完整样式 ===== */
.sidebar {
  width: 350px;                /* 左侧栏宽度，可调整 */
  min-width: 250px;            /* 最小宽度 */
  max-width: 350px;            /* 最大宽度，可选 */
  padding: 20px;               /* 内边距 */
  box-sizing: border-box;      /* 包括 padding 在内计算宽度 */
  word-wrap: break-word !important;       
  overflow-wrap: break-word !important;   
  white-space: normal !important;         
  flex-shrink: 0;              /* Flexbox 不被压缩 */
  display: flex;
  flex-direction: column;
}

/* 左侧栏内部内容自动换行 */
.sidebar ul,
.sidebar li,
.sidebar a,
.sidebar p {
  white-space: normal !important;         
  word-wrap: break-word !important;
  overflow-wrap: break-word !important;
}

/* 左侧栏名字居中 */
.sidebar .name {
  width: 100%;
  text-align: center;    /* 确保左栏名字居中 */
  margin-bottom: 20px;   /* 可选，增加名字和其他内容间距 */
}

/* ===== Flexbox 布局: 左侧栏 + 内容区 ===== */
.main-wrapper {
  display: flex;
  flex-direction: row;         
}

.content-area {
  flex: 1;                     
  margin-left: 50px; 
  max-width: 900px;            /* 可限制右侧内容宽度，让它偏中 */
}

.content-area main {
    margin-top: 30px;      /* 避免重叠 */
}


/* ===== 响应式: 移动端 ===== */
@media (max-width: 768px) {
  .main-wrapper {
    flex-direction: column;    
  }

  .sidebar {
    width: 100%;               
    max-width: 100%;
    margin-bottom: 20px;
  }

  .content-area {
    margin-left: 0;
  }
}

/* 导航栏名字居中 */
.header {
    display: flex;
    justify-content: center !important; /* 水平居中 */
    align-items: center !important;     /* 垂直居中 */
}

/* 隐藏 Sitemap 链接 */
footer a[href="/sitemap/"],
footer a[href="/sitemap"] {
    display: none !important;
}

/* 隐藏 RSS feed Follow 链接 */ /*在_config.yml中第127行改true即解决*/
/*footer a[href*="feed.xml"],*/
/*footer .social-link {*/
/*    display: none !important;*/
/*}*/


/* 正文章节字体：EB Garamond */
body {
  font-family: "EB Garamond", serif;
  font-size: 19px;
  line-height: 1.60;
}

/* 标题字体：Lato */
h1, h2, h3, h4, h5 {
  font-family: "Lato", sans-serif;
  font-weight: 600;
}

/* ==========
   文字样式
   ========== */
.navbar a,
.masthead a,
.greedy-nav a,
.masthead__menu-item a {
  font-family: "EB Garamond", serif !important;
  font-size: 19px !important;
  font-weight: normal !important;
}

/* ==========
   图标保护区
   ==========
   防止 EB Garamond 字体与 19px font-size
   覆盖 toggle-theme 的 SVG 图标
   （这是导致图标消失的真正原因）
   ========== */

.navbar svg,
.navbar svg *,
.masthead svg,
.masthead svg *,
.greedy-nav svg,
.greedy-nav svg *,
.masthead__toggle,
.masthead__toggle svg {
  font-family: inherit !important;
  font-size: initial !important;
  font-weight: inherit !important;
  width: auto !important;
  height: auto !important;
  display: inline-block !important;
}
