:root {
    --color-white: #fff;
    --color-black: #000;
    --color-gray-light: #ddd;
    --color-gray-dark: #333;
    --color-shadow: rgba(0, 0, 0, 0.1);
    --color-shadow-dark: rgba(0, 0, 0, 0.5);
    --color-overlay-bg: rgb(255, 255, 255);
}

@font-face {
    font-family: 'Oswald';
    src: url('Fonts/Oswald-VariableFont_wght.woff2') format('woff2');
    font-weight: 100 900;
    font-style: normal;
}

/* Scrollbalken ausblenden, aber Scrollen erlauben */
html, body {
    scrollbar-width: none;
    -ms-overflow-style: none;
    height: 100%;
    margin: 0;
    padding: 0;
-ms-overflow-style: none;
scroll-behavior: smooth;
padding-top: env(safe-area-inset-top); /* Fix für Dynamic Island oben */
    padding-bottom: env(safe-area-inset-bottom); /* Fix für Home Indicator unten */
    background-color: #000000; /* Dunkler Hintergrund, um weißen Home Indicator zu mildern */
}

html::-webkit-scrollbar, body::-webkit-scrollbar {
    display: none;
}

.portfolio-gallery.preload img { 
    transition: none !important; 
}

/* Während der Intro-Phase Scrollen deaktivieren */
html.intro-active, body.intro-active {
    overflow: hidden;
}

/* Nach der Intro-Phase Scrollen erlauben */
html:not(.intro-active) {
    overflow: hidden;
}

/* Haupt-Container übernimmt das Scrollen */
main {
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 100vh;
    height: auto;
    width: 100%;
    text-align: center;
    scrollbar-width: none;
    -ms-overflow-style: none;
     contain: layout;
     padding-top: env(safe-area-inset-top); /* Safe Area oben berücksichtigen */
    padding-bottom: env(safe-area-inset-bottom); /* Safe Area unten berücksichtigen */
}

main::-webkit-scrollbar {
    display: none;
}

#home.fade-in, #second.fade-in, #third.fade-in, #contact.fade-in, #impressum.fade-in {
    opacity: 1; /* Sichtbar nach Animation */
    animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body {
    font-family: 'Oswald', sans-serif;
    overflow-x: hidden;
    cursor: none;
}

/* Intro Section */
#intro {
    position: fixed;
    /* top: 0; */
    left: 0;
    width: 100%;
    /* height: 100vh; */
    height: calc(100vh - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    flex-direction: column;
    z-index: 1000;
    opacity: 1;
    transition: opacity 0.1s cubic-bezier(0.4, 0, 0.2, 1);
    top: env(safe-area-inset-top); /* Dynamic Island oben berücksichtigen */
    background-color: #ffffff00; /* Dunkler Hintergrund für Konsistenz */
}

#intro.hidden {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.1s cubic-bezier(0.4, 0, 0.2, 1);
}

#intro.hidden-complete {
    display: none;
}

.intro-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    width: 100%;
    max-width: 1000px;
    transition: transform 0.1s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);}

#intro.hidden .intro-container {
    transform: translateY(-30px);
    opacity: 0;
}

.enter-button {
    padding: 0.75rem 1.5rem;
    font-size: 1.2rem;
    background-color: #7f7f7f;
    color: white;
    border: 2px solid rgb(255, 255, 255);
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.1s;
    margin-top: 30rem;
    z-index: 1100; /*Über dem VIdeo */
    pointer-events: auto; /* Sicherstellen, dass der Button klickbar ist */
}

.enter-button:hover {
    background-color: #000000;
    color: #ffffff;
    border: 2px solid #000000;
}

.enter-button.hidden-button {
    opacity: 0;
    transition: opacity 0.1s ease; /* Schnellere Übergangsdauer für den Button */
}

#introVideo {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit:cover;
    z-index: -1;
    display: block;
    opacity: 1;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#intro.hidden #introVideo {
    opacity: 0;
}

#bgCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    display: block;
    transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

#intro.hidden #bgCanvas {
    opacity: 0;
}

/* Custom Cursor */
.custom-cursor {
    position: fixed;
    width: 15px;
    height: 15px;
    border-color: #917fba;
    border-radius: 50%;
    border-width: 3.5px;
    border-style: solid;
    pointer-events: none;
    z-index: 10003;
    transition: width 0.3s ease, height 0.3s ease, opacity 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0;
    color: transparent;
    text-align: center;
}

.scroll-arrow:hover ~ .custom-cursor,
.custom-cursor.hovered,
.expand-button:hover ~ .custom-cursor,
.custom-cursor.expand-hovered,
.skill-card:hover ~ .custom-cursor {
    width: 75px;
    height: 75px;
    opacity: 0.85;
    font-size: 1.2rem;
    color: #ffffff;
    padding: 5px;
    background-color: #917fba;
}

/* Navigation */
nav {
    position: fixed;
   /* top: 0; */
    top: env(safe-area-inset-top); /* Dynamic Island berücksichtigen */
    left: 0;
    width: 100%;
    background: transparent;
    z-index: 10001;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    box-sizing: border-box;
    max-width: 100vw;
}

.logo-container {
    position: relative;
    width: 120px;
    height: 120px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10002;
}

.logo-container a {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    text-decoration: none;
    position: relative;
    perspective: 600px;
    transform: rotate(-45deg);
}

.logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: brightness(0) invert(1);
    backface-visibility: hidden;
    transition: transform 0.7s ease, filter 0.7s ease;
    transform: rotateY(0deg);
}

.logo-container .flip-animate {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    text-decoration: none;
    position: relative;
    perspective: 600px;
}

.logo-container .flip-animate .logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: brightness(0) invert(1);
    backface-visibility: hidden;
    transition: transform 0.7s ease, filter 0.7s ease;
    transform: rotateY(0deg);
}

.logo-container .flip-animate:hover .logo,
.logo-container .flip-animate:focus .logo {
    transform: rotateY(-180deg);
    filter: none;
}

.logo-container .flip-animate::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: url('Bilder/Logo.svg') no-repeat center;
    background-size: contain;
    filter: none;
    backface-visibility: hidden;
    transform: rotateY(180deg);
    transition: transform 0.7s ease;
}

