/* ============ 变量 ============ */
:root {
  --topbar-h: 72px;
  --page-w: 1600px;
  --col-main: 55%;
  --col-side: 45%;
  --gap: 28px;

  --c-bg-1: #d8ecff;
  --c-bg-2: #eaf4ff;
  --c-card: #e5eff3fa;
  --c-text: #111;
  --c-text-6: #14213d;
  --c-text-1: #111;
  --c-text-2: #4f5d7a;
  --c-text-3: #7d8aa6;
  --c-text-4: #c5c5c5;
  --c-text-5: #333;
  --c-text-c: #cfcccc;
  --c-line: #e3ecf8;
  /*--c-brand: #1e6cf2;*/
  --c-brand: #e17938f0;
  --c-brand-weak: #e6f0ff;
  --c-mint: #e8f4ee;
  --c-mint-text: #2a7d5b;

  --radius: 14px;
  --radius-lg: 18px;
  --shadow: 0 4px 14px rgba(20, 56, 120, .08), 0 1px 2px rgba(20, 56, 120, .05);
  --shadow-hover: 0 14px 32px rgba(20, 56, 120, .12), 0 2px 6px rgba(20, 56, 120, .06);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
/*  background:
    radial-gradient(120% 80% at 100% 0%, #c4e2ff 0%, transparent 55%),
    radial-gradient(110% 70% at 0% 100%, #d8ecff 0%, transparent 55%),
    linear-gradient(180deg, #e9f3ff 0%, #f3f8ff 60%, #eaf3ff 100%);*/

  /*background: radial-gradient(120% 80% at 100% 0%, #f6f7fb 0%, transparent 55%),
  radial-gradient(110% 70% at 0% 100%, #abb8c3 0%, transparent 55%),
  linear-gradient(180deg, #e9f3ff 0%, #c0cee1 60%, #638fb2 100%);
*/
/*  background: radial-gradient(120% 80% at 100% 0%, #dddee1  0%, transparent 55%),
  radial-gradient(110% 70% at 0% 100%, #abb8c3 0%, transparent 55%),
  linear-gradient(180deg, #e8eaeb 10%, #c0cee1 40%, #185383 100%);*/

  /* 渐变与双层网格已移到 html::before / body::before / body::after（见下方背景分层） */
  color: var(--c-text);
  font: 15px/1.65 "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* ============ 背景分层：渐变(html::before,-3)最底 → 上半深蓝网格(body::before,-2) → 下半白色网格(body::after,-1) ============ */
html::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
/*  background: radial-gradient(120% 80% at 100% 0%, #dddee1  0%, transparent 55%),
    radial-gradient(110% 70% at 0% 100%, #0a3257 0%, transparent 55%),
    linear-gradient(180deg, #e8eaeb 20%, #c0d1e1 40%, #0a3257 100%);
}*/

background: radial-gradient(120% 80% at 100% 0%, #dddee1  0%, transparent 55%),
radial-gradient(110% 70% at 0% 100%, #0a3257 0%, transparent 55%),
linear-gradient(180deg, #e8eaeb 16%, #7598b7 40%, #0a3257 100%);
}

/* 上半部：深蓝网格（浅色背景可见，越往下越淡，约 62% 处消失） */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-image:
    linear-gradient(rgb(33 114 187 / 0.11) 1px, transparent 1px),
    linear-gradient(90deg, rgb(29 108 178 / 0.11) 1px, transparent 1px);
  background-size: 40px 40px;
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, .85), rgba(0, 0, 0, .6) 28%, rgba(0, 0, 0, .45) 46%, transparent 62%);
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, .85), rgba(0, 0, 0, .6) 28%, rgba(0, 0, 0, .45) 46%, transparent 62%);
}

/* 下半部：白色网格（深色背景可见；与上半网格同原点同间距，提前至约 26% 渐入、与上半网格大范围交叉重叠） */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, .15) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .15) 1px, transparent 1px);
  background-size: 40px 40px;
  -webkit-mask-image: linear-gradient(180deg, transparent 26%, rgba(0, 0, 0, .48) 46%, rgba(0, 0, 0, .64) 68%, rgba(0, 0, 0, .8) 100%);
  mask-image: linear-gradient(180deg, transparent 26%, rgba(0, 0, 0, .48) 46%, rgba(0, 0, 0, .64) 68%, rgba(0, 0, 0, .8) 100%);
}

a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ul { margin: 0; padding: 0; }
ul { list-style: none; }

.container {
  width: 100%;
  max-width: var(--page-w);
  margin: 0 auto;
  padding: 0 32px;
}

/* ============ 顶部导航 ============ */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--topbar-h);
  background: transparent;
  border-bottom: 1px solid rgba(255, 255, 255, .4);
  backdrop-filter: saturate(180%) blur(14px);
}
.nav-inner {
  width: 100%;
  max-width: var(--page-w);
  height: var(--topbar-h);
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  gap: 24px;
}

/* 左：Logo */
.logo {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: baseline;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--c-text);
}
.logo-i { color: var(--c-brand); }
.logo-r { color: var(--c-brand); }
.logo-dot { color: var(--c-brand); font-size: 34px; line-height: 1; margin-left: -2px; }

/* 中：导航（绝对居中） */
.nav {
  position: absolute;
  left: 40%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 36px;
}
.nav-item {
  position: relative;
  padding: 24px 4px;
  font-size: 17px;
  color: var(--c-text-2);
  font-weight: 500;
  transition: color .18s;
}
.nav-item:hover { color: var(--c-text); }
.nav-item.is-active { color: var(--c-text); font-weight: 600; }
.nav-item.is-active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  width: 22px;
  height: 3px;
  border-radius: 2px;
  background: var(--c-brand);
}

/* 右：搜索图标 + 圆形头像 */
.nav-actions {
  flex: 0 0 auto;
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 14px;
}
.icon-btn {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--c-text-2);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background .18s, color .18s;
}
.icon-btn:hover { background: rgba(255, 255, 255, .5); color: var(--c-text); }
.icon-btn svg { width: 20px; height: 20px; fill: currentColor; }

