body, code {
  font-family: var(--text-font);
}

.bottom-box, .centre-box {
  flex-direction: column;
  display: flex;
}

:root {
  --bg-color: #fff;
  --text-color: #333;
  --secondary-color: #999;
  --primary-color: green;
  --text-font: Microsoft YaHei UI, Microsoft YaHei, PingFang SC, Helvetica Neue, Hiragino Sans GB, Noto Sans, Tahoma, Arial, simsun, "sans-serif";
  --reverse-bg-color: #000;
  --code-bg-color: #f4f4f4;
  --halo-comment-widget-base-border-radius: 0;
  --halo-comment-widget-component-form-input-border-color-focus: tranparent;
  --halo-comment-widget-component-form-input-box-shadow-focus: 0 0 0 0 rgba(87, 85, 217, 0.2);
  --halo-comment-widget-component-form-button-submit-bg-color: var(--primary-color);
  --halo-comment-widget-component-form-button-submit-border-color: tranparent;
  --halo-comment-widget-base-font-size: 1.1rem;
  --halo-comment-widget-base-font-family: var(--text-font);
  --halo-comment-widget-base-color: var(--text-color);
  --halo-comment-widget-component-form-button-submit-color: #fff;
  --halo-comment-widget-base-line-height: 1.8;
}

[data-color-scheme="dark"] {
  --bg-color: #000;
  --text-color: #fff;
  --reverse-bg-color: #fff;
  --code-bg-color: #292929;
  --halo-comment-widget-component-form-button-submit-bg-color: #0d1731;
  --halo-comment-widget-component-form-button-submit-color: #fff;
}

[data-html-hidden] {
  visibility: hidden;
}

html {
  height: 100%;
  font-size: 16px;
}

body {
  width: 100%;
  background: var(--bg-color);
  color: var(--text-color);
  margin: auto;
  font-weight: lighter;
}

::selection {
  background-color: var(--primary-color);
  color: #fff;
}

@media screen and (max-width: 760px) {
  html {
    font-size: 14px;
  }
  
  body {
    font-weight: 400;
  }
  
  #header .nav-link {
    margin: 0 1rem !important;
  }
}

.centre-box {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80%;
}

.centre-box .section-title {
  display: flex;
  align-items: center;
}

.centre-box .section-title .sign {
  width: fit-content;
  height: fit-content;
  padding: 0.4rem;
  background-color: var(--primary-color);
  color: #fff;
  font-size: 0.8rem;
  margin-left: 1rem;
  margin-top: -2rem;
  text-transform: uppercase;
  font-weight: 700;
  text-shadow: 0 0 3px #000;
  border-radius: 0.6rem 1rem;
}

.centre-box .section-title .name {
  font-size: 3rem;
}

.centre-box .intro {
  max-width: 55%;
  font-size: 2rem;
  color: var(--secondary-color);
  line-height: 1.5;
}

.wrapper, img {
  max-width: 100%;
}

.centre-box .arrow-box {
  font-size: 3rem;
  color: var(--primary-color);
  text-align: left;
  animation: move 0.8s alternate infinite;
}

.bottom-box {
  align-items: center;
  justify-content: center;
  position: fixed;
  width: 100%;
  bottom: 0;
  margin-bottom: 1rem;
}

.flower, .light-box {
  position: absolute;
  user-select: none;
}

.copyright {
  text-align: center;
  color: var(--secondary-color);
  margin-bottom: 0.2rem;
}

#header .nav-link:hover, .copyright a, .year {
  color: var(--primary-color);
}

.flower {
  top: 5rem;
  left: -3px;
  width: 18rem;
  animation: swing 3s infinite alternate;
}

@keyframes swing {
  0% {
    transform: translateY(-4%);
  }
  50% {
    transform: translateY(8px);
  }
  100% {
    transform: translate(-4px);
  }
}

@media screen and (max-width: 760px) {
  .centre-box .name {
    font-size: 2.4rem;
  }
  
  .centre-box .intro {
    max-width: 100%;
    font-size: 1.2rem;
  }
  
  .centre-box .arrow-box {
    font-size: 2.4rem;
  }
}

@keyframes move {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-5px);
  }
}

.nav-box {
  display: flex;
}

.light-box {
  top: 20px;
  right: 30px;
  width: 1rem;
  height: 1rem;
  border-radius: 100%;
  background-color: var(--reverse-bg-color);
  cursor: pointer;
  z-index: 999;
}

.wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  background: 0 0;
  border: none;
  box-sizing: border-box;
  margin: 0 auto;
  padding: 8rem 2rem 6rem;
  width: 50rem;
  min-height: 100vh;
}

.year {
  display: inline-block;
  margin-bottom: 1rem;
  font-weight: bolder;
  font-style: italic;
  user-select: none;
}

#header {
  position: sticky;
  margin-bottom: 4rem;
  min-height: 2.4rem;
  background: var(--bg-color);
  top: 0;
  user-select: none;
  white-space: nowrap;
  overflow: auto;
  z-index: 666;
}

#header .nav-link {
  font-size: 1.3rem;
  margin: 0 2rem;
}

#header .nav-link:first-child {
  margin-left: 0 !important;
}

#header .nav-link:hover {
  text-shadow: 0 0 14px var(--primary-color);
}

