/* Grundlegende Einstellungen für Dark Mode */
body {
    background-color: #121212;
    color: #ffffff;
    margin: 0;
    padding: 2em 1em;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Gemeinsamer Stil für alle Kacheln */
.kachel1, .kachel2 {
    background-color: #1e1e1e;
    border: 0.5em solid #2a2a2a;
    border-radius: 1.5em;
    margin-bottom: 2em;
    box-shadow: 0 0 1em rgba(0, 0, 0, 0.5);
}

/* Zeilen-Layouts */
.containerRow1, .containerRow2 {
    display: flex;
    justify-content: center;
    align-items: stretch;
    flex-wrap: wrap;
    gap: 2.5em;
    margin-bottom: 2em;
}

/* Kachelgrößen */
#kachelBild,
#kachelAbtMe,
#kachelBeruf,
#kachelHobbys,
#kachelKontakt {
    flex: 1 1 auto;
}

/* Individuelle Breiten */
#kachelBild,
#kachelAbtMe {
    max-width: 20em;
    padding: 1em;
}

#kachelBeruf {
    max-width: 40em;
    padding: 1em;
}

#kachelHobbys {
    max-width: 45em;
    padding: 1em;
}

#kachelKontakt {
    max-width: 38em;
    padding: 1em;
}

/* Bildgestaltung */
img.ich {
    border-radius: 1em;
    width: 100%;
    height: auto;
    display: block;
}

img.hobbys {
    width: 125px;
    height: 125px;
    border-radius: 0.5em;
}

/* Textgestaltung */
.titel {
    color: #ffffff;
    margin: 0.5em 0.75em 1em 0.75em;
    font-size: 1.4em;
    font-weight: bold;
}

.text {
    color: #e0e0e0;
    margin-left: 0.75em;
    margin-right: 0.75em;
    font-size: 1em;
    line-height: 1.6em;
}

/* Verbesserungen für bessere Textdarstellung */
.text p {
    margin: 0.8em 0;
}

.text p:first-child {
    margin-top: 0;
}

.text p:last-child {
    margin-bottom: 0;
}

/* Kontakt-Links */
.contact-link {
    color: #4a9eff;
    text-decoration: none;
}

.contact-link:hover,
.contact-link:focus {
    color: #6bb6ff;
    text-decoration: underline;
}

/* About Me spezielle Formatierung */
#kachelAbtMe .text p {
    margin: 0.6em 0;
    font-size: 1em;
}

#kachelAbtMe .text strong {
    color: #ffffff;
    font-weight: 600;
}

/* Hobbys Container Anpassung */
.hobbys-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5em;
    align-items: center;
    justify-content: flex-start;
    margin-top: 0.5em;
}

/* Responsive Anpassungen */
@media (max-width: 768px) {
    body {
        padding: 1.5em 0.5em;
    }
    
    .containerRow1, .containerRow2 {
        flex-direction: column;
        align-items: center;
        gap: 1.5em;
    }
    
    #kachelBild,
    #kachelAbtMe,
    #kachelBeruf,
    #kachelHobbys,
    #kachelKontakt {
        max-width: 90%;
        width: 100%;
    }
    
    .titel {
        font-size: 1.2em;
        margin: 0.5em 0.5em 0.8em 0.5em;
    }
    
    .text {
        margin-left: 0.5em;
        margin-right: 0.5em;
        font-size: 0.95em;
    }
    
    img.hobbys {
        width: 100px;
        height: 100px;
    }
    
    .hobbys-grid {
        gap: 1.2em;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    body {
        padding: 1em 0.25em;
    }
    
    .kachel1, .kachel2 {
        border-width: 0.3em;
        margin-bottom: 1.5em;
        padding: 0.75em;
    }
    
    .titel {
        font-size: 1.1em;
        margin: 0.4em 0.4em 0.7em 0.4em;
    }
    
    .text {
        margin-left: 0.4em;
        margin-right: 0.4em;
        font-size: 0.9em;
    }
    
    img.hobbys {
        width: 80px;
        height: 80px;
    }
    
    .hobbys-grid {
        gap: 1em;
    }
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #4a9eff;
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 1000;
}

.skip-link:focus {
    top: 6px;
}