/*
 * Oyster
 * A wide, reading-first Hexo theme. Typography, spacing and colors follow the
 * public Matrix67 theme stylesheet; only the content width is intentionally
 * expanded for modern screens.
 */

:root {
  --oyster-text: #404040;
  --oyster-title: #333333;
  --oyster-link: #0075c9;
  --oyster-link-hover: #009bdf;
  --oyster-muted: #c8c8c8;
  --oyster-rule: #eeeeee;
  --oyster-code-bg: #f6f6f6;
  --oyster-code-text: #2f3337;
  --oyster-code-border: #e3e6e8;
  --oyster-code-gutter-bg: #f0f1f2;
  --oyster-code-gutter-text: #9aa1a8;
  --oyster-page-width: 1040px;
  --oyster-outline-step: 1.5rem;
}

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

html {
  font-family: sans-serif;
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
}

body,
button,
input,
select,
textarea {
  color: var(--oyster-text);
  font-family: "Helvetica Neue", Arial, "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.6;
}

body {
  margin: 0;
  background: #ffffff;
}

::selection {
  color: #ffffff;
  background: var(--oyster-link-hover);
}

:focus-visible {
  outline: 2px solid var(--oyster-link-hover);
  outline-offset: 3px;
}

#page {
  position: relative;
  display: flex;
  width: min(88vw, var(--oyster-page-width));
  min-height: 100vh;
  margin-inline: auto;
  flex-direction: column;
}

.site-header {
  position: relative;
  padding-top: 2em;
}

.site-title {
  margin: 0.67em 0;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
}

.site-title a,
.site-title a:visited {
  color: var(--oyster-link);
}

.site-title a:hover,
.site-title a:focus,
.site-title a:active {
  color: var(--oyster-link-hover);
}

.site-description {
  margin: -0.8em 0 1.5em;
  color: var(--oyster-muted);
}

.site-navigation {
  position: absolute;
  top: 4em;
  right: 0;
  display: flex;
  gap: 1.35em;
  align-items: center;
}

.site-navigation a,
.site-navigation a:visited {
  color: var(--oyster-muted);
}

.site-navigation a:hover,
.site-navigation a:focus,
.site-navigation a:active {
  color: var(--oyster-link-hover);
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  border: 0;
  white-space: nowrap;
}

.site-search {
  position: absolute;
  top: 4em;
  right: 0;
  display: flex;
  align-items: center;
}

.site-search .search-field {
  position: relative;
  z-index: 1;
  width: 28px;
  min-width: 0;
  height: 30px;
  margin: 0 -28px 0 0;
  padding: 3px;
  border: 1px solid transparent;
  border-radius: 4px;
  opacity: 0;
  background: #ffffff;
  color: var(--oyster-text);
  font: inherit;
  cursor: pointer;
  transition: width 180ms ease, margin-right 180ms ease, opacity 160ms ease;
}

.site-search:hover .search-field,
.site-search:focus-within .search-field {
  width: 220px;
  margin-right: 0.45em;
  padding: 3px 0.55em;
  border-color: var(--oyster-muted);
  opacity: 1;
  cursor: text;
}

.site-search .search-field:focus {
  border-color: var(--oyster-link-hover);
  outline: 0;
}

.site-search .search-submit {
  position: relative;
  width: 28px;
  height: 30px;
  padding: 4px;
  border: 0;
  background: transparent;
  color: var(--oyster-muted);
  cursor: pointer;
}

.site-search .search-submit svg {
  display: block;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.8;
}

.site-search:hover .search-submit,
.site-search .search-submit:hover,
.site-search .search-submit:focus {
  color: var(--oyster-link-hover);
}

.site-content {
  flex: 1 0 auto;
  width: 100%;
  margin-right: auto;
  margin-left: auto;
  margin-top: 1.5em;
}

a {
  color: var(--oyster-link);
  text-decoration: none;
}

a:visited {
  color: var(--oyster-link);
}

a:hover,
a:focus,
a:active {
  color: var(--oyster-link-hover);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  clear: both;
  color: var(--oyster-title);
}

p {
  margin: 0 0 1.5em;
}

b,
strong {
  font-weight: 700;
}

dfn,
cite,
i {
  font-style: italic;
}

