@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@100;200;300;400;500;600;700;800;900&display=swap");

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    border: none;
    outline: none;
    scroll-behavior: smooth;
    font-family: 'Poppins', sans-serif;
}

:root {
    --bg-color: #fdfdfd;
    --text-color: #333;

    --main-color: rgb(21, 0, 255);

    --white-color: #fdfdfd;
    --shadow-color: rgba(0, 0, 0, 0.2);
}

.dark-mode {
    --bg-color: #000000;
    --text-color: rgb(255, 255, 255);
    --main-color: #ffffff;
    --white-color: #000000;
    --shadow-color: rgba(208, 208, 208, 0.7);
}

html {
    /* gleichmäßige, stufenlose Skalierung statt fester Breakpoints */
    font-size: clamp(8px, calc(7.2px + 0.2vw), 10px);
    overflow-x: hidden;
}

body {
    background: var(--bg-color);
    color: var(--text-color);
}

.header {
    position: fixed;
    top: 0;
    left:0;
    width: 100%;
    padding: 2rem 7.4% 2rem 9.4rem;
    background: transparent;
    display: flex;
    align-items: center;
    z-index: 100;
    transition: 0.5s;
}

#projectheading {
    margin-top: 120px;
    margin-left: 20px;
    display: flex;
    align-items: center;
}

.header.sticky {
    background: var(--bg-color);
    box-shadow: 0  0.1rem 1rem var(--shadow-color);
}

.logo {
    font-size:  2.5rem;
    color: var(--main-color);
    font-weight: 600;
    cursor: default;
    margin-right: auto;
    text-decoration: none;
    margin-left: -10px;
}

.navbar a {
    position: relative;
    font-size: 1.7rem;
    color: var(--text-color);
    font-weight: 500;
    margin-right: 3.5rem;
    text-decoration: none;
}

.header.sticky .navbar a {
    color: var(--text-color);
}

.header.sticky .navbar a.active {
    color: var(--main-color);
}

.navbar a.active::before {
    content: ' ';
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 100%;
    height: 0.2rem;
    background: var(--main-color);
}

.header.sticky .navbar a::before {
    background: var(--main-color);
    opacity: 0.7;
}

#darkMode-icon {
    font-size: 2.4rem;
    color: var(--main-color);
    cursor: pointer;
}

#pfeiloben {
    color: var(--main-color);
}

.header.sticky #darkMode-icon {
    color: var(--text-color);
    opacity: 0.9;
}

#menu-icon {
    font-size: 3.6rem;
    color: var(--text-color);
    display: none;
}

#pfeiloben {
    color: var(--main-color);
}

section {
    min-height: 100vh;
    padding: 10rem 13% 2rem;
}

#btn2 {
    font-size: 3.4rem;
    color: var(--main-color);
    cursor: pointer;
    margin-right: 20px;
    margin-left: 10px;
}

button {
    background: transparent;
}

.header.sticky #btn2 {
    color: var(--text-color);
    opacity: 0.9;
}


/* about me */
.about {
    padding: 10rem 11% 4rem;
}

.main {
    max-width: 105.7rem;
    margin: 0 auto;
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-areas:
        ". heading"
        "img copy"
        "img btn";
    column-gap: 9rem;
    row-gap: 1.5rem;
    align-items: start;
}

.about-heading {
    grid-area: heading;
    min-width: 0;
}

.about-heading h1 {
    color: var(--text-color);
    font-size: 8rem;
    text-transform: capitalize;
    margin-top: 1rem;
    margin-bottom: 2rem;
}

.about-heading h5 {
    color: var(--main-color);
    font-size: 4rem;
    text-transform: capitalize;
    margin-bottom: 0.4rem;
}


/* Bilder-Karussell */
.about-img-stack {
    grid-area: img;
    position: relative;
    width: 28rem;
    max-width: 100%;
    margin: 0 1.6rem 1.6rem 0;
}

.carousel {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1.4;
    margin-top: 0.4rem;
}

.carousel-slide {
    position: absolute;
    inset: 0;
    margin: 0;
    border-radius: 10%;
    overflow: hidden;
    box-shadow: 0 0.4rem 1rem var(--shadow-color);
    transition: transform 0.4s ease, opacity 0.4s ease;
}

.carousel-slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-slide.pos-0 {
    z-index: 5;
    transform: translate(0, 0) scale(1);
    opacity: 1;
}

.carousel-slide.pos-1 {
    z-index: 4;
    transform: translate(1.6rem, 1.6rem) scale(0.94);
    opacity: 1;
}

.carousel-slide.pos-2,
.carousel-slide.pos-3,
.carousel-slide.pos-4 {
    z-index: 1;
    transform: translate(1.6rem, 1.6rem) scale(0.94);
    opacity: 0;
    pointer-events: none;
}

