:root {
    font-size: 20px;
    font-family: 'Open Sans', sans-serif;
    --text-primary: #ffffff;
    --text-secondary: #ececec;
    --bg-primary: #23232e;
    --bg-secondary: #141418;
    --transition-speed: 600ms;
    --detail-color: #6c7517;
    --navlink-height: 5rem;
    --pop-color: #898989;
}


*,
*::before,
*::after {
    box-sizing: border-box;
    /* Alle Elemente haben box-sizing border-box */
}

.portrait {
    border-radius: 450px;
    width: 8rem;
    height: 8rem;
    filter: grayscale(100%);
    transition: filter var(--transition-speed) ease, transform var(--transition-speed) ease;
    float: right;
    margin-right: 1em;
}

body {
    color: rgb(33, 33, 33);
    background-color: rgb(247, 243, 237);
    margin: 0;
    padding: 0;
}

body::-webkit-scrollbar {
    width: .75rem;
}

body::-webkit-scrollbar-track {
    background: #2e2e31;
}

body::-webkit-scrollbar-thumb {
    background: #696464;
    border-radius: .5rem;
}

main {
    margin-left: 5rem;
    padding: 1rem;
}

html,
body {
    height: 100%;
}

h1,
h2,
h3,
h4 {
    color: #454545;
    font-weight: bold;
}

hr {
    display: block;
    border: 0;
    border-top: .2rem solid #454545;
    margin: 1em 0;
    padding: 0;
    border-radius: 10px;
}

.navbar {
    position: fixed;
    background-color: var(--bg-primary);
    transition: width var(--transition-speed) ease;
    z-index: 20;
}

.gallery-head {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
}

.gallery-container {
    width: min(1500px, 100%);
    margin: 0 auto;
    columns: 3 400px;
    column-gap: 1em;
}

.container {
    position: relative;
}

.image {
    width: 100%;
    height: auto;
    display: flex;
    width: 100%;
    margin-bottom: 1em;
    border-radius: 1em;
    border: .1em solid #141418;
    background: #2e2e31;
    box-shadow: 5px -5px 5px 5px #565656;
}

.overlay {
    position: absolute;
    top: 0;
    border-radius: 1em;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100%;
    width: 100%;
    opacity: 0;
    transition: 1s ease;
    background-color: #2d2d2dec;
}

.text {
    color: var(--text-secondary);
    font-size: auto;
    position: relative;
    padding-left: 1em;
    text-align: left;
}

.navbar-nav {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
}


.nav-item {
    width: 100%;
}

.nav-item:last-child {
    margin-top: auto;
}

.nav-link {
    display: flex;
    align-items: center;
    height: 5rem;
    color: var(--text-primary);
    text-decoration: none;
    filter: grayscale(100%) opacity(0.7);
    transition: var(--transition-speed);
}

.nav-link:hover {
    filter: grayscale(0%) opacity(1);
    background: var(--bg-secondary);
}

.navbar .link-text {
    opacity: 0;
    margin-left: 1rem;
    font-size: 24px;
    font-weight: bold;
}

.soft-text {
    margin-left: 3rem;
    margin-right: 3rem;
}

.soft-name {
    font-family: 'Inconsolata', sans-serif;
    margin-left: 3rem;
    margin-right: 3rem;
}

.soft-border {
    display: block;
    border: 1rem;
    border-top: .1rem solid #868686;
    margin: 5rem 0;
    margin-right: 3rem;
    margin-left: 3rem;
}

.pub-border {
    display: block;
    border: 1rem;
    border-top: .1rem solid #868686;
    margin: 2rem 0;
    margin-right: 3rem;
    margin-left: 3rem;
}

.soft-image-right {
    border-radius: 20px;
    width: 35vw;
    height: auto;
    display: flex;
    float: right;
    margin: 0;
    padding: 0.5rem;
    margin-right: 3rem
}

.soft-image-left {
    border-radius: 20px;
    width: 35vw;
    height: auto;
    display: flex;
    float: left;
    justify-content: left;
    margin: 0;
    padding: 0.5rem;
    margin-left: 3rem
}

.hyperlink {
    text-decoration: none;
    color: #3636cc;
}

main .headcontainer,
main .contcontainer {
    max-width: fit-content;
    margin: 0 auto;
    padding: 0.5rem;
}

.banner img {
    width: 100%;
    height: 16rem;
    transition: height var(--transition-speed) ease;
    object-fit: cover;
}

.logo-text {
    display: inline;
    position: absolute;
    left: -999px;
    transition: var(--transition-speed);
}

.impressum {
    flex-direction: column;
    margin: 0;
    background: var(--bg-secondary);
    height: 5rem
}

.imp-icons {
    display: flex;
    justify-content: center;
}

.impressum a {
    color: #555;
    font-size: 26px;
    margin-top: 1rem;
    text-decoration: none;
    transition: color 0.3s;
}

.impressum a:hover {
    color: var(--detail-color);
}

.imp-item {
    margin: 0 2rem;
}


