/* Font-Faces */
@font-face {
    font-family: 'Nunito';
    src: url(Nunito_Regular.ttf);
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Nunito';
    src: url(Nunito_Bold.ttf);
    font-weight: bold;
    font-style: normal;
}

@font-face {
    font-family: 'Nunito';
    src: url(Nunito_Italic.ttf);
    font-weight: normal;
    font-style: italic;
}

@font-face {
    font-family: 'Nunito';
    src: url(Nunito_Black.ttf);
    font-weight: 900;
    font-style: normal;
}

@font-face {
    font-family: 'Roboto';
    src: url(Roboto_Regular.ttf);
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Roboto';
    src: url(Roboto_Bold.ttf);
    font-weight: bold;
    font-style: normal;
}

@font-face {
    font-family: 'Roboto';
    src: url(Roboto_Italic.ttf);
    font-weight: normal;
    font-style: italic;
}

/* Basic & Defaults */
* {
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: rgba(20, 19, 19, 0.88);
    color: #ffffff;
    /* Adding border for now so one can see where the "virtual screen" is */
}

.body-wrap {
    max-width: 1200px;
    margin: auto;
    background-color: #141313;
}

body h1, body h2, body h3 {
    font-family: 'Nunito', sans-serif;
    font-weight: 900;
    /* Override dumb shit by chrome user agent */
    margin-block-start: 0;
    margin-block-end: 0;
}

main {
    padding-left: 32px;
    padding-right: 32px;
}

.section-title {
    /* padding-left: 32px; Originally planned in figma; left out cause didn't look good */
    padding-top: 64px;
    margin-bottom: 64px;
    width: 60%;
}

.section-title h1 {
    font-size: 30pt;
}

.section-title p {
    font-size: 16pt;
}

hr {
    border: 1px solid #201E1E;
}

/* This class aligns items inside a div to the right */
.float-right {
    float: right;
}

.float-left {
    float: left;
}

/* Styles specifically for the legal stuff (privacy and legal notice)*/
.legal h1, .legal h2 {
    text-align: center;
    line-height: 50px;
}

.legal h3, .legal h4 {
    line-height: 40px;
}

.legal ul {
    list-style-type: none;
}

.legal {
    line-height: 25px;
    padding: 16px;
}

.imprint p{
    text-align: center;
}

/* back to top button */
.back-to-top-btn {
    display: flex;
    background-color: #00AA00;
    width: 50px;
    height: 50px;
    text-align: center;
    border-radius: 50px;
    position: fixed;
    bottom: 32px;
    right: 32px;
    visibility: hidden;
    transition: background-color .3s, opacity .5s, visibility .5s;
    opacity: 0;
    justify-content: center;
    align-items: center;
}

.back-to-top-btn:hover {
    cursor: pointer;

}

.back-to-top-btn svg {
    /* Needed to place the svg arrow in the "real" middle vertically */
    padding-bottom: 4px;
}

.back-to-top-btn.show {
    visibility: visible;
    opacity: 1;
}

/* Navigation */
.desktop-nav {
    overflow: auto;
}

.desktop-nav li {
    display: inline;
    float: left;
}

.desktop-nav ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background-color: #141313;
    float: right;
}

.desktop-nav li a {
    display: block;
    color: white;
    text-align: center;
    padding: 14px 16px;
    text-decoration: none;
}

.desktop-nav li a:hover {
    background-color: #201E1E;
}

.desktop-nav .active {
    background-color: #00AA00;
}

.hamburger-container {
    width: 100%;
    margin: 0 auto;
    overflow: auto; /** Needed for not overlapping **/
}

.hamburger {
    z-index: 99;
    position: relative;
    display: none;
    width: 35px;
    height: 35px;
    cursor: pointer;
    appearance: none;
    background: none;
    outline: none;
    border: none;
    /* !? Margin top not working */
    margin-top: 16px;
    margin-right: 16px;
    margin-left: auto;
}

.hamburger .bar, .hamburger:after, .hamburger:before {
    content: '';
    display: block;
    width: 100%;
    height: 3px;
    background-color: white;
    margin: 6px 0;
    transition: 0.4s;
}

.hamburger.is-active:before {
    transform: rotate(-45deg) translate(-4px, 8px);
}

.hamburger.is-active:after {
    transform: rotate(45deg) translate(-4px, -8px);
}

.hamburger.is-active .bar {
    opacity: 0;
}

.hide-overflow {
    overflow: hidden;
}

.mobile-nav {
    display: block;
    position: fixed;
    top: 0;
    left: 100%;
    width: 100%;
    min-height: 100vh;
    z-index: 98;
    background-color: #141313;
    padding-top: 120px;
    transition: 0.4s;
}

