:root {
    --primary-color: #007bff; /* Blauer Hauptakzent */
    --secondary-color: #6c757d; /* Grauer Sekundärakzent */
    --background-color: #f8f9fa; /* Heller Hintergrund */
    --text-color: #343a40; /* Dunkler Text */
    --card-background: #ffffff; /* Weißer Hintergrund für Karten */
    --font-family: 'Poppins', sans-serif;
    --container-width: 960px;
    --section-padding: 60px 0;
    --border-radius: 8px;
    --box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

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

body {
    font-family: var(--font-family);
    line-height: 1.6;
    background-color: var(--background-color);
    color: var(--text-color);
    font-size: 16px;
}

.container {
    width: 90%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 15px;
}

header {
    background-color: var(--card-background);
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

header nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header .logo {
    font-size: 1.8em;
    font-weight: 700;
    color: var(--primary-color);
}

header ul {
    list-style: none;
    display: flex;
}

header ul li {
    margin-left: 25px;
}

header ul li a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    transition: color 0.3s ease;
}

header ul li a:hover,
header ul li a.active {
    color: var(--primary-color);
}

#hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--section-padding);
    min-height: 80vh;
    background-color: var(--card-background);
}
#hero.container {
    padding: var(--section-padding);
}

#hero .hero-text {
    flex: 1;
    padding-right: 40px;
    margin-left: 20px;
}

#hero h1 {
    font-size: 3.2em;
    margin-bottom: 0.5em;
    color: var(--text-color);
    font-weight: 700;
}

#hero h1 span {
    color: var(--primary-color);
}

#hero p {
    font-size: 1.2em;
    margin-bottom: 1.5em;
    color: var(--secondary-color);
}

#hero .hero-image {
    flex-basis: 40%;
    text-align: center;
}

#hero .hero-image img {
    max-width: 300px; /* Größe anpassen */
    height: auto;
    border-radius: 50%; /* Rundes Bild */
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
    border: 5px solid var(--primary-color);
}

.cta-button {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 12px 25px;
    text-decoration: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: var(--box-shadow);
}

.cta-button:hover {
    background-color: #0056b3; /* Dunkleres Blau beim Hover */
    transform: translateY(-2px);
}

.section-padding {
    padding: var(--section-padding);
}

h2 {
    text-align: center;
    font-size: 2.5em;
    margin-bottom: 1em;
    color: var(--primary-color);
    font-weight: 700;
}

/* Über mich Sektion */
.about-content {
    display: flex;
    align-items: flex-start; /* Bilder und Text oben bündig */
    gap: 40px; /* Abstand zwischen Text und Bild */
}

.about-text {
    flex: 2; /* Text nimmt mehr Platz ein */
}

.about-text p {
    margin-bottom: 1em;
    font-size: 1.1em;
}

.about-image {
    flex: 1; /* Bild nimmt weniger Platz ein */
    text-align: center;
}

.about-image img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}


/* Fähigkeiten Sektion */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Responsives Grid */
    gap: 30px;
}

.skill-card {
    background-color: var(--card-background);
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.skill-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.skill-icon {
    width: 60px; /* Größe der Icons */
    height: 60px;
    margin-bottom: 15px;
    object-fit: contain; /* Stellt sicher, dass das Icon korrekt skaliert wird */
}

.skill-card h3 {
    font-size: 1.4em;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.skill-card p {
    font-size: 0.95em;
    color: var(--secondary-color);
}

/* Projekte Sektion */
.projekte-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.projekt-card {
    background-color: var(--card-background);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden; /* Stellt sicher, dass das Bild nicht über die Karte hinausragt */
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
}

.projekt-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.projekt-card img {
    width: 100%;
    height: 200px; /* Feste Höhe für Projektbilder */
    object-fit: cover; /* Bild wird passend zugeschnitten und skaliert */
}

.projekt-card-content {
    padding: 20px;
    flex-grow: 1; /* Sorgt dafür, dass der Inhalt den verfügbaren Platz einnimmt */
    display: flex;
    flex-direction: column;
}

.projekt-card-content h3 {
    font-size: 1.5em;
    color: var(--primary-color);
    margin-bottom: 10px;
    padding: 20px;
}

.projekt-card-content p {
    font-size: 1em;
    margin-bottom: 15px;
    flex-grow: 1; /* Lässt den Text den verfügbaren Platz füllen */
}

.projekt-card-content .projekt-link {
    display: inline-block;
    background-color: var(--secondary-color);
    color: white;
    padding: 8px 15px;
    text-decoration: none;
    border-radius: 5px;
    font-size: 0.9em;
    align-self: flex-start; /* Button am unteren Rand ausrichten */
    transition: background-color 0.3s ease;
}

.projekt-card-content .projekt-link:hover {
    background-color: #545b62; /* Dunkleres Grau beim Hover */
}

/* Kontakt Sektion */
#kontakt {
    text-align: center;
}

#kontakt p {
    margin-bottom: 0.8em;
    font-size: 1.1em;
}

#kontakt a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

#kontakt a:hover {
    text-decoration: underline;
}

/* Footer */
footer {
    background-color: var(--text-color);
    color: var(--background-color);
    text-align: center;
    padding: 1.5rem 0;
    margin-top: 40px;
}

/* Responsive Design Anpassungen */
@media (max-width: 768px) {
    #hero {
        flex-direction: column-reverse; /* Bild über Text auf kleinen Bildschirmen */
        text-align: center;
        padding-top: 40px;
        padding-bottom: 40px;
    }

    #hero .hero-text {
        padding-right: 0;
        margin-top: 30px;
    }

    #hero h1 {
        font-size: 2.5em;
    }
    #hero .hero-image img {
        max-width: 200px;
    }

    header nav {
        flex-direction: column;
        align-items: center;
    }
    header .logo {
        margin-bottom: 10px;
    }
    header ul {
        margin-top: 10px;
        padding-left: 0; /* Zentriert die Nav-Items */
    }
    header ul li {
        margin: 0 10px;
    }

    .about-content {
        flex-direction: column;
    }
    .about-image {
        margin-top: 20px;
    }

    h2 {
        font-size: 2em;
    }

    .skills-grid {
        grid-template-columns: 1fr; /* Eine Spalte auf kleinen Bildschirmen */
    }
    .projekte-grid {
        grid-template-columns: 1fr; /* Eine Spalte auf kleinen Bildschirmen */
    }
}
