/* CSS Reset */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Farbvariablen */
:root {
    --primary-gradient: linear-gradient(135deg, #61b6e2 0%, #ca72da 100%);
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --text-primary: #000000;
    --text-secondary: rgba(0, 0, 0, 0.75);
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

/* Grundlegende Stile */
body {
    font-family: 'Roboto', sans-serif;
    background: #f5f4f7;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    padding: 40px 20px;
    font-size: clamp(16px, 0.95rem + 0.25vw, 18px);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

        /* Hintergrund-Effekte */
        .bg-gradient {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: radial-gradient(circle at 50% 0%, #ca72da 0%, #f5f4f7 70%);
            z-index: -2;
        }

        .bg-noise {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMDAiIGhlaWdodD0iMzAwIj48ZmlsdGVyIGlkPSJhIiB4PSIwIiB5PSIwIj48ZmVUdXJidWxlbmNlIHR5cGU9ImZyYWN0YWxOb2lzZSIgYmFzZUZyZXF1ZW5jeT0iLjc1IiBzdGl0Y2hUaWxlcz0ic3RpdGNoIi8+PGZlQ29sb3JNYXRyaXggdHlwZT0ic2F0dXJhdGUiIHZhbHVlcz0iMCIvPjwvZmlsdGVyPjxwYXRoIGZpbHRlcj0idXJsKCNhKSIgb3BhY2l0eT0iLjA1IiBkPSJNMCAwaDMwMHYzMDBIMHoiLz48L3N2Zz4=');
            z-index: -1;
            opacity: 0.3;
        }

        /* Container-Stile */
        .container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 0 20px;
        }

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 0;
    z-index: 100;
    transition: background-color 0.3s ease;
}

header.scrolled {
    background-color: rgba(15, 1, 34, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar {
    background: white;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding: 0.75rem 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    position: relative;
}

.logo {
    font-weight: 700;
    font-size: 24px;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo img {
    width: 50px;
    height: 50px;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    padding: 5px 0;
    transition: all 0.3s ease;
}

.nav-links a:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-gradient);
    transition: width 0.3s ease;
}

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

.nav-button {
    background: var(--primary-gradient);
    border: none;
    color: #000000;
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 5px 15px rgba(84, 101, 255, 0.4);
    min-height: 44px;
    min-width: 44px;
}

button,
.nav-link {
    min-height: 44px;
}

.nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    background: #ffffff;
    cursor: pointer;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.nav-toggle:focus-visible {
    outline: 2px solid #61b6e2;
    outline-offset: 2px;
}

.nav-toggle:hover {
    background: rgba(0, 0, 0, 0.03);
}

.nav-toggle-bar {
    display: block;
    width: 22px;
    height: 2px;
    background: #000000;
    margin: 4px 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-open .nav-toggle-bar:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.nav-open .nav-toggle-bar:nth-child(2) {
    opacity: 0;
}

.nav-open .nav-toggle-bar:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

.nav-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(84, 101, 255, 0.6);
}

        /* Neue Navigation mit Dropdowns */
        .nav-menu {
            display: flex;
            list-style: none;
            gap: 30px;
            align-items: center;
            padding-left: 0;
        }

        .nav-item {
            position: relative;
        }

        .nav-link {
            color: #000000;
            text-decoration: none;
            padding: 0.5rem 1rem;
            border-radius: 8px;
            font-weight: 400;
            font-size: 0.875rem;
            transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        }

        .nav-link:hover {
            background-color: rgba(0, 0, 0, 0.04);
            color: #61b6e2;
        }

        /* Dropdown Styles */
        .dropdown {
            position: relative;
        }

        .dropdown-content {
            position: absolute;
            top: 100%;
            left: 50%;
            transform: translateX(-50%) translateY(-12px);
            background: rgba(255, 255, 255, 0.96);
            border-radius: 16px;
            box-shadow: 0 18px 45px rgba(31, 17, 54, 0.18);
            min-width: 200px;
            padding: 0.6rem 0;
            opacity: 0;
            visibility: hidden;
            transition: all 0.2s ease;
            z-index: 1001;
        }

        .dropdown:hover .dropdown-content {
            opacity: 1;
            visibility: visible;
            transform: translateX(-50%) translateY(0);
        }

        .dropdown:hover > .nav-link {
            color: #8d4acc;
        }

        .dropdown-content a {
            color: #000000;
            padding: 0.5rem 1.25rem;
            text-decoration: none;
            display: block;
            font-size: 0.875rem;
            font-weight: 400;
            transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
            border-radius: 8px;
            margin: 0 0.5rem;
            cursor: pointer;
        }

        .dropdown-content a:hover {
            background-color: rgba(141, 74, 204, 0.08);
            color: #8d4acc;
        }

/* Hero-Bereich mit Stapel */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 100px 0;
    position: relative;
}

.hero-layout {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 2rem;
}

.hero-content {
    flex: 0 0 45%;
    max-width: 45%;
    margin-right: 10%; /* Mehr Abstand nach rechts */
}

.hero h1 {
    font-size: clamp(38px, 3vw + 1rem, 52px);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
}

.hero p {
    font-size: clamp(16px, 0.3vw + 1rem, 18px);
    color: var(--text-secondary);
    margin-bottom: 40px;
    max-width: 90%;
}

        /* Portfolio-Stapel Bereich */
        .portfolio-stack-container {
            flex: 0 0 45%;
            max-width: 45%;
            height: 550px;
            position: relative;
            perspective: 1000px;
        }

        #portfolio-stack {
            position: absolute;
            width: 100%;
            height: 100%;
            top: 0;
            right: 0;
        }

        /* Portfolio Items */
        .portfolio-item {
            background: var(--glass-bg);
            backdrop-filter: blur(10px);
            border: 1px solid var(--glass-border);
            border-radius: 16px;
            overflow: hidden;
            box-shadow: var(--card-shadow);
            transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
        }

        .portfolio-item-image {
            height: 200px;
            position: relative;
            overflow: hidden;
        }

        .portfolio-item-image img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        .portfolio-item-image-placeholder {
            height: 100%;
            width: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            background: linear-gradient(135deg, #61b6e2 0%, #ca72da 100%);
        }

        .portfolio-item-image-placeholder span {
            font-size: 72px;
            font-weight: 800;
            color: rgba(255, 255, 255, 0.2);
        }

        .portfolio-item-details {
            padding: 20px;
        }

        .portfolio-item-title {
            font-size: clamp(18px, 0.4vw + 1rem, 20px);
            font-weight: 700;
            margin-bottom: 8px;
        }

        .portfolio-item-category {
            color: var(--text-secondary);
            font-size: clamp(13px, 0.2vw + 0.85rem, 14px);
            margin-bottom: 16px;
        }

        .portfolio-item-divider {
            width: 40px;
            height: 3px;
            background: var(--primary-gradient);
            margin-bottom: 16px;
        }

        /* Stapel-Layout */
        #portfolio-stack .portfolio-item {
            position: absolute;
            width: 280px;
            height: 380px;
            transform-origin: center;
        }

        /* Exakte Positionierung der 4 Stapel-Items */
        #portfolio-stack .portfolio-item:nth-child(1) {
            top: 50px;
            left: 40px;
            transform: rotate(-5deg);
            z-index: 4;
        }

        #portfolio-stack .portfolio-item:nth-child(2) {
            top: 80px;
            left: 80px;
            transform: rotate(3deg);
            z-index: 3;
        }

        #portfolio-stack .portfolio-item:nth-child(3) {
            top: 120px;
            left: 20px;
            transform: rotate(-8deg);
            z-index: 2;
        }

        #portfolio-stack .portfolio-item:nth-child(4) {
            top: 150px;
            left: 60px;
            transform: rotate(6deg);
            z-index: 1;
        }

        /* Grid-Bereich */
        .portfolio-grid-section {
            min-height: 100vh;
            padding: 100px 0;
            position: relative;
        }

        .portfolio-grid-section h2 {
            text-align: center;
            font-size: clamp(32px, 2vw + 1.1rem, 42px);
            font-weight: 800;
            margin-bottom: 60px;
            background: var(--primary-gradient);
            -webkit-background-clip: text;
            background-clip: text;
            -webkit-text-fill-color: transparent;
        }

        #portfolio-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 30px;
            max-width: 1000px;
            margin: 0 auto;
        }

        #portfolio-grid .portfolio-item {
            transform: none;
            position: relative;
            transition: transform 0.3s ease;
        }

        #portfolio-grid .portfolio-item:hover {
            transform: translateY(-10px);
        }

        /* Animation-Klassen */
        .fade-up {
            opacity: 0;
            transform: translateY(30px);
            transition: opacity 0.5s ease, transform 0.5s ease;
        }

        .fade-up.visible {
            opacity: 1;
            transform: translateY(0);
        }

        /* Scroll-Indikator */
        .scroll-indicator {
            position: absolute;
            bottom: 40px;
            left: 50%;
            transform: translateX(-50%);
            display: flex;
            flex-direction: column;
            align-items: center;
            color: var(--text-secondary);
            opacity: 0;
            animation: fadeInUp 1s 0.5s forwards;
        }

        @keyframes fadeInUp {
            from {
                opacity: 0;
                transform: translate(-50%, 20px);
            }
            to {
                opacity: 1;
                transform: translate(-50%, 0);
            }
        }

        .scroll-indicator span {
            margin-top: 10px;
            font-size: 14px;
        }

        .scroll-icon {
            width: 30px;
            height: 50px;
            border: 2px solid var(--text-secondary);
            border-radius: 15px;
            position: relative;
        }

        .scroll-icon:before {
            content: '';
            position: absolute;
            top: 8px;
            left: 50%;
            width: 6px;
            height: 6px;
            background: white;
            border-radius: 50%;
            transform: translateX(-50%);
            animation: scrollAnimation 2s infinite;
        }

        @keyframes scrollAnimation {
            0% {
                opacity: 1;
                transform: translateX(-50%) translateY(0);
            }
            100% {
                opacity: 0;
                transform: translateX(-50%) translateY(20px);
            }
        }

        /* Angepasster Cursor */
        .custom-cursor {
            position: fixed;
            width: 20px;
            height: 20px;
            border-radius: 50%;
            background: var(--primary-gradient);
            pointer-events: none;
            z-index: 9999;
            transform: translate(-50%, -50%);
            opacity: 0.7;
            transition: transform 0.1s ease, opacity 0.3s ease;
        }

        .custom-cursor.active {
            transform: translate(-50%, -50%) scale(2);
            opacity: 0.3;
        }

