/*
Theme Name: Bobchen Ultimate Restored (No-Motion)
Author: Bob Chen
Version: 1.0
*/

/* ===================== 全站禁用动效 ===================== */
html, body, * { scroll-behavior: auto !important; scroll-snap-type: none !important; }
*, *::before, *::after { animation: none !important; transition: none !important; will-change: auto !important; }
.aos-init, .aos-animate, [data-aos], [data-animate], [data-scroll],
.reveal, .fade-in, .animate-in, .is-animating, .is-loading, .preload {
  animation: none !important; transition: none !important; opacity: 1 !important; transform: none !important;
}
/* 避免滚动条出现/消失导致的“闪一下” */
html { overflow-y: scroll; }

/* ===================== 基础（不改你的配色） ===================== */
body {
  margin: 0;
  font-family: system-ui, sans-serif;
  background-color: #151b23;
  color: #c9d1d9;
}
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: none; }

header {
  position: sticky;
  top: 0;
  z-index: 40;
  background-color: #161b22;
  border-bottom: 1px solid rgba(48, 54, 61, 0.6);
}
nav ul {
  display: flex;
  list-style: none;
  gap: 0.5rem;
  font-size: 16.5px; /* 原 19.5px -3px */
  color: #8b949e;
  margin: 0;
  padding: 0;
}
nav ul li a:hover { text-decoration: none; }
.current-menu-item a {
  background-color: #238636;
  color: white;
  padding: 2px 6px;
  border-radius: 4px;
}
main {
  max-width: 72rem;
  margin: 0 auto;
  padding: 1.5rem;
}
footer {
  background-color: #212830;
  color: #8b949e;
  font-size: 13px;
  padding: 1rem;
  text-align: center;
}

/* ---- u.sb core ---- */
:root{
  --bg:#151b23;
  --bg-soft:#161b22;
  --card:#212830;
  --text:#c9d1d9;
  --muted:#8b949e;
  --border:#30363d;
  --accent:#58a6ff;
  --radius:10px;
  --w: 1350px;
  --inner-w: 1100px; /* 备用变量 */
  --page-w: 984px;   /* 统一页面/卡片视觉宽度（含 padding/border） */
}
html{scroll-behavior:auto}
body{margin:0;background:var(--bg);color:var(--text);font:16px/1.65 ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Noto Sans,Arial}
img{max-width:100%;height:auto}
a{color:var(--accent);text-decoration:none}
a:hover { text-decoration: none; }

