
/* 侧边栏个人信息卡片动态渐变色 */
#aside-content>.card-widget.card-info{
    background: linear-gradient(-45deg, rgba(255, 225, 245, 0.6), 
rgba(255, 225, 225, 0.9), 
rgba(225, 255, 251, 0.9), 
rgba(255, 225, 255, 0.6));
}
[data-theme=dark] #aside-content>.card-widget.card-info {
    background: linear-gradient(-45deg, rgb(225, 238, 255), 
    rgba(225, 255, 253, 0.9), 
    rgba(225, 243, 255, 0.9), 
    rgba(255, 225, 253, 0.6));
}
/* 侧边栏公告栏卡片渐变色 */
#aside-content>.card-widget.card-announcement{
    background: linear-gradient(-45deg, rgba(255, 225, 245, 0.6), 
    rgba(255, 225, 225, 0.9), 
    rgba(225, 255, 251, 0.9), 
    rgba(255, 225, 255, 0.6));
}
[data-theme=dark] #aside-content>.card-widget.card-announcement{
    background: linear-gradient(-45deg, rgba(255, 225, 245, 0.6), 
    rgba(255, 225, 225, 0.9), 
    rgba(225, 255, 251, 0.9), 
    rgba(255, 225, 255, 0.6));
}
/* 侧边栏目录最新文章卡片渐变色 */
#aside-content>.sticky_layout>.card-widget{
    background: linear-gradient(-45deg, rgba(255, 225, 245, 0.6), 
    rgba(255, 225, 225, 0.9), 
    rgba(225, 255, 251, 0.9), 
    rgba(255, 225, 255, 0.6));
}
[data-theme=dark] #aside-content>.sticky_layout>.card-widget{
    background: linear-gradient(-45deg, rgba(255, 225, 245, 0.6), 
    rgba(255, 225, 225, 0.9), 
    rgba(225, 255, 251, 0.9), 
    rgba(255, 225, 255, 0.6));
}
/* 个人信息Follow me按钮 
#aside-content>.card-widget.card-info>#card-info-btn {
    background-color: #bcdedf;
    border-radius: 8px;
}*/

/*文章页面*/
/* .layout>#post {
    background: linear-gradient(-45deg, rgba(225, 255, 252, 0.8), 
rgba(255, 225, 229, 0.9), 
rgba(225, 255, 225, 0.9), 
rgba(253, 255, 225, 0.8));
}
[data-theme=dark] .layout>#post {
    background: linear-gradient(-45deg, rgba(24,40,72,.2), 
rgba(35,37,58,.9), 
rgba(35,37,58,.9), 
rgba(24,40,72,.2));
} */
/*主页文章预览页面
#recent-posts>.recent-post-item{
    background: linear-gradient(-45deg, rgba(225, 255, 252, 0.8), 
    rgba(255, 225, 229, 0.9), 
    rgba(225, 255, 225, 0.9), 
    rgba(253, 255, 225, 0.8));
}
[data-theme=dark] #recent-posts>.recent-post-item{
    background: linear-gradient(-45deg, rgba(24,40,72,.2), 
rgba(35,37,58,.9), 
rgba(35,37,58,.9), 
rgba(24,40,72,.2));
}*/
 
/*分类页面
.layout>#page {
    background: linear-gradient(-45deg, rgba(225,235,255,.8), 
rgba(225,235,255,.9), 
rgba(225,235,255,.9), 
rgba(225,235,255,.8));
}
[data-theme=dark] .layout>#page {
    background: linear-gradient(-45deg, rgba(24,40,72,.2), 
rgba(35,37,58,.9), 
rgba(35,37,58,.9), 
rgba(24,40,72,.2));
}*/

/* 确保顶部图片不被遮挡 */
header, #header {
    position: relative;
    z-index: 100;
}

/* Keep desktop nav dropdown above page cards/background overlays. */
#page-header,
#page-header #nav {
    overflow: visible;
}

#page-header #nav,
#page-header #menus,
#page-header #menus .menus_items,
#page-header #menus .menus_item {
    z-index: 1000;
}

#page-header #menus .menus_item_child {
    z-index: 1001;
    pointer-events: auto;
}

