* {
    utline: 1px solid red;
    /*Fucking Minecraft F3+B*/
}

:root {
    --info-bg: rgb(245, 239, 212);
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
    /*dynamik viewport hight*/
    padding-top: 85px;
    margin: 0;
    font-family: Arial, sans-serif;
    color: #333;
    position: relative;
    overflow-x: hidden;
    background-image: url(hintergrund-tag_mc.png);
    background-repeat: no-repeat;
    background-position: center;
    background-size: auto 100dvw;
    background-attachment: fixed;
    background-size: cover;
    background-color: #ffffff;
    transition: background-color 0.5s ease;
    max-width: 100dvw;
}

body.night-mode {
    background-color: #181818;
    background-image: url(hintergrund-nacht_mc.png);
}

/*Header Anfang*/

header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 85px;
    box-sizing: border-box;
    z-index: 100;
    color: #222;
    backdrop-filter: blur(4px);
    box-shadow: 0 5px 8px rgba(0, 0, 0, 0.233);
    transition: color 0.5s ease, box-shadow 0.5s ease;
}

header::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, #36df6000, #4eac6600);
    z-index: -2;
}

header::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    background: linear-gradient(90deg, #6c706d9d, #49855900);
    opacity: 0;
    transition: opacity 0.5s ease;
    will-change: opacity;
}

body.night-mode header::after {
    opacity: 1;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    padding-left: 20dvw;
    transition: padding-left 0.4s ease;
}

@media (max-width: 1400px) {
    .header-left {
        padding-left: calc((100vw - 500px) / (1000 - 500) * 10dvw);
    }
}

@media (max-width: 1400px) {
    .header-left {
        padding-left: 0;
    }
}

.header-left a {
    text-decoration: none;
}

header img {
    width: 65px;
    height: auto;
    object-fit: contain;
    background: transparent;
    display: block;
    cursor: pointer;
    transition: transform 0.3s ease;
}

header img:hover {
    transform: scale(1.15);
}

header h1 {
    margin: 0;
    font-size: 24px;
    user-select: none;
    white-space: nowrap;
    color: #ffffff;
    transition: color 0.7s ease-in;
}

body.night-mode header h1 {
    color: #e5e5e5;
    text-shadow: 0 0 4px #000, 0 0 6px #fff;
}

nav.desktop-nav {
    display: flex;
    gap: 30px;
    font-size: 18px;
    justify-items: center;
    margin-left: -130px;
    position: relative;
    padding: 8px 16px;
    border-radius: 25px;
    z-index: 0;
}

nav.desktop-nav::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(155, 155, 155, 0.164);
    border-radius: 100px;
    z-index: -1;
    transition: background 0.5s ease;
    backdrop-filter: blur(8px);
}

body.night-mode nav.desktop-nav::before {
    background: rgba(48, 48, 48, 0.311);
    text-shadow: 0 0 0px #000, 0 0 0px #fff;
}

nav.desktop-nav a {
    color: #f1f1f1;
    text-decoration: none;
    font-weight: 600;
    border-radius: 6px;
    transition: color 0.3s ease;
    white-space: nowrap;
    position: relative;
    padding: 4px 0;
    text-shadow: 0 0 7px #1c1c1c, 0 0 11px #1c1c1c;
}

body.night-mode nav.desktop-nav a {
    text-shadow: 0 0 4px #000, 0 0 6px #fff;
}

nav.desktop-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    height: 2px;
    width: 0;
    background-color: #48c048;
    border-radius: 1px;
    transition: width 0.3s ease-in-out;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-right: 10px;
    padding-right: 20dvw;
    transition: padding-right 0.4s ease;
}

@media (max-width: 1400px) {
    .header-right {
        padding-right: calc((100vw - 500px) / (1000 - 500) * 10dvw);
    }
}

@media (max-width: 1400px) {
    .header-right {
        padding-right: 0;
    }
}

#toggle-theme {
    cursor: pointer;
    background: none;
    border: none;
    color: #ffd700;
    transition: color 0.3s ease;
    transition: transform 0.2s ease;
}

#toggle-theme svg {
    display: block;
    width: 2.5rem;
    height: 2.5rem;
}

