/*
Theme Name: BootstrapLite
Theme URI: https://example.com/bootstraplite
Description: 亮色白底、两栏大列表的 Bootstrap 风格主题，留白宽松、阅读舒适，含侧边栏与分类/标签/归档入口区块。
Version: 1.7.2
Author: Zyanr
Author URI: https://example.com
@zyanr-managed
*/

:root {
  --bs-primary: #0d6efd;
  --bs-primary-dark: #0b5ed7;
  --bs-body-color: #212529;
  --bs-body-bg: #ffffff;
  --bs-secondary-color: #6c757d;
  --bs-border-color: #e9ecef;
  --bs-light: #f8f9fa;
  --bs-radius: 16px;
  --bs-shadow-sm: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .06);
  --bs-shadow-md: 0 8px 24px rgba(16, 24, 40, .08), 0 3px 8px rgba(16, 24, 40, .05);
  --bs-shadow-focus: 0 0 0 3px rgba(13, 110, 253, .18);
  --bs-ease: cubic-bezier(.22, .61, .36, 1);
  --bs-gap: 32px;
  --bs-title-gap: 48px;
  --bs-container: 1120px;
  --bs-sidebar: 320px;
  --bs-card-gap: 36px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bs-body-bg);
  color: var(--bs-body-color);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 17px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-wrap: break-word;
}

a {
  color: var(--bs-primary);
  text-decoration: none;
  transition: color .18s var(--bs-ease);
}
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; }

.container {
  width: 100%;
  max-width: var(--bs-container);
  margin: 0 auto;
  padding: 0 24px;
}

/* Navbar */
.site-header {
  border-bottom: 1px solid var(--bs-border-color);
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 20;
  box-shadow: 0 1px 0 rgba(16, 24, 40, .02);
}
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding: 20px 0;
}
.navbar .brand {
  font-size: 1.3125rem;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--bs-body-color);
  transition: color .18s var(--bs-ease);
}
.navbar .brand:hover { text-decoration: none; color: var(--bs-primary); }
.navbar .nav-list { list-style: none; display: flex; flex-wrap: wrap; gap: 26px; margin: 0; padding: 0; }
.navbar .nav-list a {
  color: var(--bs-secondary-color);
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  transition: color .18s var(--bs-ease), border-bottom-color .18s var(--bs-ease);
}
.navbar .nav-list a:hover {
  color: var(--bs-primary);
  border-bottom-color: var(--bs-primary);
  text-decoration: none;
}

/* Mobile nav toggle */
.nav-toggle { display: none; }
.nav-toggle-btn {
  display: none;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--bs-secondary-color);
  cursor: pointer;
  user-select: none;
}
.nav-toggle:checked ~ .nav-list { display: flex; }

/* Layout */
main { padding: 56px 0 16px; }

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--bs-sidebar);
  gap: 56px;
  align-items: start;
}
.layout-main { min-width: 0; }

/* 首页标题与简介间距调整：增加标题下方留白 */
p.excerpt {
  margin: var(--bs-title-gap) 0 72px;
  color: #495057;
  font-size: 1.0625rem;
  line-height: 1.8;
}

h1.article-header {
  font-size: 1.875rem;
  line-height: 1.45;
  letter-spacing: -.01em;
  margin: 0 0 36px;
}

.archive-heading {
  font-size: 1.875rem;
  line-height: 1.45;
  letter-spacing: -.01em;
  margin: 0 0 36px;
}

.post-card {
  padding: 40px 36px;
  margin-bottom: var(--bs-card-gap);
  background: #fff;
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-radius);
  box-shadow: var(--bs-shadow-sm);
  transition: transform .22s var(--bs-ease), box-shadow .22s var(--bs-ease), border-color .22s var(--bs-ease);
}
.post-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--bs-shadow-md);
  border-color: #dbe2ea;
}
.post-card:last-child { margin-bottom: 0; }
.post-card h2 {
  margin: 0 0 16px;
  font-size: 1.5625rem;
  line-height: 1.45;
  letter-spacing: -.01em;
}
.post-card h2 a { color: var(--bs-body-color); transition: color .18s var(--bs-ease); }
.post-card h2 a:hover { color: var(--bs-primary); text-decoration: none; }

.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  color: var(--bs-secondary-color);
  font-size: .875rem;
  margin-bottom: 20px;
}
.post-meta span { position: relative; }
.post-meta span + span::before {
  content: "·";
  position: absolute;
  left: -11px;
  color: #ced4da;
}

