/* ============================================================
   效率笔记 · 西式编辑风重设计
   - Paper / Ink 配色，Playfair Display + Noto Serif SC 衬线标题，
     Inter + Noto Sans SC 正文，中英混排统一
   - 大幅 Hero、特色大卡、响应式卡片网格、SVG 渐变封面
   - 浅色 / 深色双主题
   ============================================================ */

:root {
  --paper: #fbf8f3;
  --surface: #ffffff;
  --surface-2: #f4efe7;
  --ink: #1a1714;
  --muted: #6e665c;
  --line: #e7e0d6;
  --accent: #e2401f;
  --accent-ink: #b5300f;
  --shadow-sm: 0 1px 2px rgba(26, 23, 20, 0.05);
  --shadow-md: 0 10px 30px rgba(26, 23, 20, 0.08);
  --shadow-lg: 0 22px 60px rgba(26, 23, 20, 0.14);
  --radius: 18px;
  --max-width: 1080px;
  --display: "Playfair Display", "Noto Serif SC", "Songti SC", Georgia,
    "Times New Roman", serif;
  --sans: "Inter", "Noto Sans SC", -apple-system, BlinkMacSystemFont,
    "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    sans-serif;
  --mono: "SFMono-Regular", "JetBrains Mono", Menlo, Consolas, monospace;
}

body.dark {
  --paper: #100f0e;
  --surface: #181614;
  --surface-2: #201d1a;
  --ink: #f2ede6;
  --muted: #a89e92;
  --line: #2c2823;
  --accent: #ff6a47;
  --accent-ink: #ff876a;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 22px 60px rgba(0, 0, 0, 0.55);
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  transition: background 0.3s ease, color 0.3s ease;
}
a {
  color: inherit;
  text-decoration: none;
}
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Kicker (小标签 / 栏目标识) ---------- */
.kicker {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
  margin: 0 0 14px;
}

/* ---------- Header / Masthead（Apple Liquid Glass 悬浮玻璃栏） ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 14px 0;
  background: transparent;
}
.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 60px;
  padding: 0 16px;
  border-radius: 20px;
  /* 液态玻璃质感 */
  background: color-mix(in srgb, var(--paper) 58%, transparent);
  backdrop-filter: blur(24px) saturate(200%);
  -webkit-backdrop-filter: blur(24px) saturate(200%);
  border: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
  box-shadow:
    0 10px 34px rgba(20, 16, 12, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    inset 0 -1px 0 rgba(0, 0, 0, 0.05);
}
/* 玻璃顶部高光（液态反光） */
.header-inner::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0) 42%);
  -webkit-mask: linear-gradient(#000, transparent 72%);
  mask: linear-gradient(#000, transparent 72%);
  opacity: 0.85;
  pointer-events: none;
}
.brand,
.site-nav,
.header-actions {
  position: relative;
  z-index: 1;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.01em;
}
.brand-mark {
  color: var(--accent);
  display: inline-flex;
}
/* 导航（桌面端水平排列，玻璃药丸） */
.site-nav {
  display: flex;
  gap: 6px;
  margin-left: auto;
}
.site-nav a {
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: none;
  color: var(--muted);
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
  white-space: nowrap;
}
.site-nav a:hover {
  color: var(--ink);
  background: color-mix(in srgb, var(--ink) 8%, transparent);
}
.site-nav a.active {
  color: var(--ink);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  border-color: color-mix(in srgb, var(--accent) 32%, transparent);
}
/* 头部右侧操作区 */
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 4px;
}
.theme-toggle {
  border: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
  background: color-mix(in srgb, var(--paper) 40%, transparent);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: var(--ink);
  width: 38px;
  height: 38px;
  border-radius: 11px;
  cursor: pointer;
  font-size: 17px;
  display: grid;
  place-items: center;
  transition: background 0.2s, transform 0.1s;
  flex-shrink: 0;
}
.theme-toggle:hover {
  background: color-mix(in srgb, var(--ink) 10%, transparent);
}
.theme-toggle:active {
  transform: scale(0.94);
}

