/* dries.janse.be
   Hand-written, no framework, no JS.
   Palette: warm ivory paper, deep-forest dark sections, one fern-green accent
   (accent and dark sections share a hue so the page reads as one material).
   Type: Spectral (display + the lede's editorial voice), IBM Plex Sans (body),
   IBM Plex Mono (labels, dates, data). Self-hosted, latin subset, no third party. */

/* ---- fonts: self-hosted woff2, latin only ---- */
@font-face {
  font-family: "Spectral";
  font-style: normal; font-weight: 300;
  src: url("/fonts/spectral-300.woff2") format("woff2");
  font-display: swap;
}
@font-face {
  font-family: "Spectral";
  font-style: normal; font-weight: 400;
  src: url("/fonts/spectral-400.woff2") format("woff2");
  font-display: swap;
}
@font-face {
  font-family: "Spectral";
  font-style: italic; font-weight: 400;
  src: url("/fonts/spectral-400-italic.woff2") format("woff2");
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal; font-weight: 400;
  src: url("/fonts/plex-sans-400.woff2") format("woff2");
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal; font-weight: 600;
  src: url("/fonts/plex-sans-600.woff2") format("woff2");
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal; font-weight: 400;
  src: url("/fonts/plex-mono-400.woff2") format("woff2");
  font-display: swap;
}

/* Fallback faces with adjusted metrics so the swap does not shift layout.
   Values are close approximations (Spectral vs Georgia, Plex Sans vs Arial). */
@font-face {
  font-family: "Spectral Fallback";
  src: local("Georgia"), local("Times New Roman");
  size-adjust: 97%;
  ascent-override: 92%;
  descent-override: 27%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Plex Sans Fallback";
  src: local("Arial"), local("Helvetica Neue");
  size-adjust: 100%;
  ascent-override: 95%;
  descent-override: 25%;
  line-gap-override: 0%;
}

:root {
  --paper:      #f4f1e9;
  --panel:      #ece8dd;
  --ink:        #1f1d17;
  --soft:       #5f594b;
  --rule:       rgba(31, 29, 23, 0.12);   /* translucent ink hairline, adapts to any surface */
  --rule-firm:  rgba(31, 29, 23, 0.28);
  --accent:     #35603f;

  --forest:     #17301f;
  --forest-2:   #1e3d29;
  --on-forest:  #eae7db;
  --on-forest-soft:   #93a793;
  --on-forest-accent: #a6ccae;

  --serif: "Spectral", "Spectral Fallback", Georgia, "Times New Roman", serif;
  --sans:  "IBM Plex Sans", "Plex Sans Fallback", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono:  "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --edge: clamp(1.25rem, 6vw, 6.5rem);
  --measure: 66rem;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 5.5rem;   /* clear the sticky header when jumping to an anchor */
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }

::selection { background: var(--accent); color: var(--paper); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 1px; }

.skip { position: absolute; left: -9999px; }
.skip:focus {
  left: 1rem; top: 1rem; z-index: 20;
  background: var(--ink); color: var(--paper); padding: .6rem 1rem;
}

/* ---------- type ---------- */
h1 {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(3.4rem, 13vw, 8.5rem);
  line-height: .92;
  letter-spacing: -0.025em;
}
h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.9rem, 4.6vw, 3.05rem);
  line-height: 1.1;
  letter-spacing: -0.012em;
}
h3 { font-family: var(--sans); font-weight: 600; font-size: 1rem; }

/* the green full stop after the name, echoing janse.be */
h1 .tick { color: var(--accent); }
@media (prefers-reduced-motion: no-preference) {
  h1 .tick { animation: breathe 3.4s ease-in-out 1.4s infinite; }
}
@keyframes breathe {
  0%, 100% { opacity: 1; }
  50%      { opacity: .3; }
}

.eyebrow, .kicker {
  font-family: var(--mono);
  font-size: .73rem;
  letter-spacing: .19em;
  text-transform: uppercase;
}
.eyebrow { color: var(--soft); margin-bottom: 2.5rem; }
.kicker  { color: var(--accent); margin-bottom: 1.5rem; }

/* ---------- layout ---------- */
main > section { padding: clamp(4rem, 10vw, 8.5rem) var(--edge); }
.hero, .experience, .inner { max-width: var(--measure); margin-inline: auto; }
.credentials { max-width: var(--measure); margin-inline: auto; }

/* ---------- topbar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem var(--edge);
  background: var(--paper); /* fallback for browsers without color-mix */
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  border-bottom: 1px solid transparent;
}
.mark { font-family: var(--serif); font-size: 1.15rem; font-weight: 400; text-decoration: none; }
.topbar nav { display: flex; gap: 1.6rem; }
.topbar nav a {
  font-family: var(--mono);
  font-size: .78rem;
  color: var(--soft);
  text-decoration: none;
  padding-bottom: 2px;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-size: 0% 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size .28s var(--ease), color .28s var(--ease);
}
.topbar nav a:hover { color: var(--ink); background-size: 100% 1px; }
@media (max-width: 34rem) { .topbar nav { display: none; } }

/* topbar hairline appears only once the page has scrolled */
@supports (animation-timeline: scroll()) {
  .topbar {
    animation: topbar-settle linear both;
    animation-timeline: scroll(root);
    animation-range: 0 90px;
  }
}
@keyframes topbar-settle {
  to { border-bottom-color: var(--rule); }
}

/* ---------- hero ---------- */
.hero { padding-top: clamp(3.5rem, 9vw, 7rem); }
.hero h1 { margin-bottom: 2rem; }
.lede {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.3rem, 2.7vw, 1.8rem);
  line-height: 1.42;
  max-width: 40ch;
  color: #35332b;
  margin-bottom: 3.75rem;
}

