@charset "utf-8";

/* 基础重置：沿用原博客园 CSS 的轻量技术博客气质 */
html {
  overflow: auto;
  color: #000;
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
  text-rendering: optimizelegibility;
}

html.borderbox *,
html.borderbox *:before,
html.borderbox *:after,
*,
*:before,
*:after {
  box-sizing: border-box;
}

body,
dl,
dt,
dd,
ul,
ol,
li,
h1,
h2,
h3,
h4,
h5,
h6,
pre,
code,
form,
fieldset,
legend,
input,
textarea,
p,
blockquote,
th,
td,
hr,
button,
article,
aside,
details,
figcaption,
figure,
footer,
header,
menu,
nav,
section {
  margin: 0;
  padding: 0;
}

article,
aside,
details,
figcaption,
figure,
footer,
header,
menu,
nav,
section {
  display: block;
}

audio,
canvas,
video {
  display: inline-block;
}

body,
button,
input,
select,
textarea {
  font: 300 1em/1.8 "PingFang SC", "Lantinghei SC", "Microsoft YaHei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif;
}

body {
  position: relative;
  background: #fff;
  color: #27282d;
  font-family: "Microsoft YaHei", 微软雅黑, "MicrosoftJhengHei", 华文细黑, STHeiti, MingLiu, sans-serif;
}

button::-moz-focus-inner,
input::-moz-focus-inner {
  padding: 0;
  border: 0;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

fieldset,
img {
  border: 0;
}

img {
  max-width: 100%;
  height: auto;
  -ms-interpolation-mode: bicubic;
}

ul,
ol {
  list-style: none;
}

caption,
th {
  text-align: left;
}

q:before,
q:after {
  content: "";
}

abbr,
acronym {
  border-bottom: 1px dotted;
  cursor: help;
}

del {
  text-decoration: line-through;
}

address,
caption,
cite,
code,
dfn,
em,
th,
var {
  font-style: normal;
  font-weight: 400;
}

sub,
sup {
  font-size: 75%;
  line-height: 0;
  position: relative;
}

:root sub,
:root sup {
  vertical-align: baseline;
}

sup {
  top: -0.5em;
}

sub {
  bottom: -0.25em;
}

:focus {
  outline: 0;
}

a,
a:link,
a:visited {
  color: #333;
  text-decoration: none;
}

a:hover {
  color: #333;
  text-decoration: none;
}

hr {
  border: none;
  height: 1px;
}

code,
kbd,
pre,
samp,
tt {
  font-family: "Source Code Pro", "Courier New", Courier, monospace;
}

blockquote {
  position: relative;
  color: #999;
  font-weight: 400;
  border-left: 1px solid #1abc9c;
  padding-left: 1em;
  margin: 1em 3em 1em 2em;
}

@media only screen and (max-width: 640px) {
  blockquote {
    margin: 1em 0;
  }
}

.clear {
  clear: both;
}

.red {
  color: #e85600;
}

/* Hexo 主题骨架映射到原博客园风格 */
.site-shell {
  width: 820px;
  position: relative;
  margin: 0 auto;
  padding-top: 50px;
}

.site-header {
  background: #fff;
  height: 40px;
  width: 100%;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  transition: 0.5s ease-out;
  box-shadow: none;
}

.brand {
  display: none;
}

.site-nav {
  width: 820px;
  position: relative;
  margin: 6px auto 0;
  font-size: 15px;
  line-height: 26px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  text-align: center;
}

.site-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border-radius: 3px;
  color: #666 !important;
  background-color: transparent;
}

.site-nav a:hover {
  background: #4e5b66;
  color: #fff !important;
}

.site-main {
  display: block;
  margin-top: 10px;
  width: 100%;
}

.site-main > * + * {
  margin-top: 20px;
}

/* 首页 */
.hero {
  padding: 32px;
  margin: 15px 0;
  background: #fff;
  border-radius: 0.2rem;
  box-shadow: 0 0.05rem 1rem rgba(51, 51, 51, 0.05);
  transition: all 0.5s ease;
}

.hero:hover {
  transform: translateY(-2px);
  box-shadow: 0 0.3rem 1.5rem rgba(51, 51, 51, 0.18);
}

.eyebrow {
  display: none;
}

.hero h1 {
  color: #008aff;
  font-size: 30px;
  font-weight: 300;
  line-height: 1.4;
}

.hero__copy p {
  margin-top: 20px;
  color: #666;
  font-size: 15px;
  line-height: 2;
  word-break: break-all;
  overflow-wrap: anywhere;
}