/* 搜索框：白底胶囊 = 输入框 + 放大镜提交钮 */
.search-form {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 6px 0 16px;
  height: 40px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .66);
  border: 1px solid rgba(20, 56, 120, .14);
  box-shadow: 0 2px 8px rgba(20, 56, 120, .05);
  transition: border-color .18s, box-shadow .18s, background .18s;
}
.search-form:focus-within {
  background: #fff;
  border-color: rgba(30, 108, 242, .42);
  box-shadow: 0 0 0 3px rgba(30, 108, 242, .12);
}
.search-input {
  width: 150px;
  height: 100%;
  border: 0;
  outline: none;
  background: transparent;
  font: inherit;
  font-size: 14px;
  color: var(--c-text);
}
.search-input::placeholder { color: var(--c-text-3); }
.search-input::-webkit-search-cancel-button { display: none; }
.search-form .icon-btn { border-radius: 50%; }
.search-form .icon-btn:hover { background: var(--c-brand-weak); color: var(--c-brand); }
.circle-avatar {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: var(--c-brand);
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 14px rgba(30, 108, 242, .35);
}

/* ============ 主体布局 ============ */
.layout {
  padding-top: calc(var(--topbar-h) + 32px);
  padding-bottom: 10px;
  display: grid;
  grid-template-columns:
    minmax(0, calc(var(--col-main) - var(--gap) / 2))
    minmax(0, calc(var(--col-side) - var(--gap) / 2));
  gap: var(--gap);
  align-items: start;
}

/* 左列：最新博文 */
.col-main {
  position: relative;        /* 让中部 hi-callout 绝对定位 */
  min-width: 0;
  padding-top: 8px;
}

/* 右列 */
.col-side {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* ---- 区块标题 ---- */
.kicker {
  font-size: 17px;
  color: var(--c-text);
  margin-bottom: 12px;
  font-weight: 600;
}
.block-title {
  position: relative;
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 18px;
  padding-left: 0;
}
/* 标题行右侧"更多"链接（与标题同一行） */
.block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.block-head .block-title {
  margin-bottom: 0;
}
.block-more {
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  text-decoration: none;
  transition: text-decoration-color .18s;
  color: var(--c-text-6);
  text-shadow: 1px 1px 0 #ddd, 4px 4px 6px rgba(0, 0, 0, 0.2);
}

.block-more2 {
  flex: 0 0 auto;
  font-size: 12px;
  flex: 0 0 auto;
  letter-spacing: 2px;
   text-decoration: none;
   transition: text-decoration-color .18s;
   color: var(--c-text-6);
   font-weight: 600;
  text-shadow: 0 0 0px #e3e5e7, 0 0 9px rgba(227, 229, 231, .8), 0 0 18px rgba(227, 229, 231, .5);
}
.block-more:hover,.block-more2:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* 开发小故事标题：叠在页面底部深蓝渐变背景上时，用浅色发光描边勾勒字形（浅色背景下几乎不可见） */
.story-title {
  text-shadow:
    0 0 0px  #e3e5e7,
    0 0 9px  rgba(227, 229, 231, .8),
    0 0 18px rgba(227, 229, 231, .5);
}

/* ---- Hero 标题 ---- */
.hero-title {
  position: relative;
  display: inline-block;
  font-size: 44px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: .5px;
  margin-bottom: 14px;
}
.hero-title em {
  font-style: normal;
  color: var(--c-text);
}
.hero-title .title-svg {
  position: absolute;
  right: -10px;
  top: 38px;
  width: 200px;
  height: 50px;
  pointer-events: none;
}
.hero-desc {
  font-size: 17px;
  color: var(--c-text);
  margin-bottom: 32px;
}

/* ---- 文章时间线 ---- */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-left: 4px;
  margin-top: 30px;
}
.post {
  position: relative;
  display: flex;
  gap: 16px;
  padding: 18px 20px;
  background: var(--c-card);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s;
}
.post:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

/* 蓝色圆形序号图标 */
.post-no {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--c-brand);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  display: grid;
  place-items: center;
  margin-top: 2px;
  box-shadow: 0 4px 10px rgba(30, 108, 242, .25);
}
.post-body { flex: 1; min-width: 0; }
.post-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}
.post-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--c-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.post-date {
  font-size: 12.5px;
  color: var(--c-text-3);
  flex: 0 0 auto;
}
.post-excerpt {
  font-size: 13px;
  color: var(--c-text-2);
  line-height: 1.65;
}
.post-tag {
  display: inline-block;
  margin-top: 8px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--c-mint);
  color: var(--c-mint-text);
  font-size: 12px;
  font-weight: 500;
}
.post-sublist {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.post-sublist li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--c-text-2);
}
.sub-dot {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #eef3fa;
  color: var(--c-text-3);
  font-size: 11px;
  font-style: normal;
  display: grid;
  place-items: center;
}
.sub-title { flex: 1; min-width: 0; }
.sub-tag {
  font-size: 12px;
  color: var(--c-mint-text);
  background: var(--c-mint);
  padding: 2px 8px;
  border-radius: 999px;
}

/* ---- 分页 ---- */
.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
  padding-left: 4px;
}
.pg-btn, .pg-num {
  display: grid;
  place-items: center;
  min-width: 36px;
  height: 28px;
  padding: 0 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .62);
  border: 1px solid var(--c-text-2);
  color: var(--c-text-2);
  font-size: 14px !important;
  line-height: 1;
  transition: background .18s, color .18s, border-color .18s, box-shadow .18s;
}
.pg-btn { font-size: 19px; }
.pg-btn:hover, .pg-num:hover {
  background: #fff;
  color: var(--c-brand);
  border-color: color-mix(in srgb, var(--c-brand) 45%, transparent);
}
.pg-num.is-active {
  background: var(--c-brand);
  border-color: var(--c-brand);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 4px 10px color-mix(in srgb, var(--c-brand) 35%, transparent);
  cursor: default;
}
.pg-ellipsis {
  padding: 0 2px;
  color: var(--c-text-c);
  font-size: 18px;
}
.pg-total {
  margin-left: 6px;
  font-size: 13px;
  color: var(--c-text-c);
  white-space: nowrap;
}

