/* Überschreibungen für Simple.css */
article { 
    border: none; 
    background: none; 
    padding: 0; 
}

/* Code etwas kleiner */
code, pre, kbd, samp {
    font-size: 0.9em;
}

/* Zweispalten-Layout */
.layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 3rem;
    max-width: 1100px;
    margin: 0 auto;
    padding: 1.5rem 1rem;
    grid-column: 1 / -1 !important; /* Simple.css Grid überschreiben */
}
.layout > main {
    max-width: none;
    padding: 0;
    min-width: 0; /* Verhindert dass Grid-Items über 1fr hinauswachsen */
}
.layout > aside {
    float: none; /* Simple.css Override */
    width: auto; /* Simple.css Override */
    background: none; /* Simple.css Override */
    border: none; /* Simple.css Override */
    padding: 0; /* Simple.css Override */
}
@media (max-width: 900px) {
    .layout {
        grid-template-columns: 1fr;
    }
    aside {
        border-top: 1px solid var(--border);
        padding-top: 1.5rem;
    }
}
aside h4 {
    margin-top: 0;
}
main > h1:first-child,
main > h2:first-child,
main > article:first-child > h1:first-child {
    margin-top: 0;
}
aside a,
aside a:visited {
    color: var(--text);
}
aside ul {
    padding-left: 1.2em;
}
aside li {
    margin-bottom: 0.3em;
}

/* Site-Titel im Header wie H1 stylen */
.site-title {
    font-size: 2.5rem;
    font-weight: bold;
    max-width: 1200px;
    margin: 1rem auto;
    text-align: center;
}
.site-title a {
    color: var(--text);
    text-decoration: none;
}
.site-title a:hover {
    text-decoration: underline;
}

/* Überschriften-Links: Textfarbe statt Linkfarbe */
h1 a, h2 a, h3 a, h4 a, h5 a, h6 a,
.site-title a {
    color: var(--text) !important;
}

/* Zeilenabstand in Überschriften */
h1, h2, h3, h4, h5, h6, .site-title {
    line-height: 1.3;
}

/* Datum/Zeit in Artikelliste und Einzelansicht */
article > h1,
article > h2,
article > h3,
article > h4,
article > h5,
article > h6 {
    margin-bottom: 0.2em;
}
article > time {
    display: block;
    font-size: 0.85em;
    color: var(--text-light);
    margin-bottom: 0.5em;
}

/* Alle Links: underline nur bei hover */
a {
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

/* Bilder mit Unterschrift */
figure {
    margin: 1em 0;
}
figure img {
    display: block;
    margin-bottom: 0.3em;
}
figure figcaption {
    font-size: 0.9em;
    color: var(--text-light);
    margin-top: 0;
}

/* Externe Links */
a.external::before {
    content: "";
    display: inline-block;
    width: 0.75em;
    height: 0.75em;
    margin-right: 0.15em;
    vertical-align: baseline;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.5'%3E%3Cpath d='M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6'/%3E%3Cpolyline points='15 3 21 3 21 9'/%3E%3Cline x1='10' y1='14' x2='21' y2='3'/%3E%3C/svg%3E") center/contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.5'%3E%3Cpath d='M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6'/%3E%3Cpolyline points='15 3 21 3 21 9'/%3E%3Cline x1='10' y1='14' x2='21' y2='3'/%3E%3C/svg%3E") center/contain no-repeat;
}

/* Theme Toggle Button */
#theme-toggle {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem;
}

/* Dark/Light Theme Override */
html[data-theme="dark"] {
    --bg: #212121;
    --accent-bg: #2b2b2b;
    --text: #dcdcdc;
    --text-light: #ababab;
    --border: #666;
    --accent: #ffb300;
    --accent-hover: #ffe099;
    --code: #f06292;
    --preformatted: #ccc;
    --disabled: #111;
}
html[data-theme="light"] {
    --bg: #fff;
    --accent-bg: #f5f7ff;
    --text: #212121;
    --text-light: #585858;
    --border: #898EA4;
    --accent: #0d47a1;
    --accent-hover: #1266e2;
    --code: #d81b60;
    --preformatted: #444;
    --disabled: #efefef;
}
