/* ══════════════════════════════════════════════
   Multilingual blog template — clean reading, lang filter
   ══════════════════════════════════════════════ */

:root {
  --ml-bg: #fafaf9;
  --ml-fg: #0f172a;
  --ml-muted: #64748b;
  --ml-border: #e5e7eb;
  --ml-surface: #ffffff;
  --ml-accent: #f59e0b;
  --ml-max: 1200px;
  --ml-head-h: 72px;
  --ml-lang-nl: #d97706;
  --ml-lang-en: #2563eb;
  --ml-lang-fr: #db2777;
  --ml-lang-de: #0f766e;
  --ml-lang-es: #b45309;
}

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--ml-head-h) + 12px); }
body { background: var(--ml-bg); color: var(--ml-fg); margin: 0; font-family: "Iowan Old Style", "Palatino Linotype", Palatino, "Source Serif Pro", Georgia, serif; line-height: 1.6; }
a { color: inherit; text-decoration: none; }

/* ── Header ── */
.ml-head {
  position: sticky; top: 0; z-index: 30;
  background: rgba(250, 250, 249, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--ml-border);
  height: var(--ml-head-h);
}
.ml-head__inner {
  max-width: var(--ml-max); margin: 0 auto;
  height: 100%;
  padding: 0 1.5rem;
  display: flex; align-items: center; gap: 2rem;
}
.ml-brand {
  display: flex; align-items: center; gap: .6rem;
  font-family: -apple-system, Helvetica, Arial, sans-serif;
  font-weight: 800; letter-spacing: -.01em;
  font-size: 1.1rem;
}
.ml-brand__logo { height: 30px; width: auto; }

/* ── Language pills ── */
.ml-langs {
  display: flex; gap: .35rem;
  margin-left: auto;
  font-family: -apple-system, Helvetica, Arial, sans-serif;
}
.ml-lang {
  padding: .35rem .75rem;
  border: 1px solid var(--ml-border);
  background: transparent;
  color: var(--ml-muted);
  border-radius: 999px;
  cursor: pointer;
  font-size: .8rem; font-weight: 600;
  letter-spacing: .04em;
  transition: background .15s, color .15s, border-color .15s;
}
.ml-lang:hover { color: var(--ml-fg); }
.ml-lang[aria-pressed="true"] {
  background: var(--ml-fg);
  color: var(--ml-bg);
  border-color: var(--ml-fg);
}
.ml-head__meta {
  display: flex; gap: 1rem; align-items: center;
  font-family: -apple-system, Helvetica, Arial, sans-serif;
  font-size: .85rem;
}
.ml-head__meta .theme-toggle { border: 1px solid var(--ml-border); background: transparent; color: var(--ml-fg); border-radius: 6px; padding: .3rem .55rem; cursor: pointer; }

/* ── Hero (index) ── */
.ml-hero {
  max-width: var(--ml-max); margin: 0 auto;
  padding: 4rem 1.5rem 2rem;
  text-align: center;
}
.ml-hero h1 {
  font-size: clamp(2.5rem, 5vw, 3.75rem);
  line-height: 1.1;
  letter-spacing: -.02em;
  margin: 0 0 1rem 0;
}
.ml-hero p {
  color: var(--ml-muted);
  max-width: 55ch;
  margin: 0 auto;
  font-size: 1.15rem;
}

/* ── Feed grid ── */
.ml-feed { max-width: var(--ml-max); margin: 0 auto; padding: 2rem 1.5rem 5rem; }
.ml-feed__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2.5rem 2rem;
}

/* ── Featured hero card ── */
.ml-post-card--featured {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 2.5rem;
  background: var(--ml-surface);
  border: 1px solid var(--ml-border);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 2.5rem;
  align-items: stretch;
}
.ml-post-card--featured .ml-post-card__image {
  aspect-ratio: auto;
  min-height: 340px;
}
.ml-post-card--featured .ml-post-card__body {
  padding: 2rem 2rem 2rem 0;
  display: flex; flex-direction: column; justify-content: center;
}
.ml-post-card--featured .ml-post-card__title {
  font-size: clamp(1.75rem, 2.6vw, 2.3rem);
}
.ml-post-card--featured .ml-post-card__excerpt {
  font-size: 1.05rem;
}
@media (max-width: 720px) {
  .ml-post-card--featured { grid-template-columns: 1fr; gap: 0; }
  .ml-post-card--featured .ml-post-card__body { padding: 1.1rem 1.25rem 1.25rem; }
  .ml-post-card--featured .ml-post-card__image { min-height: 0; }
}
.ml-post-card {
  background: var(--ml-surface);
  border: 1px solid var(--ml-border);
  border-radius: 14px;
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .2s, box-shadow .2s;
}
.ml-post-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(15, 23, 42, .08);
}
.ml-post-card[hidden] { display: none !important; }
.ml-post-card__image {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--ml-border);
}
.ml-post-card__image img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s;
}
.ml-post-card:hover .ml-post-card__image img { transform: scale(1.03); }
.ml-post-card__body { padding: 1.1rem 1.25rem 1.25rem; }
.ml-post-card__title {
  margin: .35rem 0 .5rem 0;
  font-size: 1.4rem; line-height: 1.2;
  letter-spacing: -.01em;
}
.ml-post-card__title a:hover { color: var(--ml-accent); }
.ml-post-card__excerpt {
  margin: 0 0 .75rem 0;
  color: var(--ml-muted); font-size: .95rem;
  font-family: -apple-system, Helvetica, Arial, sans-serif;
}
.ml-post-card__meta {
  font-family: -apple-system, Helvetica, Arial, sans-serif;
  font-size: .75rem;
  color: var(--ml-muted);
  letter-spacing: .02em;
  text-transform: uppercase;
}
.ml-empty-state {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--ml-muted);
  font-family: -apple-system, Helvetica, Arial, sans-serif;
}