.logo-container .flip-animate:hover::before,
.logo-container .flip-animate:focus::before {
    transform: rotateY(0deg);
}

nav > ul > li,
nav > ul > li > a,
.scroll-arrow,
.back-to-top,
.expand-button,
input[type="checkbox"],
.enter-button {
    pointer-events: auto;
    cursor: none;
}

img {
    pointer-events: none;
}

.portfolio-item img {
    pointer-events: auto;
}

.portfolio-item {
    cursor: none;
}

.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--color-black);
    color: var(--color-white);
    padding: 8px;
    z-index: 10000;
}

.skip-link:focus {
    top: 0;
}

nav ul {
    display: flex;
    gap: 30px;
    margin: 0;
    padding: 0 1rem;
    margin-left: auto;
}

nav > ul > li {
    position: relative;
    list-style: none;
    width: 80px;
    height: 80px;
    background: var(--color-white);
    box-shadow: 0 10px 25px var(--color-shadow);
    border-radius: 80px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: width 0.5s ease, box-shadow 0.5s ease, border-radius 0.5s ease, transform 0.3s ease, opacity 0.5s ease; /* Fade-In für Nav-Buttons */
    opacity: 1;
}

nav > ul > li::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 80px;
    background: #c2c2c2;
    color: rgb(0, 0, 0);
    opacity: 0;
    transition: opacity 0.5s ease, border-radius 0.5s ease;
}

nav > ul > li::after {
    content: "";
    position: absolute;
    top: 10px;
    width: 100%;
    height: 100%;
    border-radius: 80px;
    background: linear-gradient(45deg, var(--i), var(--j));
    transition: opacity 0.5s ease, border-radius 0.5s ease;
    filter: blur(15px);
    z-index: -1;
    opacity: 0;
}

nav > ul > li .title {
    color: var(--color-gray-dark);
    font-size: 1.2em;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transform: scale(0);
    opacity: 0;
    transition: transform 0.5s ease, color 0.5s ease, opacity 0.5s ease;
    transition-delay: 0s;
    text-align: center;
    font-weight: 400;
}

nav > ul > li .nav-icon {
    position: absolute;
    font-size: 2rem;
    color: var(--color-gray-dark);
    transition: opacity 0.5s ease;
    animation: rotateHorizontal 8s infinite;
}

nav > ul > li:nth-child(1) .nav-icon {
    animation-delay: 1.5s;
}

nav > ul > li:nth-child(2) .nav-icon {
    animation-delay: 1s;
}

nav > ul > li:nth-child(3) .nav-icon {
    animation-delay: 0s;
}

nav > ul > li:nth-child(4) .nav-icon {
    animation-delay: 1s;
}

@keyframes rotateHorizontal {
    0% { transform: rotateY(0deg); }
    25% { transform: rotateY(360deg); }
    30% { transform: rotateY(360deg); }
    45% { transform: rotateY(720deg); }
    50% { transform: rotateY(720deg); }
    65% { transform: rotateY(1080deg); }
    70% { transform: rotateY(1080deg); }
    85% { transform: rotateY(1440deg); }
    90% { transform: rotateY(1440deg); }
    100% { transform: rotateY(1800deg); }
}

nav > ul > li:hover {
    width: 200px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0);
    border-radius: 20px;
    transform: scale(1.05);
}

nav > ul > li:hover::before {
    opacity: 1;
    border-radius: 20px;
}

nav > ul > li:hover::after {
    opacity: 0.5;
    border-radius: 20px;
}

nav > ul > li:hover .nav-icon {
    opacity: 0;
}

nav > ul > li:hover .title {
    transform: scale(1);
    opacity: 1;
    color: var(--color-white);
    transition-delay: 0.25s;
}

nav > ul > li > a::after {
    position: absolute;
    top: -30px;
    background: var(--color-gray-dark);
    color: var(--color-white);
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.9em;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 10002;
}

nav > ul > li > a:hover::after {
    opacity: 1;
}

nav > ul > li > a {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    text-decoration: none;
    pointer-events: auto;
    position: relative;
    z-index: 1;
}

nav > ul > li > a:focus {
    outline: 2px solid var(--color-black);
    outline-offset: 2px;
}

.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    cursor: default;
    z-index: 10002;
}

.hamburger span {
    width: 100%;
    height: 3px;
    background: var(--color-white);
    box-shadow: 0 0 2px var(--color-shadow-dark);
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

.nav-menu {
    display: flex;
    gap: 30px;
    margin: 0;
    padding: 0;
}

/* Section Styling */
section {
    width: 100vw;
    min-height: calc(100vh - 40px - 5rem);
    padding: 2rem 0;
    padding-bottom: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-size: auto;
    background-repeat: no-repeat;
    background-position: center top;
    position: relative;
    margin-top: 0;
    left: 0;
    background-color: #000000;
    transition: none;
}

section > * {
    position: relative;
    z-index: 10;
}

#home,
#second,
#third,
#contact,
#impressum {
    background-color: #000000;
    background-attachment: scroll;
    background-size: auto;
    background-repeat: no-repeat;
}

#home {
    background-color: #000000;
    z-index: 1;
    margin-top: 0;
    padding-top: 2rem;

    background-position: top center;
    background-size: 100%;
    background-repeat: no-repeat;
    transition: opacity 0.3s ease-in;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

/* Remove conflicting styles from main video */
main video:not(#skills-video) {
    position: absolute;
    top: 40%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    z-index: -1;
    transform: translateX(-50%) translateY(-50%);
}

/* Unterschriftsbild */
#home img.signing-image {
    max-width: 320px;
    width: 100%;
    height: auto;
    margin: 1rem auto;
    z-index: 15;
    display: block;
}

/* Rotierende Bildanimation für #home h1.rotatingText */
#home h1.rotatingText {
    position: relative;
    min-height: 10rem;
    z-index: 20;
    margin: 1rem auto;
    max-width: 800px;
    width: 100%;
    text-align: center;
    font-size: 0;
}

#home h1.rotatingText .rotatingText-word {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 8rem;
    overflow: hidden;
    contain: strict;
    will-change: transform, opacity;
    pointer-events: none;
}

#home h1.rotatingText img {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 8rem;
    backface-visibility: hidden;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: auto;
}

#home h1.rotatingText .rotatingText-first img {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

