﻿*{
    /*border: 1px solid orange;*/
}

/******************Basic Structure******************/

html {
    min-height: 100vh;
    height: 100%;
    width: 100%;
}

@font-face {
    font-family: 'Arcade';
    src: url('../fonts/ARCADECLASSIC.TTF');
}

@font-face {
    font-family: 'RobotoSlab';
    src: url('../fonts/Roboto_Slab/static/RobotoSlab-Regular.ttf');
}

@font-face {
    font-family: 'NotoSans';
    src: url('../fonts/Noto_Sans/NotoSans-Regular.ttf');
}

@font-face {
    /*Source: https://www.dafont.com/android-101.font */
    font-family: 'Android101';
    src: url('../fonts/Android101.otf');
}

body {
    margin: 0;
    font-family: 'NotoSans';
    background-color: #2F4454;
    color: #fefefe;
    height: 100%;
    overflow-x: hidden;
}

#wrapper {
    display: flex;
    flex-flow: column;
    min-height: 100%;
    position: relative;
}

/*******************Navigation*******************/

#header {
    font: bold 20px 'NotoSans';
    background-color: #2c3531;
    border-bottom: 3px solid #29648a;
    width: 100%;
    position: sticky;
    top:0;
    z-index: 5;
}

#nav {
    font: bold 20px 'NotoSans';
    background-color: #2c3531;
    display: flex;
    flex-flow: row wrap;
    justify-content: center;
    width: 100%;
}

#a {
    text-decoration: none;
    transition-property: color;
    transition-duration: 0.5s;
}

    a:link, a:visited {
        color: #5680e9;
    }
    
    a:hover {
        color: #116466;
    }
    
    /*a:active {
        color: #ccc9dc;
    }*/

#nav a {
    box-sizing: border-box;
    padding: 0.75em;
    width: 20%;
    max-width: 300px;
    min-width: 200px;
    text-align: center;
    margin: 0;
    color: #fefefe;
    text-decoration: none;
    transition-property: background-color;
    transition-duration: 0.5s;
}

    nav a:link, nav a:visited {
        background-color: #2c3531;
        color: #fefefe;
    }

    nav a:hover {
        background-color: #116466;
        color: #fefefe;
    }

    /*nav a:active {
        transition-duration: 0s;
        background-color: #2e9cca;
        color: #fefefe;
    }*/

/*******************Footer*******************/

#footer {
    color: #fefefe;
    background-color: #2c3531;
    width: 100%;
    position: fixed;
    left: 0;
    bottom: 0;
    height: 70px;
    display: flex;
    justify-content: space-between;
    text-align: center;
}

#footer p {
    margin: 1.47em;
}

#seal {
    margin: 1.47em;
}

#seal img {
    background-color: white;
    border: 1px solid #bdbcbd;
}
/******************Text******************/

h1, h2, h3, h4 {
    font-family: 'RobotoSlab';
    text-align: center;
}

h1 {
    margin: 1em;
    font-size: 40px;
}

h4 {
    margin: 0;
    margin-left: 2em;
}

p {
    margin: 1em auto;
}

#intro h1 {
    text-align: left;
    margin: 0 30px 0.5em;
}

#intro p {
    margin: 0 30px 2em;
}

.projectItem p {
    width: 90%;
    margin: 1em auto;
}

#projects h2 {
    margin-top: 1.5em;
    margin-bottom: 0;
}

#projects h3 {
    margin: 0.5em;
}

#resume h2 {
    text-align: center;
    text-decoration: underline;
    margin-top: 1.5em;
}

#resume h3 {
    text-align: left;
    margin-top: 1.25em;
}
#resume h3 + p{
    margin-left: 1.5em;
}

#dungeonDescent h2, #3DVisualizer h2 {
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}

#visualizer h1, #visualizer h2 {
    font-family: 'Android101';
}

/*******************Page Content*******************/

article {
    box-sizing: border-box;
    margin: 2em auto;
    width: 70%;
    padding: 0 1em 2em;
    margin-bottom: 250px;
    /*min-width: 480px;*/
    max-width: 1200px;
    min-height: 500px;
    display: flex;
    flex-direction: column;
}

.center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.wide {
    width: 90%;
}

#about {
    /*margin-top: 20em;*/
    display: flex;
    flex-direction: row;
    flex-grow: 1;
}

#intro {
    display: flex;
    flex-direction: column;
    width: 70%;
}

#projects {
    display: flex;
    flex-flow: row wrap;
    justify-content: space-around;
    width: 100%;
}

.projectItem {
    width: 47.5%;
    display: flex;
    flex-flow: column;
}

#contact {
    /*margin-top: 20em;*/
}

#dungeonDescent {
    max-width: 800px;
    margin: 5em auto;
}

#visualizer {
    margin: 5em auto;
}

canvas {
	margin: 1em auto;
    display: inline;
	box-shadow: 4px 4px 8px rgba(0,0,0,0.5);
    width: 900px;
    height: 600px;
}

#canvasDiv {
    text-align: center;
}

/*************Modals*************/
.modal {
    box-sizing: border-box;
    visibility: hidden;
    opacity: 0;
    position: fixed;
    z-index: 6;
    left: 0; 
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgb(0, 0, 0);
    background-color: rgba(0, 0, 0, 0.4);
    max-height: 100vh;
}