/* 避免其他背景色覆盖顶部 */
body {
    background-color: transparent !important;
}
#web_bg {
    background-color: transparent !important;
}

/* Footer: keep only author name */
#footer .framework-info {
    display: none !important;
}
#footer .copyright {
    visibility: hidden; /* hide original text like ©2019 - 2025 By ... */
}
#footer .copyright::after {
    content: "Samsāra";
    visibility: visible;
}

/* Use cover image as page background (remove white blocks) */
#content-inner,
#recent-posts {
    background: transparent !important;
}

.layout > #post,
.layout > #page,
.layout > #archive {
    background: rgba(255, 255, 255, 0.82) !important;
    backdrop-filter: blur(2px);
}

html[data-theme=dark] .layout > #post,
html[data-theme=dark] .layout > #page,
html[data-theme=dark] .layout > #archive {
    background: rgba(26, 28, 36, 0.86) !important;
    backdrop-filter: blur(2px);
}

/* Dark mode: deepen overall tone */
[data-theme=dark] #web_bg::before {
    content: "";
    position: fixed;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.55);
    pointer-events: none;
    z-index: 0;
}

[data-theme=dark] #aside-content>.card-widget,
[data-theme=dark] #aside-content>.sticky_layout>.card-widget,
[data-theme=dark] #aside-content>.card-widget.card-info,
[data-theme=dark] #aside-content>.card-widget.card-announcement{
    background: rgba(26, 28, 36, 0.78) !important;
    color: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.06);
}
[data-theme=dark] #aside-content .card-widget a{
    color: #cbd5ff;
}
[data-theme=dark] #aside-content .card-widget .item-headline,
[data-theme=dark] #aside-content .card-widget .item-title{
    color: rgba(255, 255, 255, 0.92);
}

/* Post page uses cover as background with extra overlay for readability */
.use-post-bg #web_bg {
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
}
.use-post-bg #web_bg::before {
    content: "";
    position: fixed;
    left: 0; right: 0; top: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    pointer-events: none;
    z-index: 0;
}
html[data-theme=dark] .use-post-bg #web_bg::before {
    background: rgba(0, 0, 0, 0.7);
}

/* 提升正文可读性：为文章主体增加半透明底与轻微模糊 */
.use-post-bg #post {
    background: rgba(255, 255, 255, 0.82) !important;
    backdrop-filter: blur(2px);
}
html[data-theme=dark] .use-post-bg #post {
    background: rgba(26, 28, 36, 0.86) !important;
    backdrop-filter: blur(2px);
}

/* General pages (archives / categories / tags / links / about) use cover as background */
.use-page-bg #web_bg {
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
}
.use-page-bg #web_bg::before {
    content: "";
    position: fixed;
    left: 0; right: 0; top: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    pointer-events: none;
    z-index: 0;
}
html[data-theme=dark] .use-page-bg #web_bg::before {
    background: rgba(0, 0, 0, 0.7);
}
.use-page-bg #archive,
.use-page-bg #page {
    background: rgba(255, 255, 255, 0.82) !important;
    backdrop-filter: blur(2px);
}
html[data-theme=dark] .use-page-bg #archive,
html[data-theme=dark] .use-page-bg #page {
    background: rgba(26, 28, 36, 0.86) !important;
    backdrop-filter: blur(2px);
}

/* Friend links: site name color - light: black, dark: white */
.type-link .site-card .info .title { color: #111111 !important; }
html[data-theme=dark] .type-link .site-card .info .title { color: #ffffff !important; }

/* Root about page: remove the standalone page banner and lift the intro */
#body-wrap.type-about-home {
    position: relative;
}

#body-wrap.type-about-home::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    background: rgba(0, 0, 0, 0.5);
    pointer-events: none;
}

html[data-theme=dark] #body-wrap.type-about-home::before {
    background: rgba(0, 0, 0, 0.7);
}

#body-wrap.type-about-home > header,
#body-wrap.type-about-home > main,
#body-wrap.type-about-home > footer {
    position: relative;
    z-index: 1;
}

/* Keep the entire navigation above the content stacking context. */
#body-wrap.type-about-home > header {
    z-index: 2;
}

