/*
 * @Author: ZhuKangjia
 * @Date:   2026-05-12
 */

/* ============================================================
   DisorderCode — PaperMod-inspired minimal stylesheet
   No frameworks. No cards. No shadows. Just typography & space.
   ============================================================ */

/* ----- CSS Variables ----- */
:root {
  --bg: #FCFCFC;
  --text: #555;
  --text-heading: #222;
  --text-muted: #999;
  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto,
    'Helvetica Neue', Arial, 'Noto Sans', sans-serif;
  --font-serif: Georgia, 'Times New Roman', 'Noto Serif', 'Source Han Serif SC',
    'Songti SC', 'SimSun', serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', Consolas,
    'Courier New', monospace;
  --line-height: 1.75;
  --container-width: 800px;
  --pad: 24px;
  --pre-bg: #eaecf0;
  --pre-border: #cccfd5;
  --code-bg: #eaecf0;
  --border-light: #ebebeb;
}

/* ----- Dark Mode ----- */
[data-theme="dark"] {
  --bg: #1a1a1a;
  --text: #b3b3b3;
  --text-heading: #e4e4e4;
  --text-muted: #777;
  --pre-bg: #222222;
  --pre-border: #3e3e3e;
  --code-bg: #222222;
  --border-light: #333;
}

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: var(--line-height);
  color: var(--text);
  background: var(--bg);
  transition: background 0.3s ease, color 0.3s ease;
  animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-12px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ----- PWA standalone 返回按钮 ----- */
.pwa-back-btn {
  display: none;
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1000;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: var(--pre-bg);
  color: var(--text);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  opacity: 0.85;
  -webkit-tap-highlight-color: transparent;
}
.pwa-back-btn.show {
  display: flex;
}

.offline-banner {
  display: none;
  text-align: center;
  padding: 8px;
  font-size: 0.875rem;
  color: #fff;
  background: #d93025;
}

/* ----- Typography ----- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 700;
  color: var(--text-heading);
  line-height: 1.3;
  margin-bottom: 0.5em;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.125rem; }
h5, h6 { font-size: 1rem; }

p {
  margin-bottom: 1.25em;
}

a {
  color: var(--text-heading);
  text-decoration: none;
  transition: opacity 0.2s ease;
}

a:hover {
  opacity: 0.6;
}

a, button, [role="button"] {
  -webkit-tap-highlight-color: transparent;
}

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

ul, ol {
  padding-left: 1.5em;
  margin-bottom: 1.25em;
}

li {
  margin-bottom: 0.25em;
}

blockquote {
  margin: 1.5em 0;
  padding-left: 1em;
  border-left: 2px solid var(--text-muted);
  color: var(--text-muted);
  font-style: italic;
}

code {
  font-family: var(--font-mono);
  font-size: 0.875em;
}

pre {
  font-family: var(--font-mono);
  font-size: 0.875em;
  line-height: 1.6;
  overflow-x: auto;
  margin: 1.5em 0;
  padding: var(--pad);
  background: var(--pre-bg);
  border: 1px solid var(--pre-border);
  border-radius: 4px;
}

hr {
  border: none;
  border-top: 1px solid var(--border-light);
  margin: 2.5em 0;
}

/* ----- Layout ----- */
.site-wrapper {
  display: flex;
  flex-direction: column;
  flex: 1;
  max-width: var(--container-width);
  width: 100%;
  margin: 0 auto;
  padding: 0 var(--pad);
}

.site-wrapper--wide {
  max-width: calc(var(--container-width) + 220px);
}
/* 文章详情页正文加宽供 TOC 侧栏使用，但顶部导航栏与页脚保持和首页完全一致的宽度与缩进。
   首页里它们占满 800px wrapper 减去两侧 24px padding 后的内容宽，这里等价还原。 */
.site-wrapper--wide .site-header,
.site-wrapper--wide .site-footer {
  max-width: calc(var(--container-width) - 2 * var(--pad));
  margin: 0 auto;
  width: 100%;
}

