/* Moderne Dark Mode Farbpalette & Variablen */
:root {
    --bg-dark: #0a0a0a;
    --bg-darker: #000000;
    --bg-card: #121212;
    --accent-primary: #2563eb;
    /* Modern Blue */
    --accent-light: #60a5fa;
    --accent-hover: #1d4ed8;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --font-main: 'Outfit', system-ui, -apple-system, sans-serif;
    --font-code: 'Fira Code', 'Courier New', Courier, monospace;
}

/* Basis-Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 90px;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-dark);
    background-image: url('../image/background.webp');
    background-size: cover;
    background-position: center top;
    background-attachment: fixed;
    background-repeat: no-repeat;
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: var(--accent-light);
    transition: color 0.3s ease;
}

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

/* Navigation */
header {
    background-color: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo img {
    max-height: 55px;
    width: auto;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 35px;
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 5px;
    z-index: 101;
}

.hamburger span {
    width: 28px;
    height: 3px;
    background-color: var(--text-main);
    border-radius: 3px;
    transition: all 0.3s;
}

.hamburger.open span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.hamburger.open span:nth-child(2) {
    opacity: 0;
}

.hamburger.open span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 35px;
    margin: 0;
    padding: 0;
}

.nav-links a {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 1.15rem;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--text-main);
}

/* Language Switcher */
.lang-switcher {
    display: flex;
    align-items: center;
    gap: 5px;
    background: rgba(255, 255, 255, 0.05);
    padding: 3px;
    border-radius: 20px;
    margin-left: 10px;
}

.lang-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.85rem;
    padding: 4px 10px;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-main);
}

.lang-btn:hover {
    color: var(--text-main);
}

.lang-btn.active {
    background: var(--accent-primary);
    color: #fff;
    box-shadow: 0 2px 10px rgba(59, 130, 246, 0.3);
}

/* Hero Section */
.hero {
    padding: 120px 0;
    text-align: left;
    background: radial-gradient(circle at 10% 20%, rgba(59, 130, 246, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 90% 80%, rgba(59, 130, 246, 0.05) 0%, transparent 50%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.hero h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 24px;
    font-weight: 700;
    letter-spacing: -1px;
}

.hero h1 span {
    background: linear-gradient(to right, var(--accent-primary), #8b5cf6, #06b6d4, var(--accent-primary));
    background-size: 300% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: textGradientFlow 6s linear infinite;
}

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

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

.hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 600px;
    margin-bottom: 45px;
    font-weight: 300;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent-primary), #60a5fa);
    color: #fff;
    padding: 16px 36px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: none;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
    text-decoration: none;
}

.btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(59, 130, 246, 0.5);
    background: linear-gradient(135deg, #2563eb, #3b82f6);
}

.btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.2);
}

section {
    padding: 100px 0 160px 0;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 60px;
    text-align: center;
    color: var(--text-main);
    font-weight: 700;
    letter-spacing: -0.5px;
}

/* Grid für Leistungen - 4 in einer Reihe */
.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

/* Responsive Design: Damit es auf kleineren Bildschirmen lesbar bleibt */
@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

.service-card {
    background-color: var(--bg-card);
    padding: 40px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-primary), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.service-card:hover::before {
    opacity: 1;
}

.service-icon {
    font-size: 2.5rem;
    margin-bottom: 25px;
    display: inline-block;
}

.service-card h3 {
    margin-bottom: 15px;
    font-size: 1.3rem;
    color: var(--text-main);
    font-weight: 500;
}

.service-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Über mich Section */
.about-content {
    display: flex;
    gap: 60px;
    align-items: center;
}

.about-text {
    flex: 1;
}

.about-text h3 {
    font-size: 2rem;
    margin-bottom: 0;
    color: var(--text-main);
    font-weight: 700;
    letter-spacing: -0.5px;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 25px;
    margin-bottom: 30px;
}

.profile-img {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--bg-card);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
    flex-shrink: 0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    backface-visibility: hidden;
    transform: translateZ(0);
    will-change: transform;
}

.profile-img:hover {
    transform: scale(1.05) rotate(-2deg) translateZ(0);
    box-shadow: 0 12px 30px rgba(59, 130, 246, 0.5);
}

.about-text h3 span {
    color: var(--accent-primary);
}

.about-text p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.about-code-box {
    flex: 1;
    background-color: #0d0d0d;
    padding: 35px;
    border-radius: 12px;
    font-family: var(--font-code);
    font-size: 0.95rem;
    color: #d1d5db;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-left: 4px solid var(--accent-primary);
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5);
    position: relative;
}

