/* [[file:~/dotfiles/emacs/website/website.org::style-css-variables][style-css-variables]] */
/** CSS variables
 */

:root {
    /* Body */
    /* ---- */
    --body-bg: white;
    --content-padding: 10px;
    --content-bg: #F1F1F1;
    --content-box-shadow: 0;
    --body-margin: 30px; /* not used for small screens */

    /* Footer */
    /* ------ */
    --footer-border: 1px solid black;
    --footer-padding: 10px;
    --footer-buttons-bg: #4C6FB0;
    --footer-buttons-bg-hover: navy;
    --footer-buttons-padding: 5px 10px;
    --footer-buttons-color: white;
    --footer-buttons-font-size: 90%;
    --footer-buttons-border: 2px solid navy;
    --footer-buttons-min-width: 270px;

    /* Table of contents */
    /* ----------------- */

    /* Basic style */
    --toc-bg: #f1f1f1;
    --toc-box-shadow: 0 0 0.8em #777777;
    --toc-border-radius: 5px;
    --toc-li-color: black;
    --toc-hover-bg-color: #555;
    --toc-hover-color: white;

    /* Layout */
    --toc-nav-vspacing: 20px;
    --toc-base-padding: 5px;
    --toc-ul-padding-left: 20px;
    --toc-local-padding: 5px;
    --toc-extra-padding-x: 4px;

    /* Navigation bar */
    /* -------------- */

    /* Basic style */
    --nav-bg: #333;
    --nav-hover: #111;

    /* RSS */
    /* --- */
    --rss-img: url("/blog/images/feed-icon-28x28.png");

    /* Tables */
    /* ------ */
    --tbl-border-color: #4E4E4F;
    --tbl-border-size: 1px;

    /* Org-js */
    /* ------ */
    --org-js-console-bg: var(--footer-buttons-bg);

    /* Fonts */
    /* ----- */

    /* Text */
    --font-body-family: Arial, sans-serif;
    --font-body-size: 14pt;

    /* Code */
    --font-code-family: DejaVu, Lucida Console, monospace;
    --font-code-color: #4E4E4F;
    --font-code-size: 11pt;
    --font-src-family: DejaVu, Lucida Console, monospace;
    --font-example-family: DejaVu, Lucida Console, monospace;
    --font-example-size: 11pt;

    /* Links */
    --font-a-color: navy;
    --font-a-coderef-color: #7082BC;

    /* Color scheme */
    /* ------------ */

    /* Source blocks */
    --src-bg: #fBF9E7;
    --lua-bg: var(--src-bg);

}

/** Responsive variables
 */

/* Large screens */
@media (min-width: 1024px) {
    :root {
        --side-width: 250px;
        --body-width: calc(92% - var(--side-width));
        --nav-base-font-size: 80%;
        --nav-height: 50px;
        --nav-padding: 14px 16px;
        --toc-base-font-size: 70%;
        --toc-ul-font-size: 150%;
        --toc-ul-local-font-size: 130%;
        --toc-ul-2-font-size: 80%;
        --toc-ul-3-font-size: 80%;
        --font-src-size: 11pt;
        --rss-padding: 0 0 0 25px;
        --rss-size: 25px 25px;
        --rss-pos: 50%;
    }
}

/* Medium screens */
@media (min-width: 600px) and (max-width: 1024px) {
    :root {
        --side-width: 150px;
        --body-width: calc(92% - var(--side-width));
        --nav-base-font-size: 70%;
        --nav-height: 30px;
        --nav-padding: 5px 6px;
        --toc-base-font-size: 70%;
        --toc-ul-font-size: 130%;
        --toc-ul-local-font-size: 130%;
        --toc-ul-2-font-size: 80%;
        --font-src-size: 11pt;
        --rss-padding: 0 0 19px 9px;
        --rss-size: 10px 10px;
        --rss-pos: 25%;
    }
}

/* Small screens */
@media (max-width: 600px) {
    :root {
        --side-width: 150px; /* unused in this case */
        --body-width: 100%;
        --nav-base-font-size: 80%;
        --nav-height: 30px;
        --nav-padding: 5px 6px;
        --toc-base-font-size: 80%;
        --toc-ul-font-size: 120%;
        --toc-ul-local-font-size: 130%;
        --toc-ul-2-font-size: 80%;
        --font-src-size: 10pt;
        --rss-padding: 0 0 19px 20px;
        --rss-size: 20px 20px;
        --rss-pos: 19%;
    }
}
/* style-css-variables ends here */

/* [[file:~/dotfiles/emacs/website/website.org::style-css-toc][style-css-toc]] */
/** Table of content
 */