.excerpt { color: #495057; margin: 0; line-height: 1.8; }

.read-more {
  display: inline-block;
  margin-top: 24px;
  padding: 10px 24px;
  font-size: .9375rem;
  font-weight: 500;
  color: var(--bs-primary);
  background: rgba(13, 110, 253, .06);
  border: 1px solid rgba(13, 110, 253, .18);
  border-radius: 999px;
  transition: background .2s var(--bs-ease), color .2s var(--bs-ease), border-color .2s var(--bs-ease), transform .2s var(--bs-ease);
}
.read-more:hover {
  text-decoration: none;
  color: #fff;
  background: var(--bs-primary);
  border-color: var(--bs-primary);
  transform: translateY(-1px);
}

/* Sidebar */
.sidebar { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 28px; }
.widget {
  padding: 28px 26px;
  background: #fff;
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-radius);
  box-shadow: var(--bs-shadow-sm);
}
.widget-title {
  margin: 0 0 18px;
  font-size: 1.0625rem;
  letter-spacing: -.01em;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--bs-border-color);
}
.widget-list { list-style: none; margin: 0; padding: 0; }
.widget-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 12px;
  padding: 11px 0;
  border-bottom: 1px dashed var(--bs-border-color);
  font-size: .9375rem;
  line-height: 1.7;
}
.widget-list li:last-child { border-bottom: none; }
.widget-list li a { color: var(--bs-body-color); transition: color .18s var(--bs-ease); }
.widget-list li a:hover { color: var(--bs-primary); text-decoration: none; }
.widget-date, .widget-count { color: var(--bs-secondary-color); font-size: .8125rem; flex-shrink: 0; }
.widget-count {
  min-width: 26px;
  text-align: center;
  background: var(--bs-light);
  border: 1px solid var(--bs-border-color);
  border-radius: 999px;
  padding: 1px 8px;
}
.widget-empty { color: var(--bs-secondary-color); font-size: .875rem; padding: 6px 0; }

.tag-cloud { display: flex; flex-wrap: wrap; gap: 9px; }
.tag-cloud-item {
  display: inline-block;
  padding: 5px 14px;
  font-size: .8125rem;
  color: var(--bs-secondary-color);
  background: var(--bs-light);
  border: 1px solid var(--bs-border-color);
  border-radius: 999px;
  transition: color .18s var(--bs-ease), border-color .18s var(--bs-ease), background .18s var(--bs-ease);
}
.tag-cloud-item:hover { text-decoration: none; color: var(--bs-primary); border-color: var(--bs-primary); background: rgba(13, 110, 253, .06); }