#body-wrap.type-about-home #page-header.not-top-img {
    margin-bottom: 0;
    background: transparent !important;
}

#body-wrap.type-about-home #page-header .title-seo {
    display: none;
}

#body-wrap.type-about-home #page-header.not-top-img #nav {
    background: rgba(28, 30, 42, 0.28);
    box-shadow: none;
    backdrop-filter: blur(6px);
}

#body-wrap.type-about-home #page-header.not-top-img #nav a,
#body-wrap.type-about-home #page-header.not-top-img #nav span.site-page,
#body-wrap.type-about-home #page-header.not-top-img #nav .site-name {
    color: var(--light-grey);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, .3);
}

#body-wrap.type-about-home #content-inner {
    padding-top: 24px;
}

#body-wrap.type-about-home #page {
    background: rgba(255, 255, 255, 0.82) !important;
    backdrop-filter: blur(2px);
}

#body-wrap.type-about-home #page > .page-title {
    display: none;
}

html[data-theme=dark] #body-wrap.type-about-home #page {
    background: rgba(26, 28, 36, 0.86) !important;
    backdrop-filter: blur(2px);
}

@media screen and (max-width: 768px) {
    #body-wrap.type-about-home #content-inner {
        padding-top: 16px;
    }
}

/* Layout Width Override */
.layout {
    max-width: 1400px !important;
}

/* Keep normal pagination as a fallback until the article feed is ready. */
#recent-posts.is-infinite-feed > #pagination {
    display: none;
}

#recent-posts .post-feed-status {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px 16px;
    min-height: 64px;
    padding: 16px;
    border-radius: 8px;
    background: var(--card-bg);
    color: var(--font-color);
    font-size: 14px;
    text-align: center;
}

#recent-posts .post-feed-button {
    padding: 6px 15px;
    border-radius: 5px;
    background: var(--btn-bg);
    color: var(--btn-color);
    font: inherit;
    cursor: pointer;
}

#recent-posts .post-feed-button:hover {
    background: var(--btn-hover-color);
}

#recent-posts .post-feed-button:focus-visible {
    outline: 2px solid var(--font-color);
    outline-offset: 3px;
}

#recent-posts .post-feed-button:disabled {
    opacity: 0.65;
    cursor: wait;
}

#recent-posts .post-feed-button[hidden] {
    display: none;
}

/* Home profile and year-by-year competition record. */
#body-wrap.type-about-home #page {
    --home-muted: #64717c;
    --home-accent: #2d6274;
    --home-line: rgba(63, 100, 116, 0.22);
    padding: 42px 44px 38px;
}

#body-wrap.type-about-home #article-container #home-intro-title {
    margin: 0 0 22px;
    padding: 0;
    font-size: 30px;
    letter-spacing: -0.025em;
    line-height: 1.4;
}

#body-wrap.type-about-home #article-container .home-greeting,
#body-wrap.type-about-home #article-container .home-role,
#body-wrap.type-about-home #article-container .home-status {
    margin: 0 0 9px;
    font-size: 14px;
    line-height: 1.9;
}

#body-wrap.type-about-home #article-container .home-contacts {
    display: flex;
    flex-wrap: wrap;
    gap: 5px 22px;
    margin: 20px 0 0;
    padding: 0;
    list-style: none;
    font-size: 13px;
}

#body-wrap.type-about-home #article-container .home-contacts li {
    display: flex;
    gap: 7px;
    margin: 0;
    padding: 0;
}

#body-wrap.type-about-home .home-contact-label {
    color: var(--home-muted);
}

#body-wrap.type-about-home .home-contacts a {
    overflow-wrap: anywhere;
}

#body-wrap.type-about-home .home-honors {
    margin-top: 36px;
    padding-top: 28px;
    border-top: 1px solid var(--home-line);
}

#body-wrap.type-about-home #article-container #home-honors-title {
    margin: 0 0 26px;
    padding: 0;
    font-size: 22px;
    line-height: 1.5;
}

#body-wrap.type-about-home .home-year-group {
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr);
    column-gap: 24px;
}

#body-wrap.type-about-home .home-year-group + .home-year-group {
    margin-top: 24px;
}

