/*  Inner Page  */
.top {
  width: 100%;
  height: 350px;
  overflow: hidden;
  display: block;
  position: relative;
  -webkit-background-size: cover !important;
  background-size: cover !important;
  background-position: 50% 50% !important;
}

/* No cover image — clean text-only header (see article-full.ejs / article-page.ejs). */
.top.no-cover {
  height: 200px;
  background: #f5f1ea;
}

.top.no-cover .title {
  background: transparent;
  color: #2a2520;
}

.work_nav {
  display: block;
  width: 100%;
}

.work_nav .btn {
  float: right;
}

.work_nav ul {
  list-style: none;
}

.work_nav ul li {
  display: block;
  float: left;
  margin: 0 0 1px 1px;
  position: relative;
}

.work_nav a {
  display: block;
  width: 40px;
  height: 40px;
  background: url('../../img/p_navigation.png') no-repeat;
  background-position: 0 0;
}

.work_nav a.previous {
  background-position: 0 0;
}

.work_nav a.previous.disabled {
  cursor: no-drop;
}

.work_nav a.grid {
  background-position: -41px 0;
}

.work_nav a.next {
  background-position: -82px 0;
}

.work_nav a.next.disabled {
  cursor: no-drop;
}

.top .title {
  display: block;
  width: 100%;
  color: #4b4848;
  font-family:
    -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 26px;
  font-weight: bold;
  background: rgb(255, 255, 255, 0.7);
  padding: 20px;
  text-transform: uppercase;
  line-height: 30px;
  margin: 0 !important;
  overflow: hidden;
  box-sizing: border-box;
}

.content_header {
  position: absolute;
  bottom: 0;
  margin: 0 auto;
  left: 50%;
  margin-left: -46.3636%;
}

.content {
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 22px;
  padding: 60px 30px;
  background: var(--surface);
  margin-bottom: 70px;
  box-sizing: border-box;
}

.content:not(.archives) {
  padding: 64px clamp(24px, 4vw, 72px) 80px;
  font-size: 18px;
  line-height: 1.8;
}

/* The post hero already prints the title; keep the Markdown H1 for Obsidian only. */
body.layout-post .content:not(.archives) > h1:first-child {
  display: none;
}

.content.archives {
  margin-top: 90px;
}

.content:not(.archives) > p,
.content:not(.archives) > ul,
.content:not(.archives) > ol,
.content:not(.archives) > blockquote,
.content:not(.archives) > hr,
.content:not(.archives) > h1,
.content:not(.archives) > h2,
.content:not(.archives) > h3,
.content:not(.archives) > h4,
.content:not(.archives) > h5,
.content:not(.archives) > h6,
.content:not(.archives) > .callout {
  box-sizing: border-box;
  width: min(100%, var(--reading-width));
  margin-right: auto;
  margin-left: auto;
}

/* Keep prose easy to scan while letting known data-heavy blocks use more of the page.
   Media containers own their alignment; never override authored left/right/center margins. */
.content:not(.archives) > table,
.content:not(.archives) > figure.highlight,
.content:not(.archives) > .codeblock,
.content:not(.archives) > .code-block-container,
.content:not(.archives) > .mermaid {
  box-sizing: border-box;
  max-width: min(100%, var(--content-wide-width));
  margin-right: auto;
  margin-left: auto;
}

.content:not(.archives) p {
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 18px;
  line-height: 1.8;
  margin-bottom: 1.25em;
}

.content:not(.archives) h1,
.content:not(.archives) h2,
.content:not(.archives) h3,
.content:not(.archives) h4,
.content:not(.archives) h5,
.content:not(.archives) h6 {
  color: var(--ink-strong);
  font-family: var(--font-sans);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0;
  position: relative;
  padding-left: 24px; /* room for the collapse control */
  scroll-margin-top: 80px;
}

.content:not(.archives) h1 {
  margin-top: 0;
  margin-bottom: 28px;
  font-size: 34px;
}

.content:not(.archives) h2 {
  margin-top: 56px;
  margin-bottom: 22px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  font-size: 28px;
}

