/********************************************************************************************************/
/* Resets (http://meyerweb.com/eric/tools/css/reset/ | v2.0 | 20110126 | License: none (public domain)) */
/********************************************************************************************************/

html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{
    margin:0;
    padding:0;
    border:0;
    font-size:100%;
    font:inherit;
    vertical-align:baseline;
}

article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{
    display:block;
}

body{
    line-height:1;
}

ol,ul{
    list-style:none;
}

blockquote,q{
    quotes:none;
}

blockquote:before,blockquote:after,q:before,q:after{
    content:'';
    content:none;
}

table{
    border-collapse:collapse;
    border-spacing:0;
}

body{
    -webkit-text-size-adjust:none
}
 
/*********************************************************************************/
/* Box model                                                                     */
/*********************************************************************************/

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

/*********************************************************************************/
/* Basic                                                                         */
/*********************************************************************************/

html {
  font-size: 1em;
}

@media only screen and (min-width: 600px) {
    html {
      font-size: 1.3em;
    }
}

body {
    width: 100%;
    font-family: 'Roboto', Helvetica, sans-serif;
}

a {
    color: rgba(0, 122, 255, 0.8);
    text-decoration: none !important;
}

a:hover {
    color: rgba(0, 122, 255, 0.5);
}

/*********************************************************************************/
/* Containers                                                                    */
/*********************************************************************************/

.container {
	width: 90%;
	margin-left: auto;
	margin-right: auto;
}

/* Modifiers */
	
.container.small {
    font-size: 0.7rem;
}

.container.big {
	font-size: 1rem;
}

@media only screen and (max-width: 600px) {
    .container {
    	width: 100%;
        
    }
}

#header {
    font-family: 'Raleway', Helvetica, sans-serif;
    height: 100%;
    padding: 4em 0em;
}

/*********************************************************************************/
/* Logo                                                                          */
/*********************************************************************************/

#logo {
	position: relative;
	z-index: 1;
    height: 100%;
    
    padding: 0px 20px;
    margin-bottom: 20px;
}
	
#logo h1 {
	color: #FFF;
	text-decoration: none;
	font-weight: 300;
	font-size: 3rem;
	color: #FFF;
	letter-spacing: -0.05rem;
}
		
#logo span {
	font-size: 1.4em;
	color: #FFF;
}

.repo-button {
    padding: 10px 15px;
    
    margin-top: 20px;
    
    border-radius: 25px;
    border-color: #111;
    border-width: 1.5px;
    background-color: #eee;
    
    -moz-transition: all 0.2s ease;
    -webkit-transition: all 0.2s ease;
    -ms-transition: all 0.2s ease;
    transition: all 0.2s ease;
    
    font-size: 16px;
    text-decoration: none !important;
    position: relative;
    border-bottom-width: 0;
    vertical-align: baseline;
    line-height: 45px;
    
    color: #444;
    
    opacity: 0.75;
}

.repo-button i {
    margin-right: 5px;
}

.repo-button:hover {
    color: #444;
    opacity: 1.0;
}

#featured {
    padding: 40px 40px 0px 40px;
    background-color: #fff;
    
	position: relative;
	text-align: center;
}

#featured-text p {
    padding: 0 5%;
	line-height: 2em;
	font-size: 0.8rem;
}

#featured-text hr {
    margin-top: 40px;
}

#featured h1 {
    font-weight: 350;
    font-size: 2rem;
    text-align: center;
    padding-top: 20px;
}

@media only screen and (max-width: 600px) {
    #featured {
        padding: 20px 20px 0px 20px;
    }
    
    #featured-text hr {
        margin-top: 20px;
    }
}

@media only screen and (min-width: 1400px) {
    #featured h1 {
        padding-top: 40px;
    }
}

/*********************************************************************************/
/* Projects                                                                      */
/*********************************************************************************/

#main {
	position: relative;
	background: #fff;
}

#main h1 {
    font-weight: 350;
    font-size: 2rem;
    text-align: center;
    padding-top: 20px;
}

@media only screen and (max-width: 600px) {
    #main {
        padding-left: 20px;
        padding-right: 20px;
    }
}

@media only screen and (min-width: 1400px) {
    #main h1 {
        padding-top: 40px;
    }
}

.noscroll { 
    height: 100%;
    overflow: hidden;
}

.grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    padding: 20px 0px;
    
}

@media only screen and (min-width: 1400px) {
    .grid {
        padding: 40px 0;
    }
}
        
.grid-item {
    background-color: #f9f9f9;
    border-radius: 10px;
    padding: 20px;
    flex: 0 1 23%;
    display: inline-block;
    margin-bottom: 2%;
    position: relative;
    margin-left: 1%;
    margin-right: 1%;
    
    box-shadow: 0px 10px 30px 0px rgba(0, 0, 0, 0.1);
    border: 0.5px solid #ddd;
}

