/*
 * wumms.css – Hyde-Design für Apfelhammer Bashblog
 * Jan Montag 2026
 */

/* =====================================================
   CSS Variables
   ===================================================== */
:root {
    --sidebar-w: 20rem;
    --sidebar-bg: #202020;
    --accent: #fa6432;
    --accent-light: #ff8c5a;
    --body-bg: #fff;
    --body-fg: #454545;
    --border: #e5e5e5;
    --muted: #9a9a9a;
    --code-bg: #f6f6f6;
    --font-sans: "PT Sans", Helvetica, Arial, sans-serif;
    --font-serif: "PT Serif", Georgia, "Times New Roman", serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, "Roboto Mono", "Courier New", monospace;
    --content-max: 38rem;
    --radius: 5px;
}

/* =====================================================
   Reset
   ===================================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* =====================================================
   Body & Grundlayout
   ===================================================== */
html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    overflow-y: scroll;
}

body {
    font-family: var(--font-serif);
/*    font-size: 1rem; */
    font-size: 20px;
    line-height: 1.65;
    color: var(--body-fg);
    background-color: var(--sidebar-bg); /* Sidebar-Farbe "scheint durch" */
}

/* Der äußere Wrapper bekommt die Content-Hintergrundfarbe
   und einen linken Abstand so groß wie die Sidebar */
#divbodyholder {
    background-color: var(--body-bg);
    margin-left: var(--sidebar-w);
    min-height: 100vh;
}

/* =====================================================
   SIDEBAR  (.headerholder > .header > #title)
   ===================================================== */
.headerholder {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-w);
    background-color: var(--sidebar-bg);
    color: rgba(255, 255, 255, 0.6);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 2rem 1.25rem 1.5rem;
    /* Flex-Column damit Footer unten klebt */
    display: flex;
    flex-direction: column;
    z-index: 200;
}

/* Blog-Titel */
.headerholder h1.nomargin,
.headerholder #title h1 {
    font-family: var(--font-sans);
    font-size: 2.5rem;
    font-weight: 900;
    line-height: 1.15;
    margin: 0 0 0.5rem;
    letter-spacing: -0.02em;
}
.headerholder h1.nomargin a,
.headerholder #title h1 a {
    color: #fff;
    text-decoration: none;
}
.headerholder h1.nomargin a:hover,
.headerholder #title h1 a:hover {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
}

/* Beschreibung / Untertitel */
.headerholder #description {
    font-family: var(--font-sans);
/*    font-size: 0.82rem; */
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 1.5rem;
    line-height: 1.4;
}

/* HR in der Sidebar ausblenden */
.headerholder hr {
    display: none;
}

/* Navigation */
.headerholder nav.menu {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.headerholder nav.menu a {
    display: block;
    padding: 0.3rem 0;
    font-family: var(--font-sans);
/*    font-size: 0.875rem; */
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    transition: color 0.15s ease;
}
.headerholder nav.menu a:first-child {
    border-top: none;
}
.headerholder nav.menu a:hover {
    color: #fff;
    text-decoration: none;
}

/* Pipe-Trenner im nav ausblenden – wir stylen vertical */
.headerholder nav.menu {
    /* Das HTML hat "| " als Text zwischen den Links – wir können
       ihn nicht per CSS entfernen, aber wir machen ihn unsichtbar */
    color: transparent;
    font-size: 0;
}
.headerholder nav.menu a {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
}

/* Sidebar-Footer (Sticky unten) */
.headerholder::after {
    content: "© Jan Montag";
    display: block;
    margin-top: auto;
    padding-top: 2rem;
    font-family: var(--font-sans);
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.25);
}

/* =====================================================
   CONTENT-BEREICH  (#divbody > .content)
   ===================================================== */
#divbody {
    max-width: calc(var(--content-max) + 4rem);
    margin: 0 auto;
    padding: 2.5rem 2rem 4rem;
}

.content {
    max-width: var(--content-max);
}

