/* Main Body -------------------- */

body {
    font-family: 'Open Sans', 'Segoe UI', sans-serif;
    /* 62.5% technique:http://clagnut.com/blog/348/ */
    font-size: 62.5%;
    color: #ddd;
    background-color: #181818;
    padding: 1%;
    margin: 0;
    /* background-image: url('../assets/pat1.jpg') */
}


/* Main Abstract Elements -------------------- */

.card {
    /* Base Card Properties */
    margin: 0;
    padding: 1em;
    border-radius: 2%;
    width: 100%;
    text-align: center;
}

.card img {
    width: 20%;
    min-width: 5em;
    margin: 4%;
    border-radius: .5em;
    box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.3), 0 2px 2px 0 rgba(0, 0, 0, 0.2);
}

a {
    text-decoration: none;
    transition: all 0.3s ease-out;
    position: relative;
    color: #ddd;
    /* Increasing the Clickable Area of Inline Links, useful in mobile views
    http://joshnh.com/weblog/increasing-the-clickable-area-of-inline-links/ */
    padding: .5em;
    margin: -.5em;
}

.hr {
    border: 0;
    border-bottom: 2px dashed #ccc;
    background: #999;
}

/* Left Bar -------------------- */

.body nav {
    /* Top level container for left bar */
    width: 20%;
    min-width: 18em;
    margin: 0 0 0 3%;
}

#cv-img {
    /* Cancel the shadow and border radius on CV Picture */
    box-shadow: 0 0 0 0;
    border-radius: 0;
    cursor: pointer;
}

#nav-ident p {
    margin: -1em 0 1em;
}

#nav-ident-info {
    margin: 5% auto 0;
}

hr {
    border: 0;
    height: 0;
    border-top: 1px solid rgba(0, 0, 0, 0.15);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

#nav-media img {
    min-width: 2em;
}

#nav-nav {
    margin: 15% 0;
    text-align: left;
}

#nav-nav>ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
}

#nav-nav>ul>li {
    /* this is needed because of increased link clickable area */
    margin: .5em;
}

#nav-nav>ul>li>a {
    display: block;
    color: #ddd;
    -webkit-transition: color 0.3s;
    transition: color 0.3s;
}

#nav-nav>ul>li>a:hover {
    color: #999;
}

#nav-nav .menu-active {
    color: #d94f5c;
}


/* Contents Div -------------------- */

.contents {
    /* relative position is needed for CV div which has position absolute */
    position: relative;
    width: 76%;
    padding: 0 0 0 1.5%;
    margin: 0;
}

.contents .card-desc {
    /* The card above the contents grid */
    /* To align the card with grid blocks */
    width: 97%;
    text-align: justify;
}

.grid {
    margin: 1.5em 0 0 1em;
}

.grid .block {
    /* We are usign masonry JS plugin. It automates the process of placing of tiled contents.
    Unfortunately there is no way to tell masonry that we want a number of column to fit the contents-
    based on the page resolution (like the other html elements :D) unless we use media queries, thats what im goint to do */
    width: 32%;
    /* just to make sure when javascript & masonry fail, the content blocks are aligned to top */
    vertical-align: top;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    margin: 0 1% 1% 0;
}

.block a {
    padding: 1% 1% 0 0;
    float: left;
    position: relative;
    overflow: hidden;
}

.grid section {
    display: inline-block;
    margin: 0;
}

.grid section:nth-child(3n-1) {
    /* this pushes the even elements a little down, a little assymetrical eye candy */
    margin: 2% 1% 1% 0;
}

.block img {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    -webkit-filter: grayscale(.7);
    -webkit-transition: all .3s;
    filter: grayscale(.7);
    transition: all .3s;
}

.block .description {
    position: absolute;
    top: 0;
    z-index: 11;
    padding: 10px;
    width: 100%;
    height: 100%;
    text-align: center;
}

.block .description h3 {
    margin: 10px 0 20px 0;
    text-transform: uppercase;
    -webkit-transition: -webkit-transform 0.3s;
    transition: transform 0.3s;
}

.block .description p {
    padding: 0 20px;
    color: #aaa;
    -webkit-transition: opacity 0.3s, -webkit-transform 0.3s;
    transition: opacity 0.3s, transform 0.3s;
}

.block .description h3,
.block .description p {
    -webkit-transform: translateY(20px);
    transform: translateY(20px);
}


/* Hover effects */

.block a:hover img {
    filter: grayscale(0);
    -webkit-filter: grayscale(0);
}

.block a:hover .description h3,
.block a:hover .description p {
    -webkit-transform: translateY(0);
    transform: translateY(0);
}

.block a:hover .description p {
    opacity: 0;
}


/* Style for SVG */

.grid svg {
    position: absolute;
    top: -1px;
    /* fixes rendering issue in FF */
    z-index: 10;
    width: 100%;
    height: 100%;
}

