/* Grundlegende Resets und globales Styling */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    --scroll-padding: 80px;
}

:root {
    /* Farbpalette inspiriert vom Weltraum */
    --color-background: #050a1a; /* Sehr dunkles Blau/Schwarz */
    --color-background-light: #0d1120; /* Etwas heller für Karten etc. */
    --color-text-primary: #e8e8f0; /* Helles Grau/Lavendel */
    --color-text-secondary: #a0a8c0; /* Gedämpftes Blau/Grau */
    --color-accent-primary: #a67cff; /* Leuchtendes Violett (Nebel) */
    --color-accent-secondary: #70d6ff; /* Helles Cyan (Sterne/Jets) */
    --color-accent-subtle: #3a506b; /* Dunkleres Blau für Linien/Tags */
    --font-primary: 'Inter', sans-serif;
    --font-secondary: 'Space Mono', monospace; /* Für technische/Akzent-Texte */
}

body {
    font-family: var(--font-primary);
    background-color: var(--color-background);
    color: var(--color-text-primary);
    line-height: 1.7;
    overflow-x: hidden;
    /* Subtiler Nebel/Sternenstaub-Effekt + Dots */
    background-image:
        radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.03) 1px, transparent 0), /* Feinere Dots */
        radial-gradient(ellipse at 30% 20%, rgba(112, 214, 255, 0.05) 0%, transparent 70%), /* Cyan Nebel */
        radial-gradient(ellipse at 80% 70%, rgba(166, 124, 255, 0.07) 0%, transparent 70%); /* Violetter Nebel */
    background-size: 20px 20px, 100% 100%, 100% 100%;
    background-attachment: fixed; /* Hält Nebel fixiert */
}

/* Partikel Hintergrund Styling */
#particles-js {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: -1;
    background-color: transparent;
    overflow-x: hidden;
}

/* Hero Section Styling */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 40px 20px;
    position: relative;
    z-index: 1;
    background: linear-gradient(rgba(5, 10, 26, 0.8), rgba(5, 10, 26, 0.98)); /* Dunkler Overlay */
    overflow: hidden;
}

.hero-content h1 {
    font-size: clamp(2.8rem, 7vw, 4.5rem);
    font-weight: 700;
    margin-bottom: 8px;
    color: #FFFFFF;
    letter-spacing: 1.5px;
    text-shadow: 0 0 10px rgba(166, 124, 255, 0.3); /* Subtiles violettes Leuchten */
}

.hero-content .subtitle {
    font-size: clamp(1.1rem, 3vw, 1.6rem);
    font-weight: 400;
    margin-bottom: 15px;
    color: var(--color-text-secondary);
    font-family: var(--font-secondary); /* Space Mono */
    letter-spacing: 1px;
}

.hero-content .tagline {
    font-size: clamp(1.1rem, 2.8vw, 1.4rem);
    font-weight: 400; /* Etwas dicker */
    color: var(--color-accent-secondary); /* Helles Cyan */
    margin-bottom: 40px;
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
    font-style: italic; /* Kursiv für den Spruch */
}
.hero-background { /* Stellt sicher, dass der Container relativ ist */
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: -2;
    overflow: hidden;
}

.hero-video-background {
    position: absolute;
    top: 50%; left: 50%;
    min-width: 100%; min-height: 100%;
    width: auto; height: auto;
    transform: translate(-50%, -50%);
    z-index: -2; /* Unterste Ebene im Hintergrund, oder anpassen */
    object-fit: cover; /* Stellt sicher, dass das Video den Bereich füllt */
    opacity: 0.5; /* Oder nach Bedarf anpassen, um Textlesbarkeit zu gewährleisten */
    overflow: hidden;
}

.cursor-dot,
.cursor-trail {
    position: fixed; /* Immer im Viewport */
    top: 0;
    left: 0;
    border-radius: 50%;
    pointer-events: none; /* WICHTIG: Verhindert, dass sie Klicks blockieren */
    z-index: 9999; /* Immer ganz oben */
    opacity: 0; /* Start unsichtbar */
    transition: opacity 0.3s ease, transform 0.2s ease; /* Für Enter/Leave */
    will-change: transform; /* Performance */
}