.about-code-box::before {
    content: "developer.js";
    position: absolute;
    top: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.05);
    padding: 5px 15px;
    font-size: 0.75rem;
    border-bottom-left-radius: 8px;
    color: var(--text-muted);
}

.code-comment {
    color: #6b7280;
    font-style: italic;
}

.code-string {
    color: #10b981;
}

/* Emerald für Strings */
.code-keyword {
    color: var(--accent-primary);
}

/* Kontaktformular */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
    background-color: var(--bg-card);
    padding: 50px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    color: var(--text-main);
    font-size: 0.9rem;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 15px;
    background-color: var(--bg-darker);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-main);
    font-family: var(--font-main);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

textarea.form-control {
    resize: vertical;
    min-height: 140px;
}

footer {
    text-align: center;
    padding: 40px;
    background-color: var(--bg-darker);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.8rem;
    }

    .nav-right {
        gap: 15px;
    }

    .hamburger {
        display: flex;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 80px;
        left: 0;
        width: 100%;
        background-color: rgba(10, 10, 10, 0.98);
        backdrop-filter: blur(12px);
        padding: 30px 0;
        gap: 25px;
        align-items: center;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    }

    .nav-links.open {
        display: flex;
    }

    .about-content {
        flex-direction: column;
        gap: 40px;
        align-items: stretch;
    }

    .profile-header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .about-text h3 {
        font-size: 1.7rem;
    }

    .hero {
        text-align: center;
    }

    .hero p {
        margin-left: auto;
        margin-right: auto;
    }

    .hero,
    section {
        padding: 80px 0;
    }
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: -150px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #10b981;
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.4);
    font-weight: 500;
    transition: bottom 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 9999;
    width: max-content;
    max-width: 90%;
    text-align: center;
}

.toast.show {
    bottom: 40px;
}
@media (max-width: 768px) {
    .toast.show {
        bottom: 80px;
    }
}

.toast-error {
    background-color: #ef4444;
    /* Fehler-Rot */
    box-shadow: 0 10px 25px rgba(239, 68, 68, 0.4);
}

.toast-icon {
    width: 24px;
    height: 24px;
}

/* Relaunch Slider */
.relaunch-slider-container {
    position: relative;
    width: 100%;
    max-width: 900px;
    margin: 40px auto;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
    aspect-ratio: 16 / 9;
    background: #111;
    border: 1px solid rgba(255, 255, 255, 0.05);
    /* Prevent image dragging natively */
    user-select: none;
    -webkit-user-drag: none;
}
.relaunch-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}
.relaunch-after {
    z-index: 1;
}
.relaunch-before {
    z-index: 2;
    clip-path: inset(0 50% 0 0); /* Initial 50% crop */
}
.relaunch-label {
    position: absolute;
    top: 20px;
    padding: 8px 16px;
    background: rgba(0,0,0,0.7);
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 4px;
    z-index: 5;
    pointer-events: none;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.relaunch-label.before-label {
    left: 20px;
    z-index: 6; /* stay above everything */
}
.relaunch-label.after-label {
    right: 20px;
}
.relaunch-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 40px;
    height: 40px;
    margin-top: auto;
    margin-bottom: auto;
    transform: translateX(-50%);
    background: var(--accent-primary);
    border-radius: 50%;
    z-index: 10;
    cursor: ew-resize;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
    border: 2px solid #fff;
    transition: transform 0.1s;
}
.relaunch-handle::before {
    content: '';
    position: absolute;
    top: -1000px;
    bottom: -1000px;
    left: 50%;
    width: 2px;
    background: var(--accent-primary);
    transform: translateX(-50%);
    z-index: -1;
    pointer-events: none;
}
.relaunch-handle:active {
    transform: translateX(-50%) scale(1.1);
}
.relaunch-handle::after {
    content: '↔';
    font-weight: bold;
    font-size: 1.2rem;
}
@media (max-width: 768px) {
    .relaunch-slider-container {
        aspect-ratio: 4 / 3;
    }
}

/* References Grid */
.references-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 450px));
    justify-content: center;
    gap: 60px;
    margin-top: 20px;
}

.reference-card {
    text-align: center;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, background 0.3s ease;
}

.reference-card:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-5px);
}

.reference-image {
    width: 100%;
    max-width: 500px;
    aspect-ratio: 16 / 9;
    margin-bottom: 30px;
    border-radius: 8px;
    overflow: hidden;
    /* Optional: Add a subtle shadow if it's a mockup */
    /* box-shadow: 0 10px 30px rgba(0,0,0,0.3); */
}

.reference-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
}

.reference-title {
    font-size: 1.5rem;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-main);
    margin-bottom: 10px;
}

.reference-branch {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--accent-primary);
    margin-bottom: 15px;
}

.reference-desc {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.6;
    max-width: 400px;
}