/* 汉堡菜单按钮（仅移动端显示） */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  border: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
  background: color-mix(in srgb, var(--paper) 40%, transparent);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-radius: 11px;
  cursor: pointer;
  padding: 10px;
  flex-shrink: 0;
  transition: background 0.2s;
}
.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.menu-toggle.menu-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.menu-toggle.menu-open span:nth-child(2) {
  opacity: 0;
}
.menu-toggle.menu-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------- Main ---------- */
.main {
  padding-top: 56px;
  padding-bottom: 88px;
  min-height: 72vh;
}

/* ---------- Hero（通栏：左对齐，紧凑均衡留白） ---------- */
.hero {
  display: block;
  text-align: left;
  margin: 0 0 52px;
  padding: clamp(10px, 2.5vw, 24px) 0 0;
}
.hero-text {
  min-width: 0;
}
.hero-title {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.4rem, 6.5vw, 4.6rem);
  line-height: 1.12;
  letter-spacing: -0.025em;
  margin: 0 0 20px;
}
.hero-pre {
  display: inline;
}
.typed-line {
  display: block;
  min-height: 1.5em;
}
.typed {
  color: var(--accent);
  font-size: clamp(1.45rem, 3.4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.015em;
}
.caret {
  display: inline-block;
  width: 0.07em;
  height: 0.9em;
  background: var(--accent);
  margin-left: 0.06em;
  vertical-align: -0.08em;
  border-radius: 1px;
  animation: caret-blink 1.05s step-end infinite;
}
@keyframes caret-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}
.hero-lead {
  font-size: clamp(1.02rem, 2vw, 1.25rem);
  color: var(--muted);
  margin: 0 0 26px;
  line-height: 1.65;
}
.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: flex-start;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  background: var(--accent);
  color: #fff;
  border: 1px solid var(--accent);
  transition: transform 0.12s, box-shadow 0.2s, background 0.2s;
}
.btn:hover {
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 12px 30px color-mix(in srgb, var(--accent) 40%, transparent);
}
.btn.ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn.ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: none;
}

/* 尊重「减少动态效果」系统偏好 */
@media (prefers-reduced-motion: reduce) {
  .caret,
  .menu-toggle span {
    animation: none !important;
    transition: none !important;
  }
  .caret { opacity: 1; }
}

/* ---------- Cover (SVG 渐变封面) ---------- */
.cover {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #999;
}
.cover-deco {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.cover-mark {
  position: absolute;
  right: 16px;
  bottom: 14px;
  width: clamp(34px, 6vw, 46px);
  height: clamp(34px, 6vw, 46px);
  opacity: 0.85;
  user-select: none;
  animation: cover-spin 26s linear infinite;
}
@keyframes cover-spin {
  to {
    transform: rotate(360deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .cover-mark {
    animation: none;
  }
}
.cover-tag {
  position: absolute;
  left: 16px;
  top: 16px;
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.68rem;
  font-weight: 700;
  color: #fff;
  background: rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(4px);
  padding: 5px 11px;
  border-radius: 999px;
}

/* 真实图片封面：填充裁切 + 底部压暗保证标签可读 */
.cover-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.cover--img::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.3) 0%,
    rgba(0, 0, 0, 0) 45%
  );
  pointer-events: none;
}
.cover--img .cover-mark {
  display: none;
}

/* ---------- 文章元信息（卡片/详情共用） ---------- */
.meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: auto;
}
.meta .dot {
  opacity: 0.45;
}

/* ---------- Section head ---------- */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 12px;
  margin-bottom: 32px;
}
.section-head h2 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin: 0;
  letter-spacing: -0.01em;
}
.section-head .label {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--muted);
}

