:root {
    --clr-primary: rgb(52, 45, 51);
    --clr-secondary: #fff;

    --clr-link-primary: rgb(52, 190, 40);
    --clr-link-secondary: #fff;

    --clr-background-primary: #FFF;
}

/* 
*  TABLE OF CONTENTS
*  
*  1.0 - Reset
*  2.0 - Globals
*  3.0 - Typography
*  4.0 - Layouts / Views
*    4.1 - '' Main '' - Section
*    4.2 - Navigation
*    4.x - Impressum
*    4.x - Privacy
*    4.x - Footer
*  5.0 - Components
*    5.1 - Forms
*    5.2 - Buttons
*  6.0 - Utillity
*  7.0 - Media Queries
*
*/



/*  ================================
        1.0 Reset
    ================================ */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

input,
textarea,
button {
    border: 0;
    outline: 0;
}

textarea {
    resize: vertical;
}

img {
    max-width: 100%;
}



/*  ================================
        2.0 Globals
    ================================ */

::selection {
    color: var(--clr-secondary);
    background-color: var(--clr-primary);
}

html,
body,
body::before {
    min-height: 100vh; /* Fallback */
    min-height: calc(var(--vh, 1vh) * 100);
    width: 100%;
    font-size: clamp(13px, 3vw, 15px);
}

body {
    position: relative;
    color: var(--clr-primary);
    background-color: var(--clr-background-primary);
    font-family: "inter var", sans-serif;
    font-weight: 400;
    letter-spacing: .03em;
    line-height: 1.5;
    text-rendering: optimizeLegibility;
}

body::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    opacity: .2;
    background: url("../images/fleck-black.png");
    z-index: -1;
}


ul li {
    margin-bottom: .5rem;
    line-height: 1.4em;
}



/*  ================================
        3.0 Typography
    ================================ */

a {
    color: var(--clr-link-primary);
    border-bottom: 1px solid;
    text-decoration: none;
}   

p {
    line-height: 1.7em;
}



/*  ================================
        4.0 Layouts
    ================================ */

div.wrapper {
    max-width: 800px;
    margin: 0 auto;
    padding: 75px 28px 28px;
}



    /**
     *      4.1 '' Main '' - Section
     */
section#main {
    position: relative;
    display: flex;
    justify-content: space-between;
}

.about {
    max-width: 585px;
    min-height: 260px;
}

.about p {
    padding: 0 5em 1em 0;
}

p a {
    padding-bottom: .2em;
}



    /**
     *      4.2 Navigation
     */
nav {
    min-width: 135px;
}

nav ul {
    position: relative;
    list-style: none;
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    height: 100%;
    text-align: right;
}

.nav-item a {
    color: var(--clr-primary);
    border: 0;
    font-family: 'Nunito';
    /*font-size: clamp(.7rem, 3vw, 1rem);*/
    padding: .7em 1.4em;
}

.nav-item a:hover,
.nav-item a::selection { /* might be bad UX but helps the UI for sure */
    border-right: 2px solid var(--clr-link-primary);
    font-weight: bolder;
}

.links {
    position: relative;
    left: 0;
}

.links a {
    border-bottom: 0;
    color: #342D33;
    font-size: 1.728em;
    margin-right: 1.2em;
    padding-bottom: 0;
    top: 0;
}

.links a:first-child {
    margin-left: 2px;
}

.links a:hover {
    top: -10px;
    transition: all .3s ease-out;
}

.links a > * {
    transition: all .2s;
}

.links a:hover > * {
    transform: translateY(-5px);
}

    /**
     *      4.x Project Grid
     */
#projects {
    padding: 5rem;
    width: 100%;
}

.project-container {
    display:grid;
    /*grid-template-columns: repeat(11, minmax(150px, 1fr));*/
    grid-template-columns: repeat(11, 1fr);
    height: 100%;
    align-items: center;
    justify-items: center;
}

.project-item {
    max-width: 100%;
    line-height: 0;
    overflow: hidden;
}

.project-item a img {
    transform:  scale(1.0);
    transition: 0.2s transform;
}

.project-item:hover a img {
    transform: scale(1.10);
}

.tool {
    cursor: help;
    position: relative;
}

.tool::before,
.tool::after {
    left: 50%;
    opacity: 0;
    position: absolute;
    z-index: -100;
}

.tool:hover::before,
.tool:focus::before,
.tool:hover::after,
.tool:focus::after {
    opacity: 1;
    transform: scale(1) translateY(0);
    z-index: 100; 
}

.tool::before {
    border-style: solid;
    border-width: 1em 0.75em 0 0.75em;
    border-color: #3E474F transparent transparent transparent;
    bottom: 100%;
    content: "";
    margin-left: -0.5em;
    transition: all .45s cubic-bezier(.84,-0.18,.31,1.26), opacity .65s .5s;
    transform:  scale(.6) translateY(-90%);
} 

.tool:hover::before,
.tool:focus::before {
    transition: all .65s cubic-bezier(.84,-0.18,.31,1.26) .2s;
}

.tool::after {
    background: #3E474F;
    border-radius: .25em;
    bottom: 110%;
    color: #EDEFF0;
    content: attr(data-tip);
    text-align: center;
    margin-left: -8.75em;
    padding: 1em;
    transition: all .65s cubic-bezier(.84,-0.18,.31,1.26) .2s;
    transform:  scale(.6) translateY(50%);  
    width: 17.5em;
}