/* ── Single post ── */
.ml-post {
  max-width: 720px;
  margin: 0 auto;
  padding: 4rem 1.5rem 5rem;
}
.ml-post__head { text-align: center; margin-bottom: 2.5rem; }
.ml-post__title {
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1.1;
  letter-spacing: -.02em;
  margin: .75rem 0 .75rem 0;
}
.ml-post__lead {
  color: var(--ml-muted);
  font-size: 1.2rem;
  max-width: 55ch;
  margin: 0 auto 1rem auto;
  font-style: italic;
}
.ml-post__meta {
  font-family: -apple-system, Helvetica, Arial, sans-serif;
  font-size: .85rem; color: var(--ml-muted);
  letter-spacing: .02em;
}
.ml-post__hero { margin: 2.5rem -2rem; }
.ml-post__hero img {
  width: 100%; height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 8px;
}
.ml-post__body {
  font-size: 1.15rem;
  line-height: 1.75;
}
.ml-post__body h2 { font-size: 1.7rem; margin: 2.5rem 0 1rem; letter-spacing: -.01em; }
.ml-post__body h3 { font-size: 1.35rem; margin: 2rem 0 .75rem; }
.ml-post__body p { margin: 0 0 1.15rem 0; }
.ml-post__body img { max-width: 100%; height: auto; border-radius: 8px; margin: 1.5rem 0; }
.ml-post__body a { color: var(--ml-accent); border-bottom: 1px solid currentColor; }
.ml-post__body blockquote {
  border-left: 4px solid var(--ml-accent);
  padding-left: 1.25rem;
  font-style: italic;
  color: var(--ml-muted);
  margin: 1.75rem 0;
}
.ml-post__body pre { background: #0f172a; color: #e2e8f0; padding: 1rem; border-radius: 8px; overflow-x: auto; font-size: .9rem; font-family: ui-monospace, Menlo, Consolas, monospace; }
.ml-post__body code { background: var(--ml-border); padding: .12rem .4rem; border-radius: 4px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .9em; }

/* ── Reading progress bar ── */
.ml-progress {
  position: fixed; top: 0; left: 0; right: 0;
  height: 3px; z-index: 40;
  background: transparent;
  pointer-events: none;
}
.ml-progress__bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--ml-accent), #db2777);
  transition: width .1s linear;
}

/* ── "More in this language" block ── */
.ml-post__more {
  margin-top: 4rem;
  padding-top: 3rem;
  border-top: 1px solid var(--ml-border);
}
.ml-post__more-title {
  font-size: 1.4rem;
  letter-spacing: -.01em;
  margin: 0 0 1.5rem 0;
  font-family: -apple-system, Helvetica, Arial, sans-serif;
}
.ml-post-card--small .ml-post-card__title { font-size: 1.15rem; }

/* ── Cross-language sibling block ── */
.ml-post__langs {
  margin-top: 3.5rem;
  padding: 1.5rem 1.75rem;
  background: var(--ml-surface);
  border: 1px solid var(--ml-border);
  border-radius: 12px;
  font-family: -apple-system, Helvetica, Arial, sans-serif;
}
.ml-post__langs-label {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--ml-muted);
  margin-bottom: .85rem;
}
.ml-post__langs ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .55rem; }
.ml-post__langs a {
  display: flex; align-items: center; gap: .65rem;
  font-weight: 500;
  font-size: 1rem;
  padding: .35rem 0;
}
.ml-post__langs a:hover { color: var(--ml-accent); }

/* ── Language badge ── */
.ml-lang-badge {
  display: inline-block;
  font-family: -apple-system, Helvetica, Arial, sans-serif;
  font-size: .65rem;
  font-weight: 800;
  letter-spacing: .08em;
  padding: .2rem .45rem;
  border-radius: 4px;
  background: var(--ml-border);
  color: var(--ml-fg);
  margin-right: .25rem;
}
.ml-lang-badge--nl { background: var(--ml-lang-nl); color: #fff; }
.ml-lang-badge--en { background: var(--ml-lang-en); color: #fff; }
.ml-lang-badge--fr { background: var(--ml-lang-fr); color: #fff; }
.ml-lang-badge--de { background: var(--ml-lang-de); color: #fff; }
.ml-lang-badge--es { background: var(--ml-lang-es); color: #fff; }

/* ── Footer ── */
.ml-foot {
  border-top: 1px solid var(--ml-border);
  padding: 2rem 1.5rem;
  font-family: -apple-system, Helvetica, Arial, sans-serif;
  font-size: .85rem;
  color: var(--ml-muted);
}
.ml-foot__inner {
  max-width: var(--ml-max); margin: 0 auto;
  display: flex; gap: 1.5rem; flex-wrap: wrap;
}
.ml-foot__inner a { color: var(--ml-muted); }

/* ── Responsive ── */
@media (max-width: 720px) {
  .ml-head__inner { flex-wrap: wrap; padding: .75rem 1rem; gap: .75rem; }
  .ml-head { height: auto; }
  .ml-langs { order: 3; width: 100%; overflow-x: auto; padding-bottom: .35rem; }
  .ml-brand { font-size: 1rem; }
  .ml-post__hero { margin: 2rem 0; }
}

/* ── Dark mode ── */
[data-theme="dark"] {
  --ml-bg: #0b1120;
  --ml-fg: #e2e8f0;
  --ml-muted: #94a3b8;
  --ml-border: #1f2937;
  --ml-surface: #0f172a;
  --ml-accent: #fbbf24;
}
[data-theme="dark"] .ml-head { background: rgba(11, 17, 32, .85); }
[data-theme="dark"] .ml-post__body pre { background: #020617; }
