/*****
 * Styles for Hugo theme "Turuxi"
 * @author Petri Salmela <pesasa@iki.fi>
 *****/
:root {
    --porixi-main: #def;
    --porixi-main-light: #def;
    --porixi-main-trans: rgba(55,171,200, 0.5);
    --porixi-main-light-trans: rgba(135,205,222, 0.9);
    --porixi-shadow: rgba(0,0,0,0.5);
    --porixi-beak: #f8be11;
    --porixi-hl1: #ff4141;
    --porixi-hl2: #0084c8;
    --porixi-block: #cfe9f6;
    --porixi-dark: #111;
    --porixi-light: #fafafa;
    --porixi-light-bg: #def;
    --porixi-neutral: #eee;
    --porixi-neutral-dark: #ddd;
    --porixi-link: #005c94;
    --porixi-vlink: #164450;
    --porixi-uvlink: #ba0000;
}

body {
    margin: 0;
    padding: 0;
    font-family: "Open Sans", helvetica, Arial, sans-serif;
    background: var(--porixi-neutral);
    display: grid;
    grid-template-areas: "header header"
                         "body body"
                         "footer footer";
    grid-template-rows: auto 1fr auto;
    grid-template-columns: 0 1fr;
    height: 100vh;
}

header {
    grid-area: header;
    background-color: var(--porixi-main);
    border-top: 1px solid var(--porixi-main);
    box-shadow: 0 0px 10px 3px var(--porixi-shadow);
    padding: 0.1em 2em;
    margin: 0;
    display: flex;
    flex-flow: row nowrap;
    justify-content: flex-start;
    position: relative;
    z-index: 1;
}

header .sitehead {
    flex-grow: 1;
    flex-shrink: 0;
    display: flex;
    flex-flow: column nowrap;
}

header h1.sitetitle {
    text-align: center;
    margin: 0;
    font-size: 240%;
    flex-grow: 1;
    display: flex;
    flex-flow: row nowrap;
    justify-content: center;
    align-items: center;
}

header h1.sitetitle a {
    color: var(--porixi-dark, black);
    text-decoration: none;
}
header .sitehead .section-menu {
    display: flex;
    flex-flow: row nowrap;
    list-style: none;
    margin: 0.2em 1em;
    padding: 0;
    justify-content: center;
}
header .sitehead .section-menu li {
    margin: 0 0.5em;
}
header .sitehead .section-menu li a {
    text-decoration: none;
    display: block;
    color: var(--porixi-dark);
    font-weight: bold;
    border: 4px solid var(--porixi-hl2);
    padding: 0.2em 0.5em;
    border-radius: 1em;
}
header .sitehead .section-menu li.active a {
    background: var(--porixi-hl2);
    color: var(--porixi-light);
}

.main {
    grid-area: body;
    margin: 0;
    padding: 0.1em 2em;
}

nav.toc {
    margin: 0 auto;
    float: left;
}

nav.toc ul {
    padding-left: 1.4em;
}
nav.toc a {
    color: var(--porixi-link);
}

nav.toc a:visited {
    color: var(--porixi-vlink);
}

nav.toc h2 {
    font-size: 120%;
    color: var(--porixi-dark);
    border-bottom: 3px double var(--porixi-dark);
}

nav.toc h2 a {
    text-decoration: none;
    color: var(--porixi-dark);
}

nav.toc h2 a:visited {
    color: var(--porixi-dark);
}

nav.toc h3.toc-section-name {
    font-size: 100%;
    color: #2d2d2d;
    border-bottom: 1px solid #2d2d2d;
    text-transform: capitalize;
}

nav.toc ul.side-menu.sidemenu-main {
    list-style: none;
    margin: 1em 0;
    padding: 0;
}

.content {
    margin: 0;
    margin-left: 13em;
    height: 100%;
}

article {
    background-color: var(--porixi-light, white);
    color: var(--porixi-dark, black);
    flex-grow: 1;
    margin: 0 auto;
    padding: 0.1em 1em;
    max-width: 60em;
    border-left: 2px solid var(--porixi-neutral-dark);
    border-right: 2px solid var(--porixi-neutral-dark);
    height: 100%;
}

article::after {
    display: block;
    content: " ";
    clear: both;
}

article h1.page-title {
    font-size: 200%;
    color: var(--porixi-dark);
    border-bottom: 3px solid var(--porixi-beak);
    border-bottom: 3px solid var(--porixi-hl1);
    margin-top: 0.5em;
}

article h1 {
    color: var(--porixi-dark);
    font-size: 150%;
    clear: right;
    margin-top: 2em;
    border-bottom: 1px solid var(--porixi-hl2);
    border-bottom: 1px solid var(--porixi-main);
}