.tool:hover::after,
.tool:focus::after  {
    transition: all .65s cubic-bezier(.84,-0.18,.31,1.26);
}


    /**
     *      4.3 Impressum
     */
.impressum {
    padding-top: 2em;
}

.impressum > * {
    margin-bottom: 1.6em;
}

.link-home {
   color: black;
   border-style: solid;
   border-width: 3px 3px 3px 0;
   padding: .6em .4em .6em 0;
}

.link-home i {
    background-color: #000; 
    color: #fff; 
    padding: .6em .8em;
}



    /**
     *      4.x Privacy
     */
.privacy {
    padding-top: 2em;
    letter-spacing: .05em;
}

.privacy > * {
    margin-bottom: 1.6em;
}

/* default thingy fix*/
.privacy ul {
    padding-inline-start: 40px;
}



    /**
    *      4.x Footer
    */
footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    display: flex;
    justify-content: flex-end;
    font-size: .8rem;
}

footer a {
    padding: .6em .6em;
    border-bottom: 0;
    color: #222;
}


/*  ================================
        5.0 Components
    ================================ */

    /**
     *      5.1 Forms
     */
/*
    TODO refactor the whole FORMS appartment


form {
    position: relative;
}

.form-container {
    *//* temp vars *//*
    --primary: #342D33;
    --accent: #fff;

    *//*background-color: #342D33;*//*
    background: transparent;
    border: 2px solid var(--primary);
    border-radius: 2em;
    padding: 2em;
}

.form-container h1 {
    text-align: center;
    color: var(--primary);
    padding-bottom: 1.5em;
}

.form__group {
    --label-no-placeholder: 22px;
    --label-placeholder: -12px;

    display: flex; 
    flex-grow: 1;
    position: relative;
    padding: 10px 0 0 0;
    margin-bottom: 2rem;
}

.form__field {
    width: 100%;
    font-size: 1.1rem;
    color: var(--accent);
    background: var(--primary);
    padding: 1em;
    transition: top, font-size, color, padding 0.3s;
}

.form__field textarea {
    min-height: 3rem;
}

.form__field[type="file"] {
    background-color: transparent;
}

input[type="submit"],
button[type="submit"] {
    display: block;
    margin: 0 auto;
    padding: 1.2em;
    cursor: pointer;
}

input[type="submit"]:hover,
button[type="submit"]:hover {
    font-size: 1.05em;
    padding: 1.1em;
}


.form__field::placeholder { *//* first part of the trick *//*
    color: transparent;
}

.form__field:placeholder-shown ~ .form__label {
    font-size: 1.1rem;
    cursor: text;
    top: var(--label-no-placeholder);
    color: var(--accent);
    padding: 0 0 0 .5em;
}

.form__label {
    position: absolute;
    top: var(--label-placeholder);
    display: block;
    transition: 0.2s;
    font-size: 1rem;
    color: var(--primary);
}

.form__field:focus {
    padding: 6px 0;
    padding: 1em;
    font-weight: 700;
    *//*
    border-width: 3px;
    border-image: linear-gradient(to right, var(--clr-link-primary) 30%, #11998e);
    border-image-slice: 1;
    *//*
}

.form__field:focus ~ .form__label {
    position: absolute;
    top: var(--label-placeholder);
    display: block;
    transition: 0.2s;
    font-size: 1rem;
    padding: 0;
    color: var(--primary);
    font-weight: 700;
}

.form__field:read-only {
    color: rgba(255, 255, 255, 0.2);
}
*/
/* css magic */
/*
.form__field:read-only + label.form__label::after {
    content: " (read-only)";
    color: rgba(255, 255, 255, 0.15);
}

.form__field:required, 
.form__field:invalid {
    box-shadow: none;
}

.form__group .error:not(:empty) {
    background-color: red;
    padding: 1em;
    color: #fff;
}
*/

/* TODO make upload button more beautiful */

    /**
     *      5.2 Buttons
     */
.btn {
    padding: 1em;
}

div#back {
    position: fixed;
    right: 0;
    bottom: 0;
    background-color: var(--clr-primary);
    padding: 1em .5em;
    border-radius: 2em 0 0 0;
}

div#back a {
    border: 0;
    color: #fff;
}



/*  ================================
        6.0 Utillity
    ================================ */
.link-disabled {
    color: currentColor;
    cursor: not-allowed;
    opacity: 0.5;
    text-decoration: line-through;
}

.link-disabled:hover {
    border: 0 !important;
    font-weight: normal !important;
}

/*  ================================
        7.0 Media Media Queries
    ================================ */
@media screen and (max-width: 1200px) {
    .project-container {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media screen and (max-width: 820px) {   
    #projects {
        padding: 2em;
    }

    .project-container {
        grid-template-columns: repeat(5, 1fr);
    }

    .tool::after { 
        font-size: .75em;
        margin-left: -5em;
        width: 10em; 
    }
}

@media screen and (max-width: 530px) {
    div.wrapper {
        padding-top: 50px;
    }

    h1{
        font-size:1.728em
    }

    section#social-links {
        margin-top: 3em;
    }

    .about p {
        padding: 0;
    }

    .about p+p {
        padding-top: 1em;
    }

    .project-container {
        grid-template-columns: repeat(3, 1fr);
    }
}