@media only screen and (max-width: 1400px) {
    .grid-item {
        flex: 0 1 45%;
        margin-bottom: 5%;
        margin-left: 2.5%;
        margin-right: 2.5%;
    }
}

@media only screen and (max-width: 500px) {
    .grid-item {
        width: 100%;
        flex: 1 1 100%;
        margin-right: 0px;
        margin-bottom: 20px;
        margin-left: 0;
        margin-right: 0;
    }
}
                
.grid-item-header {
    font-size: 0;
    margin-bottom: 10px;
    display: flex;
    text-align: left;
}

.grid-item-header img {
    display: inline-block;
    width: 25%;
    max-width: 90px;
    vertical-align: top;
    object-fit: contain;
    align-self: flex-start;
}

@media only screen and (max-width: 1400px) {
    .grid-item-header img {
        max-width: 70px;
    }
}

@media only screen and (max-width: 500px) {
    .grid-item-header img {
        width: 30px;
    }
}

.grid-item-header-inner {
    display: inline-block;
    vertical-align: bottom;
    padding-left: 20px;
    padding-right: 0px;
    flex: 1;
    height: 100%;
}

@media only screen and (max-width: 1400px) {
    .grid-item-header-inner {
        width: 80%;
    }
}

@media only screen and (max-width: 500px) {
    .grid-item-header-inner {
        padding-left: 10px;
        padding-right: 0px;
        width: calc(100% - 30px);
    }
}

.grid-item-header-inner h2 {
    font-weight: 300;
    font-size: 1.2rem;
    margin-bottom: 10px;
}

@media only screen and (max-width: 600px) {    
    .grid-item-header-inner .project-type span {
        font-size: 0.9rem;
    }
    
    .grid-item-header-inner .project-type.desktop span {
        font-size: 0.8rem;
    }
    
    .grid-item-header-inner .project-type {
        display: inline-block;
        position: relative;
        top: -2px;
    }
}

@media only screen and (max-width: 500px) {
    .grid-item-header-inner {
        height: 30px;
        vertical-align: middle;
        line-height: 30px;
    }
    
    .grid-item-header-inner h2 {
        display: inline-block;
        
        max-width: 65%;
    
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        
        vertical-align: top;
    }
    
    .grid-item-header-inner .project-type {
        display: inline-block;
        margin-left: 10px;
        position: relative;
        top: 4px;
        
        vertical-align: top;
    }
    
    .grid-item-header-inner .project-type span {
        line-height: 20px;
        font-size: 0.9rem;
    }
}

/* 'pill' shape for project type */
.project-type {
    width: 50px;
    height: 20px;
    border-radius: 15px;
    border-color: #fff;
    border-width: 1px;
    background-color: #000;
}

.project-type span {
    display: block;
    font-size: 0.7rem;
    line-height: 20px;
    color: #fff;
    text-align: center;
    vertical-align: middle;
    margin: auto auto;
}

.project-type.desktop {
    background-color: #8B0000;
}

.project-type.desktop span {
    font-size: 0.6rem;
}

.grid-item-content {
    text-align: center;
    margin-top: 20px;
    font-weight: 300;
}

.grid-item-content p {
    margin-bottom: 50px !important;
    font-size: 0.9rem !important;
    line-height: 1.15rem !important;
}

.grid-item-content .button {
    position: absolute;
    bottom: 20px;
    margin-left: auto;
    margin-right: auto;
    left: 0;
    right: 0;
}

.button {
    width: 50%;
    height: 30px;
    border-radius: 15px;
    background-color: rgba(0, 122, 255, 0.8);
    color: white;
    border: 0;
    cursor: pointer;
    text-align: center;
    font-size: 0.6rem;
    line-height: 30px;
    font-weight: 400;
}

.button:hover {
    background-color: rgba(0, 122, 255, 0.5);
    color: white;
}

/*********************************************************************************/
/* Projects Popup                                                                */
/*********************************************************************************/

.popup {
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background-color: rgba(0,0,0,0.3);
    position: fixed;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s;
    z-index: 100;
}

.popup-inner {
    width: calc(100% - 40px);
    height: calc(100% - 40px);
    width: calc(100% - 40px - env(safe-area-inset-left)*2); /* Safe area insets */
    height: calc(100% - 40px - env(safe-area-inset-top)*2); /* Safe area insets */
    max-width: 900px;
    max-height: 800px;
    background-color: white;
    border-radius: 10px;
    position: relative;
    left: calc(50% - 20px);
    top: calc(50% - 20px);
    left: calc(50% - 20px - env(safe-area-inset-left)); /* Safe area insets */
    top: calc(50% - 20px - env(safe-area-inset-top)); /* Safe area insets */
    transform: translate(-50%, -50%);
    margin: 20px;
    transition: top 0.15s;
    
    overflow: hidden;
    
    box-shadow: 0px 10px 30px 0px rgba(0, 0, 0, 0.1);
}

.popup-inner hr {
    padding: 0;
    margin: 0;
}

