* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Verdana, Geneva, Tahoma, sans-serif;
    scroll-behavior: smooth;
}

body {
    /* for no blue on select on mobile phones */
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    -webkit-tap-highlight-color: transparent;
    /* IE10+/Edge bug, when tap on text in services in edge strange behavior happened*/
    -ms-user-select: none;

    overflow-x: hidden;
    scroll-behavior: smooth;
    background: #02231c;
    color: #4dd8ad;
}

/* !!!!!!!!!!!!!!!! commons !!!!!!!!!!!!!!!!! */

.adown {
    position: relative;
    animation: adown 0.5s 0.3s ease-in-out both;
    top: -50px;
    opacity: 0;
}

.aup {
    position: relative;
    animation: aup 0.5s 0.3s ease-in-out both;
    bottom: -50px;
    opacity: 0;
}

.aleft {
    position: relative;
    animation: aleft 0.5s 0.3s ease-in-out both;
    right: -50px;
    opacity: 0;
}

.aright {
    position: relative;
    animation: aright 0.5s 0.3s ease-in-out both;
    left: -50px;
    opacity: 0;
}

@keyframes aright {
    0% {
        opacity: 0;
        left: -50px;
    }
    100% {
        opacity: 1;
        left: 0;
    }
}

@keyframes aleft {
    0% {
        opacity: 0;
        right: -50px;
    }
    100% {
        opacity: 1;
        right: 0;
    }
}

@keyframes adown {
    0% {
        opacity: 0;
        top: -50px;
    }
    100% {
        opacity: 1;
        top: 0;
    }
}

@keyframes aup {
    0% {
        opacity: 0;
        bottom: -50px;
    }
    100% {
        opacity: 1;
        bottom: 0;
    }
}

h2 {
    color: #55d9c0;
    text-shadow: 4px 4px 3px #107050;
    font-size: 2rem;
    padding: 80px 0 40px;
}

.container {
    width: 90%;
    margin: auto;
    max-width: 1000px;
}

p {
    font-size: 0.9rem;
    line-height: 1.7rem;
    letter-spacing: 1px;
}

section {
    margin-bottom: 100px;
}

.btn {
    display: none;
    position: absolute;
    top: 70%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 150px;
    background: #4dd8ad;
    text-decoration: none;
    text-align: center;
    padding: 8px 0;
    font-size: 0.9rem;
    border-radius: 15px;
    color: #c7f6ec;
    transition: 0.2s;
}

.btn:hover {
    background: #c7f6ec;
    color: #4dd8ad;
}

/* !!!!!!!!!!!!!!!! commons !!!!!!!!!!!!!!!!! */

header .bar {
    background: transparent;
    width: 100%;
    height: 70px;
    position: absolute;
    top: 0px;
    z-index: 100;
}

header .bar .logo {
    position: relative;
    top: 10px;
    left: 20px;
    width: 50px;
    height: 50px;
    background: url("img/logo.png");
    background-size: 50px;
    float: left;
    transition: 0.6s;
    cursor: pointer;
}

header .bar .open-close-nav {
    position: relative;
    top: 10px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: url("img/open-menu.svg");
    background-size: 50px;
    float: right;
    transition: 0.6s;
    cursor: pointer;
    /* bug in safari strange rotation of svg, still strange for the first time */
    transform-origin: center center;
    transform-box: fill-box;
}

header .fixed {
    position: fixed;
    top: 0;
    background: rgba(77, 216, 173, 0.3);
    transition: top 0.3s;
}

nav {
    position: fixed;
    z-index: 1;
    background: #4dd8ad;
    width: 100%;
    height: 100vh;
    right: -110%;
    transition: 0.8s;
    box-shadow: -6px 0px 20px 1px rgba(16, 112, 80, 0.8);
}

nav .links {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

nav ul {
    list-style: none;
}

nav ul li {
    margin: 20px 0;
}

nav ul li a {
    position: relative;
    transition: 0.2s;
    text-decoration: none;
    color: #c7f6ec;
    text-transform: uppercase;
    text-align: center;
    font-size: 2rem;
    font-weight: 900;
    white-space: nowrap;
}

nav ul li a::before {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 4px;
    background: #107050;
    transition: 0.2s;
}

/* hover effect in in @media so it works as plant on mobile phones (safari), */
/* cuz it makes double tap on safari */

nav ul li a:hover {
    color: #107050;
}

/* dont know if needed */
canvas {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    z-index: -1;
}
/* dont know if needed */

#home {
    width: 100%;
    height: 100vh;
}

#home .home-wrapper {
    position: absolute;
    top: 60%;
    left: 40%;
    transform: translate(-50%, -50%);
}