small {
  font-size: 75%;
}

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

sup {
  bottom: 1ex;
}

sub {
  top: 0.5ex;
}

hr {
  height: 1px;
  margin: 0 0 1.5em;
  border: 0;
  background: #cccccc;
}

img,
video {
  max-width: 100%;
  height: auto;
}

.entry-content img {
  display: block;
  margin-right: auto;
  margin-left: auto;
}

figure {
  margin: 0 0 1.5em;
}

.entry-content figure:not(.highlight) {
  text-align: center;
}

.entry-content figcaption {
  margin-top: 0.55em;
  color: var(--oyster-muted);
  font-size: 14px;
  text-align: center;
}

.hentry {
  margin: 0 0 3em;
}

.post-summary {
  margin-bottom: 2.75em;
  padding-bottom: 2.75em;
  border-bottom: 1px solid var(--oyster-rule);
}

.post-summary .entry-header {
  margin-bottom: 1.25em;
}

.post-summary .entry-title {
  font-size: 28px;
}

.post-summary .entry-content {
  margin-left: 2em;
  padding-left: 1.25em;
  border-left: 2px solid var(--oyster-rule);
}

.post-summary .entry-content h1 {
  font-size: 21px;
}

.post-summary .entry-content h2 {
  font-size: 19px;
}

.post-summary .entry-content h3 {
  font-size: 17px;
}

.entry-header {
  margin: 0 0 2em;
}

.entry-title {
  margin: 0.67em 0;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.35;
}

.entry-title a,
.entry-title a:visited {
  color: var(--oyster-title);
}

.entry-title a:hover,
.entry-title a:focus,
.entry-title a:active {
  color: var(--oyster-link-hover);
}

.entry-meta,
.entry-meta a,
.entry-meta a:visited,
.entry-footer,
.entry-footer a,
.entry-footer a:visited {
  color: var(--oyster-muted);
}

.entry-meta a:hover,
.entry-meta a:focus,
.entry-footer a:hover,
.entry-footer a:focus {
  color: var(--oyster-link-hover);
}

.entry-content {
  font-size: 16px;
  line-height: 1.6;
  overflow-wrap: break-word;
}

.entry-content h1 {
  margin: 1.6em 0 0.8em;
  font-size: 24px;
}

.entry-content h2 {
  margin: 1.55em 0 0.8em;
  font-size: 22px;
}

.entry-content h3 {
  margin: 1.5em 0 0.75em;
  font-size: 20px;
}

.entry-content h4,
.entry-content h5,
.entry-content h6 {
  margin: 1.4em 0 0.7em;
  font-size: 18px;
}

.entry-content > h1 {
  margin-left: 0;
}

.entry-content > h2 {
  margin-left: var(--oyster-outline-step);
}

.entry-content > h3 {
  margin-left: calc(var(--oyster-outline-step) + var(--oyster-outline-step));
}

.entry-content > h4,
.entry-content > h5,
.entry-content > h6 {
  margin-left: calc(var(--oyster-outline-step) + var(--oyster-outline-step) + var(--oyster-outline-step));
}

.markdown-section-body {
  min-width: 0;
}

.markdown-section-body[data-depth="1"] {
  margin-left: var(--oyster-outline-step);
}

.markdown-section-body[data-depth="2"] {
  margin-left: calc(var(--oyster-outline-step) + var(--oyster-outline-step));
}

.markdown-section-body[data-depth="3"] {
  margin-left: calc(var(--oyster-outline-step) + var(--oyster-outline-step) + var(--oyster-outline-step));
}

.post-summary .entry-content > :first-child,
.post-detail .entry-content > :first-child {
  margin-top: 0;
}

.entry-content ul,
.entry-content ol {
  margin: 1.5em 0;
  padding-left: 2em;
}

.entry-content ul {
  list-style: disc;
}

.entry-content ol {
  list-style: decimal;
}

.entry-content li {
  margin-bottom: 0.5em;
}

.entry-content li > ul,
.entry-content li > ol {
  margin: 0.5em 0 0;
}

