/* ╔══════════════════════════════════════════════════════════════════════════════╗
   ║                                                                              ║
   ║   ★ style.css · 视觉样式表 ★                                                 ║
   ║                                                                              ║
   ║   改「颜色 / 字体 / 圆角 / 阴影」只改下面的 :root 变量，全站自动生效。         ║
   ║   改「某块具体样式」（比如把卡片改方角、改 Hero 高度）搜索对应的 class 名。    ║
   ║                                                                              ║
   ║   ░░░░░░░░░░░░░░░░░░░░░░ 视觉定制区（最常改的地方）░░░░░░░░░░░░░░░░░░░░░░            ║
   ║     --bg         全站背景色（改这里变成浅色主题）                           ║
   ║     --violet     主题紫（主色）                                             ║
   ║     --cyan       主题青（辅色 / 渐变终点）                                  ║
   ║     --grad       主渐变（logo、按钮、标题用）                               ║
   ║     --text       正文文字色                                                 ║
   ║     --font       正文字体                                                   ║
   ║     --radius     卡片圆角（改小=更硬朗，改大=更圆润）                        ║
   ║                                                                              ║
   ╚══════════════════════════════════════════════════════════════════════════════╝ */

/* ══════════════════════════════════════════════════════════════════════════════
   一、:root 变量区 —— 改这里 = 改全站
   所有以 -- 开头的变量统称为「CSS Custom Properties」，在一个地方定义后
   整张样式表里引用它，全站生效，改一处等于改全部。
   ══════════════════════════════════════════════════════════════════════════════ */
:root {
  /* ── 背景色系 ──
     --bg         ：全站最底层背景，任何元素没有单独背景时都会透到这里
     --bg-soft    ：次级背景，用于页脚、页面头（page-head），和 --bg 形成轻微层次
     --surface    ：卡片、弹窗的默认背景，比 --bg 亮一点，但不刺眼
     --surface-2  ：技术标签（tech-tag）用，比 surface 再亮一层，用来承载文字 */
  --bg: #0a0c12;            /* 全站最底层背景（深空黑） */
  --bg-soft: #0e1119;      /* 次级背景（页脚、页面头用） */
  --surface: #121622;      /* 卡片 / 弹窗背景 */
  --surface-2: #171c2b;    /* 更亮的卡片背景（技术标签用） */

  /* ── 边框 / 分隔线 ──
     rgba(255,255,255,.08) = 白色 8% 透明度，叠加在任何背景上都好看，
     因为它不依赖具体颜色，深色浅色主题都能通用。 */
  --border: rgba(255, 255, 255, .08);        /* 普通边框（浅） */
  --border-strong: rgba(255, 255, 255, .16); /* 强调边框（hover 时用） */

  /* ── 文字色系 ──
     三级文字色：主 > 次 > 最弱。合理拉开对比度差，视觉层次自然出来。
     不要直接混用 --text 和 --text-faint，那样最弱的文字会看不清楚。 */
  --text: #e8eaf2;         /* 主文字 */
  --text-dim: #9aa3b8;     /* 次要文字（副标题、摘要） */
  --text-faint: #68718a;   /* 最弱文字（日期、脚注） */

  /* ── 主题色 ──
     --violet + --cyan 组成渐变两端，通过改变这两个值可以快速换品牌色。
     --grad 是它们组合后的渐变写法，背景剪裁（background-clip:text）实现文字渐变。
     --grad-soft 是低浓度版本，用于引用块、hover 背景等强调场景。 */
  --violet: #8b5cf6;       /* 主色（紫）——想换品牌色改这两个 */
  --cyan: #22d3ee;         /* 辅色（青）——主渐变的终点 */
  --grad: linear-gradient(135deg, #8b5cf6 0%, #22d3ee 100%);  /* 主渐变（logo/按钮/标题） */
  --grad-soft: linear-gradient(135deg, rgba(139, 92, 246, .16), rgba(34, 211, 238, .16)); /* 浅渐变（引用块等） */

  /* ── 形状 / 阴影 ──
     --radius   ：大圆角，卡片、弹窗用。改成 8px 更硬朗，20px 更圆润。
     --radius-sm：小圆角，标签、引用块用，不能太大否则失去"小"的语义。
     --shadow   ：卡片 hover 时的投影，视觉上表示"这张卡片被抬起来了"。 */
  --radius: 16px;          /* 卡片大圆角 */
  --radius-sm: 10px;       /* 小圆角（标签、引用块） */
  --shadow: 0 12px 32px rgba(0, 0, 0, .4);  /* 卡片 hover 阴影 */

  /* ── 字体 ──
     --font：正文优先苹方黑体（Mac），其次微软雅黑（Win），最后兜底无衬线族。
     --mono ：等宽字体，代码块专用。不要把它用在正文上，数字对不齐。 */
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;  /* 正文字体（优先中文黑体，可改英文衬线字体） */
  --mono: ui-monospace, "Cascadia Code", Consolas, "JetBrains Mono", monospace;  /* 等宽字体（代码块用） */
}

/* ══════════════════════════════════════════════════════════════════════════════
   二、重置与全局基础
   ══════════════════════════════════════════════════════════════════════════════ */

/* 通配符 * 选中所有元素，强制统一 margin/padding 为 0，
   然后 box-sizing:border-box 让 padding 和 border 算在 width/height 里面，
   这样写 padding: 20px 不会把盒子撑大，是现代 CSS 的标准起步写法。 */
* { margin: 0; padding: 0; box-sizing: border-box; }

/* 让锚点跳转（<a href="#xxx">）有平滑滚动，而不是"啪"地跳过去。 */
html { scroll-behavior: smooth; }

/* body 三件事：
   1. font-family        继承全局字体变量
   2. background          全站最深背景色
   3. min-height:100vh    让内容撑不满一屏时页面也不会塌到底
   4. display:flex + flex-direction:column 让 footer 自动贴底
      （因为 main 设置了 flex:1） */
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;  /* Mac 上文字亚像素抗锯齿，更清晰 */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* main 占据 Header 和 Footer 之间的所有剩余空间（flex:1），
   这样 Footer 被推到页面底部，不会被内容撑到中间去。 */
main { flex: 1; }

/* 全站链接默认去掉下划线，颜色继承父元素（不变成蓝色链接）。
   图片最大宽度 100%，防止图片撑破容器。 */
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }  /* 按钮用系统默认字体 */
input { font-family: inherit; }                     /* 输入框同理 */

