/* 基于 Start Bootstrap Clean Blog (MIT) 二次改造的深色炫酷静态主题 */
:root {
  --bg: #070b16;
  --bg-soft: #0d1424;
  --panel: rgba(18, 27, 46, 0.72);
  --panel-strong: rgba(22, 34, 58, 0.92);
  --line: rgba(148, 178, 255, 0.16);
  --text: #e8eef8;
  --muted: #98a7bd;
  --primary: #7c8cff;
  --cyan: #38d6c8;
  --violet: #a78bfa;
  --amber: #f5b861;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
  --radius: 22px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(1100px 520px at 12% -10%, rgba(124, 140, 255, 0.22), transparent 58%),
    radial-gradient(900px 480px at 92% 8%, rgba(56, 214, 200, 0.16), transparent 55%),
    radial-gradient(800px 600px at 50% 110%, rgba(167, 139, 250, 0.14), transparent 55%),
    var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.75;
}

a { color: inherit; text-decoration: none; }

.container { max-width: 1120px; }

/* 导航 */
#mainNav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1030;
  background: rgba(7, 11, 22, 0.35);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid transparent;
  transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

#mainNav.is-fixed,
#mainNav.scrolled {
  background: rgba(7, 11, 22, 0.78);
  border-bottom-color: var(--line);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
}

.navbar-brand {
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #fff !important;
}

.navbar-brand span {
  background: linear-gradient(90deg, var(--primary), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

#mainNav .nav-link {
  color: #c9d5e8 !important;
  font-weight: 500;
  border-radius: 12px;
}

#mainNav .nav-link:hover,
#mainNav .nav-link.active {
  color: #fff !important;
  background: rgba(124, 140, 255, 0.14);
}

.navbar-toggler {
  border: 1px solid var(--line);
  color: #fff;
}

