/* Allgemeine Stile */
:root {
    --primary-color: #9d50bb;
    --secondary-color: #6e48aa;
    --background-color: #1e1e1e;
    --text-color: #ffffff;
    --hover-effect: translateY(-10px);
    --box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
    --font-size-large: 3rem;
    --font-size-medium: 2rem;
    --font-size-small: 1.1rem;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Header */
header {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    padding: 60px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.1);
    z-index: 1;
}

header h1 {
    font-size: var(--font-size-large);
    margin: 0;
    animation: fadeIn 2s ease-in-out;
    position: relative;
    z-index: 2;
}

header p {
    font-size: var(--font-size-medium);
    margin: 10px 0 0;
    animation: fadeIn 3s ease-in-out;
    position: relative;
    z-index: 2;
}

/* Sektionen */
section {
    padding: 40px 20px;
    max-width: 800px;
    margin: 0 auto;
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 1s ease, transform 1s ease;
}

section.visible {
    opacity: 1;
    transform: translateY(0);
}

h2 {
    color: var(--primary-color);
    font-size: var(--font-size-medium);
    margin-bottom: 20px;
    text-transform: uppercase;
    text-shadow: 0 0 10px var(--primary-color), 0 0 20px var(--primary-color);
}

p {
    font-size: var(--font-size-small);
}

/* Typing-Effekt */
.typing-effect {
    display: inline-block;
    overflow: hidden;
    white-space: nowrap;
    border-right: 2px solid var(--primary-color);
    animation: typing 3s steps(40, end), blink-caret 0.75s step-end infinite;
    max-width: 100%;
    word-wrap: break-word;
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: var(--primary-color); }
}

/* F higkeiten und Hobbys */
.skills, .hobbies {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
}

.skill, .hobby {
    background: #333;
    padding: 20px;
    border-radius: 8px;
    flex: 1 1 calc(33% - 40px);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
    position: relative;
    overflow: hidden;
}

.skill::before, .hobby::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.skill:hover, .hobby:hover {
    transform: var(--hover-effect);
    box-shadow: var(--box-shadow);
    background: #444;
}

.skill:hover::before, .hobby:hover::before {
    left: 100%;
}

/* Partikel-Effekt */
#particles-js {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

/* Footer */
footer {
    background: #333;
    padding: 20px;
    text-align: center;
    margin-top: 40px;
    font-size: 0.9rem;
    color: #ccc;
}

footer a {
    color: var(--primary-color);
    text-decoration: none;
    margin: 0 10px;
}

footer a:hover {
    text-decoration: underline;
}

.social-icons {
    margin-top: 10px;
}

.social-icons a {
    color: #ccc;
    margin: 0 10px;
    font-size: 1.2rem;
    transition: color 0.3s ease;
}

.social-icons a:hover {
    color: var(--primary-color);
}

/* Kontaktformular */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    background: #333;
    border-radius: 8px;
    box-sizing: border-box;
}

.contact-form input, .contact-form textarea {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    border: none;
    border-radius: 4px;
    background: #444;
    color: #fff;
    box-sizing: border-box;
    resize: none; /* Verhindert die Gr  en nderung des Textarea */
}

.contact-form button {
    background: var(--primary-color);
    color: #fff;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.contact-form button:hover {
    background: var(--secondary-color);
}

/* Keyframes */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Media Queries f r Responsive Design */
@media (max-width: 768px) {
    :root {
        --font-size-large: 2rem;
        --font-size-medium: 1.5rem;
        --font-size-small: 1rem;
    }

    header {
        padding: 40px 20px;
    }

    .skill, .hobby {
        flex: 1 1 calc(50% - 40px);
    }
}

@media (max-width: 480px) {
    :root {
        --font-size-large: 1.8rem;
        --font-size-medium: 1.3rem;
        --font-size-small: 0.9rem;
    }

    header {
        padding: 30px 10px;
    }

    .skill, .hobby {
        flex: 1 1 100%;
    }

    section {
        padding: 20px 10px;
    }

    h2 {
        font-size: 1.5rem;
    }

    .typing-effect {
        font-size: 1rem;
        max-width: 90%;
        white-space: normal;
        border-right: none;
        animation: none;
    }
}

.logo-icon {
    width: 50px;
    height: 50px;
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 1000;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
    opacity: 0.8;
}

.logo-icon:hover {
    transform: scale(1.1) rotate(5deg);
    opacity: 1;
}

.profilbild {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    margin: 0 auto 20px;
}

@media (min-width: 768px) {
    .profilbild {
        float: left;
        margin-right: 20px;
        margin-bottom: 0;
    }
}

.cloud-login-button {
    position: absolute;
    top: 10px;
    right: 15px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 3px 8px;
    font-size: 0.7rem;
    border-radius: 5px;
    text-decoration: none;
    transition: background 0.3s ease, opacity 0.3s ease;
    z-index: 3;
}

.cloud-login-button:hover {
    background: rgba(255, 255, 255, 0.4);
}