/* Base styles and content styles */

/*@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,400;0,700;1,400;1,700&family=Tinos:ital,wght@0,400;0,700;1,400;1,700&family=Exo:ital,wght@0,400;0,700;1,400;1,700&display=swap');*/
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,400;0,700;1,400;1,700&family=PT+Sans:ital,wght@0,400;0,700;1,400;1,700&family=Exo:ital,wght@0,400;0,700;1,400;1,700&display=swap');
@import 'variables.css';

:root {
    /* Browser default font-size is 16px, this way 1 rem = 10px */
    /* font-size: 62.5%; */
    font-size: 75%;
}

html {
    font-family: "PT Sans", "Open Sans", sans-serif;
    color: var(--fg);
    background-color: var(--bg);
    text-size-adjust: none;
}

.menu-title,
.sidebar {
    font-family: "PT Sans", "Open Sans", sans-serif;
}

body {
    margin: 0;
    font-size: 1.6rem;
    overflow-x: hidden;
}

code {
    font-family: "JetBrains Mono", Menlo, Consolas, "Ubuntu Mono", "DejaVu Sans Mono", "Source Code Pro", monospace, monospace !important;
    font-size: 0.875em;
    /* please adjust the ace font size accordingly in editor.js */
}

h5 {
    font-size: 1.6rem;
}

h4 {
    font-size: 1.76rem;
}

h3 {
    font-size: 1.94rem;
}

h2 {
    font-size: 2.13rem;
}

h1 {
    font-size: 2.34rem;
}

/* Don't change font size in headers. */
h1 code,
h2 code,
h3 code,
h4 code,
h5 code,
h6 code {
    font-size: unset;
}

.left {
    float: left;
}

.right {
    float: right;
}

.boring {
    opacity: 0.6;
}

.hide-boring .boring {
    display: none;
}

.hidden {
    display: none !important;
}

h2,
h3 {
    margin-top: 2em;
}

h4,
h5 {
    margin-top: 1.5em;
}

.header+.header h3,
.header+.header h4,
.header+.header h5 {
    margin-top: 1em;
}

h1 a.header:target::before,
h2 a.header:target::before,
h3 a.header:target::before,
h4 a.header:target::before {
    display: inline-block;
    content: "»";
    margin-left: -30px;
    width: 30px;
}

h1 a.header:target,
h2 a.header:target,
h3 a.header:target,
h4 a.header:target {
    scroll-margin-top: calc(var(--menu-bar-height) + 0.5em);
}

.page {
    outline: 0;
    padding: 0 var(--page-padding);
    margin-top: calc(0px - var(--menu-bar-height));
    /* Compensate for the #menu-bar-hover-placeholder */
}

.page-wrapper {
    box-sizing: border-box;
}

.js:not(.sidebar-resizing) .page-wrapper {
    transition: margin-left 0.3s ease, transform 0.3s ease;
    /* Animation: slide away */
}

.content {
    overflow-y: auto;
    padding: 0 15px;
    padding-bottom: 50px;
}

.content main {
    margin-left: auto;
    margin-right: auto;
    max-width: var(--content-max-width);
    scroll-margin-top: 200px;
}

.content p {
    line-height: 1.5em;
}

.content ol {
    line-height: 1.45em;
}

.content ul {
    line-height: 1.45em;
}

.content a {
    text-decoration: none;
}

.content a:hover {
    text-decoration: underline;
}

.content img {
    position: relative;
    z-index: 1;
    max-width: 100%;
    transition: all .2s ease-in-out;
}

.content img:hover {
    transform: scale(1.8);
    z-index: 2;
    box-shadow: .2em .2em .4em .1em #00000040;
}

.content .header:link,
.content .header:visited {
    color: var(--header-fg);
}

.content .header:link,
.content .header:visited:hover {
    text-decoration: none;
}

table {
    margin: 0 auto;
    border-collapse: collapse;
}

table td {
    padding: 3px 20px;
    border: 1px var(--table-border-color) solid;
}

table thead {
    background: var(--table-header-bg);
}

table thead td {
    font-weight: 700;
    border: none;
}

table thead th {
    padding: 3px 20px;
}

table thead tr {
    border: 1px var(--table-header-bg) solid;
}

/* Alternate background colors for rows */
table tbody tr:nth-child(2n) {
    background: var(--table-alternate-bg);
}


blockquote {
    margin: 28px 0;
    padding: 0 20px;
    color: var(--fg);
    background-color: var(--quote-bg);
    border-top: .1em solid var(--quote-border);
    border-bottom: .1em solid var(--quote-border);
    border-left: .4em solid var(--quote-border);
    border-right: .1em solid var(--quote-border);
    border-radius: .4em;
    box-shadow: .2em .2em .4em .1em #00000040;
}


pre {
    margin: 28px 0;
    line-height: 1.5em;
}

:not(.footnote-definition)+.footnote-definition,
.footnote-definition+ :not(.footnote-definition) {
    margin-top: 2em;
}

.footnote-definition {
    font-size: 0.9em;
    margin: 0.5em 0;
}

.footnote-definition p {
    display: inline;
}

.tooltiptext {
    position: absolute;
    visibility: hidden;
    color: #fff;
    background-color: #333;
    transform: translateX(-50%);
    /* Center by moving tooltip 50% of its width left */
    left: -8px;
    /* Half of the width of the icon */
    top: -35px;
    font-size: 0.8em;
    text-align: center;
    border-radius: 6px;
    padding: 5px 8px;
    margin: 5px;
    z-index: 1000;
}

.tooltipped .tooltiptext {
    visibility: visible;
}

.chapter li.part-title {
    color: var(--sidebar-fg);
    background-color: var(--sidebar-part-title);
    margin: 5px 0px;
    font-weight: bold;
}

.image-grid {
    line-height: 0;
}

.image-grid td {
    border-width: 0;
    padding: 0;
}

.image-grid tbody tr:nth-child(2n) {
    background: none;
}