/* Basic styling (color, font, shadow) common to global and local TOC */
#table-of-contents, .org-info-js_local-toc {
    background-color: var(--toc-bg);
    box-shadow: var(--toc-box-shadow);
    border-bottom-left-radius: var(--toc-border-radius);
    font-size: var(--toc-base-font-size);
}

/* Size (global TOC only) */
#table-of-contents {
    width: var(--side-width);
}

.org-info-js_local-toc {
    padding: var(--toc-local-padding);
}
/* style-css-toc ends here */

/* [[file:~/dotfiles/emacs/website/website.org::style-css-toc-layout_large][style-css-toc-layout_large]] */
/* Fixed vertical table of content */
@media screen and (min-width: 600px) {
    #table-of-contents {
        position: fixed;
        left: 0;
        top: calc(var(--nav-height) + var(--toc-nav-vspacing));
        bottom: var(--toc-nav-vspacing);
        padding: var(--toc-base-padding);
        overflow: auto;
    }
}
/* style-css-toc-layout_large ends here */

/* [[file:~/dotfiles/emacs/website/website.org::style-css-toc-layout_medium][style-css-toc-layout_medium]] */
@media screen and (max-width: 1024px) {
    #table-of-contents > div > ul > li > ul {
        display: none;
    }
}
/* style-css-toc-layout_medium ends here */

/* [[file:~/dotfiles/emacs/website/website.org::style-css-toc-layout_small][style-css-toc-layout_small]] */
@media screen and (max-width: 600px) {
    #table-of-contents {
        position: relative;
        width: 90%;
        margin: auto;
    }
}
/* style-css-toc-layout_small ends here */

/* [[file:~/dotfiles/emacs/website/website.org::style-css-toc-ul][style-css-toc-ul]] */
#table-of-contents ul, .org-info-js_local-toc ul {
    list-style-type: none;
    margin: 0;
    padding-left: var(--toc-ul-padding-left);
}

#table-of-contents ul {
    font-size: var(--toc-ul-font-size);
}

.org-info-js_local-toc ul {
    font-size: var(--toc-ul-local-font-size);
}

#table-of-contents > div > ul, .org-info-js_local-toc > div > ul {
    list-style-type: none;
    margin: 0;
    padding-left: var(--toc-extra-padding-x);
}

#table-of-contents > div > ul > li > ul{
    font-size: var(--toc-ul-2-font-size);
    vertical-align: middle;
}

#table-of-contents > div > ul > li > ul > li > ul{
    font-size: var(--toc-ul-3-font-size);
    vertical-align: middle;
}
/* style-css-toc-ul ends here */

/* [[file:~/dotfiles/emacs/website/website.org::style-css-toc-li][style-css-toc-li]] */
#table-of-contents li a, .org-info-js_local-toc li a {
    display: block;
    color: var(--toc-li-color);
    text-decoration: none;
}

#table-of-contents li a {
    vertical-align: middle;
}

#table-of-contents li a:hover:not(.active), .org-info-js_local-toc li a:hover:not(.active) {
    background-color: var(--toc-hover-bg-color);
    color: var(--toc-hover-color);
}
/* style-css-toc-li ends here */

/* [[file:~/dotfiles/emacs/website/website.org::style-css-navbar][style-css-navbar]] */
/** Navigation bar
 */

.topnav {
    top: 0;
    left: 0;
    max-height: var(--nav-height);
    vertical-align: middle;
    background-color: var(--nav-bg);
    width: var(--side-width);
    font-size: var(--nav-base-font-size);
}

/* RSS icon */
.feed {
    margin-left: 3px;
    padding: var(--rss-padding);
    background: var(--rss-img) no-repeat 0 var(--rss-pos);
    background-size: var(--rss-size);
}
/* style-css-navbar ends here */

/* [[file:~/dotfiles/emacs/website/website.org::style-css-navbar-large][style-css-navbar-large]] */
@media screen and (min-width: 600px) {
    .topnav {
        position: fixed;
    }
}
/* style-css-navbar-large ends here */

/* [[file:~/dotfiles/emacs/website/website.org::style-css-navbar-small][style-css-navbar-small]] */
@media screen and (max-width: 600px) {
    .topnav {
        position: relative;
        width: 100%;
    }
}
/* style-css-navbar-small ends here */

/* [[file:~/dotfiles/emacs/website/website.org::style-css-navbar-ul][style-css-navbar-ul]] */
.topnav ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    overflow: hidden;
    position: relative;
    vertical-align: middle;
}

.topnav li {
    float: left;
    vertical-align: middle;
    position: relative;
}
/* style-css-navbar-ul ends here */

/* [[file:~/dotfiles/emacs/website/website.org::style-css-navbar-li][style-css-navbar-li]] */
.topnav li a {
    display: block;
    color: white;
    text-align: left;
    padding: var(--nav-padding);
    text-decoration: none;
    position: relative;
    vertical-align: middle;
}