.hero__meta {
  display: none;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 30px 0 10px;
}

.section-head h2 {
  color: #000;
  font-size: 22px;
  font-weight: 300;
  text-shadow: 2px 2px 8px #eee;
}

.text-link {
  padding: 7px 10px;
  border-radius: 0.2rem;
  background: #f0f1f4;
  color: #5b657a !important;
  font-size: 12px;
}

.text-link:hover {
  background: rgba(1, 69, 221, 0.05);
  color: #013dc4 !important;
}

.post-grid {
  display: block;
}

.post-card {
  position: relative;
  display: block;
  padding: 32px;
  margin: 15px 0;
  background: #fff;
  border-radius: 0.2rem;
  box-shadow: 0 0.05rem 1rem rgba(51, 51, 51, 0.05);
  transition: all 0.5s ease;
}

.post-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 0.3rem 1.5rem rgba(51, 51, 51, 0.22);
}

.post-card__title {
  color: #008aff !important;
  font-size: 28px;
  font-weight: 300;
  line-height: 1.4;
  transition: color 0.2s ease-in-out;
}

.post-card__title:hover {
  color: #027fe8 !important;
}

.post-card__excerpt {
  margin-top: 26px;
  color: #666;
  font-size: 0.9rem;
  line-height: 1.8;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  word-break: break-all;
  overflow-wrap: anywhere;
}

.post-card footer {
  margin-top: 20px;
  color: #b5b5b5;
  font-size: 12px;
  text-align: right;
  font-weight: 300;
}

/* 分页 */
.pager,
.page-number,
.extend,
.space {
  display: inline-flex;
  align-items: center;
}

.pager {
  justify-content: center;
  width: 100%;
  margin: 30px 0;
  gap: 4px;
}

.page-number,
.extend {
  padding: 7px 10px;
  margin: 0 2.5px;
  border-radius: 0.2rem;
  background: #f0f1f4;
  border: 1px solid #f0f1f4;
  color: #5b657a !important;
  font-size: 13px;
  line-height: 1.4;
}

.page-number:hover,
.extend:hover {
  background: rgba(1, 69, 221, 0.05);
  color: #013dc4 !important;
}

.page-number.current {
  background: #0145dd;
  border: 1px solid #0140ce;
  color: #fff !important;
}

.space {
  padding: 0 6px;
  color: #999;
}

/* 文章页 */
.article,
.page-article,
.page-hero,
.search-panel,
.comments-placeholder,
.archive-list,
.tag-cloud,
.category-cloud,
.tools-section {
  padding: 32px 30px 10px;
  width: 100%;
  background: #fff;
}

.article-hero {
  margin-bottom: 26px;
}

.article-back {
  display: inline-block;
  padding: 7px 10px;
  border-radius: 0.2rem;
  background: #f0f1f4;
  color: #5b657a !important;
  font-size: 12px;
}

.article-back:hover {
  background: rgba(1, 69, 221, 0.05);
  color: #013dc4 !important;
}

.article-hero h1,
.page-hero h1 {
  margin-top: 30px;
  padding-bottom: 15px;
  color: #333;
  font-size: 2rem;
  font-weight: 200;
  line-height: 1.4;
  text-align: center;
}

.article-meta {
  border-top: 1px solid #000;
  padding-top: 10px;
  margin-top: 10px;
  color: #b5b5b5;
  font-size: 12px;
  text-align: right;
}

.article-meta a {
  color: inherit;
}

.article-meta a:hover {
  color: #008aff;
  text-decoration: underline;
}

.article-layout {
  display: block;
  position: relative;
}

.article-body {
  clear: both;
  margin-top: 26px;
  color: #27282d;
  font-size: 18px;
  min-width: 0;
  margin-left: 0;
  width: 100%;
}

#cnblogs_post_body a,
.article-body a {
  color: #4b6f89;
  text-decoration: none;
}

#cnblogs_post_body a:hover,
.article-body a:hover {
  border-bottom: 2px solid #4b6f89;
  padding-bottom: 2px;
}

.article-body h1 {
  padding-bottom: 12px;
  font-size: 36px !important;
  border-bottom: 1px solid #b3b3b3 !important;
}

.article-body h2 {
  padding-bottom: 12px;
  font-size: 24px;
  border-bottom: 1px solid #eaeaea;
}

.article-body h3 {
  font-size: 20px;
  padding: 10px 0;
}

.article-body h4,
.article-body h5,
.article-body h6 {
  font-size: 16px;
  padding: 8px 0;
}