/* ::selection 选中文字时的背景色，紫半透明，和品牌色呼应 */
::selection { background: rgba(139, 92, 246, .4); }

/* ══════════════════════════════════════════════════════════════════════════════
   三、通用布局与组件
   ══════════════════════════════════════════════════════════════════════════════ */

/* .container：所有内容区域的最大宽度容器
   max-width: 1120px   最大宽度 1120px
   margin: 0 auto      水平居中（auto 左右等宽）
   padding: 0 24px    左右留 24px，防止贴着浏览器边缘（移动端更重要） */
.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* .grad-text：渐变色文字，用于标题、数字等需要视觉强调的地方
   原理：背景渐变 + background-clip:text 把渐变"剪"到文字上，
   再 -webkit-text-fill-color:transparent 隐藏原始文字颜色，只露出渐变。
   这是在不依赖特殊字体的情况下实现渐变文字的标准方法。 */
.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* .section：标准段落间距，用于内容区块（精选文章、精选作品等）
   padding: 84px 0 上下留 84px 空白，内容不会挤在一起 */
.section { padding: 84px 0; }

/* .section-alt：交替背景色的区块，头尾用深色和浅色形成视觉节奏 */
.section-alt { background: var(--bg-soft); border-block: 1px solid var(--border); }

/* .section-head：区块标题行（h2 + 描述 + 右对齐的「查看全部」链接）
   display:flex + justify-content:space-between 让标题在左、「更多」链接在右 */
.section-head {
  display: flex;
  align-items: flex-end;       /* 让多行文字底部对齐（h2+副标题） */
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 36px;
}
.section-head h2 { font-size: 30px; letter-spacing: .5px; }
.section-head p { color: var(--text-dim); margin-top: 6px; }

/* .link-more：「查看全部 →」文字链接，青色，右下角有一道细线
   border-bottom:1px solid transparent 是一道"占位线"，hover 时改成青线，
   视觉上像下划线从透明变可见，比直接加下划线更细腻。 */
.link-more {
  color: var(--cyan);
  font-size: 15px;
  white-space: nowrap;    /* 不换行，即使标题很长也保持在一行 */
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: border-color .25s;
}
.link-more:hover { border-color: var(--cyan); }

/* ══════════════════════════════════════════════════════════════════════════════
   四、按钮
   ══════════════════════════════════════════════════════════════════════════════ */

/* 按钮通用样式：圆角胶囊形，内边距 12px 26px，flex 弹性布局。
   .btn 是基类，.btn-primary / .btn-ghost 是变体，继承基类全部样式再叠加。 */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 26px;
  border-radius: 999px;       /* 999px 是胶囊按钮的经典写法，等价于 50% */
  font-size: 15.5px;
  font-weight: 600;
  transition: transform .2s, box-shadow .2s, background .2s, border-color .2s;
}
.btn:active { transform: scale(.97); }  /* 点击时轻微缩小，有按压感 */

/* .btn-primary：渐变背景 + 阴影，主色调，用于主要操作（如「浏览文章」） */
.btn-primary {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 6px 20px rgba(139, 92, 246, .35);
}
.btn-primary:hover {
  transform: translateY(-2px);                          /* 上浮 2px */
  box-shadow: 0 10px 28px rgba(139, 92, 246, .45);     /* 阴影加深 */
}

/* .btn-ghost：透明底 + 边框，次要操作（如「查看作品」）
   hover 时边框变青色，有"亮起来"的效果，比直接加背景色更克制。 */
.btn-ghost { border: 1px solid var(--border-strong); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--cyan); color: var(--cyan); transform: translateY(-2px); }

/* ══════════════════════════════════════════════════════════════════════════════
   五、Header 顶栏
   ══════════════════════════════════════════════════════════════════════════════ */

/* 顶栏固定在顶部，z-index:100 保证它在所有内容之上。
   backdrop-filter:blur 毛玻璃效果，透过顶栏能隐约看到下面的内容，
   这是目前流行的毛玻璃导航栏实现方式。 */
.site-header {
  position: sticky;      /* sticky=滚动时固定，不滚时正常文档流 */
  top: 0;
  z-index: 100;
  background: rgba(10, 12, 18, .78);  /* 半透明深色背景 */
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

/* .header-inner：Logo + 导航菜单 + 汉堡按钮的水平 Flex 布局 */
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;    /* 固定高度，Logo 和链接都垂直居中 */
}

/* .logo：站点 Logo 文字
   display:flex + gap 让「✦」和站点名之间有间距 */
