/* ==========================================================================
   Rudy Digital Lab — Main Stylesheet
   Design: Minimalist, light, professional developer aesthetic
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. CSS Custom Properties
   -------------------------------------------------------------------------- */
:root {
    /* Colors */
    --color-bg: #fafafa;
    --color-surface: #ffffff;
    --color-border: #e5e7eb;
    --color-border-hover: #2563eb;
    --color-text: #111827;
    --color-text-muted: #6b7280;
    --color-text-subtle: #9ca3af;
    --color-accent: #2563eb;
    --color-accent-light: #eff6ff;
    --color-accent-dark: #1d4ed8;

    /* Typography */
    --font-body: 'Georgia', 'Times New Roman', serif;
    --font-ui: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
    --font-mono: 'SFMono-Regular', 'Consolas', 'Liberation Mono', 'Menlo', monospace;

    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --space-24: 6rem;

    /* Layout */
    --content-width: 760px;
    --wide-width: 1100px;

    /* Misc */
    --radius: 4px;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --transition: 150ms ease;
}

/* --------------------------------------------------------------------------
   2. Reset & Base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}

body {
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-ui);
    font-size: 1rem;
    line-height: 1.6;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    color: var(--color-accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

ul,
ol {
    list-style: none;
}

/* --------------------------------------------------------------------------
   3. Layout Utilities
   -------------------------------------------------------------------------- */
.container {
    width: 100%;
    max-width: var(--content-width);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--space-6);
    padding-right: var(--space-6);
}

.container--wide {
    max-width: var(--wide-width);
}

/* --------------------------------------------------------------------------
   4. Site Header & Navigation
   -------------------------------------------------------------------------- */
.site-header {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
    max-width: var(--wide-width);
    margin: 0 auto;
    padding: 0 var(--space-6);
}

.site-header__brand a {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text);
    letter-spacing: -0.01em;
    text-decoration: none;
}

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

.site-nav ul {
    display: flex;
    gap: var(--space-6);
    align-items: center;
}

.site-nav a {
    font-family: var(--font-ui);
    font-size: 0.875rem;
    color: var(--color-text-muted);
    text-decoration: none;
    letter-spacing: 0.01em;
}

.site-nav a:hover,
.site-nav .current-menu-item a,
.site-nav .current_page_item a {
    color: var(--color-accent);
    text-decoration: none;
}


/* --------------------------------------------------------------------------
   4b. Dropdown submenu (desktop)
   -------------------------------------------------------------------------- */

/* Parent item: positioneringsanker */
.site-nav li.menu-item-has-children {
    position: relative;
}

/* Verberg toggle-knop op desktop */
.site-nav .submenu-toggle {
    display: none;
}

/* Submenu standaard verborgen */
.site-nav .sub-menu {
    display: block;        /* hidden-attribuut regelt zichtbaarheid */
    position: absolute;
    top: 100%;             /* direct aansluitend — geen gap die hover breekt */
    left: 50%;
    transform: translateX(-50%);
    min-width: 180px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.10);
    padding: 0.4rem 0;
    padding-top: 12px;     /* hover-bridge: muiscursor kan de gap oversteken */
    z-index: 200;
    /* Animatie */
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%) translateY(-4px);
    transition: opacity 0.15s ease, transform 0.15s ease;
}

/* Zichtbaar maken bij hover én focus-within */
.site-nav li.menu-item-has-children:hover > .sub-menu,
.site-nav li.menu-item-has-children:focus-within > .sub-menu {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

/* hidden-attribuut overschrijven wanneer actief */
.site-nav li.menu-item-has-children:hover > .sub-menu[hidden],
.site-nav li.menu-item-has-children:focus-within > .sub-menu[hidden] {
    display: block;
}

/* Submenu-items */
.site-nav .sub-menu li {
    display: block;
}

.site-nav .sub-menu a {
    display: block;
    padding: 0.5rem 1.1rem;
    font-size: 0.85rem;
    color: var(--color-text-muted);
    white-space: nowrap;
    transition: color 0.12s, background 0.12s;
}

.site-nav .sub-menu a:hover {
    color: var(--color-accent);
    background: var(--color-bg);
}

/* Pijltje onder parent-link als visuele indicator */
.site-nav li.menu-item-has-children > a::after {
    content: ' ▾';
    font-size: 0.65em;
    opacity: 0.6;
    vertical-align: middle;
}


/* --------------------------------------------------------------------------
   4c. Hamburger / Mobile Nav
   -------------------------------------------------------------------------- */

/* Button hidden on desktop */
.site-nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    color: var(--color-text);
    border-radius: 4px;
    transition: color 0.15s ease, background 0.15s ease;
    flex-shrink: 0;
}