/* ---------- sheet: the shared briefing-document motif ---------- */
.sheet { border-top: 1px solid var(--rule-firm); }
.sheet > div {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 1rem;
  padding: .95rem 0;
  border-bottom: 1px solid var(--rule);
}
.sheet dt {
  font-family: var(--mono);
  font-size: .71rem;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--soft);
  padding-top: .18rem;
}
.sheet dd { font-size: .96rem; }

.hero .sheet {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: clamp(1.5rem, 5vw, 4rem);
}
@media (max-width: 40rem) {
  .hero .sheet { grid-template-columns: 1fr; }
  .sheet > div { grid-template-columns: 7.5rem 1fr; }
}
.sheet.stack > div { grid-template-columns: 12rem 1fr; }
.sheet.stack dd { color: var(--soft); }
@media (max-width: 40rem) {
  .sheet.stack > div { grid-template-columns: 1fr; gap: .3rem; }
}

/* ---------- profile (dark) ---------- */
.profile { background: var(--forest); color: var(--on-forest); }
.profile .eyebrow { color: var(--on-forest-soft); }
.split { display: grid; grid-template-columns: 1fr 1.9fr; gap: clamp(1.75rem, 6vw, 5rem); }
.split h2 { color: var(--on-forest); }
.prose p { margin-bottom: 1.4rem; color: #cdd3c8; }
.prose p:last-child { margin-bottom: 0; }
@media (max-width: 46rem) { .split { grid-template-columns: 1fr; gap: 1.5rem; } }

/* ---------- experience ---------- */
.experience h2 { margin-bottom: 3.25rem; }
.role {
  display: grid;
  grid-template-columns: 16rem 1fr;
  gap: clamp(1.5rem, 5vw, 4rem);
  padding: 2.9rem 0;
  border-top: 1px solid var(--rule);
}
.role .meta dl { display: grid; gap: .9rem; }
.role .meta dt {
  font-family: var(--mono);
  font-size: .67rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--soft);
}
.role .meta dd { font-size: .9rem; line-height: 1.45; }
.detail h3 {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .5rem .9rem;
  margin: 2rem 0 .9rem;
}
.detail h3:first-child { margin-top: 0; }
.detail .dates {
  font-family: var(--mono);
  font-size: .71rem;
  font-weight: 400;
  letter-spacing: .03em;
  color: var(--soft);
}
.detail ul { list-style: none; display: grid; gap: .65rem; }
.detail li { padding-left: 1.4rem; position: relative; }
.detail li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .42em;
  width: 2px;
  height: .95em;
  background: var(--accent);
}

@media (max-width: 46rem) {
  .role { grid-template-columns: 1fr; gap: 1.4rem; }
  .role .meta dl { grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); }
}

/* ---------- capabilities ---------- */
.capabilities { background: var(--panel); }
.capabilities h2 { margin-bottom: 2.75rem; }

/* ---------- credentials ---------- */
.credentials h2 { margin-bottom: 2.75rem; }
.cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.75rem, 5vw, 3.5rem);
}
.cols h3 { margin-bottom: 1rem; }
.plain { list-style: none; display: grid; gap: .6rem; }
.plain li { color: var(--soft); font-size: .95rem; line-height: 1.5; }
@media (max-width: 46rem) { .cols { grid-template-columns: 1fr; gap: 2rem; } }

/* ---------- contact (dark) ---------- */
.contact { background: var(--forest); color: var(--on-forest); }
.contact .eyebrow { color: var(--on-forest-soft); }
.contact h2 { color: var(--on-forest); margin-bottom: 1.6rem; }
.contact-lede { max-width: 44ch; color: #cdd3c8; margin-bottom: 2.75rem; }
.links { list-style: none; display: flex; flex-wrap: wrap; gap: 1.5rem; }
.links a {
  font-family: var(--mono);
  font-size: .95rem;
  text-decoration: none;
  padding-bottom: 3px;
  background-image: linear-gradient(var(--on-forest-accent), var(--on-forest-accent));
  background-size: 100% 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size .3s var(--ease);
}
.links a:hover { background-size: 0% 1px; }

/* ---------- footer ---------- */
.foot {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5rem;
  padding: 1.85rem var(--edge);
  font-family: var(--mono);
  font-size: .73rem;
  color: var(--soft);
  border-top: 1px solid var(--rule);
}

/* ============================================================
   Motion. All optional, all disabled under reduced-motion.
   ============================================================ */
@media (prefers-reduced-motion: no-preference) {

  /* orchestrated page-load for the hero */
  .hero > * { animation: rise .8s var(--ease) both; }
  .hero .kicker { animation-delay: .05s; }
  .hero h1     { animation-delay: .14s; }
  .hero .lede  { animation-delay: .26s; }
  .hero .sheet { animation-delay: .40s; }

  @supports (animation-timeline: view()) {

    /* scroll-triggered reveal for blocks below the fold */
    .profile .split .prose > *,
    .experience > .eyebrow,
    .experience .role,
    .capabilities .sheet > div,
    .credentials > .eyebrow,
    .credentials .cols > div,
    .contact .inner > :not(h2) {
      animation: rise linear both;
      animation-timeline: view();
      animation-range: entry 4% cover 14%;
    }

    /* the section headings get their own treatment: a wipe-up as they enter */
    main h2 {
      animation: heading-wipe linear both;
      animation-timeline: view();
      animation-range: entry 6% cover 16%;
    }
  }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: none; }
}

@keyframes heading-wipe {
  from { opacity: 0; clip-path: inset(0 0 100% 0); transform: translateY(12px); }
  60%  { opacity: 1; }
  to   { opacity: 1; clip-path: inset(0 0 -20% 0); transform: none; }
}

/* The header has no active-section indicator: a reliable one needs a little
   JavaScript, and this page ships none. */