/* =====================================================
   Typografie
   ===================================================== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-sans);
    font-weight: 700;
    line-height: 1.25;
    color: #313131;
    letter-spacing: -0.02em;
    margin: 2rem 0 0.6rem;
}
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.2rem; }
h4, h5, h6 { font-size: 1rem; }

p {
    margin: 0 0 1rem;
}

a {
    color: var(--accent);
    text-decoration: none;
}
a:hover, a:focus, a:active {
    text-decoration: underline;
}

/* .ablack = schwarze Links für Titel */
a.ablack {
    color: #313131;
    text-decoration: none;
}
a.ablack:hover {
    color: var(--accent);
    text-decoration: none;
}

strong { color: #313131; }

ul, ol {
    margin: 0 0 1rem 1.5rem;
}
ul li ul, ul li ol,
ol li ul, ol li ol {
    margin: 0 0 0 1.5rem;
}

blockquote {
    margin: 0 0 1rem;
    padding: 0.5rem 1rem;
    border-left: 3px solid var(--accent);
    color: var(--muted);
    font-style: italic;
}
blockquote p:last-child { margin-bottom: 0; }

hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 1.5rem 0;
}

img {
    max-width: 100%;
    display: block;
    margin: 0 auto 1rem;
    border-radius: var(--radius);
}

figure { margin: 1rem 0; }
figure figcaption {
    font-family: var(--font-mono);
    font-size: 0.75em;
    text-align: center;
    color: var(--muted);
    margin-top: 0.4rem;
}

/* =====================================================
   Code
   ===================================================== */
code, kbd, samp {
    font-family: var(--font-mono);
    font-size: 0.875em;
    background: var(--code-bg);
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 4px;
    padding: 0.1em 0.35em;
    white-space: nowrap;
}

pre {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    line-height: 1.5;
    background: var(--code-bg);
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    overflow: auto;
    max-height: 70vh;
    margin: 0 0 1rem;
    white-space: pre;
    tab-size: 4;
}
pre > code {
    display: block;
    padding: 0;
    background: transparent;
    border: none;
    white-space: inherit;
    font-size: inherit;
}
p code {
    background: var(--code-bg);
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 4px;
    padding: 0.1em 0.35em;
}

.highlight > pre,
pre.example {
    background: var(--code-bg);
    border: 1px solid rgba(250, 100, 50, 0.2);
    border-radius: var(--radius);
    padding: 1rem;
    overflow: auto;
    max-height: 70vh;
    margin: 0 0 1rem;
    font-family: var(--font-mono);
    font-size: 0.875rem;
}

/* =====================================================
   Tabellen
   ===================================================== */
table {
    width: 100%;
    font-size: 0.9rem;
    border-collapse: collapse;
    margin: 0 0 1.5rem;
}
table th {
    font-family: var(--font-sans);
    font-weight: 700;
    text-align: left;
    padding: 0.4rem 0.6rem;
    border-bottom: 2px solid var(--border);
}
table td {
    padding: 0.4rem 0.6rem;
    border-bottom: 1px solid var(--border);
}
table tr:nth-child(even) td {
    background-color: rgba(0,0,0,0.025);
}

/* =====================================================
   Artikel / Posts
   ===================================================== */
article.h-entry {
    margin-bottom: 2.5rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid var(--border);
}
article.h-entry:last-of-type {
    border-bottom: none;
}

/* Artikel-Titel */
article h3.p-name {
    font-size: 1.3rem;
    margin-top: 0;
    margin-bottom: 0.3rem;
    line-height: 1.3;
}

/* Datum / Autor */
article .subtitle {
    font-family: var(--font-sans);
    font-size: 0.8rem;
    color: var(--muted);
    font-weight: normal;
    margin-bottom: 1rem;
    margin-top: 0;
}

/* "Read more" Link */
p.readmore a {
    font-family: var(--font-sans);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--accent);
}
p.readmore a:hover {
    text-decoration: underline;
}