.entry-content blockquote {
  display: block;
  margin: 0 0 1.5em 2em;
  padding: 1.5em 1em 0;
  border-top: 1px solid var(--oyster-rule);
  border-bottom: 1px solid var(--oyster-rule);
  font-family: "Palatino Linotype", "Book Antiqua", Palatino, STKaiti, KaiTi, serif;
}

.entry-content em {
  color: inherit;
  font-style: italic;
}

.entry-content del,
.entry-content s {
  color: #777777;
}

.entry-content mark {
  padding: 0.08em 0.2em;
  background: #fff4b8;
  color: inherit;
}

.entry-content abbr[title] {
  cursor: help;
  text-decoration: underline dotted;
  text-underline-offset: 0.18em;
}

.entry-content dl {
  margin: 0 0 1.5em;
}

.entry-content dt {
  font-weight: 700;
}

.entry-content dd {
  margin: 0.35em 0 1em 2em;
}

.entry-content details {
  margin: 0 0 1.5em;
  padding: 0.8em 1em;
  border: 1px solid var(--oyster-rule);
  background: #fcfcfc;
}

.entry-content summary {
  cursor: pointer;
  font-weight: 700;
}

.entry-content li:has(input[type="checkbox"]) {
  list-style: none;
}

.entry-content input[type="checkbox"] {
  margin: 0 0.5em 0 0;
  accent-color: var(--oyster-link);
  vertical-align: -0.08em;
}

code,
kbd,
tt,
var,
pre {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-variant-ligatures: none;
}

code,
kbd,
tt,
var {
  font-size: 15px;
}

:not(pre) > code {
  padding: 0.08em 0.3em;
  border-radius: 2px;
  background: #f5f5f5;
}

.entry-content kbd {
  display: inline-block;
  min-width: 1.7em;
  padding: 0.08em 0.4em;
  border: 1px solid #d8d8d8;
  border-bottom-width: 2px;
  border-radius: 3px;
  background: #f7f7f7;
  font-size: 13px;
  line-height: 1.35;
  text-align: center;
}

pre {
  margin: 0 0 1.5em;
  padding: 1.5em 1em 1.5em 2em;
  overflow-x: auto;
  border: 1px solid var(--oyster-code-border);
  border-radius: 3px;
  background: var(--oyster-code-bg);
  color: var(--oyster-code-text);
  font-size: 12px;
  line-height: 1.6;
  white-space: pre;
}

pre code {
  padding: 0;
  background: transparent;
  font-size: inherit;
}

.highlight {
  margin: 0 0 1.5em;
  overflow-x: auto;
  border: 1px solid var(--oyster-code-border);
  border-radius: 3px;
  background: var(--oyster-code-bg);
  color: var(--oyster-code-text);
}

.entry-content .highlight table {
  display: table;
  width: 100%;
  min-width: max-content;
  margin: 0;
  border: 0;
  border-collapse: collapse;
  table-layout: auto;
  font-size: inherit;
  text-align: left;
}

.entry-content .highlight tbody,
.entry-content .highlight tr,
.entry-content .highlight td {
  margin: 0;
  border: 0;
  padding: 0;
  text-align: left;
  vertical-align: top;
}

.highlight pre {
  margin: 0;
  border: 0;
  background: transparent;
}

.highlight .gutter {
  width: auto;
  min-width: 3.75em;
  border-right: 1px solid var(--oyster-code-border);
  background: var(--oyster-code-gutter-bg);
  color: var(--oyster-code-gutter-text);
  white-space: nowrap;
  user-select: none;
}

