/* Default css file for jemdoc (adapted from qhlin.me). */

table#tlayout {
    border: none;
    border-collapse: separate;
    background: white;
}

html {
    background-color: #eeeeee;
}

body {
    font-family: "Crimson Pro", Georgia, "Times New Roman", serif;
    font-size: 17.5px;
    color: #000000;
    background-color: #ffffff;
    text-align: left;
    margin-top: 30px;
    margin-bottom: 30px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 50px;
    padding-right: 50px;
    padding-top: 10px;
    padding-bottom: 30px;
    max-width: 960px;
}

#layout-menu {
    background: #f6f6f6;
    border: 1px solid #dddddd;
    padding-top: 0.5em;
    padding-left: 8px;
    padding-right: 8px;
    font-size: 1.0em;
    width: auto;
    white-space: nowrap;
    text-align: left;
    vertical-align: top;
}

#layout-menu td {
    background: #f4f4f4;
    vertical-align: top;
}

#layout-content {
    padding-top: 0.0em;
    padding-left: 1.0em;
    padding-right: 1.0em;
    border: none;
    background: white;
    text-align: left;
    vertical-align: top;
    position: relative;
}

#layout-menu a {
    line-height: 1.5em;
    margin-left: 0.5em;
}

tt {
    background: #ffffdd;
}

pre, tt, code, kbd, samp {
    font-size: 90%;
    font-family: "Ubuntu Mono", monaco, monospace;
}

a, a > tt {
    color: #224b8d;
    text-decoration: none;
}

a:hover {
    border-bottom: 1px gray dotted;
}

#layout-menu a.current:link, #layout-menu a.current:visited {
    color: #022b6d;
    border-bottom: 1px gray solid;
}

#layout-menu a:link, #layout-menu a:visited, #layout-menu a:hover {
    color: #527bbd;
    text-decoration: none;
}

div.menu-category {
    border-bottom: 1px solid gray;
    margin-top: 0.8em;
    padding-top: 0.2em;
    padding-bottom: 0.1em;
    font-weight: bold;
}

div.menu-item {
    padding-left: 16px;
    text-indent: -16px;
}

div#toptitle {
    padding-bottom: 0.2em;
    margin-bottom: 1.5em;
}

div#toptitle + h2, div#toptitle + h3 {
    margin-top: 0em;
}

div#subtitle {
    margin-top: 0.0em;
    margin-bottom: 0.0em;
    padding-top: 0em;
    padding-bottom: 0.1em;
}

em {
    font-style: italic;
}

strong, b {
    font-weight: 600;
}

h1, h2, h3 {
    color: #527bbd;
    margin-top: 0.7em;
    margin-bottom: 0.5em;
    padding-bottom: 0.2em;
    line-height: 1.0;
    padding-top: 0.5em;
    border-bottom: 1px solid #aaaaaa;
}

h1 {
    font-size: 165%;
    padding-bottom: 0.3em;
}

h2 {
    padding-top: 0.8em;
    font-size: 125%;
}

h2 + h3 {
    padding-top: 0.2em;
}

h3 {
    font-size: 110%;
    border-bottom: none;
}

p {
    margin-top: 0.0em;
    margin-bottom: 0.8em;
    padding: 0;
    line-height: 1.35;
}

pre {
    padding: 0;
    margin: 0;
}

div#footer {
    font-size: small;
    border-top: 1px solid #c0c0c0;
    padding-top: 0.1em;
    margin-top: 4.0em;
    color: #c0c0c0;
}

div#footer a {
    color: #80a0b0;
}

div#footer-text {
    float: left;
    padding-bottom: 8px;
}

ul, ol, dl {
    margin-top: 0.2em;
    padding-top: 0;
    margin-bottom: 0.8em;
}

dt {
    margin-top: 0.5em;
    margin-bottom: 0;
}

dl {
    margin-left: 20px;
}

dd {
    color: #222222;
}

dd > *:first-child {
    margin-top: 0;
}

ul {
    list-style-position: outside;
    list-style-type: square;
}

p + ul, p + ol {
    margin-top: -0.5em;
}

li {
    margin-top: 0.65em;
    line-height: 1.35;
}

ol {
    list-style-position: outside;
    list-style-type: decimal;
}

li p, dd p {
    margin-bottom: 0.3em;
}

#layout-content h1:first-child,
#layout-content h2:first-child,
#layout-content h3:first-child {
    margin-top: -0.7em;
}

div#toptitle h1, #layout-content div#toptitle h1 {
    margin-bottom: 0.0em;
    padding-bottom: 0.1em;
    padding-top: 0;
    margin-top: 0.5em;
    border-bottom: none;
}

table + table {
    margin-top: 1em;
}

img {
    border: none;
}

/* ------------------------------------------------------------------
   Profile header table
   ------------------------------------------------------------------ */

table.profile-header {
    margin-bottom: 0px;
    width: 100%;
    border-collapse: collapse;
}

table.profile-header td.avatar-cell {
    width: 210px;
    text-align: center;
    vertical-align: middle;
}

table.profile-header td.avatar-cell img {
    width: 205px;
    height: auto;
    border-radius: 2px;
}

