/* =============================================
   RENNEN DE RANDY — Het Logboek
   Industrieel / Utilistisch thema
   ============================================= */

:root {
  --ink: #1a1814;
  --paper: #f0ead8;
  --paper-dark: #e4dcc8;
  --paper-darker: #d4c9b0;
  --accent: #c0392b;
  --accent-muted: #8b2a1f;
  --muted: #6b6256;
  --muted-light: #9a9080;
  --rule: #c4b89a;
  --rule-dark: #8a7d64;
  --white: #faf7f0;

  --font-display: 'Bebas Neue', sans-serif;
  --font-body: 'Libre Baskerville', serif;
  --font-mono: 'IBM Plex Mono', monospace;

  --max-width: 1100px;
  --content-width: 720px;
  --spacing: clamp(1rem, 3vw, 2rem);
  --page-padding: 2rem;
}

/* =============================================
   RESET & BASE
   ============================================= */

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

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: clamp(15px, 1.1vw, 17px);
  line-height: 1.75;
  min-height: 100vh;
  /* Subtle paper texture via CSS */
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
}

.page-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main.site-main {
  flex: 1;
}

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

a {
  color: inherit;
  text-decoration: none;
}

/* =============================================
   HEADER
   ============================================= */

.site-header {
  background: var(--ink);
  color: var(--paper);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 3px solid var(--accent);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.9rem var(--page-padding);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.header-brand {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
}

.site-logo-link {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 2rem);
  letter-spacing: 0.02em;
  line-height: 1;
  transition: opacity 0.2s;
}

.site-logo-link:hover { opacity: 0.75; }

.logo-prefix { color: var(--paper); }
.logo-suffix { color: var(--accent); }

.header-tagline {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--muted-light);
  letter-spacing: 0.05em;
}

.site-nav {}

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

.nav-list a,
.nav-list .nav-current a {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--paper-dark);
  padding: 0.4rem 0.7rem;
  border: 1px solid transparent;
  transition: all 0.2s;
  display: block;
}

.nav-list a:hover {
  color: var(--paper);
  border-color: var(--rule-dark);
  background: rgba(255,255,255,0.05);
}

.nav-list .nav-current a {
  color: var(--accent);
  border-color: var(--accent);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--paper);
  transition: all 0.3s;
}

.header-rule {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0 var(--page-padding);
  padding-bottom: 0.4rem;
  background: var(--ink);
}

.rule-line {
  flex: 1;
  height: 1px;
  background: var(--rule-dark);
  opacity: 0.4;
}

.rule-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--muted-light);
  opacity: 0.6;
  letter-spacing: 0.1em;
}

/* =============================================
   HOME HERO
   ============================================= */

.home-hero {
  background: var(--ink);
  color: var(--paper);
  padding: clamp(3rem, 8vw, 6rem) var(--page-padding);
  position: relative;
  overflow: hidden;
}

.home-hero::before {
  content: 'RENNEN';
  position: absolute;
  right: -0.05em;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-display);
  font-size: clamp(6rem, 20vw, 18rem);
  color: rgba(255,255,255,0.03);
  line-height: 1;
  pointer-events: none;
  letter-spacing: -0.02em;
}

.hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--page-padding);
  position: relative;
}

.hero-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 10vw, 8rem);
  line-height: 0.92;
  letter-spacing: 0.01em;
  color: var(--paper);
  margin-bottom: 1.25rem;
}

.hero-sub {
  font-family: var(--font-body);
  font-size: clamp(0.95rem, 1.5vw, 1.15rem);
  color: var(--muted-light);
  font-style: italic;
  max-width: 400px;
  margin-bottom: 2.5rem;
}

.hero-stats-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.stat-pill {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
}

.stat-num {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--paper);
  line-height: 1;
}

.stat-unit {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--muted-light);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.stat-divider {
  color: var(--rule-dark);
  font-family: var(--font-mono);
  opacity: 0.5;
}

/* =============================================
   RUNS LIST
   ============================================= */

.runs-section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem var(--page-padding) 4rem;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 0;
  border-bottom: 2px solid var(--ink);
  margin-bottom: 0;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.section-count {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--muted-light);
}

.runs-list {
  border-bottom: 1px solid var(--rule);
  overflow: hidden;
}

