@charset "UTF-8";
/* ==========================================================================
   absinboo 静态站点样式 · v2 视觉改版
   --------------------------------------------------------------------------
   设计语言：
   · 暖纸白底（#F5F4F0）+ 纯白卡片 + 松墨绿单一强调色（#2E6F58）
   · 页头为「图标 + 站名 + 副标题」品牌行，顶部一条渐变细线
   · 导航与搜索集中在左侧栏（吸顶），当前项绿色高亮
   · 卡片圆角描边、hover 轻浮起
   · 正文 17px / 1.9 行高，适配中文长文阅读
   · 全站跟随系统深色模式
   ========================================================================== */

/* ---------- 设计变量 ---------- */
:root {
  --bg: #f5f4f0;
  --surface: #ffffff;
  --surface-2: #f8f7f4;
  --ink: #26282c;
  --ink-2: #5c6067;
  --ink-3: #989ca3;
  --line: #e8e6e1;
  --line-soft: #f0eeea;
  --line-strong: #d9d6cf;
  --accent: #2e6f58;
  --accent-strong: #235845;
  --accent-soft: #e9f1ec;
  --accent-grad: #7fc0a4;
  --mark-bg: #fff3c2;
  --code-bg: #f7f6f3;
  --shadow-sm: 0 1px 2px rgba(24, 28, 26, .04), 0 1px 6px rgba(24, 28, 26, .03);
  --shadow-md: 0 2px 4px rgba(24, 28, 26, .05), 0 14px 34px -18px rgba(24, 28, 26, .28);
  --radius: 14px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16181b;
    --surface: #1e2125;
    --surface-2: #262a2f;
    --ink: #e8e6e1;
    --ink-2: #a9adb3;
    --ink-3: #7b8087;
    --line: #2b2f34;
    --line-soft: #24272b;
    --line-strong: #3c4147;
    --accent: #63b392;
    --accent-strong: #85c9aa;
    --accent-soft: #233129;
    --accent-grad: #3d8f6e;
    --mark-bg: #59511f;
    --code-bg: #14161a;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .25);
    --shadow-md: 0 2px 4px rgba(0, 0, 0, .3), 0 14px 34px -16px rgba(0, 0, 0, .55);
  }
}

/* ---------- 基础 ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
               "Noto Sans SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-strong); }

img { max-width: 100%; height: auto; }

::selection { background: var(--accent-soft); color: var(--ink); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 22px; }

/* ---------- 阅读进度条 ---------- */
.reading-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  z-index: 120;
  background: linear-gradient(90deg, var(--accent), var(--accent-grad));
  transform: scaleX(0);
  transform-origin: 0 50%;
  pointer-events: none;
}

/* ---------- 页头 ---------- */
.site-head {
  position: relative;
  padding: 30px 0 24px;
}
.site-head::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-grad) 55%, transparent);
  opacity: .85;
}
.site-head-inner { display: block; }

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 15px;
  text-decoration: none;
}
.site-brand:hover .site-title { color: var(--accent-strong); }

.site-logo {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  flex: 0 0 auto;
}
.site-brand-text { display: flex; flex-direction: column; }

.site-title {
  color: var(--ink);
  font-size: 27px;
  font-weight: 700;
  letter-spacing: .015em;
  line-height: 1.25;
  transition: color .15s;
}
.site-tagline {
  margin-top: 3px;
  color: var(--ink-3);
  font-size: 12.5px;
  letter-spacing: .14em;
}

/* ---------- 侧栏导航（原顶部导航栏内容移至侧栏） ---------- */
.side-nav { margin: 0; padding: 0; list-style: none; font-size: 14.5px; }
.side-nav li + li { border-top: 1px solid var(--line-soft); }
.side-nav a {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 8px 2px;
  color: var(--ink-2);
  font-weight: 500;
  text-decoration: none;
  transition: color .15s, padding-left .15s;
}
.side-nav a:hover { color: var(--accent); padding-left: 5px; }
.side-nav a.on { color: var(--accent); font-weight: 600; }
.side-nav a.on::before {
  content: "";
  align-self: center;
  width: 4px;
  height: 14px;
  margin-right: 4px;
  margin-left: -8px;
  border-radius: 2px;
  background: var(--accent);
}
.side-nav .w-count { margin-left: auto; }

