/*
  ========================================================
  Landingpage CSS (stil.css)
  Entwickelt für Walther Gugeler (GuSo)
  ========================================================
  Diese Datei enthält alle Stile für das Projekt. 
  Es wird ein modernes Design mit CSS-Variablen genutzt, 
  um den Wechsel zwischen Dark Mode und Light Mode zu ermöglichen.
  
  Besonderheiten:
  - Flexbox & CSS Grid für modernes Layout
  - CSS Variablen für themenbasierte Farben
  - Glassmorphismus-Effekte
  - Lustige CSS-Animationen ("Wackeln" und "Schweben")
*/

/* 
  1. CSS-Variablen (Custom Properties)
  Wir definieren zunächst die Farben für den Dark Mode (Standard).
*/
:root[data-theme="dark"] {
    --hintergrund-farbe: #0f172a;
    --text-farbe: #f8fafc;
    --karten-hintergrund: rgba(30, 41, 59, 0.7);
    --karten-rand: rgba(255, 255, 255, 0.1);
    --akzent-farbe: #38bdf8;
    --akzent-hover: #0ea5e9;
    --button-hintergrund: #1e293b;
    --button-text: #f8fafc;
    --schatten: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* 
  2. CSS-Variablen für den Light Mode
  Diese werden aktiv, wenn das Attribut data-theme auf "light" gesetzt wird.
*/
:root[data-theme="light"] {
    --hintergrund-farbe: #f1f5f9;
    --text-farbe: #0f172a;
    --karten-hintergrund: rgba(255, 255, 255, 0.8);
    --karten-rand: rgba(0, 0, 0, 0.05);
    --akzent-farbe: #2563eb;
    --akzent-hover: #1d4ed8;
    --button-hintergrund: #ffffff;
    --button-text: #0f172a;
    --schatten: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* 
  3. Basis-Styling und Reset
  Wir setzen Box-Sizing auf Border-Box und entfernen Standard-Abstände.
  Als Schriftart importieren wir eine moderne serifenlose Schriftart.
*/
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;700&display=swap');

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--hintergrund-farbe);
    color: var(--text-farbe);
    transition: background-color 0.5s ease, color 0.5s ease;
    line-height: 1.6;
    overflow-x: hidden; /* Verhindert horizontales Scrollen */
}

/* 
  4. Hauptcontainer
  Zentriert den Inhalt und gibt ihm maximale Breite.
*/
.haupt-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 10;
}

/* 
  5. Kopfbereich und Umschalt-Button
*/
.kopf-bereich {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 2rem;
}

.umschalt-button {
    background-color: var(--button-hintergrund);
    color: var(--button-text);
    border: 1px solid var(--karten-rand);
    padding: 0.75rem 1.5rem;
    border-radius: 9999px; /* Macht den Button komplett rund */
    font-family: inherit;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: var(--schatten);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.umschalt-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.umschalt-button:active {
    transform: translateY(1px);
}

/* 
  6. Profil-Bereich (Glassmorphismus)
  Nutzt modernen Backdrop-Filter, um einen "Milchglas"-Effekt zu erzielen.
*/
.profil-bereich {
    background-color: var(--karten-hintergrund);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--karten-rand);
    border-radius: 24px;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 2rem;
    box-shadow: var(--schatten);
    margin-bottom: 3rem;
    transition: all 0.5s ease;
}

@media (min-width: 768px) {
    .profil-bereich {
        flex-direction: row;
        text-align: left;
    }
}

/* 
  7. Das Bild und seine lustige Animation
*/
.bild-container {
    flex-shrink: 0;
    width: 250px;
    height: 250px;
    border-radius: 50%; /* Macht das Bild rund */
    overflow: hidden;
    border: 4px solid var(--akzent-farbe);
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.4);
}

.profil-bild {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Wenn man mit der Maus über das Bild fährt, wackelt es lustig! */
.profil-bild:hover {
    animation: wackelpudding 1s infinite alternate;
}

/* Definition der Wackelpudding-Animation */
@keyframes wackelpudding {
    0% { transform: scale(1) rotate(0deg); }
    25% { transform: scale(1.05) rotate(-5deg); }
    50% { transform: scale(1.05) rotate(5deg); }
    75% { transform: scale(1.1) rotate(-3deg); }
    100% { transform: scale(1.1) rotate(3deg); }
}

/* Schwebe-Animation für das gesamte Profil, nur subtil */
.lustige-animation {
    animation: schweben 6s ease-in-out infinite;
}

@keyframes schweben {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

/* 
  8. Textbereich Styling
*/
.text-bereich {
    flex-grow: 1;
}

.titel {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--text-farbe), var(--akzent-farbe));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.untertitel {
    font-size: 1.5rem;
    color: var(--akzent-farbe);
    margin-bottom: 1.5rem;
    font-weight: 300;
}

.beschreibung {
    font-size: 1.1rem;
    line-height: 1.8;
}

/* 
  9. Link-Bereich
*/
.link-bereich {
    margin-bottom: 3rem;
}

.projekt-liste {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 600px) {
    .projekt-liste {
        grid-template-columns: 1fr 1fr;
    }
}

.projekt-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--karten-hintergrund);
    padding: 1.5rem;
    border-radius: 16px;
    text-decoration: none;
    color: var(--text-farbe);
    border: 1px solid var(--karten-rand);
    box-shadow: var(--schatten);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.projekt-link:hover {
    transform: translateY(-5px) scale(1.02);
    border-color: var(--akzent-farbe);
    background-color: var(--button-hintergrund);
}

.link-text {
    font-size: 1.2rem;
    font-weight: 700;
}

.link-pfeil {
    font-size: 1.5rem;
    color: var(--akzent-farbe);
    transition: transform 0.3s ease;
}

.projekt-link:hover .link-pfeil {
    transform: translateX(10px);
}

/* 
  10. Fußzeile
*/
.fuss-zeile {
    text-align: center;
    font-size: 0.9rem;
    opacity: 0.7;
    padding-top: 2rem;
    border-top: 1px solid var(--karten-rand);
}

/* 
  11. Hintergrund-Animation (Fliegende Nullen und Einsen per JS gesteuert)
*/
#hintergrundAnimation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.code-schnipsel {
    position: absolute;
    color: var(--akzent-farbe);
    font-family: monospace;
    font-size: 1.5rem;
    opacity: 0.2;
    animation: fallen linear infinite;
}

@keyframes fallen {
    to {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}