/* Responsive Anpassungen */
@media (max-width: 1100px) {
    .cta-grid {
        max-width: 90%;
    }
}

@media (max-width: 1023px) {
    body {
        padding: 32px 16px;
    }

    .navbar {
        padding: 0.75rem 1.25rem;
    }

    .nav-toggle {
        display: inline-flex;
    }

    .nav-menu {
        position: absolute;
        top: calc(100% + 10px);
        left: 0;
        right: 0;
        background: #ffffff;
        border-radius: 16px;
        box-shadow: 0 18px 45px rgba(31, 17, 54, 0.18);
        padding: 12px 20px 18px;
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        max-height: 480px;
        overflow: hidden;
        opacity: 1;
        transition: max-height 0.25s ease, opacity 0.2s ease, padding 0.2s ease;
    }

    .nav-enhanced .nav-menu {
        max-height: 0;
        padding: 0 20px;
        opacity: 0;
    }

    .nav-open .nav-menu,
    .nav-enhanced .nav-menu.is-open {
        max-height: 360px;
        padding: 12px 20px 18px;
        opacity: 1;
    }

    .nav-menu a {
        width: 100%;
        padding: 12px 0;
    }

    .hero {
        padding: 80px 0;
    }

    .hero-content {
        flex: 0 0 52%;
        max-width: 52%;
        margin-right: 6%;
    }

    .portfolio-stack-container {
        flex: 0 0 42%;
        max-width: 42%;
    }
}

@media (max-width: 767px) {
    body {
        padding: 24px 14px;
    }

    .nav-container {
        padding: 0 0.5rem;
    }

    .nav-menu {
        top: calc(100% + 8px);
    }

    .hero {
        padding: 64px 0;
    }

    .hero-layout {
        flex-direction: column;
    }
    
    .hero-content, 
    .portfolio-stack-container {
        flex: 0 0 100%;
        max-width: 100%;
        margin-right: 0;
    }
    
    .hero-content {
        margin-bottom: 40px;
        text-align: center;
    }
    
    .hero p {
        margin-left: auto;
        margin-right: auto;
    }
    
    .portfolio-stack-container {
        height: 450px;
    }
    
    #portfolio-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .portfolio-grid-section {
        padding: 72px 0;
    }

    .scroll-indicator {
        display: none;
    }
}

@media (max-width: 576px) {
    .hero h1 {
        font-size: clamp(30px, 5vw + 1rem, 36px);
    }
    
    .portfolio-stack-container {
        height: 400px;
    }
    
    #portfolio-stack .portfolio-item {
        width: 240px;
        height: 340px;
    }
}