/* ---------- 两栏布局（内容在左，侧栏在右） ---------- */
.layout {
  display: flex;
  align-items: flex-start;
  gap: 34px;
  padding-top: 32px;
  padding-bottom: 48px;
}
.content { flex: 1 1 auto; min-width: 0; }
.sidebar {
  flex: 0 0 300px;
  width: 300px;
  position: sticky;
  top: 22px;
}

/* ---------- 桌面端：左右两栏各自独立滚动 ----------
   页面本身锁定在一屏高（页头页脚常驻），正文区与侧栏各自拥有滚动条：
   鼠标停在左侧只滚正文，停在侧栏只滚侧栏，互不干扰。
   窄屏（≤900px，见下方响应式）自动回退为整页滚动。 */
@media (min-width: 901px) {
  html { height: 100%; }
  body {
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  .site-head { flex: 0 0 auto; }
  /* 页脚身处正文滚动区内，去掉原来的整页宽内边距，与卡片对齐 */
  .site-foot { padding: 20px 0 4px; }
  .site-foot .wrap { max-width: none; padding: 0; }

  .layout {
    flex: 1 1 auto;
    align-items: stretch;
    min-height: 0;
    width: 100%;
    overflow: hidden;
  }
  .content {
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    padding-right: 10px;
    scrollbar-width: thin;
    scrollbar-color: var(--line-strong) transparent;
  }
  .sidebar {
    position: static;
    top: auto;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    padding-right: 6px;
    scrollbar-width: thin;
    scrollbar-color: var(--line-strong) transparent;
  }

  /* 细滚动条（WebKit/Blink） */
  .content::-webkit-scrollbar,
  .sidebar::-webkit-scrollbar { width: 12px; height: 12px; }
  .content::-webkit-scrollbar-track,
  .sidebar::-webkit-scrollbar-track { background: transparent; }
  .content::-webkit-scrollbar-thumb,
  .sidebar::-webkit-scrollbar-thumb {
    background: var(--line-strong);
    background-clip: content-box;
    border: 4px solid transparent;
    border-radius: 999px;
  }
  .content::-webkit-scrollbar-thumb:hover,
  .sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--ink-3);
    background-clip: content-box;
  }
}

/* ---------- 卡片公共 ---------- */
.post-card, .post-single, .page-card, .widget {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

/* ---------- 文章卡片 ---------- */
.post-card {
  margin-bottom: 24px;
  padding: 26px 30px 24px;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.post-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--line-strong);
}

.post-title {
  margin: 0 0 10px;
  font-size: 21px;
  line-height: 1.5;
  font-weight: 700;
  letter-spacing: .01em;
}
.post-title a { color: var(--ink); }
.post-title a:hover { color: var(--accent-strong); }

