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

:root {
  --accent: #ffffff;
  --panel-bg: rgba(30, 20, 25, 0.45);
  --card-bg: rgba(255, 255, 255, 0.06);
  --text: #f0ece8;
  --text-muted: #a89f9a;
}

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text);
  overflow: hidden;
  background: #0a0508;
}

/* ── Background ─────────────────────────────────────── */
.bg {
  position: fixed;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 0;
}

#bg  { opacity: 1; background-image: url('https://bfhvwqayyvczlrbbgrxz.supabase.co/storage/v1/object/public/backgrounds/bg_1774296849691_8.jpg'); }
#bg2 { opacity: 0; }

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(30, 5, 15, 0.35);
  z-index: 1;
}

/* ── Logo ────────────────────────────────────────────── */
.logo {
  position: fixed;
  top: 20px;
  left: 28px;
  z-index: 10;
  text-decoration: none;
}

.logo img {
  height: 64px;
  width: auto;
  filter: invert(1);
  opacity: 0.9;
  transition: opacity 0.2s;
}

.logo:hover img { opacity: 1; }

/* ── Side nav ────────────────────────────────────────── */
.side-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: none;
  border: none;
  cursor: pointer;
  font-size: clamp(0.8rem, 1.5vw, 1.2rem);
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.02em;
  padding: 16px 24px;
  transition: opacity 0.2s, transform 0.2s;
  line-height: 1;
}

.side-nav:hover { opacity: 0.7; transform: translateY(-50%) scale(1.08); }
.prev { left: 0; }
.next { right: 0; }

/* ── Popup ───────────────────────────────────────────── */
.popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
}

.popup {
  position: relative;
  width: min(420px, calc(100vw - 40px));
  max-height: calc(100svh - 80px);
  overflow-y: auto;
  background: rgba(20, 10, 15, 0.62);
  backdrop-filter: invert(0.88) blur(6px);
  -webkit-backdrop-filter: invert(0.88) blur(6px);
  border-radius: 20px;
  padding: 20px;
  animation: panelOpen 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;
  color: var(--text);
  text-shadow: 0 1px 4px rgba(0,0,0,0.6);
}

@media (hover: hover) {
  .popup { cursor: grab; }
  .popup.is-dragging { cursor: grabbing; user-select: none; }
}

.popup-header {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  gap: 8px;
}

.popup-body {
  padding-right: 72px;
}