/* Artikel-internes HR (Trennlinie zwischen Posts) ausblenden –
   wir nutzen border-bottom des article-Elements */
article hr {
    display: none;
}
article br + hr {
    display: none;
}

/* =====================================================
   "View more posts" / All posts Zeile
   ===================================================== */
#all_posts {
    font-family: var(--font-sans);
    font-size: 0.875rem;
    color: var(--muted);
    margin: 2rem 0 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}
#all_posts a {
    color: var(--accent);
}

/* =====================================================
   Footer
   ===================================================== */
#footer {
    font-family: var(--font-sans);
    font-size: 0.8rem;
    color: var(--muted);
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    line-height: 1.6;
}
#footer a {
    color: var(--muted);
}
#footer a:hover {
    color: var(--accent);
}

/* IndieWeb Webring & Hitcounter */
#divbodyholder > a,
#divbody > a {
    font-family: var(--font-sans);
    font-size: 0.875rem;
}

/* =====================================================
   Tags
   ===================================================== */
.tags {
    list-style: none;
    margin: -0.5rem 0 1.5rem;
    padding: 0;
}
.tags li {
    display: inline;
    margin-right: 0.4em;
}
.tags li a {
    font-family: var(--font-sans);
    font-size: 0.78rem;
    background: #f0f0f0;
    color: #666;
    padding: 0.15em 0.5em;
    border-radius: 3px;
    text-decoration: none;
}
.tags li a:hover {
    background: var(--accent);
    color: #fff;
}

/* =====================================================
   Post-Liste (all_posts.html)
   ===================================================== */
.posts {
    list-style: none;
    margin: 0;
    padding: 0;
}
.posts .post a {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    padding: 0.4em 0;
    color: var(--body-fg);
    font-family: var(--font-sans);
    border-bottom: 1px solid var(--border);
}
.posts .post a:hover {
    color: var(--accent);
    text-decoration: none;
}
.posts .post date,
.posts .post time {
    flex-shrink: 0;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--muted);
    width: 6rem;
}

/* =====================================================
   Fußnoten
   ===================================================== */
.footnote-definition {
    margin: 1rem 0;
    font-size: 0.875em;
}
.footnote-definition sup {
    float: left;
    margin-left: -1.5em;
}
.footnote-definition .footnote-body {
    margin: 0.4em 0;
    padding: 0.5em 1em;
    border-left: 3px solid rgba(250, 100, 50, 0.35);
    background: rgba(250, 100, 50, 0.04);
}
.footnote-definition .footnote-body p:only-child {
    margin: 0;
}

/* =====================================================
   Webmentions
   ===================================================== */
