/* ============================================================
   云驿 Blog — Cyberpunk Tech Theme
   纯 CSS、零依赖、暗色科技感
   ============================================================ */

:root {
  /* 背景分层 */
  --bg-deep:  #050810;
  --bg-base:  #0a0f1c;
  --bg-elev:  #0f1626;
  --bg-card:  rgba(15, 22, 38, 0.5);

  /* 文字 */
  --text-main:  #e6edf3;
  --text-dim:   #8b95a8;
  --text-muted: #5d6679;

  /* 强调色 */
  --cyan:    #00d9ff;
  --purple:  #a78bfa;
  --emerald: #34d399;
  --pink:    #f472b6;
  --amber:   #fbbf24;

  /* 边框 */
  --border-soft:   rgba(255, 255, 255, 0.06);
  --border-base:   rgba(255, 255, 255, 0.1);
  --border-cyan:   rgba(0, 217, 255, 0.35);
  --border-purple: rgba(167, 139, 250, 0.35);

  /* 发光 */
  --glow-cyan:    0 0 24px rgba(0, 217, 255, 0.4);
  --glow-purple:  0 0 20px rgba(167, 139, 250, 0.35);
  --glow-emerald: 0 0 10px rgba(52, 211, 153, 0.6);

  /* 字体 */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", "Cascadia Code", "SF Mono", Consolas, "Liberation Mono", monospace;

  /* 缓动 */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

::selection {
  background: rgba(0, 217, 255, 0.3);
  color: #fff;
}

/* ---------- Body 背景层 ---------- */
body {
  font-family: var(--font-sans);
  background-color: var(--bg-deep);
  background-image:
    radial-gradient(ellipse 80% 50% at 20% 0%, rgba(0, 217, 255, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse 60% 50% at 80% 10%, rgba(167, 139, 250, 0.10) 0%, transparent 45%),
    radial-gradient(ellipse 60% 80% at 50% 100%, rgba(52, 211, 153, 0.05) 0%, transparent 60%),
    linear-gradient(180deg, var(--bg-deep) 0%, var(--bg-base) 100%);
  background-attachment: fixed;
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}

/* 网格纹理（淡淡的，覆盖整页） */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 217, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 217, 255, 0.035) 1px, transparent 1px);
  background-size: 64px 64px;
  pointer-events: none;
  z-index: 0;
  -webkit-mask-image: radial-gradient(ellipse at center, black 0%, transparent 75%);
          mask-image: radial-gradient(ellipse at center, black 0%, transparent 75%);
}

/* 顶部扫描装饰 */
body::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg,
    transparent 0%,
    var(--cyan) 30%,
    var(--purple) 50%,
    var(--cyan) 70%,
    transparent 100%);
  opacity: 0.6;
  z-index: 200;
  box-shadow: 0 0 12px rgba(0, 217, 255, 0.5);
}

code, pre, .mono {
  font-family: var(--font-mono);
}

/* ---------- 容器 ---------- */
.container {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
  position: relative;
  z-index: 1;
}

/* ---------- 顶栏 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8, 12, 22, 0.75);
  -webkit-backdrop-filter: blur(14px) saturate(180%);
          backdrop-filter: blur(14px) saturate(180%);
  border-bottom: 1px solid var(--border-soft);
}

.site-header::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan), var(--purple), transparent);
  opacity: 0.5;
}

.site-header nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.site-header .logo {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
  text-decoration: none;
  letter-spacing: 0.05em;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  transition: color 0.2s var(--ease);
}

.site-header .logo::before {
  content: "◢";
  color: var(--cyan);
  font-size: 1.05em;
  filter: drop-shadow(0 0 6px var(--cyan));
  animation: glowPulse 3s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% { filter: drop-shadow(0 0 6px var(--cyan)); }
  50%      { filter: drop-shadow(0 0 14px var(--cyan)); }
}

.site-header .logo:hover {
  color: var(--cyan);
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.nav-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 0.4rem 0.85rem;
  border-radius: 4px;
  border: 1px solid transparent;
  transition: all 0.2s var(--ease);
  position: relative;
}

.nav-links a:hover {
  color: var(--cyan);
  border-color: var(--border-cyan);
  background: rgba(0, 217, 255, 0.06);
  box-shadow: 0 0 12px rgba(0, 217, 255, 0.15) inset;
}

/* ---------- Main ---------- */
main.container {
  flex: 1;
  padding-top: 3rem;
  padding-bottom: 4rem;
  z-index: 1;
}

/* ---------- Hero ---------- */
.hero {
  padding: 2rem 0 3.5rem;
  margin-bottom: 3rem;
  position: relative;
  border-bottom: 1px solid var(--border-soft);
}

