assets/css/partials/article.scss
.hr-line {
  margin: 12px $article-padding + 16px;
  opacity: 0.3;
  height: 4px;
  background-image: linear-gradient(to right, var(--red-0) 50%, transparent 0%);
  background-size: 50px 4px;
  background-repeat: repeat-x;
  filter: drop-shadow(0px 0px 2px var(--red-1));
  transition:
    opacity 0.3s,
    color 0.3s;

  &:hover {
    opacity: 0.5;
  }

  @media #{$mg-normal} {
    margin: 12px 16px;
  }
}

.article-inner {
  background: var(--color-wrap);
  border-radius: $post-radius;
  display: flow-root;
  transition: 0.3s;
}

.article-meta {
  display: flex;
  flex-direction: column;
  padding: $article-padding $article-padding + 16px 0;

  @media #{$mg-normal} {
    padding: $article-padding 16px 0;
  }
}

.article-summary {
  margin: 0 0 $article-padding 0 !important;
}

@mixin article-meta-tag {
  text-decoration: none;
  text-transform: uppercase;
  font-size: 14px;
  color: var(--red-1);
  background: var(--red-5);
  border-radius: $tag-radius;
  padding: 10px 20px;
  margin: 0 12px 16px 0;
  box-shadow: var(--shadow-meta);
  transition: 0.3s;
}

.article-date {
  display: flex;
}

.article-date-link {
  @include article-meta-tag;

  &:before {
    margin-right: 8px;
  }
}

.article-category {
  display: flex;
  flex-wrap: wrap;
}

.article-category-link {
  @include article-meta-tag;

  &:before {
    font-weight: 700;
    margin-right: 8px;
  }
}

.article-entry {
  @include base-style;
  @include clearfix;
  overflow: hidden;
  color: var(--color-default);
  padding: 0 $article-padding + 16px;

  @media #{$mg-normal} {
    padding: 0 16px;
  }

  p,
  table {
    line-height: $line-height;
    margin: 16px 0;
  }

  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    font-weight: bold;
    line-height: $line-height-title;
    margin: $line-height-title 0 0.75em;

    @if $icon_font {
      &:before {
        font-family: $font-icon;
        font-weight: normal;
      }

      a {
        font-family: $font-icon;
        opacity: 0.5;
        margin-right: 4px;
        transition: 0.3s;

        &:hover {
          opacity: 0.8;
          text-decoration: none !important;
        }
      }
    } @else {
      &:before {
        font-family: var(--font-icon);
        font-weight: normal;
      }

      a {
        font-family: var(--font-icon);
        opacity: 0.5;
        margin-right: 4px;
        transition: 0.3s;

        &:hover {
          opacity: 0.8;
          text-decoration: none !important;
        }
      }
    }
  }

  h2 {
    margin-bottom: 40px;
  }

  a {
    color: var(--color-link);
    text-decoration: none;
    word-break: break-word;

    &:hover {
      text-decoration: underline;
    }
  }

  a:not(
      h1 a,
      h2 a,
      h3 a,
      h4 a,
      h5 a,
      h6 a,
      .code-figcaption-bottom a,
      .post-link-card a,
      .friend-item-wrap a,
      :has(code),
      a.article-gallery-item
    ),
  .code-figcaption-bottom.has-link a {
    &::after {
      @if $icon_font {
        font-family: $font-icon;
        content: "\e639";
      } @else {
        font-family: var(--font-icon);
        content: "\f0c1";
      }
      font-size: 0.5em;
      margin: 0 0.5em;
      vertical-align: middle;
      font-style: normal;
    }
  }

  a:not(h1 a, h2 a, h3 a, h4 a, h5 a, h6 a, .code-figcaption-bottom a) {
    code::after {
      @if $icon_font {
        font-family: $font-icon;
        content: "\e639";
      } @else {
        font-family: var(--font-icon);
        content: "\f0c1";
      }
      font-size: 0.5em;
      margin: 0 0.5em;
      vertical-align: middle;
      font-style: normal;
    }
  }

  li {
    margin: 4px 0;
    &:hover {
      &::marker {
        transition: color 0.2s;
        color: var(--red-1);
      }
    }
  }

  img {
    opacity: 0;
    transition: 0.3s;
  }

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

  img.lazyloaded {
    opacity: 1;
    animation: blur 0.8s ease-in-out forwards;
  }

  iframe {
    border: none;
  }

  table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
  }

  th {
    font-weight: bold;
    border-bottom: 3px solid var(--color-border);
    padding-bottom: 8px;
  }

  td {
    border-bottom: 1px solid var(--color-border);
    padding: 8px 0;
  }

  blockquote {
    background: var(--red-5-5);
    border-left: 6px var(--red-4) solid;
    margin: 28px 0;
    border-radius: $post-radius;
    transition: 0.3s;
    display: flow-root;
    padding: 0 12px;
    box-shadow: var(--shadow-meta);

    &:hover {
      box-shadow: var(--shadow-meta-hover);
    }

    footer {
      font-size: $font-size;
      margin: 24px 0;

      cite {
        &:before {
          content: "—";
          padding: 0 8px;
        }
      }
    }
  }

  details {
    padding: 16px 12px;
    border-radius: $post-radius;
    background-color: var(--red-5-5);
    box-shadow: var(--shadow-meta);
    transition: 0.3s;

    &:hover {
      box-shadow: var(--shadow-meta-hover);
    }
  }

  summary {
    font-size: 1.1em;
    font-weight: bold;
    cursor: var(--cursor-pointer) !important;
    padding: 8px;
    border: none;
    border-radius: $tag-radius;
    transition: 0.3s;
  }

  summary:hover {
    background-color: var(--red-5);
  }

  details[open] summary {
    background-color: var(--red-5);
  }

  details[open] summary:hover {
    background-color: var(--red-5);
  }

  details p {
    margin: 20px 0 0;
    padding: 12px;
    background-color: var(--color-footer-background);
    border-radius: $tag-radius;
    transition: 0.3s;
  }
}