.highlight .gutter pre {
  padding: 1.5em 0.85em;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.highlight .gutter .line {
  display: inline;
}

.highlight .code {
  width: auto;
  min-width: 0;
}

.highlight .code pre {
  padding: 1.5em 1em;
}

/*
 * Syntax palette adapted from Highlight.js' official StackOverflow Light
 * theme. Hexo emits unprefixed classes while `highlight.hljs` is false, so
 * each rule also retains its standard `hljs-` counterpart.
 */
.highlight .subst,
.highlight .formula,
.highlight .operator,
.highlight .params,
.highlight .property,
.highlight .punctuation,
.highlight .tag,
.hljs-subst,
.hljs-formula,
.hljs-operator,
.hljs-params,
.hljs-property,
.hljs-punctuation,
.hljs-tag {
  color: var(--oyster-code-text);
}

.highlight .comment,
.hljs-comment {
  color: #656e77;
}

.highlight .keyword,
.highlight .selector-tag,
.highlight .meta .keyword,
.highlight .doctag,
.highlight .section,
.highlight .attr,
.highlight .selector-class,
.highlight .meta,
.highlight .selector-pseudo,
.hljs-keyword,
.hljs-selector-tag,
.hljs-meta .hljs-keyword,
.hljs-doctag,
.hljs-section,
.hljs-attr,
.hljs-selector-class,
.hljs-meta,
.hljs-selector-pseudo {
  color: #015692;
}

.highlight .attribute,
.hljs-attribute {
  color: #803378;
}

.highlight .name,
.highlight .type,
.highlight .number,
.highlight .selector-id,
.highlight .quote,
.highlight .template-tag,
.highlight .built_in,
.highlight .title,
.highlight .title.class_,
.highlight .title.function_,
.highlight .literal,
.hljs-name,
.hljs-type,
.hljs-number,
.hljs-selector-id,
.hljs-quote,
.hljs-template-tag,
.hljs-built_in,
.hljs-title,
.hljs-title.class_,
.hljs-title.function_,
.hljs-literal {
  color: #b75501;
}

.highlight .string,
.highlight .regexp,
.highlight .symbol,
.highlight .variable,
.highlight .variable.language_,
.highlight .variable.constant_,
.highlight .template-variable,
.highlight .link,
.highlight .selector-attr,
.highlight .meta .string,
.hljs-string,
.hljs-regexp,
.hljs-symbol,
.hljs-variable,
.hljs-variable.language_,
.hljs-variable.constant_,
.hljs-template-variable,
.hljs-link,
.hljs-selector-attr,
.hljs-meta .hljs-string {
  color: #54790d;
}

.highlight .bullet,
.highlight .code .code,
.hljs-bullet,
.hljs-code {
  color: #535a60;
}

.highlight .emphasis,
.hljs-emphasis {
  font-style: italic;
}

.highlight .strong,
.hljs-strong {
  font-weight: 700;
}

.highlight .addition,
.hljs-addition {
  color: #2f6f44;
  background: #eaf4ed;
}

.highlight .deletion,
.hljs-deletion {
  color: #c02d2e;
  background: #fbeaea;
}

.entry-content .katex-display {
  max-width: 100%;
  margin: 1.5em auto;
  overflow-x: auto;
  overflow-y: hidden;
  text-align: center;
}

.entry-content .katex-display > .katex {
  display: inline-block;
  text-align: initial;
}

.entry-content .footnotes {
  margin-top: 3em;
  padding-top: 1em;
  border-top: 1px solid var(--oyster-rule);
  font-size: 14px;
}

.entry-content .footnotes ol {
  margin: 0.75em 0 0;
}

.entry-content [data-footnote-ref] {
  margin: 0 0.08em;
  font-size: 0.78em;
}

.entry-content [data-footnote-backref] {
  margin-left: 0.35em;
}

.entry-content .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  border: 0;
  white-space: nowrap;
}

.entry-content table {
  width: 100%;
  margin: 0 0 1.5em;
  border-collapse: collapse;
  table-layout: auto;
  font-size: 14px;
  text-align: left;
}

.entry-content table,
.entry-content th,
.entry-content td {
  border: 1px solid var(--oyster-muted);
}

.entry-content th,
.entry-content td {
  padding: 0.55em 0.7em;
}

.entry-content th {
  font-weight: 700;
}

.article-more-link {
  margin-bottom: 0;
}

.more-link::after {
  content: "";
}

.entry-footer {
  margin-top: 2em;
  padding-top: 0;
  border-top: 0;
}

.entry-footer .tag-links + .entry-meta {
  margin-top: 0.35em;
}

.search-page-header {
  margin-bottom: 1.5em;
}

.search-page-title {
  margin: 0.67em 0 0.35em;
  font-size: 24px;
  line-height: 1.35;
}

.search-page-description,
.search-status {
  color: var(--oyster-muted);
}

.search-page-description {
  margin-bottom: 0;
}