.run-entry {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 1.5rem;
  align-items: center;
  padding: 1.5rem 0;
  border-top: 1px solid var(--rule);
  transition: background 0.2s;
  cursor: pointer;
  position: relative;
}

.run-entry:hover {
  background: var(--paper-dark);
}

.run-entry:hover .run-arrow {
  transform: translateX(4px);
  color: var(--accent);
}

.run-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.4rem;
}

.run-date {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.date-day {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--ink);
  line-height: 1;
}

.date-month {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.date-year {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--muted-light);
}

.run-number {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--muted-light);
  margin-top: 0.25rem;
}

.run-title {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.5vw, 1.75rem);
  line-height: 1.1;
  letter-spacing: 0.01em;
  margin-bottom: 0.5rem;
}

.run-title a {
  transition: color 0.2s;
}

.run-title a:hover { color: var(--accent); }

.run-excerpt {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  position: relative;
}

.run-excerpt::after {
  content: 'lees verder →';
  position: absolute;
  bottom: 0;
  right: 0;
  padding-left: 2rem;
  background: linear-gradient(to right, transparent, var(--paper) 40%);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--muted-light);
  font-style: normal;
}

.run-entry--blog .run-excerpt::after {
  background: linear-gradient(to right, transparent, var(--paper-dark) 40%);
}

.run-entry:hover .run-excerpt::after {
  background: linear-gradient(to right, transparent, var(--paper-dark) 40%);
  color: var(--accent);
}

.run-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.6rem;
}

.run-tag {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.15rem 0.45rem;
  border: 1px solid var(--rule);
  color: var(--muted);
  background: transparent;
}

.run-image {
  width: 90px;
  flex-shrink: 0;
  align-self: center;
}

.run-image img {
  width: 90px;
  height: 90px;
  object-fit: cover;
  filter: sepia(20%) contrast(1.05);
  display: block;
  border: 1px solid var(--rule);
}

.run-arrow {
  display: none;
}

/* =============================================
   PAGINATION
   ============================================= */

.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem 0;
  margin-top: 1rem;
}

.pagination-btn {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.5rem 1rem;
  border: 1px solid var(--ink);
  transition: all 0.2s;
}

.pagination-btn:hover {
  background: var(--ink);
  color: var(--paper);
}

.pagination-info {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--muted);
}

/* =============================================
   SINGLE POST
   ============================================= */

.post-header {
  background: var(--ink);
  color: var(--paper);
  padding: clamp(2.5rem, 6vw, 5rem) var(--page-padding);
}

.post-header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--page-padding);
}

.post-meta-top {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.post-date {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--muted-light);
}

.post-tags { display: flex; gap: 0.4rem; }

.post-tag {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  border: 1px solid var(--rule-dark);
  color: var(--muted-light);
}

.post-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 5rem);
  line-height: 0.95;
  letter-spacing: 0.01em;
  color: var(--paper);
  margin-bottom: 1rem;
}

.post-excerpt {
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  color: var(--muted-light);
  font-style: italic;
  max-width: 600px;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.post-stats-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.pstat { display: flex; flex-direction: column; gap: 0.1rem; }

.pstat-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted-light);
  opacity: 0.6;
}

.pstat-val {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--paper-dark);
}

.pstat-sep {
  font-family: var(--font-mono);
  color: var(--rule-dark);
  opacity: 0.4;
  margin: 0 0.25rem;
}

.post-feature-image {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem var(--page-padding) 0;
}

.post-feature-image img {
  width: 100%;
  height: auto;
  max-height: 480px;
  object-fit: contain;
  display: block;
  filter: sepia(15%) contrast(1.05);
  border: 1px solid var(--rule);
  background: var(--paper-darker);
}

.post-image-caption {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--muted);
  padding: 0.5rem var(--page-padding);
  background: var(--paper-darker);
  text-align: center;
}

.post-body-wrapper {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem var(--page-padding) 4rem;
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 3rem;
  align-items: start;
}

/* =============================================
   POST CONTENT
   ============================================= */

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

.gh-content h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  letter-spacing: 0.01em;
  margin: 2.5rem 0 0.75rem;
  line-height: 1.1;
}

.gh-content h3 {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2vw, 1.6rem);
  letter-spacing: 0.01em;
  margin: 2rem 0 0.6rem;
}

.gh-content p {
  margin-bottom: 1.4rem;
}

