:root{
    --color: #212529;
    --color-secondary: #444;
    --bg: #fff;
    --bg-secondary: #bbb;
    --bg-hover: #eee;
    --bg-active: #ddd;
    --bg-gradient: linear-gradient(rgba(0,0,0,0), rgba(0,0,0,0), rgba(255,255,255,0.15), rgba(255,255,255,1));
    --bg-scrollbar: #cecece;
    --titelbild: url("img/Sandbox Rendering.png")
}
@media (prefers-color-scheme: dark){
    :root:not(.light){
        --color: #d6dcde;
        --color-secondary: #bbb;
        --bg: #1b1b1b;
        --bg-secondary: #4e4e4e;
        --bg-hover: #222;
        --bg-active: #333;
        --bg-gradient: linear-gradient(rgba(0,0,0,0), rgba(0,0,0,0), rgba(27,27,27,0.5), rgb(27, 27, 27, 1));
        --bg-scrollbar: #465561;
    }
}
:root.dark{
    --color: #d6dcde;
    --color-secondary: #bbb;
    --bg: #1b1b1b;
    --bg-secondary: #4e4e4e;
    --bg-hover: #222;
    --bg-active: #333;
    --bg-gradient: linear-gradient(rgba(0,0,0,0), rgba(0,0,0,0), rgba(27,27,27,0.5), rgb(27, 27, 27, 1));
    --bg-scrollbar: #465561;
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-scrollbar);
    border-radius: 100vw;
    margin-block: .5em
}
::-webkit-scrollbar-thumb {
    background:rgb(0, 122, 179);
    border-radius: 100vw;
    border: 3.5px solid var(--bg-scrollbar);

}

::-webkit-scrollbar-thumb:hover {
    background:rgba(0, 81, 118, 0.63);
    border: 2px solid var(--bg-scrollbar);
}

@supports (scrollbar-color: red blue) {
    *{
        scrollbar-color: rgb(0, 122, 179) var(--bg-scrollbar);
        scrollbar-width: auto;
    }
}

body{
    margin: 0;
    padding: 0;
    border: 0;
    font-family: Arial, Helvetica, sans-serif;
    min-height: 100vh;
    display: grid;
    color: var(--color);
    font-size: medium;
    background-color: var(--bg);
}

#header{
    display: flex;
    z-index: 999999999;
    position: fixed;
    width: 100%;
    top: 0;
    justify-content: space-between;
    align-items: stretch;
    transition: box-shadow 0.25s;
    background-color: var(--bg);
}
#header>div{
    display: flex;
    align-items: stretch;
}
#header>div>*{
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 10px 20px;
    text-decoration: none;
    color: var(--color);
    background-color: var(--bg);
    transition: background-color 0.25s;
}
#header>div>*:hover{
    background-color: var(--bg-hover);
    transition: background-color 0.25s;
}
#header>div>*:active{
    background-color: var(--bg-active);
    transition: background-color 0.25s;
}
#header>div>a>*:last-child{
    padding-left: 10px;
}
#header>div:first-child>*>img:first-child{
    height: 3em;
    padding-right: 10px;
    transition: height 0.25s;
}
#header>div:first-child>a>div:last-child>div:first-child{
    opacity: 1;
    transition: height,opacity 0.25s;
}

#header.shrink{
    box-shadow: 0px 0px 5px 0px black;
    transition: box-shadow 0.25s;
}
#header.shrink>div:first-child>a>img:first-child{
    height: 2em;
    transition: height 0.25s;
}
#header.shrink>div:first-child>a>div:last-child>div:first-child{
    opacity: 0;
    height: 0;
    transition: height,opacity 0.25s;
}

.titelbild{
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0)), var(--bg-gradient), var(--titelbild);
    height: 50vh;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.titelbild>div{
    padding: 0 20vw;
    color: white;
    text-shadow: 2px 2px 5px black;
}
#home .titelbild{
    height: 100vh;
}

.text{
    margin: 0 15vw;
}
.text .abschnitt{
    margin-bottom: 50px;
    overflow-wrap: break-word;
}

.break-all{
    word-break: break-all;
}

h1[id]>a:last-child,h2[id]>a:last-child,h3[id]>a:last-child,h4[id]>a:last-child,h5[id]>a:last-child,h6[id]>a:last-child{
    margin-left: 10px;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    opacity: 0;
    transition: opacity 0.25s;
}
h1[id]:hover>a:last-child,h2[id]:hover>a:last-child,h3[id]:hover>a:last-child,h4[id]:hover>a:last-child,h5[id]:hover>a:last-child,h6[id]:hover>a:last-child{
    opacity: 0.5;
    transition: opacity 0.25s;
}
h1[id]>a:last-child:hover,h2[id]>a:last-child:hover,h3[id]>a:last-child:hover,h4[id]>a:last-child:hover,h5[id]>a:last-child:hover,h6[id]>a:last-child:hover{
    opacity: 1;
    transition: opacity 0.25s;
}

#footer{
    display: flex;
    align-self: end;
    justify-content: center;
    background-color: var(--bg-secondary);
    padding: 30px 0;
}
#footer a{
    text-decoration: none;
    color: var(--color-secondary);
    padding: 0 20px;
}
#footer a:not(:first-child){
    border-left: 2px solid var(--color-secondary);
}

@media screen and (max-width: 500px){
    .text{
        margin: 0 10vw;
    }
    .überschuss{
        display: none;
    }
}