.topnav li a:hover:not(.active) {
    background-color: var(--nav-hover);
}

.topnav .right {
    float: right;
}
/* style-css-navbar-li ends here */

/* [[file:~/dotfiles/emacs/website/website.org::style-css-src-block][style-css-src-block]] */
pre.src {
    overflow-x: auto;
    overflow-y: auto;
    line-height: 2.5ex;
    max-height: 125ex;
}

pre.src:before {
    visibility: hidden;
    top: 0;
    left: 0;
    /* max-width: 50px; */
    /* opacity: 0.5; */
    /* border: none; */
    /* background-color: transparent; */
}

/* Source block color based on file type */
pre.src.src.src-lua {
    background-color: var(--lua-bg);
}

/* Source block label */
.src-label {
    color: darkgray;
}
/* style-css-src-block ends here */

/* [[file:~/dotfiles/emacs/website/website.org::style-css-src-block][style-css-src-block]] */
/* HTML tables */
table, th, td {
    border-color: var(--tbl-border-color);
    border: solid var(--tbl-border-size);
}
/* style-css-src-block ends here */

/* [[file:~/dotfiles/emacs/website/website.org::style-css-org-js][style-css-org-js]] */
#org-info-js_console-container {
    bottom: 0;
    margin-top: 0;
}
/* style-css-org-js ends here */

/* [[file:~/dotfiles/emacs/website/website.org::style-css-body][style-css-body]] */
/* Body */
body {
    width: var(--body-width);
    overflow-x: hidden;
    background-color: var(--body-bg);
}

@media (min-width: 600px) {
    body {
        margin-left: calc(var(--side-width) + var(--body-margin));
        margin-right: var(--body-margin);
    }
}

@media (max-width: 600px) {
    body {
        margin-left: 0;
        margin-right: 0;
    }
}
/* style-css-body ends here */

/* [[file:~/dotfiles/emacs/website/website.org::style-css-preamble][style-css-preamble]] */
/* Text before post (date and help) */
.foreword {
    color: gray;
    font-size: 80%;
}
/* style-css-preamble ends here */

/* [[file:~/dotfiles/emacs/website/website.org::style-css-home-up][style-css-home-up]] */
@media screen and (max-width: 600px) {
    #org-div-home-and-up {
        display: none;
    }
}
/* style-css-home-up ends here */

/* [[file:~/dotfiles/emacs/website/website.org::style-css-content][style-css-content]] */
/* Main content */
#content {
    background-color: var(--content-bg);
    box-shadow: var(--content-box-shadow);
    padding-left: var(--content-padding);
    padding-right: var(--content-padding);
}
/* style-css-content ends here */

/* [[file:~/dotfiles/emacs/website/website.org::style-css-postamble][style-css-postamble]] */
#postamble {
    padding: var(--footer-padding);
    border: var(--footer-border);
}
/* style-css-postamble ends here */

/* [[file:~/dotfiles/emacs/website/website.org::style-css-fonts][style-css-fonts]] */
/* Fonts */
body {
    font-family: var(--font-body-family);
    font-size: var(--font-body-size);
}

code {
    font-family: var(--font-code-family);
    font-size: var(--font-code-size);
    color: var(--font-code-color);
}

pre.src {
    font-family: var(--font-src-family);
    font-size: var(--font-src-size);
    background-color: var(--src-bg);
}

pre.example {
    font-family: var(--font-example-family);
    font-size: var(--font-example-size);
}

/* Links */
a {
    text-decoration: none;
    color: var(--font-a-color);
}

a.coderef {
    color: var(--font-a-coderef-color);
}
/* style-css-fonts ends here */

/* [[file:~/dotfiles/emacs/website/website.org::style-css-button][style-css-button]] */
.footer-button {
    border: none;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    background-color: var(--footer-buttons-bg);
    color: var(--footer-buttons-color);
    padding: var(--footer-buttons-padding);
    font-size: var(--footer-buttons-font-size);
    border: var(--footer-buttons-border);
    min-width: var(--footer-buttons-min-width);
}
.footer-button:hover {
    background-color: var(--footer-buttons-bg-hover);
}
/* style-css-button ends here */

/* [[file:~/dotfiles/emacs/website/website.org::style-css-kbd][style-css-kbd]] */
kbd {
    font-family: DejaVu, Lucida Console, monospace;
    font-size: 85%;
    display: inline-block;
    padding: 0.5px 5px;
    color: #616161;
    vertical-align: middle;
    background-color: #fefefe;
    border: solid 1px #616161;
    border-radius: 4px;
    box-shadow: 0 0 12px 2px #dbdbdb inset, 0 4px 1px -2px #dbdbdb;
}
/* style-css-kbd ends here */