/* ----- Header ----- */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 3em 0 2em;
}

.site-logo {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-heading);
  letter-spacing: -0.02em;
}

.site-nav {
  display: flex;
  gap: 1.5em;
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-nav li {
  margin: 0;
}

.site-nav a {
  font-size: 0.9375rem;
  color: var(--text);
  position: relative;
}

.site-nav a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--text-heading);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}

.site-nav a:hover::after {
  transform: scaleX(1);
}

.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  transition: opacity 0.2s ease;
}

.theme-toggle:hover {
  opacity: 0.6;
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
}

.theme-icon-moon { display: block; }
.theme-icon-sun  { display: none; }
[data-theme="dark"] .theme-icon-moon { display: none; }
[data-theme="dark"] .theme-icon-sun  { display: block; }

/* ----- Main Content ----- */
.site-main {
  flex: 1;
  padding: 1em 0 3em;
}

/* ----- Profile (Homepage) ----- */
.profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 4em 0;
}

.profile-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  background: #f0f0f0;
  margin-bottom: 2em;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.profile-avatar:hover {
  transform: scale(1.02);
}

.profile-name {
  font-family: var(--font-serif);
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 0.3em;
}

.profile-slogan {
  font-size: 1rem;
  color: var(--text);
  line-height: 1.8;
  letter-spacing: 0.05em;
  margin-bottom: 2em;
}

.profile-social {
  display: flex;
  gap: 1.5rem;
}

.social-icon {
  display: inline-flex;
  width: 22px;
  height: 22px;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.social-icon:hover {
  color: var(--text-heading);
}

.social-icon svg {
  width: 100%;
  height: 100%;
}

/* ----- Archive ----- */
.archive-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 2em;
}

.archive-tag-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 14px;
  font-size: 0.9375rem;
  color: var(--text);
  background: var(--code-bg);
  border: 1px solid var(--pre-border);
  border-radius: 16px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.15s ease;
}

.archive-tag-btn:hover {
  transform: scale(1.05);
  background: var(--pre-bg);
  border-color: var(--text-muted);
}

.archive-tag-btn:active {
  transform: scale(0.97);
}

.archive-tag-btn.active {
  background: var(--text-heading);
  color: var(--bg);
  border-color: var(--text-heading);
}

.archive-tag-section {
  margin-bottom: 2em;
}

.archive-tag-heading {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 0.5em;
  padding-bottom: 0.3em;
  border-bottom: 1px solid var(--border-light);
}

.archive-count {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 0.85em;
}

.archive-tag-btn.active .archive-count {
  color: var(--bg);
}

/* ----- Article List ----- */
.article-section {
  margin-bottom: 2.5em;
}

.article-year {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 1em;
  padding-bottom: 0.4em;
  border-bottom: 1px solid var(--border-light);
}

.article-month {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-muted);
  margin: 1em 0 0.5em;
}

.article-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.article-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.55em 0.55em 0.55em 0;
  border-left: 2px solid transparent;
  transition: padding-left 0.2s ease, border-color 0.2s ease, background 0.2s ease;
  border-radius: 0 4px 4px 0;
}

.article-item:hover {
  padding-left: 0.75em;
  border-left-color: var(--text-muted);
  background: var(--code-bg);
}

.article-title {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-heading);
  transition: color 0.2s ease;
}