#home .home-wrapper h1 {
    font-size: 1.4rem;
    color: #4dd8ad;
    /* text-decoration: underline; */
    text-shadow: 5px 3px 6px #107050;
    letter-spacing: 2px;
}

#home .go-down {
    display: none;
    position: absolute;
    top: 90%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: arrowupdown 2s ease-in-out infinite;
}

@keyframes arrowupdown {
    0% {
        top: 88%;
    }
    50% {
        top: 84%;
    }
    100% {
        top: 88%;
    }
}

#projects h4 {
    font-size: 1.6rem;
    color: #4dd8ad;
    margin-bottom: 20px;
    margin-left: 0px;
    position: relative;
    padding-left: 25px;
    white-space: nowrap;
}

#projects h4::before {
    content: "";
    position: absolute;
    top: 12px;
    left: 0;
    width: 15px;
    height: 10px;
    background: #c7f6ec;
    transform: rotateZ(20deg);
    border-radius: 2px;
    box-shadow: 2px -2px 10px #c7f6ec;
}

#projects h4::after {
    content: "";
    position: absolute;
    top: 12px;
    left: 6px;
    width: 10px;
    height: 6px;
    background: #107050;
    transform: rotateZ(-10deg);
    border-radius: 2px;
}

#projects .project {
    width: 95%;
    height: 200px;
    margin: auto;
    text-align: center;
    margin-bottom: 40px;
    background: #55d9c0;
    padding: 20px 20px 20px;
    border-radius: 10px;
    position: relative;
}

#projects .project:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #4dd8ac;
    opacity: 0.5;
    border-radius: 10px;
    transition: 0.3s;
}

#projects .project:hover:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(77, 216, 172, 0.2);
    border-radius: 10px;
}

#projects .klime-si {
    background: url("img/klime-si.png");
    background-position: top center;
    background-size: cover;
}
#projects .programmingtoinspire {
    background: url("img/programmingtoinspire.png");
    background-position: center center;
    background-size: cover;
}
#projects .airborne {
    background: url("img/airborne.png");
    background-position: center center;
    background-size: cover;
}

#projects .ride {
    background: url("img/ride.png");
    background-position: center center;
    background-size: cover;
}

#projects .avoid {
    background: url("img/avoid.png");
    background-position: center center;
    background-size: cover;
}

#projects .sacrifice {
    background: url("img/sacrifice.png");
    background-position: center center;
    background-size: cover;
}

#projects .shooter {
    background: url("img/shooter.png");
    background-position: top center;
    background-size: cover;
}

#projects .roboticarm {
    background: url("img/arm.png");
    background-position: center center;
    background-size: cover;
}

#projects .roboticarm2 {
    background: url("img/arm2.png");
    background-position: top center;
    background-size: cover;
}

#projects .roboticarm3 {
    background: url("img/arm3.png") no-repeat;
    background-position: center center;
    background-size: contain;
}

#projects .digit-recognizer {
    background: url("img/digitRecognizer.png") no-repeat;
    background-position: center center;
    background-size: contain;
}

#projects .project h3 {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.2rem;
    color: #4dd8ad;
    text-shadow: 2px 2px 20px #107050, -2px -2px 20px #107050;
    margin-bottom: 10px;
    transition: 0.3s;
    white-space: nowrap;
    /* opacity: 0.8; */
}

#projects .project .projects-h3 {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

#projects .project:hover h3 {
    font-size: 2rem;
}

#projects a {
    text-decoration: none;
}

#projects a .icon {
    width: 140px;
    margin: auto;
    text-align: center;
    padding: 10px;
    background: #55d9c0;
    box-shadow: 3px 3px 10px 0px #107050;
    border-radius: 15px;
    transition: 0.2s;
}

#projects a .icon h5 {
    font-size: 1.1rem;
    color: #c7f6ec;
    margin: 0px 0 5px;
    transition: 0.2s;
}

#projects a .icon div {
    font-size: 40px;
    color: #c7f6ec;
    transition: 0.2s;
}

#projects a .icon:hover {
    background: #c7f6ec;
    box-shadow: 3px 3px 20px 1px #107050;
}

#projects a .icon:hover h5 {
    color: #55d9c0;
}

#projects a .icon:hover div {
    color: #55d9c0;
}

#services ul {
    list-style: none;
}

#services ul li {
    font-size: 1.2rem;
    line-height: 1.8rem;
}

#services .service {
    background: #107050;
    color: #107050;
    margin-bottom: 20px;
    overflow: hidden;
    cursor: pointer;
    border-radius: 10px;
    transition: 0.3s;
    box-shadow: 0px 0px 8px 2px #107050;
}

#services .service:hover {
    box-shadow: 0px 0px 15px 3px #107050;
}

