@charset "UTF-8";

/*
New web page CSS essentials
Darren Green 2024
*/

/* define variables */

@media only screen {
    :root {
        --body-color: #220022;
        --body-color-light: #442244;
        --body-color-dark: #110c11;
        --accent-color: #114411;
        --accent-color-light: #336633;
        --accent-color-dark: #002200;
        --color: #ffffdd;
        --color-light: #ffffff;
        --color-dark: #ffeecc;
        --emphasis-color: #ffaaff;
        --emphasis-color-light: #ffccff;
        --emphasis-color-dark: #dd88dd;
        --link-color: #66aadd;
        --link-color-light: #88ccff;
        --link-color-dark: #4488bb;
    }
}

@media only print {
    :root {
        --body-color: #ffffff;
        --body-color-light: #ffffff;
        --body-color-dark: #ffffff;
        --accent-color: #aaccaa;
        --accent-color-light: #ccffcc;
        --accent-color-dark: #88aa88;
        --color: #000000;
        --color-light: #000000;
        --color-dark: #000000;
        --emphasis-color: #880088;
        --emphasis-color-light: #880088;
        --emphasis-color-dark: #880088;
        --link-color: #0000ff;
        --link-color-light: #0000ff;
        --link-color-dark: #0000ff;
    }
}

:root {
    --body-font-family: 'Roboto', sans-serif;
    --mono-font-family: 'Courier Prime', monospace;
    --heading-font-family: 'FinalFrontier';
}

@font-face {
    font-family: FinalFrontier;
    src: url('../fonts/FinalFrontier-BEd.ttf');
}

/* css reset */

* {
	margin: 0px;
    padding: 0px;
    border: none;
    font: inherit;
    font-size: 100%;
    list-style-type: none;
    line-height: 1.3;
    -webkit-text-size-adjust: none;
    -moz-text-size-adjust: none;
    -ms-text-size-adjust: none;
    text-size-adjust: none;
    max-height:1000000px;
}

/* basic layout settings */

html {
    min-height: 100vh;
    overflow-y: scroll;
}

body, body > nav {
    background-color: var(--body-color);
    background-image: linear-gradient(270deg, var(--body-color-dark), var(--body-color-light));
}

body {
    font-family: var(--body-font-family);
    color: var(--color);
}

body > nav {
    overflow: hidden;
    max-height: 0px;
    transition: max-height 1s;
    border-top: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    position: sticky;
    top: 0px;
}

body > header, body > footer, main article > header {
    text-align: center;
    background-color: var(--accent-color);
    background-image: linear-gradient(270deg, var(--accent-color-dark), var(--accent-color-light));
    overflow: hidden;
}

main article > footer {
    border-bottom: 2px solid var(--accent-color);
    border-image: linear-gradient(270deg, var(--accent-color-dark), var(--accent-color-light));
    border-image-slice: 1;
}

body > footer {
    clear: both;
}

/* Override settings for large devices */

@media only screen and (min-width: 576px) {
    body {
        --main-width: 80%;
    }

    main, body > nav {
        min-height: 600px;
    }

    body > nav {
        max-height: 1000px;
        border: none;
        background: none;
    }

    body > header, body > footer {
        min-height: 60px;
    }

    main {
        float: left;
        width: var(--main-width);
    }

    body > nav {
        float: left;
        width: calc(100% - var(--main-width));
    }

    body > header > #hamburger {
        display: none;
    }
}

@media only print {
    body > header > #hamburger {
        display: none;
    }
}

/* standard tags */
em, i, cite, q, var {font-style: italic;}
strong, b, dfn {font-weight: bold;}
sub {vertical-align: sub;}
sup {vertical-align: super;}
sub, sup {font-size: smaller;}

pre, blockquote {
    border-left: 5px solid var(--accent-color-light);
    padding-left: 1ex;
}
pre {
    overflow: auto;
}
blockquote {
    padding-right: 1ex;
}

code {
    padding-left: 0.5ex;
    padding-right: 0.5ex;
    margin-left: 0.5ex;
    margin-right: 0.5ex;
    border-left: 3px solid var(--accent-color-light);
    border-right: 3px solid var(--accent-color-light);
}
kbd {outline: 3px solid var(--accent-color-light);}
samp, kbd, dfn, dt {color: var(--emphasis-color);}
samp, kbd, code, pre {font-family: var(--mono-font-family);}

