@import url("basic.css");

:root {
    --width: 34;
    --accent: #4070a0;
    --main-background: #fff;
    --main-foreground: #404040;
    --color-foreground-primary: #f50;
    --a-color: var(--accent);
    --pre-background: #f5f5f5;
    --span-pre-foreground: #BA2121;
}

div.highlight {
    background: var(--pre-background);
}

div.nbinput.container div.input_area {
    border: 1px solid #e0e0e0 !important;
}

@media (prefers-color-scheme: dark) {
    :root {
        --main-background: #2b2b2b;
        --main-foreground: #efefef;
        --a-color: #7ebfff;
        --pre-background: #212121;
        --span-pre-foreground: #D5FF80;
    }
    
    div.highlight {
      background: var(--pre-background);
    }

    div.nbinput.container div.input_area {
        border: 1px solid #4a4a4a !important;
    }
    
    body {
        background-color: var(--main-background);
        color: var(--main-foreground);
    }
    
}


@media (max-width: 840px) {
    div.nbinput.container div.prompt, div.nboutput.container div.prompt {
        width: unset;
        text-align: left;
        padding: 0.4em;
    }
    
    div.nbinput.container, div.nboutput.container {
        flex-direction: column;
    }
    
    div.nbinput.container div.input_area, div.nboutput.container div.output_area {
        width: 100%;
    }

    div.nbinput.container div.prompt > div, div.nboutput.container div.prompt > div {
        position: unset !important;
    }
}

/* centers things in the output area */
div.nboutput.container div.output_area > img,
div.nboutput.container div.output_area > svg,
div.nboutput.container div.output_area > video {
    display: block;
    margin: auto !important;
    max-width: 100%;
}

*, ::before, ::after {
  box-sizing: border-box;
  margin: 0;
}

html {
    height: 100%;
    font-family: sans-serif;
    font-weight: 300;
    font-feature-settings: 'onum','pnum';
    font-size: clamp(16px, 94vw / var(--width), 20px);
    line-height: 1.5;
    color: var(--main-foreground);
}

body {
  display: grid;
  grid-template-rows: max-content 1fr max-content;
  height: 100%;
}

main {
    padding: 1rem 1rem 2rem 1rem;
    width: 100vw;
}

section > div.nbinput.container,
section > div.nboutput.container,
section > *:not(section),
header > nav,
div.relnav > div,
footer > div {
    max-width: calc(1rem * var(--width));
    margin: 0 auto;
    padding: 1rem 0 0;
}

section > div[class*="highlight-"] {
    font-size: smaller;
    margin: 0 auto;
}

pre {
    padding: 5px;
}

span.pre {
  background: var(--pre-background);
  padding: 2px;
  color: var(--span-pre-foreground);
}

div.nbinput.container, div.nboutput.container {
    font-size: smaller;
}

/* this places the jupyter notebook prompt counter [1]a bit
outside so the code box aligns with the rest of the text */
div.nbinput.container div.prompt,
div.nboutput.container div.prompt {
    width: unset !important;
}

.blogheader {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1em;
}

header {
    padding: 2rem 1rem;
    background-color: var(--accent);
    width: 100vw;
}

header > nav,
footer > div {
    display: flex;
    justify-content: space-between;
    padding: 0;
}

header > nav > div > a {
    padding: 0 0 0 1em;
}

header a {
    color: #fff;
    font-weight: bold;
    text-decoration-line: none;
}

footer a {
  color: #fff;
  text-decoration-color: #fff;
}

header a:visited, footer a:visited{
  color: #fff;
}

header a:hover, footer a:hover {
  text-decoration-line: underline;
  text-decoration-style: solid;
  text-decoration-color: #fff;
}

footer {
    text-align: right;
    color: #fff;
    margin: 0 auto;
    background-color: var(--accent);
    width: 100%;
    padding: 1rem;
}

figure {
    width: fit-content;
    margin: auto;
}

a {
  color: var(--a-color);
  text-decoration-color: var(--a-color);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  text-decoration-style: dotted;
}

a:visited {
  color: var(--a-color);
}

a:hover {
  text-decoration-style: solid;
}

ul.simple p {
    padding-bottom: 1px;
}

abbr, acronym {
  border-bottom: dotted 1px;
  cursor: help;
  text-decoration: underline dotted;
  text-decoration-style: dotted;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

/* Format headers */
section > h1 {
  font-size: 2.0rem;
  margin-top: 1rem;
}

section > h2 {
  font-size: 1.6rem;
  margin-top: 1rem;
}

section > h3 {
  font-size: 1.4rem;
  margin-top: 1rem;
}

section > h4 {
  font-size: 1.24rem;
}

section > h5 {
  font-size: 1.15rem;
}

section > h6 {
  font-size: 0.96rem;
}
