/* Academic CV: restrained typography, document-style layout, readable measure. */

:root
{
    --gl-page-canvas: #f5f4f2;
    --gl-card-bg: #ffffff;
    --gl-card-edge: #e4e3e0;
    --gl-text: #222222;
    --gl-text-muted: #5e5d5b;
    --gl-line: #e0dfdc;
    --gl-line-bib: #d8d7d4;
    --gl-link: #153e63;
    --gl-link-hover: #1a5080;
    --gl-link-active: #0f2d46;
    --gl-quote: #454442;
    --gl-code-bg: #f0efed;
    --gl-code-fg: #3a3937;
    --gl-pre-bg: #eceae7;
    --gl-shadow: rgba(0, 0, 0, 0.045);
    --gl-bib-meta-size: 0.86em;
    /* Slightly softer than title (#141414), not pale gray. */
    --gl-bib-authors-color: #333333;
    --gl-bib-info-color: #323232;
}

html,
body
{
    font-size: 15px;
    line-height: 1.55;
}

@media (min-width: 500px)
{
    html,
    body
    {
        font-size: 15px;
    }
}

/* Page = subtle canvas; main column = paper card (clearer overall structure). */
body,
.gl-page-background
{
    background: var(--gl-page-canvas);
}

.gl-entry
{
    color: var(--gl-text);
}

html,
[lang]:not(:lang(zh)):not(pre):not(code):not(samp):not(kbd):not(var)
{
    font-family:
        "Palatino Linotype", Palatino, "Book Antiqua",
        "Liberation Serif", Cambria, Georgia,
        "Times New Roman", Times,
        "Songti SC", "STSong", SimSun,
        serif;
}

html:lang(zh),
[lang]:lang(zh):not(pre):not(code):not(samp):not(kbd):not(var)
{
    font-family:
        "Songti SC", "STSong", "STKaiti", "KaiTi", SimSun,
        "Palatino Linotype", Palatino, Georgia,
        serif;
}

@media (min-resolution: 140dpi)
{
    html,
    [lang]:not(:lang(zh)):not(pre):not(code):not(samp):not(kbd):not(var)
    {
        font-family:
            "Palatino Linotype", Palatino, "Book Antiqua",
            "Liberation Serif", Cambria, Georgia,
            "Times New Roman", Times,
            "Songti SC", "STSong", DengXian, SimSun,
            serif;
    }

    html:lang(zh),
    [lang]:lang(zh):not(pre):not(code):not(samp):not(kbd):not(var)
    {
        font-family:
            "Songti SC", "STSong", DengXian, SimSun,
            "Palatino Linotype", Palatino, Georgia,
            serif;
    }
}

.gl-body-wrapper
{
    /* Comfortable reading width; long titles handled via bib typography, not ultra-wide page. */
    max-width: min(50rem, 92vw);
    margin-left: auto;
    margin-right: auto;
    margin-top: 0;
    margin-bottom: 0;
    padding: 1rem 1rem 1.5rem;
    background: var(--gl-card-bg);
    border: 1px solid var(--gl-card-edge);
    box-shadow: 0 1px 3px var(--gl-shadow);
}

@media (min-width: 600px)
{
    .gl-body-wrapper
    {
        margin-top: 1.25rem;
        margin-bottom: 2rem;
        padding: 1.35rem 1.5rem 2rem;
        border-radius: 2px;
    }
}

/* Page title: no extra rule under the name (avoid double line with .gl-entry h1 border from theme). */
#post-metadata
{
    padding-bottom: 0;
    margin-bottom: 0.65rem;
    border-bottom: none;
}

