/* Color palette */
:root {
    --azure:       #00ffff;
    --beige:       #ffddbb;
    --black:       #373737;
    --blue-dark2:  #2020f0;
    --blue-dark:   #729fcf;
    --blue-light:  #a0ffff;
    --green-dark:  #00cf12;
    --green-light: #b8ff60;
    --grey2:       #93a1a1;
    --grey3:       #dddddd;
    --grey4:       #f2f2f2;
    --grey:        #b3b3b3;
    --orange:      #ff9900;
    --red-dark:    #662222;
    --red:         #ff4040;
    --white-back:  #fffff0;
    --white:       #ffffff;
    --yellow:      #ffff50;
    --yellow1:     #ffe466;
    --yellow2:     #fff8dc;
}


/* Inconsolata typefaces */
@font-face {
    font-display: swap;
    font-family: Inconsolata;
    src: url(../fonts/Inconsolata-Regular.ttf);
    font-weight: normal;
}

@font-face {
    font-display: swap;
    font-family: Inconsolata;
    src: url(../fonts/Inconsolata-Bold.ttf);
    font-weight: bold;
}

/* Core elements */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    overflow-y: scroll;
    height: 100%;
    word-wrap: break-word;
    background-color: var(--white-back);
    color: var(--black);
    margin: 0 auto;
    padding: 1.5rem;
}

@media (min-width: 768px) {
    html {
        font-size: 125%;
        max-width: 42em;
    } }

body {
    display: block;
    font-size: 16px;
    line-height: 1.4;
}


/* Preamble (header) */
#preamble {
    font-family: 'Inconsolata', sans-serif;
    display: block;
    margin: 0 auto 2rem auto;
    border-bottom: 2px solid var(--red-dark);
}

#preamble .banner a {
    text-decoration: none;
    color: inherit;
}

#preamble .banner .logo {
    display: inline-block;
    float: left;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-size: 50px 50px;
    background-repeat: no-repeat;
    margin-right: 1rem;
}

#preamble .banner h1 {
    margin-top: 0;
    margin-bottom: 0;
    padding-bottom: 1rem;
    color: var(--blue-dark2);
    letter-spacing: .01em;
    font-weight: 700;
    font-style: normal;
    font-size: 2rem;
    line-height: 2rem;
}

#preamble header nav {
    text-align: right;
    padding-bottom: 0.3rem;
}

#preamble header nav a {
    text-align: right;
    margin-left: 1.2rem;
}

/* Main content */
#content {
    text-align: justify;
    max-width: 900px;
    margin: auto auto 2rem auto;
}

#content #table-of-contents h2 {
    display: none;
}

#content h1,
#content h2,
#content h3,
#content h4,
#content h5,
#content h6 {
    font-weight: bold;
    color: var(--red-dark);
    margin-top:    1rem;
    margin-bottom: 0.5em;
}

#content h1 {
    font-size: 2.0rem;
    padding-bottom: 0.5rem;
}

#content h2 {
    font-size: 2.0rem;
}

#content h3 {
    font-size: 1.60rem;
}

#content h4 {
    font-size: 1.30rem;
}

#content .title {
    text-align: center;
    font-size: 2.25rem;
    font-weight: bold;
    padding-top: 0;
}

#content .underline {
    text-decoration: underline;
}

#content p {
    margin: 1em 0;
    line-height: 1.5;
}

/* Lists */
#content ol,
#content ul {
    display: block;
    list-style-type: disc;
    margin-block-start: 1em;
    margin-block-end: 1em;
    padding-inline-start: 2em;
}

#content ol li ol,
#content ol li ul,
#content ul li ol,
#content ul li ul {
    margin: 0;
}

#content ol li p,
#content ul li p {
    margin: 0;
}

/* Tables */
#content tr:nth-child(even) {
    background-color:var(--grey4);
}

#content tr:hover {
    background-color: var(--grey3);
}

#content th {
    background-color: var(--blue-dark);
}


#content table {
    border: 1px solid black;
    border-collapse: collapse;
}

#content th {
    text-align: left;
    border: 1px solid black;
    padding: 0.5rem;
    margin-left: auto ;
    margin-right: auto ;
}

#content td {
    text-align: left;
    border: 1px solid black;
    padding: 0.5rem;
}

/* Blocks */
#content pre {
    border: 1pt solid var(--grey2);
    white-space: pre;
    word-wrap: break-word;
    padding: 0.5rem;
}

#content .example {
    background-color:var(--beige);
}

#content code {
    color: var(--red);
    background-color: var(--white);
    white-space: nowrap;
    font-size: 0.6rem;
}

#content blockquote {
    margin-bottom: 10px;
    padding: 10px;
    display: block;
    margin-block-start: 1em;
    margin-block-end: 1em;
    margin-inline-start: 40px;
    margin-inline-end: 40px;
    background-color: var(--yellow2);
    /* border-width: 0 0 0 2px; */
    /* border-style: none none none solid; */
    /* border-color: var(--yellow1); */
    border-left: 2px solid var(--yellow1);
}

/* Images */
#content .figure img {
    max-height:100% !important;
    max-width:100% !important;
}

#content .figure p {
    text-align: center;
}

/* Timestamps (Org macro) */
#content .timestamp {
    font-weight: bold;
}

#content .timestamp h1, h2, h3, h4, h5 {
    font-weight: normal;
}

/* "First published:" */
#content .post-date {
    width: 100%;
    text-align: right;
    padding-bottom: 0.5rem;
}

/* Postamble (footer) */
#postamble {
    text-align: center;
    border-top: 2px solid var(--red-dark);
    padding: 2rem 0 2rem 0;
}

#postamble img {
    vertical-align: middle;
    margin: 0;
    object-fit: contain;
}

/* Utility styles */
.blink {
    -webkit-animation-name: blinker;
    -webkit-animation-duration: 3s;
    -webkit-animation-timing-function: linear;
    -webkit-animation-iteration-count: infinite;

    -moz-animation-name: blinker;
    -moz-animation-duration: 3s;
    -moz-animation-timing-function: linear;
    -moz-animation-iteration-count: infinite;

    animation-name: blinker;
    animation-duration: 3s;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}

@keyframes blinker {
    50% {
        opacity: 0;
    }
}