.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin-bottom: 16px;
  color: var(--ink-3);
  font-size: 13px;
}
.post-meta time { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.meta-sep { margin: 0 3px; color: var(--ink-3); }

.post-meta .cat {
  display: inline-block;
  padding: 1px 11px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  line-height: 20px;
  text-decoration: none;
  transition: background .15s, color .15s;
}
.post-meta .cat:hover { background: var(--accent); color: #fff; }

/* ---------- 正文排版 ---------- */
.post-body { font-size: 17px; line-height: 1.9; word-wrap: break-word; }
.post-body p { margin: 0 0 1.15em; }
.post-body p:last-child { margin-bottom: 0; }
.post-body a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(46, 111, 88, .4); }
.post-body a:hover { text-decoration-color: currentColor; }

.post-body h2, .post-body h3, .post-body h4 {
  margin: 1.7em 0 .7em;
  line-height: 1.5;
  font-weight: 700;
  letter-spacing: .01em;
}
.post-body h2 { font-size: 1.32em; }
.post-body h3 { font-size: 1.15em; }
.post-body h4 { font-size: 1em; color: var(--ink-2); }

.post-body ul, .post-body ol { margin: 0 0 1.15em; padding-left: 1.5em; }
.post-body li { margin: .3em 0; }
.post-body li::marker { color: var(--accent); }

.post-body blockquote {
  margin: 1.2em 0;
  padding: 12px 18px;
  border-left: 3px solid var(--accent);
  border-radius: 0 10px 10px 0;
  background: var(--surface-2);
  color: var(--ink-2);
}
.post-body blockquote p:last-child { margin-bottom: 0; }

.post-body code {
  padding: 2px 6px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: .86em;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--ink);
}
.post-body pre {
  margin: 1.2em 0;
  padding: 15px 18px;
  background: var(--code-bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow-x: auto;
  line-height: 1.65;
}
.post-body pre code { padding: 0; border: 0; background: none; font-size: .86em; }

.post-body hr {
  border: 0;
  height: 1px;
  margin: 1.8em auto;
  width: 62%;
  background: linear-gradient(90deg, transparent, var(--line-strong), transparent);
}

.post-figure { margin: 1.3em 0; }
.post-figure img,
.post-body img {
  display: block;
  border-radius: 10px;
  border: 1px solid var(--line);
  cursor: zoom-in;
}

/* ---------- 单篇文章页 ---------- */
.post-single {
  padding: 34px 38px 30px;
}
.post-single .post-title {
  font-size: 27px;
  margin-bottom: 12px;
  line-height: 1.4;
}
.post-single .post-body { margin-top: 22px; }

.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 30px;
  padding-top: 22px;
  border-top: 1px solid var(--line-soft);
}
.post-nav-cell { min-width: 0; }
.post-nav-cell.next { text-align: right; }
.post-nav-card {
  display: inline-flex;
  flex-direction: column;
  gap: 3px;
  max-width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
  text-decoration: none;
  transition: border-color .15s, background .15s;
}
.post-nav-card:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.post-nav-label { color: var(--ink-3); font-size: 12px; }
.post-nav-card:hover .post-nav-label { color: var(--accent); }
.post-nav-title {
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.post-nav-card:hover .post-nav-title { color: var(--accent-strong); }

/* ---------- 分页 ---------- */
.pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin: 28px 0 8px;
}
.pager .pg {
  display: inline-block;
  min-width: 38px;
  padding: 7px 13px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: var(--ink-2);
  font-size: 13px;
  text-align: center;
  text-decoration: none;
  transition: border-color .15s, color .15s, background .15s;
}
.pager a.pg:hover { border-color: var(--accent); color: var(--accent); }
.pager .pg.on {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 600;
}
.pager .pg.off { color: var(--ink-3); opacity: .6; }
.pager .pg-info { margin-left: auto; color: var(--ink-3); font-size: 12.5px; }

/* ---------- 侧栏 ---------- */
.widget {
  margin-bottom: 20px;
  padding: 20px 22px;
}
.widget-title {
  display: flex;
  align-items: center;
  margin: 0 0 13px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .12em;
}
.widget-title::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 8px;
  flex: 0 0 auto;
}

.search-box { display: flex; gap: 8px; }
.search-box input[type="search"] {
  flex: 1 1 auto;
  min-width: 0;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-2);
  color: var(--ink);
  font-size: 14px;
  font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.search-box input[type="search"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
  background: var(--surface);
}
.search-box button {
  flex: 0 0 auto;
  padding: 9px 15px;
  border: 1px solid var(--accent);
  border-radius: 9px;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  transition: background .15s;
}
.search-box button:hover { background: var(--accent-strong); }