#home h1.rotatingText .rotatingText-alt img {
    transform: translateX(-50%) translateY(100%);
    opacity: 0;
}

#home h1.rotatingText:hover .rotatingText-first img {
    transform: translateX(-50%) translateY(-100%);
    opacity: 0;
}

#home h1.rotatingText:hover .rotatingText-alt img {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

#home h1.rotatingText:hover,
#home h1.rotatingText .rotatingText-word:hover,
#home h1.rotatingText img:hover {
    rotate: 0deg !important;
    scale: 1 !important;
}

/* Ticker-Styling */
#home .ticker-container {
    width: 100%;
    max-width: 400px;
    overflow: hidden;
    margin-top: 2rem;
    margin-bottom: 1rem;
    margin-left: auto;
    margin-right: auto;
    white-space: nowrap;
    position: relative;
}

#home .ticker {
    display: inline-flex;
    white-space: nowrap;
    will-change: transform;
}

#home .ticker.animate .ticker-content {
    animation: ticker var(--ticker-duration, 30s) linear infinite;
}

#home .ticker-content {
    display: inline-flex;
    white-space: nowrap;
    flex-shrink: 0;
}

#home .ticker-word {
    display: inline-block;
    margin-right: 1rem;
    color: var(--color-white);
    font-size: 1.0rem;
    font-weight: 400;
}

@keyframes ticker {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%);}
}

#home .ticker-content + .ticker-content {
    margin-left: 0;
}

/* Sicherstellen, dass keine Lücken entstehen */
#home .ticker-content + .ticker-content {
    margin-left: 0;
}

/* Performance-Optimierung */
#home .ticker.animate {
    backface-visibility: hidden;
    perspective: 1000;
}

/* Generelle Typografie */
h1 {
    font-size: 4.5rem;
    color: white;
   
    text-transform: uppercase;
    cursor: pointer;
    margin-bottom: 2rem;
    margin-left: auto;
    margin-right: auto;
    font-weight: 900;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Oswald', sans-serif;

    letter-spacing: 1px; /* Normaler Buchstabenabstand */
    transition: letter-spacing 0.5s ease-in-out /* Flüssige Übergangsanimation */
}

h1:not(#home h1.rotatingText):hover {
    color: #65b6a2;
    letter-spacing: 5px;
}

h2 {
    color: var(--color-white);
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

h3 {
    color: var(--color-white);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    margin-top: 1rem;
    font-weight: 500;
}

h4 {
    font-size: 1.5rem;
    color: var(--color-black);
    margin-bottom: 1rem;
    text-transform: uppercase;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

p {
    color: var(--color-white);
    margin-bottom: 1rem;
    font-weight: 400;
}

.grid-text-container h3 {
    color: var(--color-white);
    text-align: left;
    transition: none;
}

.grid-text-container p,
.grid-text-container ul,
.grid-text-container ul li {
    color: var(--color-white);
    text-align: left;
    transition: none;
}

.grid-text-container ul {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.grid-text-container ul li {
    list-style-type: disc;
    margin-bottom: 0.5rem;
    width: auto;
    height: auto;
    background: none;
    box-shadow: none;
    border-radius: 0;
}

/* Scroll Arrows */
.scroll-arrow {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 1rem;
    margin-left: auto;
    margin-right: auto;
    font-size: 2.5rem;
    color: var(--color-black);
    text-decoration: none;
    background: var(--color-white);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    transition: transform 0.3s ease;
    text-align: center;
    line-height: 60px;
}

.scroll-arrow:hover {
    transform: translateY(5px);
}

.scroll-arrow:focus {
    outline: 2px solid var(--color-black);
    outline-offset: 2px;
}

.up-arrow {
    margin-bottom: 2rem;
    margin-top: 0;
}

.up-arrow:hover {
    transform: translateY(-10px);
    background: #65b6a2;
    color: #ffffff;
}

/* Section Header */
.section-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    min-height: 300px;
    height: auto;
}

.section-header .up-arrow {
    margin-bottom: 0;
}

.section-header h1 {
    margin: 0;
}

.section-header .expand-button {
    margin-bottom: 0;
}

.expand-button {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 60px;
    height: 60px;
    background: var(--color-white);
    border-radius: 50%;
    color: var(--color-black);
    font-size: 2rem;
    transition: transform 0.3s ease;
    position: relative;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.expand-button::before {
    content: "\002B";
    position: absolute;
    font-family: "Oswald", Arial, sans-serif;
    transition: content 0s;
    font-weight: 400;
}

.expand-button:hover {
    transform: scale(1.1);
    background: #65b6a2;
    color: #ffffff;
}

.expand-button:focus {
    outline: 2px solid var(--color-black);
    outline-offset: 2px;
}

#expand-toggle,
#portfolio-toggle,
#contact-toggle,
#impressum-toggle {
    opacity: 0;
    position: absolute;
    width: 0;
    height: 0;
    pointer-events: none;
}

#expand-toggle:checked ~ .expand-button::before,
#portfolio-toggle:checked ~ .expand-button::before,
#contact-toggle:checked ~ .expand-button::before,
#impressum-toggle:checked ~ .expand-button::before {
    content: "\2212";
    transition-delay: 0.2s;
}

#expand-toggle:not(:checked) ~ .expand-button::before,
#portfolio-toggle:not(:checked) ~ .expand-button::before,
#contact-toggle:not(:checked) ~ .expand-button::before,
#impressum-toggle:not(:checked) ~ .expand-button::before {
    content: "\002B";
    transition-delay: 0.3s;
}

.expand-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    background-color: #101010;
    margin-top: 2rem;
    padding: 0;
    position: relative;
    z-index: 10;
    overflow-y: auto; /* Ermöglicht Scrollen innerhalb der Sektion */
}

#expand-toggle:checked ~ .expand-content,
#portfolio-toggle:checked ~ .expand-content,
#contact-toggle:checked ~ .expand-content,
#impressum-toggle:checked ~ .expand-content {
    max-height: 10000px;
    padding: 3rem;
    overflow: visible;
}

#expand-toggle:not(:checked) ~ .expand-content,
#portfolio-toggle:not(:checked) ~ .expand-content,
#contact-toggle:not(:checked) ~ .expand-content,
#impressum-toggle:not(:checked) ~ .expand-content {
    max-height: 0;
    padding: 0;
    overflow-y: hidden;
}