.site-nav-toggle:hover,
.site-nav-toggle:focus-visible {
    color: var(--color-accent);
    background: var(--color-surface-alt, rgba(0, 0, 0, .06));
    outline: none;
}

/* Three-bar icon */
.site-nav-toggle__icon {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 20px;
    height: 14px;
    pointer-events: none;
}

.site-nav-toggle__icon span {
    display: block;
    width: 100%;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    transition: transform 0.2s ease, opacity 0.15s ease;
    transform-origin: center;
}

/* Animate to × when open */
.site-nav-toggle[aria-expanded="true"] .site-nav-toggle__icon span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.site-nav-toggle[aria-expanded="true"] .site-nav-toggle__icon span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.site-nav-toggle[aria-expanded="true"] .site-nav-toggle__icon span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

/* Overlay */
.site-nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 99;
    animation: rdl-fade-in 0.15s ease forwards;
}

@keyframes rdl-fade-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* --------------------------------------------------------------------------
   5. Site Footer
   -------------------------------------------------------------------------- */
.site-footer {
    border-top: 1px solid var(--color-border);
    padding: var(--space-8) 0;
    margin-top: var(--space-24);
    background: var(--color-surface);
}

.site-footer__inner {
    max-width: var(--wide-width);
    margin: 0 auto;
    padding: 0 var(--space-6);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-4);
}

.site-footer__copy {
    font-size: 0.8125rem;
    color: var(--color-text-subtle);
    font-family: var(--font-mono);
}

.site-footer__label {
    font-size: 0.8125rem;
    color: var(--color-text-subtle);
    font-family: var(--font-mono);
}

/* --------------------------------------------------------------------------
   6. Hero Section
   -------------------------------------------------------------------------- */
.hero {
    padding: var(--space-24) 0 var(--space-20);
    border-bottom: 1px solid var(--color-border);
}

.hero__inner {
    max-width: var(--wide-width);
    margin: 0 auto;
    padding: 0 var(--space-6);
}

.hero__label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--color-accent);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: var(--space-4);
    display: block;
}

.hero__name {
    font-family: var(--font-ui);
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: var(--color-text);
    margin-bottom: var(--space-2);
}

.hero__title {
    font-family: var(--font-mono);
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    color: var(--color-text-muted);
    margin-bottom: var(--space-8);
}

.hero__tagline {
    font-size: 1.125rem;
    color: var(--color-text);
    max-width: 520px;
    line-height: 1.6;
    margin-bottom: var(--space-3);
}

.hero__sub {
    font-size: 0.9375rem;
    color: var(--color-text-muted);
    max-width: 640px;
    margin-bottom: var(--space-8);
}

.hero__response {
    margin-top: var(--space-4);
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

.hero__actions {
    display: flex;
    gap: var(--space-3);
    flex-wrap: wrap;
    margin-top: var(--space-8);
}

/* --------------------------------------------------------------------------
   7. Buttons
   -------------------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    font-family: var(--font-ui);
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius);
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    line-height: 1;
}

.btn--primary {
    background: var(--color-accent);
    color: #ffffff;
    border-color: var(--color-accent);
}

.btn--primary:hover {
    background: var(--color-accent-dark);
    border-color: var(--color-accent-dark);
    text-decoration: none;
    color: #ffffff;
}

.btn--outline {
    background: transparent;
    color: var(--color-text);
    border-color: var(--color-border);
}

.btn--outline:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
    text-decoration: none;
}


.section--compact {
    padding-top: var(--space-16);
    padding-bottom: var(--space-16);
}

.service-promo-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-6);
}

.service-promo-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: var(--space-6);
    box-shadow: var(--shadow-sm);
}

.service-promo-card--highlight {
    border-color: var(--color-accent);
    box-shadow: var(--shadow-md);
}

.service-promo-card__label {
    display: inline-block;
    margin-bottom: var(--space-4);
    padding: 0.2rem 0.5rem;
    border-radius: 2px;
    background: var(--color-accent-light);
    color: var(--color-accent);
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.service-promo-card__title {
    font-size: 1.1rem;
    line-height: 1.3;
    margin-bottom: var(--space-3);
}

.service-promo-card__text {
    font-size: 0.9375rem;
    color: var(--color-text-muted);
}

.service-promo-card__price {
    margin-top: var(--space-4);
    font-weight: 700;
    color: var(--color-text);
}

.service-promo-actions {
    display: flex;
    gap: var(--space-3);
    flex-wrap: wrap;
    margin-top: var(--space-8);
}

/* --------------------------------------------------------------------------
   8. Section Titles
   -------------------------------------------------------------------------- */
.section {
    padding: var(--space-20) 0;
    border-bottom: 1px solid var(--color-border);
}

.section:last-child {
    border-bottom: none;
}

.section__header {
    margin-bottom: var(--space-12);
}

.section__label {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-accent);
    margin-bottom: var(--space-2);
    display: block;
}

