/* ==================================================================
   KRS.TF — stylesheet
   ------------------------------------------------------------------
   Titles : Source Serif 4   — modern, strait, restful contrast
   Body   : Source Sans 3    — its purpose-built partner, made to read
   Palette: F4F4F2 paper · CECECC line/grey · 19191A ink · FAE5AD accent
            A refined greyscale with one warm colour. Type drives the
            page; the butter-yellow is a quiet accent, used sparingly.

   Structure
     1.  Fonts
     2.  Tokens (:root)
     3.  Reset & base
     4.  Layout shell
     5.  Header & navigation
     6.  Intro            (home)
     7.  Page header      (inner pages)
     8.  Sections & prose
     9.  Writing list     (home + schrijfsels)
    10.  Tags
    11.  Practice cards   (profiel)
    12.  Label/value rows (profiel)
    13.  Post             (single schrijfsel)
    14.  Archive          (filters + list)
    15.  404
    16.  Footer
    17.  Entrance animation
    18.  Responsive
   ================================================================== */


/* 1. FONTS ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Source+Serif+4:ital,opsz,wght@0,8..60,400;0,8..60,500;0,8..60,600;1,8..60,400&family=Source+Sans+3:ital,wght@0,400;0,500;0,600;1,400&display=swap');


/* 2. TOKENS ======================================================== */

:root {
  --paper:      #f4f4f2;   /* soft near-white — the base            */
  --grey:       #cececc;   /* mid grey — lines, secondary           */
  --ink:        #19191a;   /* deep warm near-black — text           */
  --ink-soft:   #5a5a58;   /* secondary text                       */
  --ink-dim:    #8d8d8a;   /* dates / fine print                   */
  --accent:     #fae5ad;   /* butter yellow — the single warm colour */
  --accent-deep:#e8cd84;   /* deeper yellow — hover / edges         */

  --serif: 'Source Serif 4', Georgia, serif;
  --sans:  'Source Sans 3', system-ui, sans-serif;

  --measure: 34rem;        /* reading width — narrow, for prose     */
  --shell:   52rem;
  --pad:     clamp(1.5rem, 5vw, 3rem);
  --gap:     clamp(4rem, 8vw, 6.5rem);
}


/* 3. RESET & BASE ================================================== */

*    { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 1.1rem;
  line-height: 1.75;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* a soft yellow highlight — used across the site for one phrase */
.mark {
  background: var(--accent);
  padding: 0.05em 0.2em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  color: var(--ink);
}


/* 4. LAYOUT SHELL ================================================== */

.wrap {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 var(--pad);
}


/* 5. HEADER & NAVIGATION =========================================== */

.site-header { padding: 2rem 0 0; }

.site-header__bar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.wordmark {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.6rem;
  letter-spacing: -0.015em;
  color: var(--ink);
  text-decoration: none;
}
/* the domain-hack dot, marked with the warm accent */
.wordmark .dot {
  background: var(--accent);
  padding: 0 0.1em;
  border-radius: 2px;
}

.site-nav { display: flex; gap: 1.75rem; }
.site-nav a {
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 500;
  color: var(--ink-soft);
  text-decoration: none;
  padding-bottom: 0.15rem;
  border-bottom: 2px solid transparent;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--ink);
  border-color: var(--accent);
}


/* 6. INTRO  (home) ================================================= */

.intro { padding: clamp(3.5rem, 8vw, 6rem) 0 var(--gap); }

.intro__name {
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: 1.5rem;
}
.intro h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.3rem, 5.2vw, 3.4rem);
  line-height: 1.16;
  letter-spacing: -0.012em;
  color: var(--ink);
  max-width: 19ch;
  margin-bottom: 1.75rem;
}
.intro p {
  max-width: var(--measure);
  margin-bottom: 1.1rem;
  color: var(--ink-soft);
}
.intro p.last {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.3rem;
  color: var(--ink);
}


/* 7. PAGE HEADER  (inner pages) ==================================== */

.page-header { padding: clamp(3rem, 7vw, 5rem) 0 clamp(2rem, 4vw, 3rem); }

