:root {
    --background-article: #eee;
    --background-body: #ccc;
    --color-body: #333;
    --color-shadow: #888;
    --color-border: #00b;
    --color-hover: #b00;
    --color-h3: #070;
    --color-link: #545;
}

::before, ::after {
    box-sizing: border-box;
}

* {
    margin: 0;
    padding: 0;
}

body, html {
    box-sizing: border-box;
    font-family: Helvetica, sans-serif;
    font-size: 18px;
    background-color: var(--background-body);
    color: var(--color-body);
}

/*Kopf und Fuß*/

header, footer {
    background-color: var(--background-article);
    padding: .5rem;
    text-align: center;
}

header {
    position: sticky;
    z-index: 40;
    top: 0;
}

footer{
    display: flex;
    justify-content: space-between;
}

a {
    color: var(--color-body);
}

/* das Menü */

nav a {
    padding: 0 1.5em 0;
}

nav a:visited, nav a:link, nav a:active, nav a:focus {
    text-decoration: none;
    color: var(--color-link);
}

nav a:hover {
    color:var(--color-hover);
}

nav .current {
    font-weight: 700;
    color:var(--color-hover) !important;
} 

/* Inhalt */
main {
    padding: 0 5rem;
}

h1 {
    text-align: center;
    color: var(--color-hover);
    font-size: 2rem;
    margin-bottom: 2rem;
}

h2 {
    color: var(--color-border);
    font-size: 1.75rem;
    margin-block: 2rem;
    text-align: center;
}

#tools > h2, #web > h2 {
    background-color: var(--background-article);
    border-radius: 5px;
    padding: 1rem;
    margin-block: 5rem;
}

h3 {
    color: var(--color-h3);
    font-size: 1.5rem;
    margin-bottom: 0.8rem;
}

h4 {
    color: var(--color-link);
    font-size: 1.2rem;
    margin-top: 1.2rem;
    margin-bottom: .5rem;
}

section {
    margin: 2rem auto;
}

section:first {
    margin-top: 0;
}

#welcome {
    text-align: center;
    min-height: 80vh;
}

#hero {
    display: flex;
    justify-content: center;
    margin-block: 2rem;
}

img, picture {
    max-width: 100%;
    height: auto;
    margin-inline: auto;
}

article img, article picture {
    border-radius: .5rem;
    box-shadow: 0 .5rem 1.5rem -.5rem var(--color-shadow);
}

/* Artikel*/
article {
    max-width: 100%;
    border: 1px solid var(--color-border);
    border-radius: 1rem;
    background-color: var(--background-article);
    padding: 1rem;
    margin-block: 1rem;
    clear: both;
}

article a {
    display: inline-block;
}

article .cell {
    width: 100%;
    padding-left: 1rem;
}

.table {
    display: flex;
    flex-wrap: wrap;
}

.table .cell {
    display: table-cell;
}

.code {
    font-family: monospace;
    font-size: 1.2rem;
    border: 1px solid gray;
    background-color: black;
    color: white;
    margin: 1rem 5rem 1rem;
}

#address {
    text-align: center;
}

/* Animation */
@keyframes wechseln {
    0% {
        opacity: 1;
    }

    20% {
        opacity: .5;
    }

    50% {
        opacity: 0;
    }

    80% {
        opacity: .5;
    }

    100% {
        opacity: 1;
    }
}

#buehne figure:nth-of-type(2) {
    animation: wechseln 5s linear 0s infinite;
}

#buehne figure:nth-of-type(1) {
    animation: wechseln 5s linear 2.5s infinite;
}

#buehne {
    position: relative;
    min-height: 80px;
    margin-inline: auto;
    overflow: hidden;
}

#buehne figure {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

#buehne figcaption {
    font-size: 3em;
    margin: .2em;
    color: white;
    text-shadow: 0 0 5px black;
    position: absolute;
    left: 1em;
    bottom: 0.5em;
    z-index: 2;
}


/*Media Queries */
@media (prefers-color-scheme: dark) {
    :root {
        --background-article: #222;
        --background-body: #151515;
        --color-shadow: #555;
        --color-body: #aaa;
        --color-border: hotpink;
        --color-hover: orangered;
        --color-h2: greenyellow;
        --color-h3: greenyellow;
        --color-link: #ccc;
    }

    #hero-image {
        content: url("../pics/hero-dark.webp");
    }
}

@media (max-width: 1023px) {
    body, html {
        font-size: 14px;
    }

    main {
        padding: 0 3rem;
    }
}

@media (prefers-color-scheme: dark) and (max-width: 960px) {
    #hero-image {
        content: url("../pics/hero-dark-small.webp");
    }
}

@media (max-width: 640px) {
    body, html {
        font-size: 12px;
    }

    main {
        padding: 0 1.5rem;
    }
}