/* ---- 中部浮动高亮框（绝对定位叠在内容流上） ---- */
.hi-callout {
  position: absolute;
  right: -24px;        /* 向右溢出左列边界 */
  top: 115px;          /* 大致压在大标题与第一条文章之间 */
  z-index: 5;
  display: flex;
  gap: 12px;
  width: min(620px, 92%);
  padding: 16px 18px;
  /*background: rgba(255, 255, 255, .92);*/
  background: var(--c-card);

  border: 1px solid #cfe1f8;
  border-radius: 14px;
  box-shadow:
    0 18px 36px rgba(30, 108, 242, .15),
    0 4px 10px rgba(30, 108, 242, .08);
  backdrop-filter: blur(8px);
}
.hi-arrow {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--c-brand);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
  margin-top: 2px;
}
.hi-body { min-width: 0; }
.hi-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--c-text);
  line-height: 1.6;
  margin-bottom: 6px;
}
.hi-meta {
  font-size: 12.5px;
  color: var(--c-text-3);
}

/* ============ 作品 Demo 卡片 2×2 ============ */
.demo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.demo-card {
  display: flex;
  flex-direction: column;
  padding: 0px;
  background: linear-gradient(160deg, #cfe5ff 0%, #e3eefb 60%, #f3f7ff 100%);
  border: 1px solid #d6e6f9;
  border-radius: 16px;
  box-shadow: var(--shadow);
  transition: transform .25s, box-shadow .25s;
  border-radius: 8px;
  overflow: hidden;
}
.demo-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}
.demo-card-top {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
  margin-left: 10px;
  margin-right: 10px;
  margin-top: 10px;
  height: 115px;
}
.demo-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.demo-name {
  font-size: 17px;
  font-weight: 700;
  color: var(--c-text);
  line-height: 1.35;
}
.demo-name em {
  font-style: normal;
  color: var(--c-text);
}
.demo-sub {
  font-size: 11.5px;
  color: var(--c-text-3);
  letter-spacing: .4px;
}
.demo-pill {
  align-self: flex-start;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .7);
  color: var(--c-text-2);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .5px;
}
.demo-shot-wrap {
  flex: 0 0 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.demo-shot-img {
  width: 130%;
  max-width: 130px;
  height: auto;
  filter: drop-shadow(0 8px 16px rgba(16, 24, 40, .18));
  transform: rotate(-4deg);
}
.demo-card-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 8px;
  padding-bottom: 8px;
  padding-right: 8px;
  padding-left: 8px;
  border-top: 1px solid rgba(255, 255, 255, .7);
  font-size: 12px;
  color: var(--c-text-2);
  background-color: rgb(255 255 255 / 0.84);
}
.demo-foot-name { font-weight: 600; color: var(--c-text); }
.demo-foot-meta {
  margin-left: auto;
  color: var(--c-text-3);
  font-size: 11px;
}
.demo-foot-tag {
  padding: 1px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .75);
  color: var(--c-brand);
  font-weight: 600;
  font-size: 11px;
}

/* ============ 开发小故事：横排 4 个浅蓝小卡片 ============ */
.story-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.story-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px;
  background: var(--c-card);;
  border: 1px solid #d8e6f8;
  border-radius: 12px;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.story-card:hover {
  transform: translateY(-2px);
  border-color: #b8d0ee;
  box-shadow: var(--shadow-hover);
}
.story-head {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.story-no {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border-radius: 50%;
  background: var(--c-brand);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: grid;
  place-items: center;
  font-style: normal;
}
.story-name {
  min-width: 0;
  flex: 1;
  font-size: 14px;
  font-weight: 700;
  color: var(--c-text);
  line-height: 1.8;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;

}
.story-desc {
  font-size: 13px;
  color: var(--c-text-3);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.story-link {
  align-self: flex-end;
  font-size: 16px;
  color: var(--c-text-3);
  line-height: 1;
}

/* ============ 页脚 ============ */
.footer {
  /*border-top: 1px solid rgba(255, 255, 255, .5);*/
}
.footer-inner {
  padding: 15px 32px;
  color: var(--c-text-4);
  font-size: 13px;
  text-align: center;
}

/* ============ 响应式 ============ */
@media (max-width: 1280px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .col-side { gap: 24px; }
  .hi-callout { position: static; right: auto; top: auto; width: 100%; margin-bottom: 16px; }
}
@media (max-width: 1080px) {
  .nav { display: none; }
}
@media (max-width: 820px) {
  .demo-grid { grid-template-columns: minmax(0, 1fr); }
  .story-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-title { font-size: 32px; }
  .hero-title .title-svg { display: none; }
}
@media (max-width: 560px) {
  .story-row { grid-template-columns: minmax(0, 1fr); }
  .search-form { padding-left: 12px; }
  .search-input { width: 84px; }
  .container { padding: 0 18px; }
  .nav-inner { padding: 0 18px; }
  .post { padding: 13px; }
}

/* ============ 博文列表页（blog-list.html） ============ */
.blog-wrap {
  max-width: 1500px;
  margin: 0 auto;
  padding-top: calc(var(--topbar-h) + 36px);
  padding-bottom: 20px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 36px;
  align-items: start;
  min-height: calc(100vh - var(--topbar-h));
}
.blog-main { min-width: 0; }
.blog-head { padding-top: 6px; margin-bottom: 26px; }
.blog-title {
  position: relative;
  display: inline-block;
  font-size: 40px;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: .5px;
  margin-bottom: 10px;
}
.blog-title em { font-style: normal; color: var(--c-brand); }
.blog-sub { font-size: 16px; color: var(--c-text-6); }

/* 筛选栏：分类 chips + 统计 */
.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 16px;
  margin-bottom: 30px;
}
.cat-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  padding: 3px 10px;
  border-radius: 15px;
  border: 1px solid var(--c-line);
  background: rgba(255, 255, 255, .62);
  color: var(--c-text-2);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: background .18s, color .18s, border-color .18s, box-shadow .18s;
}
.chip:hover { color: var(--c-brand); border-color: color-mix(in srgb, var(--c-brand) 45%, transparent); background: #fff; }
.chip.is-on {
  background: var(--c-brand);
  border-color: var(--c-brand);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 4px 10px color-mix(in srgb, var(--c-brand) 35%, transparent);
}
.filter-note {
  font-size: 13px; color: var(--c-text-5); white-space: nowrap;
  text-shadow: 0 0 0px #e3e5e7, 0 0 9px rgba(227, 229, 231, .8), 0 0 18px rgba(227, 229, 231, .5);
}

/* ============ 搜索页：搜索区（filter-bar.search-page-form） ============ */
/* 整块：白色渐变卡片，与侧栏卡片同一套圆角/阴影 */
.search-page-form {
  display: block;
  margin: 0 0 18px;
  padding: 20px 20px 16px;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, .94), rgba(255, 255, 255, .72));
  border: 1px solid rgba(20, 56, 120, .10);
  box-shadow: var(--shadow);
}