.article-more-link a {
  display: inline-block;
  line-height: 1;
  padding: 10px 20px;
  border-radius: $tag-radius;
  background: var(--red-5);
  color: var(--red-1);
  text-decoration: none;
  box-shadow: var(--shadow-meta);
  transition: 0.3s;

  &:after {
    margin-right: 0 !important;
  }

  &:hover {
    background: var(--color-link);
    color: #fff;
    text-decoration: none;
  }
}

.article-footer {
  @include clearfix;
  font-size: 14px;
  margin: 0 $article-padding + 16px $article-padding;

  @media #{$mg-normal} {
    margin: 0 16px $article-padding;
  }

  &:hover &:before {
    opacity: 0.5;
  }

  &:before {
    content: "";
    display: block;
    margin-top: 12px;
    opacity: 0.3;
    height: 4px;
    background-image: linear-gradient(
      to right,
      var(--red-0) 50%,
      transparent 0%
    );
    background-size: 50px 4px;
    background-repeat: repeat-x;
    filter: drop-shadow(0px 0px 2px var(--red-1));
    transition: 0.3s;
  }

  a {
    text-decoration: none;
  }
}

.article-tag-list-link,
.article-comment-link,
.article-visitor-link {
  color: var(--red-1);
  margin-top: $article-padding;
}

.article-tag-list-item {
  float: left;
  text-decoration: none;
  text-transform: uppercase;
  background: var(--red-5);
  border-radius: $tag-radius;
  padding: 8px 16px;
  margin-top: $article-padding;
  margin-right: 12px;
  box-shadow: var(--shadow-meta);
}

.article-tag-list-link {
  &:before {
    margin-right: 8px;
  }
}

.article-comment-link {
  float: right;
  background: var(--red-5);
  margin-left: 12px;
  border-radius: $tag-radius;
  padding: 8px 16px;

  &:before {
    margin-right: 8px;
  }
}

.article-visitor-link {
  float: right;
  font-size: 14px;
  background: var(--red-5);
  border-radius: $tag-radius;
  margin-left: 12px;
  padding: 8px 16px;
}

#article-nav {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  border-radius: $post-radius;
  overflow: hidden;

  @media #{$mq-normal} {
    flex-direction: row;
  }
}

.article-nav-link-wrap {
  color: white;
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 20px;
  opacity: 0.9;
  transition: opacity 0.3s;
  height: 150px;
  min-height: 150px;
  flex-shrink: 0;

  a,
  img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    filter: brightness(70%);
  }

  img {
    display: block;
    opacity: 0;
    object-fit: cover;
    z-index: -1;
  }

  img.lazyloaded {
    opacity: 1;
  }

  &:hover {
    opacity: 1;
  }

  &.right {
    align-items: flex-end;
  }
}

.article-nav-caption {
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: bold;
  text-shadow: 0 0 0.5rem rgba(0, 0, 0, 0.7);
}

.article-nav-title {
  font-size: 20px;
  line-height: 1.2;
  margin-top: 16px;
  text-shadow: 0 0 0.5rem rgba(0, 0, 0, 0.7);
  -webkit-line-clamp: 3;
  line-clamp: 3;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-gallery {
  position: relative;
}

.article-gallery-photos {
  position: relative;
  overflow: hidden;
}

.article-gallery-img {
  display: none;
  max-width: 100%;

  &:first-child {
    display: block;
  }

  &.loaded {
    position: absolute;
    display: block;
  }

  img {
    display: block;
    max-width: 100%;
    margin: 0 auto;
  }
}

.katex-display {
  overflow-x: auto;
  overflow-y: hidden;
  &::-webkit-scrollbar {
    display: none;
  }
}

.katex {
  width: calc(100% - 2px);
}

.katex-html {
  padding: 4px;
  .base {
    margin: 0 auto;
  }
}

.katex-html:has(span.tag) {
  display: flex !important;
}

.katex-display > .katex > .katex-html > .tag {
  position: relative !important;
  float: right;
  margin-left: 0.25rem;
}

mjx-container {
  display: inline-grid;
  overflow-x: auto;
  overflow-y: hidden;
  max-width: 100%;
  min-width: auto !important;
  &::-webkit-scrollbar {
    display: none;
  }
}
