/* mxkfemkkk.github.io 主样式（知乎风格） */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #f6f6f6;            /* 页面背景 */
  --card: #ffffff;          /* 卡片背景 */
  --border: #ebebeb;        /* 卡片边框 */
  --hover-bg: #f7f8fa;      /* 悬停背景 */
  --text: #1a1a1a;          /* 标题文字 */
  --text-2: #646464;        /* 次要文字 */
  --text-3: #8590a6;        /* 元信息文字 */
  --blue: #0084ff;          /* 知乎蓝 */
  --blue-hover: #0069e0;    /* 悬停蓝 */

  /* 页面背景：浅色为 bg.jpg 图片，深色由 html[data-theme="dark"] 换为渐变 */
  --body-bg-image: url("/assets/bg.jpg");

  /* 文章页语义令牌（post.css 引用；浅色值 = 原字面量，像素不变） */
  --heading: #08090b;          /* 文章标题 */
  --body-text: #24292e;        /* 正文（MathJax 公式亦用此色） */
  --link: #486df1;             /* 正文链接 / 标签 */
  --post-meta: #6a737d;        /* 元信息 / 引用 / h6 */
  --post-date-color: #959da5;  /* 日期 */
  --post-border: #f1f3f4;      /* 文章卡片与代码边框 */
  --table-border: #dfe2e5;     /* 表格 / 引用边框 */
  --code-bg: #fafbfc;          /* 行内代码与代码块底色 */
  --table-stripe: #f8f8f8;     /* 表格斑马纹 */
  --hr: #e7e7e7;               /* 分隔线 */
  --mark-bg: #ffde67;          /* 高亮底色 */
  --mark-text: #080a10;        /* 高亮文字 */

  /* 玻璃令牌（glass-overrides.css 引用；浅色值 = 其当前字面量） */
  --glass-tint-start: rgba(255, 255, 255, 0.30);
  --glass-tint-end: rgba(255, 255, 255, 0.30);
  --glass-card-bg: linear-gradient(160deg,
    rgba(255, 255, 255, 0.55) 0%,
    rgba(255, 255, 255, 0.30) 100%);
  --glass-fallback-bg: rgba(255, 255, 255, 0.92);
  --frost-nav-bg: rgba(255, 255, 255, 0.78);
  --frost-card-bg: rgba(255, 255, 255, 0.78);
  --post-frost-bg: rgba(255, 255, 255, 0.78);
  --control-bg: rgba(255, 255, 255, 0.65);
}

/* ============================================================
   深色主题：html[data-theme="dark"]
   触发由 head 内联脚本 + glass-theme.js 解析（localStorage 'glass-theme'
   显式选择优先，'auto' 用 matchMedia 跟随系统）；CSS 不用
   prefers-color-scheme 媒体查询，避免"系统深色 + 手动浅色"冲突
   ============================================================ */
html[data-theme="dark"] {
  /* 基础 */
  --bg: #0f1216;
  --card: #181d24;
  --border: #2a313b;
  --hover-bg: #1f2630;
  --text: #e8eaed;
  --text-2: #a0a8b4;
  --text-3: #7a8494;
  --blue: #3d9bff;
  --blue-hover: #66b2ff;

  /* 页面背景：深海军蓝渐变（替换浅色的 bg.jpg） */
  /*--body-bg-image:
    radial-gradient(900px 520px at 90% -60px, rgba(64, 120, 255, 0.14), transparent 62%),
    radial-gradient(760px 420px at -40px 60px, rgba(64, 120, 255, 0.09), transparent 60%),
    linear-gradient(170deg,
      #0d1220 0%, #10151f 28%,
      #0f1522 52%, #10151f 78%,
      #0d1220 100%);*/
  --body-bg-image:
    linear-gradient(rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.45)),   /* 半透明黑遮罩（75%） */
    url("/assets/bg-dark.jpg");

  /* 文章页 */
  --heading: #e8eaed;
  --body-text: #c9d1d9;
  --link: #7aa2ff;
  --post-meta: #8b949e;
  --post-date-color: #7d8590;
  --post-border: #2a313b;
  --table-border: #2e3540;
  --code-bg: #1e242c;
  --table-stripe: #1c2229;
  --hr: #2e3540;
  --mark-bg: #6b5d14;
  --mark-text: #f2e7b8;

  /* 玻璃 */
  --glass-tint-start: rgba(18, 22, 35, 0.48);   /* 库自带深海军蓝，直接用作深色值 */
  --glass-tint-end: rgba(12, 16, 28, 0.42);
  --glass-card-bg: linear-gradient(160deg,
    rgba(255, 255, 255, 0.12) 0%,
    rgba(255, 255, 255, 0.06) 100%);
  --glass-fallback-bg: rgba(28, 34, 44, 0.92);
  --frost-nav-bg: rgba(28, 34, 44, 0.88);
  --frost-card-bg: rgba(28, 34, 44, 0.85);
  --post-frost-bg: rgba(28, 34, 44, 0.85);
  --control-bg: rgba(255, 255, 255, 0.08);
}

html {
  font-size: 16px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  line-height: 1.7;
  color: var(--text);
  background-color: var(--bg); 
  background-image: var(--body-bg-image);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed
  /* 玻璃效果可见的背景：静态淡蓝渐变（与 --blue #0084ff 协调，无动画） */
  /*background:
    radial-gradient(900px 520px at 90% -60px, rgba(0, 132, 255, 0.12), transparent 62%),
    radial-gradient(760px 420px at -40px 60px, rgba(0, 132, 255, 0.09), transparent 60%),
    linear-gradient(170deg,
      #e9f1fa 0%, var(--bg) 28%,
      #edf3fa 52%, var(--bg) 78%,
      #eaf2fb 100%);*/
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 16px;
}