/* 输入行：胶囊 = 放大镜 + 输入框 + 搜索按钮 */
.search-page-form .sp-box {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 54px;
  padding: 0 6px 0 18px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(20, 56, 120, .16);
  transition: border-color .18s, box-shadow .18s;
}
.search-page-form .sp-box:focus-within {
  border-color: color-mix(in srgb, var(--c-brand) 52%, transparent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--c-brand) 14%, transparent);
}
.sp-icon {
  flex: none;
  width: 22px;
  height: 22px;
  fill: var(--c-text-3);
  transition: fill .18s;
}
.search-page-form .sp-box:focus-within .sp-icon { fill: var(--c-brand); }

.search-input-lg {
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: none;
  background: transparent;
  font: inherit;
  font-size: 16px;
  color: var(--c-text);
}
.search-input-lg::placeholder { color: var(--c-text-3); }
.search-input-lg::-webkit-search-cancel-button { display: none; }

.search-page-form .sp-submit {
  flex: none;
  height: 42px;
  padding: 0 28px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--c-brand), #f0995f);
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .5px;
  cursor: pointer;
  box-shadow: 0 6px 16px color-mix(in srgb, var(--c-brand) 32%, transparent);
  transition: transform .16s, box-shadow .18s, filter .18s;
}
.search-page-form .sp-submit:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
  box-shadow: 0 10px 22px color-mix(in srgb, var(--c-brand) 38%, transparent);
}
.search-page-form .sp-submit:active { transform: translateY(0); filter: brightness(.97); }

/* 结果提示：独占一行，不再和输入框挤在一起 */
.search-page-form .filter-note {
  display: block;
  margin: 12px 0 0;
  padding-left: 6px;
  white-space: normal;
  line-height: 1.6;
}