main a {
    transition: color 500ms;
}
a:link	{color: var(--link-color);}
a:active	{color: var(--link-color-light);}
a:visited	{color: var(--link-color-dark);}
a:hover	{color: var(--emphasis-color);}

td {
    vertical-align: top;
}

/* hamburger icon */

body > header > #hamburger {
    font-size: 350%;
    float: left;
    transition: background-color 1s, color 1s;
}

body > header > #hamburger:hover {
    background-color: var(--color);
    color: var(--accent-color);
}

/* nav animations and styling */

body > nav > ul li, main > * {
    padding: 10px;
}
body > nav li {
    list-style: none;
    left: 0;
    right: 0;
    font-weight: bold;
}
body > nav > ul > li > ul > li:first-child {
    border-top: 2px solid currentColor;
}
body > nav > ul > li > ul {
    max-height: 0px;
    overflow: hidden;
    transition: max-height 1s;
}
body > nav > ul > li:hover ul {
    max-height: 300px;
}
body > nav > ul > li {
    transition: background-color 1s, color 1s;
}
body > nav > ul > li:hover {
    background-color: var(--color);
    color: var(--body-color);
}
body > nav a:link, nav a:active, nav a:visited, nav a:hover {
    color: inherit; text-decoration: inherit;
}
body > nav a:hover {
    text-decoration: underline;
}

/* headings */

h1, h2, h3, h4, h5, h6 {
    color: var(--color-dark);
    font-weight: bold;
    font-family: var(--heading-font-family);
}

h1 {font-size: 200%;}
h2 {font-size: 160%;}
h3 {font-size: 135%;}
h4 {font-size: 120%;}
h5 {font-size: 108%;}
h6 {font-size: 100%;}

h2::before, h2::after, h3::before, h3::after, h4::before, h4::after, h5::before, h5::after, h6::before, h6::after {
    content: "\2014"; 
}

/* definition list */

dt {
    float: left;
    clear: left;
    padding-right: 2ex;
}

/* unordered lists */

main ul {
    list-style-position: inside;
    list-style-type: circle;
    list-style-image: url('../images/icons/isopod16.png');
}

main nav ul li ul li {
    padding-left: 10ex;
}

.simpleList {
    list-style: none;
}

.simpleList li {
    margin-left: 5ex;
    text-indent: -5ex;
}

.midi:before {
    content: "\1F3A7";
}

/* main layout */

details > summary {
    border: none;
}

details:not([open]) > summary {
    background-color: var(--color);
    color: var(--body-color);
}

main > section, main > article {
    border-bottom: 2px solid currentColor;
    overflow: hidden;
}

main > article+article {
    margin-top: 1ex;
}

p {
    margin-bottom: 1ex;
}

main > section aside, main > article aside {
    padding: 10px;
}

aside img, aside iframe {
    display: block;
    max-height: 320px;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    border: 2px solid var(--accent-color);
}

.noBorder {border: none;}
.counter img {
    border: none;
    height: 1ex;
}

div.label {
    display: block;
    max-height: 320px;
    padding: 0.5ex;
    max-width: 240px;
    margin-left: auto;
    margin-right: auto;
    background-color: var(--color);
    color: var(--body-color);
    border: 1px var(--color-dark);
    border-radius: 4px;
    box-shadow: 3px 3px 3px var(--body-color-dark);
}

/* Override settings for large devices */

@media only screen and (min-width: 576px) {
    main {
        --section-width: 75%;
        --float-side: left;
    }
    
    main > section, main article, main > aside {
        clear: both;
    }
    main > :last-child {
        border-bottom: none;
    }

    main > section > header {
        width: var(--section-width);
        float: var(--float-side);
    }

    main > section > div, main > article > div {
        width: var(--section-width);
        float: var(--float-side);
    }

    main > section > div, main > section > p,
    main > article > div, main > article > p,
    main > section > footer, main > article > footer, main > section > ul {
        clear: var(--float-side);
    }

    main > section > aside, main > article > aside {
        margin-left: var(--section-width);
    }
}
