@charset "UTF-8";

/*!
 * Clean Blog 科技蓝主题 - 最终修正版
 * 仅修改：容器宽度80%、导航栏横排
 * 保留所有原始类名和布局
 */

/* ===== CSS变量 ===== */
:root {
  --primary: #2563eb;
  --primary-dark: #1e40af;
  --primary-light: #3b82f6;
  --primary-glow: rgba(37, 99, 235, 0.25);
  --dark-bg: #0f172a;
  --light-bg: #f8fafc;
  --card-bg: #ffffff;
  --text: #1e293b;
  --text-light: #64748b;
  --border: #e2e8f0;
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.08);
  --radius: 0.75rem;
  --transition: all 0.2s ease;
}

/* ===== 基础重置 ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: system-ui, -apple-system, 'Inter', 'Segoe UI', Roboto, 'Microsoft YaHei', sans-serif;
  background: var(--light-bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 1.125rem;
}

/* 网格背景（科技感） */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(var(--primary-glow) 1px, transparent 1px),
    linear-gradient(90deg, var(--primary-glow) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: -1;
  opacity: 0.4;
}

/* ===== 容器 - 宽度80% ===== */
.container,
.container-fluid {
  width: 80%;
  max-width: 1400px;
  margin-right: auto;
  margin-left: auto;
  padding-right: 1rem;
  padding-left: 1rem;
}
@media (max-width: 768px) {
  .container,
  .container-fluid {
    width: 95%;
  }
}

/* ===== 栅格系统（兼容原Bootstrap） ===== */
.row {
  display: flex;
  flex-wrap: wrap;
  margin-right: -1rem;
  margin-left: -1rem;
}
.row > * {
  flex-shrink: 0;
  width: 100%;
  padding-right: 1rem;
  padding-left: 1rem;
}
.col {
  flex: 1 0 0%;
}
.col-lg-8 {
  flex: 0 0 auto;
  width: 66.66666667%;
}
.col-lg-4 {
  flex: 0 0 auto;
  width: 33.33333333%;
}
.col-md-10 {
  width: 83.33333333%;
}
.offset-lg-2 {
  margin-left: 16.66666667%;
}
@media (max-width: 991.98px) {
  .col-lg-8, .col-lg-4, .offset-lg-2 {
    width: 100%;
    margin-left: 0;
  }
}

/* ===== 导航栏 (毛玻璃效果) ===== */
#mainNav {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1030;
  padding: 1rem 0;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  transition: var(--transition);
  font-family: system-ui, 'Inter', sans-serif;
}

#mainNav .navbar-brand {
  font-size: 1.4rem;
  font-weight: 800;
  color: white;
  letter-spacing: -0.5px;
  text-decoration: none;
}
#mainNav .navbar-brand:hover {
  color: rgba(255, 255, 255, 0.8);
}

/* 关键修改：让导航栏内容横排 */
#mainNav .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}

/* 移动端菜单按钮 */
.navbar-toggler {
  display: none;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 0.375rem;
  padding: 0.5rem 0.75rem;
  font-size: 1.25rem;
  color: white;
  cursor: pointer;
}

/* 菜单容器（桌面端强制显示并横排） */
.navbar-collapse {
  flex-grow: 1;
  align-items: center;
}
.navbar-nav {
  display: flex;
  flex-direction: row;     /* 横排关键 */
  gap: 2rem;
  list-style: none;
  margin-bottom: 0;
  padding-left: 0;
  margin-left: auto;       /* 靠右对齐 */
}
.nav-item {
  display: inline-block;
}
.nav-link {
  color: white;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.0625em;
  text-decoration: none;
  padding: 0;
}
.nav-link:hover {
  color: rgba(255, 255, 255, 0.8);
}

/* 移动端：菜单竖排，点击按钮展开 */
@media (max-width: 767.98px) {
  .navbar-toggler {
    display: block;
  }
  .navbar-collapse {
    display: none;
    width: 100%;
  }
  .navbar-collapse.show {
    display: block;
  }
  .navbar-nav {
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
    text-align: center;
  }
}