/* Impressum */
#impressum {
    background-position: top center;
    background-size: 100%;
    background-repeat: no-repeat;
}

#impressum .expand-content {
    background-color: #101010;
    border: none;
    margin-top: 2rem;
    color: var(--color-white);
    border-radius: 10px;
    box-shadow: 0 4px 15px var(--color-shadow);
}

#impressum .impressum-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    box-sizing: border-box;
}

#impressum .impressum-item {
    display: flex;
    flex-direction: column;
    justify-content: start;
    align-items: flex-start;
    text-align: left;
}

#impressum .impressum-item h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--color-white);
    position: relative;
    padding-bottom: 0.5rem;
}

#impressum .impressum-item h3::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background-color: var(--color-gray-light);
}

#impressum .impressum-item p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

#impressum .impressum-item a {
    color: var(--color-gray-light);
    text-decoration: none;
    transition: color 0.3s ease;
}

#impressum .impressum-item a:hover {
    color: #f6af54;
}

/* About Section */
#second {
    z-index: 2;
    background-position: center top;
    background-size: 100%;
    background-repeat: no-repeat;
}

#second .expand-content:checked {
    overflow: visible; /* Nur im erweiterten Zustand visible */
}

.about-container {
    display: flex;
    flex-direction: row;
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
    gap: 2rem;
    box-sizing: border-box;
    min-height: 1000px; /* Sicherstellen, dass genug Höhe für Scrollen vorhanden ist */
    }

.image-column {
    flex: 1;
    top: 100px;
    align-self:center;
    z-index: 10;
    position:sticky;
}

.image-column .grid-image {
    width: 100%;
    max-width: 600px;
    height: auto;
    margin: 0;
    display: block;
    box-shadow: -1rem 0 3rem #000;
}

.image-column .grid-image img {
    width: 100%;
    max-width: 600px;
    height: 850px;
    object-fit: cover;
    object-position: 48% 100%;
    border-radius: 10px;
    aspect-ratio: 3 / 4;
    transition: width 0.3s ease-in-out; /* Flüssiger Übergang für Breitenänderung */
    position:sticky;
}

.text-column {
    flex: 1.5;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.text-column .grid-text-container {
    text-align: left;
}

.text-column .grid-text-container h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--color-white);
    position: relative;
    padding-bottom: 0.5rem;
}

.text-column .grid-text-container h3::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background: var(--color-gray-light);
}

.text-column .grid-text-container p,
.text-column .grid-text-container ul li {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--color-white);
}