.logo {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: .3px;
}
.logo .logo-mark {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: 22px;
}
.logo:hover .logo-mark { transform: rotate(90deg); transition: transform .5s; }  /* hover 时 Logo 旋转 90° */

/* 导航菜单：水平排列，30px 间距 */
.nav { display: flex; align-items: center; gap: 30px; }

/* 导航链接：
   1. 定位伪元素 ::after 做底部渐变下划线
   2. transform:scaleX(0) 默认隐藏，hover/active 时 scaleX(1) 滑入
   3. transform-origin:left 保证动画从左往右展开 */
.nav a {
  position: relative;
  color: var(--text-dim);
  font-size: 15.5px;
  padding: 6px 2px;
  transition: color .2s;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--grad);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .28s ease;
}
.nav a:hover, .nav a.active { color: var(--text); }
.nav a:hover::after, .nav a.active::after { transform: scaleX(1); }

/* 搜索图标按钮：圆形边框，水平垂直居中的 SVG */
.nav-search {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  color: var(--text-dim);
  transition: all .2s;
}
.nav-search:hover { color: var(--cyan); border-color: var(--cyan); transform: translateY(-1px); }

/* 汉堡按钮（三条横线）：默认隐藏，屏幕宽度 ≤820px 时显示 */
.hamburger {
  display: none;       /* 下面 @media (max-width: 820px) 里改成 flex */
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 8px;
}
.hamburger span {
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .3s, opacity .3s;
}
/* 汉堡打开时：三条线变成 ×
   第一条：顺时针旋转 45° 并下移
   第二条：消失
   第三条：逆时针旋转 45° 并上移 */
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ══════════════════════════════════════════════════════════════════════════════
   六、Hero 首页大区
   ══════════════════════════════════════════════════════════════════════════════ */

/* Hero 容器：
   position:relative 让内部 absolute 定位的背景元素（光球/网格）相对于它定位
   min-height:76vh 至少占屏幕高度的 76%，内容少时也会撑满一屏 */
.hero {
  position: relative;
  min-height: 76vh;
  display: flex;
  align-items: center;
  overflow: hidden;    /* 隐藏超出容器边界的 orb（光球有 blur，会漏出来） */
  border-bottom: 1px solid var(--border);
}

/* .hero-bg：Hero 的装饰性背景层，position:absolute 浮在内容层下面
   pointer-events:none 让鼠标点击穿透它，不影响下面的按钮交互 */
.hero-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }

/* 两层渐变叠加：
   1. 顶部中央 60%×50% 的紫色椭圆光晕
   2. 右下角 40%×40% 的青色椭圆光晕
   两个 radial-gradient 叠加制造"舞台灯光"效果，中心亮、边缘暗。 */
.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 50% 0%, rgba(139, 92, 246, .14), transparent 70%),
    radial-gradient(ellipse 40% 40% at 85% 85%, rgba(34, 211, 238, .08), transparent 70%);
}

/* .grid-lines：CSS 画出来的透视网格
   用 linear-gradient 画横线和竖线（1px 白线 + 透明交替），
   -webkit-mask-image/radial-gradient 把边缘用渐变"擦"掉，
   形成中间清晰、四周渐隐的透视效果。 */
.grid-lines {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 40%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 70% at 50% 40%, #000 30%, transparent 75%);
}

/* .orb（光球）：
   1. border-radius:50% + filter:blur(70px) = 模糊圆形色块
   2. animation:float 缓动上下漂浮，增加"活的感觉"
   3. opacity:.5 半透明，和背景叠加产生色彩深度 */
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: .5;
  animation: float 9s ease-in-out infinite;  /* 9 秒一个周期，无限循环 */
}
.orb-1 { width: 340px; height: 340px; background: rgba(139, 92, 246, .28); top: -80px; right: 8%; }
.orb-2 { width: 240px; height: 240px; background: rgba(34, 211, 238, .2); bottom: -60px; left: 6%; animation-delay: -4.5s; }  /* animation-delay:-4.5s 和 orb-1 错开半个周期，两个球不会同步起伏 */

/* float 动画：translateY 在 0 和 -26px 之间来回，等价于上下漂浮 */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-26px); }
}

/* .hero-inner：Hero 内容层（标题/副标题/按钮），position:relative 浮在背景上面 */
.hero-inner { position: relative; z-index: 1; padding: 90px 24px; text-align: center; }

/* .hero-kicker：Hero 顶部的「✦ starark 游戏工作室」小标签
   inline-flex + 边框 + 背景 = 胶囊标签形状
   letter-spacing:2px + text-transform:uppercase 把英文字母间距拉大、全大写，有设计感 */
.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--cyan);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 22px;
  border: 1px solid rgba(34, 211, 238, .3);
  background: rgba(34, 211, 238, .06);
  padding: 7px 16px;
  border-radius: 999px;
}

/* Hero 主标题：
   clamp(38px, 6.4vw, 64px) = 最小 38px，最大 64px，区间内随视口宽度等比缩放。
   clamp 是 CSS 提供的响应式字号写法，比 media query 更流畅，不需要断点。 */
.hero h1 {
  font-size: clamp(38px, 6.4vw, 64px);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: .5px;
  margin-bottom: 22px;
}

.hero-sub {
  max-width: 620px;
  margin: 0 auto 38px;
  color: var(--text-dim);
  font-size: clamp(16px, 2vw, 18.5px);
}

