@keyframes slideFadeInFromTop {
  0% {
    transform: translateY(-100%);
    opacity: 0.2;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes slideFadeInFromBottom {
  0% {
    transform: translateY(10%);
    opacity: 0.2;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes slideFadeOut {
	0% {
    transform: translateY(0%);
    opacity: 1;
  }
  50% {
  	opacity: 0;
  	transform: translateY(5%);
  }
  100% {
    transform: translateY(10%);
    opacity: 0;
  }
}

@keyframes fadeIn {
  0% {
    opacity: 0.5;
  }
  100% {
    opacity: 1;
  }
}

.fade-out {
	animation: 1s ease-out 0s 1 slideFadeOut;
	background-color: transparent !important;
}

/* PAGE STRUCTURE */

body {
	margin: 0;
}
body .heading-main,
.heading-sub,
.para-main,
.elem-tray {
  margin: auto;
  width: 80%;
  max-width: 500px;
  padding: 5px 10px;

}

body {
	min-width: 270px;
	font-family: 'Open Sans', sans-serif;
}

#mask {
	width: 100%;
	height: 100%;
	position: absolute;
	top: 0;
	left: 0;
	background-color: white;
}

.elem-tray {
	font-family: 'Roboto Mono', monospace;
	color:#63707e;
  padding-top: 20px;
	font-size: 14px;
	text-transform: lowercase;
}

#intro {
	box-sizing: border-box;
  height: 60vh;
  min-height: 570px;
  max-height: 1000px;
  padding-top: 160px;
}

#about-me {
  padding: 26px 0px 0px 0px;
  /* top is first */
}

#portfolio {
  background-color: #33cccc;
  text-align: center;
  padding: 120px 40px;
}

#portfolio-elem-tray {

	flex-direction: column;
  width: 100%;
  height: auto;
}

.flex-grid {
	display: flex;
	max-width: 1100px;
	justify-content: space-between;
	margin: auto;
}

.portfolio-elem-wrapper {
  margin: 5px auto;
	width: 32%;
	max-width: 360px;
  height: 100%;
  cursor: pointer;
  background-color: #0d3f67;
  overflow: hidden;

}

.portfolio-element div {
	position: absolute;
	top: 50%;
  	left: 0;
  	width: 100%;
  	height: 24px;
  	color: #ffffff;
		font-family: 'Roboto Mono', monospace;
  	font-size: 32px;
  	display: none;
  	z-index: 5;
}

.project-title {
	color: #ffffff;
	font-family: 'Roboto Mono', monospace;
	font-size: 13px;
	margin: 10px 0;
	text-transform: lowercase;
}

.portfolio-element div:hover ~ img {
	transition: opacity 0.5s ease-out;
	opacity: 0.1;
}
/* <3 */
.portfolio-element img {
	  max-width: 100%;
	  height: auto;
	  width: auto\9; /* ie8 */
	  opacity: 1;
	  transition: opacity 1s ease-out;
	  z-index: 1;
	  border: 0;
	  vertical-align: top;
}

.portfolio-element img:hover {
  max-width: 100%;
  height: auto;
  width: auto\9;
  /* ie8 */
  transition: opacity 0.5s ease-out;
  opacity: 0.1;
}

#footer {
  text-align: center;
  padding: 20px 0px;
}

/* HEADINGS */

.heading-main {
	animation: 0.7s ease-out 0s 1 slideFadeInFromTop;
	font-family: 'Roboto Mono', monospace;
	color:#63707e;
	font-size: 30px;
	text-transform: lowercase;
}

.heading-sub {
  font-size: 16px;
	color: #0d3f67;
}

/* PARAGRAPHS */

.para-main {
  font-size: 14px;
  line-height: 28px;
  font-weight: 300;
}

.para-alt {
	font-family: 'Roboto Mono', monospace;
	font-size: 14px;
  line-height: 28px;
	font-weight: 300;
	color:#63707e;
}

/* DECORATIONS */
.block-divider {
	height: 3px;
	width: 40px;
	margin-top: 30px;
	margin-bottom: 50px;
	background-color: #33cccc;
	text-align: left;
}

/* MODAL */
.modal-background {
	display: none;
	z-index: 5;
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: rgba(230,255,255,0.7);
	overflow-x: hidden;
	overflow-y: auto;
}

.modal-content {
	position: relative;
	margin: 0 auto;
	background-color: #ffffff;
	opacity: 1;
	max-width: 700px;
	width: auto;
	top: 100px;
	margin-bottom: 150px;
	padding: 50px 60px;
	border: 1px solid #cdfffd;
	-webkit-box-shadow: 19px 14px 98px -30px rgba(0,0,0,0.75);
    -moz-box-shadow: 19px 14px 98px -30px rgba(0,0,0,0.75);
	box-shadow: 19px 14px 98px -30px rgba(0,0,0,0.75);
  	animation: 0.7s ease-out 0s 1 slideFadeInFromBottom;
}

.modal-content img {
		max-width: 100%;
  	height: auto;
		width: auto;
		margin: auto;
		display: flex;
  	padding-top: 60px;
  	padding-bottom: 60px;
  	/* ie8 */
}

#rainworks {
	display: block !important;
}

#rainworks .close-button {
	width: 100px !important;
}

.close-button {
	position: fixed;
	top: 30px;
	right: 30px;
	height: 50px;
	width: 50px;
	opacity: 0.6;
	background-color: #282828;
	transition: opacity 1s ease-out;
	cursor: pointer;
	z-index: 6;
	color: white;
	font-weight: bold;
	font-family: 'Roboto Mono', monospace;
	text-align: center;
	font-size: 24px;
	line-height: 50px;
}

.close-button:hover {
	opacity: 1;
	transition: opacity 1s ease-out;
}
/* TEXT DECORATIONS */

a,
a:hover,
a:active,
a:link,
a:visited,
a:focus {
  transition: all 0.3s linear;
  text-decoration: none;
	color:#63707e;
  border-bottom: 1px solid #33cccc;
}

a:hover {
  color: #33cccc;
}

.elem-tray .text-deco-link {
  font-weight: 300;
}

.text-deco-emphasis {
  font-weight: 300;
}

.text-emphasis {
	font-weight: bold;
	color: #0d3f67;
}

@media only screen and (max-width: 768px) {
	.portfolio-element div {
  		font-size: 20px;
	}

	.flex-grid {
		display: block;
	}

	.portfolio-elem-wrapper {
		width: 100%;
		margin: 5px auto;
		margin-bottom: 20px;
		max-width: 600px;
	}

	#intro {
		height: 600px;
	}

	.project-title {
		font-size: 18px;
	}


}