.modal[data-active=false] {
    transition: opacity 0.5s, visibility 0s 0.5s;
    opacity: 0;
    visibility: hidden;
}

.modal[data-active=true] {
    transition: visibility 0s, opacity 0.5s;
    visibility: visible;
    opacity: 1;
}

.modal-content {
    box-sizing: border-box;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #2F4454;

    border: 4px solid #29648a;
    border-radius: 5px;
    width: 50%;
    min-height: 700px;
    min-width: 500px;
    max-width: 1000px;
    max-height: 100vh;
    overflow-y: auto;
}

.closeBtn {
    position: absolute;
    border-radius: 0 0 0 5px;
    
    float: right;
    width: 50px;
    height: 40px;
    
    font-size: 28px;
    font-weight: bold;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    
    top:0;
    right: 0;
    z-index: 6;
    
    background-color: rgba(0, 0, 0, 0.3);
    transition: color 0.4s, background-color 0.4s
}

.closeBtn:hover, .closeBtn:focus {
    color: #aaa;
    background-color: #116466;
}

.downloadLink {
    display: block;
    text-align: center;
    margin-bottom: 0;
}

/**********Image Galleries**********/
.gallery {
    position: relative;
    height: 500px;
    border-bottom: 3px solid #29648a;
    background-color: black;
    overflow: hidden;
}

.slide {
    display: none;
    position: relative;
    height: 100%;
    width: 100%;
    vertical-align: middle;

}

.caption {
    position: absolute;
    top: 0;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 0 0 5px 0;
    
    font-size: 14px;
    padding: 10px 14px;
    z-index: 6;
}

.imageNum {
    position: absolute;
    bottom: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 5px 0 0 0;
    
    font-size: 14px;
    padding: 10px 14px;
    z-index: 6;
}

.prev, .next {
    position: absolute;
    width: auto;
    padding: 16px 20px;
    
    top: 50%;
    transform: translateY(-50%);
    
    font-weight: bold;
    font-size: 20px;
    
    border-radius: 0 5px 5px 0;
    user-select: none;
    cursor: pointer;
    z-index: 6;
    
    background-color: rgba(0, 0, 0, 0.3);
    transition: color 0.4s, background-color 0.4s
}

.next {
    right: 0;
    border-radius: 5px 0 0 5px;
}

.prev:hover, .next:hover {
    color: #aaa;
    background-color: #116466;
}

.slide img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-height: 100%;
    max-width: 100%;
}

.fadeIn {
    -webkit-animation-name: fadeIn;
    -webkit-animation-duration: 1s;
    animation-name: fadeIn;
    animation-duration: 1s;
}

@-webkit-keyframes fadeIn {
    from { opacity: 0.4 }
    to { opacity: 1 }
}

@keyframes fadeIn {
    from { opacity: 0.4 }
    to { opacity: 1 }
}

/*************Images*************/

#portrait {
    align-self: flex-start;
    border-radius: 20%;
    width: 30%;
    min-width: 250px;
    max-width: 400px;
    margin: 0 1em 2em;
    box-shadow: 6px 6px 18px rgba(0,0,0,0.5);
}

.images {
    width: 80%;
    margin: 1em auto;
    display: inline-block;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 6px 6px 18px rgba(0,0,0,0.5);
}

.images img {
    display: block;
    margin: 0;
    width: 100%;
    transition: transform 0.3s;
    margin: 0;
}

.images img:hover {
    transform:scale(1.1);
    cursor: pointer;
}

/*************Other*************/

#contactDiv {
    display: flex;
    flex-direction: row;
    flex-flow: row wrap;
    justify-content: space-evenly;
    align-content: center;
    width: 100%;
    flex-grow: 1;
    text-align: center;
}

.contactItem {
    margin: 2em;
}

.fileLinks {
    width: 100%;
    text-align: center;
    margin: 0.5em auto;
}

#game {
    display: flex;
    justify-content: center;
    font-family: 'Arcade';
    font-size: 0px;
    width: 600px;
    margin: 0 auto;
    margin-bottom: 100px;
}



/******************Responsiveness******************/

@supports (-ms-ime-align:auto) {
    #contactItem {
        justify-content: space-around; /*Space Evenly doesn't work in Edge*/
    }
}

@media (max-width: 1000px){

    nav a {
        width: 50%;
        min-width: initial;
        max-width: initial;
        padding: 0.5em;
    }
    
    #center {
        position: static;
        top: auto;
        left: auto;
        transform: none;
    }

    #about {
        flex-direction: column;
    }

    #intro {
        width: 95%;
    }
    #intro h1 {
        text-align: center;
    }

    #portrait {
        width: 250px;
        margin: 0 auto 2em;
    }
    
    #projects {
        flex-flow: column nowrap;
        justify-content: space-between;
        align-items: center;
    }
    
    .projectItem {
        width: 75%;
    }

    .images {
        width: 80%;
    }
}

@media (max-width: 500px){

    article, nav a {
        width: 100%;
    }
    
    nav a {
        padding: 0.25em;
    }
    
    #about {
        width: 100%;
    }

    #about p {
        width: 95%;
    }

    footer p {
        text-align: center;
    }
    
    #resume h2, #resume h3 {
        text-align: center;
        margin-left: auto;
    }
    
    .projectItem {
        width: 100%;
    }
}