/* ===================================
   angermeier.net — main stylesheet
   =================================== */

/* === Design Tokens === */
:root {
    /* Backgrounds */
    --color-bg:           #0f0f1a;
    --color-bg-secondary: #1a1a2e;
    --color-bg-card:      #1e1e35;
    --color-bg-hover:     #25254a;

    /* Text */
    --color-text-primary:   #e8e3f0;
    --color-text-secondary: #9d8fb0;
    --color-text-muted:     #6b5f80;

    /* Accent — Lila */
    --color-accent:       #7c5cbf;
    --color-accent-light: #a07de0;
    --color-accent-dark:  #5a3d9e;

    /* Hero */
    --color-hero-bg:   #0a0a14;
    --color-hero-bg-2: #12102a;

    /* Tags */
    --color-tag-dev:   #1a2a4a;
    --color-tag-ai:    #2d1f5e;
    --color-tag-ham:   #1a3d2b;
    --color-tag-funk:  #3d2a0f;

    /* Borders */
    --color-border:       rgba(255, 255, 255, 0.08);
    --color-border-hover: rgba(255, 255, 255, 0.16);

    /* Typography */
    --font-sans:  'Inter', system-ui, -apple-system, sans-serif;
    --font-mono:  'JetBrains Mono', 'Fira Code', monospace;

    --gh-font-heading: 'Inter', system-ui, sans-serif;
    --gh-font-body:    'Inter', system-ui, sans-serif;

    /* Spacing & Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

@media (prefers-color-scheme: light) {
    :root {
        --color-bg:             #ffffff;
        --color-bg-secondary:   #f5f3fa;
        --color-bg-card:        #ffffff;
        --color-text-primary:   #1a1a2e;
        --color-text-secondary: #5a4f6e;
        --color-border:         rgba(0, 0, 0, 0.08);
    }
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    color-scheme: dark light;
}

body {
    font-family: var(--font-sans);
    line-height: 1.6;
    color: var(--color-text-primary);
    background: var(--color-bg);
}

/* === Layout === */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

main {
    padding: 2rem 0;
}

/* === Navigation === */
.site-nav {
    position: sticky;
    top: 0;
    z-index: 9997;
    border-bottom: 1px solid var(--color-border);
    background: color-mix(in srgb, var(--color-bg) 82%, transparent);
    backdrop-filter: blur(0);
    transition: backdrop-filter 180ms ease, background-color 180ms ease;
    -webkit-backdrop-filter: blur(0);
}

.site-nav.is-scrolled {
    background: color-mix(in srgb, var(--color-bg) 74%, transparent);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.site-nav .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    min-height: 4.25rem;
}

.site-nav-brand {
    display: inline-flex;
    align-items: baseline;
    gap: 0.55rem;
    min-width: 0;
}

.site-nav-logo {
    font-weight: 700;
    letter-spacing: 0.01em;
}

.site-nav-divider {
    color: var(--color-text-muted);
}

.site-nav-subtitle {
    color: var(--color-text-secondary);
    font-size: 0.875rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 26ch;
}

.site-nav-toggle {
    display: none;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: transparent;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0.55rem;
    cursor: pointer;
}

.site-nav-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    border-radius: 999px;
    background: var(--color-text-primary);
}

.site-nav-toggle span + span {
    margin-top: 0.35rem;
}

.site-nav-links {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.site-nav-links .nav {
    display: flex;
    align-items: center;
    gap: 1rem;
    list-style: none;
}

.site-nav-links .nav li {
    margin: 0;
}

.site-nav a {
    text-decoration: none;
    color: var(--color-text-primary);
    font-weight: 500;
}

.site-nav a:hover {
    color: var(--color-accent-light);
}

.site-nav .nav-current a {
    color: var(--color-accent-light);
}

.site-nav-rss {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    border: 1px solid transparent;
}

.site-nav-rss svg {
    width: 1.1rem;
    height: 1.1rem;
    fill: currentColor;
}

.site-nav-rss:hover {
    border-color: var(--color-border-hover);
}

.site-nav-backdrop {
    display: none;
}

@media (max-width: 860px) {
    .site-nav-subtitle {
        display: none;
    }

    .site-nav-toggle {
        display: inline-block;
        order: 3;
    }

    .site-nav-links {
        position: fixed;
        inset: 0 0 0 auto;
        width: min(84vw, 20rem);
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        gap: 1.5rem;
        padding: 5.25rem 1.25rem 1.25rem;
        background: var(--color-bg-secondary);
        border-left: 1px solid var(--color-border);
        transform: translateX(102%);
        transition: transform 200ms ease;
        z-index: 9999;
    }

    .site-nav-links .nav {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.2rem;
    }

    .site-nav-links .nav a {
        display: block;
        width: 100%;
        padding: 0.45rem 0;
    }

    .site-nav-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(10, 12, 18, 0.35);
        backdrop-filter: blur(2px);
        -webkit-backdrop-filter: blur(2px);
        opacity: 0;
        pointer-events: none;
        transition: opacity 200ms ease;
        z-index: 9998;
    }

    .site-nav.is-open .site-nav-links {
        transform: translateX(0);
    }

    .site-nav.is-open .site-nav-backdrop {
        opacity: 1;
        pointer-events: auto;
    }
}