.mobile-nav.is-active {
    left: 0;
}

.mobile-nav ul {
    list-style: none;
}

.mobile-nav a {
    display: block;
    text-align: center;
    width: 100%;
    max-width: 200px;
    margin: 0 auto 16px;
    padding: 12px 16px;
    background-color: #201E1E;
    text-decoration: none;
    color: white;
}

/* Hero section */
.hero {
    background: rgba(0, 0, 0, .4) url("Hero_background.jpg") no-repeat;
    background-blend-mode: darken;
    background-size: cover;
    height: 800px;
}

.hero h1 {
    font-size: 48pt;
    text-align: left;
    padding-top: 200px;
    padding-left: 64px;
}

.hero h2 {
    font-size: 32pt;
    text-align: left;
    padding-left: 64px;
    font-weight: bold;
}

/* Skills section */
.grid-container {
    display: grid;
    row-gap: 32px;
    grid-template-columns: auto auto auto auto;
    margin: 0 auto;
    justify-content: space-around;
}

.skill-box {
    background-color: #201E1E;
    padding: 32px;
    width: 200px;
    height: 300px;
}

.skill-box h3 {
    padding-top: 16px;
}

/* Life section */
.my-life div:last-child {
    border-bottom: none;
}

.life-part {
    padding-top: 32px;
    padding-bottom: 32px;
    border-bottom: 1px solid #201E1E;
}

.life-part-container {
    display: flex;
    align-items: center;
}

.life-part-text {
    padding-right: 64px;
}

.life-part-text h3 {
    font-size: 20pt;
    font-weight: bold;
}

.life-part-date {
    width: 600px;
    margin-right: 0;
    text-align: right;
    padding-right: 16px;
}

.life-part-date h1 {
    font-family: 'Roboto', sans-serif;
    font-weight: bold;
    font-size: 24pt;
    text-transform: uppercase;
}

/* Projects section */
.project-cards-container {
    display: flex;
    justify-content: space-evenly;
    flex-direction: row;
    flex-wrap: wrap;
    row-gap: 32px;
    align-items: center;
    column-gap: 16px;
}

.project-card {
    background-color: #201E1E;
    width: 300px;
    height: 500px;
}

.project-card-top {
    height: 200px;
    width: auto;
}

.project-card-bottom {
    height: 300px;
    position: relative;
}

.project-card-content {
    padding: 16px;
}

.project-card-btn {
    position: absolute;
    right: 16px;
    bottom: 16px;
}

.project-card-btn a {
    background-color: #00AA00;
    padding: 5px;
    border-radius: 5px;
    text-decoration: none;
    color: #ffffff;
}

/* Contact section */
.contact {
    margin-top: 128px;
}

.contact-container {
    background-color: #201E1E;
    padding: 16px;
    display: flex;
    align-items: center;
    margin-right: 80px;
    margin-left: 80px;
}

.contact-description-wrap {
    width: 50%;
    border-right: 1px solid #ffffff;
    padding-left: 16px;
}

.contact-description {
    padding-right: 64px;
    padding-left: 32px;
}

.contact-description h1 {
    font-size: 24pt;
    text-align: center;
}

.contact-description p {
    font-size: 13pt;
    text-align: left;
    line-height: 1.5em;
    padding-top: 16px;
}

.social-media {
    padding-left: 32px;
    padding-right: 32px;
    display: flex;
    justify-content: space-evenly;
    padding-top: 16px;
}

.social-media a {
    text-decoration: none;
    color: #ffffff;
}

.social-media a:hover {
    color: #00AA00;
}

.contact-form-wrap {
    width: 50%;
    text-align: center;
}

.contact-form {
    padding-left: 32px;
    padding-right: 32px;
}

.contact-form-fields-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.contact-form-firstrow {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-left: 64px;
    margin-right: 64px;
}

.contact-form-secondrow {
    margin-top: 32px;
    width: 90%;
}

.text-input-half {
    position: relative;
}

.text-input-half input {
    width: 100%;
    padding: 10px 0;
    font-size: 12px;
    color: #fff;
    margin-bottom: 30px;
    border: none;
    border-bottom: 1px solid #fff;
    outline: none;
    background: transparent;
}

.text-input-half label {
    position: absolute;
    top: 0;
    left: 0;
    padding: 10px 0;
    font-size: 12px;
    color: #fff;
    pointer-events: none;
    transition: .5s;
}

.text-input-half input:focus ~ label,
.text-input-half input:active ~ label,
.text-input-half input:valid ~ label {
    top: -20px;
    left: 0;
    font-size: 12px;
}