.search-page-form {
  display: flex;
  width: min(100%, 680px);
  margin-bottom: 0.75em;
}

.search-page-field {
  min-width: 0;
  padding: 0.55em 0.75em;
  flex: 1 1 auto;
  border: 1px solid var(--oyster-muted);
  border-radius: 3px 0 0 3px;
  background: #ffffff;
  color: var(--oyster-text);
  font: inherit;
}

.search-page-field:focus {
  border-color: var(--oyster-link-hover);
  outline: 0;
}

.search-page-submit {
  padding: 0.55em 1.1em;
  border: 1px solid var(--oyster-muted);
  border-left: 0;
  border-radius: 0 3px 3px 0;
  background: #ffffff;
  color: var(--oyster-link);
  font: inherit;
  cursor: pointer;
}

.search-page-submit:hover,
.search-page-submit:focus {
  color: var(--oyster-link-hover);
}

.search-status {
  min-height: 1.6em;
  margin-bottom: 2em;
}

.search-results .search-result:last-child {
  margin-bottom: 0;
}

.search-result mark {
  padding: 0 0.08em;
  background: var(--oyster-rule);
  color: inherit;
  font-weight: 700;
}

.search-empty {
  margin: 1.5em 0 3em;
  color: var(--oyster-muted);
}

.navigation {
  margin: 0 0 1.5em;
  overflow: hidden;
}

.nav-links {
  display: flex;
  gap: 0.5em;
  align-items: center;
  justify-content: flex-start;
}

.nav-links a,
.nav-links a:visited {
  display: block;
  padding: 0 5px;
  text-align: center;
}

.paging-navigation .nav-links {
  display: block;
  overflow: hidden;
}

.paging-navigation .nav-previous {
  float: left;
}

.paging-navigation .nav-next {
  float: right;
}

.paging-navigation .nav-links a,
.post-nav-links a {
  min-width: 70px;
  max-width: 250px;
  overflow: hidden;
  background: var(--oyster-link-hover);
  color: #ffffff;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a:focus {
  background: var(--oyster-link);
  color: #ffffff;
}

.post-navigation {
  padding-top: 1em;
  border-top: 1px solid var(--oyster-rule);
}

.post-nav-links {
  justify-content: space-between;
}

.archive-header {
  margin-bottom: 2.5em;
}

.taxonomy-list ul {
  padding-left: 1.5em;
}

.taxonomy-list li {
  margin-bottom: 0.75em;
}

.category-list-count {
  margin-left: 0.35em;
  color: var(--oyster-muted);
}

.category-list-count::before {
  content: "(";
}

.category-list-count::after {
  content: ")";
}

.tag-cloud {
  display: flex;
  gap: 0.8em 1.2em;
  flex-wrap: wrap;
}

.tag-cloud a {
  font-size: 14px !important;
}

.site-footer {
  flex: 0 0 auto;
  margin-top: 2em;
  padding-bottom: 0.5em;
  color: var(--oyster-text);
  text-align: center;
}

.site-info {
  font-size: 14px;
}

@media only screen and (max-width: 767px) {
  :root {
    --oyster-outline-step: 0.75rem;
  }

  #page {
    width: 90%;
  }

  .site-header {
    padding-top: 1.2em;
  }

  .site-title {
    margin-bottom: 0.45em;
  }

  .site-navigation {
    position: static;
    gap: 1em;
    flex-wrap: wrap;
    margin-bottom: 1.5em;
  }

  .site-search {
    top: 2.7em;
  }

  .site-search:hover .search-field,
  .site-search:focus-within .search-field {
    width: min(58vw, 220px);
  }

  .site-content {
    margin-top: 0;
  }

  .entry-header {
    margin-bottom: 1.5em;
  }

  .post-summary {
    margin-bottom: 2.25em;
    padding-bottom: 2.25em;
  }

  .post-summary .entry-title {
    font-size: 25px;
  }

  .post-summary .entry-content {
    margin-left: 0.75em;
    padding-left: 0.9em;
  }

  .entry-content blockquote {
    margin-left: 0;
  }

  .entry-content table {
    display: block;
    overflow-x: auto;
    table-layout: auto;
    white-space: nowrap;
  }

  .site-footer {
    margin-top: 1em;
  }
}