#toggle-theme:hover {
    transform: scale(1.20);
}

body.night-mode #toggle-theme {
    color: #ffd700;
}

#toggle-theme:active svg {
    transform: scale(0.9) rotate(20deg);
}

nav.desktop-nav a:hover {
    color: white;
}

nav.desktop-nav a:hover::after {
    width: 100%;
}

body.night-mode nav.desktop-nav a {
    color: #fff;
}

body.night-mode nav.desktop-nav a:hover {
    color: #000;
    text-shadow: 0 0 4px #2f2f2f;
}


.mobile-dropdown {
    position: fixed;
    top: 120px;
    left: 40px;
    right: 40px;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    background: linear-gradient(30deg, rgba(62, 74, 83, 0.76), rgba(0, 0, 0, 0));
    color: #222;
    backdrop-filter: blur(3px);
    border-radius: 20px;
    text-align: center;
    transition: max-height 0.5s ease, opacity 0.5s ease, padding 0.5s ease;
    z-index: 100;
}

body.night-mode .mobile-dropdown {
    background: linear-gradient(-20deg, #00000000, #34b35659);
}

.mobile-dropdown.open {
    max-height: 300px;
    opacity: 1;
    padding-top: 10px;
    padding-bottom: 10px;
    transition: 0.3s ease-out;
}

.mobile-dropdown nav {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.mobile-dropdown nav a {
    display: block;
    width: 300px;
    margin: 5px 30px;
    padding: 10px;
    text-decoration: none;
    font-weight: 600;
    color: white;
    background: #3442ffa1;
    border-radius: 25px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.mobile-dropdown nav a:hover {
    background-color: #00ff228a;
    color: rgb(24, 25, 26);
    outline: none;
    text-shadow: 0 0 6px #fff;
}

#mobile-menu-button {
    cursor: pointer;
    font-size: 24px;
    background: none;
    border: none;
    display: none;
    color: inherit;
    transition: color 0.3s ease;
    padding: 0;
    transition: transform 0.2s ease;
}

#mobile-menu-button:hover {
    transform: scale(1.25);
}

/*Header Ende*/

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    /* wichtig */
    overflow-y: auto;
    box-sizing: border-box;
}

@media (max-width: 865px) {
    header {
        height: 85px;
        padding: 15px 20px;
        flex-wrap: wrap;
        gap: 10px;
        justify-content: center;
    }

    .header-left {
        justify-content: center;
        gap: 10px;
    }

    header img {
        max-width: 40px;
        max-height: 40px;
        margin: 0;
    }

    header h1 {
        margin-right: 10px;
    }

    nav.desktop-nav {
        display: none;
    }

    #mobile-menu-button {
        display: block;
    }

    .portfolio {
        width: 80%;
    }

    .portfolio h2 {
        font-size: 60px !important;
    }

    .portfolio-grid {
        max-width: 700px;
    }
}