/* ---------- Card grid ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 28px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.18s ease, box-shadow 0.25s ease,
    border-color 0.25s ease;
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: color-mix(in srgb, var(--accent) 50%, var(--line));
}
.card-media {
  aspect-ratio: 16 / 10;
  overflow: hidden;
}
.card-media .cover {
  transition: transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.card:hover .card-media .cover {
  transform: scale(1.06);
}
.card-body {
  padding: 22px 24px 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.card-body .kicker {
  margin-bottom: 10px;
}
.card-body h3 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.38rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 0 0 10px;
}
.card-body .excerpt {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0 0 18px;
  flex: 1;
}
.card-body .meta {
  margin-top: 0;
}

/* ---------- Tag chips (filter) ---------- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 32px;
}
.filter-bar .fb-label {
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
  margin-right: 4px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 999px;
  padding: 6px 15px;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}
.chip:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.chip.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.chip .c {
  opacity: 0.6;
  font-size: 0.74rem;
}

/* ---------- Tag cloud ---------- */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.tag-cloud a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-family: var(--display);
  font-size: 1.1rem;
  transition: all 0.15s;
}
.tag-cloud a:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}
.tag-cloud .tag-count {
  font-family: var(--sans);
  color: var(--muted);
  font-size: 0.8rem;
}

/* ---------- Article detail ---------- */
.article-cover {
  aspect-ratio: 21 / 8;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 36px;
  box-shadow: var(--shadow-md);
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 500;
  margin-bottom: 18px;
}
.back-link:hover {
  color: var(--accent);
}
.article-header {
  margin-bottom: 12px;
}
.article-header h1 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 12px 0 16px;
}

/* ---------- 文章布局（标题通栏 + 正文左目录） ---------- */
.article-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 56px;
  align-items: start;
}

