﻿/* ============================================================
   HOUYJ.COM — Oh My Posh "M365Princess" 主题移植 · 浅色版
   纸白底 + 主题原色 powerline 色块 + 提深渐变文字
   ============================================================ */

:root {
  /* M365Princess 调色板（主题原色，色块上用） */
  --c-tan: #cc3802;
  --c-teal: #047e84;
  --c-plum: #9a348e;
  --c-blush: #da627d;
  --c-salmon: #fca17d;
  --c-sky: #86bbd8;
  --c-tealblue: #33658a;

  /* 浅色底上提深的文本渐变（保证对比度） */
  --grad: linear-gradient(115deg, #8e2f82 0%, #c94f6d 52%, #c23f14 100%);
  --grad-soft: linear-gradient(115deg, rgba(154, 52, 142, 0.1), rgba(218, 98, 125, 0.1));

  /* 语义色 */
  --bg: #faf9f6;
  --bg-soft: #ffffff;
  --surface: rgba(20, 16, 30, 0.03);
  --fg: #1d1a26;
  --fg-2: #55514f;
  --fg-3: #8f8a94;
  --line: #e9e6df;
  --accent: var(--c-blush);

  /* 字体：Nerd Font 路线，启用连字 */
  --mono: "Cascadia Code", "Cascadia Code NF", "JetBrains Mono", "JetBrainsMono Nerd Font",
          ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;

  /* admin.css 兼容别名 */
  --bg-card: var(--bg-soft);
  --ink: var(--fg);
  --ink-2: var(--fg-2);
  --ink-3: var(--fg-3);
  --accent-soft: rgba(218, 98, 125, 0.14);
  --radius: 10px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  /* 细网格底纹（移到 body，给颗粒层让位） */
  background-image:
    linear-gradient(rgba(29, 26, 38, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(29, 26, 38, 0.025) 1px, transparent 1px);
  background-size: 56px 56px;
}

/* 胶片颗粒：极低透明度噪点，覆盖全站 */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  opacity: 0.028;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='140' height='140' filter='url(%23n)'/></svg>");
}

/* 环境光晕：左上梅紫，右下青 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(900px 500px at 10% -10%, rgba(154, 52, 142, 0.09), transparent 60%),
    radial-gradient(800px 500px at 98% 6%, rgba(4, 126, 132, 0.07), transparent 60%),
    radial-gradient(700px 600px at 50% 112%, rgba(51, 101, 138, 0.06), transparent 60%);
  pointer-events: none;
}

::selection { background: var(--c-plum); color: #fff; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #d6d2c8; border: 3px solid var(--bg); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: var(--c-plum); }

.mono, code, pre, time, .kicker, .section-label, .section-count,
.logo, .clock, .hero-meta, .article-meta, .nav-dir, .read-cta,
.site-footer, .post-tags, .tag, .ghost-num {
  font-family: var(--mono);
}

.wrap { max-width: 880px; margin: 0 auto; padding: 0 32px; }

a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 2px solid var(--c-blush); outline-offset: 3px; }

.accent { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.kicker {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 3px;
  color: var(--c-tealblue);
  text-transform: uppercase;
  margin-bottom: 28px;
}

.display {
  font-size: clamp(38px, 6.5vw, 64px);
  font-weight: 800;
  letter-spacing: -2px;
  line-height: 1.12;
}

/* ============ 头部 ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  background: rgba(250, 249, 246, 0.8);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 32px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ---- powerline logo ---- */
.logo {
  display: inline-flex;
  align-items: stretch;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.3px;
}
.logo .pl {
  display: inline-flex;
  align-items: center;
  color: #fff;
  padding: 5px 14px 5px 12px;
  clip-path: polygon(0 0, 100% 0, calc(100% - 9px) 100%, 0 100%);
  font-family: var(--mono);
  font-size: 13px;
  transition: filter 0.2s;
}
.logo .pl:first-child { padding-left: 12px; }
.logo .pl + .pl { margin-left: -7px; padding-left: 16px; }
.logo .pl-name { background: var(--c-plum); }
.logo .pl-tld { background: var(--c-blush); }
.logo:hover .pl { filter: brightness(1.1) saturate(1.1); }
.logo .cursor {
  color: var(--c-tan);
  font-weight: 400;
  animation: blink 1.1s steps(1) infinite;
  margin-left: 8px;
  align-self: center;
}
@keyframes blink { 50% { opacity: 0; } }

.header-right { display: flex; align-items: center; gap: 28px; }

.clock {
  font-size: 12px;
  color: var(--fg-3);
  letter-spacing: 0.5px;
  font-variant-numeric: tabular-nums;
}
.clock::before {
  content: "♥";
  color: var(--c-blush);
  margin-right: 7px;
  font-size: 10px;
}
@media (max-width: 560px) { .clock { display: none; } }

.site-header nav { display: flex; gap: 6px; }
.site-header nav a {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  color: var(--fg-3);
  padding: 6px 12px;
  border-radius: 6px;
  position: relative;
  transition: all 0.2s;
}
.site-header nav a:hover { color: var(--fg); background: rgba(29,26,38,0.06); }
.site-header nav a.active {
  color: #fff;
  background: var(--grad);
  box-shadow: 0 4px 14px rgba(154, 52, 142, 0.3);
}

/* ============ Hero ============ */
.hero { padding: 32px 0 24px; }

/* ---- M365Princess prompt 复刻：五段 powerline 色块 ---- */
.prompt-bar {
  display: flex;
  align-items: stretch;
  margin-bottom: 34px;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
  width: fit-content;
  max-width: 100%;
  filter: drop-shadow(0 4px 14px rgba(154, 52, 142, 0.22));
}
.seg {
  color: #fff;
  padding: 8px 20px 8px 22px;
  white-space: nowrap;
  clip-path: polygon(0 0, calc(100% - 11px) 0, 100% 50%, calc(100% - 11px) 100%, 0 100%, 11px 50%);
  transition: filter 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
  position: relative;
  text-shadow: 0 1px 2px rgba(0,0,0,0.25);
}
.seg:first-child {
  padding-left: 42px;
}
.prompt-avatar {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255,255,255,0.3);
}
.seg:first-child {
  clip-path: polygon(0 0, calc(100% - 11px) 0, 100% 50%, calc(100% - 11px) 100%, 0 100%, 11px 50%);
  /* 头像右缘 51px（left 13 + 宽 38），左 padding 收紧；右侧 15px 使头像到右缘间距≈20px，与其他段一致 */
  padding-left: 56px;
  padding-right: 15px;
}
.seg + .seg { margin-left: -10px; padding-left: 24px; }
.seg:hover { filter: brightness(1.12) saturate(1.1); }
.seg.s1 { background: var(--c-plum); }
.seg.s2 { background: var(--c-blush); }
.seg.s3 { background: var(--c-tan); }
.seg.s4 { background: var(--c-teal); }
.seg.s5 { background: var(--c-tealblue); }
.seg.s5::after {
  content: "";
  display: inline-block;
  width: 8px; height: 8px;
  margin-left: 8px;
  border-radius: 50%;
  background: #1a9e4b;
  box-shadow: 0 0 8px rgba(26, 158, 75, 0.7);
  vertical-align: 1px;
}