.article-body p {
  margin: 13px auto;
  line-height: 2.4;
  font-weight: 380;
}

.article-body strong {
  color: red;
}

.article-body ul {
  margin: 30px auto 30px 25px;
}

.article-body ol {
  margin: 30px auto 30px 20px;
  padding-left: 0;
}

.article-body li {
  list-style: disc;
  font-weight: 500;
  margin-bottom: 2em;
}

.article-body ol > li {
  list-style-type: decimal;
}

.article-body li li {
  list-style-type: circle;
}

.article-body li li li {
  list-style-type: square;
}

.article-body blockquote {
  background: #f4f4f4;
  border: none;
  padding: 25px 30px;
  margin: 20px 0;
}

.article-body blockquote p {
  margin: 0 auto;
  color: #27282d;
}

.article-body table {
  margin: 30px 0;
}

.article-body th,
.article-body td {
  padding: 3px 20px;
}

.article-body img {
  width: 100%;
  height: auto !important;
  display: block !important;
  margin: 15px 0 30px !important;
  border-radius: 3px !important;
  box-shadow: 0 1px 15px rgba(27, 31, 35, 0.15), 0 0 1px rgba(106, 115, 125, 0.35) !important;
}

.article-body hr {
  height: 1px;
  border: none;
  border-top: 1px solid #ccc;
  margin: 50px 250px;
}

.article-body code {
  background: hsl(0, 0%, 98%) !important;
  border: 1px solid hsl(220, 23%, 95%) !important;
  border-radius: 3px !important;
  color: red;
  line-height: 1.5;
  padding: 0.2em 0.3em !important;
}

.article-body pre {
  margin-bottom: 20px;
  max-width: 100%;
  box-sizing: border-box;
  overflow: auto;
  padding: 0;
  background: transparent;
}

.article-body figure.highlight {
  margin: 18px 0 24px;
  max-width: 100%;
  overflow: auto;
  border: 1px solid #e1e4ea;
  border-radius: 4px;
  background: #fffffe;
  box-shadow: 0 6px 18px rgba(27, 31, 35, 0.08);
}

.article-body figure.highlight table {
  width: 100%;
  margin: 0;
}

.article-body figure.highlight td {
  padding: 0;
}

.article-body figure.highlight .gutter {
  display: none;
}

.article-body figure.highlight pre {
  margin: 0;
  padding: 12px 16px;
  background: transparent;
}

.article-body figure.highlight code,
.article-body figure.highlight .hljs {
  display: block !important;
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
  color: #657b83 !important;
  font-size: 14px !important;
  line-height: 1.65;
}

.article-body pre:not(.hljs) {
  margin: 18px 0 24px;
  padding: 12px 16px;
  border: 1px solid #e1e4ea;
  border-radius: 4px;
  background: #fffffe;
  box-shadow: 0 6px 18px rgba(27, 31, 35, 0.08);
  color: #2b2f36;
  line-height: 1.65;
  font-size: 14px;
}

.article-body pre:not(.hljs) code {
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: inherit !important;
  font-size: inherit !important;
  line-height: inherit !important;
}

/* 目录 */
.article-toc {
  position: fixed;
  top: 40px;
  left: 0;
  width: 260px;
  max-height: calc(100vh - 40px);
  overflow: auto;
  padding: 16px 0 16px 14px;
  border: 1px solid #eaeaea;
  border-left: 2px solid #008aff;
  border-bottom: 3px solid #008aff;
  background: #fff;
  box-shadow: rgba(0, 0, 0, 0.117647) 0px 1px 3px;
  z-index: 50;
}

.article-toc .eyebrow {
  display: block;
  margin: 0 0 12px;
  color: #000;
  font-size: 20px;
  font-weight: 300;
  letter-spacing: 0;
  text-shadow: 2px 2px 8px #eee;
  text-align: center;
}

.article-toc ol,
.article-toc ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.article-toc li {
  margin: 10px 0;
  list-style: none;
  line-height: 1.6;
}

.article-toc a {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  color: #666;
  font-size: 14px;
  font-weight: 300;
  padding: 4px 8px 4px 10px;
  border-radius: 3px;
}

.article-toc a:hover {
  color: #008aff;
  background: #f2f7fd;
}

.article-toc .toc-number {
  display: inline-block;
  min-width: 2em;
  color: #008aff;
  font-variant-numeric: tabular-nums;
}

.article-toc .toc-text {
  flex: 1;
  min-width: 0;
}