.hero::before {
  content: "> SYSTEM_INIT.exe";
  display: block;
  font-family: var(--font-mono);
  color: var(--cyan);
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  margin-bottom: 1.2rem;
  opacity: 0.75;
  text-transform: uppercase;
}

.hero h1 {
  font-family: var(--font-sans);
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin-bottom: 1.2rem;
  background: linear-gradient(135deg, #ffffff 0%, var(--cyan) 45%, var(--purple) 100%);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 60px rgba(0, 217, 255, 0.2);
}

.hero p {
  color: var(--text-dim);
  font-size: 1.05rem;
  line-height: 1.7;
  max-width: 620px;
}

.hero::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 120px;
  height: 2px;
  background: var(--cyan);
  box-shadow: 0 0 16px var(--cyan), 0 0 32px rgba(0, 217, 255, 0.4);
}

/* ---------- 文章列表 ---------- */
.posts-list {
  counter-reset: post-counter;
}

.posts-list h2 {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-dim);
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  margin-bottom: 1.75rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.posts-list h2::before {
  content: "//";
  color: var(--cyan);
  font-weight: 700;
  text-shadow: 0 0 6px var(--cyan);
}

.posts-list h2::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--border-soft) 0%, transparent 100%);
}

.post-card {
  counter-increment: post-counter;
  position: relative;
  padding: 1.5rem 1.6rem 1.5rem 4.5rem;
  margin-bottom: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border-base);
  border-radius: 8px;
  transition: all 0.3s var(--ease);
  overflow: hidden;
}

/* 编号 */
.post-card::before {
  content: counter(post-counter, decimal-leading-zero);
  position: absolute;
  left: 1.4rem;
  top: 1.55rem;
  font-family: var(--font-mono);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--purple);
  opacity: 0.7;
  letter-spacing: 0.04em;
  transition: all 0.3s var(--ease);
}

/* 左侧光带 */
.post-card::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--cyan), var(--purple));
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.3s var(--ease);
}

.post-card:hover {
  border-color: var(--border-cyan);
  transform: translateY(-2px);
  background: rgba(15, 22, 38, 0.75);
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.4),
    0 0 0 1px var(--border-cyan),
    0 0 32px rgba(0, 217, 255, 0.15);
}

.post-card:hover::before {
  color: var(--cyan);
  opacity: 1;
  text-shadow: 0 0 12px var(--cyan);
  transform: scale(1.05);
}

.post-card:hover::after {
  transform: scaleY(1);
}

.post-card h3 {
  font-size: 1.18rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
  letter-spacing: -0.005em;
}

.post-card h3 a {
  color: var(--text-main);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

.post-card:hover h3 a {
  color: var(--cyan);
}

.post-card time {
  display: inline-block;
  font-family: var(--font-mono);
  color: var(--emerald);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  margin-bottom: 0.6rem;
  padding: 0.15rem 0.5rem;
  background: rgba(52, 211, 153, 0.08);
  border: 1px solid rgba(52, 211, 153, 0.2);
  border-radius: 3px;
}

.post-card p {
  color: var(--text-dim);
  font-size: 0.95rem;
  line-height: 1.65;
}

/* ---------- 文章页 header ---------- */
.post-header {
  padding-bottom: 2rem;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--border-soft);
  position: relative;
}

.post-header::before {
  content: "// ARTICLE";
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--cyan);
  letter-spacing: 0.25em;
  margin-bottom: 1rem;
  padding: 0.25rem 0.7rem;
  border: 1px solid var(--border-cyan);
  border-radius: 3px;
  background: rgba(0, 217, 255, 0.05);
  text-shadow: 0 0 6px rgba(0, 217, 255, 0.4);
}

.post-header h1 {
  font-size: 2.1rem;
  line-height: 1.25;
  font-weight: 800;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 60%, var(--cyan) 100%);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.015em;
}

.post-header time {
  font-family: var(--font-mono);
  color: var(--emerald);
  font-size: 0.82rem;
  display: inline-block;
  letter-spacing: 0.1em;
  margin-bottom: 0.85rem;
  padding: 0.2rem 0.6rem;
  background: rgba(52, 211, 153, 0.08);
  border: 1px solid rgba(52, 211, 153, 0.2);
  border-radius: 3px;
}

.post-summary {
  color: var(--text-dim);
  font-size: 1.05rem;
  font-style: normal;
  line-height: 1.7;
  padding-left: 1rem;
  border-left: 2px solid var(--purple);
  opacity: 0.9;
}

/* ---------- 正文 ---------- */
.post-content {
  font-size: 1.02rem;
}

