:root {
  --bg: #07070b;
  --bg-soft: #0c0c12;
  --panel: #101018;
  --panel-border: rgba(255, 255, 255, 0.09);
  --ink: #f5f5f2;
  --ink-dim: #a3a3b3;
  --gray: #6f6f81;
  --accent: #6366f1;
  --accent-soft: rgba(99, 102, 241, 0.12);
  --accent-ink: #ffffff;
  --good: #4ade80;
  --warn: #facc15;
  --idea: #a78bfa;
  --font-display: "Space Grotesk", sans-serif;
  --font-accent: "Fraunces", serif;
  --font-body: "Inter", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
}

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 28px; }

a { color: inherit; }

/* Topbar */
.top-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 22px 0;
  border-bottom: 1px solid transparent;
  background: transparent;
  transition: background 0.3s ease, border-color 0.3s ease, padding 0.3s ease;
}
.top-bar.is-scrolled {
  background: rgba(7, 7, 11, 0.78);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--panel-border);
  padding: 14px 0;
}
.top-bar-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 16px; }
.brand-mark { font-size: 1.8rem; display: block; }
.brand-mark-link { display: inline-flex; text-decoration: none; transition: transform 0.2s ease; }
.brand-mark-link:hover { transform: rotate(-8deg) scale(1.08); }
.brand h1 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin: 0;
  letter-spacing: -0.01em;
}
.brand p { margin: 2px 0 0; color: var(--gray); font-size: 0.82rem; }

.top-nav { display: flex; align-items: center; gap: 30px; font-size: 0.92rem; }
.top-nav a:not(.btn) { text-decoration: none; color: var(--ink-dim); transition: color 0.2s ease; }
.top-nav a:not(.btn):hover { color: var(--ink); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: var(--accent-ink);
  border: none;
  border-radius: 999px;
  padding: 13px 24px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  font-family: var(--font-body);
  text-decoration: none;
  transition: filter 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 10px 30px -12px rgba(99, 102, 241, 0.65);
}
.btn-primary:hover { filter: brightness(1.1); }
.btn-ghost {
  background: transparent;
  border: 1px solid var(--panel-border);
  color: var(--ink-dim);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--ink); }
.btn-danger { background: #f87171; color: #2a0a0a; }

/* Scroll reveal */
[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
[data-reveal].in-view { opacity: 1; transform: translateY(0); }

/* Hero */
.hero {
  position: relative;
  padding: 150px 0 110px;
  overflow: hidden;
}
#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.85;
}
.hero-fade {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: radial-gradient(ellipse 60% 50% at 30% 20%, rgba(99, 102, 241, 0.14), transparent 70%),
    linear-gradient(180deg, transparent 0%, var(--bg) 96%);
  pointer-events: none;
}

.hero-inner { position: relative; z-index: 1; max-width: 780px; }
.eyebrow {
  font-family: var(--font-display);
  color: var(--accent);
  font-size: 0.8rem;
  margin: 0 0 20px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
}
.hero-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.6rem, 6.4vw, 4.6rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin: 0 0 26px;
}
.hero-title em {
  font-family: var(--font-accent);
  font-style: italic;
  font-weight: 500;
  color: var(--accent);
}
.hero-sub { color: var(--ink-dim); font-size: 1.15rem; margin: 0 0 38px; max-width: 620px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 54px; }

.stat-row { display: flex; gap: 14px; flex-wrap: wrap; }
.stat-pill {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  padding: 14px 20px;
  display: flex;
  flex-direction: column;
  min-width: 150px;
}
.stat-pill strong { font-family: var(--font-display); font-size: 1.2rem; }
.stat-pill span { color: var(--gray); font-size: 0.78rem; margin-top: 3px; }

/* Sections */
.section { padding: 110px 0; }
.section-alt { background: var(--bg-soft); }
.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.7rem, 3.6vw, 2.4rem);
  letter-spacing: -0.015em;
  margin: 0 0 52px;
  max-width: 640px;
}

/* Capability grid */
.capability-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1px;
  background: var(--panel-border);
  border: 1px solid var(--panel-border);
  border-radius: 20px;
  overflow: hidden;
}
.capability-card {
  background: var(--bg);
  padding: 34px 28px;
  transition: background 0.25s ease;
}
.section-alt .capability-card { background: var(--bg-soft); }
.capability-card:hover { background: var(--panel); }
.capability-num {
  font-family: var(--font-accent);
  font-style: italic;
  color: var(--accent);
  font-size: 1.4rem;
  display: block;
  margin-bottom: 16px;
}
.capability-card h4 { font-family: var(--font-display); margin: 0 0 10px; font-size: 1.08rem; }
.capability-card p { color: var(--gray); font-size: 0.92rem; margin: 0; line-height: 1.55; }