.hero-cta { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* 数字统计区：三列横排，青色大数字 + 灰色小标签 */
.hero-stats {
  margin-top: 52px;
  display: flex;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
}
.hero-stats .stat b {
  font-size: 26px;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: block;    /* 块级才能正确控制宽高 */
}
.hero-stats .stat span { color: var(--text-faint); font-size: 13.5px; letter-spacing: 1px; }

/* ══════════════════════════════════════════════════════════════════════════════
   七、动效（入场动画）
   ══════════════════════════════════════════════════════════════════════════════ */

/* .fade-up：初始状态（opacity:0 + 向下偏移 26px），JS/CSS 触发动画后变成可见状态
   animation-fill-mode:forwards 让动画结束后停留在最终帧（而不是回到 opacity:0） */
.fade-up { opacity: 0; animation: fadeUp .9s cubic-bezier(.2, .7, .3, 1) forwards; }
.d1 { animation-delay: .12s; }  /* 依次延迟 .12s/.24s/.36s/.48s，实现错开入场效果 */
.d2 { animation-delay: .24s; }
.d3 { animation-delay: .36s; }
.d4 { animation-delay: .48s; }

/* fadeUp 动画：从 opacity:0 透明 + translateY(26px) 向下偏移，动画到可见+原位 */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(26px); }
  to { opacity: 1; transform: none; }
}

/* prefers-reduced-motion：用户开启「减弱动态效果」时关掉动画
   （操作系统设置里有这个选项，照顾有前庭障碍的用户） */
@media (prefers-reduced-motion: reduce) {
  .orb, .fade-up { animation: none; opacity: 1; }
  html { scroll-behavior: auto; }
}

/* ══════════════════════════════════════════════════════════════════════════════
   八、文章卡片
   ══════════════════════════════════════════════════════════════════════════════ */

/* .article-grid：响应式网格布局
   repeat(auto-fill, minmax(320px, 1fr))
   = 尽可能多地填入 320px 宽的列，每列最小 320px，最大等比分摊剩余空间（1fr）
   屏幕窄时自动换行，不需要媒体查询。 */
.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 26px;
}

/* .article-card：整张卡片可点击（<a> 是块级元素）
   transition 在 transform/border-color/box-shadow 上做，
   三个属性同时过渡，hover 效果更整体。 */
.article-card {
  display: flex;
  flex-direction: column;  /* 封面在上，内容在下，flex:1 让 .card-body 填满剩余高度 */
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;         /* 封面图超出圆角的部分裁掉 */
  transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease;
}
.article-card:hover {
  transform: translateY(-6px);                          /* 上浮 6px */
  border-color: rgba(139, 92, 246, .45);               /* 边框透出紫色 */
  box-shadow: var(--shadow);
}

/* .card-cover：封面区块，aspect-ratio:16/9 固定宽高比，
   ::after 伪元素叠加白色渐变，制造"光线从左上角打下来"的质感。 */
.card-cover {
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.card-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 20%, rgba(255, 255, 255, .18), transparent 55%);
}
.cover-icon { font-size: 54px; filter: drop-shadow(0 8px 18px rgba(0, 0, 0, .45)); transition: transform .3s; }
.article-card:hover .cover-icon { transform: scale(1.12) rotate(-4deg); }  /* hover 时图标放大并微微旋转 */

/* .card-body：卡片内容区，用 flex:1 让多张卡片高度一致（底部对齐） */
.card-body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }

/* .card-meta：分类标签 + 日期的水平排列，flex + gap */
.card-meta { display: flex; align-items: center; gap: 12px; font-size: 13px; }
.card-meta .date { color: var(--text-faint); }

/* .chip：胶囊标签（分类 / 类型）
   color-mix(in srgb, var(--chip-color) 16%, transparent) = 取 chip-color 16% 透明度，
   是 CSS Color Level 5 新语法，比 rgba 更直观。 */
.chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .5px;
  background: var(--grad-soft);
  color: var(--cyan);
  border: 1px solid rgba(34, 211, 238, .22);
}
.chip-cat {
  background: color-mix(in srgb, var(--chip-color, #8b5cf6) 16%, transparent);
  color: var(--chip-color, #8b5cf6);
  border-color: color-mix(in srgb, var(--chip-color, #8b5cf6) 30%, transparent);
}

/* 标签文字（#tag）：字号小，颜色用最弱文字色，前面用 ::before 加 # 号 */
.card-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  font-size: 12px;
  color: var(--text-faint);
  padding: 2px 0;
}
.tag::before { content: "#"; color: var(--text-faint); }

/* ══════════════════════════════════════════════════════════════════════════════
   九、作品卡片
   ══════════════════════════════════════════════════════════════════════════════ */

/* .work-grid：和文章网格一样的响应式布局，最小宽度 300px */
.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 26px;
}

.work-card {
  position: relative;           /* 相对定位，让 .work-overlay 相对于它定位 */
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;              /* 鼠标变成手指，表示可点击 */
  transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease;
}
.work-card:hover { transform: translateY(-6px); border-color: rgba(34, 211, 238, .4); box-shadow: var(--shadow); }

/* .work-cover：封面图，和文章卡片相同的 16:10 宽高比 */
.work-cover {
  aspect-ratio: 16 / 10;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
/* 底部渐变叠层，让图片和下方文字内容之间有视觉过渡 */
.work-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(6, 8, 14, .55));
}
.work-cover .cover-icon { font-size: 48px; }

/* .work-overlay：「查看详情 →」遮罩层
   初始 opacity:0 隐藏，hover 时 opacity:1 出现（配合 backdrop-filter 模糊） */
.work-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 12, 18, .55);
  backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity .28s;
}
.work-card:hover .work-overlay { opacity: 1; }
/* 遮罩里的文字：初始向下偏移 8px，hover 时回到原位，配合 opacity 有"升起"效果 */
.work-overlay span {
  padding: 9px 20px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: rgba(18, 22, 34, .8);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  transform: translateY(8px);
  transition: transform .28s;
}
.work-card:hover .work-overlay span { transform: none; }