table.profile-header td.bio-cell {
    vertical-align: top;
    text-align: left;
    padding-left: 0;
}

table.profile-header td.avatar-cell + td.bio-cell {
    padding-left: 30px;
}

/* ------------------------------------------------------------------
   Social links as small square boxes (same look as qhlin.me)
   ------------------------------------------------------------------ */

p.social-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35em;
}

p.social-links a {
    display: inline-block;
    background: transparent;
    border: 1px solid #224b8d;
    border-radius: 0;
    color: #224b8d;
    font-family: inherit;
    font-size: 0.92em;
    line-height: 1.55;
    padding: 1px 8px;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.15s ease, color 0.15s ease;
}

p.social-links a:hover {
    background-color: #224b8d;
    color: #ffffff;
    border-bottom: 1px solid #224b8d;
}

/* ------------------------------------------------------------------
   News: a scrollable list so a long history does not dominate the page
   ------------------------------------------------------------------ */

div.news-list {
    max-height: 300px;
    overflow-y: auto;
    scrollbar-gutter: stable;
    padding-right: 0.7em;
    margin-bottom: 1.2em;
}

div.news-list ul {
    margin-top: 0.3em;
    margin-bottom: 0.3em;
}

div.news-list li {
    margin-top: 0.45em;
    margin-bottom: 0.45em;
    line-height: 1.35;
}

/* ------------------------------------------------------------------
   Publications & highlights
   ------------------------------------------------------------------ */

#tbPublications {
    border-collapse: collapse;
    margin-top: 0.4em;
}

#tbPublications td {
    padding-top: 0.45em;
    padding-bottom: 0.55em;
    line-height: 1.38;
}

.paper-title {
    color: #224b8d;
    font-weight: 600;
}

.highlight {
    color: #D6453B;
}

.honor-item {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1em;
}

.honor-year {
    white-space: nowrap;
    color: #444444;
}

/* ------------------------------------------------------------------
   Light / dark toggle button & Dark mode
   ------------------------------------------------------------------ */

#theme-toggle {
    position: absolute;
    top: 0;
    right: 0.5em;
    z-index: 1000;
    background: none;
    color: #224b8d;
    border: none;
    padding: 4px;
    line-height: 1;
    cursor: pointer;
}

#theme-toggle:hover {
    background: none;
    color: #527bbd;
}

#theme-toggle svg {
    display: block;
    width: 28px;
    height: 28px;
}

#theme-toggle .sun {
    display: none;
}

html[data-theme="dark"] #theme-toggle .moon {
    display: none;
}

html[data-theme="dark"] #theme-toggle .sun {
    display: block;
}

html[data-theme="dark"] {
    background-color: #101216;
    color-scheme: dark;
}

html[data-theme="dark"] body,
html[data-theme="dark"] #layout-content,
html[data-theme="dark"] table#tlayout {
    background-color: #1a1d23;
    color: #e6e6e6;
}

html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3 {
    color: #8ab4f8;
    border-bottom-color: #444c5c;
}

html[data-theme="dark"] h3 {
    border-bottom: none;
}

html[data-theme="dark"] a,
html[data-theme="dark"] a > tt {
    color: #8ab4f8;
}

html[data-theme="dark"] a:hover {
    border-bottom-color: #8ab4f8;
}

html[data-theme="dark"] dd {
    color: #cccccc;
}

html[data-theme="dark"] tt {
    background: #2a2e37;
}

html[data-theme="dark"] p.social-links a {
    border-color: #8ab4f8;
    color: #8ab4f8;
}

html[data-theme="dark"] p.social-links a:hover {
    background-color: #8ab4f8;
    color: #1a1d23;
}

html[data-theme="dark"] .paper-title {
    color: #8ab4f8;
}

html[data-theme="dark"] .highlight {
    color: #ff7b72;
}

html[data-theme="dark"] .honor-year {
    color: #b0b8c4;
}

html[data-theme="dark"] div#footer {
    border-top-color: #444c5c;
    color: #9aa3b2;
}

html[data-theme="dark"] div#footer a {
    color: #8ab4f8;
}

html[data-theme="dark"] #theme-toggle {
    background: none;
    color: #8ab4f8;
}

html[data-theme="dark"] #theme-toggle:hover {
    background: none;
    color: #aecbfa;
}

/* ------------------------------------------------------------------
   Responsive adjustments for mobile screens
   ------------------------------------------------------------------ */

@media (max-width: 680px) {
    body {
        margin-top: 0;
        margin-bottom: 0;
        padding-left: 18px;
        padding-right: 18px;
    }

    #layout-content {
        padding-left: 0.2em;
        padding-right: 0.2em;
    }

    table.profile-header,
    table.profile-header tbody,
    table.profile-header tr,
    table.profile-header td.avatar-cell,
    table.profile-header td.bio-cell {
        display: block;
        width: 100%;
        padding-left: 0;
    }

    table.profile-header td.avatar-cell {
        margin-bottom: 12px;
        text-align: left;
    }

    table.profile-header td.avatar-cell img {
        width: 150px;
    }
}