.section__title {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--color-text);
}

.section__desc {
    font-size: 0.9375rem;
    color: var(--color-text-muted);
    margin-top: var(--space-2);
    max-width: 480px;
}

/* --------------------------------------------------------------------------
   9. Experiment Cards
   -------------------------------------------------------------------------- */
.experiments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-6);
}

.card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: var(--space-6);
    box-shadow: var(--shadow-sm);
}

.card:hover {
    border-color: var(--color-border-hover);
    box-shadow: var(--shadow-md);
}

.card__badge {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-accent);
    background: var(--color-accent-light);
    padding: 0.2rem 0.5rem;
    border-radius: 2px;
    display: inline-block;
    margin-bottom: var(--space-4);
}

.card__title {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-bottom: var(--space-3);
    color: var(--color-text);
}

.card__desc-en {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    line-height: 1.6;
    margin-bottom: var(--space-2);
}

.card__desc-nl {
    font-size: 0.8125rem;
    color: var(--color-text-subtle);
    line-height: 1.5;
    font-style: italic;
}

/* --------------------------------------------------------------------------
   10. Lab Notes (Posts)
   -------------------------------------------------------------------------- */
.notes-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-8);
}

.note-item {
    padding-bottom: var(--space-8);
    border-bottom: 1px solid var(--color-border);
}

.note-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.note-item__meta {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--color-text-subtle);
    margin-bottom: var(--space-2);
    letter-spacing: 0.04em;
}

.note-item__title {
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-bottom: var(--space-2);
    line-height: 1.3;
}

.note-item__title a {
    color: var(--color-text);
    text-decoration: none;
}

.note-item__title a:hover {
    color: var(--color-accent);
}

.note-item__excerpt {
    font-size: 0.9375rem;
    color: var(--color-text-muted);
    line-height: 1.6;
    margin-bottom: var(--space-3);
}

.note-item__link {
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    color: var(--color-accent);
    text-decoration: none;
    letter-spacing: 0.02em;
}

.note-item__link:hover {
    text-decoration: underline;
}

/* --------------------------------------------------------------------------
   11. Tools / Stack List
   -------------------------------------------------------------------------- */
.tools-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.tool-tag {
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    padding: 0.375rem 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: 2px;
    color: var(--color-text-muted);
    background: var(--color-surface);
}

/* --------------------------------------------------------------------------
   12. Philosophy Section
   -------------------------------------------------------------------------- */
.philosophy-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-12);
}

.philosophy__block p {
    font-size: 0.9375rem;
    line-height: 2;
    color: var(--color-text-muted);
}

.philosophy__block p+p {
    margin-top: var(--space-1);
}

.philosophy__lang {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-text-subtle);
    margin-bottom: var(--space-3);
    display: block;
}

/* --------------------------------------------------------------------------
   13. Blog: Archive / Index
   -------------------------------------------------------------------------- */
.page-header {
    padding: var(--space-16) 0 var(--space-12);
    border-bottom: 1px solid var(--color-border);
    margin-bottom: var(--space-12);
}

.page-header__label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-accent);
    margin-bottom: var(--space-2);
    display: block;
}

.page-header__title {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.post-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-10);
}

.post-card {
    padding-bottom: var(--space-10);
    border-bottom: 1px solid var(--color-border);
}

.post-card:last-child {
    border-bottom: none;
}

.post-card__meta {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--color-text-subtle);
    letter-spacing: 0.04em;
    margin-bottom: var(--space-3);
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.post-card__title {
    font-size: 1.375rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.3;
    margin-bottom: var(--space-3);
}

.post-card__title a {
    color: var(--color-text);
    text-decoration: none;
}

.post-card__title a:hover {
    color: var(--color-accent);
}

.post-card__excerpt {
    font-size: 0.9375rem;
    color: var(--color-text-muted);
    line-height: 1.65;
    margin-bottom: var(--space-4);
    max-width: 620px;
}

.post-card__link {
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    color: var(--color-accent);
    text-decoration: none;
}

.post-card__link:hover {
    text-decoration: underline;
}

/* --------------------------------------------------------------------------
   14. Single Post
   -------------------------------------------------------------------------- */
.post-header {
    padding: var(--space-16) 0 var(--space-12);
    border-bottom: 1px solid var(--color-border);
    margin-bottom: var(--space-12);
}

.post-header__meta {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--color-text-subtle);
    letter-spacing: 0.04em;
    margin-bottom: var(--space-4);
    display: flex;
    gap: var(--space-3);
    align-items: center;
}

.post-header__title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.2;
}