/* ---------- Table of Contents（左侧悬浮目录） ---------- */
.toc-float {
  position: sticky;
  top: 100px;
  align-self: start;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  padding-right: 6px;
}
.toc-float-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 14px;
}
.toc-float-inner nav > ul,
.toc-float-inner ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}
.toc-float-inner li {
  margin: 2px 0;
  line-height: 1.4;
}
.toc-float-inner li ul {
  padding-left: 14px;
  border-left: 1px solid var(--line);
  margin: 2px 0 4px 2px;
}
.toc-float-inner a {
  display: block;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 8px;
  border-left: 2px solid transparent;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.toc-float-inner a:hover {
  color: var(--ink);
  background: color-mix(in srgb, var(--ink) 6%, transparent);
}
.toc-float-inner a.active {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border-left-color: var(--accent);
}
/* 锚点跳转时为吸顶页头留出空间 */
.prose h2,
.prose h3 {
  scroll-margin-top: 96px;
}

/* ---------- Prose ---------- */
.prose {
  font-size: 1.08rem;
  color: var(--ink);
  word-wrap: break-word;
}
.prose h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.9rem;
  margin: 40px 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.prose h3 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.45rem;
  margin: 30px 0 10px;
}
.prose p {
  margin: 16px 0;
}
.prose ul,
.prose ol {
  padding-left: 24px;
  margin: 16px 0;
}
.prose li {
  margin: 6px 0;
}
.prose blockquote {
  margin: 22px 0;
  padding: 6px 20px;
  border-left: 4px solid var(--accent);
  background: var(--surface-2);
  border-radius: 0 10px 10px 0;
}
.prose blockquote p {
  margin: 10px 0;
}
.prose code {
  font-family: var(--mono);
  font-size: 0.86em;
  background: var(--surface-2);
  padding: 2px 6px;
  border-radius: 6px;
  color: var(--accent-ink);
}
.prose pre {
  background: var(--code-bg, #f6f8fa);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px 20px;
  overflow-x: auto;
  margin: 22px 0;
}
.prose pre code {
  background: transparent;
  padding: 0;
  color: var(--code-text, #24292e);
  font-size: 0.9rem;
  line-height: 1.6;
}
.prose img {
  max-width: 100%;
  border-radius: 12px;
  margin: 18px 0;
}
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 22px 0;
  font-size: 0.96rem;
}
.prose th,
.prose td {
  border: 1px solid var(--line);
  padding: 10px 13px;
  text-align: left;
}
.prose th {
  background: var(--surface-2);
  font-weight: 700;
}
.prose hr {
  border: none;
  border-top: 1px solid var(--line);
  margin: 36px 0;
}
.prose a {
  border-bottom: 1px solid var(--accent);
  color: var(--accent-ink);
}
.prose a:hover {
  color: var(--accent);
}
.prose pre code.hljs {
  background: transparent;
  color: var(--code-text, #24292e);
  padding: 0;
}

/* ---------- About ---------- */
.about-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(28px, 5vw, 48px);
  box-shadow: var(--shadow-md);
}
.about-card h2 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin-top: 0;
}
.about-avatar {
  width: 76px;
  height: 76px;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--accent), #ffb088);
  color: #fff;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-size: 34px;
  font-weight: 800;
  margin-bottom: 18px;
  box-shadow: var(--shadow-md);
}
.about-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
}
.about-links a {
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-weight: 500;
  font-size: 0.9rem;
}
.about-links a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ---------- Archive list (全部文章) ---------- */
.archive-intro {
  color: var(--muted);
  max-width: 640px;
  margin: 0 0 18px;
  font-size: 1.02rem;
}
.archive-year {
  display: flex;
  align-items: baseline;
  gap: 14px;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  letter-spacing: -0.02em;
  margin: 46px 0 6px;
}
.archive-year:first-of-type {
  margin-top: 6px;
}
.archive-year .ay-count {
  font-family: var(--sans);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.archive-list {
  display: flex;
  flex-direction: column;
}
.archive-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 22px;
  padding: 22px 10px;
  border-bottom: 1px solid var(--line);
  transition: background 0.2s ease, padding 0.2s ease;
}
.archive-item:hover {
  background: var(--surface);
  padding-left: 18px;
  padding-right: 18px;
}
.ai-num {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--muted);
  min-width: 34px;
  transition: color 0.2s;
}
.archive-item:hover .ai-num {
  color: var(--accent);
}
.ai-main {
  min-width: 0;
}
.ai-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.25rem, 2.6vw, 1.7rem);
  line-height: 1.2;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
  transition: color 0.2s;
}
.archive-item:hover .ai-title {
  color: var(--accent);
}
.ai-tags {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.ai-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--muted);
  font-size: 0.85rem;
  white-space: nowrap;
}
.ai-arrow {
  color: var(--accent);
  font-weight: 700;
  transition: transform 0.2s ease;
}
.archive-item:hover .ai-arrow {
  transform: translateX(4px);
}

/* ---------- Empty / Footer ---------- */
.empty {
  text-align: center;
  color: var(--muted);
  padding: 64px 0;
}
.site-footer {
  border-top: 1px solid var(--line);
  padding: 34px 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}
.site-footer p {
  margin: 4px 0;
}

/* ---------- Entrance animation ---------- */
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.hero,
.section-head,
.card {
  animation: rise 0.5s ease both;
}
.card:nth-child(1) {
  animation-delay: 0.08s;
}
.card:nth-child(2) {
  animation-delay: 0.14s;
}
.card:nth-child(3) {
  animation-delay: 0.2s;
}
.card:nth-child(4) {
  animation-delay: 0.26s;
}
.card:nth-child(5) {
  animation-delay: 0.32s;
}

/* ---------- Responsive ---------- */