.carousel-slide figcaption {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: 0.8rem;
    padding: 2rem;
    background: linear-gradient(160deg, transparent 15%, var(--main-color) 100%);
    color: var(--white-color);
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.carousel-slide.pos-0:hover figcaption {
    opacity: 1;
}

.carousel-slide figcaption h6 {
    font-size: 1.8rem;
    font-weight: 600;
}

.carousel-slide figcaption p {
    font-size: 1.3rem;
    line-height: 1.7rem;
}

.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 3.6rem;
    height: 3.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--main-color);
    border: 0.15rem solid var(--main-color);
    color: var(--white-color);
    font-size: 2rem;
    cursor: pointer;
    transition: 0.1s ease;
}

.carousel-arrow:hover {
    background: var(--white-color);
    color: var(--main-color);
}

.carousel-arrow.prev {
    left: -1.6rem;
}

.carousel-arrow.next {
    right: -1.6rem;
}

.about-copy {
    grid-area: copy;
    min-width: 0;
    color: var(--text-color);
    letter-spacing: 0.04rem;
    line-height: 2.7rem;
    font-size: 1.59rem;
    margin-top: -0.7rem;
}

.main .btn {
    grid-area: btn;
    justify-self: start;
}


/* CTA-btn */
.btn:hover {
    background: transparent;
    color: var(--main-color);
    border-color: var(--main-color);
}

.btn {
    display: inline-block;
    padding: 1.2rem 3.1rem;
    background: var(--main-color);
    border-radius: 0.6rem;
    box-shadow: 0 0.4rem 0.7rem var(--shadow-color);
    font-size: 1.4rem;
    color: var(--white-color);
    letter-spacing: 0.1rem;
    font-weight: 600;
    border: 0.2rem solid transparent;
    transition: 0.5s ease;
    margin-bottom: 10px;
}


/* meine timeline */
.timeline {
    position: relative;
    max-width: 110rem;
    margin: 4rem auto;
}

.timeline-item {
    padding: 1rem 1.2rem;
    position: relative;
    width: 50%;
    animation: movedown 1s linear forwards;
    opacity: 0;
}


/* contact */
.contact-section {
    padding: 17rem 7.7% 2rem;
}

.container {
    max-width: 140rem;
    margin: 0rem auto 2rem;
}

.contact-left {
    flex-basis: 35%;
}

.contact-left p {
    margin-top: 20px;
    color: var(--text-color);
    font-size: 14px;
    display: flex;
    align-items: center;
}

.contact-left p i {
    color: var(--main-color);
    margin-right: 10px;
    font-size: 25px;
}

.social-icons {
    margin-top: 20px;
    margin-bottom: 10px;
}

.social-icons a {
    text-decoration: none;
    font-size: 23px;
    margin-right: 10px;
    color: var(--main-color);
    display: inline-block;
    transition: transform 0.5s;
}

.social-icons a:hover {
    color: #333;
    transform: translateY(-5px);
}


@keyframes movedown {
    0% {
        opacity: 1;
        transform: translateY(-30px);
    }

    100% {
        opacity: 1;
        transform: translateY(0px);
    }
}

.timeline-item:nth-child(1) {
    animation-delay: 0s;
}

.timeline-item:nth-child(2) {
    animation-delay: 3s;
}

.timeline-item:nth-child(3) {
    animation-delay: 5s;
}

.timeline-item:nth-child(4) {
    animation-delay: 7s;
}

.timeline-item:nth-child(5) {
    animation-delay: 9s;
}

.timeline-item:nth-child(6) {
    animation-delay: 11s;
}

.text-box {
    padding: 20px 30px;
    background: var(--white-color);
    border-color: var(--main-color);
    position: relative;
    border-radius: 6px;
    font-size: 15px;
    box-shadow: 0 0.2rem 0.5rem var(--shadow-color);
}

.text-box small {
    display: inline-block;
    margin-bottom: 15px;
}

.left-timeline-item {
    right: 0%;
    padding-right: 4.5rem;
}

.right-timeline-item {
    left: 50%;
    padding-left: 4.5rem;
}

.timeline-item img {
    position: absolute;
    width: 40px;
    border-radius: 50%;
    right: -20px;
    top: 32px;
    z-index: 10;
}

.right-timeline-item img {
    left: -20px;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 6px;
    height: 100%;
    background: var(--text-color);
    top: 0%;
    left: 50%;
    margin-left: -3px;
    z-index: -1;
    animation: moveline 12s linear forwards;
}

@keyframes moveline {
    0% {
        height: 0;
    }

    100% {
        height: 100%;
    }
}

