/* ===== RESET & BASICS ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    height: 100%;
}

body {
    font-family: 'JetBrains Mono', monospace;
    color: #f0f0f0;
    line-height: 1.5;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    background: #0a1522; /* Fallback */
}

/* Grain-Texture */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.04'/%3E%3C/svg%3E");
    z-index: -1;
    pointer-events: none;
    opacity: 0.6;
    mix-blend-mode: overlay;
}

/* Für Unterseiten: Scrollen erlauben */
body.subpage {
    overflow: auto;
    height: auto;
    min-height: 100vh;
}

/* VERBESSERUNG 2: Container mit viewport-basierten Größen */
.container {
    max-width: min(1600px, 95vw);
    margin: 0 auto;
    padding: 0 clamp(1rem, 3vw, 2rem);
    width: 100%;
}

/* ===== HEADER ===== */
.header {
    padding: clamp(1.5rem, 3vh, 2rem) 0 clamp(1.25rem, 2.5vh, 1.5rem);
    flex-shrink: 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'JetBrains Mono', monospace;
    font-size: clamp(1.2rem, 2.5vw, 1.5rem);
    font-weight: 700;
    color: #f0f0f0;
    text-decoration: none;
    letter-spacing: -0.02em;
    transition: opacity 0.2s ease;
}

.logo:hover {
    opacity: 0.8;
}

/* Social Icons */
.social-icons {
    display: flex;
    gap: clamp(1rem, 2vw, 1.5rem);
    align-items: center;
}

.social-icon {
    color: #90be6d;
    font-size: clamp(1.1rem, 2vw, 1.3rem);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
}

.social-icon:hover {
    color: #f9c74f;
    transform: translateY(-2px);
}

/* VERBESSERUNG 3: E-Mail Icon Styling */
.email-icon {
    position: relative;
}

.email-icon:active {
    transform: translateY(0) scale(0.95);
}

/* Toast Notification für E-Mail Copy */
.email-toast {
    position: fixed;
    top: 0px;
    right: 30px;
    background: rgba(144, 190, 109, 0.95);
    color: #0a1522;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.33, 1, 0.68, 1);
    z-index: 1000;
    pointer-events: none;
}

.email-toast.show {
    transform: translateX(0);
    opacity: 1;
}

.email-toast i {
    font-size: 1.2rem;
}

/* ===== MAIN CONTENT ===== */
.main-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(0.5rem, 2vh, 1rem) 0;
    overflow: hidden;
}

/* Für Unterseiten: Main-Content scrollbar */
.subpage .main-content {
    overflow: visible;
    padding: 2rem 0;
}

.project-showcase {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* VERBESSERUNG 2: Projekt-Panel mit viewport-basierten Größen */
.project-panel {
    padding: clamp(2rem, 5vh, 4rem) clamp(1.5rem, 4vw, 3.5rem);
    width: 100%;
    max-height: min(700px, 80vh);
    min-height: min(700px, 80vh);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: -1rem;
    margin-bottom: 1.5rem;
    background: rgba(79, 86, 94, 0.342);
    border-radius: 8px;
    backdrop-filter: blur(5.1px);
    -webkit-backdrop-filter: blur(5.1px);
    border: 0.5px solid rgba(255, 255, 255, 0.3);
}

.project-panel::after {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    opacity: 0.45;
    background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAMAAAAp4XiDAAAAUVBMVEWFhYWDg4N3d3dtbW17e3t1dXWBgYGHh4d5eXlzc3OLi4ubm5uVlZWPj4+NjY19fX2JiYl/f39ra2uRkZGZmZlpaWmXl5dvb29xcXGTk5NnZ2c8TV1mAAAAG3RSTlNAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAvEOwtAAAFVklEQVR4XpWWB67c2BUFb3g557T/hRo9/WUMZHlgr4Bg8Z4qQgQJlHI4A8SzFVrapvmTF9O7dmYRFZ60YiBhJRCgh1FYhiLAmdvX0CzTOpNE77ME0Zty/nWWzchDtiqrmQDeuv3powQ5ta2eN0FY0InkqDD73lT9c9lEzwUNqgFHs9VQce3TVClFCQrSTfOiYkVJQBmpbq2L6iZavPnAPcoU0dSw0SUTqz/GtrGuXfbyyBniKykOWQWGqwwMA7QiYAxi+IlPdqo+hYHnUt5ZPfnsHJyNiDtnpJyayNBkF6cWoYGAMY92U2hXHF/C1M8uP/ZtYdiuj26UdAdQQSXQErwSOMzt/XWRWAz5GuSBIkwG1H3FabJ2OsUOUhGC6tK4EMtJO0ttC6IBD3kM0ve0tJwMdSfjZo+EEISaeTr9P3wYrGjXqyC1krcKdhMpxEnt5JetoulscpyzhXN5FRpuPHvbeQaKxFAEB6EN+cYN6xD7RYGpXpNndMmZgM5Dcs3YSNFDHUo2LGfZuukSWyUYirJAdYbF3MfqEKmjM+I2EfhA94iG3L7uKrR+GdWD73ydlIB+6hgref1QTlmgmbM3/LeX5GI1Ux1RWpgxpLuZ2+I+IjzZ8wqE4nilvQdkUdfhzI5QDWy+kw5Wgg2pGpeEVeCCA7b85BO3F9DzxB3cdqvBzWcmzbyMiqhzuYqtHRVG2y4x+KOlnyqla8AoWWpuBoYRxzXrfKuILl6SfiWCbjxoZJUaCBj1C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U5ErkJggg==);
}