.gh-content a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.gh-content blockquote {
  border-left: 3px solid var(--accent);
  padding: 0.75rem 1.25rem;
  margin: 1.5rem 0;
  background: var(--paper-dark);
  font-style: italic;
}

.gh-content code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--paper-darker);
  padding: 0.15em 0.4em;
  border-radius: 2px;
}

.gh-content pre {
  background: var(--ink);
  color: var(--paper);
  padding: 1.25rem;
  overflow-x: auto;
  margin: 1.5rem 0;
}

.gh-content pre code {
  background: none;
  padding: 0;
  font-size: 0.85rem;
  color: inherit;
}

.gh-content ul, .gh-content ol {
  padding-left: 1.5rem;
  margin-bottom: 1.4rem;
}

.gh-content li { margin-bottom: 0.4rem; }

.gh-content hr {
  border: none;
  border-top: 2px solid var(--rule);
  margin: 2.5rem 0;
}

.gh-content img {
  width: 100%;
  height: auto;
  margin: 1.5rem 0;
  filter: sepia(10%);
}

/* =============================================
   SIDEBAR
   ============================================= */

.post-sidebar {
  position: relative;
}

.sidebar-sticky {
  position: sticky;
  top: 5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.sidebar-block {
  border: 1px solid var(--rule);
  padding: 1.25rem;
  background: var(--paper-dark);
}

.sidebar-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  display: block;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 0.5rem;
}

.run-detail-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.run-detail {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
}

.rd-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.rd-val {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--ink);
}

.rd-val::after {
  content: attr(data-unit);
  font-family: var(--font-mono);
  font-size: 0.55rem;
  color: var(--muted-light);
  margin-left: 0.25rem;
  text-transform: lowercase;
}

.sidebar-hint {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--muted-light);
  margin-top: 1rem;
  line-height: 1.6;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--rule);
}

.sidebar-hint code {
  background: var(--paper-darker);
  padding: 0.1em 0.3em;
  font-size: 0.65rem;
}

.adjacent-post {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--rule);
  transition: color 0.2s;
}

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

.adj-dir {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted-light);
}

.adjacent-post:hover .adj-dir { color: var(--accent); }

.adj-title {
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1.3;
}

.back-to-list {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-top: 0.75rem;
  transition: color 0.2s;
}

.back-to-list:hover { color: var(--accent); }

/* =============================================
   STATS PAGE
   ============================================= */

.stats-header {
  background: var(--ink);
  color: var(--paper);
  padding: clamp(2.5rem, 6vw, 5rem) var(--page-padding);
}

.stats-header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--page-padding);
}

.stats-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  display: block;
  margin-bottom: 0.75rem;
}

.stats-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 6rem);
  line-height: 0.92;
  color: var(--paper);
  margin-bottom: 0.5rem;
}

.stats-sub {
  font-style: italic;
  color: var(--muted-light);
  font-size: 0.95rem;
}

.stats-dashboard {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem var(--page-padding) 5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Totalen grid */
.stats-totals {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.stat-card {
  border: 1px solid var(--rule);
  padding: 1.25rem;
  background: var(--paper-dark);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.6s ease;
}

.stat-card.loaded::after { transform: scaleX(1); }

.sc-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.sc-value {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1;
  color: var(--ink);
}

.sc-unit {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--muted-light);
}

/* Chart blokken */
.stats-chart-block {
  border: 1px solid var(--rule);
  padding: 1.5rem;
  background: var(--paper-dark);
}

.stats-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.chart-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 0.75rem;
  margin-bottom: 1.25rem;
}

.chart-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  letter-spacing: 0.02em;
}

.chart-sub, .chart-legend {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.chart-empty {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--muted-light);
  padding: 2rem 0;
  text-align: center;
  opacity: 0.5;
}

/* Maand grafiek met y-as */
.monthly-chart-wrap {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
}

.chart-y-axis {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding-bottom: 1.6rem;
  width: 36px;
  flex-shrink: 0;
}

.y-label {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  color: var(--muted-light);
  text-align: right;
  line-height: 1;
}

.monthly-bars {
  flex: 1;
  display: flex;
  gap: 6px;
  align-items: flex-end;
  height: 180px;
  position: relative;
}

