/*
NOT designed for old browsers(unlike my old website). Requires > IE 8. 
My target is to make a good site for everyone, so for the colorblind, the dyslectic, the you.

Gosh CSS is hard. I mean, why do so many items need two divs instead of one to reach the desired effect?

Interesting:
http://www.dwuser.com/education/content/creating-responsive-tiled-layout-with-pure-css/
https://css-tricks.com/seamless-responsive-photo-grid/
*/

body, html
{
    margin: 0;
    padding: 0;
    height: 100%;
    min-height: 100%;

    background-color: Black;/* something dark-blueish? rgb(6, 5, 23);*/
    color: White;
    font-weight: 1.3em;
    font-family: sans-serif;
}
div
{
    margin: 0;
    padding: 0;
}


section
{
    width: 100%;
    overflow: hidden;
    position: relative;
    z-index: 2; /* background 'n stuff*/
}

.x-align
{
    margin: auto;
    width: 50%;
}
.y-align
{
    position: absolute; /* section is relative */
    top: 50%;
    transform: translate(0, -50%);
    width: 100%;
}

#drawCanvas
{
    position: fixed;
    z-index: 1;
    top: 0;
    bottom: 0;
    padding: 0;
    overflow: hidden;
}
#drawCanvas>canvas
{
    margin: 0;
    overflow: hidden;
}

noscript
{
    display: inline-block;
    background-color: #00e;
    color: #fff;
    width: 100%;
    padding: 8px;
    font-weight: bold;
}

#landing
{
    min-height: 100%;
}

#background
{
    position: absolute;
    width: 100%;
    z-index: 1;
}

#nav
{
    position: absolute; /* absolute for section, fixed for scrollable */
    z-index: 3;
    right: 0;
    top: 0;
}
#nav div
{
    text-align: center;
    display: inline-block;
    border: 2px solid #0F0;
    background-color: rgba(0,0,0,0.1);    

    /* TODO: Make it respond faster? I don't like slow animations */
    transition: background-color 0.22s cubic-bezier(0, 0.99, 1, 1), border 0.3s linear;
}
#nav div:hover
{
    background-color: #F0F;
    border: 2px solid #F0F;
}
#nav #menuonoff
{
    /* TODO: Some colorblinds only see difference when hovering */
    border: 2px solid #F0F;
}
#nav #menuonoff:hover
{
    background-color: #0F0;
    border: 2px solid #0F0;
    cursor: pointer;
    transition: none;
}

#nav a, #nav a:visited, #nav a:active, #nav a:hover
{
    text-decoration: none;
    color: inherit;
}

#links
{
    z-index: 3;
    position: absolute;
    margin: 10px;
}
#links img
{
    image-rendering: pixelated;
    image-rendering:-moz-crisp-edges;
    image-rendering: -o-crisp-edges;
    image-rendering:-webkit-optimize-contrast;
}

#logoarea
{
    text-align: center;
}

#logo
{
}

#logo > span
{
    position: relative;
}

#logoarea a, #logoarea a:visited, #logoarea a:active, #logoarea a:link
{
    color: inherit;
    text-decoration: inherit;
}

#sillyquote
{
    font-family: Times;
}

#footer
{
    background-color: rgba(41, 28, 8, 0.94);
    color: #31FF00;
    width: 100%;
    min-width: 100%;
    padding-top: 5px;
    padding-bottom: 5px;
    text-align: center;
}

#footer a, #footer a:visited
{
    color: #fff;
}

#footer a:hover, #footer a:active
{
    color: #FF00D2;
}

#footer span
{
    float: left;
    margin-left: 5px;
}

#projects
{
    overflow: visible;
}

/* TODO: Make responsive, and style those tags */
.searchDialog
{
    padding-right: 5px;
    padding-left: 5px;
    position: relative;
    overflow: visible;
}
#searchBox
{
    width: 500px;
    max-width: 95%;
    padding: 8px;
    background-color: #f0f;
    color: white;
    border: 1px solid #e0e;
    font-weight: bold;
}
/*#searchBox + .tooltip
{
    display: none;
    position: absolute;
    bottom: 100%;
    background-color: #ccc;
    color: #000;
    padding: 5px;
}
#searchBox:hover + .tooltip
{
    display: block;
}*/
.searchDialog input[type="button"]
{
    color: white;
    background-color: #00f;
    border: none;
    padding: 9px;
    
    transition:background-color 0.12s cubic-bezier(0, 0.99, 1, 1), border 0.3s linear;
}
.searchDialog input[type="button"]:hover
{
    cursor: pointer;
    background-color: #0F0;
}