/* ---- 终端自我介绍 ---- */
.term {
  font-family: var(--mono);
  font-feature-settings: "liga" 1, "calt" 1;
  font-size: clamp(14px, 2vw, 16.5px);
  line-height: 2.15;
  min-height: 5.5em;
}
.term-line { white-space: pre-wrap; }
.term-line.cmd {
  color: var(--fg);
  font-weight: 600;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-left: 3px solid var(--c-teal);
  border-radius: 8px;
  padding: 10px 18px;
  display: inline-block;
  margin-bottom: 18px;
  box-shadow: 0 2px 10px rgba(29,26,38,0.05);
}
.term-line.cmd .prompt { color: var(--c-tan); margin-right: 10px; user-select: none; }
.term-line.out { color: var(--fg-2); padding-left: 1.6em; position: relative; }
.term-line.out::before {
  position: absolute;
  left: 0.4em;
  font-weight: 700;
}
.term-line.out.c-plum::before { content: "❯"; color: var(--c-plum); animation: markerPulse 2.8s ease-in-out infinite; }
.term-line.out.c-blush::before { content: "❯"; color: var(--c-blush); animation: markerPulse 2.8s ease-in-out 0.4s infinite; }
.term-line.out.c-salmon::before { content: "❯"; color: var(--c-tan); animation: markerPulse 2.8s ease-in-out 0.8s infinite; }
.term-line.out.c-sky::before { content: "❯"; color: var(--c-tealblue); }
@keyframes markerPulse {
  0%, 100% { opacity: 1; text-shadow: 0 0 0 transparent; }
  50% { opacity: 0.45; text-shadow: 0 0 12px currentColor; }
}
.term-line.out.dim { color: var(--fg-3); }
.term-line.out.dim::before { content: "$"; color: var(--c-teal); }
.term-caret {
  display: inline-block;
  width: 9px;
  height: 1.15em;
  background: var(--grad);
  vertical-align: text-bottom;
  animation: blink 0.9s steps(1) infinite;
  margin-left: 2px;
}

