/*! normalize.css v7.0.0 | MIT License | github.com/necolas/normalize.css */

html{line-height:1.15;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,footer,header,nav,section{display:block}h1{font-size:2em;margin:.67em 0}figcaption,figure,main{display:block}figure{margin:1em 40px}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent;-webkit-text-decoration-skip:objects}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:inherit}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}dfn{font-style:italic}mark{background-color:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}audio,video{display:inline-block}audio:not([controls]){display:none;height:0}img{border-style:none}svg:not(:root){overflow:hidden}button,input,optgroup,select,textarea{font-family:sans-serif;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type=reset],[type=submit],button,html [type=button]{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{display:inline-block;vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details,menu{display:block}summary{display:list-item}canvas{display:inline-block}template{display:none}[hidden]{display:none}/* Harássment CSS: frontpage */
* {
    box-sizing: border-box;
}

html {
    font-size: 62.5%; /* 10px browser default */
}

body {
    font-size: 1.8rem;
    font-family: 'Special Elite', Lora, Georgia, 'Times New Roman', serif;
    margin: 0;
    padding: 0;
    text-align: justify;
    line-height: 1.4;
    color: #191919;
    background-color: #f5f5f5;
}

section {
    margin: 0;
    padding: 0;
}

#frontpage-cover {
    height: 100vh;
    background-color: #191919;
    overflow: hidden; /* need only if the image is rotated */
 }

#frontpage-cover img {
    /* full blur only at high res */
    filter: blur(2px);
    transform: rotate(-8deg) scale(1.2);
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
}

/* basic animation properties */
.cover-anim {
    /* animation only at high res */
    animation-duration: 9s;
    animation-delay: 1s;
    animation-timing-function: ease-in-out;
    animation-direction: alternate;
}

.cover-anim-infinite {
    animation-iteration-count: infinite;
}


/* position title/author div over the cover image */
#titles {
    text-align: center;
    position: absolute;
    top: 50%;
    width: 100%;
    transform: translateY(-57%) rotate(-8deg) scale(0.9);
    color: #D85942;
    font-weight: normal;
 }


#titles h1, #titles h2 {
    line-height: 0.6;
    font-weight: normal;
}

#frontpage-decor {
    padding: 0;
    margin: 0;
}


 #frontpage-cover-nav {
    display: flex;
    flex-direction: row;
    position: absolute;
    color: #f5f5f5;
    bottom: 10px;
    width: 100%;
    align-items: center;
    justify-content: center;
}

#frontpage-cover-nav div {
    padding: 5px;
}

#cover-nav-read {
    margin-right: 15px;
    width: 100px;
    text-align: right;
}

#cover-nav-download {
    margin-left: 15px;
    width: 100px;
    text-align: left;
}


#frontpage-dedication {
    color: white;
    background-color: #D85942;
    font-style: italic;
    text-align: center;
    padding-top: 3rem;
    padding-bottom: 3rem;
}

#frontpage-toc {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

#frontpage-toc ol {
    text-align: center;
    list-style: none;
    padding: 0; /* required to center the list (remove left indent) */
}

ol.frontpage-toc-chapters {
    counter-reset: chapter-counter;

}

ol.frontpage-toc-chapters li {
    counter-increment: chapter-counter;
    margin-left: 0;
    margin-right: 0;
}


ol.frontpage-toc-chapters li::before {
    content: counter(chapter-counter, lower-roman);
    font-style: italic;
    display: block;
    position: relative;
}


@keyframes cover_animation {
  from { transform: rotate(-8deg) scale(1.2); filter: blur(10px); }
       to { transform: rotate(-2deg) scale(1.35) translateX(130px) translateY(115px); filter: blur(0px); }
}

#throbber {
    /*width: 10px;*/
    transform: rotate(90deg);
    color: #D85942;
    font-weight: bold;
}