/* === Site header === */
.site-header {
    display: none;
}

.site-title {
    font-size: 1.75rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--color-text-primary);
}

.site-description {
    margin-top: 0.25rem;
    color: var(--color-text-secondary);
}

/* === Homepage hero === */
.hero {
    margin-bottom: 2rem;
    min-height: 25rem;
    display: flex;
    align-items: flex-end;
    background-image: linear-gradient(135deg, #0d1b3e 0%, #162447 100%);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero .container {
    width: 100%;
}

.hero--fallback {
    background-image: linear-gradient(135deg, #0d1b3e 0%, #162447 100%);
}

.hero--entwicklung {
    --color-hero-bg: #0d1b3e;
    --color-hero-bg-2: #162447;
}

.hero--ki {
    --color-hero-bg: #1a0d3e;
    --color-hero-bg-2: #2d1f5e;
}

.hero--schinken {
    --color-hero-bg: #0d2e1a;
    --color-hero-bg-2: #1a3d2b;
}

.hero--amateurfunk {
    --color-hero-bg: #2e1a0d;
    --color-hero-bg-2: #3d2a0f;
}

.hero--default {
    --color-hero-bg: #0d1b3e;
    --color-hero-bg-2: #162447;
}

.hero__content {
    max-width: 48rem;
    padding: clamp(1.2rem, 3vw, 2.5rem) 0;
}

.hero__tag {
    display: inline-block;
    margin-bottom: 0.85rem;
    padding: 0.2rem 0.65rem;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: var(--radius-sm);
    color: #dbe7ff;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 0.75rem;
    font-weight: 600;
}

.hero__title {
    line-height: 1.15;
    font-size: clamp(1.9rem, 3.2vw, 2.8rem);
}

.hero__title a {
    color: var(--color-text-primary);
    text-decoration: none;
}

.hero__title a:hover {
    text-decoration: underline;
}

.hero__meta {
    margin-top: 1rem;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    color: rgba(240, 242, 248, 0.78);
}

.hero__meta span::before {
    content: "•";
    margin-right: 0.65rem;
}

.hero__link {
    margin-top: 1.1rem;
    display: inline-flex;
    color: #dbe7ff;
    font-weight: 600;
    text-underline-offset: 0.15rem;
}

/* === Homepage terminal === */
.terminal-section {
    margin: 2rem auto;
}

.terminal {
    width: 100%;
    background: #0a0a0f;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    max-width: 680px;
    margin: 0 auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    cursor: pointer;
}

.terminal__bar {
    background: #1a1a2e;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--color-border);
}

.terminal__btn {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.terminal__btn--red { background: #ff5f57; }
.terminal__btn--yellow { background: #febc2e; }
.terminal__btn--green { background: #28c840; }

.terminal__title {
    margin-left: 8px;
    font-size: 0.8rem;
    color: var(--color-text-secondary);
}

.terminal__body {
    padding: 20px;
    min-height: 200px;
    color: #e8e3f0;
    line-height: 1.8;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.terminal__line--cmd { color: #a07de0; }
.terminal__line--out { color: #c8c0d8; }
.terminal__line--empty { height: 0.8rem; }

.terminal__cursor {
    display: inline-block;
    width: 10px;
    height: 1.1em;
    background: #a07de0;
    vertical-align: text-bottom;
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* === Homepage channels === */
.channels {
    margin: 2rem 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.channel {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    text-decoration: none;
    display: block;
    transition: background 0.2s;
}

.channel:hover,
.channel:focus-visible {
    background: var(--color-bg-hover);
}

.channel__name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: 0.25rem;
}

.channel__count {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
}

@media (max-width: 768px) {
    .channels {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 480px) {
    .channels {
        grid-template-columns: 1fr;
    }
}

.post-list {
    padding-top: 0.25rem;
}

@media (max-width: 640px) {
    .hero {
        min-height: 18.75rem;
    }

    .hero__meta {
        flex-wrap: wrap;
        gap: 0.4rem;
    }

    .terminal__body {
        padding: 16px;
    }
}

/* === Post card === */
.post-grid,
.post-feed {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.post-card {
    min-width: 0;
}

.post-card__link {
    display: grid;
    grid-template-rows: 12rem auto;
    text-decoration: none;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: background-color 160ms ease, border-color 160ms ease;
}

.post-card__link:hover,
.post-card__link:focus-visible {
    background: var(--color-bg-hover);
    border-color: var(--color-border-hover);
}

.post-card__image {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.post-card__image--fallback {
    background-image: linear-gradient(140deg, #2a3146 0%, #171b29 100%);
}

.post-card__image--dev {
    background-image: linear-gradient(140deg, #214061 0%, #17253e 100%);
}

.post-card__image--ai {
    background-image: linear-gradient(140deg, #3c2a7a 0%, #1b1537 100%);
}

.post-card__image--schinken {
    background-image: linear-gradient(140deg, #22533a 0%, #152a1f 100%);
}

.post-card__image--funk {
    background-image: linear-gradient(140deg, #6a4211 0%, #2f1c08 100%);
}

.post-card__content {
    display: grid;
    gap: 0.8rem;
    padding: 1rem 1rem 1.1rem;
}

.post-card__title {
    font-size: 1.15rem;
    line-height: 1.25;
    color: var(--color-text-primary);
}

.post-card__excerpt {
    color: var(--color-text-secondary);
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
}

.post-card__meta {
    display: flex;
    gap: 0.65rem;
    align-items: center;
    color: var(--color-text-muted);
    font-size: 0.85rem;
}

.post-card__meta span {
    white-space: nowrap;
}

.post-card__meta time {
    white-space: nowrap;
}

.post-card__meta span::before {
    content: "•";
    margin-right: 0.65rem;
}

@media (min-width: 640px) {
    .post-feed {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 980px) {
    .post-feed {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* === Single post === */
.post-title,
.page-title {
    font-size: 2.25rem;
    line-height: 1.2;
    margin-bottom: 0.4rem;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    font-size: 0.95rem;
    color: var(--color-text-secondary);
}

.post-meta a {
    color: var(--color-text-secondary);
}

.post-hero {
    margin-bottom: 2.25rem;
}

.post-hero__media {
    min-height: 23rem;
    border-radius: var(--radius-xl);
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    border: 1px solid var(--color-border);
}

.post-hero__media--fallback {
    background-image: linear-gradient(135deg, #132e67 0%, #07152e 65%, #050913 100%);
}

.post-hero__content {
    width: 100%;
    padding: clamp(1.25rem, 3.5vw, 2.4rem);
    background: linear-gradient(180deg, rgba(10, 14, 24, 0) 0%, rgba(10, 14, 24, 0.88) 65%, rgba(10, 14, 24, 0.98) 100%);
}

.post-hero .post-title {
    font-size: clamp(2rem, 4vw, 3rem);
}

.post-hero .tag {
    margin-bottom: 0.8rem;
}

.post-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.4rem;
}

.post-body {
    min-width: 0;
}

.post-content,
.page-content {
    max-width: 760px;
    line-height: 1.8;
    font-size: clamp(1.125rem, 2vw, 1.25rem);
}

.post-content {
    font-family: var(--font-sans);
    overflow-wrap: break-word;
}

.page-content {
    font-family: var(--gh-font-body);
}

.post-content * {
    font-family: var(--font-sans);
}

.post-content > :first-child {
    margin-top: 0;
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
    font-family: var(--font-sans);
    margin: 1.5em 0 0.5em;
}

.post-content p {
    margin-bottom: 1em;
}

.post-content ul,
.post-content ol,
.post-content blockquote,
.post-content pre,
.post-content .kg-bookmark-card {
    margin-bottom: 1.2em;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
}

.post-content figure {
    max-width: 100%;
}

.post-content table {
    display: block;
    width: 100%;
    overflow-x: auto;
}

.post-content .kg-card img {
    width: 100%;
    height: auto;
}

/* === Code === */
code,
kbd,
samp {
    font-family: var(--font-mono);
    font-size: 0.9em;
    background: color-mix(in srgb, var(--color-bg-secondary) 70%, #2d313f);
    padding: 0.15em 0.4em;
    border-radius: var(--radius-sm);
}

.post-content pre code {
    background: transparent;
    padding: 0;
    border-radius: 0;
    font-size: inherit;
}

.post-content pre,
.post-content pre[class*="language-"] {
    margin: 0;
    padding: 1.2rem 1.2rem 1rem;
    border: 1px solid #2d3040;
    border-radius: var(--radius-md);
    background: #161922;
    overflow-x: auto;
    line-height: 1.6;
}

.post-content .kg-code-card {
    max-width: 100%;
}

.post-content .kg-code-card figcaption {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.02em;
    color: #b8bdd7;
    background: #212536;
    border: 1px solid #2d3040;
    border-bottom: 0;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    padding: 0.4rem 0.8rem;
}

.post-content .kg-code-card figcaption + pre[class*="language-"],
.post-content .kg-code-card figcaption + pre {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

.copy-btn {
    position: absolute;
    top: 0.6rem;
    right: 0.6rem;
    z-index: 3;
    font-size: 0.72rem;
    border: 1px solid rgba(240, 242, 248, 0.16);
    border-radius: var(--radius-sm);
    background: rgba(13, 16, 26, 0.86);
    color: #f0f2f8;
    padding: 0.25rem 0.55rem;
    cursor: pointer;
}

.copy-btn:hover,
.copy-btn:focus-visible {
    background: rgba(37, 43, 62, 0.96);
}

/* === Post TOC === */
.post-toc {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-bg-card);
    padding: 1rem;
    height: fit-content;
}

.post-toc__title {
    font-size: 0.95rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 0.7rem;
}

.post-toc__list {
    list-style: none;
    display: grid;
    gap: 0.45rem;
}

.post-toc__list a {
    color: var(--color-text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
}

.post-toc__list a:hover,
.post-toc__list a:focus-visible {
    color: var(--color-accent-light);
}

.post-toc__list .post-toc__item--h3 a {
    padding-left: 0.8rem;
    font-size: 0.86rem;
}

/* === Bookmark cards === */
.post-content .kg-bookmark-card {
    display: block;
}

.post-content .kg-bookmark-container {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--color-bg-card);
    text-decoration: none;
    color: inherit;
}

.post-content .kg-bookmark-content {
    padding: 1rem;
}

.post-content .kg-bookmark-title {
    font-family: var(--font-sans);
    font-size: 1rem;
    margin-bottom: 0.45rem;
}

.post-content .kg-bookmark-description {
    color: var(--color-text-secondary);
    font-size: 0.92rem;
    margin-bottom: 0.75rem;
}

.post-content .kg-bookmark-metadata {
    display: inline-flex;
    gap: 0.4rem;
    align-items: center;
    font-size: 0.82rem;
    color: var(--color-text-secondary);
    background: color-mix(in srgb, var(--color-bg-secondary) 88%, transparent);
    border-radius: 999px;
    padding: 0.16rem 0.55rem;
}

.post-content .kg-bookmark-icon {
    width: 1rem;
    height: 1rem;
}

.post-content .kg-bookmark-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-content .kg-bookmark-container:hover,
.post-content .kg-bookmark-container:focus-visible {
    border-color: var(--color-border-hover);
    background: var(--color-bg-hover);
}

/* === Post footer === */
.post-footer {
    margin-top: 2rem;
    display: grid;
    gap: 1rem;
}

.post-tags,
.post-share {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.post-share__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-bg-card);
    color: var(--color-text-primary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.42rem 0.8rem;
    cursor: pointer;
}

.post-share__btn:hover,
.post-share__btn:focus-visible {
    border-color: var(--color-border-hover);
    background: var(--color-bg-hover);
}

.post-nav {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-border);
    display: grid;
    gap: 0.9rem;
}

.post-nav__link {
    display: block;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-bg-card);
    padding: 0.8rem 0.95rem;
    text-decoration: none;
}

.post-nav__label {
    display: block;
    color: var(--color-text-muted);
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.post-nav__title {
    display: block;
    color: var(--color-text-primary);
    margin-top: 0.3rem;
    font-size: 0.96rem;
}

.post-nav__link:hover,
.post-nav__link:focus-visible {
    background: var(--color-bg-hover);
    border-color: var(--color-border-hover);
}

.page-header {
    margin-bottom: 2rem;
}

@media (min-width: 840px) {
    .post-nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1120px) {
    .post-layout {
        grid-template-columns: minmax(0, 16rem) minmax(0, 760px);
        justify-content: center;
        align-items: start;
        gap: 2rem;
    }

    .post-toc {
        position: sticky;
        top: 5.75rem;
    }
}

@media (max-width: 839px) {
    .post-hero__media {
        min-height: 18rem;
    }

    .post-meta {
        gap: 0.35rem;
    }
}

@media (max-width: 639px) {
    .post-hero__media {
        min-height: 15.5rem;
    }

    .post-content,
    .page-content {
        font-size: 1.125rem;
    }
}

/* === Tag archive === */
.tag-header {
    margin-bottom: 2rem;
    padding: 2.25rem 0;
    background: linear-gradient(140deg, var(--color-hero-bg) 0%, var(--color-hero-bg-2) 100%);
}

.tag-header__inner {
    display: grid;
    gap: 0.6rem;
}

.tag-header__name {
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    line-height: 1.15;
}

.tag-header__description {
    color: rgba(240, 242, 248, 0.78);
    max-width: 42rem;
}

.tag-header__count {
    display: inline-flex;
    width: fit-content;
    margin-top: 0.2rem;
    padding: 0.2rem 0.65rem;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: #dbe7ff;
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-weight: 600;
}

.tag-header--entwicklung {
    --color-hero-bg: #0d1b3e;
    --color-hero-bg-2: #162447;
}

.tag-header--ki {
    --color-hero-bg: #1a0d3e;
    --color-hero-bg-2: #2d1f5e;
}

.tag-header--schinken {
    --color-hero-bg: #0d2e1a;
    --color-hero-bg-2: #1a3d2b;
}

.tag-header--amateurfunk {
    --color-hero-bg: #2e1a0d;
    --color-hero-bg-2: #3d2a0f;
}

/* === Tag utility classes === */
.tag,
.tag-dev,
.tag-ai,
.tag-schinken,
.tag-funk {
    display: inline-block;
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0.2em 0.65em;
    border-radius: var(--radius-sm);
    text-decoration: none;
    border: 1px solid var(--color-border);
    color: var(--color-text-secondary);
    background: color-mix(in srgb, var(--color-bg-secondary) 70%, transparent);
}

.tag--dev,
.tag-dev {
    background: var(--color-tag-dev);
    color: var(--color-text-primary);
}

.tag--ai,
.tag-ai {
    background: var(--color-tag-ai);
    color: var(--color-text-primary);
}

.tag--schinken,
.tag-schinken {
    background: var(--color-tag-ham);
    color: var(--color-text-primary);
}

.tag--funk,
.tag-funk {
    background: var(--color-tag-funk);
    color: var(--color-text-primary);
}

/* === Pagination === */
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 0;
}

/* === Site footer === */
.site-footer {
    border-top: 1px solid var(--color-border);
    padding: 2rem 0;
    color: var(--color-text-secondary);
    font-size: 0.875rem;
}

/* === Error page === */
.error-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    text-align: center;
    padding: 2rem;
}

.error-code {
    font-size: 6rem;
    font-weight: 700;
    color: var(--color-text-primary);
    line-height: 1;
}

.error-message {
    font-size: 1.25rem;
    color: var(--color-text-secondary);
    margin: 1rem 0;
}

.error-home-link {
    color: var(--color-accent-light);
    text-decoration: none;
}

.error-home-link:hover {
    text-decoration: underline;
}

.kg-width-wide {
  margin: 0 -8vw;
}

.kg-width-full {
  margin: 0 calc(50% - 50vw);
}

.post-subscribe {
    margin: 3rem 0;
    padding: 2rem;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    text-align: center;
}

.post-subscribe__title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: 0.5rem;
}

.post-subscribe__text {
    color: var(--color-text-secondary);
    margin-bottom: 1.5rem;
}

.post-subscribe__form {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

.post-subscribe__form input {
    padding: 10px 16px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-bg);
    color: var(--color-text-primary);
    font-size: 0.95rem;
    min-width: 240px;
}

.post-subscribe__form button {
    padding: 10px 20px;
    background: var(--color-accent-dark);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 500;
    cursor: pointer;
}

.message-success { color: var(--color-text-success, #4caf50); margin-top: 0.75rem; }
.message-error   { color: var(--color-text-danger, #f44336); margin-top: 0.75rem; }
