/* ============================================================
   GRUNDEINSTELLUNGEN
   Variablen (Farben) zentral festlegen, damit man sie
   leicht an einer Stelle ändern kann.
   ============================================================ */
:root {
    --primary: #6c8cff;        /* Hauptfarbe (freundliches Blau) */
    --primary-dark: #4a6bf0;   /* dunklere Variante für Hover */
    --accent: #ff9eb5;         /* Akzentfarbe (sanftes Rosa) */
    --bg: #f7f9fc;             /* heller Seitenhintergrund */
    --card: #ffffff;           /* Hintergrund für Karten */
    --text: #2b2f38;           /* Haupttextfarbe (dunkelgrau) */
    --text-light: #6b7280;     /* hellere Textfarbe */
    --radius: 16px;            /* runde Ecken */
    --shadow: 0 6px 20px rgba(0, 0, 0, 0.06); /* weicher Schatten */
}

/* Alle Abstände zurücksetzen und Box-Modell vereinheitlichen */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Allgemeine Einstellungen für die ganze Seite */
body {
    font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

/* ============================================================
   KOPFBEREICH & NAVIGATION
   ============================================================ */
.header {
    display: flex;                 /* Logo und Menü nebeneinander */
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;               /* bricht auf dem Handy um */
    gap: 12px;
    background-color: var(--card);
    padding: 16px 24px;
    box-shadow: var(--shadow);
    position: sticky;              /* bleibt beim Scrollen oben kleben */
    top: 0;
    z-index: 100;
}

/* Name oben links */
.logo {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-dark);
}

/* Navigationslinks */
.nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.nav a {
    text-decoration: none;
    color: var(--text);
    padding: 8px 14px;
    border-radius: 999px;          /* abgerundete "Pillen"-Form */
    transition: background-color 0.2s, color 0.2s;
}

/* Mauszeiger über dem Link */
.nav a:hover {
    background-color: var(--bg);
}

/* Aktuell aktive Seite hervorheben */
.nav a.active {
    background-color: var(--primary);
    color: #ffffff;
}

/* ============================================================
   ALLGEMEINE LAYOUT-BAUSTEINE
   ============================================================ */
main {
    max-width: 900px;              /* Inhalt nicht zu breit werden lassen */
    margin: 0 auto;                /* zentrieren */
    padding: 24px 20px 60px;
}

/* Abstand zwischen den einzelnen Abschnitten */
.section {
    margin-top: 40px;
}

.section h2 {
    font-size: 1.5rem;
    margin-bottom: 18px;
}

/* Fließtext */
.text {
    color: var(--text-light);
    font-size: 1.05rem;
}

/* Seitentitel oben auf Unterseiten */
.page-title {
    text-align: center;
    margin-top: 20px;
}

.page-title h1 {
    font-size: 2rem;
}

.subtitle {
    color: var(--text-light);
    margin-top: 6px;
}

/* ============================================================
   SCHALTFLÄCHEN (BUTTONS)
   ============================================================ */
.btn {
    display: inline-block;
    background-color: var(--primary);
    color: #ffffff;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 999px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.2s, transform 0.1s;
}

.btn:hover {
    background-color: var(--primary-dark);
}

/* leichtes "Drücken"-Gefühl beim Klicken */
.btn:active {
    transform: scale(0.97);
}

/* Variante mit Umriss statt Füllung */
.btn-outline {
    background-color: transparent;
    color: var(--primary-dark);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background-color: var(--primary);
    color: #ffffff;
}

/* ============================================================
   STARTSEITE: HERO-BEREICH
   ============================================================ */
.hero {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #eef3ff, #fdeef3); /* zarter Farbverlauf */
    border-radius: var(--radius);
    margin-top: 20px;
}

.hero h1 {
    font-size: 2.2rem;
    margin-bottom: 8px;
}

/* Rundes Profilbild (hier mit Initialen als Platzhalter) */
.avatar {
    width: 110px;
    height: 110px;
    margin: 0 auto 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #ffffff;
    font-size: 2.4rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Knopf-Bereich unter dem Hero-Text */
.hero-buttons {
    margin-top: 24px;
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;               /* untereinander auf kleinen Displays */
}

/* ============================================================
   INFO-KÄRTCHEN (Steckbrief & Kontakt)
   Das Raster passt die Spaltenzahl automatisch an die Breite an.
   ============================================================ */
.info-grid,
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
}