/* 搜索范围：胶囊分段控件（复用 .chip，仅改外观） */
.search-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 22px;
  padding: 6px;
  max-width: 100%;
  border-radius: 999px;
  background: rgba(255, 255, 255, .58);
  border: 1px solid var(--c-line);
}
.search-tabs .chip {
  padding: 6px 18px;
  border-radius: 999px;
  border-color: transparent;
  background: transparent;
  font-size: 14px;
}
.search-tabs .chip:hover { background: #fff; }
.search-tabs .chip.is-on {
  background: #fff;
  color: var(--c-brand);
  border-color: color-mix(in srgb, var(--c-brand) 40%, transparent);
  box-shadow: 0 4px 12px color-mix(in srgb, var(--c-brand) 18%, transparent);
}

@media (max-width: 560px) {
  .search-page-form { padding: 14px 14px 12px; }
  .search-page-form .sp-box { height: 48px; padding-left: 14px; }
  .search-page-form .sp-submit { padding: 0 18px; }
  .search-tabs .chip { padding: 6px 13px; }
}

/* 文章列表条目 */
.list-art {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-left: 4px;
  margin: 0;
  margin-top: 20px;
}
.art {
  display: flex;
  gap: 18px;
  padding: 18px 22px;
  background: var(--c-card);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.art:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); border-color: #c3d9f2; }
.art[hidden] { display: none; }

/* 序号圆标 */
.art-no {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  margin-top: 2px;
  border-radius: 50%;
  background: var(--c-brand);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 10px rgba(30, 108, 242, .22);
}
.art-main { flex: 1; min-width: 0; }
.art-title {
  font-size: 19px;
  font-weight: 700;
  color: var(--c-text);
  line-height: 1.5;
  margin-bottom: 7px;
}
.art-title a { transition: text-decoration-color .18s; }
.art-title a:hover { text-decoration: underline; text-underline-offset: 3px; }
.art-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 16px;
  font-size: 12.5px;
  color: var(--c-text-3);
  margin-bottom: 8px;
}
.art-meta .sep { color: #c9d4e4; }
.art-cat { color: var(--c-brand); font-weight: 600; }
.art-excerpt {
  font-size: 13.5px;
  color: var(--c-text-5);
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.art-foot {
  margin-top: 10px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.art-go {
  margin-left: auto;
  color: var(--c-brand);
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  transition: margin-left .18s;
}
.art:hover .art-go { margin-left: 6px; }

/* 空状态 */
.list-empty {
  padding: 70px 20px;
  text-align: center;
  color: var(--c-text-3);
  font-size: 15px;
  background: rgba(255, 255, 255, .4);
  border: 1px dashed var(--c-line);
  border-radius: var(--radius);
}
.list-empty[hidden] { display: none; }

@media (max-width: 640px) {
  .art { padding: 14px; gap: 12px; }
  .art-no { display: none; }
  .art-title { font-size: 17px; }
  .blog-title { font-size: 30px; }
}

/* ============ 博客列表右侧栏 ============ */
.blog-side {
  min-width: 0;
  position: sticky;
  top: calc(var(--topbar-h) + 28px);
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.side-card {
  background: var(--c-card);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
}
.side-card .side-title {
  position: relative;
  font-size: 18px;
  font-weight: 700;
  color: var(--c-text);
  line-height: 1.4;
  padding-bottom: 12px;
}
.side-card .side-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 34px;
  height: 3px;
  border-radius: 2px;
  background: var(--c-brand);
}

/* 热点文章 */
.hot-list {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
}
.hot-item {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px dashed #dbe4f0;
}
.hot-item:last-child { border-bottom: 0; }
.hot-rank {
  flex: 0 0 auto;
  min-width: 20px;
  font-size: 13px;
  font-weight: 700;
  color: var(--c-text-3);
}
.hot-item:nth-child(-n+3) .hot-rank { color: var(--c-brand); }
.hot-name {
  flex: 1;
  font-size: 13.5px;
  color: var(--c-text);
  line-height: 1.6;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color .18s;
}
.hot-name:hover { color: var(--c-brand); }
.hot-num {
  flex: 0 0 auto;
  font-size: 12px;
  color: var(--c-text-3);
  white-space: nowrap;
}

/* 分类 */
.side-cats { margin: 14px 0 0; padding: 0; }
.side-cats a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 2px;
  border-bottom: 1px dashed #e6edf6;
  font-size: 13.5px;
  color: var(--c-text-2);
  transition: color .18s, transform .18s;
}
.side-cats a:last-child { border-bottom: 0; }
.side-cats a:hover { color: var(--c-brand); transform: translateX(3px); }
.side-cats em {
  font-style: normal;
  font-size: 12px;
  color: var(--c-text-3);
  background: #f0f4fa;
  border-radius: 999px;
  padding: 1px 9px;
}

/* 标签云 */
.side-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 14px 0 0;
}
.side-tags a {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 550;
  letter-spacing: .3px;
  color: var(--c-text-2);
  background: linear-gradient(180deg, #fff 0%, #f4f8fd 100%);
  border: 1px solid #dfe9f6;
  border-radius: 999px;
  padding: 4px 12px;
  box-shadow: 0 1px 2px rgba(20, 56, 120, .05);
  transition: transform .18s, box-shadow .18s, background .18s, color .18s, border-color .18s;
}
.side-tags a:hover {
  background: var(--c-brand);
  border-color: var(--c-brand);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(225, 121, 56, .26);
}
/* 标签云分档：lv-1 最低 ~ lv-5 最高（按「标签下条目热度分之和」排名分位分档）。
   仅作用于带 lv-N 的侧栏热门标签，不影响详情页文末 .post-tags-row 的标签 */
.side-tags a.lv-1 {
  font-size: 11.5px;
  font-weight: 500;
  color: #7d8aa6;
  background: #fff;
  border-color: #e4ebf5;
  padding: 4px 12px;
}
.side-tags a.lv-2 {
  font-size: 12.5px;
  font-weight: 550;
  color: #7d8aa6;
  background: #fbfcfe;
  border-color: #dfe9f6;
  padding: 5px 13px;
}
.side-tags a.lv-3 {
  font-size: 13.5px;
  font-weight: 600;
  color: #4f5d7a;
  background: #f6f9fd;
  border-color: #d8e4f4;
  padding: 5px 14px;
}
.side-tags a.lv-4 {
  font-size: 14.5px;
  font-weight: 650;
  color: #14213d;
  background: #f1f6fc;
  border-color: #cbddee;
  padding: 6px 15px;
}
.side-tags a.lv-5 {
  font-size: 15.5px;
  font-weight: 700;
  color: #e17938;
  background: #fff6f0;
  border-color: #f6d5bc;
  padding: 6px 15px;
}
/* hover 统一为品牌橙实心（写在分档之后，否则同特异性会被上面覆盖） */
.side-tags a.lv-1:hover,
.side-tags a.lv-2:hover,
.side-tags a.lv-3:hover,
.side-tags a.lv-4:hover,
.side-tags a.lv-5:hover {
  color: #fff;
  background: var(--c-brand);
  border-color: var(--c-brand);
}
/* 窄屏：各档整体缩小 1px，防止换行过多 */
@media (max-width: 640px) {
  .side-tags a.lv-1 { font-size: 11px; }
  .side-tags a.lv-2 { font-size: 11.5px; }
  .side-tags a.lv-3 { font-size: 12.5px; }
  .side-tags a.lv-4 { font-size: 13.5px; }
  .side-tags a.lv-5 { font-size: 14.5px; }
}

/* 侧栏空态与「查看更多」 */
.side-empty {
  margin: 12px 0 0;
  font-size: 12.5px;
  color: var(--c-text-3);
}
.side-more {
  display: inline-block;
  margin-top: 12px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--c-brand);
  transition: opacity .18s;
}
.side-more:hover { opacity: .78; }

/* 作品 Demo 展示 */
.side-demos {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}
.side-demo {
  display: block;
  padding: 12px 14px;
  border-radius: 10px;
  /*background: linear-gradient(160deg, #d6e8ff 0%, #eaf3fd 65%, #f5f9ff 100%);
  border: 1px solid #d5e6fa;*/
  background: linear-gradient(160deg, #73a8eced 0%, #eaf3fd 65% 65%, #75b7ff 100%);
  border: 1px solid #b6d7ff;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.side-demo:hover {
  transform: translateY(-2px);
  border-color: #aecbf0;
  box-shadow: var(--shadow-hover);
}
.side-demo-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 3px;
}
.side-demo-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--c-text);
  line-height: 1.5;
  min-width: 0;
}
.side-demo-name em {
  font-style: normal;
  font-size: 12px;
  color: var(--c-brand);
  font-weight: 700;
}
.side-demo-pill {
  flex: 0 0 auto;
  padding: 1px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .85);
  border: 1px solid #cfe0f5;
  color: var(--c-brand);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
}
.side-demo-desc {
  margin: 0;
  font-size: 12px;
  color: var(--c-text-5);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 窄屏：右侧栏下移单列 */
@media (max-width: 1060px) {
  .blog-wrap { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .blog-side { position: static; }
}

/* ============ 文章详情页（blog-post.html） ============ */
.post-main { min-width: 0; }
.post-col {
  max-width: 1160px;
  padding: 50px;
  /*background: #efeaea6b;*/
  background: rgba(234, 244, 255, .6);
  background: color-mix(in srgb, var(--c-bg-2) 60%, transparent);
  border-radius: 10px;
}

/* 面包屑 / 返回 */
.post-crumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 0 14px;
  font-size: 13px;
  color: var(--c-text-3);
}
.post-crumb a { color: var(--c-text-2); transition: color .18s; }
.post-crumb a:hover { color: var(--c-brand); }
.crumb-sep { color: #c3cfe2; }
.crumb-cur { color: var(--c-text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 320px; }

/* 文章头部 */
.post-heading { padding: 16px 0 8px; }
.post-cat-line { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.cat-pill {
  display: inline-block;
  padding: 4px 13px;
  border-radius: 999px;
  background: var(--c-brand);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .5px;
}
.cat-pill.is-soft {
  background: rgba(255, 255, 255, .72);
  border: 1px solid var(--c-line);
  color: var(--c-text-2);
  font-weight: 500;
}
.post-ttl {
  margin: 0 0 16px;
  font-size: 38px;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: .5px;
  color: var(--c-text);
}
.post-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 12px;
  font-size: 13px;
  color: var(--c-text-3);
}
.post-author {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--c-text-2);
  font-weight: 500;
}
.post-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--c-brand);
  color: #fff;
  font-style: normal;
  font-weight: 700;
  font-size: 13px;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 10px rgba(30, 108, 242, .22);
}
.meta-dot { color: #c9d4e4; }

/* 元信息与字号调节同行：左 meta、右 type-ctl */
.post-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px 20px;
  flex-wrap: wrap;
}