/* Horizontale gridlijnen */
.monthly-bars::before,
.monthly-bars::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  height: 1px;
  background: var(--rule);
  opacity: 0.5;
  pointer-events: none;
}
.monthly-bars::before { top: 0; }
.monthly-bars::after  { top: 50%; }

.m-bar-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  height: 100%;
  justify-content: flex-end;
  position: relative;
}

.m-bar-fill {
  width: 100%;
  background: var(--ink);
  min-height: 2px;
  transition: background 0.2s;
  position: relative;
  cursor: pointer;
}

.m-bar-fill:hover { background: var(--accent); }

.m-bar-tooltip {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  padding: 0.25rem 0.5rem;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
  z-index: 10;
}

.m-bar-fill:hover .m-bar-tooltip { opacity: 1; }

.m-bar-label {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  color: var(--muted-light);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.m-bar-val {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  color: var(--muted);
}

/* Week bars */
.week-bars {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  height: 140px;
}

.w-bar-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  height: 100%;
  justify-content: flex-end;
}

.w-bar-fill {
  width: 100%;
  background: var(--ink);
  min-height: 2px;
  transition: background 0.2s, height 0.8s cubic-bezier(0.4,0,0.2,1);
  cursor: pointer;
}

.w-bar-fill:hover { background: var(--accent); }

.w-bar-label {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  color: var(--muted-light);
  text-transform: uppercase;
}

.w-bar-count {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  color: var(--muted);
}

/* Gevoel bars */
.feeling-bars {
  display: flex;
  gap: 5px;
  align-items: flex-end;
  height: 140px;
}

.f-bar-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  height: 100%;
  justify-content: flex-end;
  position: relative;
}

.f-bar-fill {
  width: 100%;
  min-height: 2px;
  transition: height 0.8s cubic-bezier(0.4,0,0.2,1);
  cursor: pointer;
}

.f-bar-tooltip {
  position: absolute;
  bottom: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 0.58rem;
  padding: 0.2rem 0.4rem;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.15s;
  pointer-events: none;
  z-index: 10;
}

.f-bar-wrap:hover .f-bar-tooltip { opacity: 1; }

.f-bar-num {
  font-family: var(--font-mono);
  font-size: 0.52rem;
  color: var(--muted-light);
}

.stats-content {
  max-width: var(--content-width);
  margin: 0 auto var(--max-width);
  padding: 0 var(--page-padding) 4rem;
}

/* =============================================
   PAGE (STATIC)
   ============================================= */

.page-header {
  background: var(--ink);
  color: var(--paper);
  padding: clamp(2.5rem, 6vw, 5rem) var(--page-padding);
}

.page-header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--page-padding);
}

.page-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 5rem);
  line-height: 0.95;
  color: var(--paper);
}

.page-excerpt {
  margin-top: 1rem;
  font-style: italic;
  color: var(--muted-light);
  max-width: 500px;
}

.page-feature-image {
  width: 100%;
  max-height: 400px;
  overflow: hidden;
}

.page-feature-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: sepia(15%);
}

.page-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem var(--page-padding) 4rem;
}

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

/* =============================================
   FOOTER
   ============================================= */

.site-footer {
  background: var(--ink);
  color: var(--paper);
  padding: 2.5rem var(--page-padding);
  border-top: 3px solid var(--accent);
  margin-top: auto;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.footer-label {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted-light);
  display: block;
  margin-bottom: 0.75rem;
}

.footer-site-name {
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: 0.02em;
  color: var(--paper);
  display: block;
  margin-bottom: 0.5rem;
}

.footer-tagline {
  font-style: italic;
  font-size: 0.85rem;
  color: var(--muted-light);
  line-height: 1.5;
}

.footer-nav {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-nav a {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted-light);
  transition: color 0.2s;
  letter-spacing: 0.03em;
}

.footer-nav a:hover { color: var(--paper); }