.throbber-dot {
    animation-name: throbber-dot-animation;
    animation-duration: 2s;
    animation-iteration-count:infinite;
    animation-timing-function: ease-in-out;
    animation-direction: alternate;
    opacity: 1;
}

#throbber-dot-1 {
    animation-delay: 1s;
}
#throbber-dot-2 {
    animation-delay: 2s;
}
#throbber-dot-3 {
    animation-delay: 3s;
}

@keyframes throbber-dot-animation {
  from { opacity: 0;}
       to { opacity 1;}
}


/*** MEDIA QUERIES for FRONTPAGE ***/

main {
    /* root font size */
    font-size: 1.5rem;
}


@media only screen and (min-width: 23em) {
    main {
        font-size: 2rem;
    }
}

@media only screen and (min-width: 40em) {
    main {
        font-size: 2.5rem;
    }
}

/* 1200px and above */
@media only screen and (min-width: 75em) {
    main {
        font-size: 3rem;
    }
    .cover-anim {
        animation-name: cover_animation;
    }
    #frontpage-cover img {
        filter: blur(10px);
    }
}

#titles h1 {
    font-size: 5.5em;
    margin-bottom: 0.4em;

}

#titles h1 small {
    font-size: 40%;
}

#titles h2 {
    margin-top: 0.4em;
    font-size: 2.8em;
}

#frontpage-decor {
    margin-top: 0.5em;
    font-size: 2.6em;
    line-height: 0.3;
}

#frontpage-cover-nav {
    font-size: 1em;
}

#throbber {
    font-size: 1.2em;
}

#frontpage-dedication {
    font-size: 0.8em;
}

#frontpage-toc {
    font-size: 1em;
}

ol.frontpage-toc-chapters li::before {
    font-size: 2rem;
}


/* Harássment CSS: nav and footer sections */

nav,
footer {
    /* headers and footers use the same background styling */
    margin: 0;
    background: #191919 url(../img/nav-footer-bg.png);
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    width: 100%;
    color:  #f5f5f5;
    font-family: 'Special Elite', Georgia, 'Times New Roman', serif;
}

/**** NAV BAR (top) ****/

nav {
    text-align: center;
    font-size: 1.7rem;
    line-height: 2.3rem;
    padding: 0.5em 1em;
    width: 100%;
    z-index: 99;
    opacity: 0.8;
    transition: opacity .3s ease-in-out;
}

nav .hide-small {
    display: none;
}

nav .hide-big {
    display: initial;
}

nav:hover {
    opacity: 1;
}

nav > div.nav-link {
    display: inline-block;
}


/**** COMMON FOOTER (bottom) ****/

footer {
    display: block;
    text-align: center;
    padding: 1em 0.5em;
    font-size: 1.8rem;
}

footer > div {
    padding: 0;
    /*border: 1px solid red;*/
}

footer img {
    display: block;
    margin: 0 auto;

}

footer ul {
    list-style: none;
    padding-left: 0;
}

#footer-cover > img {
    box-shadow: 3px 3px 8px #D85942;
    margin-bottom: 1em;
}

#footer-license > img {
    padding: 1em 0;
}

footer > div > p:first-of-type {
    text-transform: uppercase;
    border-bottom: 1px solid rgba(245, 245, 245, 0.4);
    padding-top: 0;
    padding-bottom: 0.5em;
    font-size: 1.1em;
}

p.footer-note {
    max-width: 400px;
    font-size: 90%;
    text-align: center;
    margin: 0 auto;
}


/* 640px and above */
@media only screen and (min-width: 40em) {
    nav {
        position: fixed;
        top: 0;
        font-size: 1.9rem;
    }

    article {
        margin-top: 13em;
    }

    footer {
        font-size: 2rem;
    }

    footer li {
        display: inline-block;
    }

    footer li:not(:first-of-type):before {
        content: "\2022  ";
        color: #D85942;

    }

    p.footer-note {
        font-size: 85%;
    }

}

