:root {
  --paper: #f1efe4;
  --paper-raised: #e7e2d1;
  --ink: #17181a;
  --ink-dim: #57544a;
  --rule: #cec8b3;
  --rule-strong: #a89f83;

  --signal: #9a3412;
  --signal-strong: #7c2d12;
  --signal-text: #fdfbf5;

  --font-display: 'JetBrains Mono', ui-monospace, monospace;
  --font-body: 'IBM Plex Sans', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  --max-width: 1120px;
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  --ease-soft: cubic-bezier(0.16, 1, 0.3, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #17160f;
    --paper-raised: #201f16;
    --ink: #ece7d8;
    --ink-dim: #a49c85;
    --rule: #3c3826;
    --rule-strong: #55503a;

    --signal: #e2703a;
    --signal-strong: #f0894f;
    --signal-text: #17160f;
  }
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    repeating-linear-gradient(to right, color-mix(in srgb, var(--ink) 7%, transparent) 0 1px, transparent 1px 48px),
    repeating-linear-gradient(to bottom, color-mix(in srgb, var(--ink) 7%, transparent) 0 1px, transparent 1px 48px);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
  color: var(--ink);
}

.text-balance { text-wrap: balance; }

a {
  color: var(--signal);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 2px;
}

.section {
  padding: clamp(4rem, 8vw, 7rem) 1.5rem;
  position: relative;
}

.section--alt {
  background: color-mix(in srgb, var(--paper-raised) 88%, transparent);
}

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

.section h2 {
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  margin-bottom: 2.5rem;
}

.section-intro {
  margin: -1.5rem 0 2rem;
  color: var(--ink-dim);
  max-width: 60ch;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

/* Section kicker: a code-comment style label above every heading */

.sec-tag {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--ink-dim);
  margin: 0 0 0.6rem;
}

/* Nav */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 0.85rem 1.5rem;
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink);
  letter-spacing: 0.02em;
}
.brand-mark:hover { text-decoration: none; }

.nav-links {
  display: flex;
  gap: 1.75rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
}

.nav-links a {
  color: var(--ink);
  padding: 0.25rem 0;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.nav-links a:hover {
  color: var(--signal);
  border-color: var(--signal);
  text-decoration: none;
}

/* Hero */

.hero {
  padding: 5rem 1.5rem 5.5rem;
}

.hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3.5rem;
  align-items: center;
}

.hero-copy h1 {
  font-size: clamp(2.1rem, 4.4vw, 3.2rem);
  line-height: 1.12;
  letter-spacing: -0.015em;
}

.hero-tagline {
  color: var(--ink-dim);
  font-size: 1.1rem;
  max-width: 46ch;
  margin: 0 0 2.25rem;
}

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

.hero-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-frame {
  position: relative;
  width: 100%;
  max-width: 320px;
  padding: 1.25rem;
}

.hero-frame::before,
.hero-frame::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  border: 2px solid var(--ink-dim);
}
.hero-frame::before { top: 0; left: 0; border-right: none; border-bottom: none; }
.hero-frame::after { bottom: 0; right: 0; border-left: none; border-top: none; }

.signal-pulse {
  offset-path: path("M 215 54 L 215 100 L 65 100 L 65 140");
  offset-distance: 0%;
  animation: pulse-travel 2.2s var(--ease-soft) 0.4s 1 forwards;
}

@keyframes pulse-travel {
  from { offset-distance: 0%; opacity: 1; }
  to { offset-distance: 100%; opacity: 0.15; }
}