.footer {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    position: fixed;
    background: var(--bg-secondary);
    width: 100%;
    /* Ändere von calc(100% - .75rem) zu 100% */
    bottom: 0;
    left: 0;
}

.footer a {
    display: flex;
    /* Verwende flex, um sicherzustellen, dass Links nebeneinander angeordnet sind */
    align-items: center;
    /* Zentriere die Icons */
    justify-content: center;
    /* Zentriere den Text */
    padding: 10px;
    text-decoration: none;
}

.copy {
    color: #696464;
    text-align: center;
    font-size: 14px;
}

.hamburger-menu {
    display: none;
    font-size: 30px;
    cursor: pointer;
    position: fixed;
    top: 0;
    left: 0;
    width: calc(100% - .75rem);
    padding: 10px;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    z-index: 1000;
    text-align: right;
    padding-right: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.hamburger-menu:hover {
    color: var(--detail-color);
}

.object {
    font-weight: bold;
    font-size: 28px;
    color: var(--detail-color);
}

.publication {
    padding-left: 1rem;
    padding-right: 1rem;
}

@media only screen and (max-width: 600px) {

    #sec-aboutme,
    #sec-cv,
    #sec-pubs,
    #sec-soft {
        padding-top: 5rem;
        margin-top: -5rem;
    }

    .popup-image span {
        display: none;
    }

    .soft-image-left {
        width: 100vw;
        margin: 0;
    }

    .soft-image-right {
        width: 100vw;
        margin: 0;
    }

    .container {
        column-gap: .5em;
        padding: .5em;
    }

    .image {
        margin-bottom: .5em;
    }

    .gallery-head {
        margin-top: 5rem;
    }

    .impressum a {
        color: #555;
        font-size: 24px;
        text-decoration: none;
        transition: color 0.3s;
        padding: 0;
    }

    .footer {
        width: 100%;
        bottom: 0;
    }

    .impressum {
        display: flex;
        align-items: center;
        justify-content: center;
        height: 5rem;
        padding: .25rem 0;
        font-size: 12px;
        width: 100%;
    }

    .navbar {
        bottom: 0;
        width: 100%;
        height: 5rem;
    }

    .logo,
    .link-text {
        display: none;
    }

    .navbar-nav {
        flex-direction: row;
        width: 100%;
    }


    .nav-link {
        justify-content: center;
    }

    main {
        margin: 0;
        padding: 0;
    }

    body {
        overflow-x: hidden;
    }

    .nav-link:hover {
        color: var(--detail-color);
    }


    .nav-link i {
        font-size: auto;
        margin: auto;
        padding: auto;
        width: 100%;
        text-align: center;
    }

    .hamburger-menu {
        display: flex;
        width: 100%;
    }

    .hamburger-menu .menu-text {
        text-align: center;
        margin: auto;
        font-size: 20px;
        color: rgba(194, 194, 194, 0.535);
    }

    .navbar {
        display: none;
        width: 100%;
    }

    .navbar.active {
        display: flex;
        flex-direction: column;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 5rem;
        background: var(--bg-primary);
        z-index: 999;
        /* Hoher Z-Index für Überlagerung */
        transition: transform var(--transition-speed) ease;
    }

    body::-webkit-scrollbar {
        width: .5rem;
    }

    .imp-item {
        text-align: center;
        font-size: auto;
        margin: 0 1vh;
        padding: auto;
    }

    .popup-image img {
        display: none;
    }
}


@media only screen and (min-width: 601px) {
    .navbar {
        top: 0;
        width: 5rem;
        height: 100vh;
    }

    .navbar:hover {
        width: 16rem;
        z-index: 20;
    }

    .navbar:hover .link-text {
        opacity: 1;
        color: var(--detail-color);
        transition: opacity .9s ease-in-out;
        z-index: 20;
    }

    .portrait:hover {
        transform: scale(1.05);
        filter: grayscale(0%);
        transition: filter var(--transition-speed) ease, transform var(--transition-speed) ease;
    }

    .banner:hover img {
        height: 32rem;
    }

    .nav-link i {
        margin-right: 0;
        margin-left: 1.5rem;
        font-size: 1.5rem;
        padding: 0;
        gap: 0;
    }

    /* .gallery-container .image:hover img {
        cursor: pointer;
        filter: brightness(65%);
        transition: all .5s ease;
    } */

    .popup-image {
        position: fixed;
        top: 0;
        left: 0;
        background: rgba(0, 0, 0, .9);
        width: 100%;
        height: 100%;
        z-index: 100;
        display: none;
    }

    .popup-image span {
        position: absolute;
        font-size: 4rem;
        color: var(--pop-color);
        cursor: pointer;
        z-index: 100;
        top: -1rem;
        right: .5rem;
    }

    .popup-image span:hover {
        color: var(--detail-color);
    }

    .popup-image img {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        border-radius: 1em;
        border: .1em solid var(--pop-color);
        max-height: 95%;
        max-width: 95%;
        object-fit: cover;
    }

    .container:hover .overlay {
        opacity: .85;
        cursor: pointer;
    }

}