.work-body { padding: 18px 20px 20px; }
.work-body h3 { font-size: 18px; margin-bottom: 6px; }
.work-body p { color: var(--text-dim); font-size: 14px; margin-bottom: 12px; }
.work-body .meta { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--text-faint); margin-bottom: 12px; }

/* .tech-tag：技术栈标签（Unity/C#/GDScript 等）
   用 surface-2（更亮背景）区分于主文字区，有"贴上去"的感觉 */
.tech-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.tech-tag {
  font-size: 12px;
  padding: 3px 11px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-dim);
  background: var(--surface-2);
}

/* ══════════════════════════════════════════════════════════════════════════════
   十、博客筛选栏 / 搜索框
   ══════════════════════════════════════════════════════════════════════════════ */

.blog-toolbar { display: flex; flex-direction: column; gap: 18px; margin-bottom: 14px; }

/* .search-box：搜索输入框，胶囊形状，深色背景 + 边框
   focus-within 在输入框或其子元素获得焦点时触发，用于整行发光效果 */
.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 12px 20px;
  max-width: 460px;
  transition: border-color .25s, box-shadow .25s;
}
.search-box:focus-within {
  border-color: rgba(139, 92, 246, .55);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, .15);  /* 外发光边框 */
}
.search-box svg { flex-shrink: 0; color: var(--text-faint); }
.search-box input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 15px;
}
.search-box input::placeholder { color: var(--text-faint); }

/* .filter-bar / .filter-chip：筛选按钮组
   .filter-chip.active 用渐变背景表示"选中"状态，box-shadow 加发光 */
.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }

.filter-chip {
  padding: 7px 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-dim);
  font-size: 14px;
  transition: all .2s;
}
.filter-chip:hover { color: var(--text); border-color: var(--border-strong); }
.filter-chip.active {
  background: var(--grad);
  border-color: transparent;
  color: #fff;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(139, 92, 246, .3);
}

.result-count { color: var(--text-faint); font-size: 13.5px; margin: 10px 0 22px; }

/* .empty-state：没有匹配结果时的占位提示，dashed 虚线边框表示"这里是空的" */
.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-faint);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
}
.empty-state .empty-icon { font-size: 44px; display: block; margin-bottom: 14px; }

/* ══════════════════════════════════════════════════════════════════════════════
   十一、页面通用头部（blog/portfolio/about 用的灰色标题栏）
   ══════════════════════════════════════════════════════════════════════════════ */

.page-head {
  padding: 72px 0 40px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  background: var(--bg-soft);
}
.page-head h1 { font-size: clamp(30px, 4.4vw, 42px); font-weight: 800; }
.page-head p { color: var(--text-dim); margin-top: 10px; max-width: 560px; margin-inline: auto; }

/* ══════════════════════════════════════════════════════════════════════════════
   十二、文章详情页
   ══════════════════════════════════════════════════════════════════════════════ */

.post-wrap { padding: 56px 24px 84px; }

/* .post-hero：标题区居中，最大宽度 760px（比正文窄，视觉上有"呼吸感"） */
.post-hero { text-align: center; max-width: 760px; margin: 0 auto 46px; }
.post-hero h1 { font-size: clamp(28px, 4.2vw, 42px); line-height: 1.3; font-weight: 800; margin-bottom: 18px; }
.post-meta { display: flex; align-items: center; justify-content: center; gap: 14px; color: var(--text-faint); font-size: 14px; flex-wrap: wrap; }
.post-meta .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--text-faint); }  /* 中圆点分隔符 */
.post-tags { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-top: 20px; }
.post-tags .tag {
  font-size: 13px;
  padding: 4px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-dim);
}
.post-tags .tag:hover { color: var(--cyan); border-color: rgba(34, 211, 238, .4); }