/* === 中等及以下（<=1024px）：折叠文章布局，隐藏左侧悬浮目录 === */
@media (max-width: 1024px) {
  .article-layout {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .toc-float {
    display: none;
  }
}

/* === 平板及以下（<=760px）：汉堡菜单 + Hero 重调 + 间距压缩 === */
@media (max-width: 760px) {
  /* 导航：隐藏水平链接，显示汉堡按钮（玻璃下拉面板） */
  .site-nav {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 4px;
    background: color-mix(in srgb, var(--paper) 92%, transparent);
    backdrop-filter: blur(36px) saturate(200%);
    -webkit-backdrop-filter: blur(36px) saturate(200%);
    border: 1px solid color-mix(in srgb, var(--ink) 14%, transparent);
    border-radius: 18px;
    box-shadow:
      0 18px 50px rgba(20, 16, 12, 0.25),
      inset 0 1px 0 rgba(255, 255, 255, 0.55),
      inset 0 -1px 0 rgba(0, 0, 0, 0.06);
    padding: 10px;
    z-index: 49;
  }
  .site-nav.nav-open {
    display: flex;
  }
  .site-nav a {
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid transparent;
    text-transform: none;
  }
  .site-nav a:hover,
  .site-nav a.active {
    color: var(--accent);
    background: color-mix(in srgb, var(--accent) 14%, transparent);
    border-color: color-mix(in srgb, var(--accent) 32%, transparent);
  }
  .menu-toggle {
    display: flex;
  }
  .header-inner {
    height: 58px;
    padding: 0 12px;
    gap: 12px;
  }
  .brand {
    font-size: 19px;
  }

  /* 主内容区 */
  .main {
    padding-top: 36px;
    padding-bottom: 56px;
    min-height: auto;
  }

  /* Hero：通栏居中，压缩间距 */
  .hero {
    margin-bottom: 40px !important;
    padding: 12px 0 4px !important;
  }
  .hero-title {
    font-size: clamp(2rem, 10vw, 3rem) !important;
    margin-bottom: 16px !important;
  }
  .typed {
    font-size: clamp(1.15rem, 4.5vw, 1.7rem) !important;
  }
  .typed-line {
    min-height: 1.5em !important;
  }
  .hero-lead {
    font-size: 0.95rem !important;
    margin-bottom: 22px !important;
  }
  .hero-actions {
    justify-content: flex-start;
  }

  /* 卡片网格单列 */
  .grid {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }
  .card-body h3 {
    font-size: 1.18rem;
  }
  .card-body .excerpt {
    font-size: 0.88rem;
  }

  /* 区块标题 */
  .section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    margin-bottom: 22px;
    padding-bottom: 10px;
  }
  .section-head h2 {
    font-size: 1.4rem;
  }

  /* 归档列表 */
  .archive-item {
    grid-template-columns: auto 1fr;
    gap: 12px;
    padding: 16px 8px;
  }
  .archive-item:hover {
    padding-left: 8px;
    padding-right: 8px;
  }
  .ai-meta {
    grid-column: 2;
    justify-content: flex-start;
    gap: 8px;
  }
  .ai-arrow {
    display: none;
  }
  .archive-year {
    font-size: 1.5rem;
    margin: 32px 0 4px;
  }

  /* 文章详情页 */
  .article-header h1 {
    font-size: clamp(1.6rem, 7vw, 2.4rem);
  }
  .article-cover {
    aspect-ratio: 16 / 9;
    margin-bottom: 24px;
  }
  .prose h2 {
    font-size: 1.5rem;
    margin: 30px 0 12px;
  }
  .prose h3 {
    font-size: 1.22rem;
  }
  .prose {
    font-size: 1rem;
  }

  /* 关于页 */
  .about-card {
    padding: 24px 20px;
  }

  /* 容器内边距 */
  .container {
    padding: 0 20px;
  }
}

/* === 手机小屏（<=480px）：进一步压缩 === */
@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }
  .brand {
    font-size: 17px;
    gap: 7px;
  }
  .brand-mark {
    width: 17px;
    height: 17px;
  }
  .hero-title {
    font-size: clamp(1.7rem, 11vw, 2.4rem) !important;
  }
  .typed {
    font-size: clamp(1rem, 5vw, 1.45rem) !important;
  }
  .btn {
    padding: 11px 20px;
    font-size: 0.88rem;
  }
  .card-body {
    padding: 16px 18px 18px;
  }
  .card-body h3 {
    font-size: 1.08rem;
  }
  .kicker {
    font-size: 0.66rem;
    letter-spacing: 0.14em;
  }
  .site-footer {
    font-size: 0.82rem;
    padding: 24px 0;
  }
}