.page-header__kicker {
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: 1.25rem;
}
.page-header h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  line-height: 1.15;
  letter-spacing: -0.012em;
  color: var(--ink);
  margin-bottom: 1.1rem;
}
.page-header h1:last-child { margin-bottom: 0; }
.page-header p {
  max-width: var(--measure);
  color: var(--ink-soft);
}


/* 8. SECTIONS & PROSE ============================================== */

.section { padding-bottom: var(--gap); }
.section:first-of-type { padding-top: 0.5rem; }

.section__title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.5rem;
  letter-spacing: -0.012em;
  color: var(--ink);
  padding-bottom: 1rem;
  margin-bottom: 1.75rem;
  border-bottom: 1px solid var(--grey);
}

/* a section head with a title on the left and a link on the right */
.section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1rem;
  margin-bottom: 2.25rem;
  border-bottom: 1px solid var(--grey);
}
.section__head h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.55rem;
  letter-spacing: -0.012em;
  color: var(--ink);
}
.section__head a {
  font-family: var(--sans);
  font-size: 0.97rem;
  font-weight: 500;
  color: var(--ink-soft);
  text-decoration: none;
  padding-bottom: 0.15rem;
  border-bottom: 2px solid var(--accent);
  transition: color 0.15s ease;
}
.section__head a:hover { color: var(--ink); }

.prose p {
  max-width: var(--measure);
  margin-bottom: 1.2rem;
  color: var(--ink-soft);
}
.prose p:last-child { margin-bottom: 0; }
.prose p.lead {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.3rem;
  line-height: 1.5;
  color: var(--ink);
}
/* inline text link within prose — yellow underline fills on hover */
.prose a {
  color: var(--ink);
  text-decoration: none;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-size: 100% 2px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  padding-bottom: 0.04em;
  transition: background-size 0.15s ease;
}
.prose a:hover { background-size: 100% 100%; }


/* 9. WRITING LIST  (home + schrijfsels) ============================ */

.writings { display: flex; flex-direction: column; }

.entry {
  padding: 2.1rem 0;
  border-bottom: 1px solid var(--grey);
}
.entry:first-child { padding-top: 0; }

.entry__date {
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: 0.55rem;
}

.entry__link { text-decoration: none; color: inherit; }

.entry__title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.65rem;
  line-height: 1.24;
  letter-spacing: -0.012em;
  color: var(--ink);
  display: inline;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-size: 0% 100%;
  background-repeat: no-repeat;
  transition: background-size 0.2s ease;
  padding: 0.02em 0;
}
.entry__link:hover .entry__title { background-size: 100% 100%; }

.entry__lead {
  max-width: var(--measure);
  color: var(--ink-soft);
  margin-top: 0.6rem;
  margin-bottom: 1rem;
}

.entry__tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }


/* 10. TAGS ========================================================= */

/* a tag — clickable label. Links point to tag archive URLs. */
.tag {
  font-family: var(--sans);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--ink-soft);
  text-decoration: none;
  padding: 0.2rem 0.7rem;
  border: 1px solid var(--grey);
  border-radius: 100px;
  transition: background-color 0.15s ease,
              border-color 0.15s ease,
              color 0.15s ease;
}
.tag:hover,
.tag--active {
  background: var(--accent);
  border-color: var(--accent-deep);
  color: var(--ink);
}

/* the tag bar on the schrijfsels overview */
.tagbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--grey);
  border-bottom: 1px solid var(--grey);
  margin-bottom: 2.75rem;
}
.tagbar__label {
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-dim);
  align-self: center;
  margin-right: 0.4rem;
}


/* 11. PRACTICE CARDS  (profiel) ==================================== */

.practices {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
.practice {
  background: #fff;
  border: 1px solid var(--grey);
  border-radius: 6px;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.practice:hover {
  border-color: var(--ink);
  transform: translateY(-2px);
}
.practice__name {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.4rem;
  color: var(--ink);
  margin-bottom: 0.2rem;
}
.practice__tag {
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: 0.9rem;
}
.practice p {
  color: var(--ink-soft);
  margin-bottom: 1.1rem;
  flex-grow: 1;
}
.practice__link {
  font-family: var(--sans);
  font-size: 0.97rem;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  align-self: flex-start;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-size: 100% 2px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  padding-bottom: 0.1rem;
  transition: background-size 0.15s ease;
}
.practice__link:hover { background-size: 100% 100%; }

/* a quiet disclaimer line beneath the practices */
.aside {
  max-width: var(--measure);
  margin-top: 2.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--grey);
  font-family: var(--sans);
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--ink-dim);
}