.grid svg path {
    fill: #2a2a2a;
}
/* styles for photogallery */
.grid .ps {
    text-align: center;
}
.grid .ps img {
    -webkit-filter: none;
    filter: none;
    -webkit-transform: none;
    transition: none;
}
.grid .ps figure {
    display: none;
}

/* CV div -------------------- */

#cv {
    /* Initial status of CV will be hidden */
    display: none;
    position: fixed;
    text-align: justify;
    z-index: 99;
    color: black;
    padding: 100px 0 0;
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgb(0,0,0); /* Fallback color */
    background-color: rgba(0,0,0,0.8); /* Black w/ opacity */
    -webkit-perspective: 1300px;
	-moz-perspective: 1300px;
	perspective: 1300px;
}

#cv-content {
    position: relative;
    width: 80%;
    margin: auto;
    padding: 0 0 1px 0;
    background-color: #ccc;
    box-shadow: 0 4px 8px 0 rgba(0,0,0,.4),0 6px 20px 0 rgba(0,0,0,0.9);
    -webkit-animation-name: animatetop;
    -webkit-animation-duration: 0.4s;
    animation-name: animatetop;
    animation-duration: 0.4s;
}

@-webkit-keyframes animatetop {
    from {top:-300px; opacity:0; -webkit-transform: rotateY(-70deg);} 
    to {top:0; opacity:1; -webkit-transform: rotateY(0deg);}
}

@keyframes animatetop {
    from {top:-300px; opacity:0; transform: rotateY(-70deg);} 
    to {top:0; opacity:1;  transform: rotateY(0deg);}
}

#cv #cv-head {
    /* CV header, contains identification info and buttons */
    color:white;
    background-color:#444;
    background-image: url("../assets/bg-dash.png");
    background-repeat: repeat;
}

#cv #cv-head:after {
    /* Make jagged edges below the cv-head*/
    content: " ";
    display:block;
    position: relative;
    top:10px;
    height:10px;
    background-image: url("../assets/bg-jagg.png");
    background-repeat: repeat-x;
}

#cv #cv-id {
    position: relative;
    margin: 0 5%;
    padding: 5% 0 4% 1%;
}

#cv .cv-bt {
    position: absolute;
    top: 3em;
    z-index: 99;
    cursor: pointer;
}

#cv #close-cv {
    right: -20px;
}

#cv #download-cv {
    right: 30px;
}

#cv #cv-photo {
    float: left;
    width: 14.8em;
    border: 2px dashed #999;
    border-radius: .5em;
    margin-right: 2em;
}

#cv #cvname {
    font-size: 2.4em;
    font-weight: 700;
}
#cv #top-text h2 {
    margin-top: 0;
}
#cv #cv-body {
    clear: both;
    margin: 0 5% 5%;
    padding-top: 1%;
}
/* Footer Element -------------------- */

footer {
    text-align: center;
}


/* Flex Layout -------------------- */


/* This is seperated in order to be accessible, because old browsers do not support flexbox */


/* In the case flex layout fails, there is a float fallback available */

.body {
    /* Container for left bar and contents */
    /* Actually the layout is carefully set before adding flex-box so it could be commented out.
    It's benefit is proportional stretching of left bar and contents based on flex grow .*/
    display: flex;
}

body nav {
    flex: .5 1 20em;
}

.contents {
    flex: 10 1 50em;
}


/* Shorthand Classes -------------------- */

*,
*:before,
*:after {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

.font-cont {
    font-family: 'Open Sans', 'Segoe UI', sans-serif;
    font-size: 1.4em;
}

.font-head {
    font-family: 'Montserrat', 'Segoe UI', sans-serif;
    font-size: 1.6em;
    font-weight: 400;
}

.float-left {
    float: left;
}

.clearfix:before,
.clearfix:after {
    content: " ";
    display: table;
}

.clearfix:after {
    clear: both;
}

.clearfloat {
    clear: both;
}

.txt-shad {
    text-shadow: 0 3px 3px black;
}

.none{
    display: none;
}
/* Z-Depth Official Shadows -------------------- */

.z-1 {
    box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.37);
}

.z-2 {
    box-shadow: 0 6px 10px 0 rgba(0, 0, 0, 0.3), 0 2px 2px 0 rgba(0, 0, 0, 0.2);
}

.z-3 {
    box-shadow: 0 13px 25px 0 rgba(0, 0, 0, 0.3), 0 11px 7px 0 rgba(0, 0, 0, 0.19);
}

.z-4 {
    box-shadow: 0 20px 40px 0 rgba(0, 0, 0, 0.3), 0 14px 12px 0 rgba(0, 0, 0, 0.17);
}

.z-5 {
    box-shadow: 0 27px 55px 0 rgba(0, 0, 0, 0.3), 0 17px 17px 0 rgba(0, 0, 0, 0.15);
}