/* General */

* {
    /* No Space between Sections */
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* Nav Scroll Animation */
    scroll-behavior: smooth;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.8);
    padding: 10px 0;
    text-align: center;
    /* z-index controls the stacking order of positioned elements (higher value = in front) */
    z-index: 1000;
}

nav a {
    color: white;
    text-decoration: none;
    margin: 0 20px;
    font-size: 18px;
    padding: 10px;
    /* Because of Hover effect */
    transition: color 0.3s;
}

nav a:hover {
    color: #D32F2F;
}

@media (max-width: 950px) {
    nav {
        display: none;
    }
}

/* Section one */

@keyframes wave {
    0% {
        transform: rotate(0deg);
    }

    20% {
        transform: rotate(20deg);
    }

    40% {
        transform: rotate(-10deg);
    }

    60% {
        transform: rotate(15deg);
    }

    80% {
        transform: rotate(-5deg);
    }

    100% {
        transform: rotate(0deg);
    }
}

.waving-hand {
    width: 80px;
    animation: popIn 0.5s ease-out forwards, wave 1.2s ease-in-out 0.5s 1;
    transform-origin: center bottom;
}

.section-one img {
    width: 80px;
    margin-bottom: 10px;
}

.headline {
    font-size: 40px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1s ease-in-out, transform 1s ease-in-out;
}

@media (max-width: 950px) {
    .headline {
        font-size: 40px;
        margin: 0 20px 0 20px;
    }

    .section-one img {
        width: 80px;
        margin-bottom: 10px;
    }

    .br-hide {
        display: none;
    }
}

/* Section Framework */

section {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.section-one {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-color: #f4f4f4;
}

.section-two {
    background-color: #B2E0FF;
}

.section-three {
    background-color: #A7F3D0;
}

.section-four {
    background-color: #FFEFA1;
}

.section-framework {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px 10%;
    gap: 40px;
    width: 100%;
}

.section-headline {
    font-size: 40px;
}

.section-left {
    flex: 1 1 25%;
}

.section-right {
    flex: 1 1 70%;
    display: flex;
    justify-content: center;
    align-items: center;
}

@media (max-width: 950px) {
    .section-framework {
        flex-wrap: wrap;
    }

    .section-headline {
        text-align: center;
    }
}

/* Section Two */

.aboutMe-text {
    font-size: 20px;
}

.aboutMe-textBox {
    background-color: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    max-width: 600px;
    opacity: 0;
    transform: scale(0);
}

@media (max-width: 950px) {
    .aboutMe {
        text-align: center;
    }
}

/* Section Three  */

.project-boxes-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    width: 100%;
}

.project-boxes {
    width: 200px;
    height: 200px;
    /* In order to control 3D-Effect */
    perspective: 1200px;
    /* Objekt Transparent at the beginning, because of animation*/
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0s ease-out, transform 0s ease-out;
}

@media (max-width: 950px) {
    .project-boxes {
        width: 250px;
        height: 250px;
        box-sizing: border-box;
    }

    .project-boxes-container {
        justify-content: center;
        gap: 20px;
        width: 100%;
    }

    .section-two {
        height: auto;
        overflow: visible;
    }

    .section-three {
        height: auto;
        overflow: visible;
    }

    .section-four {
        height: auto;
        overflow: visible;
    }
}

/* Project Boxes Inner */

.project-boxes-inner-front img {
    width: 100px;
    height: 100px;
    /* Scales Image */
    object-fit: contain;
    border-radius: 10px;
}

.project-boxes-inner {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.5s cubic-bezier(0.4, 0.2, 0.3, 1.2);
    will-change: transform;
}

.project-boxes:hover .project-boxes-inner {
    transform: rotateY(180deg) scale(1.50);
}

/* When hovering over a box, it brings it to the foreground */
.project-boxes:hover {
    z-index: 999;
    position: relative;
}

.project-boxes-inner-front,
.project-boxes-inner-back {
    width: 100%;
    height: 100%;
    position: absolute;
    backface-visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    box-shadow: 0px 10px 25px rgba(0, 0, 0, 0.2);
    transition: box-shadow 0.3s ease-in-out;
}

.project-boxes-inner-front {
    background: white;
    flex-direction: column;
    padding: 15px;
    transform: rotateY(0deg);
    font-size: 22px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: 10px;
}

.project-boxes-inner-back {
    background: #D32F2F;
    color: white;
    transform: rotateY(180deg);
    padding: 20px;
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: center;
    font-size: 12px;
}

@keyframes popIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    70% {
        transform: scale(1.1);
        opacity: 1;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.popIn {
    animation: popIn 0.5s cubic-bezier(0.4, 0.2, 0.3, 1.2) forwards;
}

.project-boxes-inner-back-img {
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 30px;
    height: 30px;
}

.project-boxes-inner-back-img img {
    width: 100%;
    height: 100%;
}

.project-boxes-inner-back p {
    text-align: center;
    margin: 5px;
}

@media (max-width: 950px) {
    .project-boxes:hover .project-boxes-inner {
        transform: rotateY(180deg) scale(1.00);
    }

    .project-boxes-inner-back {
        font-size: 16px;
    }
}

/* Section Four */

.contact-icon {
    width: 100px;
    height: 100px;
    opacity: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    margin-bottom: 20px;
}

.contact-icon img {
    width: 50px;
}

.contact-items-container {
    display: flex;
    gap: 60px;
    align-items: center;
    justify-content: center;
    width: 100%;
}

@media (max-width: 950px) {
    .contact-items-container {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 40px;
    }

    .contact-icons-container {
        display: flex;
        flex-direction: row;
        justify-content: center;
        gap: 20px;
    }

    .contact-icon {
        margin: 0;
    }
}

.contact-form-container {
    flex: 2;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
}

.contact-form {
    flex: 1;
    background: #ffffff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 500px;
    width: 100%;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 15px;
    font-size: 1.2em;
    border: 2px solid #ccc;
    border-radius: 8px;
    font-family: inherit;
}

.contact-form textarea {
    height: 150px;
    resize: none;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: #D32F2F;
    box-shadow: 0 0 8px rgba(211, 47, 47, 0.5);
    outline: none;
}

.contact-form button {
    background: #D32F2F;
    color: white;
    font-size: 1.2em;
    padding: 15px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s ease-in-out;
}

.contact-form button:hover {
    background: #b71c1c;
}

@media (max-width: 950px) {
    .contact-form-container {
        width: 100%;
    }
}

/* Specific for Animation Contact Section */

.contact-form input,
.contact-form textarea,
.contact-form button {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease-out, transform 0.3s ease-out;
}

.contact-visible {
    animation: popIn 0.3s ease-out forwards;
}

.contact-icons-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-icon:hover {
    transform: scale(1.1) !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.input-visible {
    animation: fadeIn 0.3s ease-out forwards;
}

.contact-icons-container-visible {
    opacity: 1;
    transform: scale(1);
}

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}