#body-wrap.type-about-home #article-container .home-year {
    margin: 0;
    padding: 13px 0 0;
    color: var(--home-accent);
    font-family: ui-monospace, 'Cascadia Code', Consolas, monospace;
    font-size: 20px;
    font-weight: 500;
    letter-spacing: -0.035em;
    line-height: 1.6;
}

#body-wrap.type-about-home #article-container .home-honors-list {
    margin: 0;
    padding: 0 0 0 25px;
    border-left: 1px solid var(--home-line);
    list-style: none;
}

#body-wrap.type-about-home #article-container .home-honors-list li {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 5px 24px;
    margin: 0;
    padding: 16px 8px 16px 0;
    line-height: 1.6;
}

#body-wrap.type-about-home #article-container .home-honors-list li::before {
    content: '';
    position: absolute;
    left: -29px;
    top: 50%;
    width: 7px;
    height: 7px;
    border: 1px solid var(--home-accent);
    border-radius: 50%;
    background: var(--card-bg);
    transform: translateY(-50%);
}

#body-wrap.type-about-home .home-event {
    color: var(--text-highlight-color);
    font-size: 16px;
    font-weight: 600;
    overflow-wrap: anywhere;
}

#body-wrap.type-about-home .home-event-detail {
    margin-left: 8px;
    color: var(--home-muted);
    font-size: 13px;
    font-weight: 400;
    white-space: nowrap;
}

#body-wrap.type-about-home .home-result {
    color: var(--home-accent);
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

#body-wrap.type-about-home .home-placement {
    display: inline-flex;
    align-items: baseline;
    justify-content: flex-end;
    gap: 11px;
}

#body-wrap.type-about-home .home-rank {
    font-family: ui-monospace, 'Cascadia Code', Consolas, monospace;
    font-size: 28px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.06em;
    line-height: 1.15;
}

#body-wrap.type-about-home .home-rank-ordinal {
    margin-left: 2px;
    font-size: 0.46em;
    font-weight: 500;
    letter-spacing: -0.02em;
    vertical-align: super;
}

#body-wrap.type-about-home .home-scope {
    color: var(--home-muted);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.08em;
}

/* Keep the complete placement available to screen readers. */
#body-wrap.type-about-home .home-result-text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

html[data-theme=dark] #body-wrap.type-about-home #page {
    --home-muted: #a7b5c0;
    --home-accent: #9ccedb;
    --home-line: rgba(148, 182, 195, 0.26);
}

@media screen and (max-width: 1100px) {
    #body-wrap.type-about-home .home-year-group {
        grid-template-columns: 56px minmax(0, 1fr);
        column-gap: 16px;
    }

    #body-wrap.type-about-home #article-container .home-honors-list li {
        column-gap: 14px;
    }
}

@media screen and (max-width: 600px) {
    #body-wrap.type-about-home #page {
        padding: 30px 24px;
    }

    #body-wrap.type-about-home #article-container #home-intro-title {
        font-size: 27px;
    }

    #body-wrap.type-about-home .home-year-group {
        grid-template-columns: 45px minmax(0, 1fr);
        column-gap: 15px;
    }

    #body-wrap.type-about-home #article-container .home-year {
        font-size: 17px;
        padding-top: 12px;
    }

    #body-wrap.type-about-home #article-container .home-honors-list {
        padding-left: 19px;
    }

    #body-wrap.type-about-home #article-container .home-honors-list li {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 3px 12px;
        padding: 12px 0;
    }

    #body-wrap.type-about-home #article-container .home-honors-list li::before {
        left: -23px;
        top: 21px;
    }

    #body-wrap.type-about-home .home-event {
        font-size: 15px;
    }

    #body-wrap.type-about-home .home-result {
        font-size: 13px;
    }

    #body-wrap.type-about-home .home-result-role {
        grid-column: 1 / -1;
    }

    #body-wrap.type-about-home .home-placement {
        flex-direction: column-reverse;
        align-items: flex-end;
        gap: 0;
    }

    #body-wrap.type-about-home .home-scope {
        font-size: 9px;
    }

    #body-wrap.type-about-home .home-rank {
        font-size: 24px;
    }
}