/* 12. LABEL / VALUE ROWS  (profiel) ================================ */

.rows { max-width: var(--measure); }

/* The .prose block before .rows (e.g. Contact lede) has its last <p>
   zeroed out by `.prose p:last-child`, so without this the rows
   would butt right against the paragraph. Restore breathing room. */
.prose + .rows { margin-top: 1.75rem; }

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 1rem;
  align-items: baseline;
  padding: 1rem 0;
  border-bottom: 1px solid var(--grey);
}
.row:first-child { border-top: 1px solid var(--grey); }

.row__label {
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-dim);
  min-width: 9rem;
}
.row__value {
  font-family: var(--serif);
  font-size: 1.2rem;
  color: var(--ink);
}
.row__value a {
  color: var(--ink);
  text-decoration: none;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-size: 100% 2px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size 0.15s ease;
}
.row__value a:hover { background-size: 100% 100%; }


/* 13. POST  (single schrijfsel) ==================================== */

/* the post sits in a narrow reading column */
.post { max-width: var(--measure); margin: 0 auto; }

.post__back {
  display: inline-block;
  margin: clamp(2.5rem, 6vw, 4rem) 0 2.5rem;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink-soft);
  text-decoration: none;
  transition: color 0.15s ease;
}
.post__back:hover { color: var(--ink); }

/* post header — driven by the markdown front-matter */
.post__date {
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: 1rem;
}
.post__title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.1rem, 4.8vw, 3rem);
  line-height: 1.16;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin-bottom: 1.1rem;
}
.post__standfirst {
  font-family: var(--serif);
  font-weight: 400;
  font-style: italic;
  font-size: 1.3rem;
  line-height: 1.5;
  color: var(--ink-soft);
  padding-bottom: 2rem;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--grey);
}

/* post body — the reading experience, rendered from the markdown body */
.post-body p {
  margin-bottom: 1.4rem;
  color: var(--ink);
}
.post-body p:last-child { margin-bottom: 0; }

.post-body h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.5rem;
  letter-spacing: -0.012em;
  color: var(--ink);
  margin-top: 2.75rem;
  margin-bottom: 0.9rem;
}

/* a pulled-out line within the essay */
.post-body blockquote {
  margin: 2.25rem 0;
  padding-left: 1.25rem;
  border-left: 3px solid var(--accent-deep);
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.35rem;
  line-height: 1.45;
  color: var(--ink);
}

.post-body a {
  color: var(--ink);
  text-decoration: none;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-size: 100% 2px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  padding-bottom: 0.04em;
  transition: background-size 0.15s ease;
}
.post-body a:hover { background-size: 100% 100%; }

.post-body em { font-style: italic; }
.post-body strong { font-weight: 600; }

/* post footer — tags + signature */
.post__foot {
  margin-top: 3rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--grey);
}
.post__foot-label {
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: 0.85rem;
}
.post-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.post__sign {
  margin-top: 2rem;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--ink-soft);
}


/* 14. ARCHIVE  (filters + list) ==================================== */

/* filter controls — search field + three selects */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 1.75rem 0;
  border-top: 1px solid var(--grey);
  border-bottom: 1px solid var(--grey);
  margin-bottom: 2.5rem;
}
.filters__search {
  flex: 1 1 14rem;
  min-width: 12rem;
}

.field {
  width: 100%;
  font-family: var(--sans);
  font-size: 1rem;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--grey);
  border-radius: 6px;
  padding: 0.7rem 0.9rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field::placeholder { color: var(--ink-dim); }
.field:focus {
  outline: none;
  border-color: var(--accent-deep);
  box-shadow: 0 0 0 3px var(--accent);
}