.article-title:hover {
  color: var(--text-heading);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.article-date {
  flex-shrink: 0;
  margin-left: 2em;
  font-size: 0.875rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.article-empty {
  color: var(--text-muted);
  text-align: center;
}

.project-empty {
  grid-column: 1 / -1;
  color: var(--text-muted);
  text-align: center;
}

/* ----- Project Grid ----- */
.project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2.5em 2em;
}

.project-item {
  display: flex;
  flex-direction: column;
}

.project-icon {
  width: 36px;
  height: 36px;
  margin-bottom: 1em;
  color: var(--text-muted);
  opacity: 0.5;
}

.project-icon svg {
  width: 100%;
  height: 100%;
}

.project-title {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 0.35em;
}

.project-desc {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 0.75em;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6em;
}

.project-tag {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.project-tag::before {
  content: '[';
}

.project-tag::after {
  content: ']';
}

/* ----- About Page ----- */
.about h2 {
  font-family: var(--font-serif);
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 1.25em;
}

.about section {
  margin-bottom: 3.5em;
}

.about-intro {
  max-width: 640px;
}

.about-intro p {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--text);
  margin-bottom: 1em;
  text-align: justify;
}

/* Tech Stack */
.tech-group {
  margin-bottom: 1.25em;
}

.tech-label {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 0.2em;
}

.tech-desc {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin: 0;
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: 1.5em;
  border-left: 1px solid var(--border-light);
}

.timeline-item {
  position: relative;
  padding-bottom: 2em;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-dot {
  position: absolute;
  top: 0.35em;
  left: -1.5em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text);
  transform: translateX(-3.5px);
}

.timeline-date {
  display: block;
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 0.25em;
}

.timeline-title {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-heading);
  margin-bottom: 0.25em;
}

.timeline-empty {
  color: var(--text-muted);
}

.timeline-content p {
  font-size: 0.9375rem;
  color: var(--text);
  line-height: 1.7;
  margin: 0;
}

/* ----- Article Detail ----- */
.article-detail-header {
  margin-bottom: 2.5em;
}

.article-detail-header h1 {
  font-family: var(--font-serif);
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--text-heading);
  line-height: 1.35;
  margin-bottom: 0;
}

.article-title-row {
  display: flex;
  align-items: center;
  gap: 0.75em;
  margin-bottom: 0.5em;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}

.share-btn:hover {
  color: var(--text-heading);
  background: var(--code-bg);
}

.share-btn.copied {
  color: #4caf50;
}