#services .service h3 {
    /* border-radius: 10px; */
    color: #55d9c0;
    text-align: center;
    font-size: 1rem;
    line-height: 80px;
    transition: 0.3s;
}

#services .service p {
    background: #55d9c0;
    padding: 10px;
    font-size: 0.9rem;
    line-height: 1.3rem;
    text-align: center;
}

#contact {
    margin-bottom: 0px;
}

#contact p {
    display: inline;
    padding-right: 5px;
}

#contact form {
    background: #c7f6ec;
    padding: 20px 0;
    width: 100%;
    box-shadow: 0px 0px 20px 20px rgba(199, 246, 236, 0.95),
        0px 0px 60px 60px rgba(199, 246, 236, 0.85), 0px 0px 100px 100px rgba(199, 246, 236, 0.7);
    margin-top: 200px;
    padding-bottom: 150px;
    /* margin-bottom: 200px; */
}

#contact .input-wrap {
    position: relative;
    margin-bottom: 40px;

    /* makes divs unselectable */
    /* user-select: none;
    -moz-user-select: none;
    -khtml-user-select: none;
    -webkit-user-select: none;
    -o-user-select: none; */
}

#contact .input-wrap input {
    height: 60px;
    width: 100%;
}

#contact .input-wrap textarea {
    resize: none;
    height: 180px;
    width: 100%;
    /* hide scroll bar ie and firefox*/
    overflow: -moz-scrollbars-none;
    -ms-overflow-style: none;
}

/* hide scroll bar chrome and safari */
#contact .input-wrap textarea::-webkit-scrollbar {
    width: 0 !important;
}

#contact .input-wrap span {
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 0.95rem;
    color: #107050;
    transition: 0.2s;
}

#contact .input-wrap input:focus ~ span,
#contact .input-wrap input:not(:focus):valid ~ span,
#contact .input-wrap textarea:focus ~ span,
#contact .input-wrap textarea:not(:focus):valid ~ span {
    top: -21px;
    left: 6px;
    /* color: #02231c; */
    /* color: #55d9c0; */
    /* color: #c7f6ec; */
    /* color: #107050; */
    color: #107050;
}

#contact .input-wrap input,
#contact .input-wrap textarea {
    border: none;
    border-radius: 10px;
    padding: 20px;
    background: #4dd8ad;
    border: 2px solid #4dd8ad;
    box-shadow: 1px 3px 20px 1px rgba(16, 112, 80, 0.5);
}

#contact .input-wrap input:focus,
#contact .input-wrap textarea:focus {
    outline: none;
    border: 2px solid #107050;
}

#contact input[type="submit"] {
    background: #107050;
    color: #c7f6ec;
    font-weight: 900;
    /* width:85%; */
    display: block;
    margin: auto;
    margin-bottom: -80px;
    border: none;
    transition: 0.2s;
}

#contact input[type="submit"]:hover {
    background: #4dd8ad;
    color: #107050;
    border: none;
}

#contact form .return {
    display: block;
    margin: auto;
    text-align: center;
    margin-bottom: 40px;
    font-size: 1.9rem;
}

.capcha {
    text-align: center;
    margin-bottom: 40px;
}

.g-recaptcha {
    display: inline-block;
}

@media (pointer: fine) {
    nav ul li a:hover::before {
        width: 100%;
    }
}

@media (min-width: 400px) {
    .btn {
        font-size: 1.1rem;
        padding: 10px 0;
        width: 160px;
    }

    #home .home-wrapper {
        left: 35%;
    }

    #home .home-wrapper h1 {
        font-size: 1.8rem;
    }

    h2 {
        font-size: 2.4rem;
    }

    #projects h4 {
        font-size: 1.8rem;
        margin-bottom: 20px;
        margin-left: 20px;
        padding-left: 25px;
    }

    #projects h4::before {
        top: 13px;
        left: 0;
        width: 15px;
        height: 10px;
    }

    #projects h4::after {
        top: 13px;
        left: 6px;
        width: 10px;
        height: 6px;
    }

    #projects .project h3 {
        font-size: 1.5rem;
        margin-bottom: 15px;
    }

    #services .service h3 {
        font-size: 1.6rem;
        text-align: center;
    }

    #services .service p {
        padding: 10px;
        font-size: 1rem;
        line-height: 1.3rem;
        text-align: center;
    }

    p {
        font-size: 1.1rem;
    }
}