/* 导读 */
.post-lead {
  margin: 22px 0 0;
  padding: 15px 18px;
  border-left: 3px solid var(--c-brand);
  /*background: linear-gradient(90deg, rgba(225, 121, 56, .09), rgba(255, 255, 255, 0) 72%);*/
  background: linear-gradient(90deg, rgba(225, 121, 56, .19), rgb(204 163 163 / 39%) 72%);
  border-radius: 0 5px 5px 0;
  color: var(--c-text);
  font-size: 15px;
  line-height: 1.9;
}

/* 正文字号调节（下拉） */
.type-ctl {
  display: flex;
  align-items: center;
  gap: 8px;
}
.type-lbl {
  font-size: 12.5px;
  color: var(--c-text-3);
  user-select: none;
}
.type-select {
  height: 30px;
  padding: 0 26px 0 10px;
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: 8px;
  font-family: inherit;
  font-size: 13px;
  color: var(--c-text-2);
  cursor: pointer;
  outline: none;
  transition: border-color .18s, color .18s;
}
.type-select:hover { border-color: var(--c-brand); }
.type-select:focus-visible {
  border-color: var(--c-brand);
  box-shadow: 0 0 0 2px rgba(225, 121, 56, .22);
}

/* 正文排版 */
.post-article {
  padding-top: 22px;
  /*color: #33405f;*/
  color: var(--c-text-1);
  font-size: 15.5px;
  line-height: 1.95;
}
.post-article h2[id], .post-article h3[id] { scroll-margin-top: calc(var(--topbar-h) + 26px); }
.post-article h2 {
  margin: 38px 0 16px;
  padding-left: 14px;
  border-left: 4px solid var(--c-brand);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--c-text);
}
.post-article h2:first-child { margin-top: 6px; }
.post-article h3 {
  margin: 28px 0 12px;
  font-size: 18px;
  font-weight: 700;
  color: var(--c-text);
}
.post-article p { margin: 0 0 16px; }
.post-article strong { font-weight: 600; color: var(--c-text); }
.post-article a { color: var(--c-brand); text-decoration: underline; text-underline-offset: 3px; }
.post-article ul, .post-article ol { margin: 0 0 18px; padding-left: 1.5em; }
.post-article ul { list-style: disc; }
.post-article ol { list-style: decimal; }
.post-article li { margin: 7px 0; padding-left: 3px; }
.post-article li::marker { color: var(--c-brand); }

/* 行内代码 */
.post-article :not(pre) > code {
  font-family: "SFMono-Regular", Consolas, Menlo, "Courier New", monospace;
  font-size: .85em;
  background: rgba(225, 121, 56, .1);
  color: #a0480b;
  border: 1px solid rgba(225, 121, 56, .2);
  border-radius: 6px;
  padding: 2px 6px;
  word-break: break-word;
}

/* 代码块：正文里绝大多数 <pre> 不带 class（历史数据还有 codehilite / language-xxx / hljs 等写法），
   故选择器必须直接用 pre，不能用 pre.code，否则代码块拿不到深色底。 */
.post-article pre {
  margin: 0 0 20px;
  padding: 16px 18px;
  border-radius: 5px;
  /* 纯色而非渐变：渐变会随代码块高度被拉伸，长代码块颜色过渡很难看 */
  background: #0e1729;
  border: 1px solid rgba(255, 255, 255, .09);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 10px 22px rgba(6, 12, 26, .35);
  overflow-x: auto;
  line-height: 1.75;
  /* 兜底字色只写在 pre 上：写在 pre code 上特异性(0,1,2)会压过 .hljs-string 等(0,1,0)，导致高亮全失效 */
  color: #d9e5ff;
}
.post-article pre code {
  font-family: "SFMono-Regular", Consolas, Menlo, "Courier New", monospace;
  font-size: 0.9em;
  background: transparent;
  border: 0;
  padding: 0;
}
/* 老编辑器残留的行内样式（如 color:#000000）在深底上不可见，强制重置；
   只作用于 code 自身，不影响其内部带 .hljs-* 的 span */
.post-article pre code[style] {
  color: #d9e5ff !important;
  background: transparent !important;
  border: 0 !important;
}

/* 警示小条 */
.bd-note {
  margin: 0 0 20px;
  padding: 12px 16px;
  border-radius: 5px;
  background: #fff6e5;
  border: 1px solid #f2ddb4;
  color: #7d5a1d;
  font-size: 0.9em;
  line-height: 1.8;
}
.bd-note::before {
  content: "!";
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  margin-right: 8px;
  border-radius: 50%;
  background: #e8a33d;
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  vertical-align: middle;
}