.popup-btn-minimize,
.popup-btn-close {
  background: rgba(255,255,255,0.12);
  border: none;
  color: var(--text);
  width: 28px;
  height: 28px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.popup-btn-minimize:hover,
.popup-btn-close:hover {
  background: rgba(255,255,255,0.22);
}

.popup-tab {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  background: rgba(20, 10, 15, 0.62);
  backdrop-filter: invert(0.88) blur(6px);
  -webkit-backdrop-filter: invert(0.88) blur(6px);
  color: var(--text);
  padding: 8px 20px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.popup-tab:hover { background: rgba(0, 0, 0, 0.4); }

/* ── Site logo ───────────────────────────────────────── */
.site-logo {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 10;
  opacity: 0.8;
}

.site-logo img {
  height: 112px;
  width: auto;
  display: block;
  filter: brightness(0) invert(1);
}

/* ── Center column ───────────────────────────────────── */
.center {
  position: fixed;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 20px;
  overflow-y: auto;
}

/* ── Tab bar ─────────────────────────────────────────── */
.tabbar {
  position: relative;
  display: flex;
  gap: 4px;
  background: rgba(30, 20, 25, 0.35);
  backdrop-filter: blur(30px);
  border-radius: 999px;
  padding: 4px;
  margin-bottom: 14px;
  flex-shrink: 0;
}

.tab-pill {
  position: absolute;
  top: 4px;
  height: calc(100% - 8px);
  background: #fff;
  border-radius: 999px;
  transition: left 0.25s cubic-bezier(0.16, 1, 0.3, 1), width 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.15s;
  pointer-events: none;
  opacity: 0;
}

.tab-pill.visible { opacity: 1; }

.tab {
  position: relative;
  text-decoration: none;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 500;
  padding: 5px 13px;
  border-radius: 999px;
  transition: color 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1;
}

.tab.pill-over {
  color: #111;
}

.tab.active {
  font-weight: 600;
}

/* ── Panel ───────────────────────────────────────────── */
@keyframes panelOpen {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(-10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.panel {
  width: 100%;
  max-width: 360px;
  background: var(--panel-bg);
  backdrop-filter: blur(40px);
  border-radius: 18px;
  overflow: hidden;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  flex-shrink: 0;
  margin-bottom: 18px;
  transform-origin: top center;
  opacity: 0;
  transform: scale(0.96) translateY(-10px);
  pointer-events: none;
}

.panel.open {
  animation: panelOpen 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;
  pointer-events: auto;
}

.panel.switching {
  pointer-events: auto;
}

.panel { scrollbar-width: none; }
.panel::-webkit-scrollbar { width: 4px; }
.panel::-webkit-scrollbar-track { background: transparent; }
.panel::-webkit-scrollbar-thumb { background: transparent; border-radius: 2px; transition: background 0.3s; }
.panel:hover::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); }

/* ── Sections ────────────────────────────────────────── */
.section {
  display: none;
  padding: 18px;
  opacity: 0;
  transform: translateY(10px);
}

.section.visible {
  display: block;
}

.section.active {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.section-title {
  font-size: 0.77rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.see-all {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}
.see-all:hover { color: var(--text); }

/* ── Cards ───────────────────────────────────────────── */
.card {
  display: block;
  background: var(--card-bg);
  border-radius: 11px;
  overflow: hidden;
  margin-bottom: 9px;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
  text-decoration: none;
  color: inherit;
}
.card:hover { background: rgba(255,255,255,0.1); transform: translateY(-1px); }

.card-thumb {
  width: 100%;
  height: 162px;
  object-fit: cover;
  display: block;
}

.placeholder-thumb {
  background: linear-gradient(135deg, #2a1a2e 0%, #1a2a3a 100%);
}

.card-info {
  padding: 11px 13px 13px;
}

.card-info.full { padding: 13px; }

.card-info strong {
  display: block;
  font-size: 0.86rem;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text);
}

.card-info span {
  font-size: 0.74rem;
  color: var(--text-muted);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── More link ───────────────────────────────────────── */
.more-link {
  display: block;
  text-align: center;
  font-size: 0.72rem;
  color: var(--text-muted);
  text-decoration: none;
  padding: 11px 0 4px;
  transition: color 0.2s, transform 0.2s;
  letter-spacing: 0.02em;
}

.more-link:hover { color: var(--text); transform: scale(1.05); }

/* ── About / Contact ─────────────────────────────────── */
.about-text {
  font-size: 0.74rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.about-text p { margin-bottom: 0.8em; }
.about-text p:last-child { margin-bottom: 0; }

.about-text strong, .about-text b {
  color: var(--text);
  font-weight: 600;
}

.about-text em, .about-text i { font-style: italic; }

.about-text h1, .about-text h2, .about-text h3 {
  color: var(--text);
  font-weight: 600;
  margin: 1em 0 0.4em;
}

.about-text h1 { font-size: 1.08rem; }
.about-text h2 { font-size: 1rem; }
.about-text h3 { font-size: 0.9rem; }

.about-text ul, .about-text ol {
  padding-left: 1.4em;
  margin-bottom: 0.8em;
}

.about-text li { margin-bottom: 0.2em; }

.about-text img {
  max-width: 100%;
  border-radius: 8px;
  margin: 0.6em 0;
}

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

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

.presskit-btn {
  display: block;
  margin-top: 13px;
  padding: 7px 14px;
  background: rgba(255,255,255,0.1);
  color: #fff;
  text-decoration: none;
  border-radius: 999px;
  font-size: 0.64rem;
  font-weight: 600;
  text-align: center;
  transition: background 0.2s, transform 0.2s;
}

.presskit-btn:hover {
  background: rgba(255,255,255,0.18);
  transform: scale(1.03);
  text-decoration: none;
}

/* ── YouTube embed ───────────────────────────────────── */
.youtube-embed {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
}

.youtube-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* ── Empty state ─────────────────────────────────────── */
.empty-state {
  font-size: 0.85rem;
  color: var(--text-muted);
  padding: 8px 0 4px;
}

/* ── Thoughts overzicht ──────────────────────────────── */
.thoughts-container {
  max-width: 720px;
  margin: 0 auto;
  padding: 80px 24px 120px;
}

.thoughts-header {
  margin-bottom: 56px;
}

.thoughts-header h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  margin: 20px 0 12px;
}

.thoughts-intro {
  font-size: 1rem;
  color: var(--text-muted);
}

/* ── Nieuwsbrief ─────────────────────────────────────── */
.newsletter-block {
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 48px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.newsletter-block .newsletter-form {
  flex-direction: row;
}

.newsletter-text {
  flex: 1;
  min-width: 180px;
}

.newsletter-text strong {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}

.newsletter-text span {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.newsletter-form {
  display: flex;
  flex-direction: row;
  gap: 8px;
  align-items: center;
}

.newsletter-form input {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  padding: 9px 14px;
  font-size: 0.88rem;
  color: var(--text);
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
  width: 220px;
}

.newsletter-form input::placeholder { color: var(--text-muted); }
.newsletter-form input:focus { border-color: rgba(255,255,255,0.3); }

.newsletter-form button {
  background: #fff;
  color: #111;
  border: none;
  border-radius: 8px;
  padding: 9px 18px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.2s;
}

.newsletter-form button:hover { opacity: 0.85; }
.newsletter-form button:disabled { opacity: 0.5; cursor: default; }

.newsletter-msg {
  width: 100%;
  font-size: 0.82rem;
  min-height: 1em;
  color: var(--text-muted);
  margin-top: -8px;
}

.newsletter-msg.success { color: #4ade80; }
.newsletter-msg.error { color: #f87171; }

/* ── Thoughts lijst ──────────────────────────────────── */
.thoughts-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.thought-item {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  text-decoration: none;
  color: inherit;
  transition: opacity 0.2s;
}

.thought-item:first-child { border-top: 1px solid rgba(255,255,255,0.07); }
.thought-item:hover { opacity: 0.7; }

.thought-cover {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
}

.thought-info { flex: 1; min-width: 0; }

.thought-info h2 {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 5px;
  color: var(--text);
}

.thought-info p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.thought-info time {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.3);
  letter-spacing: 0.02em;
}

.pagination {
  display: flex;
  gap: 6px;
  margin-top: 48px;
}

.page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  border: 1px solid rgba(255,255,255,0.1);
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.page-link:hover {
  background: rgba(255,255,255,0.08);
  color: var(--text);
}

.page-link.active {
  background: #fff;
  color: #111;
  border-color: #fff;
  font-weight: 700;
}

/* ── Post pagina ─────────────────────────────────────── */
.post-page {
  background: #0a0508;
  overflow-y: auto;
  overflow-x: hidden;
}

.post-container {
  min-height: 100vh;
}

.post-loading {
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 60px 24px;
  text-align: center;
}

/* Hero */
.post-hero {
  position: relative;
  width: 100%;
}

.post-hero.has-cover {
  min-height: 60vh;
  display: flex;
  align-items: flex-end;
}

.post-hero.no-cover {
  padding-top: 80px;
  background: linear-gradient(180deg, rgba(30,5,15,0.8) 0%, transparent 100%);
}

.post-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.post-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10,5,8,0.95) 0%, rgba(10,5,8,0.4) 50%, rgba(10,5,8,0.1) 100%);
}

.post-hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 24px 48px;
}

.post-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 28px;
  transition: color 0.2s;
}

.post-back:hover { color: rgba(255,255,255,0.9); }

.post-hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: #fff;
  margin-bottom: 16px;
}

.post-excerpt {
  font-size: 1.15rem;
  color: rgba(255,255,255,0.65);
  line-height: 1.5;
  margin-bottom: 20px;
  max-width: 560px;
}

.post-hero time {
  display: block;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.4);
  letter-spacing: 0.02em;
}

/* Article body */
.post-article {
  max-width: 720px;
  margin: 0 auto;
  padding: 56px 24px 120px;
}

.post-body {
  font-size: 1.1rem;
  line-height: 1.85;
  color: rgba(240,236,232,0.8);
}

.post-body p { margin-bottom: 1.5em; }

.post-body h2 {
  color: var(--text);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 2.5em 0 0.7em;
}

.post-body h3 {
  color: var(--text);
  font-size: 1.15rem;
  font-weight: 600;
  margin: 2em 0 0.5em;
}

.post-body a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: rgba(255,255,255,0.3);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s;
}