/* Navigation Arrows */
.nav-arrow {
    background: transparent;
    border: none;
    color: #f0f0f0;
    font-size: clamp(1.6rem, 3vw, 2rem);
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
}

.nav-arrow:hover {
    color: #f9c74f;
    opacity: 1;
    transform: translateY(-50%) scale(1.2);
}

.nav-arrow-left {
    left: clamp(1rem, 4vw, 3.5rem);
}

.nav-arrow-right {
    right: clamp(1rem, 4vw, 3.5rem);
}

/* Projekt-Content */
.project-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: clamp(2rem, 6vw, 5rem);
    width: 100%;
    max-width: min(1400px, 90vw);
    height: 100%;
    position: relative;
    z-index: 2;
    padding: 0 clamp(1rem, 3vw, 2rem);
}

/* Project Info (Linke Spalte) */
.project-info {
    flex: 1;
    max-width: min(580px, 50vw);
    height: 100%;
    display: flex;
    align-items: center;
}

.project-info-inner {
    width: 100%;
    margin-left: 10px;
}

.project-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: clamp(1.7rem, 3.5vw, 2.3rem);
    font-weight: 800;
    line-height: 1.05;
    margin-bottom: 0.75rem;
    color: #f0f0f0;
    letter-spacing: -0.03em;
}

.project-subtitle {
    font-size: clamp(0.8rem, 1.5vw, 0.9rem);
    color: #f9c74f;
    font-weight: 800;
    text-transform: lowercase;
    margin-bottom: 2rem;
    font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji', 'JetBrains Mono', monospace;
}

.project-description {
    font-size: clamp(0.85rem, 1.4vw, 0.9rem);
    line-height: 1.6;
    color: rgba(240, 240, 240, 0.9);
    margin-bottom: 2.5rem;
    font-weight: 400;
}

/* CTA Button */
.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    background: #ffffff;
    color: #000000;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: clamp(0.75rem, 1.3vw, 0.8rem);
    padding: clamp(0.6rem, 1.2vh, 0.7rem) clamp(1.8rem, 3vw, 2.3rem);
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.329);

    position: relative;
    overflow: hidden;
}

.cta-button:hover {
    background: rgb(249, 199, 79);
    transform: translateY(-2px);
    box-shadow: 0px 8px 8px 0px rgba(0, 0, 0, 0.329);
}

.cta-button:active {
    transform: translateY(0);
}

.cta-button::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;

    background: linear-gradient(
        120deg,
        transparent,
        rgba(255, 255, 255, 0.4),
        transparent
    );

    transform: skewX(-20deg);
    transition: left 0.5s;
}

.cta-button:hover::after {
    left: 100%;
    transition: 0.3s ease-in-out;    
}


/* Project Visual (Rechte Spalte) */
.project-visual {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
}