@keyframes fadeIn {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

.fadeIn {
    animation: fadeIn 1s smooth;
}

.portfolio {
    flex: 1;
    width: 100%;
    padding: 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-bottom: 250px;
}

.portfolio h2 {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 100px;
    margin-bottom: 100px;
    margin-top: 150px;
    transition: 0.7s ease-out;
    animation: fadeIn 1.5s ease, colorFlow 10s infinite;
    background: linear-gradient(90deg, #2982ff, #29edff, #65ff29, #fffc40, #FF9800, #E040FB, #19beff);
    color: transparent;
    font-weight: bold;
    background-size: 300% 300%;
    -webkit-background-clip: text;
    filter: drop-shadow(10px 10px 5px black);
}

@keyframes colorFlow {
    0% {
        background-position: 0% 50%;
    }

    20% {
        background-position: 50% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    80% {
        background-position: 50% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

body.night-mode .portfolio h2 {
    filter: drop-shadow(7px 7px 10px)
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 40px auto;
    width: 100%;
}

.portfolio-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    transition: transform 0.2s ease;
}

.portfolio-item iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 10px;
    transition: transform 0.3s ease, filter 1s ease-out;
    display: block;
}

.portfolio-item:hover {
    transform: rotate(5deg);
}

@keyframes slideInFromTopLeft {
    0% {
        opacity: 0;
        transform: translate(-50px, -50px);
    }

    100% {
        opacity: 1;
        transform: translate(0, 0);
    }
}

@keyframes slideInFrommidle {
    0% {
        opacity: 0;
        transform: translate(0px, 50px);
    }

    100% {
        opacity: 1;
        transform: translate(0, 0);
    }
}

@keyframes slideInFromrightdown {
    0% {
        opacity: 0;
        transform: translate(25px, -50px);
    }

    100% {
        opacity: 1;
        transform: translate(0, 0);
    }
}

.portfolio-item:nth-child(1) {
    animation: slideInFromTopLeft 0.8s ease-out forwards;
    opacity: 0;
}

.portfolio-item:nth-child(2) {
    animation: slideInFrommidle 0.8s ease-out 0.3s forwards;
    opacity: 0;
}

.portfolio-item:nth-child(3) {
    animation: slideInFromrightdown 0.8s ease-out 0.6s forwards;
    opacity: 0;
}

.portfolio-item img {
    width: 100%;
    transition: transform 0.3s ease, filter 1s ease-out;
    border-radius: 10px;
}

body.night-mode .portfolio-item img {
    filter: brightness(70%);
    transition: filter 1s ease-out;
    transition: transform 0.3s ease, filter 1s ease-out;
}

.portfolio-item:hover img {
    transform: scale(1.1);
}

.overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 25px;
    opacity: 0;
    transition: opacity 0.3s ease;
    font-size: 1rem;
    text-align: center;
    box-shadow: 0px -5px 7px rgba(0, 0, 0, 0.5);
}

.portfolio-item:hover .overlay {
    opacity: 1;
}

.rang-button {
    position: absolute;
    top: 150px;
    right: 40px;
    z-index: 1;
    padding: 0.75em 1.25em;
    background-color: #ffae00;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    transform: translateX(300px);
    opacity: 0;
    transition: transform 0.6s ease, opacity 0.6s ease;
    transition: all 0.25s ease-in-out;
}

.rang-button.visible {
    transform: translateX(0);
    opacity: 1;
}

.rang-button:hover {
    background-color: #ffc273;
    outline: 3px solid rgb(89, 212, 89);
    color: #2e2e2f;
    transition: all 0.25s ease-in-out;
}

body.night-mode .rang-button {
    background-color: #7a5e22;
}

body.night-mode .rang-button:hover {
    background-color: #33586f;
    outline: 3px solid rgb(20, 112, 52);
    color: #f15972;
}

@keyframes slide-in-right {
    from {
        transform: translateX(300px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slide-out-right {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(300px);
        opacity: 0;
    }
}

.welcome {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 50px auto;
    margin-bottom: 150px;
    width: 100%;
    text-align: center;
    z-index: 1;
    height: 10vh;
    background-color: #fff;
    border-radius: 20cm;
    transition: background-color 1s ease;
    max-width: 1200px;
    max-height: 200px;
    opacity: 0;
    animation: slideInFromTopLeft 1.2s ease-out 1.1s forwards;
    background-image: linear-gradient(90deg, #5eff24 30%, #33c9ff 70%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}


body.night-mode .welcome {
    background-color: #000000;
}

.welcome h1 {
    font-size: clamp(5px, 4vw, 45px);
    transition: 0.2s ease-in-out, color 0.5s ease-in;
    color: black;
}

body.night-mode .welcome h1 {
    color: white;
}

.welcome h1:hover {
    transform: scale(1.1);
}

.info-section {
    width: 90%;
    max-width: 1200px;
    margin: 40px auto;
    box-sizing: border-box;
    z-index: 10;
}

.info-section h1 {
    text-align: center;
    font-size: 2.5em;
    animation: fadeIn 1.5s ease, colorFlow 5s infinite;
    background: linear-gradient(90deg, #0011ff, #19beff, #2a9b33, #1eff00);
    -webkit-background-clip: text;
    background-size: 300% 200%;
    color: transparent;
    transition: rotate 0.3s ease;
    z-index: 10;
}

.info-section h1:hover {
    rotate: -10deg;
}

.grid-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px 0;
    gap: 3rem;
}

@media (max-width: 1200px) {
    .grid-container {
        grid-template-columns: 1fr;
    }
}

/* Spalten-Container: Flex-Centering */
.left-column,
.right-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 30px;
}

/* Basis-Boxen-Styling */
.about-me-box {
    background: var(--info-bg);
    color: #333;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    padding: 10px;
    width: 100%;
    max-width: 500px;
    opacity: 0;
    top: 50%;
    left: 50%;
    transform: translate(10%, -90%);
    transition: transform 1.7s ease, background-color 0.4s ease;
    z-index: 1;
}

.about-me-box.view {
    transform: translate(-0%, -0%);
    animation: fadeIn 1s ease-out;
    opacity: 1;
    z-index: 1;
}

.experience-box {
    background: var(--info-bg);
    color: #333;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    padding: 10px;
    width: 100%;
    max-width: 500px;
    opacity: 0;
    top: 0%;
    left: 0%;
    transform: translate(0%, 90%);
    transition: transform 1.7s ease, background-color 0.4s ease;
}

.experience-box.view {
    transform: translate(-0%, -0%);
    animation: fadeIn 2s ease;
    opacity: 1;
    transition-delay: transform 0.5s;
    animation-fill-mode: backwards;
}

.yt-video-box {
    background: var(--info-bg);
    color: #333;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    padding: 10px;
    width: 100%;
    max-width: 500px;
    opacity: 0;
    top: 50%;
    left: 50%;
    transform: translate(-50%, 20%);
    transition: transform 1.7s ease, background-color 0.4s ease;
}

.yt-video-box.view {
    transform: translate(-0%, -0%);
    animation: fadeIn 2s ease;
    opacity: 1;
    transition-delay: transform 0.5s;
    animation-fill-mode: backwards;
}

.image-box {
    background: var(--info-bg);
    color: #333;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    padding: 10px;
    width: 100%;
    max-width: 500px;
    opacity: 0;
    top: 50%;
    left: 50%;
    transform: translate(50%, -20%);
    transition: transform 1.7s ease, background-color 0.4s ease;
}

.image-box.view {
    transform: translate(-0%, -0%);
    animation: fadeIn 2s ease;
    opacity: 1;
    transition-delay: transform 0.5s;
    animation-fill-mode: backwards;
}

.about-me-box {
    animation-delay: 0.2s;
}

.yt-video-box {
    animation-delay: 0.4s;
}

.image-box {
    animation-delay: 0.6s;
}

.experience-box {
    animation-delay: 0.8s;
}

/* Nachtmodus per body.night-mode */
body.night-mode .about-me-box,
body.night-mode .experience-box,
body.night-mode .yt-video-box,
body.night-mode .image-box {
    background-color: #2e2e2e;
    color: #eae9dd;
}

/* Überschriften und Texte */
.about-me-box h2,
.experience-box h2 {
    text-align: center;
    margin-bottom: 10px;
    font-size: 1.6em;
}

.about-me-box p,
.experience-box p {
    text-align: center;
    line-height: 1.5;
}

/* Video-Box 16:9 embed */
.yt-video-box iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    border: none;
    border-radius: 8px;
}

/* Bild-Box */
.image-box img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* Fade-in-Animation */
@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.kommt {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 50px auto;
    margin-bottom: 150px;
    width: 100%;
    text-align: center;
    z-index: 1;
    height: 10vh;
    background-color: #57575721;
    border-radius: 20cm;
    max-width: 300px;
    max-height: 80px;
    color: #19c5ff;
    margin-top: 100px;
    backdrop-filter: blur(4px);
}

/*Footer Anfang*/

footer {
    width: 100%;
    background-color: #222;
    color: #fff;
    padding: 15px 0;
    text-align: center;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.footer-nav a {
    color: #fff;
    text-decoration: none;
    margin: 0 10px;
    font-size: 14px;
    transition: color 0.3s ease;
}

.footer-nav a:hover {
    text-decoration: underline;
    color: #bbb;
}

/*Footer Ende*/