.post-content {
    padding: 0;
}

.post-content p {
    font-size: 1.0625rem;
    line-height: 1.75;
    color: var(--color-text);
    margin-bottom: var(--space-6);
}

.post-content h2 {
    font-size: 1.375rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-top: var(--space-12);
    margin-bottom: var(--space-4);
    color: var(--color-text);
}

.post-content h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-top: var(--space-8);
    margin-bottom: var(--space-3);
}

.post-content ul,
.post-content ol {
    margin-bottom: var(--space-6);
    padding-left: var(--space-6);
}

.post-content ul {
    list-style: disc;
}

.post-content ol {
    list-style: decimal;
}

.post-content li {
    font-size: 1.0625rem;
    line-height: 1.7;
    color: var(--color-text);
    margin-bottom: var(--space-2);
}

.post-content code {
    font-family: var(--font-mono);
    font-size: 0.875em;
    background: var(--color-accent-light);
    color: var(--color-accent-dark);
    padding: 0.1em 0.4em;
    border-radius: 2px;
}

.post-content pre {
    background: #f4f4f5;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: var(--space-6);
    overflow-x: auto;
    margin-bottom: var(--space-6);
}

.post-content pre code {
    background: none;
    color: var(--color-text);
    padding: 0;
    font-size: 0.875rem;
}

.post-content blockquote {
    border-left: 3px solid var(--color-accent);
    margin: var(--space-8) 0;
    padding: var(--space-4) var(--space-6);
    background: var(--color-accent-light);
    border-radius: 0 var(--radius) var(--radius) 0;
}

.post-content blockquote p {
    color: var(--color-text-muted);
    font-style: italic;
    margin-bottom: 0;
}

.post-content a {
    color: var(--color-accent);
    text-decoration: underline;
}

.post-nav {
    margin-top: var(--space-16);
    padding-top: var(--space-8);
    border-top: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    gap: var(--space-6);
}

.post-nav__link {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.post-nav__link:hover {
    color: var(--color-accent);
    text-decoration: none;
}

.post-nav__label {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-text-subtle);
}

.post-nav__link--next {
    text-align: right;
}

/* --------------------------------------------------------------------------
   15. Page Template
   -------------------------------------------------------------------------- */
.page-content {
    padding: var(--space-16) 0 var(--space-24);
}

.page-content__title {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: var(--space-8);
    padding-bottom: var(--space-8);
    border-bottom: 1px solid var(--color-border);
}

/* --------------------------------------------------------------------------
   16. 404 Page
   -------------------------------------------------------------------------- */
.error-page {
    padding: var(--space-24) 0;
    text-align: center;
}

.error-page__code {
    font-family: var(--font-mono);
    font-size: 6rem;
    font-weight: 700;
    color: var(--color-border);
    line-height: 1;
    margin-bottom: var(--space-4);
}

.error-page__title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: var(--space-3);
    letter-spacing: -0.02em;
}

.error-page__desc {
    font-size: 0.9375rem;
    color: var(--color-text-muted);
    margin-bottom: var(--space-8);
}

/* --------------------------------------------------------------------------
   17. Pagination
   -------------------------------------------------------------------------- */
.pagination {
    margin-top: var(--space-16);
    display: flex;
    justify-content: center;
    gap: var(--space-2);
}

.pagination .page-numbers {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    padding: 0.5rem 0.875rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    color: var(--color-text-muted);
    text-decoration: none;
}

.pagination .page-numbers:hover,
.pagination .page-numbers.current {
    border-color: var(--color-accent);
    color: var(--color-accent);
    text-decoration: none;
}

/* --------------------------------------------------------------------------
   18. No Posts
   -------------------------------------------------------------------------- */
.no-posts {
    padding: var(--space-16) 0;
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.9375rem;
}

/* --------------------------------------------------------------------------
   19. Utility
   -------------------------------------------------------------------------- */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* --------------------------------------------------------------------------
   20. Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
    .philosophy-grid {
        grid-template-columns: 1fr;
        gap: var(--space-8);
    }

    .experiments-grid {
        grid-template-columns: 1fr;
    }

    /* nav handled in 900px block below */

    .hero {
        padding: var(--space-16) 0 var(--space-12);
    }

    .post-nav {
        flex-direction: column;
    }

    .post-nav__link--next {
        text-align: left;
    }

    .site-footer__inner {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .site-header__inner {
        padding: 0 var(--space-4);
    }

    .container,
    .hero__inner,
    .site-footer__inner {
        padding-left: var(--space-4);
        padding-right: var(--space-4);
    }

    .hero__actions {
        flex-direction: column;
        align-items: flex-start;
    }

    .section {
        padding: var(--space-12) 0;
    }
}