.article-meta {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.article-meta-sep {
  margin: 0 0.4em;
  opacity: 0.4;
}

.article-tag {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.article-body {
  font-size: 1.0625rem;
  line-height: 1.85;
  color: var(--text);
}

.article-body h1,
.article-body h2,
.article-body h3,
.article-body h4,
.article-body h5,
.article-body h6 {
  margin-top: 2em;
  margin-bottom: 0.6em;
}

.article-body h1 { font-size: 1.625rem; }
.article-body h2 { font-size: 1.375rem; }
.article-body h3 { font-size: 1.125rem; }

.article-body p {
  margin-bottom: 1.25em;
}

.article-body li {
  margin-bottom: 0.35em;
}

.article-body blockquote {
  margin: 1.5em 0;
  padding: 0.5em 1em;
  border-left: 2px solid var(--text-muted);
  color: var(--text-muted);
  font-style: italic;
}

.article-body img {
  max-width: 100%;
  margin: 1.5em auto;
  border-radius: 4px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.article-body img:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.article-body .katex-display {
  margin: 1.5em 0;
  overflow-x: auto;
  overflow-y: hidden;
}

.article-body pre {
  font-family: var(--font-mono);
  background: var(--pre-bg);
  padding: 1em 2.5em 1em 1.25em;
  overflow-x: auto;
  font-size: 0.875rem;
  line-height: 1.6;
  margin: 1.5em 0;
  border: 1px solid var(--pre-border);
  border-radius: 4px;
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

.article-body pre:hover {
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  border-color: var(--text-muted);
}

.article-body code {
  font-family: var(--font-mono);
  font-size: 0.875em;
}

.article-body :not(pre) > code {
  background: var(--code-bg);
  padding: 0.15em 0.35em;
  border-radius: 2px;
}

/* ----- Quill Editor Output Styles ----- */
.article-body .ql-align-center { text-align: center; }
.article-body .ql-align-right { text-align: right; }
.article-body .ql-align-justify { text-align: justify; }

.article-body .ql-indent-1 { padding-left: 3em; }
.article-body .ql-indent-2 { padding-left: 6em; }
.article-body .ql-indent-3 { padding-left: 9em; }
.article-body .ql-indent-4 { padding-left: 12em; }
.article-body .ql-indent-5 { padding-left: 15em; }
.article-body .ql-indent-6 { padding-left: 18em; }
.article-body .ql-indent-7 { padding-left: 21em; }
.article-body .ql-indent-8 { padding-left: 24em; }

.article-body .ql-size-small { font-size: 0.75em; }
.article-body .ql-size-large { font-size: 1.5em; }
.article-body .ql-size-huge { font-size: 2.5em; }

.article-body .ql-font-serif { font-family: var(--font-serif); }
.article-body .ql-font-monospace { font-family: var(--font-mono); }

.article-body pre.ql-syntax {
  font-family: var(--font-mono);
  background: var(--pre-bg);
  color: var(--text);
  padding: 1em 2.5em 1em 1.25em;
  overflow-x: auto;
  font-size: 0.875rem;
  line-height: 1.6;
  margin: 1.5em 0;
  border: 1px solid var(--pre-border);
  border-radius: 4px;
}

.article-body .ql-code-block-container {
  font-family: var(--font-mono);
  background: var(--pre-bg);
  color: var(--text);
  padding: 1em 2.5em 1em 1.25em;
  overflow-x: auto;
  font-size: 0.875rem;
  line-height: 1.6;
  margin: 1.5em 0;
  border: 1px solid var(--pre-border);
  border-radius: 4px;
}

.article-body .ql-code-block {
  white-space: pre-wrap;
  tab-size: 4;
}

/* ----- Code Block Copy Button ----- */
.code-block-wrapper {
  position: relative;
}

.copy-btn {
  position: absolute;
  top: 0.4em;
  right: 0.5em;
  padding: 0.2em 0.55em;
  font-size: 0.75rem;
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--pre-border);
  border: none;
  border-radius: 3px;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s ease;
  line-height: 1.5;
}

.code-block-wrapper:hover .copy-btn {
  opacity: 1;
}

.copy-btn.copied {
  color: #4caf50;
  background: var(--pre-border);
}

.article-detail-footer {
  margin-top: 3em;
  padding-top: 1.5em;
  border-top: 1px solid var(--border-light);
  font-size: 0.9375rem;
}

.article-detail-footer a {
  color: var(--text-muted);
}

.article-detail-footer a:hover {
  color: var(--text-heading);
}

/* ----- Article TOC Sidebar ----- */
.article-toc-layout {
  display: flex;
  gap: 0;
}

.article-toc-sidebar {
  width: 200px;
  flex-shrink: 0;
  position: sticky;
  top: 2em;
  align-self: flex-start;
  max-height: calc(100vh - 4em);
  overflow-y: auto;
  padding: 0 16px 0 0;
  border-right: 1px solid var(--border-light);
}

.article-toc-title {
  font-family: var(--font-serif);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-heading);
  margin-bottom: 0.75em;
}

.article-toc-nav {
  list-style: none;
  margin: 0;
  padding: 0;
}

.article-toc-item {
  display: block;
  width: 100%;
  padding: 3px 8px;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--text-muted);
  cursor: pointer;
  border: none;
  background: none;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-radius: 3px;
  transition: background 0.15s, color 0.15s, padding-left 0.2s;
  animation: slideInLeft 0.3s ease both;
}

.article-toc-item:hover {
  background: var(--code-bg);
}

.article-toc-item.active {
  color: #1890ff;
}

.article-toc-item.toc-h1 {
  font-weight: 600;
  color: var(--text);
}

.article-toc-item.toc-h2 {
  padding-left: 20px;
}

.article-toc-item.toc-h3 {
  padding-left: 36px;
}

.article-toc-content {
  flex: 1;
  min-width: 0;
  padding-left: 24px;
}

@media (max-width: 768px) {
  .article-toc-sidebar {
    display: none;
  }

  .article-toc-content {
    padding-left: 0;
  }

  .site-wrapper--wide {
    max-width: var(--container-width);
  }
}

/* ----- Mobile Nav Toggle ----- */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 4px 8px;
  font-size: 1.25rem;
  line-height: 1;
  -webkit-tap-highlight-color: transparent;
}