.link-list { margin: 0; padding: 0; list-style: none; font-size: 14px; }
.link-list li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid var(--line-soft);
}
.link-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.link-list a {
  flex: 1 1 auto;
  min-width: 0;
  color: var(--ink-2);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color .15s, transform .15s;
}
.link-list a:hover { color: var(--accent); transform: translateX(2px); }
.w-date { flex: 0 0 auto; color: var(--ink-3); font-size: 11px; font-variant-numeric: tabular-nums; }
.w-count {
  flex: 0 0 auto;
  color: var(--ink-3);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

/* ---------- 归档页 ---------- */
.page-card {
  padding: 28px 32px;
  margin-bottom: 24px;
}
.page-card > h1 {
  margin: 0 0 8px;
  font-size: 25px;
  font-weight: 700;
}
.page-card > .lead { margin: 0 0 22px; color: var(--ink-3); font-size: 14px; }
.page-card a { color: var(--ink-2); }
.page-card a:hover { color: var(--accent); }

.archive-group { margin-bottom: 26px; }
.archive-group:last-child { margin-bottom: 6px; }
.archive-group h2 {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0 0 10px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 17px;
  font-weight: 700;
}
.archive-group h2 a { color: var(--ink); }
.archive-group h2 a:hover { color: var(--accent); }
.archive-group h2 .w-count { font-size: 12px; font-weight: 400; }

.archive-list { margin: 0; padding: 0; list-style: none; font-size: 15px; }
.archive-list li {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 6px 10px;
  border-radius: 8px;
  transition: background .13s;
}
.archive-list li:hover { background: var(--surface-2); }
.archive-list .d {
  flex: 0 0 58px;
  color: var(--ink-3);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}
.archive-list a {
  flex: 1 1 auto;
  min-width: 0;
  color: var(--ink);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.archive-list a:hover { color: var(--accent); }

/* ---------- 搜索页 ---------- */
.search-page .search-box { margin-bottom: 18px; }
.search-result { padding: 15px 2px; border-bottom: 1px solid var(--line-soft); }
.search-result:last-child { border-bottom: 0; }
.search-result h3 { margin: 0 0 5px; font-size: 17px; font-weight: 600; }
.search-result h3 a { color: var(--ink); }
.search-result h3 a:hover { color: var(--accent); }
.search-result .meta { color: var(--ink-3); font-size: 12.5px; margin-bottom: 6px; }
.search-result .snip { color: var(--ink-2); font-size: 14px; line-height: 1.75; }
.search-result mark { background: var(--mark-bg); color: var(--ink); border-radius: 3px; padding: 0 2px; }
.empty-hint { color: var(--ink-3); font-size: 14px; padding: 10px 0; }

/* ---------- 页脚 ---------- */
.site-foot {
  border-top: 1px solid var(--line);
  padding: 24px 0 38px;
  color: var(--ink-3);
  font-size: 13px;
}
.site-foot .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.foot-links a { margin-left: 16px; color: var(--ink-3); text-decoration: none; }
.foot-links a:hover { color: var(--accent); }

/* ---------- 返回顶部 ---------- */
.to-top {
  position: fixed;
  right: 24px;
  bottom: 28px;
  z-index: 95;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink-2);
  cursor: pointer;
  box-shadow: var(--shadow-md);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity .2s, transform .2s, background .15s, color .15s, border-color .15s;
}
.to-top.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.to-top:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ---------- 图片灯箱 ---------- */
.lb-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
  background: rgba(10, 12, 12, .88);
  cursor: zoom-out;
  animation: lb-in .18s ease;
}
.lb-overlay img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
}
@keyframes lb-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .wrap { padding: 0 16px; }
  .site-head { padding: 22px 0 18px; }
  .site-logo { width: 40px; height: 40px; border-radius: 10px; }
  .site-title { font-size: 22px; }
  .site-tagline { font-size: 11.5px; letter-spacing: .1em; }

  .layout {
    flex-direction: column;
    gap: 24px;
    padding-top: 20px;
    padding-bottom: 34px;
  }
  .sidebar { position: static; flex: 1 1 auto; width: 100%; }

  .post-card { padding: 20px 20px 18px; }
  .post-title { font-size: 19px; }
  .post-body { font-size: 16px; }
  .post-single { padding: 24px 20px 22px; }
  .post-single .post-title { font-size: 22px; }
  .page-card { padding: 22px 20px; }
  .post-nav { grid-template-columns: 1fr; }
  .post-nav-cell.next { text-align: left; }
  .pager .pg-info { display: none; }
  .to-top { right: 16px; bottom: 20px; }
}

/* ---------- 减少动效 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------- 打印 ---------- */
@media print {
  html, body { height: auto !important; display: block !important; overflow: visible !important; }
  .layout { display: block !important; overflow: visible !important; }
  .content, .sidebar { overflow: visible !important; height: auto !important; padding-right: 0 !important; }
  body { background: #fff; color: #000; }
  .sidebar, .site-foot, .pager, .post-permalink,
  .to-top, .reading-bar, .site-head::before { display: none !important; }
  .post-card, .post-single, .page-card { box-shadow: none; border: 0; padding: 0; }
}