a {
  color: var(--blue);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1, h2, h3 {
  line-height: 1.3;
  margin: 1em 0 0.5em;
}

/* ---------- 卡片 ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
}

/* ---------- 导航栏 ---------- */
.site-header {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-nav {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 56px;
}

.site-nav a {
  color: var(--text);
  font-size: 0.9375rem;
  padding: 4px 0;
}

.site-nav a:hover {
  text-decoration: none;
  color: var(--blue);
}

.site-nav a.active {
  font-weight: 600;
  border-bottom: 2px solid var(--blue);
  color: var(--blue);
}

.site-nav .brand {
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--blue);
}

.site-nav .nav-about {
  margin-left: auto;
}

/* ---------- 页脚 ---------- */
.site-footer {
  margin-top: 20px;
  padding: 24px 0 40px;
  text-align: center;
  color: var(--text-3);
  font-size: 0.8125rem;
}

.site-footer a {
  color: var(--text-3);
}

/* ---------- 首页 ---------- */
.home {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 296px;
  gap: 20px;
  align-items: start;
  padding: 20px 0;
}

.home-main {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

/* 个人信息卡片 */
.profile-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px;
}

.avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  box-shadow: 0 0 0 1px var(--border);
}

.name {
  font-size: 1.625rem;
  font-weight: 700;
  margin: 0 0 6px;
}

.signature {
  color: var(--text-2);
  font-size: 0.875rem;
  margin: 0;
}

/* 文章卡片列表 */
.home-feed {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.feed-item {
  padding: 18px 20px;
  transition: box-shadow 0.2s;
}

.feed-item:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.feed-title {
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.4;
  margin: 0 0 6px;
}

.feed-title a {
  color: var(--text);
}

.feed-title a:hover {
  color: var(--blue);
  text-decoration: none;
}

.feed-desc {
  color: var(--text-2);
  font-size: 0.875rem;
  line-height: 1.7;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.feed-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.8125rem;
  color: var(--text-3);
}

.feed-tags {
  color: var(--blue);
}

.feed-date {
  color: var(--text-3);
}

.intro {
  color: var(--text-2);
  font-size: 0.875rem;
}

/* ---------- 侧边栏 ---------- */
.home-side {
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: sticky;
  top: 76px;
}

.side-card {
  padding: 20px;
}

.card-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 12px;
}

.social {
  display: flex;
  flex-direction: column;
}

.social-link {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 0.875rem;
  padding: 10px 12px;
  border-radius: 6px;
  transition: background 0.2s, color 0.2s;
}

.social-link:hover {
  background: var(--hover-bg);
  color: var(--blue);
  text-decoration: none;
}

.social-link svg {
  color: var(--text-3);
  transition: color 0.2s;
}

.social-link:hover svg {
  color: var(--blue);
}

/* ---------- 文章列表 ---------- */
.post-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 20px 0;
}

.post-list li {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 18px 20px;
}

.post-list h2 {
  font-size: 1.125rem;
  margin: 0 0 6px;
}

.post-list h2 a {
  color: var(--text);
}

.post-list h2 a:hover {
  color: var(--blue);
  text-decoration: none;
}

.post-d {
  color: var(--text-2);
  margin-bottom: 6px;
}

.excerpt {
  color: var(--text-3);
  font-size: 0.875rem;
}

.pagination {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 16px 0 24px;
  color: var(--text-3);
}

.pagination a {
  padding: 6px 14px;
  border: 1px solid var(--blue);
  border-radius: 6px;
  color: var(--blue);
}

.pagination a:hover {
  background: var(--blue);
  color: #fff;
  text-decoration: none;
}

/* ---------- 文章详情 / 普通页 ---------- */
.post,
.page {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 28px 32px;
  margin: 20px 0;
}

.post h1 {
  font-size: 1.75rem;
  margin: 0 0 8px;
}

.post-tags {
  color: var(--blue);
  font-size: 0.875rem;
  margin-bottom: 4px;
}

.post-date {
  display: inline-block;
  color: var(--text-3);
  font-size: 0.875rem;
  margin: 4px 0 16px;
}

.post-content {
  margin-top: 16px;
}

.post-content p {
  margin-bottom: 1em;
  color: var(--text-2);
}

.post-content pre {
  background: var(--code-bg);
  border-radius: 8px;
  padding: 12px 16px;
  overflow-x: auto;
  margin-bottom: 1em;
}

.post-content code {
  background: var(--code-bg);
  border-radius: 4px;
  padding: 2px 5px;
  font-size: 0.9em;
}

.post-content pre code {
  background: none;
  padding: 0;
}

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

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

.page h1 {
  font-size: 1.75rem;
  margin: 0 0 16px;
}

.page-content p {
  margin-bottom: 1em;
  color: var(--text-2);
}

.page-content ul,
.page-content ol {
  margin: 0 0 1em 1.5em;
  color: var(--text-2);
}

.page-content li {
  margin-bottom: 4px;
}

/* ---------- 响应式 ---------- */
@media (max-width: 768px) {
  body { background-attachment: scroll; }
  .home {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 12px 0;
  }

  .home-main {
    gap: 12px;
  }

  .home-side {
    position: static;
  }

  .profile-card {
    padding: 18px;
  }

  .avatar {
    width: 64px;
    height: 64px;
  }

  .name {
    font-size: 1.375rem;
  }

  .site-nav {
    flex-wrap: wrap;
    gap: 18px;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .site-nav .nav-about {
    margin-left: 0;
  }

  .post,
  .page {
    padding: 20px;
  }
}