.article-toc .toc-level-2,
.article-toc .toc-level-3,
.article-toc .toc-level-4,
.article-toc .toc-level-5,
.article-toc .toc-level-6 {
  padding-left: 12px;
}

.code-copy-shell {
  position: relative;
}

.code-copy-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #dfe4ea;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.9);
  color: #5b657a;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(51, 51, 51, 0.08);
  transition: all 0.2s ease;
}

.code-copy-btn:hover {
  background: #fff;
  color: #008aff;
  border-color: #008aff;
}

.code-copy-btn svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

.code-copy-btn.is-copied {
  color: #fff;
  background: #008aff;
  border-color: #008aff;
}

.article-neighbor {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
  margin: 30px 0;
  width: 100%;
}

.article-neighbor a {
  padding: 15px;
  border-radius: 0.2rem;
  background: #f0f1f4;
  color: #5b657a;
}

.article-neighbor a:hover {
  background: rgba(1, 69, 221, 0.05);
  color: #013dc4;
}

.article-neighbor span {
  display: inline-block;
  width: 54px;
  height: 18px;
  line-height: 18px;
  border-left: 4px solid #008aff;
  margin-right: 10px;
  text-align: center;
  color: #008aff;
  font-size: 12px;
}

.article-neighbor strong {
  font-weight: 400;
}

/* 归档、标签、分类、搜索 */
.page-hero {
  padding-top: 30px;
}

.archive-list,
.tag-cloud,
.category-cloud,
.search-panel {
  padding: 32px;
  margin: 15px 0;
  border-radius: 0.2rem;
  box-shadow: 0 0.05rem 1rem rgba(51, 51, 51, 0.05);
}

.archive-list h2 {
  padding-bottom: 16px;
  border-bottom: 1px solid #f0f0f0;
  color: #000;
  font-size: 22px;
  font-weight: 300;
  text-shadow: 2px 2px 8px #eee;
}

.archive-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin: 16px 0;
  padding: 14px 18px;
  border: 1px solid transparent;
  border-left: 2px solid #f0f0f0;
  box-shadow: 0 0.05rem 1rem rgba(51, 51, 51, 0.05);
  transition: all 0.25s ease-out;
}

.archive-item:hover {
  border: 1px solid #eee;
  border-left-color: #008aff;
  border-left-width: 4px;
  box-shadow: 4px 4px 12px #f4f4f4;
}

.archive-item__title {
  min-width: 0;
  color: #666;
  font-size: 18px;
}

.archive-item__date {
  flex: 0 0 auto;
  color: #b5b5b5;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.tag-cloud a,
.category-cloud a {
  display: inline-block;
  margin: 8px;
  padding: 6px 10px;
  border-radius: 0.2rem;
  background: #f0f1f4;
  color: #5b657a !important;
}

.tag-cloud a:hover,
.category-cloud a:hover {
  background: rgba(1, 69, 221, 0.05);
  color: #013dc4 !important;
}

.search-panel {
  display: block;
}

.search-input {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid #ccc;
  border-radius: 0.2rem;
  color: #666;
  font-size: 16px;
  transition: all 0.2s ease;
}

.search-input:focus {
  border-color: #0145dd;
  box-shadow: 0 0 0 0.1rem rgba(1, 69, 221, 0.2);
}

.search-empty {
  margin-top: 20px;
  color: #999;
}

.search-result-list {
  margin-top: 25px;
}

.search-result-list li {
  margin: 16px 0;
  padding: 18px;
  border-left: 2px solid #f0f0f0;
  box-shadow: 0 0.05rem 1rem rgba(51, 51, 51, 0.05);
}

.search-result-title {
  color: #008aff !important;
  font-size: 20px;
  font-weight: 300;
}

.search-result {
  margin-top: 8px;
  color: #666;
}

.search-keyword {
  color: red;
  font-style: normal;
}

/* 工具、相册、友链 */
.tools-list {
  display: block;
}

.tools-section {
  margin: 15px 10px;
  padding: 32px;
  border-radius: 0.2rem;
  box-shadow: 0 0.05rem 1rem rgba(51, 51, 51, 0.05);
}

.tools-section__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.tools-section__head h2 {
  color: #000;
  font-size: 22px;
  font-weight: 300;
  text-shadow: 2px 2px 8px #eee;
}

.tools-grid,
.friend-grid,
.album-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
}

.tool-card,
.friend-card,
.album-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 20px;
  border: 1px solid transparent;
  border-left: 2px solid #f0f0f0;
  box-shadow: 0 0.05rem 1rem rgba(51, 51, 51, 0.05);
  transition: all 0.25s ease-out;
}