.info-card,
.contact-card {
    background-color: var(--card);
    border-radius: var(--radius);
    padding: 22px 18px;
    text-align: center;
    box-shadow: var(--shadow);
    text-decoration: none;
    color: var(--text);
    transition: transform 0.15s;
}

/* Kärtchen heben sich beim Überfahren leicht an */
.info-card:hover,
.contact-card:hover {
    transform: translateY(-4px);
}

.info-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 8px;
}

.info-card h3,
.contact-card h3 {
    font-size: 1rem;
    margin-bottom: 4px;
}

.info-card p,
.contact-card p {
    color: var(--text-light);
}

/* ============================================================
   ZEITLEISTE (Lebenslauf)
   ============================================================ */
.timeline {
    border-left: 3px solid var(--primary);
    padding-left: 22px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.timeline-item {
    position: relative;
}

/* kleiner Punkt auf der Linie */
.timeline-item::before {
    content: "";
    position: absolute;
    left: -31px;
    top: 4px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: var(--primary);
    border: 3px solid var(--bg);
}

.timeline-date {
    display: inline-block;
    background-color: var(--bg);
    color: var(--primary-dark);
    font-size: 0.85rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 999px;
    margin-bottom: 4px;
}

.timeline-item h3 {
    font-size: 1.1rem;
}

.timeline-item p {
    color: var(--text-light);
}

/* ============================================================
   FÄHIGKEITEN (Skill-Balken)
   ============================================================ */
.skills {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* Beschriftung über dem Balken: Name links, Prozent rechts */
.skill-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
    font-weight: 600;
}

/* grauer Hintergrundbalken */
.skill-bar {
    background-color: #e6e9f2;
    border-radius: 999px;
    height: 12px;
    overflow: hidden;
}

/* farbiger Füllbalken (Breite wird im HTML gesetzt) */
.skill-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 999px;
}

/* ============================================================
   TAGS / SCHLAGWÖRTER
   ============================================================ */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.tag {
    background-color: #eef1fb;
    color: var(--primary-dark);
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* ============================================================
   PROJEKTKARTEN
   ============================================================ */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.project-card {
    background-color: var(--card);
    border-radius: var(--radius);
    overflow: hidden;              /* runde Ecken auch beim Kopfbereich */
    box-shadow: var(--shadow);
    transition: transform 0.15s;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-5px);
}

/* farbiger Kopf der Projektkarte mit großem Symbol */
.project-thumb {
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}

/* drei verschiedene Hintergrundfarben für Abwechslung */
.thumb-1 { background: linear-gradient(135deg, #c7f0d8, #9be3c0); }
.thumb-2 { background: linear-gradient(135deg, #ffe0ec, #ffc2d8); }
.thumb-3 { background: linear-gradient(135deg, #dfe7ff, #c0cdff); }

.project-body {
    padding: 18px;
}

.project-body h3 {
    margin-bottom: 8px;
}

.project-body p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* ============================================================
   KONTAKTFORMULAR
   ============================================================ */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-width: 500px;
}

.contact-form label {
    font-weight: 600;
    margin-top: 12px;
}

/* Eingabefelder und Textfeld einheitlich gestalten */
.contact-form input,
.contact-form textarea {
    padding: 12px 14px;
    border: 1px solid #d5dae6;
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    background-color: var(--card);
}

/* hervorheben, wenn ein Feld angeklickt ist */
.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(108, 140, 255, 0.2);
}

.contact-form button {
    margin-top: 18px;
    align-self: flex-start;        /* Knopf nur so breit wie nötig */
}

/* ============================================================
   FUSSBEREICH
   ============================================================ */
.footer {
    text-align: center;
    padding: 24px 20px;
    color: var(--text-light);
    font-size: 0.9rem;
    border-top: 1px solid #e6e9f2;
    margin-top: 40px;
}

/* ============================================================
   RESPONSIVE ANPASSUNGEN
   Bei schmalen Bildschirmen (Handy) ein paar Dinge verkleinern
   und untereinander anordnen.
   ============================================================ */
@media (max-width: 600px) {
    .header {
        flex-direction: column;    /* Logo über dem Menü */
        align-items: flex-start;
    }

    .nav {
        width: 100%;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .hero-buttons {
        flex-direction: column;    /* Knöpfe untereinander */
    }

    .btn {
        width: 100%;               /* Knöpfe füllen die Breite */
        text-align: center;
    }

    .contact-form button {
        width: 100%;
    }
}