.text-column .grid-text-container ul {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.text-column .grid-text-container ul li {
    list-style-type: disc;
    margin-bottom: 0.5rem;
}

.intro-text {
    color: white;
    font-size: 28pt;
    text-align: left;
    margin: 1rem 0;
    font-weight: 800;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

#intro-text-grün {
    color: #917fba;
}

/* Skills Container */
.skills-container {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    gap: 0;
    max-width: 100%;
    margin: 1rem 0;
    position: relative;
}

.skill-card {
    width: 110px;
    height: 180px;
    background: #17141d;
    box-shadow: -1rem 0 3rem #000;
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
    overflow: hidden;
    position: relative;
    margin-right: -40px;
    z-index: 1;
    transition: width 0.3s ease, transform 0.3s ease, z-index 0s, box-shadow 0.3s ease, background 0.3s ease;
    cursor: none;
}

.skill-icon {
    width: 50px;
    height: 50px;
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    opacity: 1;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.skill-card:hover .skill-icon,
.skill-card.active .skill-icon,
.skill-card:active .skill-icon {
    opacity: 0;
}

.skill-card:hover,
.skill-card.active,
.skill-card:active {
    width: 200px;
    background: var(--color-gray-dark);
    transform: translateX(20px);
    z-index: 10;
    margin-right: 0;
    box-shadow: 0 8px 20px var(--color-shadow-dark);
}

.skill-card h4 {
    color: var(--color-white);
    font-size: 1.2rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    font-weight: 500;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.skill-card:hover h4,
.skill-card.active h4,
.skill-card:active h4 {
    opacity: 1;
}

.progress-circle {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.skill-card:hover .progress-circle,
.skill-card.active .progress-circle,
.skill-card:active .progress-circle {
    opacity: 1;
}

.progress-circle svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.progress-circle .progress-bg {
    fill: none;
    stroke: var(--color-gray-light);
    stroke-width: 6;
}

.progress-circle .progress-bar {
    fill: none;
    stroke: rgb(162, 0, 255);
    stroke-width: 6;
    stroke-linecap: round;
    stroke-dasharray: 283;
    stroke-dashoffset: 283;
    transition: stroke-dashoffset 1s ease;
}

.progress-circle .progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--color-white);
    font-size: 0.9rem;
    font-weight: 500;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.skill-card:hover .progress-circle .progress-text,
.skill-card.active .progress-circle .progress-text,
.skill-card:active .progress-circle .progress-text {
    opacity: 1;
}

.skill-card[data-progress="65"] .progress-bar {
    stroke-dashoffset: calc(283 - (283 * 65 / 100));
}

.skill-card[data-progress="90"] .progress-bar {
    stroke-dashoffset: calc(283 - (283 * 90 / 100));
}

.skill-card[data-progress="70"] .progress-bar {
    stroke-dashoffset: calc(283 - (283 * 70 / 100));
}

.skill-card[data-progress="50"] .progress-bar {
    stroke-dashoffset: calc(283 - (283 * 50 / 100));
}

.skill-card[data-progress="80"] .progress-bar {
    stroke-dashoffset: calc(283 - (283 * 75 / 100));
}

/* Portfolio Section */
#third {
    background-color: #000000;
    z-index: 3;
    height: auto;
    min-height: unset;

}

.portfolio-gallery {
    display: grid;
    grid-template-columns: minmax(250px, 1fr);
    gap: 1rem;
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
    box-sizing: border-box;
}

@media (min-width: 1024px) {
    .portfolio-gallery {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: auto auto auto auto auto auto; /* Sechs Reihen */
        gap: 0.5rem;
        align-items: start;
        justify-content: center;
    }

    .portfolio-item:nth-child(1) {
        grid-column: 1 / 2;
        grid-row: 1 / 2;
        height: 400px;
    }

    .portfolio-item:nth-child(2) {
        grid-column: 2 / 3;
        grid-row: 1 / 2;
        height: 400px;
    }

    .portfolio-item:nth-child(3) {
        grid-column: 3 / 4;
        grid-row: 1 / 2;
        height: 400px;
    }

    .portfolio-item:nth-child(4) {
        grid-column: 1 / 3;
        grid-row: 2 / 3;
        height: 500px;
    }

    .portfolio-item:nth-child(5) {
        grid-column: 3 / 4;
        grid-row: 2 / 3;
        height: 500px;
    }

    .portfolio-item:nth-child(6) {
        grid-column: 1 / 2;
        grid-row: 3 / 4;
        height: 450px;
    }

    .portfolio-item:nth-child(7) {
        grid-column: 2 / 4;
        grid-row: 3 / 4;
        height: 450px;
    }

    .portfolio-item:nth-child(8) {
        grid-column: 1 / 2;
        grid-row: 4 / 5;
        height: 400px;
    }

    .portfolio-item:nth-child(9) {
        grid-column: 2 / 3;
        grid-row: 4 / 5;
        height: 400px;
    }

    .portfolio-item:nth-child(10) {
        grid-column: 3 / 4;
        grid-row: 4 / 5;
        height: 400px;
    }

    .portfolio-item:nth-child(11) {
        grid-column: 1 / 3;
        grid-row: 5 / 6;
        height: 400px;
    }

    .portfolio-item:nth-child(12) {
        grid-column: 3 / 4;
        grid-row: 5 / 6;
        height: 400px;
    }

    .portfolio-item:nth-child(13) {
        grid-column: 3 / 4;
        grid-row: 6 / 7;
        height: 400px;
    }
}

.portfolio-item {
    position: relative;
    overflow: hidden;
    border-radius: 5px;
    box-shadow: 0 4px 15px var(--color-shadow);
}

.portfolio-item:focus {
    outline: 2px solid var(--color-black);
    outline-offset: 2px;
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 3 / 2;
    filter: grayscale(100%);
    transition: filter 0.3s ease, transform 0.3s ease-in-out;
    display: block;
    transform: scale(1);
}

.portfolio-item:hover img {
    filter: grayscale(0);
    transform: scale(1.05);
}

/* Image Overlay */
.image-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 4000;
    overflow-x: hidden;
    overflow-y: auto;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-overlay.active {
    display: flex;
    opacity: 1;
}

.image-overlay img.loading {
    opacity: 0.5; /* Reduzierte Opazität während des Ladens */
  }

.image-overlay .overlay-content {
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    max-width: 95vw;
    max-height: 95vh;
    padding: 40px;
    gap: 2rem;
    width: 100%;
    box-sizing: border-box;
}

.image-overlay .image-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 800px;
    flex-shrink: 0;
    max-width: 100%;
    filter: blur(0.2);
}

.image-overlay img {
    width: 800px;
    height: 600px;
    object-fit: contain;
    border: none;
    pointer-events: auto;
    display: block;
    opacity: 1;
    transition: opacity 0.3s ease; /* Sanfter Übergang für Opazität */
}

.image-overlay .text-container {
    width: 450px;
    max-width: 100%; /* Verhindert Überlaufen */
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow-wrap: break-word !important; /* Erlaubt Textumbruch */
    word-break: break-word !important; /* Fallback */
    white-space: normal !important; /* Erzwingt normalen Umbruch */
    z-index: 4100;
}

.image-overlay .text-container h4 {
    font-size: 1.5rem;
    color: var(--color-white);
    margin-bottom: 1rem;
    text-transform: uppercase;
    font-weight: 600;
    overflow-wrap: break-word !important; /* Erlaubt Textumbruch */
    word-break: break-word !important; /* Fallback */
    white-space: normal !important; /* Erzwingt normalen Umbruch */
    width: 100%; /* Nutzt die volle Breite des Containers */
}

.image-overlay .text-container p {
    font-size: 1rem;
    color: var(--color-white);
    margin-bottom: 0;
    font-weight: normal;
    overflow-wrap: break-word !important; /* Erlaubt Textumbruch */
    word-break: break-word !important; /* Fallback */
    white-space: normal !important; /* Erzwingt normalen Umbruch */
    width: 100%; /* Nutzt die volle Breite des Containers */
}

.image-overlay .overlay-close-button {
    position: fixed;
    top: 1rem;
    right: 1rem;
    width: 32px;
    height: 32px;
    line-height: 32px;
    text-align: center;
    font-size: 1.5rem;
    color: var(--color-white);
    cursor: none;
    z-index: 4200;
    transition: transform 0.3s ease, color 0.3s ease;
}

.image-overlay .overlay-close-button:hover {
    transform: rotate(90deg);
    color: #917fba;
}

.img-magnifier-glass {
    position: absolute;
    border: 4px solid var(--color-black);
    border-radius: 50%;
    width: 120px;
    height: 120px;
    z-index: 4500;
    pointer-events: none;
    background-color: rgba(255, 255, 255, 0.5);
    display: none;
}

.pagination-wrapper {
    position: absolute;
    left: -80px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 4100;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    background: transparent;
    padding: 10px 0;
    min-width: 60px;
}

.pagination-container {
    display: flex;
    flex-direction: column;
    gap: 40px;
    position: relative;
}

.little-dot {
    width: 8px;
    height: 8px;
    background: #ffffff;
    border-radius: 100%;
    position: relative;
    z-index: 10;
    transition: background 0.3s ease;
}

.little-dot:hover {
    background: #999;
}

.little-dot--first-child,
.little-dot--last-child {
    z-index: 5;
}

.big-dot-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
}

.big-dot {
    width: 14px;
    height: 14px;
    border-radius: 100%;
    background: #917fba;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    transition: top 0.5s ease, background 0.3s ease;
}

.big-dot:hover {
    background: #917fba;
}

.transition-prev .big-dot {
    top: -20px;
}

.transition-next .big-dot {
    top: 20px;
}

.btn {
    cursor: none;
    transition: transform 0.3s ease;
    width: 30px;
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: transparent;
    border: none;
    border-radius: 0;
    font-weight: normal;
    margin: 0 auto;
    padding: 0;
}

