@keyframes animation-1 {
    0% {
        visibility: hidden;
    }
    1%,
    24% {
        visibility: visible;
    }
    25%,
    100% {
        visibility: hidden;
    }
}
@keyframes animation-2 {
    0%,
    24% {
        visibility: hidden;
    }
    25%,
    49% {
        visibility: visible;
    }
    50%,
    100% {
        visibility: hidden;
    }
}
@keyframes animation-3 {
    0%,
    49% {
        visibility: hidden;
    }
    50%,
    74% {
        visibility: visible;
    }
    75%,
    100% {
        visibility: hidden;
    }
}
@keyframes animation-4 {
    0%,
    74% {
        visibility: hidden;
    }
    75%,
    99% {
        visibility: visible;
    }
}

.portrait {
    display: grid;
    width: 100%;
    max-width: 500px;
    overflow: hidden;
}

.portrait img {
    grid-area: 1 / 1;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    visibility: hidden;
    animation-duration: 3000ms;
    animation-iteration-count: infinite;
}

.portrait img:nth-child(1) {
    animation-name: animation-1;
}
.portrait img:nth-child(2) {
    animation-name: animation-2;
}
.portrait img:nth-child(3) {
    animation-name: animation-3;
}
.portrait img:nth-child(4) {
    animation-name: animation-4;
}

html,
body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}
body {
    background-color: white;
    color: black;
    font-family: "Instrument Sans", sans-serif;
    font-weight: 400;
}
a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

a:hover {
    color: #8ca3ab;
    transition: transform 0.3s ease;
    display: inline-block;
    transform-origin: left center;
}
img {
    width: 100%;
    display: block;
}

header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    font-size: 20px;
    font-weight: 700;
    background-color: white;
}

main {
    margin-top: 17vh;
}
main.kein_abstand {
    margin-top: 18vh;
}

main > .heading:first-of-type {
    margin-top: 250px;
}
main.kein_abstand > .heading:first-of-type {
    margin-top: 10vh;
}

footer {
    margin-top: 50vh;
    left: 0;
    width: 100%;
    font-size: 20px;
    font-weight: 400;
}

.nav-list {
    display: flex;
    justify-content: space-between;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 25px 10px;
    font-weight: 700;
}

ul {
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-left: 2rem;
    padding-right: 2rem;
}

.ul_kontakt {
    list-style: none;
    font-weight: 700;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    padding-left: 20px;
    padding-right: 20px;
    margin: 0;
}
h1 {
    display: inline-block;
    position: absolute;
    text-align: left;
    height: 80px;
    margin: 0;
    background-color: white;
    font-weight: 700;
    font-size: 60px;
    padding: 0 10px;
}
h2 {
    display: inline-block;
    font-size: 30px;
    position: relative;
    height: 30px;
    margin: 0;
    background-color: white;
    font-weight: 700;
    padding-left: 20px;
    padding-right: 10px;
}
.heading,
.heading_index {
    height: 80px;
    text-align: left;
    margin-bottom: 40px;
    font-weight: 700;
}

.heading {
    margin-top: 20px;
}

.heading_index {
    margin-top: 5vh;
}

.text_block,
.text_block_AM {
    font-weight: 500;
    margin: 0;
}

.text_block {
    width: 48%;
    text-align: start;
    padding: 20px;
}

.text_block_AM {
    padding-right: 20px;
    width: 100%;
    max-width: 600px;
    flex: 1 1 auto;
}

.image_list {
    width: auto;
    overflow-x: auto;
    display: flex;
    white-space: nowrap;
    gap: 20px;
    margin: 10px;
    align-items: center;
    box-shadow: inset 0 0 0 1px white;
    padding-bottom: 20px;
}

.image_link {
    text-decoration: none;
    font-weight: 600;
    color: black;
}
figure {
    margin: 0;
    display: flex;
    flex-direction: column;
}
.image_link figcaption {
    transition: transform 0.3s ease;
    display: inline-block;
    transform-origin: left center;
}

.image_link:hover figcaption {
    transform: scale(1.1);
}

.image_list a {
    display: flex;
    flex-shrink: 0;
    scroll-behavior: smooth;
}
.image_item {
    height: 500px;
    width: auto;
    flex-shrink: 0;
    display: block;
    margin-bottom: 15px;
}
.about-content {
    display: flex;
    align-items: flex-end;
    gap: 30px;
    padding: 10px;
    width: 100%;
}

.side-arrow-right {
    position: absolute;
    right: 20px;
    margin-top: 20px;
    z-index: 999;
}
.side-arrow-right span {
    display: block;
    width: 15px;
    height: 15px;
    border-top: 2px solid black;
    border-right: 2px solid black;
    transform: rotate(45deg);
    transition:
        transform 0.3s ease,
        border-color 0.3s ease;
}
.side-arrow-right:hover span {
    border-color: #8ca3ab;
    opacity: 1;
    transform: rotate(45deg) scale(1.7);
}

@media screen and (max-width: 768px) {
    header {
        font-size: 18px;
        background-color: transparent;
    }

    footer {
        margin-top: 10vh;
        padding: 20px 10px;
        font-size: 16px;
    }
    .portrait {
        max-width: 100%;
    }

    main h1 {
        position: static;
        font-size: 32px;
        height: auto;
        padding: 5px 10px;
        background-color: transparent;
    }
    .nav-list {
        flex-direction: row;
        padding: 15px 10px;
        flex-wrap: nowrap;
    }
    .about-content {
        flex-direction: column;
        align-items: flex-start;
        padding: 0;
        gap: 20px;
    }
    .ul_kontakt {
        flex-direction: column;
        gap: 15px;
        padding-top: 5vh;
        padding-left: 1rem;
        padding-right: 1rem;
        text-align: center;
    }
    .about-content .image_AboutMe,
    .about-content .image_AboutMe img {
        width: 100%;
    }
    .about-content .text_block_AM {
        max-width: 90%;
        margin: 0 auto;
        padding: 0 20px 40px 20px;
    }
    .heading,
    .heading_index {
        height: auto;
        margin-bottom: 20px;
    }
    .heading {
        margin-top: 10px;
    }
    .heading_index {
        margin-top: 80px;
    }
    main > .heading:first-of-type {
        margin-top: 230px;
    }
    .text_block {
        width: 90%;
        margin: 30px auto 0;
        padding: 10px 40px 10px 10px;
    }
    .image_item {
        height: 300px;
    }
    .side-arrow-right {
        transform: translateY(-50%) scale(0.7);
        width: 30px;
        height: 30px;
        align-items: center;
        justify-content: center;
    }
    footer nav ul {
        flex-direction: column;
        align-items: center;
        gap: 15px;
        padding: 0;
    }
    footer li {
        font-size: 16px;
        text-align: center;
        width: 100%;
    }
}