/* 滚动固定样式（需配合JS） */
@media (min-width: 992px) {
  #mainNav.is-fixed {
    position: fixed;
    top: -83px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom-color: var(--border);
    box-shadow: var(--shadow-sm);
  }
  #mainNav.is-fixed .navbar-brand,
  #mainNav.is-fixed .nav-link {
    color: var(--text);
  }
  #mainNav.is-fixed .nav-link:hover {
    color: var(--primary);
  }
  #mainNav.is-visible {
    top: 0;
  }
}

/* ===== 页头 (masthead) ===== */
header.masthead {
  position: relative;
  background: linear-gradient(135deg, var(--dark-bg), var(--primary-dark));
  color: white;
  text-align: center;
  padding: 10rem 0 6rem;
  margin-bottom: 3rem;
}
header.masthead::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.3);
  pointer-events: none;
}
header.masthead .page-heading,
header.masthead .site-heading,
header.masthead .post-heading {
  position: relative;
  z-index: 1;
}
header.masthead h1 {
  font-size: 3rem;
  font-weight: 800;
  color: white;
  margin-bottom: 0.5rem;
}
header.masthead .subheading {
  font-size: 1.3rem;
  font-weight: 300;
  opacity: 0.9;
}
@media (min-width: 992px) {
  header.masthead {
    padding: 12rem 0 8rem;
  }
  header.masthead h1 {
    font-size: 5rem;
  }
  header.masthead .subheading {
    font-size: 1.5rem;
  }
}

/* ===== 文章卡片 ===== */
.post-preview {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 1.8rem;
  margin-bottom: 2rem;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}
.post-preview:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary-light);
}
.post-preview .post-title {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}
.post-preview .post-title a {
  color: var(--text);
  text-decoration: none;
}
.post-preview .post-title a:hover {
  color: var(--primary);
}
.post-preview .post-subtitle {
  font-size: 1.1rem;
  color: var(--text-light);
  margin-bottom: 0.75rem;
  font-weight: 400;
}
.post-preview .post-meta {
  font-size: 0.9rem;
  color: var(--text-light);
  font-style: italic;
}
@media (min-width: 992px) {
  .post-preview .post-title {
    font-size: 2.25rem;
  }
}

/* ===== 分页 ===== */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin: 3rem 0;
  flex-wrap: wrap;
  list-style: none;
  padding-left: 0;
}
.page-item {
  display: inline-block;
}
.page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0 0.75rem;
  border-radius: 0.5rem;
  background: white;
  color: var(--primary);
  font-weight: 500;
  transition: var(--transition);
  border: 1px solid var(--border);
  text-decoration: none;
}
.page-link:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
  border-color: var(--primary);
}
.page-item.active .page-link {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 2px 8px var(--primary-glow);
}

/* ===== 页脚 ===== */
footer {
  background: linear-gradient(135deg, #f1f5f9, #ffffff);
  padding: 3rem 0;
  margin-top: 4rem;
  text-align: center;
  border-top: 1px solid var(--border);
  color: var(--text-light);
}

/* ===== 辅助元素 ===== */
blockquote {
  border-left: 4px solid var(--primary);
  padding-left: 1.2rem;
  margin: 1.5rem 0;
  font-style: italic;
  color: var(--text-light);
}
code {
  background: #e2e8f0;
  padding: 0.2rem 0.4rem;
  border-radius: 0.375rem;
  font-family: monospace;
  font-size: 0.9em;
}
pre {
  background: #1e293b;
  color: #e2e8f0;
  padding: 1rem;
  border-radius: var(--radius);
  overflow-x: auto;
  margin: 1rem 0;
}
.btn {
  display: inline-block;
  background: var(--primary);
  color: white;
  padding: 0.6rem 1.2rem;
  border-radius: 2rem;
  font-weight: 600;
  transition: var(--transition);
  border: none;
  cursor: pointer;
}
.btn:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--primary-glow);
  color: white;
}

/* 滚动条 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #e2e8f0;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark);
}
::selection {
  background: var(--primary);
  color: white;
}