/* =================================================
   BASE LAYOUT
================================================= */

body {
  font-size: 17px;
  line-height: 1.8;
  color: #1f2937;
  font-weight: 400;
  font-family: "Raleway", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.main-container {
  max-width: 860px;
}

/* meer ruimte tussen navbar en body */
.contents {
  padding-top: 2.6rem;
}

/* page header compacter */
.page-header {
  margin-bottom: 2rem;
  border-bottom: none !important;
}


/* =================================================
   TYPOGRAPHY
================================================= */

h1, h2, h3, h4 {
  font-family: "Montserrat", sans-serif;
  letter-spacing: -0.02em;
  color: #111827;
}

h1 {
  font-size: 3.2rem;
  font-weight: 700;
  line-height: 1.04;
  margin-top: 0.25rem;
  margin-bottom: 1.8rem;
}

h2 {
  font-size: 2.05rem;
  font-weight: 600;
  line-height: 1.18;
  margin-top: 3rem;
  margin-bottom: 1rem;
}

/* eerste h2 iets compacter */
.section.level2:first-of-type h2,
h1 + h2 {
  margin-top: 2.4rem;
}

h3 {
  font-size: 1.45rem;
  font-weight: 600;
  line-height: 1.25;
  margin-top: 2.2rem;
  margin-bottom: 0.7rem;
}

h4 {
  font-size: 1.12rem;
  font-weight: 600;
  margin-top: 1.8rem;
  margin-bottom: 0.7rem;
}

p {
  font-size: 1.16rem;
  line-height: 1.82;
  color: #374151;
  margin-top: 0;
  margin-bottom: 1.2rem;
}

ul, ol {
  margin-top: 0.8rem;
  margin-bottom: 1.4rem;
  padding-left: 1.5rem;
}

li {
  font-size: 1.13rem;
  line-height: 1.75;
  margin-bottom: 0.15rem;
  color: #374151;
}


/* =================================================
   SECTION FLOW
================================================= */

.section.level2 {
  margin-top: 0;
  margin-bottom: 0.4rem;
}

.section.level3 {
  margin-top: 0;
  margin-bottom: 0.25rem;
}


/* =================================================
   CODE
================================================= */

code {
  font-size: 0.93em;
  line-height: 1.35;
  padding: 0.16em 0.36em;
  border-radius: 8px;
  background: #f3f4f6;
  color: #111827;
}

pre {
  background: #fafafa;
  border: 1px solid #ececec;
  border-radius: 14px;
  padding: 1rem 1.15rem;
  margin-top: 1.4rem;
  margin-bottom: 1.8rem;
  line-height: 1.45;
}

pre code {
  background: transparent;
  padding: 0;
  line-height: 1.45;
}


/* =================================================
   BLOCKQUOTE
================================================= */

blockquote {
  border-left: 4px solid #e5e7eb;
  padding-left: 1rem;
  margin: 2rem 0;
  color: #374151;
}

blockquote p {
  margin-bottom: 0.35rem;
}


/* =================================================
   NAVBAR
================================================= */

.navbar {
  border-bottom: 1px solid #f3f4f6;
  box-shadow: none;
  min-height: 64px;
}

.navbar-brand {
  font-weight: 600;
  letter-spacing: -0.01em;
}

.navbar-nav .nav-link {
  font-weight: 500;
  color: #6b7280 !important;
}

.navbar-nav .nav-link:hover {
  color: #111827 !important;
}


/* =================================================
   RIGHT SIDEBAR
================================================= */

.pkgdown-sidebar {
  padding-top: 2.8rem;
}

.pkgdown-sidebar h2,
.pkgdown-sidebar h3,
.pkgdown-sidebar h4 {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-top: 0;
  margin-bottom: 0.9rem;
}

.pkgdown-sidebar p,
.pkgdown-sidebar li {
  font-size: 1rem;
  line-height: 1.55;
  margin-bottom: 0.45rem;
}

.pkgdown-sidebar section {
  margin-bottom: 2rem;
}

.pkgdown-sidebar .links,
.pkgdown-sidebar .license,
.pkgdown-sidebar .citation,
.pkgdown-sidebar .developers,
.pkgdown-sidebar .dev-status {
  margin-bottom: 2rem;
}


/* =================================================
   TOC
================================================= */

#toc {
  font-size: 0.88rem;
  line-height: 1.25;
}

#toc .nav-link {
  color: #6b7280;
  padding-top: 0.02rem;
  padding-bottom: 0.02rem;
  line-height: 1.22;
}

#toc .nav-link.active,
#toc .nav-link:hover {
  color: #111827;
}


/* =================================================
   TABLES & FIGURES
================================================= */

table {
  margin-top: 1.6rem;
  margin-bottom: 2rem;
}

img,
.figure {
  margin-top: 1.2rem;
  margin-bottom: 1.6rem;
}


/* =================================================
   CLEANUP
================================================= */

hr {
  display: none;
}


/* =================================================
   RESPONSIVE
================================================= */

@media (max-width: 768px) {
  .main-container {
    max-width: 100%;
  }

  .contents {
    padding-top: 1.5rem;
  }

  h1 {
    font-size: 2.5rem;
  }

  h2 {
    font-size: 1.75rem;
    margin-top: 2.8rem;
  }

  h3 {
    font-size: 1.28rem;
    margin-top: 2rem;
  }

  p,
  li {
    font-size: 1.04rem;
  }
}

.navbar + .container,
.navbar + .container-fluid {
  padding-top: 1.5rem;
}

.template-home .page-header,
.template-article .page-header,
.template-reference .page-header {
  margin-top: 0.75rem;
}
