/* ==========================================================================
   THEME — the single place for site-wide styling.
   Change tokens in :root and everything follows.
   ========================================================================== */

/* IBM Plex Mono (self-hosted, latin + latin-ext; SIL OFL) */
@font-face {
  font-family: "IBM Plex Mono";
  font-weight: 400;
  src: url("/static/fonts/IBMPlexMono-400-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  font-weight: 400;
  src: url("/static/fonts/IBMPlexMono-400-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  font-weight: 500;
  src: url("/static/fonts/IBMPlexMono-500-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  font-weight: 500;
  src: url("/static/fonts/IBMPlexMono-500-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  font-weight: 700;
  src: url("/static/fonts/IBMPlexMono-700-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  font-weight: 700;
  src: url("/static/fonts/IBMPlexMono-700-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
  font-display: swap;
}

@font-face {
  font-family: "Departure Mono";
  src: url("/static/fonts/DepartureMono-Regular.woff2") format("woff2");
  font-display: swap;
}

:root {
  /* --- color (monochrome + one accent) --- */
  --bg:        #0d0d0d;
  --bg-raised: #151515;
  --fg:        #e6e6e6;
  --fg-dim:    #8a8a8a;
  --border:    #3a3a3a;
  --accent:    #ff6a3d;   /* <- the one accent; change this */
  --on-accent: #0d0d0d;

  /* --- type --- */
  --font-body:    "IBM Plex Mono", ui-monospace, monospace;
  --font-heading: "Departure Mono", var(--font-body);

  /* --- spacing scale --- */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 1rem;
  --space-4: 1.5rem;
  --space-5: 2.5rem;
  --space-6: 4rem;

  /* --- shape (no radius, ever) --- */
  --radius: 0;
  --border-w: 2px;
  --shadow-offset: 6px;
  --shadow: var(--shadow-offset) var(--shadow-offset) 0 var(--accent);
  --shadow-dim: var(--shadow-offset) var(--shadow-offset) 0 var(--border);

  --content-width: 1120px;
  --dot-gap: 24px;
  --dot-color: #2a2a2a;
}

/* --- reset --- */
*, *::before, *::after { box-sizing: border-box; border-radius: var(--radius); }
body, h1, h2, h3, h4, p, ul, ol, figure, pre { margin: 0; }

/* --- base --- */
html { font-size: 16px; -webkit-font-smoothing: none; }

body {
  min-height: 100vh;
  font-family: var(--font-body);
  line-height: 1.6;
  color: var(--fg);
  background-color: var(--bg);
  /* dotted grid background */
  background-image: radial-gradient(var(--dot-color) 1.5px, transparent 1.5px);
  background-size: var(--dot-gap) var(--dot-gap);
}

::selection { background: var(--accent); color: var(--on-accent); }

/* --- typography --- */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 400;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
h1 { font-size: 2.5rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1rem; }
h1, h2, h3, h4, p, ul, ol, pre { margin-bottom: var(--space-3); }

h1::before, h2::before { content: "> "; color: var(--accent); }

a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 2px;
}
a:hover, a:focus-visible { background: var(--accent); color: var(--on-accent); outline: none; }

small, .dim { color: var(--fg-dim); }

code, pre, kbd {
  font-family: var(--font-body);
  background: var(--bg-raised);
  border: 1px solid var(--border);
  padding: 0 var(--space-1);
}
pre { padding: var(--space-3); overflow-x: auto; }
pre code { border: 0; padding: 0; background: none; }

hr { border: 0; border-top: var(--border-w) dashed var(--border); margin: var(--space-5) 0; }

/* keep prose lines readable even though the page is wide */
p, li { max-width: 75ch; }

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

/* --- layout --- */
.container {
  width: min(100% - 2 * var(--space-4), var(--content-width));
  margin-inline: auto;
  padding-block: var(--space-5);
}
.stack > * + * { margin-top: var(--space-4); }
/* inline links ignore vertical margins; make them blocks so spacing (and shadow clearance) applies */
.stack > a:not(.btn) { display: inline-block; }
.stack > .grid + a { margin-top: calc(var(--space-4) + var(--shadow-offset)); }
.row { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }
.grid {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
}

/* --- components --- */
.card {
  background: var(--bg-raised);
  border: var(--border-w) solid var(--border);
  padding: var(--space-4);
  box-shadow: var(--shadow-dim);
}
a.card, .card.interactive { display: block; color: inherit; text-decoration: none; }
a.card:hover, .card.interactive:hover {
  background: var(--bg-raised);
  color: inherit;
  border-color: var(--accent);
  box-shadow: var(--shadow);
  transform: translate(-2px, -2px);
}
.card > :last-child { margin-bottom: 0; }

.btn {
  display: inline-block;
  font: inherit;
  font-family: var(--font-heading);
  text-transform: uppercase;
  color: var(--on-accent);
  background: var(--accent);
  border: var(--border-w) solid var(--accent);
  padding: var(--space-2) var(--space-3);
  text-decoration: none;
  cursor: pointer;
  box-shadow: var(--shadow-offset) var(--shadow-offset) 0 var(--fg);
}
.btn:hover, .btn:focus-visible {
  color: var(--on-accent);
  background: var(--accent);
  transform: translate(-2px, -2px);
  box-shadow: calc(var(--shadow-offset) + 2px) calc(var(--shadow-offset) + 2px) 0 var(--fg);
  outline: none;
}
.btn:active { transform: translate(var(--shadow-offset), var(--shadow-offset)); box-shadow: none; }
.btn.ghost { background: transparent; color: var(--fg); border-color: var(--fg); box-shadow: var(--shadow-dim); }

.tag {
  display: inline-block;
  font-size: 0.8rem;
  padding: 0 var(--space-2);
  border: 1px solid var(--border);
  color: var(--fg-dim);
}

nav.nav { border-bottom: var(--border-w) solid var(--border); background: var(--bg); }
nav.nav .container { padding-block: var(--space-3); }
nav.nav a { text-decoration: none; font-family: var(--font-heading); text-transform: uppercase; }
/* Language switcher: the active language is highlighted, the other one is muted. */
nav.nav .lang-current { color: var(--accent); font-family: var(--font-heading); }
nav.nav a.lang-other { color: var(--fg-dim); }
nav.nav a.lang-other:hover, nav.nav a.lang-other:focus-visible { color: var(--on-accent); }

footer.footer { border-top: var(--border-w) dashed var(--border); color: var(--fg-dim); }

/* --- page-specific --- */
nav.nav .container.row { gap: var(--space-4); }
.push-right { margin-left: auto; }

.hero { padding-block: var(--space-5); }
.hero h1 { font-size: clamp(2.25rem, 8vw, 4rem); margin-bottom: var(--space-2); }
.hero h1::before { content: none; }
.hero .role { font-family: var(--font-heading); color: var(--accent); font-size: 1.25rem; }
.hero p { max-width: 56ch; }

ul.links { list-style: none; padding: 0; }
ul.skills { list-style: none; padding: 0; margin: 0; }
.grid-skills { grid-template-columns: repeat(auto-fill, minmax(22rem, 1fr)); }
ul.skills li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  max-width: none;
  padding: var(--space-2) 0;
  border-bottom: 1px dashed var(--border);
}
/* always one line: long names are truncated (full name in the title tooltip) */
.skill-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.skill-level { flex: 0 0 auto; display: flex; align-items: center; gap: var(--space-2); white-space: nowrap; }
/* fixed-width label column so meters line up across rows (fits the longest label in en + nl) */
.skill-level .dim { display: inline-block; min-width: 14ch; }

/* meter: three equal squares; filled = accent, empty = outline of identical size */
.meter { display: inline-flex; gap: 3px; }
.meter .block { width: 0.75rem; height: 0.75rem; border: 2px solid var(--border); background: transparent; }
.meter .block.on { border-color: var(--accent); background: var(--accent); }
.tags { gap: var(--space-2); margin-top: var(--space-3); }
