

:root {
    --bg: #f7f4ed;
    --bg-soft: #f0ede5;
    --paper: #fbf9f4;

    --text: #26231f;
    --text-secondary: #6d675f;
    --text-muted: #918a80;

    --accent: #d45d3f;
    --accent-hover: #a94731;

    --border: #d8d2c8;
    --border-light: #e5dfd5;

    --serif:
        "Noto Serif SC",
        "Source Han Serif SC",
        "Songti SC",
        Georgia,
        "Times New Roman",
        serif;

    --sans:
        "Noto Serif SC",
        "Source Han Serif SC",
        "Songti SC",
        Georgia,
        "Times New Roman",
        serif;

    --mono:
        "SFMono-Regular",
        "Cascadia Code",
        "JetBrains Mono",
        Consolas,
        monospace;

    --content-width: 760px;
    --page-width: 1180px;
}


/* =========================================================
   Global
   ========================================================= */

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);

    font-family: var(--serif);
    font-size: 17px;
    line-height: 1.8;

    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

* {
    box-sizing: border-box;
}

::selection {
    background: #e8c7b8;
    color: var(--text);
}


/* =========================================================
   Links
   ========================================================= */

a {
    color: inherit;
    text-decoration-color: rgba(38, 35, 31, 0.35);
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;

    transition:
        color 0.15s ease,
        text-decoration-color 0.15s ease;
}

a:hover {
    color: var(--accent);
    text-decoration-color: var(--accent);
}


/* =========================================================
   Main page
   ========================================================= */

#home {
    width: min(var(--page-width), calc(100% - 48px));
    margin: 0 auto;

    background: transparent;
}


/* =========================================================
   Header
   ========================================================= */

#header {
    position: relative;

    margin: 0;
    padding: 52px 0 30px;

    background: transparent;
    border: none;
}

#blogTitle {
    margin: 0;
    padding: 0;
}

#blogTitle h1 {
    margin: 0;

    font-family: var(--serif);
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.05;
    font-weight: 500;
    letter-spacing: -0.035em;
}

#blogTitle h1 a {
    color: var(--text);
    text-decoration: none;
}

#blogTitle h1 a:hover {
    color: var(--accent);
}

#blogTitle h2 {
    max-width: 620px;

    margin: 14px 0 0;
    padding: 0;

    color: var(--text-secondary);

    font-family: var(--serif);
    font-size: 17px;
    line-height: 1.6;
    font-weight: 400;
}


/* =========================================================
   Navigation
   ========================================================= */

#navigator {
    min-height: auto;

    margin: 0 0 60px;
    padding: 15px 0;

    background: transparent;

    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

#navList {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 28px;

    margin: 0;
    padding: 0;

    list-style: none;
}

#navList li {
    margin: 0;
    padding: 0;
}

#navList a {
    display: inline-block;

    padding: 4px 0;

    color: var(--text-secondary);

    font-family: var(--sans);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.03em;

    text-decoration: none;
}

#navList a:hover {
    color: var(--accent);
}


/* =========================================================
   Layout
   ========================================================= */

#main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 250px;
    gap: 90px;

    width: 100%;

    background: transparent;
}

#mainContent {
    float: none;

    width: 100%;
    min-width: 0;

    margin: 0;
    padding: 0;

    background: transparent;
}

.forFlow {
    margin: 0;
}


/* =========================================================
   Sidebar
   ========================================================= */

#sideBar {
    float: none;

    width: auto;

    margin: 0;
    padding: 4px 0;

    font-family: var(--sans);
}

#sideBarMain {
    width: auto;
}

#sideBar h3,
.catListTitle,
#sidebar_news .catListTitle {
    margin: 0 0 14px;
    padding: 0 0 9px;

    background: transparent;

    border: none;
    border-bottom: 1px solid var(--border);

    color: var(--text);

    font-family: var(--sans);
    font-size: 12px;
    font-weight: 650;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

#sideBar ul {
    margin: 0 0 34px;
    padding: 0;

    list-style: none;
}

#sideBar li {
    margin: 0 0 9px;
    padding: 0;
}


#sideBar a {
    color: var(--text-secondary);

    font-size: 13px;
    line-height: 1.55;

    text-decoration: none;
}

#sideBar a:hover {
    color: var(--accent);
}



/* =========================================================
   Post list
   ========================================================= */

.day {
    margin: 0;
    padding: 0;
}