@media (prefers-reduced-motion: reduce) {
  .signal-pulse { opacity: 0.5; }
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.75rem 1.25rem;
  border: 1.5px solid var(--ink);
  border-radius: 2px;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  white-space: nowrap;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.btn:hover { text-decoration: none; }

.btn-primary {
  background: var(--signal);
  border-color: var(--signal);
  color: var(--signal-text);
}
.btn-primary:hover { background: var(--signal-strong); border-color: var(--signal-strong); }

.btn-icon {
  display: inline-flex;
  transition: transform 0.25s var(--ease);
}
.btn:hover .btn-icon { transform: translate(3px, -2px); }

.btn-ghost {
  background: transparent;
  border-color: var(--rule-strong);
  color: var(--ink);
}
.btn-ghost:hover {
  border-color: var(--signal);
  color: var(--signal);
}

/* Divided-row groups (shared rhythm for projects / services / overig) */

.project-list,
.service-rows {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.project-row,
.service-row {
  padding: 1.75rem 0;
  border-top: 1px solid var(--rule);
  opacity: 0;
  transition: opacity 0.6s var(--ease-soft);
}
.project-list > :last-child,
.service-rows > :last-child {
  border-bottom: 1px solid var(--rule);
}

.reveal.is-visible .project-row,
.reveal.is-visible .service-row,
.reveal.is-visible .overig-col {
  opacity: 1;
}

.project-row:nth-child(1) { transition-delay: 0ms; }
.project-row:nth-child(2) { transition-delay: 50ms; }
.project-row:nth-child(3) { transition-delay: 100ms; }
.project-row:nth-child(4) { transition-delay: 150ms; }
.project-row:nth-child(5) { transition-delay: 200ms; }

.project-row--featured { border-top: 2px solid var(--signal); }

.row-head h3 {
  font-size: 1.1rem;
  display: inline-flex;
  align-items: baseline;
  gap: 0.75rem;
  margin: 0 0 0.6rem;
}

.row-flag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--signal);
}
.row-flag::before { content: "[ "; }
.row-flag::after { content: " ]"; }

.project-row p {
  color: var(--ink-dim);
  margin: 0 0 1rem;
  max-width: 62ch;
}

.row-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.tech-tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.badge {
  width: 18px;
  height: 18px;
  object-fit: contain;
  filter: grayscale(0.55);
  opacity: 0.85;
}

.tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-dim);
  border: 1px solid var(--rule-strong);
  border-radius: 2px;
  padding: 0.2rem 0.55rem;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--signal);
}
.card-link:hover { text-decoration: none; }

.card-note {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink-dim);
  font-style: italic;
}

.btn-icon--sm {
  display: inline-flex;
  transition: transform 0.25s var(--ease);
}
.card-link:hover .btn-icon--sm { transform: translate(2px, -2px); }

/* Wat ik doe */

.service-row {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 2rem;
}

.service-row h3 {
  font-size: 1.05rem;
}

.service-row p {
  color: var(--ink-dim);
  margin: 0;
  max-width: 52ch;
}

/* Overige werkzaamheden: divided columns */

.overig-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}

.overig-col {
  padding: 0 2rem;
  opacity: 0;
  transition: opacity 0.6s var(--ease-soft);
}
.overig-col:first-child { padding-left: 0; }
.overig-col:not(:first-child) { border-left: 1px solid var(--rule); }

.overig-col:nth-child(1) { transition-delay: 0ms; }
.overig-col:nth-child(2) { transition-delay: 60ms; }
.overig-col:nth-child(3) { transition-delay: 120ms; }

.overig-col h3 {
  font-size: 1.05rem;
}

.overig-col p {
  color: var(--ink-dim);
  margin: 0;
}

/* Contact */

.contact-inner {
  text-align: center;
}

.contact-inner .sec-tag,
.contact-inner p {
  color: var(--ink-dim);
}
.contact-inner .sec-tag { text-align: left; max-width: fit-content; margin-inline: auto; }

.contact-links {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 1.75rem;
  flex-wrap: wrap;
}

.contact-links a[target="_blank"]::after {
  content: " \2197";
}

/* Footer */

.site-footer {
  padding: 2.5rem 1.5rem;
  text-align: center;
  color: var(--ink-dim);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  border-top: 1px solid var(--rule);
}

/* Mobile */

@media (max-width: 768px) {
  .hero { padding: 3.5rem 1.25rem 3rem; }
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-copy .sec-tag,
  .hero-copy .hero-tagline { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .hero-visual { order: -1; margin-bottom: 1rem; }
  .hero-frame { max-width: 220px; }

  .row-meta { justify-content: flex-start; }

  .service-row {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .overig-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .overig-col,
  .overig-col:not(:first-child) {
    padding: 0;
    border-left: none;
    border-top: 1px solid var(--rule);
    padding-top: 1.5rem;
  }
  .overig-col:first-child { border-top: none; padding-top: 0; }
}

@media (max-width: 600px) {
  .brand-mark span { display: none; }
  .section { padding: 3.5rem 1.25rem; }
}

.reveal {
  opacity: 0;
  transition: opacity 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
}