article h2 {
    border-bottom: 1px solid var(--porixi-neutral-dark);
}

article blockquote {
    background-color: var(--porixi-block);
    padding: 0.2em 1em;
    border-left: 5px solid var(--porixi-hl1);
    font-style: italic;
    font-family: serif;
}

article .floatmenubox {
    float: right;
    background-color: var(--porixi-light-bg);
    border: 2px solid var(--porixi-hl1);
    font-size: 90%;
    margin-left: 0.5em;
    margin-bottom: 0.5em;
    padding: 0.5em;
    max-width: 13em;
}

article .floatmenubox ul {
    padding: 0.5em 0.2em 0.5em 1.5em;
    margin: 0;
}

article p > img:first-child:last-child {
    display: block;
    margin: 0.5em auto;
    max-width: 95%;
    height: auto;
}

article img[title="fig:size=30px"] {
    width: 30px;
}
article img[title="fig:size=50px"] {
    width: 50px;
}
article img[title="fig:size=100px"] {
    width: 100px;
}
article img[title="fig:size=150px"] {
    width: 150px;
}
article img[title="fig:size=200px"] {
    width: 200px;
}
article img[title="fig:size=400px"] {
    width: 400px;
}
article img[title="fig:size=600px"] {
    width: 600px;
}
article img[title="fig:size=800px"] {
    width: 800px;
}

article figure {
}

article figure img {
    max-width: 100%;
    height: auto;
}

article figure figcaption {
    font-size: 80%;
}

article figure figcaption h4 {
    margin: 0;
}

article figure figcaption p {
    margin: 0.2em 0;
}

article figure.floatimage {
    max-width: 250px;
}

article figure.floatimage img[src$=".svg"] {
    width: 250px;
    height: auto;
}

article .floatright {
    float: right;
}

article .floatleft {
    float: left;
}

article .centerimage {
    margin: 0.1em auto;
    text-align: center;
}

article .centerimage figcaption {
    text-align: left;
}

article a {
    color: var(--porixi-link);
}

article a:visited {
    color: var(--porixi-vlink);
}

article em {
    color: var(--porixi-hl1);
}

article table {
    border-collapse: collapse;
    border: 1px solid #2d2d2d;
}

article table td,
article table th {
    padding: 0.1em 0.3em;
}

article table th {
    background-color: #0084c8;
    background-color: var(--porixi-main);
    color: var(--porixi-dark);
    border: 1px solid #2d2d2d;
}

article table tr:nth-child(even) {
    background-color: var(--porixi-block);
}

article table tr:nth-child(odd) {
    background-color: var(--porixi-light);
}

article table td {
    border-right: 1px solid #999;
    border-left: 1px solid #999;
    vertical-align: top;
}

article .page-classes {
    border: 1px solid var(--porixi-main);
    padding: 0.2em 0.5em;
    display: flex;
    flex-flow: row nowrap;
    clear: right;
    margin: top: 0.3em;
}

article .page-classes ul.page-class-list {
    list-style: none;
    display: flex;
    flex-flow: row nowrap;
    margin: 0;
    padding: 0;
}

article .page-classes ul.page-class-list .page-class-item {
    border-left: 1px solid var(--porixi-dark);
    padding: 0 0.5em;
}

article .page-classes ul.page-class-list .page-class-item:first-child {
    border: none;
}

article section.category-item {
    border: 1px solid var(--porixi-main-light);
    margin: 0.5em 0;
    padding: 0.5em;
}

article section.category-item h1.title {
    font-size: 130%;
    margin: 0;
    padding: 0;
    background: var(--porixi-main-light);
    margin: -0.38em -0.38em 0 -0.38em;
}

footer {
    grid-area: footer;
    background-color: var(--porixi-main);
    padding: 0.1em 2em;
    margin: 0;
}

footer a {
    color: var(--porixi-vlink);
}

/**
 * Taxonomy terms
 */
.taxonomylist {
    list-style: none;
}

/**
 * Mobile
 */
@media only screen and (max-width: 800px) {
    header .sitehead {
        flex-shrink: 1;
    }
    header .sitehead .section-menu {
        flex-flow: row wrap;
    }
    header .sitehead .section-menu .section-menu-item {
        margin: 0.3em 0.5em;
        font-size: 90%;
    }
    .main {
        padding: 0.1em 0.3em;
        display: flex;
        flex-flow: column;
    }
    .content {
        order: 1;
        margin: 0;
    }
    nav.toc {
        width: auto;
        font-size: 90%;
        order: 2;
    }
}