/* display :before and :after for nav links only until nav becomes a grid */
@media only screen and (max-width: 49.9em) {
    #nav-link-prev:before {
        content:  "\00AB  ";
        color: #D85942;
    }

    #nav-link-toc:before,
    #nav-link-toc:after {
        content:  "  \2022  ";
        color: #D85942;
    }

    #nav-link-next:after {
        content:  "  \00BB";
        color: #D85942;
    }
}

/* 800 px - use grid from here on */
@media only screen and (min-width: 50em) {
    nav {
        display: grid;
        grid-template-columns: 2fr 1fr 4fr 1fr 2fr;
        grid-template-areas:
            "nav_link_home nav_link_prev nav_title nav_link_next nav_link_toc";
        align-items: center;
        justify-items: center;
        font-size: 2rem;
    }

    #nav-link-home {
        font-size: 2.5rem;
    }

    #nav-link-prev,
    #nav-link-next {
        font-size: 4rem;
    }

    nav small {
        font-size: 65%;
    }

    nav .hide-small {
        display: initial;
    }

    nav .hide-big {
        display: none;
    }


    #nav-link-home {
        grid-area: nav_link_home;
        transform: rotate(-8deg);
    }

    #nav-title {
        grid-area: nav_title;
        max-width: 600px;
    }

    #nav-link-prev {
        grid-area: nav_link_prev;
    }

    #nav-link-toc {
        grid-area: nav_link_toc;
    }

    #nav-link-next {
        grid-area: nav_link_next;
    }


    footer {
        display: grid;
        padding: 1em 1em;
        font-size: 2rem;
        grid-template-columns: 2fr 1fr 2fr;
        grid-template-areas:"footer_nav footer_cover footer_license";
        align-items: top;
        justify-content: center; /* has no effect */
    }

    footer li {
        display: block;
        padding-bottom: 0.75em;
    }

    footer li:not(:first-of-type):before {
        content: "";
    }

    #footer-nav {
        text-align: right;
        grid-area: footer_nav;

    }

    #footer-cover {
        grid-area: footer_cover;
        align-self: center;
        justify-self: center;
        padding: 0 1em;
    }

    #footer-license {
        text-align: left;
        grid-area: footer_license;

    }

    p.footer-note {
        margin: 0;
        text-align: left;
        font-size: 80%;
    }

    footer img {
        margin: 0;
    }
}

/* 1200px and above */
@media only screen and (min-width: 75em) {

    #nav-link-home {
        font-size: 3rem;
    }

    #nav-link-prev,
    #nav-link-next {
        font-size: 6rem;
    }

    #nav-link-toc {
        font-size: 3rem;
    }


   footer {
        font-size: 2.3rem;
    }

    #footer-cover {
        padding: 0 1.5em;
    }

}









/* Harássment CSS: links */

/* default links on pages  */

a {
    color: #D85942;
    text-decoration: none;
    transition: all 0.3s ease-in;
}

a:focus { outline: thin dotted; }

a:visited {
    color: #D85942;
}

a:hover,
a:visited:hover {
    color: #F5F5F5;
    background-color: #D85942;
    text-decoration: underline;
    }

/* special props for frontpage and ToC links  */

.toc a {
    font-weight: bold;
    display: inline-block;
    padding: 0 10px;
    text-transform: uppercase;
}

/* links in nav and footer sections */

nav a,
footer a,
#frontpage-cover a {
    color: #F5F5F5;
    text-decoration: none;
    display: inline;
    padding: 0;
}

nav a:visited,
footer a:visited,
#frontpage-cover a:visited {
    color: #F5F5F5;
}

nav a:hover, nav a:visited:hover,
footer a:hover, footer a:visited:hover,
#frontpage-cover a:hover, #frontpage-cover a:visited:hover {
    color: #D85942;
    text-decoration: none;
    background: transparent;
    text-transform: none;
}

/* no underline on hover for burger menu */
#burger a:hover {
    text-decoration: none;
}