.post-card__thumbnail {
    display: block;
    margin-bottom: var(--space-6);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--color-border);
}

.post-card__thumbnail img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    display: block;
}

.post-header__title {
    margin-bottom: var(--space-8);
    /* update existing regel */
}

.post-header__thumbnail {
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--color-border);
    margin-top: var(--space-8);
}

.post-header__thumbnail img {
    width: 100%;
    height: auto;
    max-height: 420px;
    object-fit: cover;
    display: block;
}

/* ==========================================================================
   bbPress Forum Fix
   Voeg dit toe onderaan assets/css/main.css
   ==========================================================================

   bbPress voegt automatisch body-classes toe zoals:
   .bbpress, .bbp-forum-index, .bbp-single-forum, .bbp-single-topic

   We gebruiken die classes om de container te verbreden.
   ========================================================================== */

/* 1. Verbreed de container op alle bbPress pagina's */
body.bbpress .container {
    max-width: var(--wide-width);
}

/* v1.0.7 fix: bbPress pages use .with-sidebar grid — override to full width, hide sidebar */
body.bbpress .with-sidebar {
    grid-template-columns: 1fr;
    max-width: var(--wide-width);
}

body.bbpress .site-sidebar {
    display: none;
}

/* 2. Zorg dat de tabel de volledige breedte pakt */
#bbpress-forums table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

/* 3. Kolombreedtes: geef titels veel ruimte, cijfers compact */
#bbpress-forums .bbp-forum-title,
#bbpress-forums .bbp-topic-title {
    width: 42%;
}

#bbpress-forums .bbp-forum-topic-count,
#bbpress-forums .bbp-forum-reply-count,
#bbpress-forums .bbp-topic-reply-count,
#bbpress-forums .bbp-topic-voice-count {
    width: 12%;
    text-align: center;
    white-space: nowrap;
    padding-left: var(--space-4);
    padding-right: var(--space-4);
}

#bbpress-forums .bbp-forum-freshness,
#bbpress-forums .bbp-topic-freshness {
    width: 26%;
    white-space: nowrap;
}

/* 4. Header rij styling */
#bbpress-forums thead th {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-text-subtle);
    padding: var(--space-3) var(--space-4);
    border-bottom: 2px solid var(--color-border);
    background: var(--color-bg);
    text-align: left;
    font-weight: 500;
}

#bbpress-forums thead th.bbp-forum-topic-count,
#bbpress-forums thead th.bbp-forum-reply-count,
#bbpress-forums thead th.bbp-topic-reply-count,
#bbpress-forums thead th.bbp-topic-voice-count {
    text-align: center;
}

/* 5. Rijen */
#bbpress-forums tbody tr {
    border-bottom: 1px solid var(--color-border);
}

#bbpress-forums tbody tr:last-child {
    border-bottom: none;
}

#bbpress-forums tbody td {
    padding: var(--space-4);
    vertical-align: top;
    font-size: 0.9375rem;
}

/* 6. Forum/topic titel links */
#bbpress-forums .bbp-forum-title a,
#bbpress-forums .bbp-topic-title a {
    color: var(--color-text);
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
}

#bbpress-forums .bbp-forum-title a:hover,
#bbpress-forums .bbp-topic-title a:hover {
    color: var(--color-accent);
}

/* 7. Forum beschrijving */
#bbpress-forums .bbp-forum-content p {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    margin-top: var(--space-1);
    line-height: 1.5;
}

/* 8. Sub-forum links */
#bbpress-forums .bbp-forum-sub-forums {
    font-size: 0.8125rem;
    color: var(--color-text-subtle);
    margin-top: var(--space-2);
}

#bbpress-forums .bbp-forum-sub-forums a {
    color: var(--color-text-muted);
    text-decoration: none;
}

#bbpress-forums .bbp-forum-sub-forums a:hover {
    color: var(--color-accent);
}

/* 9. Teller cellen */
#bbpress-forums td.bbp-forum-topic-count,
#bbpress-forums td.bbp-forum-reply-count,
#bbpress-forums td.bbp-topic-reply-count,
#bbpress-forums td.bbp-topic-voice-count {
    text-align: center;
    font-family: var(--font-mono);
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

/* 10. Laatste bericht cel */
#bbpress-forums td.bbp-forum-freshness,
#bbpress-forums td.bbp-topic-freshness {
    font-size: 0.8125rem;
    color: var(--color-text-muted);
}

#bbpress-forums td.bbp-forum-freshness a,
#bbpress-forums td.bbp-topic-freshness a {
    color: var(--color-accent);
    text-decoration: none;
}

#bbpress-forums td.bbp-forum-freshness a:hover,
#bbpress-forums td.bbp-topic-freshness a:hover {
    text-decoration: underline;
}