/* selects — custom chevron, native arrow removed */
.select {
  font-family: var(--sans);
  font-size: 1rem;
  color: var(--ink);
  background-color: #fff;
  border: 1px solid var(--grey);
  border-radius: 6px;
  padding: 0.7rem 2.4rem 0.7rem 0.9rem;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%235a5a58' stroke-width='1.6' d='M1 1.5 6 6.5 11 1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.select:focus {
  outline: none;
  border-color: var(--accent-deep);
  box-shadow: 0 0 0 3px var(--accent);
}

/* result count — Alpine can bind text here */
.archive__count {
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: 1.25rem;
}

/* archive list */
.archive-list { display: flex; flex-direction: column; }

.archive-row {
  display: grid;
  grid-template-columns: 11rem 1fr;
  gap: 0.3rem 2rem;
  align-items: baseline;
  padding: 1.35rem 0;
  border-bottom: 1px solid var(--grey);
}
.archive-row:first-child { border-top: 1px solid var(--grey); }

.archive-row__date {
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-dim);
  white-space: nowrap;
}
.archive-row__title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.3rem;
  line-height: 1.3;
  letter-spacing: -0.012em;
  color: var(--ink);
  text-decoration: none;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-size: 0% 100%;
  background-repeat: no-repeat;
  transition: background-size 0.2s ease;
  padding: 0.02em 0;
}
.archive-row__title:hover { background-size: 100% 100%; }

/* empty state — Alpine shows this when no results match */
.archive__empty {
  padding: 2.5rem 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--ink-soft);
}


/* 15. 404 ========================================================== */

/* the 404 page makes its body a column so the footer holds the base */
body.is-404 {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.notfound {
  flex-grow: 1;
  display: flex;
  align-items: center;
  padding: clamp(3.5rem, 12vw, 7rem) 0;
}
.notfound__inner { max-width: var(--measure); }

.notfound__code {
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: 1.25rem;
}
.notfound h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.1rem, 5vw, 3.1rem);
  line-height: 1.16;
  letter-spacing: -0.012em;
  color: var(--ink);
  margin-bottom: 1.5rem;
}
.notfound p {
  color: var(--ink-soft);
  margin-bottom: 1.1rem;
}
.notfound__home {
  display: inline-block;
  margin-top: 1rem;
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-size: 100% 2px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  padding-bottom: 0.1rem;
  transition: background-size 0.15s ease;
}
.notfound__home:hover { background-size: 100% 100%; }


/* 16. FOOTER ======================================================= */

.site-footer {
  border-top: 1px solid var(--grey);
  padding: 2.75rem 0 3.5rem;
}
/* post & archive pages add space above the footer */
.site-footer--spaced { margin-top: var(--gap); }

.site-footer__line {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.2rem;
  color: var(--ink);
  margin-bottom: 1rem;
}
.site-footer__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.25rem;
  font-family: var(--sans);
  font-size: 0.93rem;
  color: var(--ink-dim);
}
.site-footer__meta a {
  color: var(--ink-soft);
  text-decoration: none;
  padding-bottom: 0.1rem;
  border-bottom: 2px solid transparent;
  transition: border-color 0.15s ease;
}
.site-footer__meta a:hover { border-color: var(--accent); }


/* 17. ENTRANCE ANIMATION =========================================== */

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(12px);
    animation: rise 0.7s cubic-bezier(0.2, 0.6, 0.2, 1) forwards;
  }
  .reveal:nth-child(1) { animation-delay: 0.05s; }
  .reveal:nth-child(2) { animation-delay: 0.14s; }
  .reveal:nth-child(3) { animation-delay: 0.23s; }
  .reveal:nth-child(4) { animation-delay: 0.32s; }

  @keyframes rise {
    to { opacity: 1; transform: translateY(0); }
  }
}


/* 18. RESPONSIVE =================================================== */

@media (max-width: 34rem) {
  .site-header__bar { flex-direction: column; align-items: flex-start; gap: 0.85rem; }
  .site-nav { gap: 1.4rem; }

  .section__head { flex-direction: column; align-items: flex-start; gap: 0.5rem; }

  /* profiel — cards stack, label/value rows lose the fixed label width */
  .practices { grid-template-columns: 1fr; }
  .row__label { min-width: 0; }

  /* archive — filters stack into a workable column */
  .filters { flex-direction: column; gap: 0.65rem; }
  .filters__search,
  .select { width: 100%; flex: none; }

  /* archive rows — date sits above the title */
  .archive-row { grid-template-columns: 1fr; gap: 0.2rem; }
}
