:root {
  --bg: #f7f7fb;
  --surface: #ffffff;
  --text: #1b1b24;
  --muted: #5b5b6e;
  --border: #e3e3ee;
  --accent: #5b4cf0;
  --accent-text: #ffffff;
  --radius: 14px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f0f17;
    --surface: #181824;
    --text: #ececf4;
    --muted: #a3a3b8;
    --border: #2a2a3b;
    --accent: #8b7fff;
    --accent-text: #0f0f17;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
}

a { color: var(--accent); }

code {
  font-family: ui-monospace, "JetBrains Mono", monospace;
  font-size: 0.9em;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.1em 0.35em;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem clamp(1rem, 5vw, 3rem);
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.logo {
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}

nav { display: flex; gap: 1.25rem; flex-wrap: wrap; }
nav a { color: var(--muted); text-decoration: none; white-space: nowrap; }
nav a:hover { color: var(--text); }

/* Smalle schermen: logo boven, menu op één regel met zijwaarts scrollen. */
@media (max-width: 640px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
    padding: 0.7rem 1rem;
  }
  nav {
    width: 100%;
    flex-wrap: nowrap;
    gap: 1rem;
    overflow-x: auto;
    scrollbar-width: none;
  }
  nav::-webkit-scrollbar { display: none; }
}

/* Anker-links verdwijnen niet achter de vaste header. */
.section, .hero { scroll-margin-top: 6.5rem; }

main {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 5vw, 2rem);
}

.hero { padding: clamp(4rem, 12vw, 8rem) 0 3rem; }

.eyebrow {
  margin: 0;
  color: var(--accent);
  font-weight: 600;
}

h1 {
  margin: 0.25rem 0 1rem;
  font-size: clamp(2.5rem, 9vw, 4.5rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.lead {
  max-width: 38rem;
  margin: 0 0 2rem;
  font-size: 1.15rem;
  color: var(--muted);
}

.actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }

.btn {
  display: inline-block;
  padding: 0.7rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-text);
}

.section {
  padding: 3rem 0;
  border-top: 1px solid var(--border);
}

h2 { margin: 0 0 1rem; font-size: 1.6rem; letter-spacing: -0.01em; }

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}
.tags li {
  padding: 0.3rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.9rem;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.card {
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.card h3 { margin: 0 0 0.5rem; }
.card p { margin: 0 0 0.75rem; color: var(--muted); }
.card a { font-weight: 600; text-decoration: none; }

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.apps-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 560px;
  font-size: 0.95rem;
}

/* Kolomkoppen en rang blijven op één regel; de rest mag omlopen. */
.apps-table th,
.apps-table td:first-child { white-space: nowrap; }
.apps-table td { vertical-align: top; }

.apps-table th,
.apps-table td {
  padding: 0.7rem 0.9rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.apps-table tbody tr:last-child td { border-bottom: 0; }
.apps-table tbody tr:hover { background: color-mix(in srgb, var(--accent) 7%, transparent); }
.apps-table td:first-child { color: var(--muted); font-variant-numeric: tabular-nums; }

.apps-table th button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}
.apps-table th button:hover { color: var(--text); }
.apps-table th[aria-sort] button { color: var(--accent); }
.apps-table th[aria-sort="ascending"] button::after { content: " ↑"; }
.apps-table th[aria-sort="descending"] button::after { content: " ↓"; }

.note {
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.site-footer {
  padding: 2rem;
  text-align: center;
  color: var(--muted);
  border-top: 1px solid var(--border);
}
