/* The approved Function design, applied only to Chinese pages. */
html[lang="zh-CN"] {
  color-scheme: light;
  --global-bg-color: #fff;
  --global-text-color: #17171c;
  --global-text-color-light: #4f4c56;
  --global-theme-color: #6434b2;
  --global-hover-color: #6434b2;
  --global-divider-color: #d9d6dd;
  --global-card-bg-color: #fff;
  --global-code-bg-color: #f5f3f7;
  --function-wash: #f0eaf8;
  --function-mark: #bba2da;
  --site-nav-gap: clamp(14px, 1.7vw, 24px);
  scroll-padding-top: 116px;
  scroll-behavior: smooth;
}
html[lang="zh-CN"][data-nav-density="compact"] {
  --site-nav-gap: 12px;
}
html[lang="zh-CN"][data-nav-density="relaxed"] {
  --site-nav-gap: 24px;
}
html[lang="zh-CN"]:not([data-site-font]),
html[lang="zh-CN"][data-site-font="system"] {
  --site-font-family: "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
}
html[lang="zh-CN"][data-theme="dark"] {
  color-scheme: dark;
  --global-bg-color: #19191d;
  --global-text-color: #f6f4f8;
  --global-text-color-light: #c5bfd0;
  --global-theme-color: #c5a2ff;
  --global-hover-color: #c5a2ff;
  --global-divider-color: #45424b;
  --global-card-bg-color: #19191d;
  --global-code-bg-color: #26222b;
  --function-wash: #26222b;
  --function-mark: #80698e;
}
@media (prefers-color-scheme: dark) {
  html[lang="zh-CN"]:not([data-theme]) {
    color-scheme: dark;
    --global-bg-color: #19191d;
    --global-text-color: #f6f4f8;
    --global-text-color-light: #c5bfd0;
    --global-theme-color: #c5a2ff;
    --global-hover-color: #c5a2ff;
    --global-divider-color: #45424b;
    --global-card-bg-color: #19191d;
    --global-code-bg-color: #26222b;
    --function-wash: #26222b;
    --function-mark: #80698e;
  }
  html[lang="zh-CN"]:not([data-theme]) .social .contact-icons .fa-github::before {
    color: #f0f6fc !important;
  }
}
body.function-page {
  padding-top: 108px;
  font-family: var(--site-font-family);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}