/* 11. Breadcrumb */
#bbpress-forums .bbp-breadcrumb {
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    color: var(--color-text-subtle);
    margin-bottom: var(--space-6);
}

#bbpress-forums .bbp-breadcrumb a {
    color: var(--color-accent);
    text-decoration: none;
}

/* 12. Zoekformulier */
#bbpress-forums #bbp-search-form {
    display: flex;
    gap: var(--space-2);
    align-items: center;
    margin-bottom: var(--space-6);
}

#bbpress-forums #bbp-search-form input[type="text"] {
    font-family: var(--font-ui);
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    color: var(--color-text);
    background: var(--color-surface);
    width: 240px;
}

#bbpress-forums #bbp-search-form input[type="text"]:focus {
    outline: none;
    border-color: var(--color-accent);
}

#bbpress-forums #bbp-search-form input[type="submit"] {
    font-family: var(--font-ui);
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    background: var(--color-accent);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
}

#bbpress-forums #bbp-search-form input[type="submit"]:hover {
    background: var(--color-accent-dark);
}

/* 13. Formulieren (reply/topic aanmaken) */
#bbpress-forums .bbp-reply-form textarea,
#bbpress-forums .bbp-topic-form textarea,
#bbpress-forums .bbp-reply-form input[type="text"],
#bbpress-forums .bbp-topic-form input[type="text"] {
    width: 100%;
    font-family: var(--font-ui);
    font-size: 0.9375rem;
    padding: var(--space-3) var(--space-4);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    color: var(--color-text);
    background: var(--color-surface);
}

#bbpress-forums .bbp-reply-form input[type="submit"],
#bbpress-forums .bbp-topic-form input[type="submit"] {
    font-family: var(--font-ui);
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.625rem 1.25rem;
    background: var(--color-accent);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    margin-top: var(--space-4);
}

/* 14. Mobile: stack de tabel */
@media (max-width: 768px) {
    #bbpress-forums thead {
        display: none;
    }

    #bbpress-forums table,
    #bbpress-forums tbody,
    #bbpress-forums tr,
    #bbpress-forums td {
        display: block;
        width: 100%;
    }

    #bbpress-forums tbody td {
        text-align: left;
    }
}

/* --------------------------------------------------------------------------
   20b. Mobile navigation (breakpoint: 900px)
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {

    /* Make header the positioning parent for the dropdown */
    .site-header {
        position: relative;
    }

    .site-nav-toggle {
        display: flex;
    }

    .site-nav {
        display: none;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background: var(--color-surface);
        border-bottom: 1px solid var(--color-border);
        z-index: 100;
        padding: var(--space-4) 0 var(--space-6);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
        animation: rdl-slide-down 0.18s ease;
    }

    @keyframes rdl-slide-down {
        from {
            opacity: 0;
            transform: translateY(-6px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .site-nav.is-open {
        display: block;
    }

    .site-nav ul {
        flex-direction: column;
        gap: 0;
        padding: 0 var(--space-6);
    }

    .site-nav li {
        border-bottom: 1px solid var(--color-border);
    }

    .site-nav li:last-child {
        border-bottom: none;
    }

    .site-nav a {
        display: block;
        padding: var(--space-4) 0;
        font-size: 1rem;
    }

    /* ── Mobiel: submenu-toggle knop ── */
    .site-nav .submenu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        position: absolute;
        right: 0;
        top: 0;
        height: 52px;     /* zelfde hoogte als de link */
        width: 44px;
        background: none;
        border: none;
        cursor: pointer;
        color: var(--color-text-muted);
        font-size: 1.2rem;
        transition: color 0.15s, transform 0.2s;
        padding: 0;
    }

    .site-nav .submenu-toggle[aria-expanded="true"] {
        transform: rotate(180deg);
        color: var(--color-accent);
    }

    /* Parent-item: relatief zodat toggle absoluut gepositioneerd kan worden */
    .site-nav li.menu-item-has-children {
        position: relative;
    }

    /* Verberg het desktop pijltje op mobiel */
    .site-nav li.menu-item-has-children > a::after {
        display: none;
    }

    /* Submenu: verborgen tot toggle geklikt */
    .site-nav .sub-menu {
        position: static;
        transform: none;
        min-width: 0;
        box-shadow: none;
        border: none;
        border-radius: 0;
        background: var(--color-bg);
        padding: 0 0 0 var(--space-4);
        opacity: 1;
        pointer-events: auto;
        transition: none;
    }

    /* hidden-attribuut: verborgen tot JS het verwijdert */
    .site-nav .sub-menu[hidden] {
        display: none;
    }

    .site-nav .sub-menu li {
        border-bottom: 1px solid var(--color-border);
    }

    .site-nav .sub-menu a {
        padding: var(--space-3) 0;
        font-size: 0.9rem;
    }
}


/* ==========================================================================
   NEW IN v1.0.7 — Sidebar, Widgets, Author Box, Related Posts,
                   Homepage Thumbnails, Comments
   ========================================================================== */

/* --------------------------------------------------------------------------
   21. Sidebar Layout (.with-sidebar)
   -------------------------------------------------------------------------- */

.with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: var(--space-12);
    align-items: start;
    max-width: var(--wide-width);
    margin: 0 auto;
    padding: 0 var(--space-6);
}