.left-timeline-item-arrow {
    height: 0;
    width: 0;
    position: absolute;
    top: 28px;
    z-index: 1;
    border-top: 15px solid transparent;
    border-bottom: 15px solid transparent;
    border-left: 15px solid var(--main-color);
    right: -15px;
}

.right-timeline-item-arrow {
    height: 0;
    width: 0;
    position: absolute;
    top: 28px;
    z-index: 1;
    border-top: 15px solid transparent;
    border-bottom: 15px solid transparent;
    border-right: 15px solid var(--main-color);
    left: -15px;
}

@media screen and (max-width: 600px) {
    .timeline {
        margin: 50px auto;
    }

    .timeline::after {
        left: 31px;
    }

    .timeline-item {
        width: 100%;
        padding-left: 80px;
        padding-right: 25px;
    }

    .text-box {
        font-size: 13px;
    }

    .text-box small {
        margin-bottom: 10px;
    }

    .right-timeline-item {
        left: 0;
    }

    .left-timeline-item {
        left: 0;
    }

    .left-timeline-item img,
    .right-timeline-item img {
        left: -15px;
    }

    .left-timeline-item-arrow,
    .right-timeline-item-arrow {
        border-right: 15px solid var(--main-color);
        border-left: 0;
        left: -15px;
    }
}


.mobile-hint {
    position: fixed;
    bottom: -10rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 1rem;
    max-width: 34rem;
    width: 90%;
    background: var(--white-color);
    border: 0.1rem solid var(--main-color);
    border-radius: 0.8rem;
    padding: 1.2rem 1.5rem;
    box-shadow: 0 0.3rem 1rem var(--shadow-color);
    z-index: 999;
    transition: bottom 0.5s ease;
}

.mobile-hint.show {
    bottom: 2rem;
}

.mobile-hint i:first-child {
    font-size: 2.2rem;
    color: var(--main-color);
    flex-shrink: 0;
}

.mobile-hint p {
    font-size: 1.3rem;
    color: var(--text-color);
    line-height: 1.4;
    margin: 0;
}

.mobile-hint button {
    background: transparent;
    border: none;
    cursor: pointer;
    flex-shrink: 0;
    padding: 0;
    display: flex;
}

.mobile-hint button i {
    font-size: 2rem;
    color: var(--text-color);
    opacity: 0.6;
}

.mobile-hint button:hover i {
    opacity: 1;
    color: var(--main-color);
}

@media (min-width: 1100px) {
    .mobile-hint {
        display: none;
    }
}


/* footer */
.footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    padding: 2rem 8%;
    background: var(--main-color);
}

.footer-text p {
    font-size: 1.6rem;
    color: var(--white-color);
    margin-top: 8px;
}

.footer-iconTop a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 0.8rem;
    background: var(--white-color);
    border-radius: 0.8rem;
    border: 0.2rem solid var(--main-color);
    outline: 0.2rem solid transparent;
    transition: 0.5s ease;
    text-decoration: none;
}

.footer-iconTop a:hover {
    outline-color: var(--white-color);
}

.footer-iconTop a i {
    font-size: 2.4rem;
    color: #333;
}


/* BREAKPOINTS (nur noch für Layout-Umbrüche, Größe läuft über clamp() oben) */

@media (max-width: 1024px) {
    .header {
        padding: 2rem 3%;
    }

    section {
        padding: 10rem 3% 2rem;
    }
}

@media (max-width: 991px) {
    .footer {
        padding: 2rem 3%;
    }
}

@media (max-width: 768px) {
    #menu-icon {
        display: block;
    }

    #darkMode-icon {
        position: absolute;
        right: 7rem;
        font-size: 2.6rem;
        color: var(--text-color);
        margin-bottom: 0.1rem;
    }

    #btn2 {
        margin-right: 5rem;
        font-size: 2.6rem;
        color: var(--text-color);
    }

    .navbar {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        padding: 1rem 3%;
        background: var(--bg-color);
        border-top: 0.1rem solid rgba(0, 0, 0, 0.2);
        box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
        display: none;
    }

    .navbar.active {
        display: block;
    }

    .navbar a {
        display: block;
        font-size: 2rem;
        margin: 3rem 0;
        color: var(--text-color);
    }

    .navbar a::before {
        display: none;
    }

    .main {
        grid-template-columns: 1fr;
        grid-template-areas:
            "heading"
            "copy"
            "img"
            "btn";
        row-gap: 2rem;
    }

    .about-img-stack {
        width: 18rem;
        justify-self: start;
        margin: 0 0 1.6rem 0;
    }
}

@media (max-width: 550px) {
    .about-img-stack {
        width: 15rem;
    }
}

@media (max-width: 365px) {
    .footer {
        flex-direction: column-reverse;
    }

    .footer p {
        text-align: center;
        margin-top: 2rem;
    }
}