.post-content p {
  line-height: 1.8;
  margin-bottom: 1.3em;
  color: var(--text-main);
}

.post-content h2 {
  font-size: 1.55rem;
  margin-top: 2.5em;
  margin-bottom: 1em;
  color: var(--text-main);
  font-weight: 700;
  position: relative;
  padding-left: 1rem;
  letter-spacing: -0.005em;
}

.post-content h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.25em;
  bottom: 0.2em;
  width: 3px;
  background: linear-gradient(180deg, var(--cyan), var(--purple));
  border-radius: 2px;
  box-shadow: 0 0 8px rgba(0, 217, 255, 0.4);
}

.post-content h3 {
  font-size: 1.2rem;
  margin-top: 1.6em;
  margin-bottom: 0.7em;
  color: var(--text-main);
  font-weight: 600;
}

.post-content h3::before {
  content: "▸ ";
  color: var(--cyan);
}

.post-content a {
  color: var(--cyan);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: all 0.2s var(--ease);
}

.post-content a:hover {
  border-bottom-color: var(--cyan);
  text-shadow: 0 0 8px rgba(0, 217, 255, 0.4);
}

.post-content strong {
  color: #fff;
  font-weight: 600;
}

/* 内联代码 */
.post-content code {
  background: rgba(0, 217, 255, 0.08);
  border: 1px solid rgba(0, 217, 255, 0.18);
  padding: 0.12em 0.45em;
  border-radius: 4px;
  font-size: 0.88em;
  color: #a5f3fc;
  font-weight: 500;
}

/* 代码块 */
.post-content pre {
  position: relative;
  background:
    linear-gradient(135deg, rgba(15, 22, 38, 0.95) 0%, rgba(8, 12, 22, 0.95) 100%);
  border: 1px solid var(--border-base);
  border-radius: 8px;
  padding: 2rem 1.4rem 1.2rem;
  overflow-x: auto;
  margin: 1.75em 0;
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

/* 代码块装饰：左上三色点 + 右上文件标记 */
.post-content pre::before {
  content: "";
  position: absolute;
  top: 0.7rem;
  left: 0.9rem;
  width: 9px;
  height: 9px;
  background: #ff5f57;
  border-radius: 50%;
  box-shadow:
    14px 0 0 #febc2e,
    28px 0 0 #28c840;
}

.post-content pre::after {
  content: "SOURCE";
  position: absolute;
  top: 0.55rem;
  right: 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  letter-spacing: 0.2em;
}

.post-content pre code {
  background: transparent;
  border: none;
  padding: 0;
  font-size: 13.5px;
  line-height: 1.65;
  color: #d4d4d8;
  font-weight: 400;
}

/* 引用 */
.post-content blockquote {
  position: relative;
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.06) 0%, rgba(0, 217, 255, 0.04) 100%);
  border: 1px solid var(--border-soft);
  border-left: 3px solid var(--purple);
  padding: 1rem 1.3rem;
  margin: 1.5em 0;
  border-radius: 0 6px 6px 0;
  color: var(--text-dim);
  font-style: normal;
}

.post-content blockquote::before {
  content: "LOG";
  position: absolute;
  top: 0.5rem;
  right: 0.8rem;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--purple);
  letter-spacing: 0.2em;
  opacity: 0.7;
}

.post-content blockquote p {
  margin-bottom: 0.5em;
  line-height: 1.7;
}

.post-content blockquote p:last-child {
  margin-bottom: 0;
}

/* 表格 */
.post-content table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 1.75em 0;
  font-size: 0.93rem;
  border: 1px solid var(--border-base);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(15, 22, 38, 0.3);
}

.post-content thead {
  background: linear-gradient(180deg, rgba(0, 217, 255, 0.1) 0%, rgba(167, 139, 250, 0.06) 100%);
}

.post-content th {
  padding: 0.75rem 0.9rem;
  text-align: left;
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--cyan);
  letter-spacing: 0.04em;
  font-size: 0.78rem;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border-cyan);
}

.post-content td {
  padding: 0.7rem 0.9rem;
  color: var(--text-main);
  border-bottom: 1px solid var(--border-soft);
}

.post-content tr:last-child td {
  border-bottom: none;
}

.post-content tbody tr {
  transition: background 0.15s var(--ease);
}

.post-content tbody tr:hover {
  background: rgba(0, 217, 255, 0.04);
}

/* 列表 */
.post-content ul,
.post-content ol {
  padding-left: 1.5em;
  margin-bottom: 1.3em;
}

.post-content li {
  margin-bottom: 0.5em;
  line-height: 1.75;
  position: relative;
}

.post-content ul li::marker {
  color: var(--cyan);
}

