/*
  PaperMod v8+
  License: MIT https://github.com/adityatelange/hugo-PaperMod/blob/master/LICENSE
  Copyright (c) 2020 nanxiaobei and adityatelange
  Copyright (c) 2021-2026 adityatelange
*/
*,
::after,
::before {
    box-sizing: border-box;
}

html {
    -webkit-tap-highlight-color: transparent;
    overflow-y: scroll;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

a,
button,
body,
h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--primary);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    font-size: 18px;
    line-height: 1.6;
    word-break: break-word;
    background: var(--theme);
}

article,
aside,
figcaption,
figure,
footer,
header,
hgroup,
main,
nav,
section,
table {
    display: block;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    line-height: 1.2;
}

h1,
h2,
h3,
h4,
h5,
h6,
p {
    margin-top: 0;
    margin-bottom: 0;
}

ul {
    padding: 0;
}

a {
    text-decoration: none;
}

body,
figure,
ul {
    margin: 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    overflow-x: auto;
    word-break: keep-all;
}

button,
input,
textarea {
    padding: 0;
    font: inherit;
    background: 0 0;
    border: 0;
}

input,
textarea {
    outline: 0;
}

button,
input[type=button],
input[type=submit] {
    cursor: pointer;
}

input:-webkit-autofill,
textarea:-webkit-autofill {
    box-shadow: 0 0 0 50px var(--theme) inset;
}

img {
    display: block;
    max-width: 100%;
}
:root {
    --gap: 24px;
    --content-gap: 20px;
    --nav-width: 1024px;
    --main-width: 720px;
    --header-height: 60px;
    --footer-height: 60px;
    --radius: 8px;
    --theme: rgb(17, 11, 24);
    --entry: rgb(17, 11, 24);
    --primary: rgb(246, 238, 252);
    --secondary: rgb(181, 163, 199);
    --tertiary: rgb(60, 39, 78);
    --content: rgb(228, 218, 238);
    --code-block-bg: rgb(28, 29, 33);
    --code-bg: rgb(31, 21, 42);
    --border: rgb(54, 37, 70);
    color-scheme: dark;
}

:root[data-theme="dark"] {
    --theme: rgb(29, 30, 32);
    --entry: rgb(46, 46, 51);
    --primary: rgb(218, 218, 219);
    --secondary: rgb(155, 156, 157);
    --tertiary: rgb(65, 66, 68);
    --content: rgb(196, 196, 197);
    --code-block-bg: rgb(46, 46, 51);
    --code-bg: rgb(55, 56, 62);
    --border: rgb(51, 51, 51);
    color-scheme: dark;
}

.list {
    background: var(--code-bg);
}

[data-theme="dark"] .list {
    background: var(--theme);
}
.header-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    max-width: calc(var(--nav-width) + var(--gap) * 2);
    margin: auto;
    line-height: var(--header-height);
    padding: 0 var(--gap);
    column-gap: var(--gap);
}

.header-nav a {
    display: block;
}

.logo,
.menu {
    display: flex;
}

.logo {
    align-items: center;
    column-gap: 0.55rem;
    flex-wrap: wrap;
}

.logo a {
    font-size: 24px;
    font-weight: 700;
    display: flex;
    align-items: center;
    column-gap: 0.55rem;
}

.logo a img,
.logo a svg {
    pointer-events: none;
    border-radius: 6px;
}

.theme-toggle {
    padding: 0 0.4rem;
}

[data-theme="dark"] .moon {
    display: none;
}

[data-theme="light"] .sun {
    display: none;
}

.logo-switches {
    display: inline-flex;
    gap: 0.4rem;
    align-items: inherit;
    min-height: stretch;
    flex-wrap: inherit;
}

.logo-switches>* {
    min-height: inherit;
    align-items: center;
    display: inline-flex;
}

.nav-sep {
    color: var(--secondary);
}

.lang-menu * {
    display: inherit;
    min-height: inherit;
    align-items: inherit;
}

.lang-menu a {
    font-size: 1rem;
    font-weight: 500;
    padding: 0 0.4rem;
    display: inline-flex
}

.menu {
    list-style: none;
    word-break: keep-all;
    overflow-x: auto;
    white-space: nowrap;
    column-gap: var(--gap);
}

.menu a {
    font-size: 16px;
}

.menu .active {
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 0.3rem;
    text-decoration-thickness: 2px;
}
.main {
    position: relative;
    min-height: calc(100vh - var(--header-height) - var(--footer-height));
    max-width: calc(var(--main-width) + var(--gap) * 2);
    margin: auto;
    padding: var(--gap);
}