.footer-status {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.status-dot {
  width: 8px;
  height: 8px;
  background: #4caf50;
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

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

.status-text {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--muted-light);
}

.footer-bottom {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.footer-copy, .footer-built, .footer-sep {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--muted-light);
  opacity: 0.5;
}

/* =============================================
   RESPONSIVE
   ============================================= */

@media (max-width: 900px) {
  .post-body-wrapper {
    grid-template-columns: 1fr;
  }

  .sidebar-sticky {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .stats-totals {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats-row {
    flex-direction: column;
  }

  .chart-block--half {
    flex: 1;
  }

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

@media (max-width: 620px) {
  .run-entry {
    grid-template-columns: 60px 1fr 2rem;
  }

  .run-image { display: none; }

  .nav-list {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--ink);
    border: 1px solid var(--rule-dark);
    padding: 0.5rem;
    min-width: 180px;
    gap: 0;
  }

  .nav-list.open { display: flex; }

  .nav-list a {
    display: block;
    padding: 0.6rem 0.8rem;
  }

  .nav-toggle { display: flex; }

  .site-nav { position: relative; }

  .stats-totals { grid-template-columns: 1fr 1fr; }

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

  .hero-stats-bar { flex-direction: column; gap: 0.5rem; }
  .stat-divider { display: none; }

  .sidebar-sticky {
    grid-template-columns: 1fr;
  }
}

/* =============================================
   ANIMATIONS
   ============================================= */

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-label { animation: fadeUp 0.5s ease 0.1s both; }
.hero-title { animation: fadeUp 0.5s ease 0.2s both; }
.hero-sub { animation: fadeUp 0.5s ease 0.3s both; }
.hero-stats-bar { animation: fadeUp 0.5s ease 0.4s both; }

.run-entry {
  animation: fadeUp 0.4s ease both;
}

.run-entry:nth-child(1) { animation-delay: 0.05s; }
.run-entry:nth-child(2) { animation-delay: 0.1s; }
.run-entry:nth-child(3) { animation-delay: 0.15s; }
.run-entry:nth-child(4) { animation-delay: 0.2s; }
.run-entry:nth-child(5) { animation-delay: 0.25s; }

/* Print */
@media print {
  .site-header, .site-footer, .post-sidebar { display: none; }
  .post-body-wrapper { grid-template-columns: 1fr; }
}

/* =============================================
   KOENIG EDITOR — required card classes
   ============================================= */

.gh-content .kg-width-wide {
  position: relative;
  width: 85vw;
  min-width: 100%;
  margin: 1.5rem calc(50% - 42.5vw);
}

.gh-content .kg-width-full {
  position: relative;
  width: 100vw;
  min-width: 100%;
  margin: 1.5rem calc(50% - 50vw);
}

/* Image card */
.gh-content .kg-image-card {
  margin: 1.5rem 0;
}

.gh-content .kg-image-card img {
  width: 100%;
  height: auto;
  filter: sepia(10%);
}

.gh-content .kg-image-card figcaption {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--muted);
  text-align: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--rule);
}

/* Gallery card */
.gh-content .kg-gallery-card {
  margin: 1.5rem 0;
}

.gh-content .kg-gallery-container {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.gh-content .kg-gallery-row {
  display: flex;
  gap: 0.5rem;
}

.gh-content .kg-gallery-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: sepia(10%);
}

/* Embed / bookmark card */
.gh-content .kg-bookmark-card {
  border: 1px solid var(--rule);
  background: var(--paper-dark);
  margin: 1.5rem 0;
}

.gh-content .kg-bookmark-container {
  display: flex;
  text-decoration: none;
  color: inherit;
}

.gh-content .kg-bookmark-content {
  padding: 1rem 1.25rem;
  flex: 1;
}

.gh-content .kg-bookmark-title {
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.01em;
  margin-bottom: 0.25rem;
}

.gh-content .kg-bookmark-description {
  font-size: 0.8rem;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.gh-content .kg-bookmark-metadata {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--muted-light);
}

.gh-content .kg-bookmark-icon {
  width: 16px;
  height: 16px;
}

.gh-content .kg-bookmark-thumbnail {
  width: 140px;
  flex-shrink: 0;
}

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

/* Video card */
.gh-content .kg-video-card {
  margin: 1.5rem 0;
  position: relative;
}

/* Callout card */
.gh-content .kg-callout-card {
  display: flex;
  gap: 1rem;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  background: var(--paper-dark);
  border-left: 3px solid var(--accent);
}

.gh-content .kg-callout-emoji {
  font-size: 1.2rem;
  flex-shrink: 0;
}

/* Toggle card */
.gh-content .kg-toggle-card {
  border: 1px solid var(--rule);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  background: var(--paper-dark);
}

.gh-content .kg-toggle-heading-text {
  font-family: var(--font-display);
  font-size: 1.1rem;
  letter-spacing: 0.01em;
}

/* Button card */
.gh-content .kg-btn {
  display: inline-block;
  padding: 0.6rem 1.4rem;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.2s;
  margin: 1rem 0;
}

.gh-content .kg-btn:hover {
  background: var(--accent);
  color: var(--paper);
}

/* Divider card */
.gh-content .kg-divider-card {
  border: none;
  border-top: 2px solid var(--rule);
  margin: 2rem 0;
}

/* Code card */
.gh-content .kg-code-card {
  margin: 1.5rem 0;
}

.gh-content .kg-code-card pre {
  background: var(--ink);
  color: var(--paper);
  padding: 1.25rem;
  overflow-x: auto;
  margin: 0;
}

.gh-content .kg-code-card code {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  background: none;
  padding: 0;
  color: inherit;
}

/* Audio card */
.gh-content .kg-audio-card {
  border: 1px solid var(--rule);
  background: var(--paper-dark);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
}

/* Product card */
.gh-content .kg-product-card {
  border: 1px solid var(--rule);
  background: var(--paper-dark);
  padding: 1.25rem;
  margin: 1.5rem 0;
  display: flex;
  gap: 1.25rem;
}

/* NFT card */
.gh-content .kg-nft-card {
  margin: 1.5rem 0;
}

/* Header card */
.gh-content .kg-header-card {
  background: var(--ink);
  color: var(--paper);
  padding: 3rem 2rem;
  margin: 1.5rem 0;
  text-align: center;
}

.gh-content .kg-header-card h2 {
  font-family: var(--font-display);
  font-size: 3rem;
  color: var(--paper);
  margin-bottom: 0;
}

.gh-content .kg-header-card p {
  color: var(--muted-light);
  font-style: italic;
}

/* File card */
.gh-content .kg-file-card {
  border: 1px solid var(--rule);
  background: var(--paper-dark);
  margin: 1.5rem 0;
}

.gh-content .kg-file-card a {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  color: inherit;
  text-decoration: none;
  transition: background 0.2s;
}

.gh-content .kg-file-card a:hover {
  background: var(--paper-darker);
}

.gh-content .kg-file-card-title {
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.01em;
}

.gh-content .kg-file-card-filename {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--muted);
}