/* Work / portfolio cards */
.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 28px;
}
.work-card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 20px;
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  will-change: transform;
}
.work-card:hover { border-color: rgba(255, 255, 255, 0.18); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.6); }

/* Browser mockup */
.browser-mock { border-bottom: 1px solid var(--panel-border); }
.browser-mock-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--panel-border);
}
.browser-mock-bar .dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, 0.14); }
.browser-mock-url {
  margin-left: 10px;
  font-size: 0.72rem;
  color: var(--gray);
  background: rgba(255, 255, 255, 0.04);
  padding: 5px 12px;
  border-radius: 999px;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.browser-mock-body {
  padding: 26px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: var(--mock-color, var(--accent));
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--mock-color, var(--accent)) 8%, transparent), transparent 60%),
    var(--bg);
}
.mock-line { height: 8px; border-radius: 4px; background: currentColor; opacity: 0.55; }
.mock-line.w-40 { width: 40%; }
.mock-line.w-60 { width: 60%; }
.mock-line.w-80 { width: 80%; }
.mock-pill { height: 24px; width: 96px; border-radius: 999px; background: currentColor; opacity: 0.85; margin-top: 4px; }
.mock-grid { display: flex; gap: 8px; margin-top: 10px; }
.mock-card { flex: 1; height: 40px; border-radius: 8px; background: currentColor; opacity: 0.16; border: 1px solid currentColor; }

.work-body { padding: 26px; }
.work-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 12px; }
.work-body h4 { font-family: var(--font-display); font-size: 1.25rem; margin: 0; }
.work-body p { color: var(--gray); font-size: 0.92rem; margin: 0 0 22px; line-height: 1.6; }

/* CTA section */
.cta-section { text-align: center; }
.cta-inner { display: flex; flex-direction: column; align-items: center; }
.cta-inner .section-title { max-width: 520px; }
.cta-inner .hero-sub { text-align: center; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--panel-border);
  padding: 30px 0;
  color: var(--gray);
  font-size: 0.85rem;
}
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.footer-inner a { text-decoration: none; color: var(--gray); }
.footer-inner a:hover { color: var(--ink); }

/* ---------- Dashboard (shared classes, used by dashboard.html / app.js) ---------- */
.main { padding: 40px 24px 96px; }

.panel {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 32px;
}
.panel h2 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin: 0 0 16px;
  color: var(--ink);
}

.project-form {
  display: grid;
  grid-template-columns: 1.2fr 1.4fr 1fr 1.2fr 1.4fr auto;
  gap: 10px;
}
.project-form input,
.project-form select,
.project-form textarea {
  background: var(--bg);
  border: 1px solid var(--panel-border);
  color: var(--ink);
  border-radius: 10px;
  padding: 10px 12px;
  font-family: var(--font-body);
  font-size: 0.88rem;
  resize: vertical;
}
.project-form input::placeholder,
.project-form textarea::placeholder { color: var(--gray); }

.error-text { color: #f87171; font-size: 0.85rem; margin: 10px 0 0; }
.empty-note { color: var(--gray); text-align: center; padding: 40px; }

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.project-card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.project-card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.project-card h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin: 0;
}
.project-card p.desc { color: var(--gray); font-size: 0.88rem; margin: 0; }
.project-card p.notes { color: var(--gray); font-size: 0.8rem; font-style: italic; margin: 0; }

.status-badge {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.status-idee { background: rgba(167,139,250,0.15); color: var(--idea); }
.status-in_ontwikkeling { background: rgba(250,204,21,0.15); color: var(--warn); }
.status-wacht_op_klant { background: var(--accent-soft); color: var(--accent); }
.status-live { background: rgba(74,222,128,0.15); color: var(--good); }

.project-card-actions { display: flex; gap: 8px; margin-top: auto; flex-wrap: wrap; }
.project-card-actions a.btn,
.project-card-actions button { font-size: 0.8rem; padding: 8px 14px; }

.edit-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.edit-form input, .edit-form select, .edit-form textarea {
  background: var(--bg);
  border: 1px solid var(--panel-border);
  color: var(--ink);
  border-radius: 10px;
  padding: 8px 10px;
  font-family: var(--font-body);
  font-size: 0.85rem;
}

@media (max-width: 760px) {
  .project-form { grid-template-columns: 1fr; }
  .top-nav { gap: 16px; }
  .hero { padding: 120px 0 80px; }
  .section { padding: 76px 0; }
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal] { transition: none; }
}
