/*
 * Based on the HOGENT theme:
 *
 *  https://www.hogent.be/dit-is-hogent/huisstijl/huisstijl-kleuren/
 *
 * Using:
 *
 *  https://fonts.google.com/specimen/Montserrat
 *  https://fonts.google.com/specimen/Inconsolata
 */

@import url("./montserrat.css");
@import url("./inconsolata.css");

:root {
    --hogent-controls: #169300;
    --hogent-gray: #c3bbaf;
    --hogent-bold: #169300;
    --hogent-white: #ffffff;
    --hogent-black: #000000;
    --hogent-font-family: "Montserrat", "Arial", sans-serif;
    --slide-background: #fefefe;

    --wikipedia-a-color: #3366cc;
    --wikipedia-code-bg-color: #f8f8f8;
    --wikipedia-code-border-color: #eaecf0;

    --github-font-family: font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Noto Sans, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji;

    --header-1-align: center;
    --header-align: left;
    --header-color: var(--hogent-black);

    --content-align: left;
    --content-line-height: 1.3;
    --content-padding-bottom: 0.5em;

    --math-align: left;

    --smaller-font-size: 2.6rem;

    --really-small-font-size: 1.3rem;
    --really-small-line-height: 1.2;
    --really-small-padding-bottom: 0;

    --a-color: var(--wikipedia-a-color);
    --inline-code-bg-color: var(--wikipedia-code-bg-color);
    --inline-code-border-color: var(--wikipedia-code-border-color);
    --code-bg-color: var(--wikipedia-code-bg-color);
    --code-border-color: var(--wikipedia-code-border-color);

    --quote-color: grey;
    --quote-bg-color: white;
}

body {
    font-family: var(--hogent-font-family);
    font-weight: 400;
    font-size: 3.2rem;
}

section {
    text-align: var(--content-align);
}

.reveal-viewport {
    background-color: var(--slide-background);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    text-align: var(--header-align);
    font-weight: 800;
    margin-bottom: var(--content-padding-bottom);
    line-height: 1.25;
}

h1 {
    text-align: var(--header-1-align);
    font-size: 2.5em;
}

h2 {
    font-size: 1.6em;
}

h3 {
    font-size: 1.3em;
}

h4 {
    font-size: 1em;
}

b,
strong {
    color: var(--hogent-bold);
    font-weight: bold;
}

i,
em {
    font-style: italic;
}

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

a:hover {
    text-decoration: underline;
}

code {
    background-color: var(--inline-code-bg-color);
    font-family: "Inconsolata", monospace;
    font-size: 0.8em;
    padding: 0.2em 0.4em 0.2em 0.4em;
    border-width: 0.1ch;
    border-style: solid;
    border-color: var(--inline-code-border-color);
    border-radius: 0.2em;
}

pre code:not(.mermaid) {
    background-color: var(--code-bg-color);
    text-align: left;
    font-size: var(--smaller-font-size);
    white-space: pre-wrap;
    margin-bottom: var(--content-padding-bottom);
    border-width: 0.1ch;
    border-style: solid;
    border-color: var(--code-border-color);
    border-radius: 0.2em;
}

p {
    line-height: var(--content-line-height);
    margin-bottom: var(--content-padding-bottom);
}

blockquote {
  margin: 0;
  margin-top: var(--content-padding-bottom);
  margin-bottom: var(--content-padding-bottom);
  padding-left: 2rem;
  position: relative;
  overflow: hidden;
}

blockquote::before {
    position: absolute;
    color: var(--quote-color);
    content:  url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='%23777777'><path d='M9.983 3v7.391C9.983 16.095 6.252 19.961 1 21l-.995-2.151C2.437 17.932 4 15.211 4 13H0V3h9.983zM24 3v7.391c0 5.704-3.748 9.571-9 10.609l-.996-2.151C16.437 17.932 18 15.211 18 13h-3.983V3H24z'/></svg>");
    left: 0;
    line-height: 0;
}

blockquote::after {
    position: absolute;
    color: var(--quote-color);
    content: "";
    left: 5px;
    top: 25px;
    width: 2px;
    height: 100%;
    background-color: var(--quote-color);
}

blockquote p {
    margin: 0;
}

blockquote p + p {
    margin-top: 1rem;
}

img,
video,
iframe {
    max-width: 100%; /* Must be % because of multicolumn, as those are sub-divs */
    max-height: 90vh;
    margin-bottom: var(--content-padding-bottom);
}

pre code {
    /* Otherwise it overflows below the slide. */
    /* Why 50vh? I have no clue, it just seems to work ... */
    max-height: 50vh;
}

div.MathJax_Display {
    text-align: var(--math-align) !important;
    margin-bottom: var(--content-padding-bottom);
}

table {
    font-size: var(--smaller-font-size);
    border-collapse: collapse;
    margin-bottom: var(--content-padding-bottom);
}

th {
    font-weight: bold;
}

td {
    border-top-style: solid;
    border-width: 0.1ch;
    border-color: var(--hogent-black);
}

th,
td {
    padding: 0.2em 0.8em 0.2em 0.8em;
}

li {
    text-align: left;
    line-height: var(--content-line-height);
    margin-left: 1rem;
}

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

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

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

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

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

.reveal .progress {
    height: 1vh;
    background: var(--hogent-white);
}

.reveal .progress span {
    background: var(--hogent-controls);
}

.reveal .controls {
    color: var(--hogent-controls);
    right: 6em;
}

.reveal .slide-number {
    font-size: 1rem;
    color: var(--hogent-controls);
    background-color: var(--hogent-white);
    right: 0;
    bottom: 1vh;
    padding: 5px 8px;
}

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

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);
}

/* --- Additional styles --- */

/* Layout: half */

.slides section.layout-half {
    width: 50%;
    left: 0;
}

.backgrounds div.layout-half .slide-background-content {
    background-size: 48%;
    background-position: right;
}

.reveal-viewport.reveal-scroll .scroll-page section.layout-half {
    width: calc(var(--slide-width) / 2) !important;
    left: 25% !important;
}

/* Layout: full cover */

.slides section.layout-full-cover-dark,
.slides section.layout-full-cover-light {
    top: 0 !important;
}

.slides section.layout-full-cover-dark {
    color: var(--hogent-white);
}

.slides section.layout-full-cover-dark a {
    color: var(--hogent-white);
}

.slides section.layout-full-cover-light {
    color: var(--hogent-black);
}

.slides section.layout-full-cover-light a {
    color: var(--hogent-black);
}

.backgrounds div.layout-full-cover-dark,
.backgrounds div.layout-full-cover-light {
    background-size: 100%;
    background-position: center;
}

/* Layout: center */

.slides section.layout-center {
    --content-align: center;
    --header-align: center;
}