.function-page ::selection {
  background: var(--function-mark);
  color: var(--global-text-color);
}
.function-page a {
  text-underline-offset: 0.25em;
}
.function-page a:focus-visible,
.function-page button:focus-visible {
  outline: 2px solid var(--global-theme-color);
  outline-offset: 5px;
  border-radius: 2px;
}
.function-page > .container[role="main"] {
  width: min(1060px, calc(100% - 96px));
  max-width: none;
  padding: 0;
  margin: 0 auto 64px !important;
}
.function-skip {
  position: fixed;
  top: -80px;
  left: 20px;
  padding: 6px 14px;
  background: var(--global-bg-color);
  border: 1px solid var(--global-theme-color);
  z-index: 1100;
}
.function-skip:focus {
  top: 12px;
}
.function-page #navbar {
  position: fixed;
  inset: 19px auto auto 50%;
  transform: translateX(-50%);
  width: min(1060px, calc(100% - 96px));
  min-height: 64px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 0;
  box-shadow: none;
  opacity: 1;
  background: var(--global-bg-color);
  transition:
    width 480ms cubic-bezier(0.22, 1, 0.36, 1),
    padding 480ms cubic-bezier(0.22, 1, 0.36, 1),
    border-radius 480ms cubic-bezier(0.22, 1, 0.36, 1),
    border-color 480ms ease,
    box-shadow 480ms ease;
}
html[data-function-scrolled="true"] .function-page #navbar {
  width: min(940px, calc(100% - 56px));
  padding-inline: 24px;
  border-color: var(--global-divider-color);
  border-radius: 40px;
  box-shadow: 0 7px 26px #1d112408;
}
.function-page #navbar .navbar-container {
  width: 100%;
  max-width: none;
  padding: 0;
  min-height: 62px;
}
.function-page #navbar .navbar-container-home .navbar-collapse-main {
  max-width: none;
  flex: 1 1 auto;
}
.function-page #navbar .navbar-menu-list {
  align-items: center;
  justify-content: flex-end;
  column-gap: var(--site-nav-gap);
  margin: 0;
  width: 100%;
}
.function-page #navbar .navbar-menu-list > li:first-child {
  margin-right: auto;
}
.function-page #navbar .navbar-menu-list .nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 0;
  font-size: 14px;
  color: var(--global-text-color);
  font-weight: 500;
  white-space: nowrap;
  text-decoration: none;
  transition: color 160ms ease;
}
.function-page #navbar .navbar-menu-list .active > .nav-link,
.function-page #navbar .navbar-menu-list .nav-link:hover {
  color: var(--global-theme-color);
}
.function-wordmark,
.function-mobile-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--global-text-color);
  font-size: 14px;
  font-weight: 600;
}
.function-wordmark > span,
.function-mobile-brand > span {
  font-family: Georgia, serif;
  font-size: 32px;
  font-weight: 500;
  line-height: 1.2;
  color: var(--global-theme-color);
}
.function-mobile-brand {
  display: none;
}
.function-page #navbar .dropdown-menu {
  min-width: 196px;
  padding: 6px;
  margin-top: 8px;
  border: 1px solid var(--global-divider-color);
  border-radius: 14px;
  background: var(--global-bg-color);
  box-shadow:
    0 12px 36px #17171c12,
    0 2px 6px #17171c05;
  text-align: left;
  transform-origin: top right;
}
.function-page #navbar .dropdown-menu.show {
  animation: function-menu-enter 170ms cubic-bezier(0.2, 0.7, 0.3, 1) both;
}
.function-page #navbar .dropdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 8px;
  background: transparent;
  color: var(--global-text-color);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  text-align: left;
  text-decoration: none;
  transition:
    background 150ms ease,
    color 150ms ease;
}
.function-page #navbar .function-menu-arrow {
  color: var(--global-text-color-light);
  font-size: 15px;
}
.function-page #navbar .dropdown-item:hover,
.function-page #navbar .dropdown-item:focus-visible,
.function-page #navbar .dropdown-item.active {
  background: var(--function-wash);
  color: var(--global-theme-color);
}
.function-page #navbar .dropdown-item:focus-visible {
  outline-offset: -2px;
}
.function-page #navbar .dropdown-toggle {
  gap: 4px;
}
.function-page #navbar .dropdown-toggle::after {
  display: none;
}
.function-page #navbar .dropdown-toggle .function-icon {
  width: 14px;
  height: 14px;
  transition: transform 160ms ease;
}
.function-page #navbar .dropdown-toggle[aria-expanded="true"] {
  color: var(--global-theme-color);
}
.function-page #navbar .dropdown-toggle[aria-expanded="true"] .function-icon {
  transform: rotate(180deg);
}
.function-icon {
  display: block;
  flex-shrink: 0;
}
.function-tools {
  flex: 0 0 auto;
}
.function-tools-group {
  display: flex;
  align-items: center;
  gap: 4px;
  padding-left: 14px;
  border-left: 1px solid var(--global-divider-color);
}
.function-page #navbar .function-control {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 10px;
  appearance: none;
  background: transparent;
  box-shadow: none;
  color: var(--global-text-color-light);
  font: inherit;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition:
    background 160ms ease,
    color 160ms ease;
}
.function-page #navbar .function-control:hover,
.function-page #navbar .function-control:focus-visible,
.function-page #navbar .function-control[aria-expanded="true"] {
  background: var(--function-wash);
  color: var(--global-theme-color);
}
.function-page #navbar .function-control:focus-visible {
  outline-offset: 3px;
  border-radius: 10px;
}
.function-control > span[id] {
  color: inherit;
  line-height: 0;
}
.function-control-label {
  font-weight: 500;
  display: none;
}
.function-control-tip {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  z-index: 1;
  padding: 7px 10px;
  border-radius: 7px;
  background: var(--global-text-color);
  color: var(--global-bg-color);
  font-size: 11px;
  font-weight: 400;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, -3px);
  transition:
    opacity 140ms ease,
    transform 140ms ease,
    visibility 140ms ease;
}
.function-control:hover .function-control-tip,
.function-control:focus-visible .function-control-tip {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
  transition-delay: 300ms;
}
.function-control[aria-expanded="true"] .function-control-tip {
  opacity: 0;
  visibility: hidden;
}
.function-page #navbar .navbar-toggler-main {
  display: none;
  width: 42px;
  height: 42px;
  padding: 10px;
  border-radius: 10px;
  border: 0;
  transition: background 160ms ease;
}
.function-page #navbar .navbar-toggler-main:hover,
.function-page #navbar .navbar-toggler-main:focus-visible {
  background: var(--function-wash);
}
.function-page #navbar .navbar-toggler-main .icon-bar {
  width: 20px;
  height: 1.5px;
  border-radius: 2px;
}
.function-page #site-inline-editor-toggle {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  border-color: var(--global-divider-color);
  background: var(--global-bg-color);
  box-shadow: 0 4px 16px #17171c0a;
}
.function-page #site-inline-editor-toggle:hover,
.function-page #site-inline-editor-toggle[aria-expanded="true"] {
  background: var(--function-wash);
  box-shadow: 0 4px 16px #17171c0a;
  color: var(--global-theme-color);
  transform: none;
}
.function-page .site-author-menu {
  padding: 6px;
  border-radius: 14px;
  background: var(--global-bg-color);
  box-shadow: 0 12px 36px #17171c12;
}
.function-page .site-author-menu > button,
.function-page .site-author-menu > a {
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
}
.function-page .site-author-menu > p {
  padding: 8px 12px;
  font-size: 11px;
  letter-spacing: 0;
}
.function-page .site-settings__icon-button {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}
@keyframes function-menu-enter {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.function-page #navbar:has(.navbar-collapse-main.show) {
  border-color: var(--global-divider-color);
  box-shadow: 0 7px 26px #1d112408;
}
.function-home a {
  color: inherit;
  text-decoration: none;
}
.function-home a:hover {
  color: var(--global-theme-color);
}
/* Inner pages share the type hierarchy while keeping their existing content and controls. */
.function-page .post-header {
  padding-top: 36px;
  margin-bottom: 38px;
}
.function-page .post-header .post-title {
  font-size: clamp(34px, 4.5vw, 52px);
  font-weight: 650;
  letter-spacing: -0.04em;
}
.function-page .post-header .post-description {
  max-width: 740px;
  font-size: 17px;
  line-height: 1.85;
  color: var(--global-text-color-light);
}
.function-page .blog-hero h1 {
  font-size: clamp(46px, 6vw, 68px);
  letter-spacing: -0.045em;
}
.function-page .blog-hero {
  padding-top: 42px;
  padding-bottom: 40px;
}
.function-page .blog-hero__meta {
  margin-top: 32px;
}
.function-page .blog-feature {
  background: none;
  border: 0;
  border-top: 3px solid var(--global-text-color);
  border-bottom: 1px solid var(--global-divider-color);
  border-radius: 0;
  padding: 28px 0;
}
.function-page .blog-feature:hover {
  transform: none;
}
.function-page .blog-feature__label {
  background: none;
  color: var(--global-theme-color);
  padding: 0;
  letter-spacing: 0;
}
.function-page .blog-feature h2 {
  margin: 26px 0 18px;
  font-size: clamp(25px, 3.4vw, 38px);
  line-height: 1.55;
}
.function-page .blog-feature__description {
  margin-bottom: 26px;
}
.function-page .blog-feature__number {
  display: none;
}
.function-page .post--article .post-title {
  font-family: var(--site-font-family);
  font-size: clamp(30px, 4.2vw, 49px);
  line-height: 1.5;
  letter-spacing: -0.035em;
  font-weight: 650;
}
.function-page .post--article #markdown-content :is(h2, h3, h4),
.function-page .post-footer-nav a {
  font-family: var(--site-font-family);
  font-weight: 600;
}
.function-page .post-hero__layout {
  display: block;
}
.function-page .post-trajectory {
  display: none;
}
.function-page .post-back-link {
  margin-bottom: 30px;
}
.function-page .post-reading-progress {
  top: 0;
}
.function-page .post--article #markdown-content h2::before {
  display: none;
}
.function-page .projects .card {
  border: 1px solid var(--global-divider-color);
  box-shadow: none;
  border-radius: 6px;
}
.function-page .projects .card-title {
  font-size: 21px;
  font-weight: 600;
}
@media (max-width: 991.98px) {
  .function-page > .container[role="main"] {
    width: calc(100% - 56px);
  }
  .function-page #navbar,
  html[data-function-scrolled="true"] .function-page #navbar {
    width: calc(100% - 40px);
    top: 8px;
    border-radius: 18px;
    padding: 0 18px;
  }
  .function-mobile-brand {
    display: inline-flex;
    text-decoration: none;
  }
  .function-page #navbar .navbar-container {
    flex-wrap: wrap;
    justify-content: space-between;
  }
  .function-page #navbar .navbar-toggler-main {
    display: block;
    padding: 10px;
  }
  .function-page #navbar .navbar-collapse-main {
    width: 100%;
    flex-basis: 100%;
    max-height: calc(100dvh - 110px);
    overflow-y: auto;
  }
  .function-page #navbar .navbar-menu-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 24px;
    padding: 14px 0 20px;
    align-items: start;
  }
  .function-page #navbar .navbar-menu-list > li:first-child {
    display: none;
  }
  .function-page #navbar .navbar-menu-list .nav-link {
    padding: 8px 0;
    font-size: 15px;
  }
  .function-page #navbar .dropdown-menu {
    position: static;
    border: 0;
    padding: 4px 0 0;
    margin: 0;
    min-width: 0;
    box-shadow: none;
    animation: none;
  }
  .function-page #navbar .dropdown-item {
    padding: 10px;
    min-height: 44px;
  }
  .function-page #navbar .toggle-container {
    padding: 8px 0;
  }
  .function-tools {
    grid-column: 1 / -1;
    width: 100%;
    margin-top: 10px;
  }
  .function-tools-group {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
    width: 100%;
    padding: 12px 0 0;
    border-left: 0;
    border-top: 1px solid var(--global-divider-color);
  }
  .function-page #navbar .function-control {
    gap: 9px;
    width: 100%;
    height: 44px;
  }
  .function-control-label {
    display: inline;
    color: inherit;
    font-size: 13px;
  }
  .function-control-tip {
    display: none;
  }
}
@media (max-width: 560px) {
  body.function-page {
    padding-top: 86px;
  }
  .function-page > .container[role="main"] {
    width: calc(100% - 40px);
    margin-bottom: 30px !important;
  }
  .function-page .post-header {
    padding-top: 25px;
  }
  .function-page .post--article .post-title {
    font-size: 29px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html[lang="zh-CN"] {
    scroll-behavior: auto;
  }
  .function-page #navbar,
  .function-directory-title > span,
  .function-page #navbar .nav-link,
  .function-page #navbar .function-control,
  .function-page #navbar .dropdown-toggle .function-icon,
  .function-page #navbar .navbar-toggler-main,
  .function-page #navbar .dropdown-item,
  .function-control-tip {
    transition: none;
  }
  .function-page #navbar .dropdown-menu.show {
    animation: none;
  }
}

.function-projects section {
  border-top: 3px solid var(--global-text-color);
  padding-top: 24px;
}
.function-projects section + section {
  border-top-width: 1px;
  margin-top: 40px;
}
.function-projects section > h2 {
  color: var(--global-theme-color);
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 14px;
}
.function-projects ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.function-project {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--global-divider-color);
  padding: 23px 0;
}
.function-project:last-child {
  border-bottom: 0;
}
.function-project h3 {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.5;
}
.function-project h3 a {
  color: var(--global-text-color);
  text-decoration: none;
}
.function-project h3 a:hover {
  color: var(--global-theme-color);
}
.function-project h3 span {
  color: var(--global-theme-color);
  font-size: 17px;
  margin-left: 10px;
}
.function-project p {
  color: var(--global-text-color-light);
  font-size: 15px;
  margin: 0;
  max-width: 720px;
}
.function-project-source {
  flex-shrink: 0;
  font-size: 13px;
}
@media (max-width: 560px) {
  .function-project {
    display: block;
    padding: 20px 0;
  }
  .function-project h3 {
    font-size: 21px;
  }
  .function-project-source {
    display: inline-block;
    margin-top: 12px;
  }
}
