.hero {
    font-size: 1.5rem;
    position: relative;
    height: 100vh;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    user-select: none;

    h2 {
        font-size: 2em;
        transform: translateY(0.1em);
    }

    &::after {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: url(../img/berlinschwarzenberg2.jpg);
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        z-index: -1;
    }

    .heroarrow {
        position: absolute;
        bottom: 7.5%;
        left: 50%;
        transform: translate(-50%, 0);
        z-index: 3;
        /* Increase z-index to ensure it is above other elements */
        padding: 0;
        cursor: pointer;
        background: none;
        border: none;
        width: 6%;
        transition: all 0.5s ease;
        text-align: center;
        box-shadow: none;
    }

    .heroarrow:hover {
        transform: translate(-50%, -0);
    }

    .heroarrow svg {
        fill: none;
        pointer-events: none;
        stroke: white;
        stroke-width: 5px;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    .heroarrow svg line {
        transition: all 0.5s ease;
        stroke-dasharray: 90;
        stroke-dashoffset: 90;
    }

    .heroarrow:hover svg line {
        stroke-dashoffset: 0;
    }
}

.aboutCont {
    width: 100%;
    padding: var(--defaultMargin) 8rem;
    justify-content: space-between;
    gap: var(--defaultMargin);

    p {
        margin-bottom: 0.75rem;
        width: clamp(60%, 10vw + 50%, 100%);
    }

    p:last-child {
        margin-bottom: 0;
    }
}

.profile {
    width: 50%;
    text-align: center;

    img {
        width: 100%;
        height: 100%;
        box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
        margin-bottom: 1rem;
        border-radius: 50%;
    }
}

.introCont {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    text-align: center;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;

    * {
        text-wrap: nowrap;
    }
}

.musicStave {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-around;

    .line {
        min-height: 100%;
        width: 100%;
        min-width: 2em;
        background-color: var(--logoColor);
        opacity: 0;
    }

    .flex {
        flex-basis: 40%;
        max-height: 40%;
        color: white;
        width: 100%;
        justify-content: space-between;

        .lineWrap {
            width: 100%;
            height: 100%;
            display: flex;
            flex-direction: column;
            justify-content: space-around;
        }
    }

    h2 {
        color: var(--logoColor);
        max-width: 0%;
    }

    .singleLine {
        flex-basis: 20%;
        max-height: 20%;

    }
}

/* 
:root{
    --introScale: calc(100vw / 1000);
} */

.introBlock2 {
    position: sticky;
    color: var(--logoColor);
    background-color: white;
    overflow: clip;
    max-width: 0.8ch;

    h1 {
        margin: 0.5rem;
        /* no padding because the text shows then */
    }

    h2.intro {
        position: absolute;
        top: 1em;
        left: 0;
        opacity: 0;
        color: var(--logoColor);
    }

    h3.intro {
        position: absolute;
        bottom: 1em;
        opacity: 0;
        left: 0;
        color: var(--logoColor);
    }

}

@property --offset {
    /*https://stackoverflow.com/questions/50661638/css-animate-custom-properties-variables*/
    syntax: "<number>";
    initial-value: 0;
    inherits: true;
}

.trebleClef {
    z-index: 2;
    fill: none;
    position: absolute;
    top: 50%;
    left: 0;
    height: calc(100% + 3em);
    transform: translate(0, -50%) rotate(-5deg);

    path {
        stroke: var(--logoColor);
        stroke-width: 30px;
        stroke-linecap: round;
        stroke-dasharray: 3200 3200;
        stroke-dashoffset: var(--offset);
    }
}

.introBlock1 {
    /* In total control */
    overflow: clip;
    max-width: 0;
    animation: appear 1s 1s ease-in-out forwards, appear 2s ease 2s reverse forwards;
}

.introBlock2 {
    /* Everaything is possible */
    animation: flicker 0.5s linear 2s 3 forwards, intro2 3s ease 4s forwards, clipY 0.1s ease 8s forwards, intro3 1s ease 18s forwards, clipX 0.1s ease 19s forwards;
    /* Flicker, grow to show text & transition to music stave, disable clipping */

    h2.intro {
        animation: introTextTop 1s ease 8s forwards, introTextTop 1s ease 19s reverse forwards;
        /* Coding */
    }

    h3.intro {
        /* Design */
        animation: introTextBottom 1s ease 9s forwards, introTextBottom 1s ease 19s reverse forwards;
    }
}

.musicStave {
    .line {
        animation: stave 1s ease 6.5s forwards;
    }

    .flex {
        animation: introFlex 1s ease 10s forwards, introFlex 2s ease 11s reverse forwards, introFlex 1s ease 15s forwards;
        /* gap between lines and text */
    }

    h2 {
        animation: appear 2s ease 10s forwards, appear 2s ease 11s reverse forwards, appear 2s ease 15s forwards;
        /* display and finding inspiration everywhere, then hiding to change content and returning  */
    }
}

.hero .trebleClef {
    animation: treble 3s ease-in backwards 19s 0.5;
}

@keyframes introTextTop {
    0% {
        opacity: 0;
        top: 1em;
    }

    100% {
        opacity: 1;
        top: -1em;
    }
}

@keyframes introTextBottom {
    0% {
        opacity: 0;
        bottom: 1em;
    }

    100% {
        opacity: 1;
        bottom: -1em;
    }
}

@keyframes introFlex {
    0% {
        gap: 0;
    }

    100% {
        gap: 1ch;
    }
}


@keyframes stave {
    0% {
        opacity: 1;
        min-height: 100%;
    }

    50% {
        opacity: 1;
        min-height: 5px;
    }

    90% {
        opacity: 1;
        min-height: 5px;
    }

    100% {
        opacity: 1;
        min-height: 5px;
    }
}

@keyframes flicker {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

@keyframes appear {
    0% {
        max-width: 0%;
    }

    100% {
        max-width: 100%;
    }
}

@keyframes intro2 {
    0% {
        max-width: 0.8ch;
    }

    50% {
        max-width: 100%;
        color: black;
    }

    90% {
        color: transparent;
        background-color: white;
    }

    100% {
        color: transparent;
        background-color: transparent;
        max-width: 100%;
    }
}

@keyframes clipY {
    0% {
        overflow-y: clip;
    }

    100% {
        overflow-y: visible;
    }
}

@keyframes clipX {
    0% {
        overflow-x: clip;
    }

    100% {
        overflow-x: visible;
    }
}

@keyframes intro3 {
    0% {
        max-width: 100%;
    }

    50% {
        max-width: 50%;
        font-size: 1.5vw;
    }

    100% {
        max-width: 33%;
        font-size: 2vw;
    }
}

@keyframes gradient {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@keyframes treble {
    0% {
        --offset: 3200;
    }

    50% {
        --offset: 0;
    }

    100% {
        --offset: 3200;
    }
}

@media screen and (max-width: 768px) {


    .aboutCont {
        flex-direction: column-reverse;
        padding: var(--defaultMargin) 2rem;

        p {
            width: 100%;
        }

    }

    .profile {
        width: 60%;

        img {
            width: 100%;
            height: 100%;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
            margin-bottom: 1rem;
        }
    }


    .hero {
        h1 {
            font-size: 2rem;
        }

        h2 {
            font-size: 1.5rem;
        }

        h3 {
            font-size: 1.5rem;
        }
    }

    .hero .heroarrow {
        width: 20%;
    }

    .introBlock2 {
        max-width: 0.4ch;
    }

    .trebleClef {
        top: 50%;
        left: 0;
        height: calc(50% + 3em);

        path {
            stroke: var(--logoColor);
            stroke-width: 30px;
            stroke-linecap: round;
            stroke-dasharray: 3200 3200;
            stroke-dashoffset: var(--offset);
        }
    }

    @keyframes stave {
        0% {
            opacity: 1;
            min-height: 100%;
        }

        50% {
            opacity: 1;
            min-height: 2.5px;
        }

        90% {
            opacity: 1;
            min-height: 2.5px;
        }

        100% {
            opacity: 1;
            min-height: 2.5px;
        }
    }

    @keyframes intro3 {
        0% {
            max-width: 100%;
        }

        50%{
            font-size: 3vw;
        }

        100% {
            max-width: 50%;
            font-size: 4vw;
        }

    }

}