/****************
project popup
****************/
#projectPopup
{
    display: none;
    z-index: 5;

    color: #000;
    background-color: #fff;
    
    position: fixed;
    top: 50%;
    left: 10%;
    right: 10%;
    transform: translate(0, -50%);
    
    max-width: 100%;
}

#projectPopupLayer
{
    z-index: 4;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;

    background: linear-gradient(180deg, rgba(0,0,0,0.35), rgba(0,0,0,0.55));
}

#projectPopup p
{
    padding: 10px;
}

#projectPopup .closeButton
{
    background-color: #6700D6;
    color: #fff;
    padding: 10px;
    cursor: pointer;
    position: absolute;
    top: 5px;
    right: 5px;
}

#projectPopup .closeButton:hover
{
    background-color: #f0f;
}

#projectPopup .projectTitle
{
    color: #fff;

    background: repeating-linear-gradient(
        45deg,
        #606dbc,
        #606dbc 10px,
        #495298 10px,
        #3D468C 20px
    );

    padding: 1rem;
    padding-right: 5rem;
    margin: 0 0 0.5rem 0;

    text-shadow: 2px 2px 4px #000;
}

#projectPopup .links
{
    float: right;
    padding-right: 10px;
    list-style: none;
    padding: 0;
    margin: 0;
}

#projectPopup .links li
{
    padding: 5px;
    padding-top: 1px;
    padding-bottom: 1px;
}

#projectPopup .tags
{
    margin: 5px;
    list-style: none;
    padding: 0;
}

.tag
{
    margin: 5px;
    padding: 3px;
    display: inline-block;

    border: 1px solid #aaa;
    border-radius: 1px;

    cursor: pointer;
    
    text-align: center;
}

.tag:hover
{
    background-color: #0F0;
}

/****************
grid page specific
****************/
.grid
{
    padding-bottom: 30px;
}

/****************
media breakpoints
****************/

/* SMARTPHONES PORTRAIT */
@media only screen and (min-width: 300px) {

    #nav div
    {
        font-size: 11pt;
        margin: 5px;
        width: 64px;
        line-height: 30px;
    }

    #links
    {
        margin: 4px;
    }

    #logo
    {
        font-size: 0.8em;
    }
}

/* SMARTPHONES LANDSCAPE */
@media only screen and (min-width: 480px) {

    #logo
    {
        font-size: 1em;
    }
}

/* TABLETS PORTRAIT */
@media only screen and (min-width: 768px) {

    #links
    {
        margin: 10px;
    }

    #logo
    {
        font-size: 1.5em;
    }

    #nav div
    {
        font-size: 13pt;
        margin: 10px;
        width: 120px;
        line-height: 50px;
    }
}

/* TABLET LANDSCAPE / DESKTOP */
@media only screen and (min-width: 1024px) {
    #links img
    {
        image-rendering: pixelated;
        width: 32px;
    }
    #logo
    {
        font-size: 2em;
    }
}

/* LARGE, LARGE MONITORS */
@media only screen and (min-width: 2560px) {
    #nav div
    {
        font-size: 16pt;
        margin: 12px;
        width: 180px;
        line-height: 70px;
    }

    #logo
    {
        font-size: 3em;
    }
}

/* Oh my god it's 4K */
@media only screen and (min-width: 3840px) {
    #logo
    {
        font-size: 4em;
    }
}

@media only screen and (max-width: 430px) {
    #nav div
    {
        margin-top: 25px;
    }
}

/****************
keyframes
****************/
@keyframes fadeIn
{
    from
    {
        opacity: 0;
    }
    to
    {
        opacity: 1;
    }
}

/****************
inline styling 
****************/
.warning
{
    color: #FFF;
    background-color: #F00;
}
.warning:hover
{
    color: #F00;
    background-color: #FFF;
}
.warning::before
{
    content: "WARNING: ";
    font-weight: bold;
}

code
{
    padding: 0;
    padding-top: 0.2em;
    padding-bottom: 0.2em;
    margin: 0;
    border-radius: 3px;
    background-color: rgba(0,0,0,0.04);
}

.grid a, .grid a:visited
{
    color: #000;
    background-color: rgba(255, 255, 255, 0.5);
}
.grid a:hover, .grid a:active
{
    color: #fff;
    background-color: rgba(0, 0, 0, 0.50);
}