#post-metadata > h1
{
    font-size: 1.45rem;
    font-weight: 600;
    letter-spacing: -0.015em;
    line-height: 1.3;
    margin-top: 0;
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.gl-entry-metadata-box
{
    font-size: 0.88em;
    color: var(--gl-text-muted);
    margin-top: 0.35rem;
}

.gl-entry .gl-eml
{
    color: var(--gl-text-muted);
}

/* Clear floated photo so sections below align to full column width. */
#post-content::after
{
    content: "";
    display: table;
    clear: both;
}

article#post-content
{
    padding-top: 0.15rem;
}

/* Section headings: clearer vertical rhythm between bio and lists. */
.gl-entry article h2
{
    margin-top: 1.35rem;
    padding-top: 0.35rem;
}

article#post-content > h2:first-of-type
{
    margin-top: 1.05rem;
}

.gl-entry h1
{
    font-size: 1.35em;
    font-weight: 600;
}

.gl-entry h2
{
    font-size: 1.18em;
    font-weight: 600;
}

.gl-entry h3
{
    font-size: 1.08em;
}

.gl-entry h4
{
    font-size: 1.02em;
}

.gl-entry h5
{
    font-size: 0.98em;
}

.gl-entry h6
{
    font-size: 0.95em;
}

.gl-entry h1,
.gl-entry h2,
.gl-entry h3,
.gl-entry h4,
.gl-entry h5,
.gl-entry h6
{
    margin-top: 0.85em;
    margin-bottom: 0.4em;
    line-height: 1.35;
}

.gl-entry h1,
.gl-entry h2
{
    border-bottom-color: var(--gl-line);
}

.gl-entry p,
.gl-entry table
{
    margin-top: 0.65em;
    margin-bottom: 0.65em;
}

.gl-entry table > thead > tr > th,
.gl-entry table > tbody > tr > td
{
    border-color: var(--gl-line);
}

.gl-image-box
{
    padding: 0.65em;
}

.gl-entry a[href]:link,
.gl-entry a[href]:visited
{
    color: var(--gl-link);
}

.gl-entry a[href]:hover
{
    color: var(--gl-link-hover);
}

.gl-entry a[href]:active
{
    color: var(--gl-link-active);
}

.gl-entry blockquote
{
    color: var(--gl-quote);
    border-left-color: var(--gl-line-bib);
}

.gl-entry :not(pre) > code
{
    background: var(--gl-code-bg);
    color: var(--gl-code-fg);
}

.gl-entry pre
{
    background: var(--gl-pre-bg);
    color: var(--gl-text);
}

/* Publications: use horizontal space efficiently + predictable wraps for long titles. */
.gl-bibtex-bst-bio
{
    margin-top: 0.75rem;
    margin-bottom: 1.25rem;
}

.gl-bibtex-bst-bio > .gl-bibtex-entry
{
    margin-top: 0.45em;
    margin-bottom: 0.65em;
}

.gl-bibtex-bst-bio > .gl-bibtex-notfirstentry
{
    border-top-color: var(--gl-line-bib);
    padding-top: 0.65em;
}

/* Default theme indents each line; tightening gives long titles more room without widening the page. */
.gl-bibtex-entry-title,
.gl-bibtex-entry-authors,
.gl-bibtex-entry-info,
.gl-bibtex-entry-extra
{
    padding-left: 0.35em;
}

/* Publication list: strong title line; smaller, quieter authors + venue. */
.gl-bibtex-bst-bio .gl-bibtex-entry-title
{
    font-size: 1.03em;
    font-weight: 700;
    line-height: 1.38;
    letter-spacing: -0.015em;
    hyphens: auto;
    -webkit-hyphens: auto;
    overflow-wrap: break-word;
}

/* Title is a link: default ink, blue on hover (not “web link blue” for static state). */
.gl-bibtex-bst-bio .gl-bibtex-entry-title a:link,
.gl-bibtex-bst-bio .gl-bibtex-entry-title a:visited
{
    color: #141414;
    font-weight: 700;
    text-decoration: none;
}

.gl-bibtex-bst-bio .gl-bibtex-entry-title a:hover
{
    color: var(--gl-link-hover);
    text-decoration: underline;
    text-underline-offset: 0.12em;
}

.gl-bibtex-bst-bio .gl-bibtex-entry-title a:active
{
    color: var(--gl-link-active);
}

.gl-bibtex-bst-bio .gl-bibtex-entry-authors
{
    font-size: var(--gl-bib-meta-size);
    color: var(--gl-bib-authors-color);
    line-height: 1.42;
    margin-top: 0.3em;
}

.gl-bibtex-bst-bio .gl-bibtex-entry-authors a:link,
.gl-bibtex-bst-bio .gl-bibtex-entry-authors a:visited
{
    color: var(--gl-link);
}

.gl-bibtex-bst-bio .gl-bibtex-entry-authors a:hover
{
    color: var(--gl-link-hover);
}

.gl-bibtex-bst-bio .gl-bibtex-entry-info
{
    font-size: calc(var(--gl-bib-meta-size) * 0.97);
    color: var(--gl-bib-info-color);
    line-height: 1.4;
    margin-top: 0.22em;
}

.gl-bibtex-bst-bio .gl-bibtex-entry-info a:link,
.gl-bibtex-bst-bio .gl-bibtex-entry-info a:visited
{
    color: var(--gl-link);
}

.gl-bibtex-bst-bio .gl-bibtex-entry-info a:hover
{
    color: var(--gl-link-hover);
}

.gl-bibtex-bst-bio .gl-bibtex-entry-venue
{
    font-weight: 400;
}

/* Keep \\textbf in venue readable at small size. */
.gl-bibtex-bst-bio .gl-bibtex-entry-venue .gl-bibtex-tex-textbf,
.gl-bibtex-bst-bio .gl-bibtex-entry-venue .gl-bibtex-tex-bf
{
    font-weight: 600;
}

footer.gl-footer-far
{
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--gl-line);
    font-size: 0.88em;
    color: var(--gl-text-muted);
}

footer.gl-footer-far a[href]:link,
footer.gl-footer-far a[href]:visited
{
    color: var(--gl-link);
}

footer.gl-footer-far a[href]:hover
{
    color: var(--gl-link-hover);
}

footer.gl-footer-far a[href]:active
{
    color: var(--gl-link-active);
}

footer.gl-footer-far p
{
    margin: 0.35em 0;
}

@media print
{
    body,
    .gl-page-background
    {
        background: #fff !important;
    }

    .gl-body-wrapper
    {
        box-shadow: none !important;
        margin: 0 !important;
        border-radius: 0 !important;
    }

    footer.gl-footer-far
    {
        border-top-color: var(--gl-line-bib);
    }
}
