html {
    background-color: var(--bgcolor-layer1);
    background-image: url('/img/escheresque_ste.png');
    background-position: fixed;
    color: var(--color-layer1);
    font-family: BlinkMacSystemFont, -apple-system, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
}

body {
    margin: 0;
    padding: 0;
}

#overlay {
    z-index: 999;
    display: none;
    position: fixed;
    top: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bgcolor-overlay);
    justify-content: center;
    align-items: center;
    -webkit-transition: all 0.5s ease-in-out;
       -moz-transition: all 0.5s ease-in-out;
        -ms-transition: all 0.5s ease-in-out;
         -o-transition: all 0.5s ease-in-out;
            transition: all 0.5s ease-in-out;
}

.spinner {
    width:64px;
    height:64px;
    border: var(--spinner-ring-main);
    margin-left:-8px;
    margin-top:-8px;
    border-radius:50%;
    opacity:0.75;
    border-top-color: var(--spinner-ring-alternate);
    animation: spin 1s ease-in-out infinite;
    -webkit-animation: spin 1s ease-in-out infinite;
}
@keyframes spin { to { -webkit-transform: rotate(360deg); } }
@-webkit-keyframes spin { to { -webkit-transform: rotate(360deg); } }

h1,h2,h3,h4,h5,h6 { font-weight:normal; text-transform: uppercase; margin: 0; padding: 0; margin-bottom: 0.5em; }

a { text-decoration:none; color:inherit; }

header {
    position: relative;
    /* background-color: var(--bgcolor-layer1); */
    color: var(--color-logo);

}
    header div#gravatar {
        display: inline-block;
        height: 100%;
    }
        header div#gravatar img {
            height: 192px;
            width: 192px;
            border-radius: var(--shape-logo);
            box-shadow: var(--box-shadow);
            margin: 1em;
        }

    header div#title {
        position: absolute;
        top: 0;
        bottom: 0;
        height: 50%;
        margin: auto;
        display: inline-block;
    }
        header div#title h1 {
            font-weight: bold;
            margin: 0;
            text-shadow: var(--text-shadow);
        }
        header div#title blockquote {
            opacity: 0.5;
            margin: 0;
            margin-left: 0.25em;
        }

nav {
    position: relative;
    margin: 1em;
    margin-bottom: 0;
    overflow: hidden;
    text-align: left;
}

nav a {
    transition: 0.25s ease;
    position: relative;
    display: inline-block;
    top: 0.75em;
    background-color: var(--bgcolor-layer3);
    color: var(--color-layer3);
    text-transform: uppercase;
    box-shadow: var(--box-shadow);
    margin-left: 0.25em;
    margin-right: 0.25em;
    padding-left: 0.25em;
    padding-right: 0.25em;
    text-shadow: 0 0 0.25em #000;
    border-radius: 0.5em 0.5em 0 0;
}
nav a:first-child { margin-left: 0; }
nav a div { margin: 0.75em; margin-bottom: 0.75em; }
nav a.active { top: 0; background-color: var(--bgcolor-layer2); color: var(--color-layer2); }
nav a:hover, nav a:active  { top: 0; background-color: var(--bgcolor-layer3); color: var(--color-layer2); text-shadow: 0 0 0.25em #000; }
nav a.active:hover, nav a.active:active { top: 0; background-color: var(--bgcolor-layer2); color: var(--color-layer2); text-shadow: 0 0 0.5em #fff; }

.box {
    background-color: var(--bgcolor-box);
    color: var(--color-box);
    padding: 1.5em;
    padding-bottom: 2.5em;
    box-shadow: var(--box-shadow);
    border-radius: 1em;
    padding-left:1em;
    padding-top:1em;
}
.box h2 { margin: 0; }
.box .description {
    font-size:0.8em;
    color:rgba(0,0,0,0.5);
}
.box .info {
    position:absolute;
    bottom:1em;
    right:2em;
    text-align: right;
    font-size:0.8em;
    color:rgba(0,0,0,0.5);
}

div#content {
    min-height: 40em;
    background-color: var(--bgcolor-layer2);
    display:grid;
    grid-template-columns: 1fr 20%;
    grid-gap: 1em;
    box-shadow: var(--box-shadow);
}

#articles { 
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(480px, 1fr));
    grid-gap: 2em;
    grid-auto-flow: dense;
    margin: 1em;
    margin-bottom: 3em;
    margin-top:0.5em;
    margin-left:0.5em;
    padding: 0.5em;
}

article { position:relative; padding-bottom: 1em; }
article.gridhigh { grid-row: span 2; }
article.gridwide { grid-column: span 2; }

article.box {
    border-radius: 1em;
    padding-top:-5px;
    padding-left:-5px;
}

article p {
    text-align: justify;
}

article img {
    position: relative;
    z-index: 1;
    display: block;
    clear: both;
    width: 100%;
    height: auto;
    margin-bottom:1.25em;
    box-shadow: var(--box-shadow);
    border-radius: var(--shape-radius);
    overflow: hidden;
   
}

article figure {
    opacity: 0.5;
    display: block;
    font-size: 0.75em;
    margin: 0;
    width: 100%;
    text-align: center;
}

#sidebar {
    margin: 1em 1em 0em 0em;
}
aside {
    text-align: justify;
    box-shadow: var(--inset-shadow);
    margin: 0;
    padding: 1.5em;
    border: 1px solid rgba(0,0,0,0.25);
    border-radius: var(--shape-radius);
    margin-bottom: 1em;
}

footer {
    margin: 0;
    padding: 0;
    font-size: 0.8em;
    width: 100%;
    text-align: center;
    color: rgba(255,255,255,0.5);
}
footer p {
    margin: 0;
    padding: 2em;
}

@media only screen and (min-width: 1680px) and (max-width: 1920px) {
    body { font-size: 1em;}
    header { margin: 0; }
    header div#gravatar img { margin: 1em; height: 160px; width: 160px; }
    header div#title h1 { font-size: 4em; }
    header div#title blockquote { font-size: 1em; }

    div#content { grid-template-columns: 1fr 20%; }
    #articles { display:grid; grid-template-columns: 1fr 1fr; }
}

@media only screen and (min-width: 1280px) and (max-width: 1680px) {
    body { font-size: 1em;}
    header { margin: 0; }
    header div#gravatar img { margin: 1em; height: 128px; width: 128px; }
    header div#title h1 { font-size: 3em; }
    header div#title blockquote { font-size: 1em; }

    div#content { grid-template-columns: 1fr 30%; }
    #articles { display:grid; grid-template-columns: 1fr 1fr; }
}

@media only screen and (min-width: 960px) and (max-width: 1280px) {
    body { font-size: 1em; }
    header { margin: 0; }
    header div#gravatar img { margin: 1em; height: 96px; width: 96px; }
    header div#title h1 { font-size: 2em; }
    header div#title blockquote { font-size: 1em; }

    article.gridwide { grid-column: span 1; }
    article.gridhigh { grid-row: span 1; }

    div#content { grid-template-columns: 1fr 30%; }
    div#articles { display:grid; grid-template-columns: 1fr; }
}