.content:not(.archives) h3 {
  margin-top: 42px;
  margin-bottom: 18px;
  font-size: 23px;
}

.content:not(.archives) h4 {
  margin-top: 34px;
  margin-bottom: 14px;
  font-size: 20px;
}

.content:not(.archives) h5 {
  margin-top: 28px;
  margin-bottom: 12px;
  font-size: 18px;
}

.content:not(.archives) h6 {
  margin-top: 24px;
  margin-bottom: 10px;
  font-size: 17px;
}

.content:not(.archives) .collapsible-heading {
  cursor: pointer;
}

/* 折叠按钮样式 */
.collapse-button {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  cursor: pointer;
  display: inline-block;
}

.collapse-button::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 7px;
  width: 8px;
  height: 2px;
  background-color: #666;
  transition: transform 0.3s ease;
}

.collapse-button::after {
  content: '';
  position: absolute;
  left: 7px;
  top: 4px;
  width: 2px;
  height: 8px;
  background-color: #666;
  transition: transform 0.3s ease;
}

/* 折叠状态 */
.content:not(.archives) h1.collapsed .collapse-button::after,
.content:not(.archives) h2.collapsed .collapse-button::after,
.content:not(.archives) h3.collapsed .collapse-button::after,
.content:not(.archives) h4.collapsed .collapse-button::after,
.content:not(.archives) h5.collapsed .collapse-button::after,
.content:not(.archives) h6.collapsed .collapse-button::after {
  transform: scaleY(0);
}

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

/* Only standalone Markdown images are centered by default. Inline images and
   authored figure layouts keep their own flow and alignment. */
.content:not(.archives) > img:not(.media-align-left, .media-align-right),
.content:not(.archives) > p > img:only-child:not(.media-align-left, .media-align-right),
.content:not(.archives)
  > p
  > a:only-child
  > img:only-child:not(.media-align-left, .media-align-right) {
  display: block;
  margin-right: auto;
  margin-left: auto;
}

/* Semantic media layouts: alignment describes the visual composition instead
   of being imposed globally by the theme. */
.content:not(.archives) > .media-layout {
  box-sizing: border-box;
  max-width: min(100%, var(--content-wide-width));
  margin: 24px auto;
}

.media-layout {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-start;
}

.media-layout > figure {
  margin: 0;
  text-align: center;
}

.media-layout > figure > img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.media-layout--left,
.media-layout--right {
  width: min(100%, var(--reading-width));
}

.media-layout--left {
  justify-content: flex-start;
}

.media-layout--center {
  justify-content: center;
}

.media-layout--right {
  justify-content: flex-end;
}

.media-layout--grid,
.media-layout--quad,
.media-layout--pair {
  display: grid;
}

.media-layout--grid {
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
}