.article {
  border-bottom: solid 1px var(--secondary-color);
  margin: 2rem 0;
  padding-bottom: 1rem;
}

.article-header {
  margin-bottom: 3rem;
  text-align: center;
}

.article-title {
  font-size: 2rem;
  font-weight: 400;
  letter-spacing: 0.05rem;
  margin-bottom: 0.25rem;
  text-transform: capitalize;
}

.article-entry {
  line-height: 1.5;
  margin-bottom: 1rem;
  letter-spacing: 1px;
}

.article-footer, .article-meta, .page-nav {
  color: var(--secondary-color);
  font-size: 1rem;
  height: auto;
  line-height: inherit;
  margin: 0;
  padding: 0;
}

@media all and (max-width: 760px) {
  .article-meta, .page-nav {
    font-size: 1rem;
  }
}

.article-date {
  line-height: 3rem;
}

.archives-wrap {
  position: relative;
  margin: 2rem 0;
  font-size: 1.5rem;
}

.archive-article {
  margin: 0.8rem 0;
  position: relative;
}

.archive-article-inner {
  display: inline-flex;
  font-size: 1.2rem;
}

.archive-article-inner .time {
  color: var(--secondary-color);
  min-width: 4rem;
}

.article h1::before, .article h2::before, .article-nav a:hover, .links .link-title, code {
  color: var(--primary-color);
}

.archive-article-date {
  position: absolute;
  right: calc(100% - 1.5rem);
}

.archive-article-title {
  flex: 1;
  font: inherit;
  left: 1rem;
  letter-spacing: 0;
  margin: 0;
  max-width: calc(100vw - 6rem);
  position: relative;
  text-align: left;
  text-decoration: none;
  text-transform: none;
}

.archive-article-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 3px;
  background-color: var(--primary-color);
  transition: width 0.35s cubic-bezier(0.5, 0, 0.5, 1);
}

.article-entry a, a img {
  transition-duration: 0.3s;
}

.archive-article-title:hover::after {
  width: 100%;
}

.article-nav {
  display: flex;
  margin: 2rem 0;
}

#article-nav-newer, #article-nav-older {
  flex-basis: 50%;
}

#article-nav-newer {
  order: 1;
  text-align: right;
}

#footer, .error-box, .page-nav {
  text-align: center;
}

.page-nav {
  margin: 2rem 0 1rem;
}

.extend, .page-number {
  font-size: 1.3rem;
  margin: 0 0.4rem;
}

blockquote, h1, h2, h3, h4, h5, h6, ol, p, ul {
  margin: 0 0 1rem;
}

* {
  margin: 0;
  padding: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

ol, ul {
  padding-left: 1rem;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 400;
  letter-spacing: 0.1rem;
  text-decoration: none;
}

.article h1::before, .article h2::before {
  content: "#";
  font-weight: 700;
  padding-right: 0.5rem;
}

h1 {
  font-size: 2rem;
  letter-spacing: 0;
  margin-top: 2rem;
}

h2 {
  font-size: 1.5rem;
}

h3, h4, h5, h6 {
  font-size: 1rem;
  font-weight: 700;
  margin-top: 1.5rem;
  text-transform: uppercase;
}

h4, h5, h6 {
  font-size: 0.9rem;
  margin-top: 1rem;
}

blockquote {
  display: block;
  padding-left: 0.75rem;
  border-left: 3px solid var(--primary-color);
}

.article em {
  word-break: break-word;
}

.katex {
  font-size: 1.1rem;
}

.article-entry a {
  border-bottom: 3px solid var(--primary-color);
  transition-property: border-bottom;
}

.article-entry a:hover {
  opacity: 0.8;
}

img {
  box-sizing: border-box;
  display: block;
  margin: 0 auto;
}

a img {
  border: 3px solid var(--bg-color);
  transition-property: border;
}

a img:hover {
  -webkit-transition-duration: 0.3s;
  -webkit-transition-property: border;
  border: 3px solid var(--secondary-color);
  transition-duration: 0.3s;
  transition-property: border;
}

table {
  margin: 1rem auto;
}

table caption, table td, table th, td, th {
  border-bottom: 1px solid var(--tertiary-color);
  padding: 0.25rem;
}

.links {
  margin-bottom: 3rem;
}

.links .link-title {
  position: relative;
  margin-bottom: 1rem;
  font-size: 1.2rem;
  text-transform: capitalize;
}

.links .link-box {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: space-between;
  font-size: 1.2rem;
}

.links .link-item {
  padding: 1rem;
}

.links .link-item:hover {
  opacity: 0.8;
}

#content {
  flex-grow: 1;
}

#footer {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: var(--secondary-color);
  margin-top: 1rem;
  font-size: 0.8rem;
  line-height: 1.5;
}

.error-box {
  margin-top: 5rem;
}

.error-box .status {
  font-size: 4rem;
  text-decoration: underline;
}

code {
  font-weight: 700;
}

pre {
  background-color: var(--code-bg-color);
  box-sizing: border-box;
  font-size: 1rem;
  margin-bottom: 1rem;
  overflow-x: auto;
  padding: 0.5rem;
}

pre code {
  font-weight: 400;
  color: unset;
}

pre:has(.hljs) {
  background-color: transparent;
  padding: 0;
}