.text-area-full {
    position: relative;
}

.text-area-full textarea {
    width: 100%;
    padding: 10px 0;
    font-size: 12px;
    color: #fff;
    margin-bottom: 30px;
    border: none;
    border-bottom: 1px solid #fff;
    outline: none;
    background: transparent;
    resize: vertical;
    max-height: 200px;
    height: 50px;
}

.text-area-full label {
    position: absolute;
    top: 0;
    left: 0;
    padding: 10px 0;
    font-size: 12px;
    color: #fff;
    pointer-events: none;
    transition: .5s;
}

.text-area-full textarea:focus ~ label,
.text-area-full textarea:active ~ label,
.text-area-full textarea:valid ~ label {
    top: -20px;
    left: 0;
    font-size: 12px;
}

.contact-form-button {
    padding: 5px;
    background-color: #00AA00;
    border: none;
    border-radius: 5px;
}

/* Footer */
footer {
    background-color: #201E1E;
    margin-top: 128px;
    height: 100px;
}

.footer-wrap {
    display: flex;
    justify-content: space-between;
    height: 100%; /* Needed to match parent */
    align-items: center;
}

.copyright {
    padding-left: 16px;
}

.footer-links {
    display: flex;
    float: right;
}

.footer-links p {
    padding-right: 16px;
}

.footer-links p a {
    text-decoration: none;
    color: #ffffff;
}

.footer-links p a:hover {
    color: #00AA00;
}

/* Media queries */

@media all and (max-width: 1200px) {
    .grid-container {
        grid-template-columns: auto auto auto;
    }

    .life-part-text {
        width: 900px;
    }
}

/* This special breakpoint is needed for the project section */
@media all and (max-width: 1050px) {
    .project-cards-container {

    }
}

@media all and (max-width: 950px) {


    .grid-container {
        grid-template-columns: auto auto;
    }

    .life-part-container {
        flex-direction: column-reverse;
        align-items: unset;
    }

    /* ! Not working for first element: Why???*/
    .life-part-text {
        width: auto;
    }

    .life-part-date {
        width: auto;
        padding-bottom: 32px;
        display: inline;
        text-align: center;
    }

    .contact-container {
        flex-direction: column;
    }

    .contact-description-wrap {
        border-right: none;
        width: 90%;
        border-bottom: 1px solid #ffffff;
        padding-bottom: 16px;
    }

    .contact-form-wrap {
        padding-top: 32px;
        width: 70%;
    }
}

@media all and (max-width: 850px) {
    .hero {
        background-position: right;
    }

    .hero h1 {
        text-align: right;
        padding-right: 64px;
    }

    .hero h2 {
        text-align: right;
        padding-right: 64px;
    }
}

/* Needed for the contact form */
@media all and (max-width: 750px) {
    .contact-form-firstrow {
        flex-direction: column;
    }
}

@media all and (max-width: 700px) {
    .hero {
        /* TODO add copyright note: https://unsplash.com/photos/man-wearing-gray-jacket-looking-side-view-yJ_nkhvcwAA*/
        background-image: url("hero_background_small.jpg");
    }

    .hero h1 {
        text-align: center;
        padding-right: 0;
        padding-left: 0;
    }

    .hero h2 {
        text-align: center;
        padding-right: 0;
        padding-left: 0;
    }

    .grid-container {
        grid-template-columns: auto;
    }

    .skill-box {
        background-color: #201E1E;
        padding: 32px;
        width: 300px;
        height: 200px;
    }

    .contact-container {
        margin: auto;
    }
}

@media all and (max-width: 600px) {
    .section-title {
        width: auto;
        padding-right: 16px;
        padding-left: 16px;
    }

    .hero h1 {
        font-size: 32pt;
    }

    .hero h2 {
        font-size: 24pt;
    }

    /* TODO: Burger menu (JS?) */
    .desktop-nav {
        display: none;
    }

    .hamburger {
        display: block;
    }

}

@media all and (max-width: 430px) {
    main {
        padding-left: 16px;
        padding-right: 16px;
    }

    .skill-box {
        width: 190px;
        height: 270px;
    }

    .life-part-text {
        padding-right: 0;
    }

    .contact {
        width: 100%;
    }

    .contact-container {
        width: 80%;
    }

    .contact-description {
        padding: 0;
    }

    .contact-form-wrap {
        padding: 32px 0 0;
    }

    .contact-form {
        padding: 0;
    }

    .contact-form-firstrow {
        margin: 0;
    }

    footer {
        width: 100%;
    }

    .footer-wrap {
        justify-content: space-around;
    }

    .footer-wrap p {
        font-size: 9pt;
    }
}