.dayTitle {
    display: inline-block;

    margin: 0 0 24px;
    padding: 0;

    color: var(--text-muted);

    font-family: var(--sans);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.post {
    margin: 0 0 58px;
    padding: 0 0 52px;

    background: transparent;

    border: none;
    border-bottom: 1px solid var(--border);
    box-shadow: none;
}

.postTitle {
    margin: 0 0 18px;
    padding: 0;

    border: none;

    font-family: var(--serif);
    font-size: clamp(27px, 3.5vw, 40px);
    line-height: 1.16;
    font-weight: 500;
    letter-spacing: -0.025em;
}

.postTitle a {
    color: var(--text);
    text-decoration: none;
}

.postTitle a:hover {
    color: var(--accent);
}

.postCon {
    padding: 0;
}

.c_b_p_desc {
    margin: 0;

    color: var(--text-secondary);

    font-family: var(--serif);
    font-size: 16px;
    line-height: 1.85;
}

.c_b_p_desc_readmore {
    margin-left: 6px;

    color: var(--accent);

    font-family: var(--sans);
    font-size: 12px;

    white-space: nowrap;
}

.postDesc {
    margin-top: 22px;

    color: var(--text-muted);

    font-family: var(--sans);
    font-size: 11px;
    line-height: 1.6;
}


/* =========================================================
   Article page
   ========================================================= */

#topics {
    background: transparent;
}

#topics .post {
    max-width: var(--content-width);

    margin: 0;
    padding-bottom: 20px;

    border: none;
}

#topics .postTitle {
    margin-bottom: 20px;

    font-size: clamp(36px, 5vw, 58px);
    line-height: 1.08;
}


/* =========================================================
   Article typography
   ========================================================= */

.postBody {
    color: var(--text);

    font-family: var(--serif);
    font-size: 17px;
    line-height: 1.9;

    word-break: normal;
}

.postBody p {
    margin: 0 0 1.35em;
}

.postBody h1,
.postBody h2,
.postBody h3,
.postBody h4,
.postBody h5,
.postBody h6 {
    color: var(--text);

    font-family: var(--serif);
    font-weight: 500;

    letter-spacing: -0.025em;
}

.postBody h1 {
    margin: 2em 0 0.7em;

    font-size: 36px;
    line-height: 1.2;
}

.postBody h2 {
    margin: 2.2em 0 0.75em;

    font-size: 29px;
    line-height: 1.25;
}

.postBody h3 {
    margin: 2em 0 0.65em;

    font-size: 22px;
    line-height: 1.35;
}

.postBody h4 {
    margin: 1.8em 0 0.6em;

    font-family: var(--sans);
    font-size: 15px;
    line-height: 1.4;
    font-weight: 650;
}

.postBody strong {
    font-weight: 650;
}

.postBody em {
    color: #514a43;
}


/* =========================================================
   Article links
   ========================================================= */

.postBody a {
    color: var(--accent);

    text-decoration: underline;
    text-decoration-color: rgba(212, 93, 63, 0.4);
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
}

.postBody a:hover {
    color: var(--accent-hover);
    text-decoration-color: var(--accent-hover);
}


/* =========================================================
   Lists
   ========================================================= */

.postBody ul,
.postBody ol {
    margin: 1.1em 0 1.5em;
    padding-left: 1.6em;
}

.postBody li {
    margin: 0.4em 0;
    padding-left: 0.15em;
}

.postBody li::marker {
    color: var(--text-muted);
}


/* =========================================================
   Blockquote
   ========================================================= */

.postBody blockquote {
    margin: 2em 0;
    padding: 0.3em 0 0.3em 24px;

    background: transparent;

    border: none;
    border-left: 2px solid var(--accent);

    color: var(--text-secondary);

    font-size: 1.02em;
    line-height: 1.85;
}

.postBody blockquote p:last-child {
    margin-bottom: 0;
}


/* =========================================================
   Inline code
   ========================================================= */

.postBody code {
    padding: 0.15em 0.38em;

    background: #ebe7de;
    border-radius: 3px;

    color: #413c37;

    font-family: var(--mono);
    font-size: 0.87em;
}


/* =========================================================
   Code block
   ========================================================= */

.postBody pre {
    overflow-x: auto;

    margin: 1.8em 0;
    padding: 20px 22px;

    background: #262421;
    border: none;
    border-radius: 2px;

    color: #eee9df;

    font-family: var(--mono);
    font-size: 13px;
    line-height: 1.7;

    box-shadow: none;
}

.postBody pre code {
    padding: 0;

    background: transparent;

    color: inherit;

    font-size: inherit;
}


/* 博客园代码高亮区域 */
.cnblogs_code {
    margin: 1.8em 0 !important;
    padding: 18px 20px !important;

    background: #262421 !important;

    border: none !important;
    border-radius: 2px !important;

    color: #eee9df !important;

    font-family: var(--mono) !important;
    font-size: 13px !important;
}

.cnblogs_code pre {
    margin: 0 !important;
    padding: 0 !important;

    background: transparent !important;
}


/* =========================================================
   Images
   ========================================================= */

.postBody img {
    max-width: 100%;
    height: auto;

    margin: 18px auto;

    border-radius: 2px;

    box-shadow: none;
}

.postBody figure {
    margin: 2.2em 0;
}

.postBody figcaption {
    margin-top: 8px;

    color: var(--text-muted);

    font-family: var(--sans);
    font-size: 12px;
    text-align: center;
}


/* =========================================================
   Horizontal rule
   ========================================================= */

.postBody hr {
    width: 100%;

    margin: 3em 0;

    border: none;
    border-top: 1px solid var(--border);
}