/* ---- 技能跑马灯 ---- */
.marquee {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  padding: 18px 0;
  margin-bottom: 12px;
  max-width: 100%;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee-track {
  display: flex;
  align-items: center;
  gap: 36px;
  width: max-content;
  animation: marquee 32s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2.5px;
  color: var(--fg-3);
  white-space: nowrap;
  transition: color 0.2s;
}
.marquee-track span:hover { color: var(--c-tealblue); }
.marquee-track i { color: var(--line); font-style: normal; }
@keyframes marquee { to { transform: translateX(-50%); } }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.hero-meta {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--fg-3);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.hero-meta .sep { color: var(--line); }

.status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--c-blush);
  box-shadow: 0 0 0 3px rgba(218, 98, 125, 0.2);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(218, 98, 125, 0.2); }
  50% { box-shadow: 0 0 0 6px rgba(218, 98, 125, 0.08); }
}

.tag-hero { padding: 32px 0 24px; }
.tag-hero h1 {
  font-size: clamp(40px, 7vw, 72px);
  font-weight: 800;
  letter-spacing: -2px;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.tag-hero .count { margin-top: 20px; font-size: 12px; letter-spacing: 2px; color: var(--fg-3); }

/* ============ INDEX 区块 ============ */
.index-section { padding-top: 8px; padding-bottom: 8px; }

 .section-head { display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 8px;
}
.section-label { font-size: 11px; font-weight: 600; letter-spacing: 3px; color: var(--fg); }
.section-rule { flex: 1; height: 1px; background: var(--line); }
.section-count { font-size: 11px; color: var(--fg-3); letter-spacing: 1px; }

/* ============ 文章行 ============ */
.post-row {
  display: grid;
  grid-template-columns: 88px 1fr auto;
  grid-template-areas: "num main side" "num main cta";
  column-gap: 32px;
  row-gap: 4px;
  align-items: start;
  padding: 12px 16px 12px 0;
  border-bottom: 1px solid var(--line);
  position: relative;
  border-radius: 10px;
  transition: background 0.25s, padding-left 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.post-row:hover { background: var(--bg-soft); padding-left: 20px; box-shadow: 0 6px 24px rgba(154,52,142,0.07); }

.post-row::before {
  content: "";
  position: absolute;
  left: 0; top: 12px; bottom: 12px;
  width: 3px;
  border-radius: 3px;
  background: var(--grad);
  transform: scaleY(0);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.post-row:hover::before { transform: scaleY(1); }

.ghost-num {
  grid-area: num;
  font-size: 46px;
  font-weight: 700;
  color: #e3dfd6;
  letter-spacing: -2px;
  line-height: 1;
  padding-top: 4px;
  transition: all 0.3s;
  user-select: none;
}
.post-row:hover .ghost-num {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.post-main { grid-area: main; min-width: 0; }

.post-title {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1.4;
  transition: all 0.25s;
  display: inline;
}
.post-row:hover .post-title {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.excerpt {
  margin-top: 8px;
  font-size: 14px;
  color: var(--fg-2);
  max-width: 52ch;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-side {
  grid-area: side;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  padding-top: 6px;
}
.post-side time { font-size: 11px; color: var(--fg-3); letter-spacing: 0.5px; }

.post-tags { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.tag {
  font-size: 10px;
  letter-spacing: 0.5px;
  padding: 3px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--fg-3);
  background: var(--bg-soft);
  transition: all 0.2s;
  white-space: nowrap;
}
.post-row:hover .tag { border-color: rgba(154,52,142,0.35); color: var(--fg-2); }
.tag.link:hover {
  border-color: var(--c-blush);
  color: var(--c-blush);
  background: rgba(218, 98, 125, 0.08);
}
.tag.draft { border-style: dashed; color: var(--c-tan); }

.read-cta {
  grid-area: cta;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  color: var(--fg-3);
  opacity: 0;
  transform: translateX(-8px);
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  padding-top: 8px;
  justify-self: end;
}
.post-row:hover .read-cta {
  opacity: 1;
  transform: none;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.empty { padding: 48px 0; text-align: center; color: var(--fg-2); }
.empty a { color: var(--c-blush); border-bottom: 1px solid var(--c-blush); }

/* ============ 文章页 ============ */
.progress-bar {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0;
  background: var(--grad);
  z-index: 30;
}

.article-wrap { max-width: 720px; padding-top: 4px; padding-bottom: 4px; }

.article-head { margin-bottom: 8px; }
.article-title { margin-top: 8px; }

.article-meta {
  margin-top: 6px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--fg-3);
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.article-meta .sep { color: var(--line); }

/* ============ 正文 ============ */
.article-body {
  font-size: 16.5px;
  line-height: 1.95;
  color: #33313d;
  overflow-wrap: break-word;
}
.article-body > *:first-child { margin-top: 0; }
.article-body p { margin: 0.6em 0; }
.article-body h2, .article-body h3, .article-body h4 {
  margin: 1em 0 0.4em;
  letter-spacing: -0.4px;
  scroll-margin-top: 80px;
}
.article-body h2 {
  font-size: 24px; font-weight: 750;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.article-body h3 { font-size: 20px; font-weight: 700; color: var(--fg); }
.article-body h4 { font-size: 17px; font-weight: 700; color: var(--fg); }
.article-body h2::before {
  content: "## ";
  font-family: var(--mono);
  color: var(--c-tan);
  font-weight: 400;
  font-size: 0.8em;
  vertical-align: 0.15em;
}
.article-body a {
  color: var(--c-teal);
  border-bottom: 1px solid rgba(4, 126, 132, 0.4);
  transition: all 0.2s;
}
.article-body a:hover {
  color: var(--c-blush);
  border-bottom-color: var(--c-blush);
}
.article-body ul, .article-body ol { margin: 1.3em 0; padding-left: 1.7em; }
.article-body li { margin: 0.45em 0; }
.article-body li::marker { color: var(--c-tan); font-family: var(--mono); }
.article-body blockquote {
  margin: 1em 0;
  padding: 10px 0 10px 22px;
  border-left: 3px solid;
  border-image: linear-gradient(180deg, var(--c-plum), var(--c-blush)) 1;
  color: var(--fg-2);
  background: var(--grad-soft);
  border-radius: 0 8px 8px 0;
}
.article-body code {
  font-family: var(--mono);
  font-feature-settings: "liga" 1;
  font-size: 0.82em;
  background: rgba(154, 52, 142, 0.09);
  border: 1px solid rgba(154, 52, 142, 0.22);
  color: #7d2272;
  padding: 2px 6px;
  border-radius: 4px;
}
.article-body pre {
  margin: 1em 0;
  padding: 20px 22px;
  background: #17151f;
  border-radius: 8px;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.7;
}
.article-body pre code {
  background: none;
  border: none;
  padding: 0;
  color: #d8d4e4;
  font-size: inherit;
}
.article-body img { max-width: 100%; border-radius: 8px; margin: 1em 0; }
.article-body table {
  display: block;
  width: 100%;
  border-collapse: collapse;
  margin: 1em 0;
  font-size: 14.5px;
  overflow-x: auto;
}
.article-body th, .article-body td { padding: 10px 14px; border-bottom: 1px solid var(--line); text-align: left; }
.article-body th {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--c-teal);
  border-bottom: 2px solid var(--c-plum);
}
.article-body hr {
  border: none;
  height: 1px;
  background: var(--line);
  margin: 3em 0;
  position: relative;
}
.article-body hr::after {
  content: "◆";
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  background: var(--bg);
  padding: 0 14px;
  color: var(--c-plum);
  font-size: 10px;
}

/* ============ 上下篇导航 ============ */
    .post-nav { margin-top: 24px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.nav-cell {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-soft);
  transition: all 0.25s;
  min-width: 0;
}
.nav-cell.prev { align-items: flex-start; }
.nav-cell.next { align-items: flex-end; text-align: right; }
.nav-cell:hover {
  border-color: rgba(154,52,142,0.45);
  transform: translateY(-2px);
  box-shadow: 0 8px 26px rgba(154, 52, 142, 0.12);
}
.nav-dir { font-size: 10px; font-weight: 600; letter-spacing: 2px; color: var(--fg-3); }
.nav-cell:hover .nav-dir {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.nav-title {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.2px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ============ 页脚 ============ */
.site-footer { border-top: 1px solid var(--line); padding: 24px 0; }
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-size: 10px;
  letter-spacing: 1.5px;
  color: var(--fg-3);
}
.footer-inner .mono:first-child { color: var(--fg-2); }
.footer-mail { color: inherit; text-decoration: none; transition: color .2s; }
.footer-mail:hover, .footer-beian:hover { color: var(--c-plum); }
.footer-beian { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; transition: color .2s; }
.footer-inner { flex-wrap: wrap; }
@media (max-width: 640px) {
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 6px; }
  .footer-mid { display: none; }
}

/* ============ 404 / 通用按钮 ============ */
.notfound { padding: 80px 0; }
.notfound h1 {
  font-size: 36px; font-weight: 800; letter-spacing: -1px; margin: 16px 0 12px;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.notfound p { color: var(--fg-2); margin-bottom: 32px; font-family: var(--mono); font-size: 13px; }

.btn-primary {
  display: inline-block;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: var(--grad);
  border: none;
  border-radius: 8px;
  padding: 10px 22px;
  cursor: pointer;
  transition: filter 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 4px 16px rgba(154, 52, 142, 0.28);
}
.btn-primary:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(218, 98, 125, 0.35);
}
.btn-primary:active { transform: translateY(0); }

/* ============ 滚动渐显 ============ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: calc(var(--i, 0) * 50ms);
}
.reveal.visible { opacity: 1; transform: none; }

@media (max-width: 720px) {
  .wrap, .header-inner { padding: 0 20px; }
  .hero { padding: 64px 0 48px; }
  .prompt-bar { overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
  .prompt-bar::-webkit-scrollbar { display: none; }
  .post-row { grid-template-columns: 56px 1fr; grid-template-areas: "num main" "side side" "cta cta"; row-gap: 12px; }
  .ghost-num { font-size: 32px; }
  .post-side { flex-direction: row; align-items: center; justify-content: flex-start; }
  .post-tags { justify-content: flex-start; }
  .read-cta { display: none; }
  .post-nav { grid-template-columns: 1fr; }
  .term-line.cmd { display: block; }
  .article-body { font-size: 16px; }
  .article-title { letter-spacing: -1px; }
}

@media (max-width: 480px) {
  .header-inner { height: 56px; }
  .logo .pl { font-size: 12px; padding: 4px 10px 4px 9px; }
  .logo .pl + .pl { padding-left: 12px; margin-left: -6px; }
  .site-header nav a { font-size: 10px; padding: 5px 9px; letter-spacing: 1px; }
  .display { letter-spacing: -1.2px; }
  .hero { padding: 32px 0 24px; }
  .term { font-size: 13.5px; line-height: 2; }
  .marquee { margin-bottom: 48px; }
  .post-row { padding: 8px 12px 8px 0; }
  .post-title { font-size: 18px; }
  .article-wrap { padding-top: 8px; }
  .article-head { margin-bottom: 12px; }
  .article-body h2 { font-size: 21px; }
  .article-body pre { padding: 14px 16px; font-size: 12.5px; }
  .post-nav { margin-top: 16px; }
}

/* ============ 进阶细节 ============ */

/* 头部向下滚动隐藏 */
.site-header.header-hidden { transform: translateY(-100%); }

/* Hero 侧边竖排标语 */
.hero-side {
  position: absolute;
  right: 8px;
  top: 120px;
  writing-mode: vertical-rl;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 4px;
  color: var(--fg-3);
  opacity: 0.55;
  user-select: none;
  pointer-events: none;
}
.hero-side::before {
  content: "";
  display: block;
  width: 1px;
  height: 48px;
  background: var(--line);
  margin: 0 auto 14px;
}
@media (max-width: 900px) { .hero-side { display: none; } }

/* 文章标题锚点 */
.h-anchor {
  opacity: 0;
  margin-left: 10px;
  font-family: var(--mono);
  font-size: 0.55em;
  font-weight: 400;
  color: var(--c-plum);
  vertical-align: middle;
  transition: opacity 0.2s;
}
h2:hover .h-anchor, h3:hover .h-anchor, h4:hover .h-anchor { opacity: 1; }

/* 回到顶部 */
.to-top {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 40;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  color: var(--fg-2);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 16px;
  cursor: pointer;
  opacity: 0;
  transform: translateY(12px);
  transition: all 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 6px 20px rgba(29,26,38,0.08);
}
.to-top.show { opacity: 1; transform: none; }
.to-top:hover {
  color: #fff;
  background: var(--grad);
  border-color: transparent;
  box-shadow: 0 8px 24px rgba(154, 52, 142, 0.3);
}
@media (max-width: 720px) { .to-top { right: 16px; bottom: 16px; padding: 8px 13px; } }

/* 自定义光标（仅精确指针设备） */
.cursor-dot, .cursor-ring {
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 9999;
  border-radius: 50%;
  display: none;
}
@media (pointer: fine) {
  body.custom-cursor, body.custom-cursor a, body.custom-cursor button,
  body.custom-cursor input, body.custom-cursor textarea, body.custom-cursor label {
    cursor: none;
  }
  body.custom-cursor .cursor-dot, body.custom-cursor .cursor-ring { display: block; }
}
.cursor-dot {
  width: 12px; height: 12px;
  background: var(--c-blush);
  transform: translate(-50%, -50%);
}
.cursor-ring {
  width: 34px; height: 34px;
  border: 1.5px solid rgba(154, 52, 142, 0.55);
  transform: translate(-50%, -50%);
  transition: width 0.25s, height 0.25s, border-color 0.25s, background 0.25s;
}
.cursor-ring.grow {
  width: 52px; height: 52px;
  border-color: var(--c-blush);
  background: rgba(218, 98, 125, 0.08);
}

/* ============ Boot 启动画面 ============ */
#boot {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.45s ease;
}
#boot .aurora { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
#boot .boot-inner { position: relative; z-index: 1; }
#boot.done { opacity: 0; pointer-events: none; }
.boot-inner {
  font-family: var(--mono);
  font-size: 14px;
  line-height: 2.2;
  color: var(--fg-2);
}
.boot-cmd { color: var(--fg); font-weight: 600; margin: 26px 0 8px; }
.boot-cmd .prompt { color: var(--c-tan); margin-right: 10px; }
.boot-line {
  opacity: 1;
  padding-left: 1.4em;
  position: relative;
}
.boot-text { display: inline; }
.boot-line::before {
  content: "❯";
  position: absolute;
  left: 0.35em;
  font-weight: 700;
}
.boot-line.b-plum::before { color: var(--c-plum); }
.boot-line.b-blush::before { color: var(--c-blush); }
.boot-line.b-teal::before { color: var(--c-teal); }
.boot-line .ok {
  font-weight: 700;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.boot-line.dim { color: var(--fg-3); }
.boot-line.welcome { font-weight: 600; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.boot-line.welcome::before { content: "❯"; position: absolute; left: 0.35em; font-weight: 700; color: var(--c-blush); -webkit-text-fill-color: var(--c-blush); }
.boot-caret {
  display: none;
  width: 9px;
  height: 1.15em;
  background: var(--grad);
  vertical-align: text-bottom;
  margin-left: 2px;
  animation: caretBlink 1.1s steps(1) infinite;
}
.boot-line.active .boot-caret { display: inline-block; }
@keyframes caretBlink { 50% { opacity: 0; } }
.boot-pbar { margin-bottom: 30px; animation: bootBarIn 0.6s cubic-bezier(0.22,1,0.36,1) both; }
@keyframes bootBarIn { from { opacity: 0; transform: translateY(-8px) scale(0.96); } to { opacity: 1; transform: none; } }
@keyframes bootIn { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: none; } }

/* ============ ⌘K 命令面板 ============ */
.cmdk-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  color: var(--fg-3);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 12px;
  cursor: pointer;
  transition: all 0.2s;
}
.cmdk-trigger:hover { color: var(--fg); border-color: rgba(154,52,142,0.4); box-shadow: 0 4px 14px rgba(154,52,142,0.1); }
.cmdk-key {
  font-size: 10px;
  padding: 1px 6px;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 4px;
  color: var(--fg-2);
  background: var(--surface);
}
.cmdk-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(29, 26, 38, 0.35);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 18vh;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s, visibility 0s 0.2s;
}
.cmdk-overlay.open { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity 0.2s; }
.cmdk-panel {
  width: min(560px, calc(100vw - 40px));
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 24px 80px rgba(29,26,38,0.28), 0 0 0 1px rgba(154,52,142,0.08);
  overflow: hidden;
  transform: translateY(-8px) scale(0.98);
  transition: transform 0.22s cubic-bezier(0.22,1,0.36,1);
}
.cmdk-overlay.open .cmdk-panel { transform: none; }
.cmdk-input-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}
.cmdk-input-row .prompt { color: var(--c-tan); font-family: var(--mono); font-weight: 700; }
.cmdk-input {
  flex: 1;
  border: none;
  outline: none;
  background: none;
  font-family: var(--mono);
  font-size: 15px;
  color: var(--fg);
}
.cmdk-input::placeholder { color: var(--fg-3); }
.cmdk-list { max-height: 320px; overflow-y: auto; padding: 8px; }
.cmdk-item {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
}
.cmdk-item.active { background: var(--grad-soft); }
.cmdk-item.active .cmdk-title { color: var(--c-plum); }
.cmdk-idx { font-size: 11px; color: var(--fg-3); min-width: 24px; }
.cmdk-title { font-size: 14px; font-weight: 600; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmdk-meta { font-size: 10px; color: var(--fg-3); font-family: var(--mono); letter-spacing: 0.5px; white-space: nowrap; }
.cmdk-empty { padding: 28px; text-align: center; font-family: var(--mono); font-size: 12px; color: var(--fg-3); }
.cmdk-foot {
  display: flex;
  gap: 16px;
  padding: 10px 18px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 10px;
  color: var(--fg-3);
  letter-spacing: 0.5px;
}
.cmdk-foot kbd {
  font-family: var(--mono);
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 4px;
  padding: 0 5px;
  margin-right: 4px;
  color: var(--fg-2);
}
@media (max-width: 560px) { .cmdk-trigger span.cmdk-trigger-label { display: none; } }

/* ============ 衬线斜体点缀 ============ */
.hero-serif {
  margin-top: 26px;
  font-family: Georgia, "Times New Roman", "Songti SC", "SimSun", serif;
  font-style: italic;
  font-size: 19px;
  color: var(--fg-2);
  letter-spacing: 0.2px;
}
.hero-serif::before { content: "— "; color: var(--c-blush); font-style: normal; }

/* ============ 磁性悬停 ============ */
.magnetic { transition: transform 0.3s cubic-bezier(0.22,1,0.36,1); will-change: transform; }

/* ============ 极光画布 + 光标柔光 ============ */
#aurora {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
.cursor-glow {
  position: fixed;
  top: 0; left: 0;
  width: 360px; height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(154, 52, 142, 0.10) 0%, rgba(218, 98, 125, 0.05) 45%, transparent 70%);
  pointer-events: none;
  z-index: 60;
  will-change: transform;
}
/* ============ prompt-bar 3D 倾斜 ============ */
.prompt-bar { transition: transform 0.18s ease-out; transform-style: preserve-3d; }
.hero { perspective: 900px; }

/* ============ 打字机活态 ============ */
.term { position: relative; overflow: hidden; }
.term.done::after {
  content: "";
  position: absolute;
  top: 0; left: -45%;
  width: 45%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(154, 52, 142, 0.07), rgba(218, 98, 125, 0.05), transparent);
  animation: termSweep 1.2s cubic-bezier(0.22,1,0.36,1) 0.15s 1;
  pointer-events: none;
}
@keyframes termSweep { to { left: 115%; } }
.term-line.out { animation: termLineIn 0.4s ease both; }
@keyframes termLineIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ============ 音乐播放器 ============ */
.music-player {
  position: fixed;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 250px;
  z-index: 900;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px 12px;
  box-shadow: 0 12px 40px rgba(154, 52, 142, 0.14);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--fg-2);
}
.mp-cmd { margin: 0 0 8px; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mp-prompt { color: var(--c-tan); margin-right: 6px; }
.mp-title { color: var(--fg); font-weight: 600; }
.mp-line { margin: 3px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mp-state { display: inline-block; min-width: 74px; font-weight: 700; }
.mp-state.s-loading { color: var(--c-blush); }
.mp-state.s-playing { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mp-state.s-paused { color: var(--c-salmon); }
.mp-state.s-ended { color: var(--c-plum); }
.mp-state.s-idle { color: var(--fg-3); }
.mp-time { color: var(--fg-3); font-size: 11px; }
.mp-ascii { color: var(--c-teal); letter-spacing: 1px; }
.mp-pct { color: var(--fg-3); font-size: 11px; }
.mp-controls { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.mp-btn {
  border: 1px solid var(--line); border-radius: 6px;
  background: var(--bg); color: var(--c-plum);
  font-family: var(--mono); font-size: 11px; cursor: pointer;
  padding: 3px 8px; transition: border-color .2s, color .2s;
}
.mp-btn:hover { border-color: var(--c-blush); color: var(--c-blush); }
.mp-vol { margin-left: auto; display: flex; align-items: center; gap: 6px; color: var(--fg-3); font-size: 11px; }
.mp-vol input[type=range] { width: 70px; accent-color: var(--c-plum); height: 14px; }
@media (max-width: 900px) { .music-player { display: none; } }
/* boot ok 标记：加粗 + 光标同款渐变 */
.boot-text .ok { font-weight: 700; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }.mp-track { color: var(--fg); font-weight: 600; }
.mp-count { margin-left: auto; color: var(--fg-3); font-size: 11px; }.mp-list { list-style: none; margin: 4px 0 6px; padding: 0; max-height: 110px; overflow-y: auto; }
.mp-list li { padding: 2px 4px; border-radius: 4px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--fg-3); font-size: 11px; }
.mp-list li:hover { background: var(--bg); color: var(--fg-2); }
.mp-list li.cur { color: var(--fg); font-weight: 600; }
.mp-list li.cur::before { content: '❯ '; color: var(--c-tan); }
.mp-list li .idx { color: var(--fg-3); margin-right: 6px; font-size: 10px; }
.mp-list li.cur .idx { color: var(--c-teal); }
/* boot 启动 logo */
.boot-logo { text-align: center; margin-bottom: 36px; animation: logoOn .7s cubic-bezier(.22,1,.36,1) both; }
.logo-text {
  font-family: var(--mono);
  font-size: 34px;
  font-weight: 800;
  letter-spacing: .32em;
  padding-left: .32em;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.logo-tld { letter-spacing: .18em; }
.logo-caret {
  display: inline-block;
  width: .55em;
  height: .95em;
  background: var(--grad);
  vertical-align: -0.08em;
  margin-left: .35em;
  animation: caretBlink 1.1s steps(1) infinite;
}
.logo-sub {
  display: block;
  margin-top: 12px;
  font-size: 11px;
  letter-spacing: .32em;
  padding-left: .32em;
  color: var(--fg-3);
  text-transform: uppercase;
  animation: bootBarIn .5s .45s cubic-bezier(.22,1,.36,1) both;
}
@keyframes logoOn {
  0% { transform: scaleY(.04); opacity: 0; }
  55% { transform: scaleY(1.08); opacity: 1; }
  100% { transform: scaleY(1); opacity: 1; }
}
/* ============ 移动端全站自适应 ============ */
@media (max-width: 900px) {
  /* 音乐播放器：右侧悬浮卡 → 底部紧凑横条，歌单默认收起、点状态行展开 */
  .music-player {
    display: block;
    left: 10px; right: 10px; top: auto;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    transform: none;
    width: auto;
    padding: 10px 12px;
    border-radius: 12px;
  }
  .mp-cmd { display: none; }
  .music-player .mp-list { display: none; }
  .mp-controls { flex-wrap: wrap; row-gap: 4px; }
  /* vol 的 margin-left:auto 在换行后会把 [stop] 挤出屏幕，取消之 */
  .mp-vol { margin-left: 0; }
  /* 状态行 = 歌单展开开关 */
  .music-player > .mp-line:first-of-type {
    cursor: pointer;
    position: relative;
    padding-right: 18px;
  }
  .music-player > .mp-line:first-of-type::after {
    content: "▸";
    position: absolute;
    right: 0;
    color: var(--c-tan);
    transition: transform 0.2s;
  }
  .music-player.expanded > .mp-line:first-of-type::after { transform: rotate(90deg); }
  .music-player.expanded .mp-list { display: block; max-height: 40vh; }
  .mp-vol input[type=range] { width: 56px; }
  body { padding-bottom: 120px; }
}
/* ≤560px：boot 画面与 prompt-bar 五段条整体缩小，保证完整放下不裁切 */
@media (max-width: 560px) {
  .boot-inner { max-width: calc(100vw - 32px); padding: 0 16px; font-size: 11.5px; }
  .boot-line, .boot-cmd { overflow-wrap: anywhere; }
  .boot-logo .logo-text { font-size: 26px; letter-spacing: 0.22em; }
  /* 五段 powerline 条：直接压缩布局尺寸（不依赖 zoom/transform，兼容所有浏览器内核） */
  .prompt-bar .seg {
    padding: 6px 10px 6px 12px;
    font-size: 11px;
    gap: 4px;
    clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 50%, calc(100% - 8px) 100%, 0 100%, 8px 50%);
  }
  .prompt-bar .seg:first-child { padding-left: 40px; }
  .prompt-bar .seg + .seg { margin-left: -8px; padding-left: 16px; }
  .prompt-bar .prompt-avatar { width: 26px; height: 26px; left: 12px; }
  .prompt-bar .seg.s5::after { width: 6px; height: 6px; margin-left: 6px; }
}
@media (max-width: 480px) {
  .prompt-bar .seg {
    padding: 5px 6px 5px 8px;
    font-size: 10px;
    letter-spacing: -0.2px;
  }
  .prompt-bar .seg:first-child { padding-left: 36px; }
  .prompt-bar .seg + .seg { margin-left: -11px; padding-left: 12px; }
  .prompt-bar .prompt-avatar { width: 20px; height: 20px; left: 10px; }
  .prompt-bar .seg.s5::after { width: 6px; height: 6px; margin-left: 4px; }
  .mp-btn { padding: 2px 3px; font-size: 9px; }
  .mp-controls { gap: 3px; }
  /* header：320px 窄屏防 INDEX 按钮溢出 */
  .header-inner { padding: 0 14px; }
  .header-right { gap: 10px; }
  .cmdk-key { display: none; }
  .cmdk-trigger { padding: 6px 9px; letter-spacing: 1px; }
  .logo .pl { font-size: 11px; padding: 4px 10px 4px 9px; }
  .logo .pl + .pl { margin-left: -6px; padding-left: 12px; }
  .logo .cursor { margin-left: 5px; }
}
@media (max-width: 720px) {
  .article-meta { flex-wrap: wrap; row-gap: 6px; }
  .cmdk-list { max-height: 46vh; }
  .article-body img { max-width: 100%; height: auto; }
  .article-body a { overflow-wrap: anywhere; }
}
@media (max-width: 480px) {
  .boot-cmd, .boot-line { font-size: 12.5px; }
  .music-player { bottom: calc(8px + env(safe-area-inset-bottom, 0px)); }
  body { padding-bottom: 110px; }
}

/* ---- 文章页 TOC 目录 ---- */
.toc-box {
  border: 1px solid rgba(154, 52, 142, .25);
  background: rgba(154, 52, 142, .04);
  padding: 14px 18px;
  margin: 0 0 28px;
  font-size: 13px;
}
.toc-title { color: var(--c-plum); letter-spacing: .08em; margin-bottom: 10px; }
.toc-box a { display: block; text-decoration: none; padding: 3px 0; color: var(--fg); opacity: .82; }
.toc-box a:hover { color: var(--c-plum); opacity: 1; }
.toc-box .toc-h3 { padding-left: 18px; font-size: 12.5px; }

/* ---- 代码块复制按钮 ---- */
.article-body pre { position: relative; }
.code-copy-btn {
  position: absolute; top: 8px; right: 8px;
  font-size: 11px; letter-spacing: .06em;
  color: var(--fg); opacity: .55;
  background: transparent;
  border: 1px solid currentColor;
  padding: 2px 9px;
  cursor: pointer;
}
.code-copy-btn:hover { opacity: 1; color: var(--c-plum); }