.page-header h1 {
    font-size: 40px;
}

.pagination {
    display: flex;
}

.pagination a {
    color: var(--theme);
    font-size: 13px;
    line-height: 36px;
    background: var(--primary);
    border-radius: calc(36px / 2);
    padding: 0 16px;
}

.pagination .next {
    margin-inline-start: auto;
}


.social-icons a {
    display: inline-flex;
    padding: 10px;
}

.social-icons a svg {
    height: 26px;
    width: 26px;
}

code {
    direction: ltr;
}

div.highlight,
pre {
    position: relative;
}

.copy-code {
    display: none;
    position: absolute;
    top: 4px;
    right: 4px;
    color: rgba(255, 255, 255, 0.8);
    background: rgba(78, 78, 78, 0.8);
    border-radius: var(--radius);
    padding: 0 5px;
    font-size: 14px;
    user-select: none;
}

div.highlight:hover .copy-code,
pre:hover .copy-code {
    display: block;
}
.first-entry {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 320px;
    margin: var(--gap) 0 calc(var(--gap) * 2) 0;
}

.first-entry .entry-header {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.first-entry .entry-header h1 {
    font-size: 34px;
    line-height: 1.3;
}

.first-entry .entry-header h2 {
    font-size: 40px;
}

.first-entry .entry-content {
    margin: 14px 0;
    font-size: 16px;
    -webkit-line-clamp: 3;
}

.first-entry .entry-footer {
    font-size: 14px;
}

.home-info .entry-content {
    --content-gap: 0.5rem;
    -webkit-line-clamp: unset;
    margin: 0;
}

.home-info .social-icons a:first-of-type {
    padding-inline-start: 0;
}


.post-entry {
    position: relative;
    margin-bottom: var(--gap);
    padding: var(--gap);
    background: var(--entry);
    border-radius: var(--radius);
    transition: transform 0.25s ease;
    border: 1px solid var(--border);
}

.post-entry:hover,
.post-entry:focus-within {
    transform: translateY(-2px);
    border-color: var(--tertiary);
}

.tag-entry .entry-cover {
    display: none;
}

.entry-header h2 {
    font-size: 24px;
    line-height: 1.3;
}

.entry-content {
    margin: 8px 0;
    color: var(--secondary);
    font-size: 14px;
    line-height: 1.6;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.home-info .entry-content p {
    margin-block-start: 1em;
    margin-block-end: 1em;
}

.entry-footer {
    color: var(--secondary);
    font-size: 13px;
}

.entry-link {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    border-radius: var(--radius);
}

.entry-hint {
    color: var(--secondary);
}

.entry-hint-parent {
    display: flex;
    justify-content: space-between;
}

.entry-cover {
    font-size: 14px;
    margin-bottom: var(--gap);
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.entry-cover img {
    border-radius: var(--radius);
    width: 100%;
    height: auto;
}

.entry-cover a {
    text-underline-offset: 0.3rem;
    text-decoration: underline;
}
.page-header,
.post-header {
    margin: 24px auto var(--content-gap) auto;
}

.post-title {
    font-size: 40px;
}

.post-description {
    margin-top: 10px;
}

.post-meta {
    margin-top: 5px;
}

.post-meta,
.breadcrumbs {
    color: var(--secondary);
    font-size: 14px;
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.2rem;
}

.breadcrumbs a {
    font-size: 16px;
}

.breadcrumbs svg {
    height: 1em;
}

.i18n_list {
    display: inline-flex;
}

.post-meta .i18n_list li {
    list-style: none;
    margin: auto 3px;
}

.post-meta a,
.toc a:hover {
    text-underline-offset: 0.3rem;
    text-decoration: underline;
}

.post-meta a {
    color: var(--secondary);
    text-decoration-style: dotted;
}

details.toc {
    margin-bottom: var(--content-gap);
    background: var(--code-bg);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

[data-theme="dark"] details.toc {
    background: var(--entry);
}

details.toc summary {
    padding: 0.3rem 1.2rem;
    border-radius: var(--radius);
}

details summary {
    cursor: pointer;
    display: list-item;
    width: 100%;
    margin-inline-start: 0;
    user-select: none;
}

details .title {
    display: inline;
    font-weight: 500;
    margin-inline-start: 0.2rem;
}

details {
    interpolate-size: allow-keywords;
}

details::details-content {
    height: 0;
    opacity: 0;
    overflow: clip;
    transition: height 150ms ease,
        opacity 150ms ease,
        content-visibility 150ms allow-discrete;
}

details[open]::details-content {
    height: auto;
    opacity: 1;
}

details .inner {
    margin: 0 2.4rem;
    padding-bottom: 0.6rem;
}

details li ul {
    margin-inline-start: var(--gap);
}

.post-content {
    color: var(--content);
    margin: 30px 0;
}

.post-footer {
    margin-top: var(--content-gap);
}

.post-footer>* {
    margin-bottom: 10px;
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.post-tags li {
    display: inline-block;
}

.post-tags a,
.share-buttons,
.paginav {
    border-radius: var(--radius);
    background: var(--code-bg);
    border: 1px solid var(--border);
}

.post-tags a {
    display: block;
    padding: 0 14px;
    color: var(--secondary);
    font-size: 14px;
    line-height: 34px;
    background: var(--code-bg);
}

.post-tags a:hover,
.paginav a:hover {
    background: var(--border);
}

.share-buttons {
    padding: 10px;
    display: flex;
    justify-content: center;
    overflow-x: auto;
    gap: 10px;
}

.share-buttons li,
.share-buttons a {
    display: inline-flex;
}

.share-buttons a:not(:last-of-type) {
    margin-inline-end: 12px;
}

.paginav {
    display: flex;
    line-height: 1.2;
}

.paginav .title {
    letter-spacing: 1px;
    text-transform: uppercase;
    font-size: 0.8rem;
    color: var(--secondary);
}

.paginav a {
    width: 50%;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.8rem;
    border-radius: var(--radius);
}

.paginav span:hover:not(.title) {
    text-underline-offset: 0.2rem;
    text-decoration: underline;
}

.paginav .next {
    margin-inline-start: auto;
    text-align: right;
}

[dir="rtl"] .paginav .next {
    text-align: left;
}

h1>a>svg {
    display: inline;
}
.md-content h3,
.md-content h4,
.md-content h5,
.md-content h6 {
    margin: 24px 0 16px;
}

.md-content h1 {
    margin: 40px auto 32px;
    font-size: 40px;
}

.md-content h2 {
    margin: 32px auto 24px;
    font-size: 32px;
}

.md-content h3 {
    font-size: 24px;
}

.md-content h4 {
    font-size: 16px;
}

.md-content h5 {
    font-size: 14px;
}

.md-content h6 {
    font-size: 12px;
}

.md-content a:not(.anchor) {
    text-underline-offset: 0.3rem;
    text-decoration: underline;
}

.md-content del {
    text-decoration: line-through;
}

.md-content dl:not(:last-child),
.md-content ol:not(:last-child),
.md-content p:not(:last-child),
.md-content figure:not(:last-child),
.md-content ul:not(:last-child) {
    margin-bottom: var(--content-gap);
}

.md-content ol,
.md-content ul {
    padding-inline-start: 1.25rem;
}

.md-content li {
    margin-top: 0.3rem;
}

.md-content li p {
    margin-bottom: 0;
}

.md-content dl {
    display: flex;
    flex-wrap: wrap;
    margin: 0;
}

.md-content dt {
    width: 25%;
    font-weight: 700;
}

.md-content dd {
    width: 75%;
    margin-inline-start: 0;
    padding-inline-start: 10px;
}

.md-content dd~dd,
.md-content dt~dt {
    margin-top: 10px;
}

.md-content table {
    margin-bottom: var(--content-gap);
}

.md-content table th,
.md-content table:not(.highlight table, .gist .highlight) td {
    min-width: 80px;
    padding: 6px 13px;
    line-height: 1.5;
    border: 1px solid var(--border);
}

.md-content table th {
    text-align: start;
}

.md-content table td code:only-child {
    margin: auto 0;
}

.md-content .highlight table {
    border-radius: var(--radius);
}

.md-content .highlight:not(table) {
    margin-bottom: var(--content-gap);
    background: var(--code-block-bg) !important;
    border-radius: var(--radius);
    direction: ltr;
}

.md-content .highlight pre {
    margin: 0;
}

.post-content code {
    padding: 0.2rem 0.3rem;
    font-size: 0.78em;
    line-height: 1.5;
    background: var(--code-bg);
    border-radius: 0.2rem;
}

.md-content pre code {
    display: grid;
    margin: auto 0;
    padding: 10px;
    color: rgb(213, 213, 214);
    background: var(--code-block-bg) !important;
    border-radius: var(--radius);
    overflow-x: auto;
    word-break: break-all;
}

.md-content blockquote {
    margin: 1rem 0;
    padding-inline-start: 1rem;
    border-inline-start: 0.3rem solid var(--content);
}

.md-content hr {
    margin: 30px 0;
    height: 2px;
    background: var(--tertiary);
    border: 0;
}

.md-content iframe {
    max-width: 100%;
}

.md-content img {
    border-radius: var(--radius);
    margin: 1rem 0;
}

.md-content img[src*="#center"] {
    margin: 1rem auto;
}

.md-content figure.align-center {
    text-align: center;
}

.md-content figure>figcaption {
    color: var(--primary);
    font-size: 16px;
    font-weight: bold;
    margin: 8px 0 16px;
}

.md-content figure>figcaption>p {
    color: var(--secondary);
    font-size: 14px;
    font-weight: normal;
}

.md-content h1:hover .anchor,
.md-content h2:hover .anchor,
.md-content h3:hover .anchor,
.md-content h4:hover .anchor,
.md-content h5:hover .anchor,
.md-content h6:hover .anchor {
    display: inline-flex;
    color: var(--secondary);
    margin-inline-start: 0.5em;
    font-weight: 500;
    user-select: none;
}

.anchor:hover {
    color: var(--content) !important;
}

.md-content img.in-text {
    display: inline;
    margin: auto;
}

mark {
    border-radius: 2px;
    padding: 0 2px;
}

audio {
    display: block;
    width: 100%;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    height: 2.5rem;
    margin-bottom: var(--content-gap);
}

audio::-webkit-media-controls-enclosure {
    border-radius: 0;
}

video {
    border: 1px solid var(--code-bg);
    border-radius: var(--radius);
    max-width: 100%;
}
.footer,
.top-link {
    font-size: 12px;
    color: var(--secondary);
}

.footer {
    max-width: calc(var(--main-width) + var(--gap) * 2);
    margin: auto;
    padding: calc((var(--footer-height) - var(--gap)) / 2) var(--gap);
    text-align: center;
    line-height: 24px;
}

.footer span {
    margin-inline-start: 1px;
    margin-inline-end: 1px;
}

.footer span:last-child {
    white-space: nowrap;
}

.footer a {
    color: inherit;
    text-underline-offset: 0.25rem;
    text-decoration: underline;
}

.top-link {
    position: fixed;
    bottom: 4rem;
    right: 2rem;
    z-index: 99;
    background: var(--tertiary);
    width: 2.5rem;
    height: 2.5rem;
    padding: 10px;
    border-radius: 64px;
    transition: visibility .3s, opacity .3s cubic-bezier(0.4, 0, 1, 1);
}

.hidden {
    visibility: hidden;
    opacity: 0;
}

.top-link,
.top-link svg {
    filter: drop-shadow(0px 0px 0px var(--theme));
}

.footer a:hover,
.top-link:hover {
    color: var(--primary);
}
.terms-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 1em;
    margin-top: var(--content-gap);
}

.terms-tags li {
    display: inline-block;
    font-weight: 500;
}

.terms-tags a {
    display: block;
    padding: 4px 10px;
    background: var(--tertiary);
    border-radius: var(--radius);
    transition: transform 0.1s;
}
.buttons,
.main .profile {
    display: flex;
    justify-content: center;
}

.main .profile {
    align-items: center;
    min-height: calc(100vh - var(--header-height) - var(--footer-height) - (var(--gap) * 2));
    text-align: center;
}

.profile .profile_inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.profile img {
    border-radius: 50%;
}

.buttons {
    flex-wrap: wrap;
    max-width: 400px;
    gap: 1rem;
}

.button {
    background: var(--tertiary);
    border-radius: var(--radius);
    padding: 0.4rem 0.8rem;
}
.not-found {
    position: absolute;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 80%;
    font-size: 160px;
    font-weight: 700;
}
@media screen and (max-width: 768px) {
    /* theme-vars */
    :root {
        --gap: 14px;
    }

    /* profile-mode */
    .profile img {
        transform: scale(0.85);
    }

    /* post-entry */
    .first-entry {
        min-height: 260px;
    }

    /* archive */
    .archive-month {
        flex-direction: column;
    }

    .archive-year {
        margin-top: 20px;
    }

    /* footer */
    .footer {
        padding: calc((var(--footer-height) - var(--gap) - 10px) / 2) var(--gap);
    }
}

/* footer */
@media screen and (max-width: 900px) {
    .list .top-link {
        transform: translateY(-5rem);
    }
}

@media screen and (max-width: 340px) {
    .share-buttons {
        justify-content: unset;
    }
}

@media (prefers-reduced-motion) {
    /* terms; profile-mode; post-single; post-entry; post-entry; search; search */
    .terms-tags a:active,
    .button:active,
    .post-entry:active,
    .top-link,
    .searchResults .focus,
    .searchResults li:active {
        transform: none;
    }
}