.project-image-container {
    overflow: hidden;
    position: relative;
    width: min(650px, 45vw);
    height: min(650px, 45vw);
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-image {
    max-width: 95%;
    max-height: 95%;
    width: auto;
    height: auto;
    filter: drop-shadow(0px 5px 5px #00000065);
    border-radius: 4px; /* VERBESSERUNG 6: 10px abgerundete Ecken */
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Project Indicators */
.project-indicators {
    display: flex;
    justify-content: center;
    flex-shrink: 0;
}

.indicators-container {
    display: flex;
    gap: 0.75rem;
}

.indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(240, 240, 240, 0.3);
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    padding: 0;
}

.indicator:hover {
    background-color: #f9c74f;
    transform: scale(1.2);
}

.indicator.active {
    background-color: #ffffff;
    transform: scale(1.3);
}

/* ===== FOOTER ===== */
.footer {
    padding: clamp(1.5rem, 3vh, 2rem) 0;
    flex-shrink: 0;
    margin-top: auto;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.copyright {
    color: #90be6d;
    font-size: clamp(0.75rem, 1.2vw, 0.8rem);
    font-weight: 400;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.footer-link {
    color: #43aa8b;
    text-decoration: none;
    font-size: clamp(0.75rem, 1.2vw, 0.8rem);
    font-weight: 500;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: #f9c74f;
}

.separator {
    color: #4d908e;
    font-size: 0.9rem;
}

/* ===== ANIMATION KLASSEN ===== */
.fade-out {
    opacity: 0 !important;
    transform: scale(0.95) !important;
    transition: all 0.4s ease !important;
}

.fade-in {
    opacity: 1 !important;
    transform: scale(1) !important;
    transition: all 0.4s ease !important;
}

.slide-out-left {
    transform: translateX(-30px);
    opacity: 0;
    transition: all 0.4s ease;
}

.slide-out-right {
    transform: translateX(30px);
    opacity: 0;
    transition: all 0.4s ease;
}

.slide-in-left {
    transform: translateX(0);
    opacity: 1;
    animation: slideInLeft 0.4s ease;
}

.slide-in-right {
    transform: translateX(0);
    opacity: 1;
    animation: slideInRight 0.4s ease;
}

@keyframes slideInLeft {
    from {
        transform: translateX(-30px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(30px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ===== UNTERSEITEN STYLING ===== */
.content-panel {
    background: rgba(79, 86, 94, 0.342);
    border-radius: 8px;
    backdrop-filter: blur(5.1px);
    -webkit-backdrop-filter: blur(5.1px);
    border: 0.5px solid rgba(255, 255, 255, 0.3);
    padding: 4rem 3.5rem;
    margin: 2rem 0;
}

.page-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 2.5rem;
    color: #f0f0f0;
    letter-spacing: -0.03em;
}

.content-section {
    margin-bottom: 2.5rem;
}

.content-section:last-child {
    margin-bottom: 0;
}

.content-section h2 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #f0f0f0;
}

.content-section p {
    color: rgba(240, 240, 240, 0.9);
    line-height: 1.7;
    font-size: 0.9rem;
}

.content-section a {
    color: #43aa8b;
    text-decoration: none;
    transition: color 0.3s ease;
    border-bottom: 1px solid transparent;
}

.content-section a:hover {
    color: #f9c74f;
    border-bottom-color: #f9c74f;
}

.content-section ul {
    margin-left: 1.5rem;
    margin-top: 1rem;
}

.content-section li {
    color: rgba(240, 240, 240, 0.9);
    line-height: 1.7;
    margin-bottom: 0.5rem;
}

.back-link {
    color: #43aa8b;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    margin-bottom: 2rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    background: rgba(67, 170, 139, 0.1);
}

.back-link:hover {
    color: #f9c74f;
    background: rgba(249, 199, 79, 0.2);
    transform: translateX(-5px);
}

/* ===== YOUTUBE VIDEO BACKGROUND ===== */
.video-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    overflow: hidden;
}

#youtube-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100vw;
    height: 100vh;
    transform: translate(-50%, -50%);
    pointer-events: none;
    border: none;
}

/* Video vollständig ausfüllen */
@media (min-aspect-ratio: 16/9) {
    #youtube-bg {
        height: 56.25vw;
    }
}

@media (max-aspect-ratio: 16/9) {
    #youtube-bg {
        width: 177.78vh;
    }
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 21, 34, 0.65);
    z-index: 1;
    pointer-events: none;
}

/* ===== RESPONSIVE DESIGN ===== */

/* VERBESSERUNG 4: Mobile Optimierung */
@media (max-width: 992px) {
    /* Scrolling auf Mobile aktivieren */
    body {
        overflow-y: auto;
        overflow-x: hidden;
        height: auto;
        min-height: 100vh;
    }
    
    .main-content {
        overflow: visible;
        min-height: calc(100vh - 200px);
    }
    
    .project-panel {
        min-height: auto;
        max-height: none;
        padding: 3rem 2.25rem;
        margin-bottom: 2.5rem;
    }
    
    .project-content {
        flex-direction: column;
        text-align: center;
        gap: 3rem;
        padding: 0;
    }
    
    .project-info {
        max-width: 100%;
        height: auto;
    }
    
    .project-info-inner {
        max-width: 700px;
        margin: 0 auto;
    }
    
    .project-visual {
        width: 100%;
        max-width: 500px;
        height: auto;
        margin: 0 auto;
    }
    
    .project-image-container {
        width: 100%;
        height: auto;
        aspect-ratio: 1;
        max-width: 500px;
    }
    
    .nav-arrow {
        background: rgba(39, 124, 161, 0);
        border-radius: 8px;
        width: 55px;
        height: 55px;
    }
    
    .nav-arrow-left {
        left: 1.5rem;
    }
    
    .nav-arrow-right {
        right: 1.5rem;
    }
    
    .project-title {
        font-size: 2rem;
    }
    
    .content-panel {
        padding: 3rem;
    }
    
    .page-title {
        font-size: 2.4rem;
    }
}

@media (max-width: 768px) {
    /* VERBESSERUNG 4: Video auch auf Mobile anzeigen (Kommentar entfernt) */
    .video-background {
        display: block; /* Video wird jetzt auch auf Mobile angezeigt */
    }
    
    body::after {
        opacity: 0.4;
    }
    
    .container {
        padding: 0 1.25rem;
    }
    
    .header {
        padding: 1.75rem 0 1.5rem;
    }
    
    .email-toast {
        right: 15px;
        top: 80px;
        font-size: 0.85rem;
        padding: 0.85rem 1.25rem;
    }
    
    .project-panel {
        padding: 2.5rem 2rem;
        margin-bottom: 2rem;
    }
    
    .project-title {
        font-size: 1.9rem;
    }
    
    .project-description {
        font-size: 1.05rem;
    }
    
    .nav-arrow {
        width: 50px;
        height: 50px;
        font-size: 1.8rem;
    }
    
    .nav-arrow-left {
        left: 1.25rem;
    }
    
    .nav-arrow-right {
        right: 1.25rem;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .content-panel {
        padding: 2.5rem 2rem;
    }
    
    .page-title {
        font-size: 2rem;
    }
}

@media (max-width: 576px) {
    .header {
        padding: 1.5rem 0 1.25rem;
    }
    
    .logo {
        font-size: 1.3rem;
    }
    
    .social-icons {
        gap: 1.25rem;
    }
    
    .social-icon {
        font-size: 1.2rem;
    }
    
    .email-toast {
        right: 10px;
        left: 10px;
        top: 70px;
        font-size: 0.8rem;
        padding: 0.75rem 1rem;
    }
    
    .project-panel {
        padding: 2.25rem 1.75rem;
        margin-bottom: 1.5rem;
    }
    
    .project-content {
        gap: 2rem;
    }
    
    .project-title {
        font-size: 1.7rem;
    }
    
    .project-subtitle {
        font-size: 1rem;
    }
    
    .project-description {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
    
    .cta-button {
        padding: 1rem 2.2rem;
        font-size: 1.05rem;
    }
    
    .nav-arrow {
        width: 45px;
        height: 45px;
        font-size: 1.6rem;
    }
    
    .nav-arrow-left {
        left: 1rem;
    }
    
    .nav-arrow-right {
        right: 1rem;
    }
    
    .content-panel {
        padding: 2rem 1.75rem;
    }
    
    .page-title {
        font-size: 1.8rem;
    }
    
    .project-indicators {
        margin-top: 1.5rem;
        margin-bottom: 0.5rem;
    }
}

/* ===== ACCESSIBILITY ===== */
button:focus,
a:focus {
    outline: 2px solid #f9c74f;
    outline-offset: 3px;
}

button:focus:not(:focus-visible),
a:focus:not(:focus-visible) {
    outline: none;
}

/* Reduced motion für Nutzer die Animationen nicht mögen */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