/* 引用 */
.post-article blockquote {
  margin: 24px 0;
  padding: 14px 20px;
  border-left: 3px solid var(--c-brand);
  /*background: linear-gradient(90deg, rgba(225, 121, 56, .08), transparent 72%);*/
  background: linear-gradient(90deg, rgba(225, 121, 56, .18), #c4a1a15c 72%);
  border-radius: 0 5px 5px 0;
  color: var(--c-text);
  font-size: 0.9em;
  line-height: 1.9;
}
.post-article blockquote p { margin: 0; }

/* 表格（中蓝主题：中蓝表头 + 浅蓝表体） */
.post-article table {
  width: 100%;
  margin: 0 0 24px;
  font-size: 0.9em;
  /*color: #2c4768;*/
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid #9cbadf;
  border-radius: 5px;
  overflow: hidden;
  background: #e7f0fb;
  box-shadow: 0 8px 20px rgba(63, 116, 176, .16);
}
.post-article th, .post-article td {
  padding: 12px 16px;
  text-align: left;
  vertical-align: top;
  line-height: 1.7;
  border-bottom: 1px solid rgba(74, 117, 168, .16);
}
.post-article thead th {
  background: linear-gradient(180deg, #7dabdd, #5185c4);
  color: #fff;
  font-weight: 700;
  font-size: 0.95em;
  letter-spacing: .3px;
  border-bottom: 1px solid #4a7db9;
  white-space: nowrap;
}
.post-article tbody tr:last-child td { border-bottom: 0; }
.post-article tbody tr:nth-child(even) { background: rgba(80, 130, 190, .10); }
.post-article tbody tr {
  transition: background .18s;
}
.post-article tbody tr:hover { background: rgba(80, 130, 190, .20); }
.post-article td:first-child { font-weight: 600;
  /*color: #28518f;*/
}
/*
.post-article td code {
  font-family: "SFMono-Regular", Consolas, Menlo, "Courier New", monospace;
  font-size: 0.85em;
  background: rgba(56, 118, 196, .12);
  color: #1b56a6;
  border: 1px solid rgba(56, 118, 196, .28);
  border-radius: 5px;
  padding: 1px 5px;
  white-space: nowrap;
}
*/

/* 文末标签 */
.post-tags-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px dashed var(--c-text-6);
}
.tags-lbl {
  flex: 0 0 auto;
  padding: 5px 11px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .6px;
  color: var(--c-text-2);
  background: rgba(255, 255, 255, .72);
  border: 1px dashed #d3e0f1;
  border-radius: 10px;
}
.post-tags-row .side-tags { margin: 0; gap: 10px; }

/* 文末标签：药丸徽标（文章/作品详情页，元素为 span，兼容 a） */
.post-tags-row .side-tags > span,
.post-tags-row .side-tags > a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px 6px 11px;
  font-size: 12.5px;
  line-height: 1.4;
  font-weight: 600;
  letter-spacing: .3px;
  color: var(--c-text-2);
  background: linear-gradient(180deg, #fff 0%, #f4f8fd 100%);
  border: 1px solid #dfe9f6;
  border-radius: 999px;
  box-shadow: 0 1px 2px rgba(20, 56, 120, .06);
  cursor: default;
  transition: transform .18s, box-shadow .18s, background .18s, color .18s, border-color .18s;
}
.post-tags-row .side-tags > a { cursor: pointer; }
.post-tags-row .side-tags > span::before,
.post-tags-row .side-tags > a::before {
  content: "#";
  font-size: 12px;
  font-weight: 700;
  color: var(--c-brand);
  opacity: .9;
}
.post-tags-row .side-tags > span:hover,
.post-tags-row .side-tags > a:hover {
  transform: translateY(-2px);
  color: #fff;
  background: linear-gradient(180deg, #eb9055 0%, var(--c-brand) 100%);
  border-color: var(--c-brand);
  box-shadow: 0 8px 18px rgba(225, 121, 56, .28);
}
.post-tags-row .side-tags > span:hover::before,
.post-tags-row .side-tags > a:hover::before { color: #fff; }

/* 多色轮换：每 4 个标签换一种强调色（hover 时整枚药丸同色） */
.post-tags-row .side-tags > *:nth-child(4n+2)::before { color: #2f6fd0; }
.post-tags-row .side-tags > *:nth-child(4n+2):hover {
  background: linear-gradient(180deg, #4a86e0 0%, #2f6fd0 100%);
  border-color: #2f6fd0;
  box-shadow: 0 8px 18px rgba(47, 111, 208, .26);
}
.post-tags-row .side-tags > *:nth-child(4n+3)::before { color: #2a7d5b; }
.post-tags-row .side-tags > *:nth-child(4n+3):hover {
  background: linear-gradient(180deg, #3fa47b 0%, #2a7d5b 100%);
  border-color: #2a7d5b;
  box-shadow: 0 8px 18px rgba(42, 125, 91, .26);
}
.post-tags-row .side-tags > *:nth-child(4n+4)::before { color: #7a5cd6; }
.post-tags-row .side-tags > *:nth-child(4n+4):hover {
  background: linear-gradient(180deg, #9274e6 0%, #7a5cd6 100%);
  border-color: #7a5cd6;
  box-shadow: 0 8px 18px rgba(122, 92, 214, .26);
}

@media (max-width: 640px) {
  .post-tags-row { flex-direction: column; gap: 10px; }
  .post-tags-row .side-tags { gap: 8px; }
}

/* 上一篇 / 下一篇 */
.post-pager {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  margin-top: 26px;
}
.pp-card {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 16px 18px;
  background: var(--c-card);
  border: 1px solid var(--c-line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
a.pp-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  border-color: color-mix(in srgb, var(--c-brand) 45%, transparent);
}
.pp-card.is-next { text-align: right; }
/* 返回列表：独占一行的整宽卡片 */
.pp-card.is-back {
  grid-column: 1 / -1;
  align-items: center;
  text-align: center;
  padding: 12px 18px;
}
.pp-dir { font-size: 12px; color: var(--c-text-3); }
.pp-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--c-text);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pp-card.is-disabled {
  opacity: .55;
  cursor: default;
  box-shadow: none;
}
.pp-card.is-disabled:hover { transform: none; box-shadow: none; }

/* 右侧栏：目录 */
.toc-card .side-title { margin: 0; }
.toc-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.toc-list a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 9px;
  font-size: 13.5px;
  color: var(--c-text-2);
  line-height: 1.5;
  transition: background .18s, color .18s;
}
.toc-list a:hover { background: rgba(255, 255, 255, .75); color: var(--c-brand); }
.toc-list a.is-on {
  background: rgba(255, 255, 255, .8);
  color: var(--c-brand);
  font-weight: 600;
}
.toc-no {
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .5px;
  color: var(--c-text-3);
}
.toc-list a.is-on .toc-no { color: var(--c-brand); }

@media (max-width: 640px) {
  .post-ttl { font-size: 28px; }
  .post-crumb { padding-top: 8px; }
  .post-pager { grid-template-columns: minmax(0, 1fr); }
  .post-article { font-size: 15px; }
  .post-col { max-width: 100%; }
}

/* ============ 作品 Demo 展示列表页（works-list.html） ============ */
.works-note {
  margin: -12px 0 22px;
  font-size: 13px;
  color: var(--c-text-3);
  line-height: 1.7;
}
.works-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 34px;
}
.works-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: linear-gradient(160deg, #cfe5ff 0%, #e3eefb 60%, #f3f7ff 100%);
  border: 1px solid #d6e6f9;
  border-radius: 14px;
  box-shadow: var(--shadow);
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
.works-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: #a8c6ea;
}
.works-card[hidden] { display: none; }
.works-card-media {
  position: relative;
  display: flex;
  align-items: stretch;
  justify-content: center;
  height: 210px;
  padding: 12px 14px 0;
  overflow: hidden;
}
.works-card-media::before {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -14px;
  height: 22px;
  border-radius: 50%;
  background: rgba(20, 56, 120, .10);
  filter: blur(8px);
  pointer-events: none;
}
.works-card-media img {
  width: calc(100% + 18px);
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transform: rotate(-3deg) translateX(-6px) scale(1.06);
  filter: drop-shadow(0 10px 16px rgba(16, 24, 40, .2));
}
.works-card-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 0;
  padding: 2px 16px 10px;
}
.works-card-head {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.works-card-title {
  flex: 1;
  min-width: 0;
  font-size: 17px;
  font-weight: 700;
  color: var(--c-text);
  line-height: 1.4;
  transition: color .18s;
}
.works-card:hover .works-card-title { color: var(--c-text); }
.works-card-title em { font-style: normal; color: var(--c-brand); }
.works-pill {
  flex: 0 0 auto;
  margin-top: 2px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .75);
  border: 1px solid #cfe0f5;
  color: var(--c-brand);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
}
.works-card-sub {
  font-size: 11.5px;
  color: var(--c-text-3);
  letter-spacing: .4px;
}
.works-card-desc {
  font-size: 13px;
  color: var(--c-text-5);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.works-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  padding-top: 4px;
}
.works-card-tag {
  font-size: 11px;
  color: var(--c-mint-text);
  background: var(--c-mint);
  padding: 2px 8px;
  border-radius: 999px;
}
.works-card-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px;
  font-weight: 600;
  border-top: 1px solid rgba(255, 255, 255, .7);
  background: rgba(255, 255, 255, .85);
  font-size: 14px;
  color: var(--c-text-6);
}
.works-card-foot-meta { color: var(--c-text-3); font-size: 11px; }
.works-foot-more {
  margin-left: auto;
  color: var(--c-brand);
  font-weight: 600;
  white-space: nowrap;
  transition: margin-left .18s;
}
.works-card:hover .works-foot-more { margin-left: 6px; }

/* 分类计数小字 */
.cat-chips .chip b {
  font-weight: 600;
  font-size: 11px;
  opacity: .85;
  margin-left: 3px;
}

@media (max-width: 640px) {
  .works-grid { grid-template-columns: minmax(0, 1fr); }
  .works-card-media img { width: calc(100% + 8px); transform: rotate(-2deg) translateX(-4px); }
}

/* ============ 作品 Demo 详情页（works-detail.html） ============ */
.wdet-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 20px;
  margin-bottom: 22px;
}
.wdet-media {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  overflow: hidden;
  background: linear-gradient(150deg, #bcd9fb 0%, #ddeafc 55%, #f2f7ff 100%);
  border: 1px solid #d0e2f7;
  border-radius: 16px;
  box-shadow: var(--shadow);
}
.wdet-media::before {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -22px;
  height: 34px;
  border-radius: 50%;
  background: rgba(16, 40, 90, .14);
  filter: blur(14px);
  pointer-events: none;
}
.wdet-media img {
  width: calc(100% + 60px);
  height: auto;
  max-height: 460px;
  transform: rotate(-1.5deg);
  filter: drop-shadow(0 18px 28px rgba(12, 28, 60, .28));
}
.wdet-hero-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 4px 2px;
}
.wdet-catline { display: flex; flex-wrap: wrap; gap: 6px; }
.wdet-hero h1 {
  margin: 0;
  font-size: 25px;
  line-height: 1.3;
  color: var(--c-text);
}
.wdet-hero h1 em { font-style: normal; color: var(--c-brand); }
.wdet-lead {
  margin: 0;
  font-size: 13px;
  line-height: 1.8;
  color: var(--c-text-6);
}
.wdet-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--c-line);
  font-size: 12px;
  color: var(--c-text-3);
}
.wdet-meta .tag { color: var(--c-brand); }
.wdet-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
  padding-top: 12px;
}
.btn-demo, .btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  transition: transform .18s, box-shadow .18s, background .18s;
}
.btn-demo {
  color: #fff;
  background: var(--c-brand);
  box-shadow: 0 6px 14px rgba(30, 90, 200, .28);
}
.btn-demo:hover { transform: translateY(-1px); box-shadow: 0 9px 18px rgba(30, 90, 200, .34); }
.btn-ghost {
  color: var(--c-brand);
  background: #fff;
  border: 1px solid #c6d9f2;
}
.btn-ghost:hover { border-color: var(--c-brand); }
.wdet-stat {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .8);
  border: 1px solid #d8e6f7;
  font-size: 11px;
  color: var(--c-text-3);
}
.wdet-stat b { color: var(--c-text); font-size: 13px; }