.webmention-likes-reposts {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}
.webmention-likes-reposts h4,
.webmention-replies h4 {
    font-family: var(--font-sans);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0 0 0.75rem;
}
.webmention-avatars-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}
.webmention-avatar-link {
    display: block;
    transition: transform 0.2s;
    text-decoration: none;
}
.webmention-avatar-link:hover { transform: scale(1.1); }
.webmention-avatars-grid .webmention-avatar {
    width: 32px; height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(250, 100, 50, 0.3);
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    color: white; font-weight: bold; font-size: 0.7em;
    display: flex; align-items: center; justify-content: center;
}
.webmention-replies { margin-top: 1rem; }
.webmention-list { list-style: none; padding: 0; }
.webmention-item {
    display: flex; align-items: flex-start;
    padding: 1rem 0; gap: 0.75rem;
    border-bottom: 1px solid var(--border);
}
.webmention-item:last-child { border-bottom: none; }
.webmention-author { flex: 0 0 44px; display: flex; justify-content: center; }
.webmention-avatar {
    width: 40px; height: 40px; border-radius: 50%;
    object-fit: cover; border: 2px solid rgba(250, 100, 50, 0.2);
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    color: white; font-weight: bold; font-size: 0.8em;
    display: flex; align-items: center; justify-content: center;
}
.webmention-content { flex: 1; min-width: 0; }
.webmention-author-name { font-weight: bold; color: #333; margin-bottom: 0.25rem; display: block; }
.webmention-text { line-height: 1.5; margin: 0.4rem 0; color: #444; }
.webmention-text p { margin: 0.25rem 0; }
.webmention-meta { font-size: 0.8em; color: var(--muted); margin-top: 0.4rem; }
.webmention-meta a { color: var(--muted); text-decoration: none; border-bottom: 1px dotted #ccc; }
.webmention-meta a:hover { color: var(--accent); }

/* =====================================================
   Hilfsklassen
   ===================================================== */
.hidden {
    display: none;
    visibility: hidden;
    height: 0; width: 0;
}

/* =====================================================
   RESPONSIVE – Mobile (keine feste Sidebar)
   ===================================================== */
@media (max-width: 48em) {

    body {
        background-color: var(--body-bg);
    }

    #divbodyholder {
        margin-left: 0;
    }

    .headerholder {
        position: relative;
        width: 100%;
        height: auto;
        padding: 1.25rem 1.25rem 1rem;
        flex-direction: column;
    }

    /* Nav horizontal auf Mobil */
    .headerholder nav.menu {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0;
        border-top: 1px solid rgba(255,255,255,0.1);
        padding-top: 0.75rem;
        margin-top: 0.75rem;
    }
    .headerholder nav.menu a {
        border-top: none;
        padding: 0.2rem 0.6rem 0.2rem 0;
    }

    .headerholder::after {
        display: none;
    }

    #divbody {
        padding: 1.5rem 1.25rem 3rem;
    }
}

/* Mittlere Breite */
@media (min-width: 48em) and (max-width: 58em) {
    :root { --sidebar-w: 13rem; }
}

/* Große Bildschirme */
@media (min-width: 64em) {
    :root {
        --sidebar-w: 18rem;
        --content-max: 42rem;
    }
    html { font-size: 17px; }
}

/* =====================================================
   DARK MODE
   ===================================================== */
@media (prefers-color-scheme: dark) {
    :root {
        --body-bg: #1a1a1a;
        --body-fg: #d8d8d8;
        --border: #2e2e2e;
        --muted: #777;
        --code-bg: #242424;
        --sidebar-bg: #111;
    }

    body { background-color: var(--sidebar-bg); }
    #divbodyholder { background-color: var(--body-bg); }

    h1, h2, h3, h4, h5, h6, strong { color: #eee; }
    a.ablack { color: #eee; }
    a.ablack:hover { color: var(--accent-light); }
    a { color: var(--accent-light); }

    blockquote { background: #222; color: #999; }

    code, kbd, samp {
        background: #2a2a2a; border-color: #3a3a3a; color: #eee;
    }
    pre, .highlight > pre, pre.example {
        background: #1e1e1e; border-color: #333; color: #ddd;
    }
    p code { background: #2a2a2a; border-color: #3a3a3a; color: #eee; }

    table tr:nth-child(even) td { background: rgba(255,255,255,0.04); }
    table th, table td { border-color: #333; }

    .tags li a { background: #272727; color: #888; }
    .tags li a:hover { background: var(--accent); color: #fff; }

    .posts .post a { color: #d0d0d0; border-bottom-color: #2e2e2e; }
    .posts .post a:hover { color: var(--accent-light); }

    #all_posts { border-top-color: #2e2e2e; }
    #footer { border-top-color: #2e2e2e; color: #555; }
    #footer a { color: #555; }
    #footer a:hover { color: var(--accent-light); }

    .webmention-author-name { color: #eee; }
    .webmention-text { color: #bbb; }
    .webmention-item { border-bottom-color: #2e2e2e; }
    .webmention-meta a:hover { color: var(--accent-light); }

    .footnote-definition .footnote-body {
        background: rgba(255,255,255,0.03);
        border-left-color: rgba(250, 100, 50, 0.4);
    }
}
