/* ==================================================================
    DEFAULT FONT AND LAYOUT
================================================================== */

:root {
    --background: #282a36;
    --selection: #44475a;
    --foreground: #f8f8f2;
    --comment: #6272a4;
    --cyan: #8be9fd;
    --green: #50fa7b;
    --orange: #ffb86c;
    --pink: #ff79c6;
    --purple: #bd93f9;
    --red: #ff5555;
    --yellow: #f1fa8c;
}

html {
    font-family: Palatino, serif;
    font-size  : 17px;
    background-color: #282a36;
    color: #f8f8f2;
}

/* ==================================================================
    BASIC GRID FOR PROFILE PIC
================================================================== */

.franklin-content .row {
  display: block; }

.franklin-content .left {
  float: left;
  margin-right: 15px; }

.franklin-content .right {
    float: right; }

.franklin-content .container img {
    width: auto;
    padding-left: 0;
    border-radius: 10px; }

.franklin-content .footnote {
    position: relative;
    top: -0.5em;
    font-size: 70%;
}

/* ==================================================================
    FOOT / COPYRIGHT
================================================================== */

.franklin-content .page-foot a {
    text-decoration: none;
    color: #6272a4;
}

.page-foot {
    font-size: 80%;
    font-family: Arial, serif;
    color: #44475a;
    text-align: right;
    margin-top: 6em;
    border-top: 1px solid #6272a4;
    padding-top: 2em;
    margin-bottom: 4em;
}

/* ==================================================================
    TEXT GEOMETRY
================================================================== */

.franklin-content {
    position: relative;
    padding-left: 8%;
    padding-right: 8%;
    line-height: 1.35em;
}

/* on wide screens, fix content width to a max value */
@media (min-width: 1024px) {
    .franklin-content {
        width: 1024px;
        margin-left: auto;
        margin-right: auto; }
    }

/* on narrow device, reduce margins */
@media (max-width: 480px) {
    .franklin-content {
        padding-left: 6%;
        padding-right: 6%; }
    }

/* ==================================================================
    TITLES
================================================================== */

.franklin-content h1 { font-size: 24px; }
.franklin-content h2 { font-size: 22px; }
.franklin-content h3 { font-size: 20px; }

.franklin-content h1, h2, h3, h4, h5, h6 {
    text-align: left; }

.franklin-content h1 {
    padding-bottom: 0.5em;
    border-bottom: 3px dashed #44475a;
    margin-top: 1.5em;
    margin-bottom: 1em;
}

.franklin-content h2 {
    padding-bottom: 0.3em;
    border-bottom: 1px dashed #44475a;
    margin-top: 2em;
    margin-bottom: 1em;
}

