@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap');

:root {
    --background-color: #121212;
    --text-color: #e0e0e0;
    --button-bg-color: #2c2c2c;
    --button-hover-color: #444444;
    --font-family: 'Poppins', sans-serif;
}

/* -----------------------------------
   GLOBAL
----------------------------------- */
body {
    background-color: var(--background-color);
    color: var(--text-color);
    font-family: var(--font-family);
    margin: 0;
    text-align: center;
    padding: 0;
    scroll-behavior: smooth;
}

/* Globale Linkfarbe für alle ungestylten Links */
a {
    color: #ffffff; /* Hellblau als Standard für alle anderen Links */
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: #ffffff;
    text-decoration: underline;
}

section {
    padding-top: 70px; /* Erhöhe diesen Wert, bis es passt (z.B. 120px, 140px) */
}

/* -----------------------------------
   HEADER
----------------------------------- */
.main-header {
    width: 100%;
    background: #1e1e1e;
    padding: 1rem 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.4);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 10;
    box-sizing: border-box; /* Wichtig, damit Padding nicht die Breite sprengt */

    display: flex;
    align-items: center;
    justify-content: space-between; /* Schiebt Logo nach links */
}

.logo {
    margin: 0;
    height: 40px; /* Logo etwas größer als 20px sieht meist besser aus, anpassbar */
    width: auto;
}

/* Burger Button Styling */
.burger-menu {
    display: none; /* Standard: Auf Desktop ausgeblendet */
    background: none;
    border: none;
    color: #ffffff;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 20;
    padding: 10px;
}

/* Zentrierung der Navigation auf Desktop */
.center-nav {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex; /* Damit die a-Tags nebeneinander sind */
    gap: 1rem;
}

.nav-space {
    /* Kann auf dem Desktop als Spacer verwendet werden, aber da wir absolute Positionierung nutzen, 
       brauchen wir ihn nicht mehr. Wir blenden ihn hier aus, falls er noch im HTML ist. */
    display: none;
}

/* Burger Button Styling - Auf Desktop versteckt */
.burger-menu {
    display: none; 
    background: none;
    border: none;
    color: #ffffff;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 20;
    padding: 10px;
}

/* Hier passiert die Magie für die Mitte */
.center-nav {
    position: absolute;        /* Löst das Element aus dem Fluss */
    left: 50%;                 /* Schiebt den Startpunkt in die Mitte */
    transform: translateX(-50%); /* Zieht es um die eigene Hälfte zurück -> exakte Mitte */
    
    display: flex;
    gap: 20px;                 /* Abstand zwischen den Links */
}

nav a {
    color: #cccccc;
    text-decoration: none;
    font-weight: 500;
    transition: color .2s;
    font-size: 1.1rem;
}

nav a:hover {
    color: white;
}

/* Den Platzhalter brauchen wir nicht mehr, kann weg oder ausgeblendet werden */
.nav-space {
    display: none;
}

/* -----------------------------------
   MAIN CONTENT
----------------------------------- */

/*.container {
    padding: 2rem;
    border-radius: 15px;
    background-color: #1e1e1e;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    max-width: 90%;
    width: 500px;
    margin: 2rem auto;
}*/

h1 {
    font-size: 3rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #ffffff;
}

/* Social Buttons */
.social-buttons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2rem;
}

.social-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--button-bg-color);
    transition: transform 0.3s ease, background-color 0.3s ease;
    padding: 10px;
}

.social-button:hover {
    background-color: var(--button-hover-color);
    transform: translateY(-5px);
}

.button-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

/* About + Skills + Container */
.container, .about, .skills, .projekte {
    margin: 2rem auto;
    background-color: #2a2a2a;
    padding: 2rem;           /* Etwas mehr Innenabstand sieht edler aus */
    border-radius: 12px;
    
    /* HIER IST DIE ÄNDERUNG: */
    width: 90%;              /* Auf Handys: Nimm 90% der Bildschirmbreite (sorgt für Abstand links/rechts) */
    max-width: 800px;        /* Auf Laptops: Werde maximal 800px breit (statt nur 500px) */
    box-sizing: border-box;  /* Wichtig: Padding drückt die Box nicht nach außen */
    
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.4);
    text-align: left;
}

.container {
    text-align: center;
}

/* -----------------------------------
   FOOTER
----------------------------------- */

.main-footer {
    background-color: #1e1e1e;
    padding: 1rem 1.5rem;
    text-align: center;
    margin-top: 3rem;
    box-shadow: 0 -3px 10px rgba(0,0,0,0.4);
}

.footer-links a {
    color: #ffffff;
    margin: 0 10px;
    text-decoration: none;
}

.footer-links a:hover {
    text-decoration: underline;
}

.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
}

.center-nav {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.nav-space {
    width: 60px; /* gleiche Breite wie dein Logo, damit es symmetrisch aussieht */
}

/* ================= MOBILE OPTIMIERUNG ================= */
@media (max-width: 768px) {
    
    /* Burger Icon anzeigen */
    .burger-menu {
        display: block; 
    }

    /* Header anpassen */
    .main-header {
        justify-content: space-between; /* Logo und Icon an den Rand */
        padding: 1rem 1.5rem; 
    }
    
    /* Navigation auf Handy (Standard: versteckt) */
    .center-nav {
        /* Zentrierung vom Desktop aufheben und Dropdown-Menü vorbereiten */
        position: absolute;
        left: 0;
        transform: none;
        
        /* Layout des Dropdown-Menüs */
        display: none; /* Wichtig: Menü standardmäßig verstecken */
        top: 65px; /* Abstand unter dem Header */
        width: 100%;
        background: #1e1e1e;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
        flex-direction: column;
        padding: 10px 0;
        z-index: 15;
    }

    /* Zustand: Menü ist offen -> Einblenden */
    .main-header.nav-open .center-nav {
        display: flex;
    }

    /* Links im Mobile-Menü stylen */
    .center-nav a {
        padding: 12px 20px;
        text-align: center;
        width: 100%;
        margin-left: 0;
    }
    
    /* Content Padding korrigieren */
    section {
        padding-top: 70px; /* Auf dem Handy weniger Abstand */
    }
}