.btn svg {
    width: 30px;
    height: 30px;
    background: transparent;
    display: block;
}

.btn .arrow-icon {
    fill: var(--color-white);
    stroke: none;
}

.image-overlay .btn--prev svg polygon,
.image-overlay .btn--next svg polygon {
    fill: var(--color-white) !important;
}

.btn svg * {
    background: transparent !important;
}

.btn--next svg {
    transform: rotate(180deg);
}

.btn--prev:hover,
.btn--next:hover {
    transform: translateY(0);
}

.btn--prev:hover {
    transform: translateY(-10px);
}

.btn--next:hover {
    transform: translateY(5px);
}

.btn--next,
.btn-static {
    position: static;
}

/* Swiper-spezifische Stile für das Overlay */
.swiper-container.portfolio-swiper {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: none; /* Versteckt standardmäßig, wird in JS für mobile Geräte aktiviert */
}

.swiper-slide {
    display: flex;
    justify-content: center;
    align-items: center;
}

.swiper-slide img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

.image-overlay .pagination-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 1rem;
}

.image-overlay .btn {
    cursor: pointer;
    padding: 0.5rem;
}

.image-overlay .swiper-button-prev,
.image-overlay .swiper-button-next {
    position: static;
    width: 30px;
    height: 30px;
    margin: 0 10px;
}

.image-overlay .swiper-button-prev::after,
.image-overlay .swiper-button-next::after {
    content: none; /* Entfernt Swiper-Standardpfeile, da wir eigene SVGs verwenden */
}

.image-overlay .swiper-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
}

.image-overlay .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: #fff;
    opacity: 0.5;
    margin: 0 5px;
}

.image-overlay .swiper-pagination-bullet-active {
    opacity: 1;
    background: #65b6a2;
}

/* Störer für die Smartphone-Version */
.swipe-hint {
    display: none; /* Standardmäßig ausgeblendet für Desktop */
    position: absolute;
    top: 45%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.7);
    color: var(--color-white);
    padding: 1rem;
    border-radius: 50%;
    width: 180px;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 0.9rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 1100;
}

.swipe-hint.visible {
    opacity: 1;
    visibility: visible;
}

.swipe-hint p {
    margin: 0;
    line-height: 1.4;
}

/* skills mp4 swiper  */
#myskills {
    width: 100%;
    height: 100px;
    min-height: 800px; /* Fixed height for the section */
    background-color: #000000; /* Matches other sections */
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative; /* Relative positioning to avoid stacking issues */
    z-index: 4; /* Maintains stacking order above other sections */
    overflow: hidden; /* Prevents overflow issues */
    padding: 0; /* Entfernt jeglichen Innenabstand */
    margin: 0; /* Entfernt jeglichen Außenabstand */
}

#skills-video {
    width: 100%;
    height: 100px; /* Fixed height as requested */
    object-fit: contain; /* Ensures video fills the container without distortion */
    display: block; /* Ensures the video is displayed */
    z-index: 1; /* Places video within the section's stacking context */
}

/* Contact Section */
#contact {
    background-color: #000000;
    z-index: 5;
    background-position: center top;
}