/* =============================================
   BLOG POST (geen-run tag) stijl
   ============================================= */

.run-entry--blog {
  opacity: 0.8;
  border-left: 3px solid var(--muted-light);
  padding-left: 0.75rem;
}

.run-entry--blog:hover {
  border-left-color: var(--accent);
  opacity: 1;
}

.run-entry--blog .date-day {
  font-size: 1.5rem;
  color: var(--muted);
}

.run-number--blog {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted-light);
  border: 1px solid var(--rule);
  padding: 0.1rem 0.3rem;
  margin-top: 0.2rem;
}

/* geen-run tag verbergen in de UI */
.run-tag--geen-run {
  display: none;
}

/* =============================================
   SLIMME TAGS — data-tags verbergen in UI
   ============================================= */

/* Verberg geen-run tag overal */
.post-tag--geen-run,
.run-tag--geen-run {
  display: none;
}

/* Data-tags (km, tijd, tempo, gevoel) verbergen in de post header
   Ze worden alleen gebruikt door de sidebar JS */
.post-tag[class*="post-tag--km"],
.post-tag[class*="post-tag--tijd"],
.post-tag[class*="post-tag--tempo"],
.post-tag[class*="post-tag--gevoel"] {
  display: none;
}

/* In de run-lijst wel tonen als compacte pills */
.run-tag--geen-run { display: none; }

/* Gevoel tag een kleur geven op basis van score */
.run-tag[class*="run-tag--gevoel"] {
  border-color: var(--accent);
  color: var(--accent);
}

/* Blog entry (geen-run) — zelfde grid, subtiel anders */
.run-entry--blog {
  background: var(--paper-dark);
}

.run-entry--blog .date-day {
  color: var(--muted);
}

.run-number--blog {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--paper);
  background: var(--muted);
  padding: 0.15rem 0.35rem;
  margin-top: 0.25rem;
  display: inline-block;
}
/* Nav fallback: toon alleen als er geen echte nav-items zijn */
.nav-item ~ .nav-fallback { display: none; }