/* .post-cover：文章封面，21:9 超宽比例，有戏剧感 */
.post-cover {
  max-width: 820px;
  margin: 0 auto 44px;
  aspect-ratio: 21 / 9;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.post-cover .cover-icon { font-size: 64px; }

/* ══════════════════════════════════════════════════════════════════════════════
   十三、正文排版（.post-prose）
   所有文章正文内容的样式在这里统一管理，h2/h3/p/ul/blockquote/代码块各司其职。
   ══════════════════════════════════════════════════════════════════════════════ */

.post-prose {
  max-width: 720px;  /* 正文比标题更窄，提升阅读舒适度 */
  margin: 0 auto;
  font-size: 16.5px;
  color: #d4d9e4;     /* 比主文字色略浅，读长文不累 */
}

/* h2：二级标题，用左边框（border-left）+ 渐变 border-image 实现"色条标题"效果
   比下边框更有设计感，且不占垂直空间 */
.post-prose h2 {
  font-size: 24px;
  margin: 44px 0 16px;
  padding-left: 14px;
  border-left: 3px solid;
  border-image: var(--grad) 1;  /* 左边框用渐变色 */
  line-height: 1.4;
}
.post-prose h3 { font-size: 19px; margin: 30px 0 12px; color: var(--text); }
.post-prose p { margin-bottom: 18px; line-height: 1.95; }
.post-prose strong { color: var(--text); font-weight: 700; }
.post-prose a { color: var(--cyan); border-bottom: 1px solid rgba(34, 211, 238, .35); }
.post-prose ul, .post-prose ol { margin: 0 0 18px 22px; }
.post-prose li { margin-bottom: 8px; line-height: 1.85; }

/* blockquote：引用块，渐变浅色背景 + 紫色左边框
   是文章里引用名言、观点的标准样式 */
.post-prose blockquote {
  margin: 26px 0;
  padding: 18px 22px;
  border-radius: var(--radius-sm);
  background: var(--grad-soft);
  border-left: 3px solid var(--violet);
  color: var(--text-dim);
  font-style: normal;   /* articleCard 里的 blockquote 用斜体，这里统一成非斜体 */
}
.post-prose blockquote p { margin: 0; }

/* 行内代码：浅色背景 + 圆角边框 + 天蓝色文字 */
.post-prose code {
  font-family: var(--mono);
  font-size: .88em;    /* 略小于正文 */
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 2px 7px;
  border-radius: 6px;
  color: #7dd3fc;
}

/* 代码块：深色背景（接近 GitHub Dark），pre 允许横向滚动 */
.post-prose pre {
  background: #0d1117;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px 22px;
  overflow-x: auto;    /* 代码太长时横向滚动，不撑破布局 */
  margin: 24px 0;
  line-height: 1.7;
}
.post-prose pre code { background: none; border: none; padding: 0; color: #c9d1d9; font-size: 14px; }

/* 上下文章导航 */
.post-nav { max-width: 720px; margin: 54px auto 0; display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; }

/* 相关推荐 */
.related { max-width: 1080px; margin: 70px auto 0; }
.related h2 { font-size: 22px; margin-bottom: 24px; }
.related .article-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

/* ══════════════════════════════════════════════════════════════════════════════
   十四、关于我页
   ══════════════════════════════════════════════════════════════════════════════ */

/* .about-hero：沉浸式大区，最小高度 80vh，头像/名字/贡献图全在里面
   position:relative 让背景图相对于它定位。
   padding 很大（96px 0 72px）让内容不贴边，且下方有时间线等内容区。 */
.about-hero {
  position: relative;
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  background: #0A0C12;
  padding: 96px 0 72px;
}

/* .about-hero-bg：背景图，position:absolute 填满整个 Hero 区域
   animation:heroDrift 让背景图缓慢缩放（1.05→1.13）+ 上下位移，产生"呼吸"感
   filter:saturate+contrast 让图片色彩略饱和、对比度略高，叠在深色上更好看
   ::after 渐变叠层：顶部 45% 区域半透明深色→底部 94% 区域几乎不透明，
   这样下方的内容（bio/时间线）能清晰阅读，背景图只作为氛围层。 */
.about-hero-bg {
  position: absolute;
  inset: 0;
  background-image: var(--bg);
  background-size: cover;
  background-position: center;
  transform: scale(1.05);
  animation: heroDrift 26s ease-in-out infinite alternate;  /* 26s 极慢，呼吸感强 */
  filter: saturate(1.04) contrast(1.02);
}
.about-hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10,12,18,.45) 0%, rgba(10,12,18,.30) 42%, rgba(10,12,18,.94) 100%);
}

@keyframes heroDrift {
  from { transform: scale(1.05) translateY(0); }
  to   { transform: scale(1.13) translateY(-14px); }
}

/* .about-hero-inner：Hero 内容层，flex 纵向排列，居中对齐，position:relative 浮在背景上 */
.about-hero-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 0 20px;
  width: 100%;
}

/* .avatar-frame：头像外框，渐变边框 = 外层 padding:4px + linear-gradient 背景
   三层 box-shadow 从内到外：外晕、内晕、投影，构成精致边框效果 */
.avatar-frame {
  width: 128px;
  height: 128px;
  border-radius: 50%;
  padding: 4px;
  background: linear-gradient(135deg, var(--violet), var(--cyan));
  box-shadow: 0 0 0 6px rgba(139,92,246,.16), 0 18px 50px rgba(0,0,0,.55);
  flex: 0 0 auto;
}

/* .avatar-img：GitHub 头像，圆形裁切 + object-fit:cover 保证不变形 */
.avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface);
  display: block;
}

/* .avatar-fallback：GitHub 头像加载失败时的文字兜底（如只显示首字母"S"） */
.avatar-fallback {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 52px;
  font-weight: 800;
  color: #fff;
}

/* .about-name：大字号渐变名字，白→淡紫→青的渐变色，和背景形成反差 */
.about-name {
  font-size: clamp(42px, 7vw, 86px);
  font-weight: 800;
  letter-spacing: .04em;
  margin: 6px 0 0;
  line-height: 1.05;
  background: linear-gradient(135deg, #fff 0%, #c4b5fd 55%, #67e8f9 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  text-shadow: 0 4px 40px rgba(139,92,246,.30);  /* 文字底部有紫光溢出 */
}

.about-role { color: var(--text-dim); font-size: 16px; letter-spacing: .06em; }
.about-bio { color: var(--text-dim); max-width: 620px; line-height: 1.8; font-size: 15px; }

/* .github-card：GitHub 资料卡（链接 + 贡献图 + 年度进度），纵向居中 */
.github-card {
  margin-top: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: min(720px, 94vw);  /* min(720px, 94vw) 两者取小，小屏幕时自动适配 */
}
.gh-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.14);
  color: var(--text);
  font-size: 14px;
  text-decoration: none;
  transition: .2s;
}
.gh-link:hover { background: rgba(139,92,246,.18); border-color: var(--violet); transform: translateY(-1px); }
.gh-link svg { width: 18px; height: 18px; fill: currentColor; }  /* fill:currentColor 继承文字色 */
.gh-contrib {
  width: 100%;
  max-width: 720px;
  border-radius: 14px;
  background: rgba(13,17,28,.72);
  border: 1px solid rgba(255,255,255,.08);
  padding: 12px;
}