.franklin-content h1 a { color: #bd93f9; }
.franklin-content h1 a:hover {text-decoration: none;}
.franklin-content h2 a { color: #bd93f9; }
.franklin-content h2 a:hover {text-decoration: none;}
.franklin-content h3 a { color: #bd93f9; }
.franklin-content h3 a:hover {text-decoration: none;}
.franklin-content h4 a { color: #bd93f9; }
.franklin-content h4 a:hover {text-decoration: none;}
.franklin-content h5 a { color: #bd93f9; }
.franklin-content h5 a:hover {text-decoration: none;}
.franklin-content h6 a { color: inherit; }
.franklin-content h6 a:hover {text-decoration: none;}

.franklin-content table {
    margin-left: auto;
    margin-right: auto;
    border-collapse: collapse;
    text-align: center;
}
.franklin-content th, td{
    padding: 10px;
    border: 1px solid #44475a;
}

.franklin-content blockquote {
    background: #44475a;
    border: 2px solid #ffb86c;
    margin: 1.5em 10px;
    padding: 0.5em 10px;
    font-style: italic;}

.franklin-content blockquote p {
    display: inline; }

/* ==================================================================
    GENERAL FORMATTING
================================================================== */

/* spacing between bullet points */
.franklin-content li p {
        margin: 10px 0; }

.franklin-content a {
    color: #8be9fd;
    text-decoration: none; }

.franklin-content a:hover {
    /*background-color: #f1fa8c;*/
    text-decoration: overline;
    /*color: #282a36;*/
    color: #f1fa8c;
    border-radius: 2px;
}

/* ==================================================================
    HYPERREFS AND FOOTNOTES
================================================================== */

.franklin-content .eqref a  { color: #50fa7b; }
.franklin-content .bibref a { color: #50fa7b; }
.franklin-content .egref a:hover { color: #282a36; }
.franklin-content .bibfer a:hover { color: #282a36; }

.franklin-content sup {
    font-size: 70%;
    vertical-align: super;
    line-height: 0; }

.franklin-content table.fndef  {
    margin: 0;
    margin-bottom: 10px;}
.franklin-content .fndef tr, td {
    padding: 0;
    border: 0;
    text-align: left;}
.franklin-content .fndef tr {
    border-left: 2px solid lightgray;
    }
.franklin-content .fndef td.fndef-backref {
    vertical-align: top;
    font-size: 70%;
    padding-left: 5px;}
.franklin-content .fndef td.fndef-content {
    font-size: 80%;
    padding-left: 10px;
    width: 100%;}

/* ==================================================================
    IMAGES in CONTENT
================================================================== */

.franklin-content img {
    width: 70%;
    text-align: center;
    padding-left: 10%; }

.franklin-content .img-small img {
    width: 50%;
    text-align: center;
    padding-left: 20%; }

/* ==================================================================
    KATEX
================================================================== */

body { counter-reset: eqnum; }

.katex { font-size: 1em !important;
    color: #ff5555;
}

.katex-display .katex {
    /* Overwrite KaTeX settings. */
    display: inline-block; 
    /* Allow display equations to wrap on small screens. */
    white-space: normal;
    padding: 1.2em;
    background-color: #ffffff;
    color: #000000;
    border-radius: 0.5em;
}

.katex-display::after {
    counter-increment: eqnum;
    content: "(" counter(eqnum) ")";
    position: relative;
    float: right;
    padding-right: 5px;
}

.katex-mathml {
}

.nonumber .katex-display::after {
    counter-increment: nothing;
    content: "";
}

/* ==================================================================
    CODE & HIGHLIGHT.JS
================================================================== */

code {
    background-color: var(--selection);
    padding: 0.1em 0.2em;
    font-size: 85%;
    border-radius: 0.2em;
}

a code {
    color: var(--cyan);
}
a:hover code {
    color: var(--yellow);
}

/* .franklin-content code { */
    /* background-color: rgba(27,31,35,0.05); */
    /* padding: 0.1em 0.2em; */
    /* border-radius: 2px; */
    /* font-size: 90%; } */

.hljs {
    background-color: var(--background);
    color: var(--foreground);
    font-size: 90%;
    line-height: 1.35em;
}

.hljs-keyword {
    color: var(--pink);
}
.hljs-built_in {
    color: var(--pink);
}
.hljs-number {
    color: var(--red);
}

.hljs-meta, .hljs-metas, .hljs-metap {
    color: var(--green);
}

.hljs-meta {
    color: var(--green);
}

.hljs-metas {
    color: var(--red);
}

.hljs-metap {
    color: var(--purple);
}

.hljs-string {
    color: var(--yellow);
}

.hljs-comment {
    color: var(--comment);
}

.hljs-tag {
    color: var(--pink);
}

.hljs-name {
    color: var(--cyan);
}

.hljs-attr {
    color: var(--purple) !important;
}

.hljs-template-variable {
    color: var(--cyan);
}

.hljs-template-tag {
    color: var(--orange);
}

.hljs-built_in {
    color: var(--pink);
}

.hljs-type {
    color: var(--cyan);
}

.hljs-title {
    color: var(--purple);
}

.hljs-variable {
    color: var(--foreground);
}

.hljs-symbol {
    color: var(--orange);
}

.hljs-literal {
    color: var(--red);
}


/* ==================================================================
    BOXES
================================================================== */

.franklin-content .colbox-blue {
    background-color: #282a36;
    padding-top: 5px;
    padding-right: 10px;
    padding-left: 10px;
    padding-bottom: 5px;
    margin-left: 5px;
    margin-top: 5px;
    margin-bottom: 5px;
    border-radius: 0 0 0 0;
    border-left: 5px solid #4C9CF1;
}
