body {
    font-family: "Montserrat", sans-serif;
    font-size: 16px;
    line-height: 1.8;
    color: #333;
    background-color: #fafafa;
    margin: 0;
}

h1 {
    text-align: center;
    font-size: 46px;
    font-weight: 300;
    line-height: 1.2;
    margin: 35px 8px 10px 8px;
}

@media only screen and (max-width: 992px) {
    h1 {
        font-size: 38px;
    }
}

h2 {
    font-size: 36px;
    font-weight: 300;
    text-transform: uppercase;
    text-align: center;
    margin-bottom: 40px;
}

@media only screen and (max-width: 992px) {
    h2 {
        font-size: 32px;
    }
}

b {
    font-weight: 600;
}

iframe {
    width: 70vw;
    max-width: 500px;
    height: calc(70vw / 1.778);
    max-height: calc(500px / 1.778);
    border: 0;
    box-shadow: 0px 1px 10px 0px #000;
}

.flexbox {
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.flex-wrap {
    flex-wrap: wrap;
}

.content {
    max-width: 1200px;
    margin: auto;
}

.center {
    text-align: center;
    margin: auto;
}

.hidden {
    visibility: hidden;
    opacity: 0;
}

.align {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 40px;
}

.align>* {
    margin: 10px 15px 20px 15px;
}

.stack {
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.stack>* {
    margin: 10px 0 10px 0;
}

.button-link {
    font-size: 15px;
    font-weight: 500;
    color: #444;
    background-color: #fff;
    text-decoration: none;
    text-transform: uppercase;
    border-radius: 0px;
    box-shadow: 0px 1px 5px 0px #888;
    transition-duration: 0.2s;

    padding: 16px 24px 16px 16px;
    display: inline-flex;
    align-items: center;
}

.button-link:hover {
    box-shadow: 0px 1px 5px 2px #888;
}

.section-dark .button-link {
    color: #fafafa;
    background-color: inherit;
    box-shadow: 0px 1px 5px 0px #000;
}

.section-dark .button-link:hover {
    box-shadow: 0px 1px 5px 2px #000;
}

.button-link img {
    width: 32px;
    margin-right: 16px;
}

.section {
    padding: 20px 5% 50px 5%;
}

.section>.flexbox>div {
    margin: 0 2vw;
}

.section-dark {
    background-color: #444;
    color: #fafafa;
}

.section-darker {
    background-color: #f5f5f5;
}

.menu {
    display: flex;
    flex-direction: column;
}

.menu-row {
    display: flex;
}

.card {
    display: block;
    padding: 0px 10px 20px 10px;
    margin: 15px;
    background-color: #fff;
    box-shadow: 0px 1px 5px 0px #888;
    border-radius: 0px;
    text-decoration: none;
    transition-duration: 0.2s;
}

.card:hover {
    box-shadow: 0px 1px 5px 2px #888;
}

.card img {
    width: 180px;
    min-width: 11vw;
    padding: 15%;
    box-sizing: border-box;
}

.card h3 {
    font-size: 18px;
    font-weight: 500;
    text-transform: uppercase;
    text-align: center;
    color: #444;
    margin: 0;
}

@media only screen and (max-width: 992px) {
    .menu-row {
        flex-direction: column;
    }

    .card {
        padding: 15px 20px;
    }

    .card img {
        min-width: 0;
        width: 50px;
        padding: 0;
        float: left;
        vertical-align: center;
    }

    .card h3 {
        line-height: 50px;
        margin-left: 20px;
        float: left;
    }
}

@media only screen and (max-width: 768px) {
    .card {
        padding: 10px 20px 10px 15px;
        margin: 10px;
    }

    .card img {
        width: 40px;
    }

    .card h3 {
        font-size: 16px;
        line-height: 40px;
        margin-left: 15px;
        float: left;
    }
}

.dev-project {
    width: 300px;
    margin: 15px;
    background-color: #fff;
    box-shadow: 0px 1px 5px 0px #888;
}

.dev-project>* {
    margin: 15px 20px 15px 20px;
}

.dev-project>img {
    width: 100%;
    margin: 0;
}

.dev-project h3 {
    font-size: 20px;
    font-weight: 500;
    text-transform: uppercase;
    text-align: center;
}

.dev-project p {
    font-size: 16px;
    text-align: center;
    margin-bottom: 20px;
}

.social-icons {
    margin: 0 auto;
    display: flex;
    justify-content: center;
}

.social-icons img {
    width: 32px;
    height: 32px;
    margin: 16px 8px 0px 8px;
}

.profile-image {
    display: block;
    width: 350px;
    max-width: 80vw;
    margin: auto;
    border: 5px solid #eee;
    border-radius: 50%;
    box-sizing: border-box;
    box-shadow: 0px 0px 15px 0px #888;
}

@media only screen and (max-width: 992px) {
    .profile-image {
        width: 300px;
    }
}

#start {
    min-height: 100vh;
    padding: 20px 2vw;
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
}

#start>div {
    box-sizing: border-box;
    margin: 20px 0;
    padding: 0 30px;
}

