/**
 * Modernized ZJUSCT theme for reveal.js.
 * Based on slides-2.css with modern features from slides-1.css
 *
 * Uses Montserrat and Inconsolata (Google fonts) with CSS variables for maintainability
 */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans:ital,wdth,wght@0,62.5..100,100..900;1,62.5..100,100..900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,100..800;1,100..800&display=swap');
@import url("https://chinese-fonts-cdn.deno.dev/packages/maple-mono-cn/dist/MapleMono-CN-Regular/result.css");

:root {
    /* Color scheme from slides-2 */
    --primary-blue: #006fb8; /* Headers */
    --secondary-blue: #2a76dd; /* Links, controls */
    --light-blue: #6ca0e8; /* Link hover */
    --dark-blue: #1a53a1; /* Link roll background */
    --selection-blue: #98bdef; /* Text selection */
    --text-dark: #222; /* Main text */
    --text-light: #fff; /* Dark background text */

    /* Layout variables */
    --font-family: "Noto Sans", sans-serif;
    --code-font-family: "JetBrains Mono", "Maple Mono CN", monospace;

    /* Typography settings */
    --content-align: left;
    --content-line-height: 1.3;
    --content-padding-bottom: 0.5em;
    --smaller-font-size: 0.55em;

    /* Code styling */
    --code-bg-color: #f8f8f8;
    --code-border-color: #eaecf0;
    --inline-code-bg-color: #f8f8f8;
    --inline-code-border-color: #eaecf0;

    /* Quote styling */
    --quote-color: grey;
    --quote-bg-color: rgba(255, 255, 255, 0.05);
}

/*********************************************
 * GLOBAL STYLES
 *********************************************/
body {
    background: #fff;
    background-color: #fff;
    font-family: var(--font-family);
}

section {
    padding: 20px 0;
}

.reveal p {
    padding:  0 25px 0 25px;
}

.reveal {
    font-family: var(--font-family);
    font-size: 30px;
    font-weight: 400; /* Regular */
    color: var(--text-dark);
}

::selection {
    color: var(--text-light);
    background: var(--selection-blue);
    text-shadow: none;
}

::-moz-selection {
    color: var(--text-light);
    background: var(--selection-blue);
    text-shadow: none;
}

.reveal .slides section,
.reveal .slides section > section {
    line-height: var(--content-line-height);
    font-weight: inherit;
}

/*********************************************
 * HEADERS
 *********************************************/
.reveal h1,
.reveal h2,
.reveal h3,
.reveal h4,
.reveal h5,
.reveal h6 {
    margin: 0 0 20px 0;
    color: var(--primary-blue);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: normal;
    text-shadow: none;
}

.reveal h1 {
    font-size: 2.5em;
    text-shadow: none;
}

.reveal h2 {
    font-size: 1.6em;
}

.reveal h3 {
    font-size: 1.3em;
}

.reveal h4 {
    font-size: 1em;
}

/*********************************************
 * OTHER
 *********************************************/
.reveal p {
    margin: 20px 0;
    line-height: var(--content-line-height);
}

/* Ensure certain elements are never larger than the slide itself */
.reveal img,
.reveal video,
.reveal iframe {
    max-width: 95%;
    max-height: 90%;
    margin-bottom: var(--content-padding-bottom);
}

.reveal strong,
.reveal b {
    font-weight: bold;
}

.reveal em {
    font-style: italic;
}

.reveal ol,
.reveal dl,
.reveal ul {
    display: inline-block;
    text-align: left;
    margin: 0 0 var(--content-padding-bottom) 1em;
}

.reveal ol {
    list-style-type: decimal;
}

.reveal ul {
    list-style-type: disc;
}

.reveal ul ul {
    list-style-type: square;
}

.reveal ul ul ul {
    list-style-type: circle;
}

.reveal ul ul,
.reveal ul ol,
.reveal ol ol,
.reveal ol ul {
    display: block;
    margin-left: 40px;
}

.reveal dt {
    font-weight: bold;
}

.reveal dd {
    margin-left: 40px;
}

.reveal blockquote {
    display: block;
    position: relative;
    width: 70%;
    margin: 20px auto;
    padding: 5px;
    font-style: italic;
    background: var(--quote-bg-color);
    box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.2);
    border-left-style: solid;
    border-left-width: 0.2ch;
    border-color: var(--quote-color);
    padding-left: 0.5ch;
    margin-bottom: var(--content-padding-bottom);
}

.reveal blockquote p:first-child,
.reveal blockquote p:last-child {
    display: inline-block;
}

.reveal q {
    font-style: italic;
}