/* 年度进度条：全年已过天数的可视化进度条
   .yp-fill 用 CSS transition，在 JS 设置 width 后平滑动画到目标百分比 */
.year-progress { width: min(540px, 90vw); margin-top: 2px; }
.yp-label { font-size: 12.5px; color: var(--text-dim); margin-bottom: 9px; letter-spacing: .04em; }
.yp-track {
  height: 9px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  overflow: hidden;   /* fill 超出部分裁掉，配合 border-radius 形成圆头效果 */
}
.yp-fill {
  width: 0;           /* JS 设置 width 后，CSS transition 实现动画填充 */
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--violet), var(--cyan));
  box-shadow: 0 0 14px rgba(34,211,238,.5);  /* 进度条右端有青色发光 */
  transition: width 1.1s cubic-bezier(.2,.8,.2,1);  /* 1.1 秒缓动，先快后慢 */
}

/* ══════════════════════════════════════════════════════════════════════════════
   十五、关于我页 - 内容区块（时间线 / 理念 / 联系方式）
   ══════════════════════════════════════════════════════════════════════════════ */

.about-section { padding: 46px 0; }
.about-section + .about-section { border-top: 1px solid var(--border); }  /* 相邻的 section 之间加分割线 */
.about-section h2 { font-size: 22px; margin-bottom: 22px; display: flex; align-items: center; gap: 10px; }
.about-section h2 .sec-icon { font-size: 20px; }

/* 时间线：
   竖线用 ::before 伪元素画在 .timeline 上（绝对定位），
   每个时间节点用 ::before 圆点（相对定位），
   这样无需额外 HTML 元素，纯 CSS 实现时间线视觉效果。 */
.timeline { position: relative; padding-left: 26px; max-width: 640px; }
.timeline::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: linear-gradient(180deg, var(--violet), var(--cyan));  /* 渐变竖线 */
  opacity: .5;
  border-radius: 2px;
}
.tl-item { position: relative; padding-bottom: 30px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: "";
  position: absolute;
  left: -26px;        /* 回到 .timeline 的 padding-left 起点 */
  top: 7px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg);  /* 背景色 = 透明效果（和页面背景一致） */
  border: 3px solid var(--cyan);  /* 青色边框圆点 */
}
.tl-item .tl-year {
  font-family: var(--mono);
  font-size: 13.5px;
  color: var(--cyan);
  font-weight: 700;
  letter-spacing: 1px;
  display: block;
  margin-bottom: 5px;
}
.tl-item h3 { font-size: 16.5px; margin-bottom: 5px; }
.tl-item p { color: var(--text-dim); font-size: 14.5px; }

/* 理念卡片网格：和文章网格一样的 minmax 写法 */
.philosophy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}
.philosophy-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 22px;
  transition: border-color .25s, transform .25s;
}
.philosophy-card:hover { border-color: rgba(139, 92, 246, .45); transform: translateY(-3px); }
.philosophy-card .p-icon { font-size: 24px; display: block; margin-bottom: 10px; }
.philosophy-card h3 { font-size: 16px; margin-bottom: 6px; }
.philosophy-card p { color: var(--text-dim); font-size: 14px; }

/* 联系方式：胶囊形按钮组，flex 横向排列，wrap 换行 */
.contact-links { display: flex; flex-wrap: wrap; gap: 14px; }
.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-dim);
  font-size: 14.5px;
  transition: all .2s;
}
.contact-link:hover { color: var(--cyan); border-color: rgba(34, 211, 238, .45); transform: translateY(-2px); }

/* ══════════════════════════════════════════════════════════════════════════════
   十六、弹窗（Modal）
   点击作品卡片时弹出的详情面板，position:fixed 覆盖全屏。
   ══════════════════════════════════════════════════════════════════════════════ */

/* .modal-backdrop：遮罩层
   position:fixed + inset:0 覆盖整个视口，rgba 半透明黑色背景制造"暗幕"效果。
   backdrop-filter:blur 背景模糊（毛玻璃），弹窗视觉上更突出。
   opacity:0 + pointer-events:none 默认隐藏，点击后 JS 加 .open 类显示。 */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;           /* 比 Header(z-index:100) 更高，保证它在最上层 */
  background: rgba(5, 7, 12, .72);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;   /* 隐藏时不可点击 */
  transition: opacity .25s;  /* 渐显/渐隐动画 */
}
.modal-backdrop.open { opacity: 1; pointer-events: auto; }

/* .modal：弹窗主体
   max-height:86vh 限制最大高度，超出时内部 .modal-body 设置 overflow-y:auto 滚动。
   transform:translateY(20px) scale(.98) = 初始向下偏移+轻微缩小，
   打开时 CSS transition 变回 none（对应 JS requestAnimationFrame 触发），
   实现"弹出"动画（scale 从 0.98→1，向上位移）。 */