.cursor-dot {
    width: 8px;
    height: 8px;
    background-color: var(--color-accent-cyan, #76e3ea);
    transform: translate(-50%, -50%) scale(0); /* Zentriert und Start klein */
}

.cursor-trail {
    width: 30px;
    height: 30px;
    background-color: rgba(125, 249, 255, 0.2); /* Transparenter Cyan */
    /* border: 1px solid rgba(125, 249, 255, 0.3); */ /* Optionaler Rand */
    transform: translate(-50%, -50%) scale(0); /* Zentriert und Start klein */
    /* Der Trail wird per JS verzögert */
}


/* Optional: Cursor ändern, wenn über Links/Buttons */
a:hover ~ .cursor-dot,
button:hover ~ .cursor-dot {
     transform: translate(-50%, -50%) scale(1.5); /* Größerer Punkt */
}
a:hover ~ .cursor-trail,
button:hover ~ .cursor-trail {
    transform: translate(-50%, -50%) scale(1.2);
    background-color: rgba(125, 249, 255, 0.3); /* Etwas stärker */
}

.cta-button {
    display: inline-flex; /* Für Icon Ausrichtung */
    align-items: center;
    gap: 8px;
    background: linear-gradient(45deg, var(--color-accent-primary), var(--color-accent-secondary)); /* Verlauf Violett -> Cyan */
    color: #FFFFFF; /* Weißer Text auf Verlauf */
    padding: 14px 35px;
    border-radius: 50px; /* Wieder rundlicher, passt zum Thema */
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.3s ease, box-shadow 0.4s ease;
    box-shadow: 0 5px 20px rgba(166, 124, 255, 0.25); /* Stärkerer Schatten */
    border: none;
    font-size: 1.05rem;
}

.cta-button:hover {
    transform: translateY(-3px) scale(1.03); /* Stärkerer Hover-Effekt */
    box-shadow: 0 8px 25px rgba(112, 214, 255, 0.3);
}

/* Scroll Down Indikator */
.scroll-down-indicator {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.8rem;
    color: rgba(232, 232, 240, 0.3); /* Farbe von --color-text-primary mit Alpha */
    animation: pulse-fade 2.5s infinite ease-in-out;
}

@keyframes pulse-fade {
    0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.3; }
    50% { transform: translateX(-50%) translateY(-10px); opacity: 0.7; }
}

/* Content Sections */
.content-section {
    padding: 120px 20px;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
    background-color: transparent;
}

.section-title {
    text-align: center;
    font-size: clamp(2.2rem, 5vw, 3rem);
    margin-bottom: 70px;
    font-weight: 700;
    position: relative;
    padding-bottom: 20px;
    color: var(--color-text-primary);
    letter-spacing: 1px;
    font-family: var(--font-secondary); /* Space Mono für Titel */
}

/* Sternen-Linie unter dem Titel */
.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 2px;
    background: linear-gradient(90deg, var(--color-accent-secondary), var(--color-accent-primary)); /* Verlauf Cyan -> Violett */
    border-radius: 1px;
    box-shadow: 0 0 8px var(--color-accent-secondary); /* Leuchteffekt */
}

/* Über Mich Sektion Spezifisch */
.about-content {
    display: grid;
    grid-template-columns: 2.5fr 1fr; /* Etwas angepasstes Verhältnis */
    gap: 60px;
    align-items: start;
}

.about-text p {
    margin-bottom: 25px;
    color: var(--color-text-secondary);
    font-size: 1.1rem;
}