/* If sidebar is empty / not active: content fills full width */
.with-sidebar__content {
    min-width: 0;
    /* prevents grid blowout */
}

@media (max-width: 900px) {
    .with-sidebar {
        grid-template-columns: 1fr;
    }
}

/* --------------------------------------------------------------------------
   22. Sidebar & Widgets
   -------------------------------------------------------------------------- */

.site-sidebar {
    padding-top: var(--space-16);
    /* aligns with post-header padding */
}

.widget {
    margin-bottom: var(--space-10);
    padding-bottom: var(--space-10);
    border-bottom: 1px solid var(--color-border);
}

.widget:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.widget__title {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-text-subtle);
    margin-bottom: var(--space-4);
}

/* Common widget list styles */
.widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget ul li {
    padding: var(--space-2) 0;
    border-bottom: 1px solid var(--color-border);
    font-size: 0.875rem;
    line-height: 1.5;
}

.widget ul li:last-child {
    border-bottom: none;
}

.widget ul li a {
    color: var(--color-text-muted);
    text-decoration: none;
}

.widget ul li a:hover {
    color: var(--color-accent);
}

.widget p {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    line-height: 1.6;
}

/* Search widget */
.widget .search-form {
    display: flex;
    gap: var(--space-2);
}

.widget .search-form .search-field {
    flex: 1;
    font-family: var(--font-ui);
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-surface);
    color: var(--color-text);
}

.widget .search-form .search-field:focus {
    outline: none;
    border-color: var(--color-accent);
}

.widget .search-form .search-submit {
    font-family: var(--font-ui);
    font-size: 0.8125rem;
    font-weight: 500;
    padding: 0.5rem 0.875rem;
    background: var(--color-accent);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
}

.widget .search-form .search-submit:hover {
    background: var(--color-accent-dark);
}

/* --------------------------------------------------------------------------
   23. Footer Widgets
   -------------------------------------------------------------------------- */

.footer-widgets {
    border-top: 1px solid var(--color-border);
    background: var(--color-surface);
    padding: var(--space-12) 0;
}

.footer-widgets__inner {
    max-width: var(--wide-width);
    margin: 0 auto;
    padding: 0 var(--space-6);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-12);
}

.footer-widgets__col .widget {
    margin-bottom: var(--space-8);
    padding-bottom: 0;
    border-bottom: none;
}

.footer-widgets__col .widget__title {
    margin-bottom: var(--space-3);
}

@media (max-width: 600px) {
    .footer-widgets__inner {
        grid-template-columns: 1fr;
        gap: var(--space-8);
    }
}

/* --------------------------------------------------------------------------
   24. Author Box
   -------------------------------------------------------------------------- */

.author-box {
    display: flex;
    gap: var(--space-6);
    align-items: flex-start;
    margin-top: var(--space-12);
    padding: var(--space-6);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-surface);
}

.author-box__avatar img {
    border-radius: 50%;
    width: 64px;
    height: 64px;
    display: block;
    flex-shrink: 0;
}

.author-box__info {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.author-box__label {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-text-subtle);
}

.author-box__name {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--color-text);
}

.author-box__bio {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    line-height: 1.6;
    margin-top: var(--space-1);
}

@media (max-width: 480px) {
    .author-box {
        flex-direction: column;
    }
}

/* --------------------------------------------------------------------------
   25. Related Posts
   -------------------------------------------------------------------------- */

.related-posts {
    margin-top: var(--space-12);
    padding-top: var(--space-10);
    border-top: 1px solid var(--color-border);
}

.related-posts__title {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--color-text);
    margin-bottom: var(--space-8);
}

.related-posts__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-6);
}

.related-post {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.related-post__thumbnail {
    display: block;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--color-border);
    margin-bottom: var(--space-2);
}

.related-post__thumbnail img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    display: block;
    transition: opacity var(--transition);
}

.related-post__thumbnail:hover img {
    opacity: 0.88;
}

.related-post__date {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    color: var(--color-text-subtle);
    letter-spacing: 0.04em;
}

.related-post__title {
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: -0.01em;
}

.related-post__title a {
    color: var(--color-text);
    text-decoration: none;
}