/* 正文中的全宽截图 */
.wdet-shot {
  margin: 20px 0;
  border: 1px solid var(--c-line);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.wdet-shot img { display: block; width: 100%; height: auto; }
.wdet-shot figcaption {
  padding: 8px 14px;
  font-size: 12px;
  color: var(--c-text-3);
  background: #fff;
  border-top: 1px solid var(--c-line);
}

/* 功能特性 / 技术栈清单 */
.wdet-feat {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 8px;
  padding: 0;
  list-style: none;
}
.wdet-feat li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--c-line);
  border-radius: 10px;
  background: #fff;
  font-size: 13px;
  color: var(--c-text-5);
  line-height: 1.6;
}
.wdet-feat li::before {
  content: "";
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  margin-top: 7px;
  border-radius: 50%;
  background: var(--c-brand);
  box-shadow: 0 0 0 3px rgba(48, 100, 220, .14);
}
.wdet-stack { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.wdet-stack span {
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  color: var(--c-mint-text);
  background: var(--c-mint);
}
.wdet-stack .lbl {
  color: var(--c-text-3);
  background: #f0f3f8;
}

@media (max-width: 1280px) {
  .wdet-hero { grid-template-columns: minmax(0, 1fr) 280px; }
}
@media (max-width: 1060px) {
  .wdet-hero { grid-template-columns: minmax(0, 1fr); }
  .wdet-actions { margin-top: 0; }
  .wdet-feat { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .wdet-media { min-height: 200px; }
  .wdet-hero h1 { font-size: 21px; }
}