/* flxvdl.nl. Plain CSS, no build step. */

@font-face {
  font-family: "Bricolage";
  src: url("/assets/fonts/bricolage.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif";
  src: url("/assets/fonts/source-serif.woff2") format("woff2");
  font-weight: 200 900;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif";
  src: url("/assets/fonts/source-serif-italic.woff2") format("woff2");
  font-weight: 200 900;
  font-style: italic;
  font-display: swap;
}

:root {
  --plate: #eef1ef;   /* page background, the grey-green of a print bed */
  --ink: #14201c;
  --muted: #5a6964;
  --line: #cad2ce;
  --accent: #1f4fd8;  /* cobalt */
  --flag: #ffe27a;    /* marks unfinished content */

  --display: "Bricolage", system-ui, sans-serif;
  --body: "Source Serif", Georgia, serif;

  --measure: 42rem;
  --gutter: clamp(1.25rem, 5vw, 3rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --plate: #121a17;
    --ink: #e6ece9;
    --muted: #93a39d;
    --line: #2b3833;
    --accent: #8fa8ff;
    --flag: #6b5a12;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--plate);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.125rem;
  line-height: 1.65;
}

a { color: var(--accent); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3 { font-family: var(--display); line-height: 1.1; margin: 0; }
h1 { font-size: clamp(2.25rem, 6vw, 3.5rem); font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: 1.5rem; font-weight: 650; letter-spacing: -0.01em; }
h3 { font-size: 1.2rem; font-weight: 600; }
p { margin: 0 0 1em; }
ul { margin: 0 0 1em; padding-left: 1.1em; }
li { margin-bottom: 0.35em; }

.wrap { max-width: calc(var(--measure) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }

/* Header and footer */

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-top: 1.75rem;
  padding-bottom: 1.75rem;
  font-family: var(--display);
  font-size: 1rem;
}
.site-header a { color: var(--ink); text-decoration: none; }
.site-header a:hover, .site-header a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; text-decoration-color: var(--accent); }
.site-header .home { font-weight: 700; }
.site-header nav { display: flex; gap: 1.25rem; }

main { padding-top: clamp(1.5rem, 6vw, 4rem); padding-bottom: 5rem; }

.site-footer {
  border-top: 1px solid var(--line);
  padding-top: 1.5rem;
  padding-bottom: 2.5rem;
  font-family: var(--display);
  font-size: 0.9rem;
  color: var(--muted);
}

.lede { font-size: 1.3rem; line-height: 1.5; max-width: 34rem; }
.page-intro { margin: 1rem 0 3rem; color: var(--muted); max-width: 34rem; }

/* Home: the name is drawn in layer lines and builds up once, like a print. */

.layered {
  font-size: clamp(3.2rem, 15vw, 8.5rem);
  font-weight: 800;
  line-height: 0.92;
  letter-spacing: -0.045em;
  margin: 0 0 2.5rem -0.04em;
  color: var(--ink);
  background: repeating-linear-gradient(to bottom, var(--ink) 0 0.042em, transparent 0.042em 0.06em);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: print 1.6s steps(26, end) both;
}
@keyframes print {
  from { clip-path: inset(100% 0 0 0); }
  to { clip-path: inset(0 0 0 0); }
}
@media (prefers-reduced-motion: reduce) {
  .layered { animation: none; }
}

.sections { list-style: none; padding: 0; margin: 3.5rem 0 0; border-top: 1px solid var(--line); }
.sections li { margin: 0; border-bottom: 1px solid var(--line); }
.sections a {
  display: grid;
  grid-template-columns: 10.5rem 1fr;
  gap: 0.25rem 1.5rem;
  padding: 1.1rem 0;
  color: var(--ink);
  text-decoration: none;
}
.sections strong { font-family: var(--display); font-size: 1.2rem; font-weight: 650; }
.sections span { color: var(--muted); }
.sections a:hover strong { color: var(--accent); }

/* Resume */

.resume section { margin-top: 3rem; }
.resume h2 { padding-bottom: 0.6rem; border-bottom: 1px solid var(--line); margin-bottom: 1.5rem; }
.role { display: grid; grid-template-columns: 10.5rem 1fr; gap: 0.25rem 1.5rem; margin-bottom: 2rem; }
.role .when { white-space: nowrap; font-family: var(--display); font-size: 0.95rem; color: var(--muted); padding-top: 0.2rem; }
.role .org { color: var(--muted); margin-bottom: 0.6rem; }
.facts { display: grid; grid-template-columns: 10.5rem 1fr; gap: 0.6rem 1.5rem; margin: 0; }
.facts dt { font-family: var(--display); font-size: 0.95rem; color: var(--muted); padding-top: 0.2rem; }
.facts dd { margin: 0; }
.contact { font-family: var(--display); font-size: 1rem; color: var(--muted); margin-top: 0.75rem; }
.role .note { font-family: var(--display); font-size: 0.92rem; color: var(--muted); margin: 0 0 0.5rem; }
.plain { list-style: none; padding: 0; }

.deep-dive { font-family: var(--display); font-size: 0.95rem; margin: 0 0 0.9rem; }
.pills { display: flex; flex-wrap: wrap; gap: 0.5rem; font-family: var(--display); font-size: 0.95rem; margin: 0.75rem 0 0; }
.deep-dive a, .pills a { display: inline-block; padding: 0.3rem 0.8rem; border: 1px solid var(--accent); border-radius: 999px; text-decoration: none; }
.deep-dive a:hover, .pills a:hover { background: var(--accent); color: var(--plate); }

/* Long-form write-ups under /writing/ */

.article .back { font-family: var(--display); font-size: 0.95rem; margin-bottom: 2rem; }
.article .meta { font-family: var(--display); font-size: 0.95rem; color: var(--muted); margin: 1rem 0 2.5rem; }
.article h2 { margin: 2.5rem 0 0.75rem; }

/* OpenSCAD editor */

.wide { max-width: 76rem; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.editor { max-width: 76rem; margin: 0 auto; padding: clamp(1.5rem, 4vw, 3rem) var(--gutter) 5rem; }
.editor .back { font-family: var(--display); font-size: 0.95rem; margin-bottom: 1.5rem; }
.editor .page-intro { margin-bottom: 2rem; }
.editor-grid { display: grid; grid-template-columns: minmax(0, 1fr) 22rem; gap: 2.5rem; align-items: start; }
.editor-grid[hidden] { display: none; }
.stage { position: sticky; top: 1rem; }
#view { display: block; width: 100%; height: min(62vh, 36rem); background: color-mix(in srgb, var(--line) 45%, var(--plate)); border-radius: 6px; cursor: grab; touch-action: none; }
#view:active { cursor: grabbing; }
.status { font-family: var(--display); font-size: 0.92rem; color: var(--muted); margin: 0.75rem 0; min-height: 1.5em; }
.status.busy::after { content: "..."; }
.log { font-size: 0.8rem; line-height: 1.4; white-space: pre-wrap; margin: 0 0 0.75rem; padding: 0.6rem 0.8rem; border-left: 3px solid var(--accent); background: color-mix(in srgb, var(--line) 45%, var(--plate)); }
.actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.editor button { font: inherit; font-family: var(--display); font-size: 0.95rem; padding: 0.4rem 0.9rem; border: 1px solid var(--ink); border-radius: 999px; background: none; color: var(--ink); cursor: pointer; }
.editor button:hover:not(:disabled) { background: var(--ink); color: var(--plate); }
.editor button:disabled { opacity: 0.4; cursor: default; }
.controls { font-family: var(--display); font-size: 0.95rem; }
.controls fieldset { border: 0; border-top: 1px solid var(--line); margin: 0 0 1rem; padding: 0.9rem 0 0; }
.controls legend { padding: 0 0.5rem 0 0; font-weight: 650; }
.param { display: grid; grid-template-columns: 1fr 7rem; gap: 0.15rem 0.75rem; align-items: center; margin-bottom: 0.8rem; }
.param.check { grid-template-columns: 1fr auto; }
.param.wide-input { grid-template-columns: 1fr; }
.param .help { grid-column: 1 / -1; font-size: 0.82rem; line-height: 1.35; color: var(--muted); }
.param input, .param select { font: inherit; width: 100%; padding: 0.3rem 0.5rem; border: 1px solid var(--line); border-radius: 4px; background: var(--plate); color: var(--ink); }
.param input[type="checkbox"] { width: 1.1rem; height: 1.1rem; accent-color: var(--accent); }
.controls details { border-top: 1px solid var(--line); padding-top: 0.9rem; }
.controls summary { cursor: pointer; font-weight: 650; }
#code { display: block; width: 100%; height: 24rem; margin: 0.8rem 0; padding: 0.6rem; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.8rem; line-height: 1.5; tab-size: 4; white-space: pre; border: 1px solid var(--line); border-radius: 4px; background: var(--plate); color: var(--ink); resize: vertical; }
.hint { font-size: 0.82rem; color: var(--muted); margin-left: 0.5rem; }
.entry .links .primary { font-weight: 650; }

@media (max-width: 56rem) {
  .editor-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .stage { position: static; }
  #view { height: 20rem; }
}

.todo { background: var(--flag); padding: 0 0.25em; border-radius: 2px; }

/* Lists of prints and projects, rendered from /data/*.json */

.entries { border-top: 1px solid var(--line); }
.entry {
  display: grid;
  grid-template-columns: 12rem 1fr;
  gap: 1rem 1.75rem;
  padding: 2rem 0;
  border-bottom: 1px solid var(--line);
}
.entry.no-image { grid-template-columns: 1fr; }
.entry img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 4px; background: var(--line); display: block; }
.entry .year { font-family: var(--display); font-size: 0.95rem; color: var(--muted); margin-left: 0.5rem; font-weight: 400; }
.entry p { margin: 0.5rem 0 0.75rem; }
.entry .specs { font-family: var(--display); font-size: 0.92rem; color: var(--muted); margin: 0 0 0.75rem; display: flex; flex-wrap: wrap; gap: 0.2rem 1.25rem; }
.entry .specs div { display: flex; gap: 0.4em; }
.entry .specs dt::after { content: ":"; }
.entry .specs dd { margin: 0; color: var(--ink); }
.entry .links { font-family: var(--display); font-size: 0.95rem; display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; }
.notice { color: var(--muted); padding: 2rem 0; }

.sections li:last-child, .entries .entry:last-child { border-bottom: 0; }

@media (max-width: 34rem) {
  .sections a, .role, .facts, .entry { grid-template-columns: 1fr; }
  .facts dd { margin-bottom: 0.5rem; }
}

@media print {
  :root { --plate: #fff; --ink: #000; --muted: #444; --line: #bbb; --accent: #000; }
  body { font-size: 10.5pt; line-height: 1.45; }
  .site-header, .site-footer, .no-print { display: none; }
  main { padding: 0; }
  .wrap { max-width: none; padding: 0; }
  .resume section { margin-top: 1.4rem; }
  .role { break-inside: avoid; margin-bottom: 1rem; }
  a { text-decoration: none; }
  .pills a { border: 0; padding: 0; margin-right: 1rem; }
  .pills a[href*="linkedin"]::after { content: ": linkedin.com/in/felixvdloo"; }
}