.related-post__title a:hover {
    color: var(--color-accent);
}

@media (max-width: 600px) {
    .related-posts__grid {
        grid-template-columns: 1fr;
        gap: var(--space-6);
    }
}

/* --------------------------------------------------------------------------
   26. Comments
   -------------------------------------------------------------------------- */

.comments-area {
    margin-top: var(--space-12);
    padding-top: var(--space-10);
    border-top: 1px solid var(--color-border);
}

.comments-title {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-bottom: var(--space-8);
    color: var(--color-text);
}

/* Individual comment */
.comment-list {
    list-style: none;
    padding: 0;
    margin: 0 0 var(--space-10);
}

.comment-list .comment {
    padding: var(--space-6) 0;
    border-bottom: 1px solid var(--color-border);
}

.comment-list .comment:last-child {
    border-bottom: none;
}

.comment-author {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-3);
}

.comment-author img {
    border-radius: 50%;
    width: 36px;
    height: 36px;
}

.comment-author .fn {
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--color-text);
}

.comment-author .fn a {
    color: var(--color-text);
    text-decoration: none;
}

.comment-author .fn a:hover {
    color: var(--color-accent);
}

.comment-metadata {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    color: var(--color-text-subtle);
    letter-spacing: 0.04em;
    margin-bottom: var(--space-3);
}

.comment-metadata a {
    color: var(--color-text-subtle);
    text-decoration: none;
}

.comment-content p {
    font-size: 0.9375rem;
    line-height: 1.65;
    color: var(--color-text-muted);
    margin-bottom: var(--space-3);
}

.comment-content p:last-child {
    margin-bottom: 0;
}

.reply a {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--color-accent);
    text-decoration: none;
    letter-spacing: 0.04em;
}

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

/* Awaiting moderation notice */
.comment-awaiting-moderation {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--color-text-subtle);
    background: var(--color-accent-light);
    padding: 0.2em 0.5em;
    border-radius: 2px;
    display: inline-block;
    margin-bottom: var(--space-2);
}

/* Nested comments */
.comment-list .children {
    list-style: none;
    padding-left: var(--space-8);
    border-left: 2px solid var(--color-border);
    margin-top: var(--space-4);
}

/* Comment form */
.comment-respond {
    margin-top: var(--space-10);
}

.comment-reply-title {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-bottom: var(--space-6);
    color: var(--color-text);
}

.comment-reply-title small {
    font-size: 0.8125rem;
    font-weight: 400;
    margin-left: var(--space-3);
}

.comment-reply-title small a {
    color: var(--color-text-muted);
    text-decoration: none;
}

.comment-reply-title small a:hover {
    color: var(--color-accent);
}

.comment-form label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--color-text);
    margin-bottom: var(--space-2);
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    font-family: var(--font-ui);
    font-size: 0.9375rem;
    padding: var(--space-3) var(--space-4);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    color: var(--color-text);
    background: var(--color-surface);
    margin-bottom: var(--space-4);
    display: block;
}

.comment-form input[type="text"]:focus,
.comment-form input[type="email"]:focus,
.comment-form input[type="url"]:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--color-accent);
}

.comment-form textarea {
    min-height: 140px;
    resize: vertical;
}

.comment-form-comment {
    margin-bottom: var(--space-4);
}

.comment-form .form-submit {
    margin-top: var(--space-2);
}

.comment-form .submit {
    font-family: var(--font-ui);
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.625rem 1.25rem;
    background: var(--color-accent);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
}

.comment-form .submit:hover {
    background: var(--color-accent-dark);
}

.comment-notes,
.logged-in-as {
    font-size: 0.8125rem;
    color: var(--color-text-muted);
    margin-bottom: var(--space-4);
}

.comment-notes a,
.logged-in-as a {
    color: var(--color-accent);
}

/* --------------------------------------------------------------------------
   27. Homepage — Note-item Thumbnails
   -------------------------------------------------------------------------- */

.note-item__thumbnail {
    display: block;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--color-border);
    margin-bottom: var(--space-4);
}

.note-item__thumbnail img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    transition: opacity var(--transition);
}

.note-item__thumbnail:hover img {
    opacity: 0.88;
}

/* Rudy Forum Lite — brede layout */
body.rfl-forum-page .container {
    max-width: var(--wide-width);
}

body.rfl-forum-page .with-sidebar {
    display: block;        /* grid uitschakelen zodat content volle breedte krijgt */
    max-width: var(--wide-width);
}

body.rfl-forum-page .site-sidebar {
    display: none;
}

body.rfl-forum-page .post-content {
    max-width: none;       /* eventuele prose-breedte opheffen */
}


@media (max-width: 900px) {
    .service-promo-grid {
        grid-template-columns: 1fr;
    }
}