.post-body a:hover { text-decoration-color: rgba(255,255,255,0.8); }

.post-body img {
  width: 100%;
  border-radius: 12px;
  margin: 2em 0;
  display: block;
}

.post-body blockquote {
  border-left: 3px solid rgba(255,255,255,0.2);
  padding: 4px 0 4px 24px;
  margin: 2em 0;
  color: rgba(255,255,255,0.55);
  font-style: italic;
  font-size: 1.15rem;
}

.post-body ul, .post-body ol {
  padding-left: 1.5em;
  margin-bottom: 1.5em;
}

.post-body li { margin-bottom: 0.4em; }

.post-body hr {
  border: none;
  border-top: 1px solid rgba(255,255,255,0.1);
  margin: 3em 0;
}

.post-body code {
  font-family: 'SF Mono', Menlo, monospace;
  font-size: 0.88em;
  background: rgba(255,255,255,0.07);
  padding: 2px 6px;
  border-radius: 4px;
}

.post-body pre {
  background: rgba(255,255,255,0.05);
  border-radius: 10px;
  padding: 20px;
  overflow-x: auto;
  margin: 1.5em 0;
}

.post-body pre code {
  background: none;
  padding: 0;
  font-size: 0.9rem;
}

.post-body .md-btn {
  display: inline-block;
  margin: 0.4em 0;
  padding: 10px 22px;
  background: #fff;
  color: #111;
  text-decoration: none;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  transition: opacity 0.2s, transform 0.2s;
}