.contact-info {
    max-width: 600px;
    margin: 2rem auto;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px var(--color-shadow);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.contact-email {
    margin: 2rem 0 1rem 0;
}

.contact-email a {
    color: var(--color-gray-light);
    font-size: 3.5rem;
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-email a:hover {
    color: #917fba;
}

.contact-icons {
    display: flex;
    gap: 2rem;
}

.contact-icons a {
    color: var(--color-white);
    font-size: 3rem;
    transition: color 0.3s ease, transform 0.3s ease;
}

.contact-icons a:hover {
    color: #917fba;
    transform: scale(1.2);
}

/* Responsive Anpassungen für Tablets und Smartphones */
@media (max-width: 1024px) {
    .custom-cursor {
        display: none;
    }

    body,
    nav > ul > li,
    nav > ul > li > a,
    .scroll-arrow,
    .back-to-top,
    .expand-button,
    input[type="checkbox"],
    .enter-button,
    .portfolio-item {
        cursor: default;
    }

    nav {
        justify-content: space-between;
        padding: 0;
    }

    #myskills {
        height: 90px; /* Reduzierte Höhe für Tablets */
        min-height: 90px; /* Überschreibt min-height */
    }

    #skills-video {
        height: 90px;
        max-width: 90%; /* Begrenzt die Breite */
        margin: 0 auto;
    }

    .logo-container {
        top: 1rem;
        left: 1rem;
        width: 80px;
        height: 80px;
    }

    .hamburger {
        display: flex;
        position: absolute;
        top: 3rem;
        right: 2rem;
        width: 24px;
        height: 16px;
        align-items: center;
    }

    .hamburger span {
        height: 2px;
    }

    .nav-menu {
        display: none;
        flex-direction: column;
        position: fixed;
        top: 0;
        right: 0;
        height: 100vh;
        width: 100%;
        background: rgba(16, 16, 16, 0.804);
        padding-top: 10rem;
        z-index: 10000;
        justify-content: flex-start;
        align-items: flex-start;
        gap: 2rem;
    }

    .nav-menu.active {
        display: flex;
    }

    nav > ul > li {
        width: 100%;
        height: auto;
        border-radius: 10px;
        margin-bottom: 1rem;
        box-shadow: none;
        background: none;
    }

    nav > ul > li:hover {
        width: 100%;
        border-radius: 10px;
        transform: none;
        background: none;
    }

    nav > ul > li::before,
    nav > ul > li::after {
        display: none;
    }

    nav > ul > li .title {
        transform: scale(1);
        opacity: 1;
        color: var(--color-white);
        font-size: 1.5rem;
        transition: none;
    }

    nav > ul > li .nav-icon {
        display: none;
    }

    .intro-container h1 {
        font-size: 2rem;
    }

    .about-container {
        flex-direction: column;
        align-items: center;
    }

    .image-column {
        display: flex;
        justify-content: center; /* Zentriert das Bild horizontal */
        width: 100%;
        max-width: 400px;
        margin: 0 auto; /* Sicherstellt, dass kein seitlicher Versatz entsteht */
    }
    .image-column .grid-image {
        max-width: 300px;
        box-shadow: none; /* Entfernt den Links-versetzten Box-Schatten, der die Zentrierung stören könnte */
    }
    .image-column .grid-image img {
        width: 100%;
        max-width: 300px;
        height: auto; /* Behält das Seitenverhältnis */
        object-fit: cover;
        border-radius: 10px;
        aspect-ratio: 3 / 4;
    }

    .text-column {
        max-width: 100%;
    }

    .expand-content {
        background-color: #000000;
    }

    .skills-container {
        display: flex;
        flex-wrap: nowrap;
        justify-content: flex-start;
        gap: 0;
        max-width: 100%;
        margin: 1rem 0;
        padding: 0 0.5rem;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .skills-container::-webkit-scrollbar {
        display: none;
    }

    .skill-card {
        width: 90px;
        height: 120px;
        background: #17141d;
        box-shadow: -0.5rem 0 1.5rem #000;
        border-radius: 8px;
        padding: 1rem;
        text-align: center;
        overflow: hidden;
        position: relative;
        margin-right: -20px;
        z-index: 1;
        transition: width 0.3s ease, transform 0.3s ease, z-index 0s, box-shadow 0.3s ease, background 0.3s ease, scale 0.3s ease;
        scroll-snap-align: center;
        cursor: default;
    }

    .skill-card:active,
    .skill-card.active {
        transform: translateX(10px) scale(1.1);
        background: var(--color-gray-dark);
        width: 130px;
        margin-right: 0;
        z-index: 10;
        box-shadow: 0 4px 10px var(--color-shadow-dark);
    }

    .skill-icon {
        width: 30px;
        height: 30px;
        top: 50%;
        transform: translate(-50%, -50%);
        opacity: 1;
    }

    .skill-card h4 {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
        opacity: 0;
    }

    .skill-card:active h4,
    .skill-card.active h4 {
        opacity: 1;
    }

    .progress-circle {
        width: 50px;
        height: 50px;
        margin: 0 auto;
        opacity: 0;
    }

    .skill-card:active .progress-circle,
    .skill-card.active .progress-circle {
        opacity: 1;
    }

    .progress-circle svg {
        width: 100%;
        height: 100%;
        transform: rotate(-90deg);
    }

    .progress-circle .progress-bg {
        stroke-width: 4;
    }

    .progress-circle .progress-bar {
        stroke-width: 4;
        stroke-dasharray: 157;
        stroke-dashoffset: 157;
    }

    .progress-circle .progress-text {
        font-size: 0.7rem;
    }

    .skill-card[data-progress="65"] .progress-bar {
        stroke-dashoffset: calc(157 - (157 * 65 / 100));
    }

    .skill-card[data-progress="90"] .progress-bar {
        stroke-dashoffset: calc(157 - (157 * 90 / 100));
    }

    .skill-card[data-progress="70"] .progress-bar {
        stroke-dashoffset: calc(157 - (157 * 70 / 100));
    }

    .skill-card[data-progress="50"] .progress-bar {
        stroke-dashoffset: calc(157 - (157 * 50 / 100));
    }

    .portfolio-gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .portfolio-item {
        height: auto !important;
    }

    .portfolio-item img {
        aspect-ratio: 2 / 3;
    }

    .image-overlay .overlay-content {
        flex-direction: column; /* Bild und Text untereinander */
        align-items: center;
        padding: 20px; /* Reduzierter Padding für Mobile */
    }

    .image-overlay .image-container {
        width: 100%; /* Volle Breite für Bilder/Swiper */
        max-width: 100%;
    }

    .image-overlay img {
        width: 100%;
        height: auto; /* Erhält das Seitenverhältnis */
    }

    .image-overlay .text-container {
        width: 100%; /* Volle Breite für Text */
        max-width: 100%;
        text-align: left; /* Links ausgerichtet */
        overflow-wrap: break-word !important; /* Erlaubt Textumbruch */
        word-break: break-word !important; /* Fallback */
        white-space: normal !important; /* Erzwingt normalen Umbruch */
    }

    .image-overlay .text-container h4,
    .image-overlay .text-container p {
        width: 100%;
        overflow-wrap: break-word !important; /* Erlaubt Textumbruch */
        word-break: break-word !important; /* Fallback */
        white-space: normal !important; /* Erzwingt normalen Umbruch */
    }

    .image-overlay .pagination-wrapper {
        display: none; /* Pagination in mobiler Ansicht ausblenden */
    }

    .swiper-container.portfolio-swiper {
        display: block; /* Swiper für mobile Geräte aktivieren */
    }

    .swipe-hint {
        display: flex; /* Störer für mobile Geräte aktivieren */
    }

    .contact-email a {
        font-size: 2rem;
    }

    .contact-icons a {
        font-size: 2rem;
    }

    h1 {
        font-size: 3rem;
    }

    #home h1.rotatingText {
        font-size: 2rem;
        min-height: 6rem;
    }

    #home h1.rotatingText .rotatingText-word {
        width: 100%;
        max-width: 400px;
        height: 6rem;
    }

    #home h1.rotatingText img {
        width: 100%;
        max-width: 400px;
        height: 6rem;
    }

    h2 {
        font-size: 2rem;
    }

    .intro-text {
        font-size: 20pt;
    }

    .slidingVertical span {
        font-size: 20pt;
    }

    #home .ticker-container {
        max-width: 400px;
        margin: 1rem auto;
        height: 1.5rem;
        visibility: visible;
    }

    #home .ticker-container.ticker-loaded {
        visibility: visible;
    }

    #home .ticker {
        display: inline-flex;
        white-space: nowrap;
    }

    #home .ticker-content {
        display: inline-flex;
        white-space: nowrap;
        opacity: 1;
        transition: opacity 0.5s ease;
    }

    #home .ticker-container.ticker-loaded .ticker-content {
        opacity: 1;
    }

    #home .ticker-word {
        font-size: 0.9rem;
        margin-right: 0.5rem;
    }

    #home img[alt="Maximilian Baliga Unterschrift"] {
        width: 100%;
        max-width: 80px;
        margin-bottom: 0.2rem;
    }

    #home, #second, #third, #impressum {
        background-image: none;
    }

    /* Swiper-spezifische Stile für das Overlay */
    .swiper-container.portfolio-swiper {
        width: 100%;
        max-width: 100%;
        height: auto;
        display: block; /* Aktiviert für mobile Geräte */
    }

    .swiper-slide {
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .swiper-slide img {
        max-width: 100%;
        height: auto;
        object-fit: contain;
    }

    .image-overlay .swiper-pagination {
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .image-overlay .swiper-pagination-bullet {
        width: 10px;
        height: 10px;
        background: #fff;
        opacity: 0.5;
        margin: 0 5px;
    }

    .image-overlay .swiper-pagination-bullet-active {
        opacity: 1;
        background: #65b6a2;
    }

    /* Störer für die Smartphone-Version */
    .swipe-hint {
        position: absolute;
        top: 40%;
        left: 50%;
        transform: translate(-50%, -50%);
        background: rgba(0, 0, 0, 0.7);
        color: var(--color-white);
        padding: 1rem;
        border-radius: 50%;
        width: 180px;
        height: 180px;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        font-size: 0.9rem;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
        z-index: 1100;
    }

    .swipe-hint.visible {
        opacity: 1;
        visibility: visible;
    }

    .swipe-hint p {
        margin: 0;
        line-height: 1.4;
    }
}

/* Responsive Anpassungen für Smartphones */
@media (max-width: 768px) {
    .intro-container h1 {
        font-size: 1.8rem;
    }

    .enter-button {
        padding: 0.5rem 1rem;
        font-size: 1rem;
    }

    .section-header {
        height: auto;
        gap: 1rem;
    }
    
    #myskills {
        height: 90px; /* Deutlich reduzierte Höhe für Smartphones */
        min-height: 600px; /* Überschreibt min-height */
        padding: 0 5px; /* Minimaler Innenabstand für bessere Darstellung */
    }

    #skills-video {
        height: 90px; /* Entspricht der Sektionshöhe */
        max-width: 100%; /* Nutzt die volle Breite, bleibt proportional */
        object-fit: contain;
        margin: 0 auto;
    }

    .about-container {
        padding: 0 1.5rem;
        margin: 0 1rem;
        box-sizing: border-box;
    }

    .image-column .grid-image {
        max-width: 300px;
    }

    .image-column .grid-image img {
        width: 100%;
        max-width: 450px;
        height: 100%;
        object-fit: cover;
        border-radius: 10px;
        aspect-ratio: 3 / 4;
        align-items: center;
    }

    .text-column .grid-text-container h3 {
        font-size: 1.5rem;
    }

    .text-column .grid-text-container p,
    .text-column .grid-text-container ul li {
        font-size: 1rem;
    }

    .skills-container {
        display: flex;
        flex-wrap: nowrap;
        justify-content: flex-start;
        gap: 0;
        max-width: 100%;
        height: 220px;
        margin: 1rem 0;
        padding: 0 0.5rem;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        background-color: transparent;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .skills-container::-webkit-scrollbar {
        display: none;
    }

    .skill-card {
        width: 48px;
        height: 130px;
        background: #17141d;
        box-shadow: -0.5rem 0 1.5rem #000;
        border-radius: 8px;
        padding: 1rem;
        text-align: center;
        overflow: hidden;
        position: relative;
        margin-top: 1rem;
        margin-right: -25px;
        z-index: 1;
        transition: width 0.3s ease, transform 0.3s ease, z-index 0s, box-shadow 0.3s ease, background 0.3s ease, scale 0.3s ease;
        scroll-snap-align: center;
        cursor: default;
    }

    .skill-card:active,
    .skill-card.active {
        transform: translateX(10px) scale(1.05);
        background: var(--color-gray-dark);
        width: 140px;
        margin-right: 0;
        z-index: 10;
        box-shadow: 0 4px 10px var(--color-shadow-dark);
    }

    .skill-icon {
        width: 30px;
        height: 30px;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        opacity: 1;
        transition: opacity 0.3s ease, top 0.3s ease;
    }

    .skill-card:active .skill-icon,
    .skill-card.active .skill-icon {
        opacity: 0;
        top: 10%;
    }

    .skill-card h4 {
        font-size: 0.9rem;
        margin-top: 1rem;
        margin-bottom: 0.5rem;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .skill-card:active h4,
    .skill-card.active h4 {
        opacity: 1;
    }

    .progress-circle {
        position: relative;
        width: 30px;
        height: 30px;
        margin: 0.5rem auto;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .skill-card:active .progress-circle,
    .skill-card.active .progress-circle {
        opacity: 1;
    }

    .progress-circle svg {
        display: none; /* Verbirgt den Fortschrittskreis (Hintergrund und Balken) */
    }

    .progress-circle .progress-text {
        position: absolute;
        top: 80%;
        left: 50%;
        transform: translate(-50%, -50%);
        color: var(--color-white);
        font-size: 0.6rem;
        font-weight: 500;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .skill-card:active .progress-circle .progress-text,
    .skill-card.active .progress-circle .progress-text {
        opacity: 1;
    }

    .portfolio-gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .portfolio-item img {
        aspect-ratio: 2 / 3;
    }

    .impressum-grid {
        grid-template-columns: 1fr;
    }

    h1 {
        font-size: 2.5rem;
    }

    #home h1.rotatingText {
        font-size: 1.5rem;
        min-height: 4rem;
    }

    #home h1.rotatingText .rotatingText-word {
        max-width: 300px;
        height: 4rem;
    }

    #home h1.rotatingText img {
        max-width: 300px;
        height: 4rem;
    }

    h2 {
        font-size: 1.8rem;
    }

    .intro-text {
        font-size: 18pt;
    }

    .slidingVertical span {
        font-size: 18pt;
    }

    #home .ticker-container {
        max-width: 300px;
        margin: 0.5rem auto;
        height: 1.4rem;
        visibility: visible;
    }

    #home .ticker-container.ticker-loaded {
        visibility: visible;
    }

    #home .ticker-word {
        font-size: 0.8rem;
        margin-right: 0.3rem;
    }

    #home img[alt="Maximilian Baliga Unterschrift"] {
        width: 100%;
        max-width: 60px;
        margin-bottom: 0.1rem;
    }

    #home, #second, #third, #impressum {
        background-image: none;
    }
}