.media-layout--quad,
.media-layout--pair {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.content:not(.archives) > .media-layout--compact {
  gap: 10px;
  margin-top: 18px;
  margin-bottom: 18px;
}

.content img.media-align-left {
  display: block;
  margin-right: auto;
  margin-left: 0;
}

.content img.media-align-center {
  display: block;
  margin-right: auto;
  margin-left: auto;
}

.content img.media-align-right {
  display: block;
  margin-right: 0;
  margin-left: auto;
}

.content:not(.archives) a {
  color: #356aa0;
  text-decoration-color: rgb(53 106 160 / 0.45);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
}

.content:not(.archives) a:hover {
  color: #214f7d;
  text-decoration-color: currentcolor;
}

.content:not(.archives) mark {
  padding: 0.05em 0.18em;
  border-radius: 3px;
  background: #fff1a8;
  color: inherit;
  font-style: normal;
  font-weight: inherit;
}

.content:not(.archives) hr {
  height: 1px;
  margin-top: 36px;
  margin-bottom: 36px;
  border: 0;
  background: var(--line-2);
}

.content:not(.archives) figcaption {
  margin-top: 10px;
  color: var(--muted) !important;
  font-family: var(--font-sans);
  font-size: 14px !important;
  line-height: 1.55;
  text-align: center;
}

/* Lists share the article's type scale and vertical rhythm. */
.content:not(.archives) ol,
.content:not(.archives) ul {
  margin-top: 0;
  margin-bottom: 1.25em;
  padding-left: 1.45em;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 18px;
  line-height: 1.75;
  list-style-position: outside;
}

.content:not(.archives) ol li,
.content:not(.archives) ul li {
  margin-bottom: 0.4em;
  padding-left: 0.18em;
  line-height: inherit;
  /* Long API names in prose lists must wrap within the narrower indented measure. */
  overflow-wrap: anywhere;
}

.content:not(.archives) ol li:last-child,
.content:not(.archives) ul li:last-child {
  margin-bottom: 0;
}

.content:not(.archives) ol ol,
.content:not(.archives) ul ul,
.content:not(.archives) ol ul,
.content:not(.archives) ul ol {
  margin-top: 0.4em;
  margin-bottom: 0;
  margin-left: 0;
  font-size: 0.96em;
}

.content .archive-filters {
  margin-bottom: 40px;
  padding-bottom: 20px;
  border-bottom: 2px solid #f0f0f0;
}

.content .archive-filters a,
.content .archive-filters a:visited,
.content .archive-filters a:active {
  display: inline-block;
  background: #fff;
  border-radius: 3px;
  letter-spacing: 0.01em;
  cursor: pointer;
  margin: 0 6px 8px 0;
  color: #454545;
  border: 1px solid #454545;
  padding: 7px 15px;
  text-decoration: none;
  font-family:
    'noto-sans-sc',
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    'Microsoft YaHei',
    '微软雅黑',
    sans-serif;
  font-size: 14px;
  transition:
    color 0.3s ease,
    border-color 0.3s ease;
}

.content .archive-filters a:hover {
  color: #969595;
  border-color: #969595;
}

.content div.archive-title {
  margin-left: 45px;
  text-decoration: none;
  text-transform: uppercase;
  font-family:
    'noto-sans-sc',
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    'Microsoft YaHei',
    '微软雅黑',
    sans-serif;
  color: #454545;
  font-size: 1.5em;
  margin-bottom: 50px;
}

.content .archive-year {
  margin-bottom: 40px;
}

.content .archive-year .year-title {
  font-size: 28px;
  font-family:
    -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: #454545;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #f0f0f0;
}

.content ul.archive-list {
  margin: 0 0 20px 45px;
  list-style-type: none;
  padding-left: 20px; /* 文章列表的缩进 */
}

.content ul.archive-list li.archive-item {
  margin: 15px 0;
  position: relative;
  padding-left: 120px;
}

.content ul.archive-list li.archive-item .archive-date {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  color: #888;
  font-family:
    -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 14px;
}

.content ul.archive-list li a,
.content ul.archive-list li a:active,
.content ul.archive-list li a:visited {
  text-decoration: none;
  color: #454545;
  transition: color 0.3s ease;
  font-size: 16px;
}

.content ul.archive-list li a:hover {
  color: #969595;
}

.content ul.archive-list li a:hover {
  color: #969595;
}

/* Quiet, Obsidian-like notes and quotations. */
.content:not(.archives) blockquote {
  margin-top: 1.5em;
  margin-bottom: 1.5em;
  padding: 14px 18px;
  border-left: 4px solid #aeb7c1;
  border-radius: 0 7px 7px 0;
  background: #f7f8fa;
  color: #555d66;
  font-style: normal;
}

.content:not(.archives) blockquote cite::before {
  content: ' — ';
  padding: 0 0.3em;
}

.content:not(.archives) blockquote > p {
  color: inherit;
  font-size: inherit;
  line-height: 1.7;
}

.content:not(.archives) blockquote > p:first-child {
  margin-top: 0;
}

.content:not(.archives) blockquote > p:last-child {
  margin: 0;
}

.pullquote {
  text-align: left;
  font-style: italic;
  margin: 1.5em 0 0;
}
.pullquote.left {
  width: 45%;
  float: left;
  margin: 1.5em 35px 1.5em 0;
}
.pullquote.right {
  width: 45%;
  float: right;
  margin: 1.5em 0 1.5em 35px;
}
.pullquote.blur {
  background-color: #eef0f1;
}