.scrollable {
    overflow-y: scroll;
    overflow-x: hidden;
    height: calc(100% - 43px);
    
    -webkit-overflow-scrolling: touch;
    -webkit-backface-visibily: hidden;
    transform: translate3d(0, 0, 0);
    will-change: transform;
}

.scrollable:after {
    content: "";
    padding: 20px;
    display: block;
}

.popup-bar {
    padding: 12px 15px;
    height: 42px;
}

.popup-bar a {
    color: rgba(0, 122, 255, 0.8);
    font-size: 18px;
}

.popup-bar a:hover {
    color: rgba(0, 122, 255, 0.5);
}

.popup-header {
    font-size: 0;
    margin-bottom: 15px;
    display: flex;
    text-align: left;
    padding: 15px 20px;
    
    background: rgb(229,229,229);
    background: linear-gradient(-30deg, rgba(229,229,229,1) 0%, rgba(255,255,255,1) 50%);
}

.popup-header img {
    display: inline-block;
    width: 25%;
    max-width: 130px;
    vertical-align: top;
    object-fit: contain;
    align-self: flex-start;
}

.popup-header-inner {
    display: inline-block;
    vertical-align: bottom;
    padding-left: 20px;
    padding-right: 0px;
    flex: 1;
    height: 100%;
}

@media only screen and (max-width: 600px) {
    .popup-header-inner .project-type span {
        font-size: 1.1rem; /* Hack to avoid font scaling issues */
    }
}

@media only screen and (max-width: 500px) {
    
    .popup-header-inner .project-type {
        height: 20px;
        width: 50px;
    }
    
    .popup-header-inner .project-type span {
        line-height: 20px;
        font-size: 0.8rem;
    }
}

.popup-buttons {
    padding: 0px 20px;
    
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.popup-buttons .button {
    width: calc(40%);
    max-width: 175px;
    min-width: 125px;
    margin: 10px;
}

.popup-buttons i {
    margin-right: 2px;
}

.button-cydia {
    background-color: rgba(128, 82, 52, 0.8);
}

.button-cydia:hover {
    background-color: rgba(128, 82, 52, 0.5);
}

.button-github {
    background-color: rgba(36, 41, 46, 0.8);
}

.button-github:hover {
    background-color: rgba(36, 41, 46, 0.5);
}

.popup-subtitle {
    padding: 15px;
    margin-bottom: 15px;
}

.popup-subtitle p {
    text-align: center;
    font-size: 1rem;
    font-weight: 300;
}

@media only screen and (min-width: 600px) {
    .popup-subtitle p {
        font-size: 0.9rem;
    }
}

.popup-screenshots {
    margin-bottom: 15px;
}

.popup-screenshots h3 {
    padding-left: 20px;
}

.popup-screenshots-img-container {
    overflow-x: scroll;
    overflow-y: hidden;
    height: 45vh;
    min-height: 250px;
    max-height: 800px;
    
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    
    padding-left: 15px;
    padding-right: 15px;
    padding-bottom: 15px;
    
    -webkit-overflow-scrolling: touch;
}

.popup-screenshots-img-container:after {
    content: "";
    padding: 5px;
    display: block;
}

.popup-screenshots-img-container img {
    margin: 0px 5px 10px 5px;
    border-radius: 10px;
    flex: 0 0 auto;
    height: 100%;
    border: 0.5px solid #ddd;
}

.popup-description {
    padding: 5px 20px 15px 20px;
    margin-bottom: 15px;
}

.popup-description p {
    text-align: left;
    font-size: 1rem;
    font-weight: 300;
    padding: 5px 0px;
    line-height: 1.15rem;
}

@media only screen and (min-width: 600px) {
    .popup-description p {
        font-size: 0.9rem;
    }
}

.popup-description ul {
    padding-left: 20px;
    padding-bottom: 10px;
}

.popup-description li {
    padding: 10px 0px;
    border-bottom: 0.5px solid #ddd;
}

.popup-more {
    padding: 0px 20px 15px 20px;
}

.popup-more-grid {
    display: grid;
    grid-template-columns: max-content 75%;
    grid-gap: 10px;
    margin-left: 20px;
    
    font-size: 0.9rem;
    word-wrap: break-word;
}

@media only screen and (max-width: 500px) {
    
    .popup-more-grid {
        grid-gap: 5px;
        margin-left: 0px;
    }
}

.popup-more-grid .left-grid-item {
    font-weight: 300;
    text-align: right;
}

.popup-more-grid .right-grid-item {
    font-weight: 200;
}

.popup h2 {
    font-weight: 300;
    font-size: 1.75rem;
    margin-bottom: 15px;
}

.popup h3 {
    font-weight: 400;
    font-size: 1.15rem;
    margin-bottom: 15px;
}

.popup h4 {
    font-weight: 250;
    font-size: 1.15rem;
    margin-bottom: 15px;
}