.skills-preview {
    margin-top: 30px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.skills-preview span {
    background-color: rgba(58, 80, 107, 0.4); /* Hintergrund von --color-accent-subtle mit Alpha */
    color: var(--color-text-secondary);
    padding: 6px 15px;
    border-radius: 4px; /* Etwas eckiger */
    font-size: 0.9rem;
    font-family: var(--font-secondary);
    border: 1px solid rgba(58, 80, 107, 0.6);
}

.social-links {
    text-align: right;
}

.social-links a {
    display: block;
    margin-bottom: 25px;
    color: var(--color-text-secondary);
    font-size: 1.8rem;
    transition: color 0.3s ease, text-shadow 0.3s ease, transform 0.3s ease;
}

.social-links a:hover {
    color: var(--color-accent-secondary); /* Cyan beim Hover */
    text-shadow: 0 0 8px var(--color-accent-secondary);
    transform: scale(1.15);
}

/* Projekt Grid */
.projekt-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
    gap: 45px;
}

.projekt-karte {
    background-color: var(--color-background-light);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(58, 80, 107, 0.5); /* Dunkelblauer Rand */
    transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.projekt-karte:hover {
    transform: translateY(-8px) scale(1.01);
    border-color: var(--color-accent-primary); /* Violetter Rand beim Hover */
    box-shadow: 0 12px 35px rgba(166, 124, 255, 0.15);
}

.projekt-bild {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    filter: saturate(0.8) brightness(0.9); /* Etwas weniger Sättigung, leicht dunkler */
    transition: filter 0.4s ease;
}

.projekt-karte:hover .projekt-bild {
    filter: saturate(1) brightness(1);
}

.projekt-bild-placeholder {
    width: 100%;
    height: 200px;
    background: linear-gradient(45deg, var(--color-accent-subtle), #2a3f55); /* Dunkelblauer Verlauf */
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    color: rgba(232, 232, 240, 0.5); /* Farbe von --color-text-primary mit Alpha */
    font-weight: 700;
    font-family: var(--font-secondary); /* Space Mono */
    letter-spacing: 2px;
}

.projekt-inhalt {
    padding: 30px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.projekt-inhalt h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #FFFFFF;
    font-weight: 600;
}

.projekt-inhalt p {
    font-size: 1rem;
    color: var(--color-text-secondary);
    flex-grow: 1;
    margin-bottom: 25px;
}

.projekt-tags {
    margin-bottom: 25px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.projekt-tags span {
    background-color: rgba(112, 214, 255, 0.1); /* Transparenter Cyan-Hintergrund */
    color: var(--color-accent-secondary); /* Cyan Text */
    padding: 5px 12px;
    border-radius: 15px; /* Rundlicher */
    font-size: 0.8rem;
    font-family: var(--font-secondary); /* Space Mono */
    text-transform: uppercase; /* Großbuchstaben */
    letter-spacing: 0.5px;
}

.projekt-links {
    margin-top: auto;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.projekt-button {
    background-color: transparent;
    color: var(--color-accent-primary); /* Violett */
    border: 1px solid var(--color-accent-primary);
    padding: 8px 20px;
    border-radius: 20px; /* Rundlicher */
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.projekt-button i {
    transition: transform 0.3s ease;
}

.projekt-button:hover {
    background-color: rgba(166, 124, 255, 0.1); /* Violetter Hover-Hintergrund */
    color: #e8cfff; /* Helleres Violett */
    box-shadow: 0 0 8px rgba(166, 124, 255, 0.3);
}
.projekt-button:hover i.fa-rocket,
.projekt-button:hover i.fa-meteor {
    transform: rotate(-45deg) scale(1.1); /* Icon-Drehung beim Hover */
}


.projekt-button.github {
    color: var(--color-text-secondary); /* Sekundärfarbe für GitHub */
    border-color: var(--color-text-secondary);
}

.projekt-button.github:hover {
    background-color: rgba(160, 168, 192, 0.1);
    color: var(--color-text-primary);
    box-shadow: 0 0 5px rgba(160, 168, 192, 0.2);
}

/* Footer */
.footer {
    text-align: center;
    padding: 50px 20px;
    margin-top: 100px;
    border-top: 1px solid rgba(58, 80, 107, 0.4); /* Dunkelblaue Linie */
    color: var(--color-text-secondary);
    font-size: 0.95rem;
    position: relative;
    z-index: 2;
    background-color: var(--color-background);
    font-family: var(--font-secondary); /* Space Mono für Footer */
}

#background-controls {
    position: fixed; /* Oder absolute, je nach Platzierung */
    bottom: 20px;
    right: 20px;
    z-index: 100; /* Über den meisten Inhalten */
    display: flex;
    gap: 10px;
    background-color: rgba(13, 17, 23, 0.7); /* Hintergrundfarbe wie bg-medium */
    padding: 10px;
    border-radius: 5px;
    border: 1px solid var(--color-border, #30363d);
}

#background-controls button {
    background-color: var(--color-bg-light, #161b22);
    color: var(--color-text-secondary, #8b949e);
    border: 1px solid var(--color-border, #30363d);
    padding: 5px 10px;
    border-radius: 3px;
    cursor: pointer;
    font-family: var(--font-secondary, monospace);
    font-size: 0.8rem;
    transition: background-color 0.2s, color 0.2s;
}

#background-controls button:hover {
    background-color: var(--color-border, #30363d);
    color: var(--color-text-primary, #c9d1d9);
}

/* Fade-In Animationen */
.fade-in {
    opacity: 0;
    animation: fadeInAnimation 1.2s ease-out forwards;
    animation-delay: 0.4s; /* Etwas längere Verzögerung */
}
.fade-in-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.9s ease-out, transform 0.9s ease-out;
}
.fade-in-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}
@keyframes fadeInAnimation {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}


/* Easter Egg Styling */
.easter-egg-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(5, 10, 26, 0.97); /* Hintergrundfarbe wie Body, fast opak */
    z-index: 1000;
    display: none;
    justify-content: center;
    align-items: center;
    text-align: center;
    flex-direction: column;
    color: var(--color-accent-secondary); /* Cyan für Text */
    font-family: var(--font-secondary); /* Space Mono */
    font-size: 1.6rem;
    cursor: pointer;
    padding: 20px;
    text-shadow: 0 0 10px rgba(112, 214, 255, 0.5); /* Cyan Leuchten */
}
.easter-egg-overlay p {
    margin-bottom: 25px;
    line-height: 1.4;
    animation: text-scan 0.2s infinite alternate; /* Neuer Effekt */
}
.easter-egg-overlay span {
    font-size: 1rem;
    color: var(--color-text-secondary); /* Gedämpftere Farbe */
    margin-top: 15px;
}
@keyframes text-scan { /* Simuliert einen Scan-Effekt */
  0% { opacity: 0.8; letter-spacing: 1px; }
  100% { opacity: 1; letter-spacing: 1.5px; }
}


/* Responsiveness Anpassungen */
@media (max-width: 992px) {
    .about-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .social-links {
        text-align: center;
        margin-top: 30px;
    }
    .social-links a {
        display: inline-block;
        margin: 0 20px;
    }
}

@media (max-width: 768px) {
    .content-section {
        padding: 100px 15px;
    }
    .section-title {
        font-size: clamp(1.8rem, 4vw, 2.4rem);
        margin-bottom: 50px;
    }
    .projekt-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Kleinere Mindestbreite */
        gap: 30px;
    }
    .about-text p {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    body {
        background-size: 30px 30px, 150% 150%, 150% 150%; /* Skalierung des Nebels anpassen */
    }
    .hero-content h1 {
        letter-spacing: 1px;
    }
    .hero-content .tagline {
        font-size: 1rem;
    }
    .cta-button {
        padding: 12px 30px;
        font-size: 1rem;
    }
    .projekt-tags span {
        font-size: 0.7rem;
        padding: 4px 10px;
    }
    .projekt-button {
        font-size: 0.8rem;
        padding: 7px 16px;
    }
    .easter-egg-overlay {
        font-size: 1.3rem;
    }
}