.tool-card:hover,
.friend-card:hover,
.album-card:hover {
  border: 1px solid #eee;
  border-left-color: #008aff;
  border-left-width: 4px;
  box-shadow: 4px 4px 12px #f4f4f4;
}

.tool-card__icon {
  color: #008aff;
  font-size: 18px;
}

.tool-card__body,
.friend-card__body {
  display: block;
}

.tool-card__title,
.friend-card__name {
  display: block;
  color: #666;
  font-size: 18px;
}

.tool-card__desc,
.friend-card__desc {
  display: block;
  margin-top: 6px;
  color: #999;
  font-size: 13px;
}

.friend-card__avatar {
  width: 56px;
  height: 56px;
  border-radius: 100%;
  object-fit: cover;
  flex: 0 0 auto;
}

.friend-card__avatar--fallback {
  display: grid;
  place-items: center;
  background: #4e5b66;
  color: #fff;
}

.album-card {
  display: block;
  padding: 0;
  overflow: hidden;
}

.album-card__image {
  width: 100%;
  aspect-ratio: 16 / 11;
  object-fit: cover;
}

.album-card__caption {
  padding: 14px 18px;
}

.album-card__caption h3 {
  color: #666;
  font-size: 16px;
  font-weight: 400;
}

.album-card__caption p {
  color: #999;
  font-size: 13px;
}

/* 评论与页脚 */
.comments-placeholder {
  margin: 30px 10px;
  padding: 32px;
  border-top: 1px solid #f0f0f0;
}

#disqus_thread,
#utterances_thread {
  min-height: 160px;
}

.site-footer {
  padding: 40px;
  text-align: center;
  line-height: 21px;
  color: #bfc3c8;
}

.site-footer strong,
.site-footer span {
  display: block;
  font-size: 14px;
  font-weight: 400;
}

.site-footer__links {
  margin-top: 10px;
}

.site-footer__links a {
  color: #898f98;
  margin: 0 6px;
  font-size: 14px;
}

.site-footer__links a:hover {
  text-decoration: underline;
}

/* 选中和滚动条 */
::-webkit-scrollbar {
  width: 9px !important;
  height: 9px;
}

::-webkit-scrollbar-thumb {
  border: 1px solid #f5f5f5;
  border-radius: 9px;
  background: #aaa;
  transition: 0.5s ease-out;
}

::-webkit-scrollbar-thumb:hover {
  border: 1px solid #777;
  background: #777;
}

::-webkit-scrollbar-thumb:active {
  border: 1px solid #666;
  background: #666;
}

::selection {
  background: #2cc2d7;
}

::-moz-selection {
  background: #2cc2d7;
}

/* 响应式 */
@media (max-width: 1500px) {
  #navigatorDiv {
    display: none;
  }
}

@media (max-width: 900px) {
  body {
    overflow-x: hidden;
  }

  .site-shell,
  .site-nav {
    width: 100%;
  }

  .site-nav {
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-around;
    align-items: center;
    padding: 0 6px;
    font-size: 12px;
  }

  .site-nav a {
    padding: 0 5px;
  }

  .hero,
  .post-card,
  .archive-list,
  .tag-cloud,
  .category-cloud,
  .search-panel,
  .tools-section,
  .comments-placeholder {
    margin: 15px auto;
    padding: 5%;
    width: 100%;
  }

  .article,
  .page-article,
  .page-hero {
    padding: 20px;
  }

  .article-layout,
  .article-neighbor,
  .tools-grid,
  .friend-grid,
  .album-grid {
    grid-template-columns: 1fr;
  }

  .article-layout {
    display: block;
  }

  .article-body {
    margin-left: 0;
    width: 100%;
  }

  .article-toc {
    position: static;
    width: 100%;
    max-height: none;
    margin-bottom: 20px;
    order: 0;
    flex: 0 0 auto;
  }

  .code-copy-btn {
    width: 36px;
    height: 36px;
  }

  .post-card footer,
  .article-meta {
    margin-top: 0 !important;
    text-align: right;
  }

  .article-body,
  .post-card__excerpt {
    font-size: 0.9rem;
    line-height: 1.8;
  }

  .article-body img {
    max-width: 100% !important;
    height: auto;
  }

  .site-footer {
    padding: 28px 10px;
  }
}

@media (max-width: 500px) {
  .article-hero h1,
  .page-hero h1 {
    font-size: 25px;
    line-height: 40px;
  }

  .article-body hr {
    margin: 50px 0;
  }
}