/* =========================================================
   Tables
   ========================================================= */

.postBody table {
    width: 100%;

    margin: 1.8em 0;

    border-collapse: collapse;

    font-family: var(--sans);
    font-size: 14px;
}

.postBody th,
.postBody td {
    padding: 10px 12px;

    border: none;
    border-bottom: 1px solid var(--border);

    text-align: left;
}

.postBody th {
    color: var(--text);

    font-weight: 600;
}

.postBody td {
    color: var(--text-secondary);
}


/* =========================================================
   Metadata
   ========================================================= */

#topics .postDesc,
#topics .postDesc a {
    color: var(--text-muted);

    font-family: var(--sans);
    font-size: 11px;
}

#topics .postDesc a:hover {
    color: var(--accent);
}


/* =========================================================
   Pagination
   ========================================================= */

#nav_next_page,
.topicListFooter {
    margin: 30px 0 60px;

    font-family: var(--sans);
}

.pager {
    margin: 40px 0;

    font-family: var(--sans);
    font-size: 13px;
}

.pager a,
.pager span {
    display: inline-block;

    margin-right: 6px;
    padding: 6px 10px;

    background: transparent;
    border: 1px solid var(--border);

    color: var(--text-secondary);

    text-decoration: none;
}

.pager a:hover {
    border-color: var(--text);

    color: var(--text);
}


/* =========================================================
   Comments
   ========================================================= */

#blog-comments-placeholder,
#comment_form {
    max-width: var(--content-width);

    margin-top: 60px;
}

.feedbackItem {
    margin: 0;
    padding: 28px 0;

    background: transparent;

    border: none;
    border-top: 1px solid var(--border);
}

.feedbackListSubtitle {
    color: var(--text-muted);

    font-family: var(--sans);
    font-size: 11px;
}

.feedbackCon {
    margin-top: 14px;

    color: var(--text-secondary);

    font-family: var(--serif);
    font-size: 15px;
    line-height: 1.8;
}

.commentbox_title {
    border-bottom: 1px solid var(--border);

    font-family: var(--sans);
    font-size: 13px;
}


/* =========================================================
   Form elements
   ========================================================= */

input,
textarea,
select,
button {
    font-family: var(--sans);
}

input,
textarea,
select {
    background: var(--paper);

    border: 1px solid var(--border);
    border-radius: 2px;

    color: var(--text);
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--text-secondary);
}


/* =========================================================
   Buttons
   ========================================================= */

button,
input[type="button"],
input[type="submit"] {
    padding: 8px 15px;

    background: var(--text);

    border: 1px solid var(--text);
    border-radius: 2px;

    color: var(--bg);

    cursor: pointer;

    font-size: 12px;

    transition:
        background 0.15s ease,
        border-color 0.15s ease;
}

button:hover,
input[type="button"]:hover,
input[type="submit"]:hover {
    background: var(--accent);
    border-color: var(--accent);
}


/* =========================================================
   Footer
   ========================================================= */

#footer {
    margin-top: 90px;
    padding: 28px 0 50px;

    background: transparent;

    border-top: 1px solid var(--border);

    color: var(--text-muted);

    font-family: var(--sans);
    font-size: 11px;
    text-align: left;
}


/* =========================================================
   Remove some CNBlogs visual clutter
   ========================================================= */

#under_post_news,
#under_post_kb,
#HistoryToday,
#ad_t2,
#cnblogs_c1,
#cnblogs_c2 {
    display: none !important;
}


/* =========================================================
   Scrollbar
   ========================================================= */

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: #c7c0b5;

    border: 3px solid var(--bg);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a095;
}


/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 900px) {
    #home {
        width: min(100% - 32px, var(--page-width));
    }

    #header {
        padding-top: 36px;
    }

    #navigator {
        margin-bottom: 42px;
    }

    #main {
        display: block;
    }

    #sideBar {
        margin-top: 70px;
        padding-top: 30px;

        border-top: 1px solid var(--border);
    }

    #topics .post,
    #blog-comments-placeholder,
    #comment_form {
        max-width: none;
    }
}


@media (max-width: 600px) {
    body {
        font-size: 16px;
    }

    #home {
        width: calc(100% - 28px);
    }

    #blogTitle h1 {
        font-size: 38px;
    }

    #blogTitle h2 {
        font-size: 15px;
    }

    #navList {
        gap: 5px 20px;
    }

    .post {
        margin-bottom: 42px;
        padding-bottom: 38px;
    }

    .postTitle {
        font-size: 29px;
    }

    #topics .postTitle {
        font-size: 38px;
    }

    .postBody {
        font-size: 16px;
        line-height: 1.85;
    }

    .postBody h1 {
        font-size: 30px;
    }

    .postBody h2 {
        font-size: 25px;
    }

    .postBody h3 {
        font-size: 21px;
    }

    .postBody pre,
    .cnblogs_code {
        margin-left: -14px !important;
        margin-right: -14px !important;

        border-radius: 0 !important;
    }
}