@media only screen and (max-width: 768px) {
    #start {
        flex-direction: column;
    }

    #start>div {
        padding: 0;
    }
}

#photos-grid {
    position: relative;
    max-height: 60vw;
    padding-top: 10px;
    overflow: hidden;
    transition: 0.8s max-height, 0.8s padding;
}

#photos-grid.collapsed {
    max-height: 30vw;
    padding-bottom: 8vw;
}

#photos-grid:after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    pointer-events: none;
    background-image: linear-gradient(to bottom,
            rgba(68, 68, 68, 0),
            rgba(68, 68, 68, 1) 90%);
    width: 100%;
    height: 100px;
    opacity: 0;
    transition: 0.8s opacity;
}

#photos-grid.collapsed:after {
    opacity: 1;
}

#photos-grid div {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(4, 14vw);
    grid-gap: 1vw;
    margin: 0 2vw 3vw 2vw;
}

@media only screen and (max-width: 992px) {
    #photos-grid {
        max-height: 244vw;
    }

    #photos-grid.collapsed {
        max-height: 70vw;
    }

    #photos-grid div {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(8, 28vw);
        grid-gap: 2.5vw;
        margin: 0 2vw 5vw 2vw;
    }
}

@media only screen and (max-width: 600px) {
    #photos-grid {
        max-height: 928vw;
    }

    #photos-grid.collapsed {
        max-height: 190vw;
    }

    #photos-grid div {
        grid-template-columns: repeat(1, 1fr);
        grid-template-rows: repeat(16, 53vw);
        grid-gap: 5vw;
        margin: 0 6vw 9vw 6vw;
    }
}

#photos-grid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    box-shadow: 0px 0px 10px 0px #000;
    cursor: pointer;
    transition-duration: 0.0.8s;
}

#photos-grid img:hover {
    box-shadow: 0px 0px 10px 3px #000;
}

#photos-grid .grid-row-2 {
    grid-row: span 2;
}

#expand-button img {
    width: 60px;
    margin-top: 40px;
    transition: 0.4s transform;
}

@media only screen and (max-width: 992px) {
    #expand-button img {
        width: 50px;
    }
}

#expand-button.rotated img {
    transform: rotateX(180deg);
}

@media only screen and (max-width: 370px) {
    #email-button {
        font-size: 12px;
    }
}

#dim {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2;
    transition-duration: 0.2s;
}

#loading-icon {
    display: block;
    height: 64px;
    width: 64px;
}

#photo-fullscreen {
    position: fixed;
    display: block;
    top: 50%;
    left: 50%;
    height: 100%;
    padding: 4vh 0;
    transform: translate(-50%, -50%);
    box-sizing: border-box;
    z-index: 3;
    transition: opacity 0.2s;
}

#photo-fullscreen img {
    display: block;
    margin: auto;
    height: 100%;
}

#photo-fullscreen #closePhotoButton {
    position: absolute;
    top: 6vh;
    right: 2vh;
    width: 30px;
    height: 30px;
    opacity: 0;
    cursor: pointer;
}

#photo-fullscreen:hover #closePhotoButton {
    opacity: 0.8;
}

#photo-fullscreen.portrait-fix {
    width: 100%;
    height: auto;
    padding: 0 4vw;
}

#photo-fullscreen.portrait-fix img {
    width: 100%;
}

#photo-fullscreen.portrait-fix #closePhotoButton {
    top: 2vw;
    right: 6vw;
}

#top-button {
    position: fixed;
    bottom: 0;
    right: 0;
    width: 22px;
    height: 22px;
    margin: 25px;
    padding: 20px;
    background-color: #555;
    border-radius: 50%;
    box-shadow: 0px 0px 10px 0px #000;
    z-index: 1;
    transition-duration: 0.2s;
}

#top-button:hover {
    box-shadow: 0px 0px 10px 2px #000;
}

#top-button img {
    width: 100%;
}

@media only screen and (max-width: 992px) {

    #cubing>.flexbox,
    #about>.flexbox {
        flex-direction: column;
    }

    #cubing .iframe-container {
        margin-top: 30px;
        margin-left: auto;
        margin-right: auto;
    }

    #cubing iframe {
        width: 80vw;
        height: calc(80vw / 1.778);
    }

    #contact {
        margin: auto;
    }
}