/* ----- Footer ----- */
.site-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75em;
  padding: 2em 0 3em;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.footer-row {
  display: flex;
  align-items: center;
  gap: 1em;
}

.footer-meta {
  gap: 0.5em;
}

.footer-meta span,
.footer-icp {
  color: var(--text-muted);
  white-space: nowrap;
}

.footer-icp:hover {
  opacity: 0.7;
}

.footer-console {
  display: flex;
  align-items: center;
  color: var(--text-muted);
}

.footer-console:hover {
  opacity: 0.7;
}

.footer-version {
  font-size: 0.75rem;
  margin-top: 0.25em;
}

/* ============================================================
   Mobile Responsive — max-width: 768px
   ============================================================ */
@media (max-width: 768px) {
  :root {
    --pad: 20px;
  }

  html {
    font-size: 15px;
  }

  /* Header — tighter spacing */
  .site-header {
    padding: 2em 0 1.25em;
    /* 桌面 space-between 会被宽度为 0 的 <nav> 占位挤偏，移动端改 flex-start + 按钮 auto 靠右 */
    justify-content: flex-start;
  }

  .site-logo {
    font-size: 1.125rem;
  }

  .site-nav {
    gap: 1em;
  }

  .site-nav a {
    font-size: 0.875rem;
  }

  /* Typography — scale down headings */
  h1 { font-size: 1.625rem; }
  h2 { font-size: 1.25rem; }
  h3 { font-size: 1.125rem; }

  /* Profile */
  .profile {
    padding: 2.5em 0;
  }

  .profile-avatar {
    width: 100px;
    height: 100px;
  }

  .profile-name {
    font-size: 1.75rem;
  }

  /* Article List */
  .article-item {
    flex-direction: column;
    align-items: flex-start;
    padding: 0.65em 0;
  }

  .article-date {
    margin-left: 0;
    margin-top: 0.2em;
    font-size: 0.8125rem;
  }

  .article-year {
    font-size: 1.125rem;
  }

  /* Project Grid — single column */
  .project-grid {
    grid-template-columns: 1fr;
    gap: 2em;
  }

  /* About */
  .about-intro p {
    text-align: left;
  }

  /* Article Detail */
  .article-detail-header h1 {
    font-size: 1.5rem;
  }

  .article-body {
    font-size: 1rem;
  }

  .article-body pre,
  .article-body .ql-code-block-container {
    padding: 0.75em 2.5em 0.75em 1em;
    font-size: 0.8125rem;
  }

  /* 缩进缩放 */
  .article-body .ql-indent-5 { padding-left: 6em; }
  .article-body .ql-indent-6 { padding-left: 7em; }
  .article-body .ql-indent-7 { padding-left: 8em; }
  .article-body .ql-indent-8 { padding-left: 9em; }

  /* 导航汉堡菜单 */
  .nav-toggle { display: block; margin-left: auto; }
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--bg);
    border: 1px solid var(--border-light);
    border-radius: 6px;
    padding: 6px 0;
    min-width: 120px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    z-index: 100;
  }
  .site-nav.open { display: flex; }
  .site-nav li { margin: 0; }
  .site-nav a {
    display: block;
    padding: 8px 20px;
    font-size: 0.9375rem;
  }
  .site-nav a::after { display: none; }
  .site-header { position: relative; }
}

/* ============================================================
   Reduced Motion：尊重系统"减弱动态效果"（无障碍 + 移动端省电）
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