/* ===== Header（菜单靠右 + Feed 同色） ===== */
.header{position:sticky;top:0;z-index:40;background:#212830;border-bottom:1px solid var(--border);color:var(--text)}
.header .bar{max-width: var(--w); margin:0 auto; height:56px; padding:0 16px; display:flex; align-items:center; justify-content:flex-start}
.header .brand{font-weight:600; letter-spacing: .02em; color:var(--text)}
.header nav{ margin-left:auto; }
.header nav ul{list-style:none;margin:0;padding:0;display:flex;gap:12px;align-items:center}
.header nav li{display:inline-flex}
.header nav a{font-size:16.5px; color:var(--muted); padding:8px 12px; border-radius:10px; border:1px solid transparent}
.header nav .current-menu-item > a,
.header nav .current_page_item > a,
.header nav .current-menu-ancestor > a{color:#fff;background:#212830;border-color:#3a444e;box-shadow:0 0 0 1px rgba(48,54,61,.25) inset}
/* Feed 颜色跟菜单一致 */
.header .bar > a:last-child{
  display:inline-flex; align-items:center; color:var(--muted);
  padding:6px 8px; border-radius:8px;
}
.header .bar > a:last-child:hover{ color:#ffffff; text-decoration:none; }
.header .bar > a:last-child svg{ fill: currentColor; }

/* ===== 列表 / 容器 ===== */
.container{max-width: calc(var(--w) - 150px); margin:0 auto; padding: 0 16px}
.list{display:flex; flex-direction:column; gap:18px; margin: 24px 0}

/* ===== 卡片（984px，含 padding+border；无动效） ===== */
.card{
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px 24px;
  max-width: var(--page-w);
  width: 100%;
  box-sizing: border-box;
  margin-left: auto;
  margin-right: auto;
}
.card h1,.card h2{margin:0 0 6px; font-weight:800; color:var(--text); line-height:1.25; font-size: clamp(20px, 2.2vw, 28px); letter-spacing:.2px}
.card .meta{font-size:13px; color:var(--muted); margin-bottom:8px; display:none;} /* 隐藏作者/分类 */
.card .excerpt{color:rgba(201,209,217,.9); line-height:1.9}

/* 全卡片可点击 */
.post-title a { color: #c9d1d9; text-decoration: none; position: relative; z-index: 2; }
.post-title a:hover { color: #c9d1d9; text-decoration: none; }
.card .card__link { position: absolute; inset: 0; z-index: 1; border-radius: 12px; }
/* 关闭任何 hover 位移/阴影的动效（若你希望 hover 完全静态，可不写下面两行覆盖） */
.card:hover{ transform: none !important; box-shadow: none !important; }

/* 日期徽章 */
.card .post-date-badge{
  position: absolute;
  left: 12px;
  bottom: 12px;
  font-size: 12px;
  color: #aeb6bf;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 9999px;
  line-height: 1;
}

/* ===== 分页（居中） ===== */
.pagination{
  display:flex; gap:8px; flex-wrap:wrap; justify-content:center; margin:22px 0 8px;
}
.pagination a, .pagination span{
  display:inline-flex;align-items:center;justify-content:center;
  height:34px; min-width:34px; padding:0 12px;
  border:1px solid #2e3640; border-radius:9999px;
  background:#0d1117; color:#c9d1d9; font-size:14px;
  text-decoration:none;
}
.pagination .current{background:#212830;border-color:#3a4350;color:#fff;font-weight:700;box-shadow:none}

/* ===== 文章页正文 ===== */
.article{max-width: var(--page-w); margin:0 auto; box-sizing:border-box;}
.post-title{font-weight:800; font-size: clamp(20px, 2.2vw, 28px); line-height:1.25; margin:0 0 10px}
.post-meta{font-size:13px;color:var(--muted);margin-bottom:18px}
.prose{font-size:17px;line-height:1.9;color:var(--text)}
.prose p{margin:1em 0}
.prose h2{margin:1.6em 0 .6em;font-size:1.45em;font-weight:800}
.prose h3{margin:1.2em 0 .45em;font-size:1.18em;font-weight:700}
.prose code{background:rgba(148,163,184,.15);padding:.15em .35em;border-radius:6px}
.prose pre{background:#0b1220;padding:16px 18px;border-radius:12px;overflow:auto;border:1px solid var(--border)}
.prose pre code{background:transparent;padding:0}
.prose blockquote{border-left:3px solid var(--border);margin:1em 0;padding:.6em 1em;color:#9aa3ad;background:rgba(255,255,255,.02);border-radius:8px}

/* ===== Footer ===== */
.footer{border-top:1px solid var(--border);margin-top:40px;background: var(--card); margin:0 auto; padding: 16px; display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:12px; color:var(--muted); font-size:14px}
.footerbar a{color:var(--text)}
.footer { width: 100%; background: #212830; border-top: 1px solid var(--border); margin: 0; }
.footerbar { max-width: var(--w); margin: 0 auto; padding: 16px 16px; display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:12px; color: var(--muted); font-size:14px; }
.footerbar a { color: var(--text); text-decoration: none; }
.footerbar a:hover { text-decoration: underline; }

/* --- Sticky footer layout --- */
html, body { height: 100%; }
body { display: flex; flex-direction: column; }
main, .main { flex: 1 0 auto; }
.footer { flex-shrink: 0; }

/* --- 品牌字样 --- */
.header .brand { font-weight: 800; font-size: 22px; }
.header .brand, .header .brand:link, .header .brand:visited { color: #c9d1d9; }
.header .brand:hover { color: #ffffff; text-decoration: none; }

/* ===== 单篇文章页：宽度固定 + 防“按内容收缩” ===== */
body.single main,
body.single #main,
body.single #site-content,
body.single #primary,
body.single #content,
body.single .site-main,
body.single .content,
body.single .wrap,
body.single .container,
body.single .article,
body.single article,
body.single .hentry,
body.single .entry-content,
body.single .list{
  max-width: var(--page-w) !important;
  width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
  box-sizing: border-box !important;
  display: block !important;
  padding-left: 16px;
  padding-right: 16px;
}
body.single .list{ display:block !important; align-items:stretch !important; }
body.single .post-title,
body.single .post-title a{
  display:block !important;
  width:100% !important;
  max-width:none !important;
  overflow-wrap:anywhere;
  word-break: break-word;
}

/* ===== 页面（友链/关于等）：宽度固定 + 防“按内容收缩” ===== */
body.page main,
body.page #main,
body.page #site-content,
body.page #primary,
body.page #content,
body.page .site-main,
body.page .content,
body.page .wrap,
body.page .container,
body.page .article,
body.page article,
body.page .hentry,
body.page .entry-content,
body.page .list{
  max-width: var(--page-w) !important;
  width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
  box-sizing: border-box !important;
  display: block !important;
  padding-left: 16px;
  padding-right: 16px;
}
body.page .list{ display:block !important; align-items:stretch !important; }
body.page .post-title,
body.page .post-title a{
  display:block !important;
  width:100% !important;
  max-width:none !important;
  overflow-wrap:anywhere;
  word-break: break-word;
}
body.page .entry-content img,
body.page .entry-content video,
body.page .entry-content canvas,
body.page .entry-content iframe{
  max-width: 100%;
  height: auto;
  display: block;
}
body.page .entry-content .alignwide,
body.page .entry-content .alignfull{
  max-width: var(--page-w) !important;
  margin-left: auto !important;
  margin-right: auto !important;
  width: 100% !important;
}
body.page .pagination{ justify-content: center !important; }