.post-body .md-btn:hover {
  opacity: 0.85;
  transform: scale(1.03);
  text-decoration: none;
}

/* ── Landing page YouTube embed ─────────────────────── */
.landing-youtube {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  margin: 32px 0;
  border-radius: 12px;
  overflow: hidden;
}

.landing-youtube iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* ── Landing page back link ──────────────────────────── */
.landing-back {
  display: inline-flex;
  align-items: center;
  margin-top: 40px;
  color: rgba(255,255,255,0.35);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color 0.2s;
}

.landing-back:hover { color: rgba(255,255,255,0.75); }

/* ── Landing pages ───────────────────────────────────── */
.landing-page .post-hero.has-cover {
  min-height: 42vh;
}

.landing-page .post-hero-content {
  padding-bottom: 32px;
}

.landing-page .post-article {
  padding-top: 28px;
}

/* ── Mobiel ──────────────────────────────────────────── */

/* Fix scroll op post/thoughts pagina's */
html:has(body.post-page) {
  overflow-y: auto;
  height: auto;
}

@media (max-width: 600px) {

  /* Homepage: prev/next naar onderkant */
  .side-nav {
    top: auto;
    bottom: 24px;
    transform: none;
    font-size: 1.3rem;
    padding: 12px 18px;
    background: rgba(10,5,10,0.5);
    backdrop-filter: blur(10px);
    border-radius: 999px;
  }

  .prev { left: max(16px, env(safe-area-inset-left)); }
  .next { right: max(16px, env(safe-area-inset-right)); }

  .side-nav {
    bottom: max(24px, calc(env(safe-area-inset-bottom) + 12px));
  }

  /* Center kolom */
  .center {
    padding-top: 40px;
    justify-content: flex-start;
    align-items: center;
  }

  /* Tabbar iets compacter */
  .tabbar {
    margin-bottom: 12px;
    margin-left: 16px;
    margin-right: 16px;
  }

  .tab {
    font-size: 0.68rem;
    padding: 5px 10px;
  }

  /* Panel vult bijna volledige breedte */
  .panel {
    width: calc(100% - 32px);
    max-width: none;
    border-radius: 14px;
    max-height: calc(100svh - 110px);
  }

  /* Nieuwsbrief form gestapeld */
  .newsletter-form {
    flex-direction: column;
  }

  .newsletter-form input {
    width: 100%;
  }

  .newsletter-form button {
    width: 100%;
    padding: 11px 18px;
  }

  .popup-btn-minimize,
  .popup-btn-close {
    width: 36px;
    height: 36px;
    font-size: 1.3rem;
  }

  .popup-tab {
    bottom: 90px;
  }

  .site-logo {
    left: 50%;
    transform: translateX(-50%);
    z-index: 4;
  }

  .site-logo img {
    height: 80px;
  }

  .side-nav {
    font-size: 0.9rem;
  }

  /* Thoughts overzicht */
  .thoughts-container {
    padding: 48px 20px 100px;
  }

  .thoughts-header {
    margin-bottom: 36px;
  }

  .thought-item {
    gap: 14px;
    padding: 16px 0;
  }

  .thought-cover {
    width: 64px;
    height: 64px;
  }

  .thought-info h2 {
    font-size: 1rem;
  }

  /* Post pagina */
  .post-hero.has-cover {
    min-height: 45vh;
  }

  .post-hero-content {
    padding: 28px 20px 36px;
  }

  .post-hero h1 {
    font-size: clamp(1.6rem, 7vw, 2.4rem);
  }

  .post-excerpt {
    font-size: 1rem;
  }

  .post-article {
    padding: 40px 20px 80px;
  }

  .post-body {
    font-size: 1rem;
    line-height: 1.75;
  }

  /* Landing pages mobiel */
  .landing-page .post-hero.has-cover {
    min-height: 36vh;
  }

  .landing-page .post-article {
    padding-top: 20px;
  }

  /* Newsletter block op post/thoughts pagina */
  .newsletter-block {
    padding: 16px;
  }
}