.modal {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  max-width: 680px;
  width: 100%;
  max-height: 86vh;
  overflow-y: auto;       /* 内容超长时弹窗内部滚动 */
  transform: translateY(20px) scale(.98);
  transition: transform .3s cubic-bezier(.2, .8, .3, 1);
}
.modal-backdrop.open .modal { transform: none; }

.modal-cover {
  aspect-ratio: 21 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.modal-cover .cover-icon { font-size: 56px; }

.modal-body { padding: 28px 30px 32px; }
.modal-body h2 { font-size: 24px; margin-bottom: 10px; }
.modal-body .meta { display: flex; gap: 14px; color: var(--text-faint); font-size: 13.5px; margin-bottom: 16px; flex-wrap: wrap; }
.modal-body p { color: var(--text-dim); line-height: 1.9; margin-bottom: 14px; }
.modal-body h4 { margin: 20px 0 10px; font-size: 15.5px; color: var(--text); }
.modal-body ul { margin-left: 20px; color: var(--text-dim); font-size: 14.5px; }
.modal-body li { margin-bottom: 7px; }

/* .modal-close：关闭按钮，圆形，右上角绝对定位
   transform:rotate(90deg) hover 时顺时针旋转 90°，配合「点 X 关闭」的隐喻 */
.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: rgba(10, 12, 18, .7);
  color: var(--text);
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s;
  z-index: 2;              /* 比封面图层级更高 */
}
.modal-close:hover { border-color: var(--cyan); color: var(--cyan); transform: rotate(90deg); }

/* ══════════════════════════════════════════════════════════════════════════════
   十七、首页关于我卡片（精选作品下方的那个「你好我是 Starark」卡片）
   ══════════════════════════════════════════════════════════════════════════════ */

/* .about-card：首页底部的个人简介卡，CSS Grid 左右两栏（150px 头像 + 1fr 内容）
   padding 和 border-radius 与文章卡片风格统一，但尺寸更大（更正式）。 */
.about-card {
  display: grid;
  grid-template-columns: 150px 1fr;  /* 左侧固定 150px 头像，右侧自适应 */
  gap: 34px;
  align-items: center;               /* 垂直居中，头像和文字同一行基准对齐 */
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;               /* 比普通卡片略大，section 级别的卡片应该有区别 */
  padding: 38px 42px;
}
.about-card .avatar-frame { width: 140px; height: 140px; }  /* 略小于 about-hero 的 128px */
.about-card .avatar { font-size: 58px; }
.about-card h2 { font-size: 24px; margin-bottom: 6px; }
.about-card .role { color: var(--cyan); font-weight: 600; font-size: 14.5px; margin-bottom: 12px; }
.about-card p { color: var(--text-dim); font-size: 15px; max-width: 620px; }
.about-card .btn { margin-top: 18px; }

/* ══════════════════════════════════════════════════════════════════════════════
   十八、Footer 页脚
   ══════════════════════════════════════════════════════════════════════════════ */

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
  padding: 54px 0 34px;
  margin-top: auto;    /* 配合 body:flex 推到底部 */
}

/* .footer-grid：三列 Grid 布局
   1. 第一列（1.4fr）：品牌区（Logo + 描述）——略宽因为有描述文字
   2/3 列（各 1fr）：导航链接、联系方式 */
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand .logo { margin-bottom: 14px; }
.footer-brand p { color: var(--text-faint); font-size: 14px; max-width: 300px; }

.footer-col h4 { font-size: 14px; letter-spacing: 1.5px; color: var(--text-dim); margin-bottom: 16px; }
.footer-col a {
  display: block;
  color: var(--text-faint);
  font-size: 14.5px;
  padding: 5px 0;
  width: fit-content;    /* width:fit-content 让 <a> 的宽度等于文字宽度，hover 时整行变色 */
  border-bottom: 1px solid transparent;
  transition: color .2s, border-color .2s;
}
.footer-col a:hover { color: var(--cyan); border-color: rgba(34, 211, 238, .4); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--text-faint);
  font-size: 13px;
}

/* ══════════════════════════════════════════════════════════════════════════════
   十九、响应式断点
   按屏幕宽度从大到小写，后面的媒体查询覆盖前面的。
   ══════════════════════════════════════════════════════════════════════════════ */

/* ≤900px：Footer 三列→两列，首页关于我卡片→单列居中 */
@media (max-width: 900px) {
  .about-hero { grid-template-columns: 1fr; text-align: center; gap: 26px; }
  .about-hero p { margin-inline: auto; }
  .about-card { grid-template-columns: 1fr; text-align: center; padding: 32px 26px; }
  .about-card p { margin-inline: auto; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* ≤820px：导航栏→移动端抽屉，汉堡按钮出现
   .nav 变成绝对定位，从顶部（top:68px）垂下来，背景半透明深色 */
@media (max-width: 820px) {
  .hamburger { display: flex; }

  .nav {
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: rgba(10, 12, 18, .97);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    padding: 10px 24px 18px;
    transform: translateY(-12px);  /* 从上方 12px 滑入 */
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s, transform .25s;
  }
  .nav.open { opacity: 1; transform: none; pointer-events: auto; }
  .nav a { width: 100%; padding: 13px 2px; font-size: 17px; border-bottom: 1px solid var(--border); }
  .nav a::after { display: none; }  /* 移动端不显示下划线动画 */
  .nav-search { margin-top: 14px; }
}

/* ≤640px：区块 padding 收紧，网格→单列，Footer→单列 */
@media (max-width: 640px) {
  .section { padding: 60px 0; }
  .article-grid, .work-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .hero-stats { gap: 26px; }
}