.post-content ol li::marker {
  color: var(--purple);
  font-family: var(--font-mono);
  font-weight: 600;
}

/* ---------- 文章 footer CTA ---------- */
.post-footer {
  margin-top: 4rem;
  padding: 2rem 1.8rem;
  background:
    linear-gradient(135deg, rgba(0, 217, 255, 0.06) 0%, rgba(167, 139, 250, 0.06) 100%),
    var(--bg-card);
  border: 1px solid var(--border-cyan);
  border-radius: 10px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.post-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 70%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  box-shadow: 0 0 16px var(--cyan);
}

.post-footer::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 217, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 217, 255, 0.02) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}

.post-footer p {
  color: var(--text-dim);
  font-size: 0.97rem;
  line-height: 1.7;
  position: relative;
  z-index: 1;
}

.post-footer a {
  color: var(--cyan);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px solid var(--cyan);
  padding-bottom: 1px;
  transition: all 0.2s var(--ease);
}

.post-footer a:hover {
  color: var(--purple);
  border-bottom-color: var(--purple);
  text-shadow: 0 0 10px var(--purple);
}

/* ---------- 关于页 ---------- */
.about-page h1 {
  font-size: 2.4rem;
  margin-bottom: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #fff 0%, var(--cyan) 100%);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.about-page h2 {
  font-size: 1.3rem;
  margin-top: 2.5em;
  margin-bottom: 0.75em;
  color: var(--text-main);
  font-weight: 700;
  position: relative;
  padding-left: 1rem;
}

.about-page h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.25em;
  bottom: 0.2em;
  width: 3px;
  background: linear-gradient(180deg, var(--cyan), var(--purple));
  border-radius: 2px;
  box-shadow: 0 0 8px rgba(0, 217, 255, 0.4);
}

.about-page p {
  line-height: 1.8;
  margin-bottom: 1.1em;
  color: var(--text-main);
}

.about-page ul {
  padding-left: 1.5em;
  margin-bottom: 1.2em;
}

.about-page ul li {
  margin-bottom: 0.5em;
  line-height: 1.75;
}

.about-page ul li::marker {
  color: var(--cyan);
}

.about-page a {
  color: var(--cyan);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: all 0.2s var(--ease);
}

.about-page a:hover {
  border-bottom-color: var(--cyan);
  text-shadow: 0 0 8px rgba(0, 217, 255, 0.4);
}

.about-page code {
  background: rgba(0, 217, 255, 0.08);
  border: 1px solid rgba(0, 217, 255, 0.18);
  padding: 0.12em 0.45em;
  border-radius: 4px;
  font-size: 0.9em;
  color: #a5f3fc;
}

/* ---------- 站点页脚 ---------- */
.site-footer {
  border-top: 1px solid var(--border-soft);
  padding: 2rem 0;
  margin-top: auto;
  position: relative;
}

.site-footer::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  opacity: 0.5;
}

.site-footer p {
  color: var(--text-muted);
  font-size: 0.82rem;
  text-align: center;
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
}

/* ---------- 滚动条 ---------- */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-deep);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--cyan), var(--purple));
  border-radius: 5px;
  border: 2px solid var(--bg-deep);
}

::-webkit-scrollbar-thumb:hover {
  box-shadow: 0 0 8px var(--cyan);
}

/* ---------- 响应式 ---------- */
@media (max-width: 700px) {
  html { font-size: 15px; }

  .container { padding: 0 18px; }

  .site-header nav { height: 56px; }

  .nav-links a {
    padding: 0.35rem 0.6rem;
    font-size: 0.72rem;
  }

  .hero { padding: 1.5rem 0 2.5rem; margin-bottom: 2rem; }
  .hero h1 { font-size: 2rem; }
  .hero p { font-size: 0.97rem; }

  .post-card {
    padding: 1.25rem 1.25rem 1.25rem 3.5rem;
  }

  .post-card::before {
    font-size: 1.1rem;
    left: 1.1rem;
    top: 1.3rem;
  }

  .post-header h1 { font-size: 1.65rem; }
  .post-content { font-size: 0.97rem; }
  .post-content h2 { font-size: 1.35rem; }
  .post-content h3 { font-size: 1.1rem; }

  .post-content pre {
    padding: 1.85rem 1rem 1rem;
    font-size: 12.5px;
  }

  .post-content table { font-size: 0.85rem; }
  .post-content th,
  .post-content td { padding: 0.5rem 0.55rem; }

  .post-footer { padding: 1.6rem 1.2rem; }

  body::before { background-size: 48px 48px; }
}

/* prefers-reduced-motion: 关掉装饰动画 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