.reveal pre {
    display: block;
    position: relative;
    width: 90%;
    margin: 20px auto;
    text-align: left;
    font-size: var(--smaller-font-size);
    font-family: var(--code-font-family);
    line-height: 1.2em;
    word-wrap: break-word;
    box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.15);
    background-color: var(--code-bg-color);
    border-width: 0.1ch;
    border-style: solid;
    border-color: var(--code-border-color);
    border-radius: 0.2em;
}

.reveal code {
    color: var(--primary-blue);
    font-family: var(--code-font-family);
    text-transform: none;
    background-color: var(--inline-code-bg-color);
    padding: 0.2em 0.4em;
    border-width: 0.1ch;
    border-style: solid;
    border-color: var(--inline-code-border-color);
    border-radius: 0.2em;
    font-size: 0.8em;
}

.reveal pre code {
    display: block;
    padding: 5px;
    overflow: auto;
    max-height: 400px;
    word-wrap: normal;
    background-color: transparent;
    border: none;
    border-radius: 0;
    font-size: inherit;
}

.reveal table {
    margin: auto;
    border-collapse: collapse;
    border-spacing: 0;
    margin-bottom: var(--content-padding-bottom);
}

.reveal table th {
    font-weight: bold;
}

.reveal table th,
.reveal table td {
    text-align: left;
    padding: 0.2em 0.5em;
    border-bottom: 1px solid;
}

.reveal table th[align="center"],
.reveal table td[align="center"] {
    text-align: center;
}

.reveal table th[align="right"],
.reveal table td[align="right"] {
    text-align: right;
}

.reveal table tbody tr:last-child th,
.reveal table tbody tr:last-child td {
    border-bottom: none;
}

.reveal sup {
    vertical-align: super;
    font-size: smaller;
}

.reveal sub {
    vertical-align: sub;
    font-size: smaller;
}

.reveal small {
    display: inline-block;
    font-size: 0.6em;
    line-height: 1.2em;
    vertical-align: top;
}

.reveal small * {
    vertical-align: top;
}

/*********************************************
 * LINKS
 *********************************************/
.reveal a {
    color: var(--secondary-blue);
    text-decoration: none;
    -webkit-transition: color 0.15s ease;
    -moz-transition: color 0.15s ease;
    transition: color 0.15s ease;
}

.reveal a:hover {
    color: var(--light-blue);
    text-shadow: none;
    border: none;
    text-decoration: underline;
}

.reveal .roll span:after {
    color: var(--text-light);
    background: var(--dark-blue);
}

/*********************************************
 * IMAGES
 *********************************************/
.reveal section img {
    margin: 15px 0px;
    background: rgba(255, 255, 255, 0.12);
    border: none;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
}

.reveal section img.plain {
    border: 0;
    box-shadow: none;
}

.reveal a img {
    -webkit-transition: all 0.15s linear;
    -moz-transition: all 0.15s linear;
    transition: all 0.15s linear;
}

.reveal a:hover img {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--secondary-blue);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.55);
}

/*********************************************
 * NAVIGATION CONTROLS
 *********************************************/
.reveal .controls {
    color: var(--secondary-blue);
}

/*********************************************
 * PROGRESS BAR
 *********************************************/
.reveal .progress {
    background: rgba(0, 0, 0, 0.2);
    color: var(--secondary-blue);
}

.reveal .progress span {
    background: var(--secondary-blue);
    -webkit-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
    -moz-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
    transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
}

/*********************************************
 * SLIDE NUMBER
 *********************************************/
.reveal .slide-number {
    font-size: 26px;
    border-radius: 5px;
    background-color: rgba(0, 0, 0, 0.3);
}

.reveal .slide-number a {
    text-decoration: none;
}

/*********************************************
 * UTILITY CLASSES (from slides-1)
 *********************************************/
div.center > * {
    display: flex;
    justify-content: center;
    align-items: center;
}

div.multicolumn {
    /* https://stackoverflow.com/a/44392145 */
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    gap: 5vw;
    margin-bottom: var(--content-padding-bottom);
}

/*********************************************
 * MATH DISPLAY (from slides-1)
 *********************************************/
div.MathJax_Display {
    text-align: left !important;
    margin-bottom: var(--content-padding-bottom);
}

/*********************************************
 * LIST IMPROVEMENTS (from slides-1)
 *********************************************/
li {
    text-align: left;
    line-height: var(--content-line-height);
    margin-left: 3ch;
}

.reveal section > ul,
.reveal section > ol {
    margin-bottom: var(--content-padding-bottom);
}

/*********************************************
 * SLIDE BACKGROUNDS
 *********************************************/
/* Default background for all slides */
.reveal .slides {
    background-image: url("zjusct.svg");
    background-size: 18vw auto;
    background-position: bottom left;
    background-repeat: no-repeat;
    background-color: #fff;
    opacity: 1;
}

.reveal .slides {
    border: 1.5px #ddd solid;
    border-radius: 7px;
    /* text-align: left; */
    font-weight: 300;
}