/* 分类/标签/归档入口区块 */
.site-links {
  margin-top: 64px;
  padding: 40px 36px;
  background: var(--bs-light);
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-radius);
}
.site-links-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
}
.links-title {
  margin: 0 0 16px;
  font-size: 1rem;
  letter-spacing: -.01em;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--bs-primary);
  display: inline-block;
}
.links-col ul { list-style: none; margin: 0; padding: 0; }
.links-col li { padding: 6px 0; font-size: .9375rem; line-height: 1.7; }
.links-col li a { color: #495057; transition: color .18s var(--bs-ease); }
.links-col li a:hover { color: var(--bs-primary); text-decoration: none; }
.links-empty { color: var(--bs-secondary-color); font-size: .875rem; }

/* Single */
.article-header { margin-bottom: 36px; }
.article-header h1 { font-size: 2.125rem; line-height: 1.4; letter-spacing: -.015em; margin: 0 0 18px; }
.article-content { font-size: 1.125rem; color: #2b3035; line-height: 2; }
.article-content > * + * { margin-top: 1.6em; }
.article-content h2, .article-content h3 { line-height: 1.5; letter-spacing: -.01em; font-weight: 700; }
.article-content h2 { margin-top: 2.4em; margin-bottom: .6em; }
.article-content h3 { margin-top: 2em; margin-bottom: .5em; }
.article-content p { margin: 1.6em 0; line-height: 1.8; }
.article-content img { border-radius: var(--bs-radius); box-shadow: var(--bs-shadow-sm); margin: 1.8em 0; }
.article-content blockquote {
  margin: 2em 0;
  padding: 20px 28px;
  border-left: 4px solid var(--bs-primary);
  background: var(--bs-light);
  border-radius: 0 var(--bs-radius) var(--bs-radius) 0;
  color: #495057;
}
.article-content pre {
  background: #1f2328;
  color: #f8f9fa;
  padding: 24px;
  border-radius: var(--bs-radius);
  overflow-x: auto;
  line-height: 1.7;
  margin: 2em 0;
}
.article-content code { font-family: SFMono-Regular, Consolas, "Liberation Mono", monospace; font-size: .9375em; }
.article-content :not(pre) > code {
  background: var(--bs-light);
  border: 1px solid var(--bs-border-color);
  border-radius: 5px;
  padding: 2px 7px;
}
.article-content ul, .article-content ol { padding-left: 1.6em; }
.article-content li + li { margin-top: .5em; }

.tags { margin-top: 40px; }
.tag {
  display: inline-block;
  padding: 5px 16px;
  margin: 0 10px 10px 0;
  font-size: .8125rem;
  color: var(--bs-secondary-color);
  background: var(--bs-light);
  border: 1px solid var(--bs-border-color);
  border-radius: 999px;
  transition: color .18s var(--bs-ease), border-color .18s var(--bs-ease), background .18s var(--bs-ease);
}
.tag:hover { text-decoration: none; color: var(--bs-primary); border-color: var(--bs-primary); background: rgba(13, 110, 253, .06); }

/* Comments */
.comments {
  margin-top: 72px;
  padding: 44px 40px;
  background: #fff;
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-radius);
  box-shadow: var(--bs-shadow-sm);
}
.comments h3 { font-size: 1.3125rem; letter-spacing: -.01em; margin-top: 0; margin-bottom: 24px; }
.comment-list { list-style: none; margin: 0; padding: 0; }
.comment-list .comment-body { padding: 26px 0; border-bottom: 1px solid var(--bs-border-color); }
.comment-list .comment-body:last-child { border-bottom: none; }
.comment-list .comment-author { font-weight: 600; }
.comment-list .comment-time { color: var(--bs-secondary-color); font-size: .8125rem; margin-left: 10px; }
.comment-list .children { list-style: none; padding-left: 28px; }

.form-item { margin-bottom: 26px; }
.form-item label { display: block; margin-bottom: 10px; font-weight: 500; }
.form-item input[type=text],
.form-item input[type=email],
.form-item input[type=url],
.form-item textarea {
  width: 100%;
  padding: 14px 18px;
  font-size: 1rem;
  font-family: inherit;
  color: var(--bs-body-color);
  background: #fff;
  border: 1px solid #ced4da;
  border-radius: 10px;
  transition: border-color .18s var(--bs-ease), box-shadow .18s var(--bs-ease);
}
.form-item input:focus,
.form-item textarea:focus {
  outline: none;
  border-color: var(--bs-primary);
  box-shadow: var(--bs-shadow-focus);
}
.form-item textarea { min-height: 170px; resize: vertical; line-height: 1.8; }

button, .btn {
  display: inline-block;
  padding: 13px 30px;
  font-size: 1rem;
  font-family: inherit;
  font-weight: 500;
  color: #fff;
  background: var(--bs-primary);
  border: 1px solid var(--bs-primary);
  border-radius: 10px;
  cursor: pointer;
  box-shadow: var(--bs-shadow-sm);
  transition: background .18s var(--bs-ease), border-color .18s var(--bs-ease), transform .18s var(--bs-ease), box-shadow .18s var(--bs-ease);
}
button:hover, .btn:hover {
  background: var(--bs-primary-dark);
  border-color: var(--bs-primary-dark);
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: var(--bs-shadow-md);
}
button:focus-visible, .btn:focus-visible { outline: none; box-shadow: var(--bs-shadow-focus); }

/* Pagination */
.pagination { display: flex; gap: 14px; justify-content: center; margin-top: 64px; flex-wrap: wrap; }
.pagination a, .pagination span {
  padding: 11px 20px;
  background: #fff;
  border: 1px solid var(--bs-border-color);
  border-radius: 10px;
  color: var(--bs-body-color);
  box-shadow: var(--bs-shadow-sm);
  transition: border-color .18s var(--bs-ease), color .18s var(--bs-ease), transform .18s var(--bs-ease);
}
.pagination a:hover {
  text-decoration: none;
  border-color: var(--bs-primary);
  color: var(--bs-primary);
  transform: translateY(-1px);
}
.pagination .current {
  background: var(--bs-primary);
  border-color: var(--bs-primary);
  color: #fff;
  box-shadow: none;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--bs-border-color);
  padding: 56px 0;
  margin-top: 88px;
  color: var(--bs-secondary-color);
  font-size: .875rem;
  line-height: 2;
  text-align: center;
}
.site-footer .footer-extra { margin-top: 12px; }
.site-footer a { color: var(--bs-secondary-color); }
.site-footer a:hover { color: var(--bs-primary); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .001ms !important; animation-duration: .001ms !important; }
  .post-card:hover, button:hover, .btn:hover, .read-more:hover, .pagination a:hover { transform: none; }
}

@media (max-width: 1024px) {
  .layout { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .sidebar { position: static; }
  .sidebar .widget { padding: 26px 24px; }
}

@media (max-width: 600px) {
  body { font-size: 16px; line-height: 1.8; }
  .container { padding: 0 20px; }
  .navbar { flex-direction: column; align-items: flex-start; padding: 20px 0; }
  .navbar .nav-list { display: none; flex-direction: column; gap: 18px; width: 100%; margin-top: 4px; }
  .nav-toggle-btn { display: inline-block; }
  .nav-toggle:checked ~ .nav-list { display: flex; }
  main { padding: 40px 0 8px; }
  p.excerpt { margin: 40px 0 56px; }
  .post-card { padding: 28px 24px; margin-bottom: 26px; }
  .post-card h2 { font-size: 1.375rem; }
  .article-header h1 { font-size: 1.625rem; }
  .article-content { font-size: 1.0625rem; }
  .site-links { padding: 32px 24px; margin-top: 48px; }
  .site-links-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .comments { padding: 32px 24px; margin-top: 56px; }
  .site-footer { padding: 44px 0; margin-top: 64px; }
}