/* Hero */
.hero {
  position: relative;
  min-height: 72vh;
  display: flex;
  align-items: center;
  padding: 150px 0 80px;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(circle at 50% 30%, #000 0%, transparent 72%);
  pointer-events: none;
}

.blob {
  position: absolute;
  border-radius: 999px;
  filter: blur(54px);
  opacity: 0.5;
  animation: drift 12s ease-in-out infinite alternate;
}

.blob-1 { width: 320px; height: 320px; left: -80px; top: 12%; background: #5b6cff; }
.blob-2 { width: 280px; height: 280px; right: -60px; top: 22%; background: #22c7bb; animation-delay: -4s; }
.blob-3 { width: 240px; height: 240px; left: 38%; bottom: -120px; background: #8b5cf6; animation-delay: -8s; }

@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(36px, -28px, 0) scale(1.12); }
}

.hero-inner { position: relative; z-index: 1; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #cfe7ff;
  font-size: 14px;
}

.hero-badge::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 16px var(--cyan);
}

.hero h1 {
  margin: 26px 0 18px;
  font-size: clamp(38px, 6vw, 64px);
  line-height: 1.12;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.gradient-text {
  background: linear-gradient(92deg, #fff 0%, #b9c6ff 38%, #63e6d8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-subtitle {
  max-width: 720px;
  color: var(--muted);
  font-size: clamp(16px, 2vw, 19px);
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.stat {
  min-width: 132px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
}

.stat strong { display: block; font-size: 24px; color: #fff; }
.stat span { color: var(--muted); font-size: 13px; }

/* 工具栏 */
.blog-toolbar {
  margin: 10px 0 30px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  backdrop-filter: blur(16px);
}

.search-box {
  width: 100%;
  padding: 13px 16px 13px 46px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  outline: none;
}

.search-box::placeholder { color: #7f8da3; }
.search-box:focus { border-color: rgba(124, 140, 255, 0.55); box-shadow: 0 0 0 4px rgba(124, 140, 255, 0.14); }

.search-wrap { position: relative; }
.search-wrap::before {
  content: "⌕";
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 18px;
}

.tag-list { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }

.tag-chip {
  padding: 7px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #c7d3e6;
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s ease;
}

.tag-chip:hover,
.tag-chip.active {
  color: #fff;
  border-color: rgba(124, 140, 255, 0.55);
  background: linear-gradient(90deg, rgba(124, 140, 255, 0.28), rgba(56, 214, 200, 0.18));
}

/* 文章卡片 */
.post-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  padding-bottom: 70px;
}

.post-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 260px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  backdrop-filter: blur(16px);
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.post-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--cyan), var(--violet));
  opacity: 0.85;
}

.post-card:hover {
  transform: translateY(-7px);
  border-color: rgba(124, 140, 255, 0.38);
  box-shadow: var(--shadow);
}

.post-card .post-meta-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.post-card h2 {
  margin: 18px 0 12px;
  font-size: 23px;
  line-height: 1.35;
  font-weight: 800;
}

.post-card h2 a { color: #fff; }
.post-card h2 a:hover { color: #b9c6ff; }

.post-card .excerpt {
  color: var(--muted);
  margin: 0 0 22px;
}

.card-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }

.card-tags span {
  padding: 5px 10px;
  border-radius: 10px;
  background: rgba(124, 140, 255, 0.12);
  color: #b9c6ff;
  font-size: 12px;
}

.read-more {
  margin-top: 18px;
  color: var(--cyan);
  font-weight: 600;
}

.empty-state {
  padding: 60px 20px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

/* 文章详情 */
.article-page { padding: 140px 0 80px; }

.article-card,
.panel-card {
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--panel-strong);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
  padding: clamp(26px, 5vw, 48px);
}

.article-card h1 {
  margin: 18px 0 16px;
  font-size: clamp(30px, 4vw, 42px);
  line-height: 1.2;
  font-weight: 900;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--muted);
  font-size: 14px;
}

.article-content { margin-top: 30px; color: #d7e1ef; }
.article-content h3 { margin: 30px 0 14px; color: #fff; }
.article-content p { margin: 16px 0; }
.article-content ul, .article-content ol { padding-left: 22px; }
.article-content li { margin: 8px 0; }

.article-content code {
  padding: 2px 7px;
  border-radius: 8px;
  background: rgba(124, 140, 255, 0.14);
  color: #b9c6ff;
}

.article-content pre {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #080d18;
  overflow-x: auto;
}

.article-content pre code { background: transparent; color: #9be7df; }

.article-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

.btn-glow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  transition: all 0.2s ease;
}

.btn-glow.primary {
  background: linear-gradient(92deg, var(--primary), var(--cyan));
  border: none;
  color: #07111f;
  font-weight: 700;
}

.btn-glow:hover { transform: translateY(-2px); border-color: rgba(124, 140, 255, 0.5); }

.related-list { display: grid; gap: 16px; margin-top: 28px; }
.related-item {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
}

/* 关于 / 联系 */
.simple-page { padding: 140px 0 80px; }

.profile-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 22px;
}

.skill-list { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.skill-list span {
  padding: 9px 13px;
  border-radius: 12px;
  background: rgba(56, 214, 200, 0.1);
  color: #8fe6dd;
  border: 1px solid rgba(56, 214, 200, 0.2);
}

.contact-line {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.contact-line:last-child { border-bottom: none; }
.contact-line span { color: var(--muted); }

/* 页脚 */
footer {
  padding: 44px 0 34px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: rgba(7, 11, 22, 0.5);
}

.footer-links { display: flex; flex-wrap: wrap; gap: 18px; justify-content: center; margin-bottom: 16px; }
.footer-links a:hover { color: #fff; }
.footer-icp { margin-top: 10px; }
.footer-icp a { color: var(--muted); }
.footer-icp a:hover { color: #fff; }

@media (max-width: 900px) {
  .post-grid,
  .profile-grid { grid-template-columns: 1fr; }
}

@media (max-width: 576px) {
  .hero { min-height: 62vh; padding-top: 120px; }
  .post-card { padding: 22px; }
  .stat { min-width: calc(50% - 8px); }
}