@media (min-width: 500px) {
    .btn {
        font-size: 1.1rem;
        padding: 13px 0;
        width: 180px;
    }

    #home .home-wrapper h1 {
        font-size: 2.2rem;
    }

    h2 {
        font-size: 2.5rem;
    }

    #projects h4 {
        font-size: 1.9rem;
        margin-bottom: 20px;
        padding-left: 25px;
    }

    #projects h4::before {
        top: 15px;
        left: 0;
        width: 15px;
        height: 10px;
    }

    #projects h4::after {
        top: 15px;
        left: 6px;
        width: 10px;
        height: 6px;
    }

    #projects .project h3 {
        font-size: 1.5rem;
        margin-bottom: 15px;
    }

    #projects .project {
        width: 80%;
    }

    #services .service h3 {
        font-size: 2rem;
        text-align: center;
    }

    #services .service p {
        padding: 10px;
        font-size: 1rem;
        line-height: 1.4rem;
        text-align: center;
    }

    p {
        font-size: 1.1rem;
    }
}

@media (min-width: 600px) {
    .btn {
        font-size: 1.2rem;
        padding: 15px 0;
        width: 180px;
    }

    #home .home-wrapper h1 {
        font-size: 2.7rem;
    }

    h2 {
        font-size: 2.6rem;
    }

    #projects h4 {
        font-size: 2.4rem;
        margin-bottom: 25px;
        padding-left: 25px;
    }

    #projects h4::before {
        top: 20px;
        left: 0;
        width: 15px;
        height: 10px;
    }

    #projects h4::after {
        top: 20px;
        left: 6px;
        width: 10px;
        height: 6px;
    }

    #projects .project h3 {
        font-size: 1.7rem;
        margin-bottom: 15px;
    }

    #projects .project {
        width: 70%;
    }

    #services .service h3 {
        font-size: 2.2rem;
        text-align: left;
        padding-left: 30px;
    }

    #services .service p {
        padding: 15px;
        font-size: 1rem;
        line-height: 1.5rem;
        text-align: justify;
    }

    p {
        font-size: 1.1rem;
    }
}

@media (min-width: 700px) {
    #home .home-wrapper h1 {
        font-size: 3rem;
    }

    h2 {
        font-size: 2.8rem;
    }

    #projects h4 {
        font-size: 2.4rem;
        margin-bottom: 25px;
        padding-left: 25px;
    }

    #projects h4::before {
        top: 20px;
        left: 0;
        width: 15px;
        height: 10px;
    }

    #projects h4::after {
        top: 20px;
        left: 6px;
        width: 10px;
        height: 6px;
    }

    #projects .project h3 {
        font-size: 1.7rem;
        margin-bottom: 15px;
    }

    #projects .project {
        width: 60%;
        height: 300px;
    }

    #services .service h3 {
        font-size: 2.4rem;
        text-align: left;
        padding-left: 30px;
    }

    #services .service p {
        padding: 15px;
        font-size: 1rem;
        line-height: 1.5rem;
        text-align: justify;
    }

    p {
        font-size: 1.2rem;
    }
}

@media (min-width: 1000px) {
    .btn {
        top: 52%;
        left: 70%;
        width: 220px;
    }

    nav {
        width: 300px;
    }

    nav .links {
        text-align: left;
    }

    #projects h2 {
        text-align: center;
        margin-bottom: 30px;
    }

    #projects h4 {
        font-size: 2rem;
        margin-bottom: 50px;
        text-align: center;
        padding-left: 0;
        margin-left: 0;
    }

    #projects h4:before {
        display: none;
    }
    #projects h4::after {
        display: none;
    }

    #projects .container {
        width: 100%;
        max-width: none;
    }

    #projects .project-type {
        width: 33.3%;
        float: left;
        display: inline-block;
    }

    #projects .project {
        width: 90%;
        height: 230px;
    }

    #contact .left {
        width: 50%;
        padding-right: 20px;
        float: left;
    }

    #contact .right {
        width: 50%;
        padding-left: 20px;
        float: right;
    }

    #contact .right span {
        left: 40px;
    }

    #contact .right input:focus ~ span,
    #contact .right input:not(:focus):valid ~ span {
        left: 26px;
    }

    .clr {
        clear: both;
    }

    #contact form .container {
        position: relative;
        height: 500px;
    }
}

@media (min-width: 1200px) {
    #projects h2 {
        margin-bottom: 40px;
    }

    #projects .container {
        width: 90%;
        max-width: none;
    }

    #projects .project {
        height: 220px;
        /* width: 70%; */
    }
}

@media (min-width: 1500px) {
    #projects .container {
        width: 70%;
        max-width: none;
    }

    #projects .project {
        height: 240px;
    }
}

@media (min-height: 300px) {
    #home .home-wrapper {
        top: 50%;
    }

    #home .go-down {
        display: block;
    }
}

@media (min-height: 550px) {
    .btn {
        display: block;
    }
}
