/* Planet Clojure: brutalist, built for reading, light and dark. No JS.
 *
 * Published as style.<hash>.css together with the generated syntax
 * highlighting rules (planet.highlight), so edits reach visitors at once.
 */

@font-face {
  font-family: "Plex Sans";
  src: url("../fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Plex Sans";
  src: url("../fonts/ibm-plex-sans-latin-400-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Plex Sans";
  src: url("../fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2");
  font-weight: 600 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Plex Sans";
  src: url("../fonts/ibm-plex-sans-latin-600-italic.woff2") format("woff2");
  font-weight: 600 700;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Plex Mono";
  src: url("../fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Plex Mono";
  src: url("../fonts/ibm-plex-mono-latin-400-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Plex Mono";
  src: url("../fonts/ibm-plex-mono-latin-700-normal.woff2") format("woff2");
  font-weight: 600 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  /* Tailwind v4 colours (planet.tailwind); each names its Tailwind colour. */
  --bg: oklch(98.5% 0.001 106.423); /* stone-50 */
  --fg: oklch(14.7% 0.004 49.25); /* stone-950 */
  --muted: oklch(44.4% 0.011 73.639); /* stone-600 */
  --rule: oklch(14.7% 0.004 49.25); /* stone-950 */
  --accent: oklch(87.9% 0.169 91.605); /* amber-300 */
  --accent-fg: oklch(14.7% 0.004 49.25); /* stone-950 */
  --code-bg: oklch(97% 0.001 106.424); /* stone-100, as planet.highlight.CODE_BACKGROUND */
  --sans: "Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --gutter: clamp(1rem, 4vw, 3rem);
  --thick: 6px;
  --thin: 3px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: oklch(14.7% 0.004 49.25); /* stone-950 */
    --fg: oklch(92.3% 0.003 48.717); /* stone-200 */
    --muted: oklch(70.9% 0.01 56.259); /* stone-400 */
    --rule: oklch(92.3% 0.003 48.717); /* stone-200 */
    --accent-fg: oklch(14.7% 0.004 49.25); /* stone-950 */
    --code-bg: oklch(21.6% 0.006 56.043); /* stone-900 */
  }
}

/* Base */

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

html {
  font-size: 112.5%; /* 18px */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 1rem/1.6 var(--sans);
}

a {
  color: inherit;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
}

a:hover {
  background: var(--accent);
  color: var(--accent-fg);
}

:focus-visible {
  outline: var(--thin) solid var(--fg);
  outline-offset: 2px;
}

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

.skip {
  position: absolute;
  left: -100vw;
}

.skip:focus {
  left: 1rem;
  top: 1rem;
  z-index: 1;
  padding: 0.5rem 1rem;
  border: var(--thin) solid var(--fg);
  background: var(--accent);
  color: var(--accent-fg);
  font: 700 0.9rem var(--mono);
}

/* Header */

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem 2rem;
  padding: 2rem var(--gutter) 1.5rem;
  border-bottom: var(--thick) solid var(--rule);
}

.site-title {
  margin: 0 0 0 -0.075em; /* the font's left side bearing: ink starts at the edge */
  font: 700 var(--title-size) / var(--title-leading) var(--mono);
  letter-spacing: -0.04em;
  text-transform: uppercase;
}

/* Logo beside the title and tagline, as tall as both together. */
/* The logo is as tall as one line of title plus one line of tagline,
   computed from the same values that set those lines. */
.brand {
  --title-size: clamp(2.2rem, 7vw, 4.5rem);
  --title-leading: 0.95;
  --tagline-size: 0.9rem;
  --tagline-leading: 1.4;
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 1rem;
  align-items: start;
}

.brand .logo {
  grid-row: 1 / span 2;
  height: calc(
    var(--title-size) * var(--title-leading) + var(--tagline-size) * var(--tagline-leading)
  );
  width: auto;
}

.site-title a {
  text-decoration: none;
}

.tagline {
  margin: 0;
  font: 400 var(--tagline-size) / var(--tagline-leading) var(--mono);
  color: var(--muted);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Phones: the feed stays linked from the sidebar. */
@media (width < 40rem) {
  .site-nav {
    display: none;
  }
}

.site-nav a,
.button {
  display: inline-block;
  padding: 0.35rem 0.8rem;
  border: var(--thin) solid var(--rule);
  font: 700 0.8rem/1.4 var(--mono);
  letter-spacing: 0.04em;
  text-decoration: none;
  text-transform: uppercase;
}

/* Layout: posts, then the sidebar beside them on wide screens */

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 72rem) {
  .layout {
    grid-template-columns: minmax(0, 1fr) 21rem;
  }
  .sidebar {
    border-left: var(--thick) solid var(--rule);
  }
}

main {
  padding: 0 var(--gutter);
}

/* Entries */

.entry {
  max-width: 115ch;
  padding: 2.5rem 0;
  border-bottom: var(--thin) solid var(--rule);
}

.entry:last-child {
  border-bottom: 0;
}

.entry-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  margin: 0 0 0.6rem;
  font: 400 0.75rem/1.5 var(--mono);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.entry-meta .blog {
  font-weight: 700;
}

.entry-meta time {
  color: var(--muted);
}

.entry-title {
  margin: 0 0 1.25rem;
  font: 700 1.55rem/1.2 var(--mono);
  letter-spacing: -0.02em;
}

.entry-title a {
  text-decoration: none;
}

/* Post content (third-party HTML, sanitized) */

.content {
  overflow-wrap: break-word;
}

.content > :first-child {
  margin-top: 0;
}

.content img,
.content video {
  max-width: 100%;
  height: auto;
}

.content h1,
.content h2,
.content h3,
.content h4,
.content h5,
.content h6 {
  margin: 2rem 0 0.75rem;
  font-family: var(--mono);
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.content h1,
.content h2 {
  font-size: 1.25rem;
}

.content h3 {
  font-size: 1.1rem;
}

.content h4,
.content h5,
.content h6 {
  font-size: 1rem;
}

.content blockquote {
  margin: 1.5rem 0;
  padding: 0 0 0 1.25rem;
  border-left: var(--thick) solid var(--rule);
}

.content hr {
  margin: 2rem 0;
  border: 0;
  border-top: var(--thin) solid var(--rule);
}

.content code {
  padding: 0.05em 0.25em;
  background: var(--code-bg);
  font-family: var(--mono);
  font-size: 0.88em;
}

.content pre {
  margin: 1.5rem 0;
  padding: 1rem 1.1rem;
  overflow-x: auto;
  border: var(--thin) solid var(--rule);
  background: var(--code-bg);
  font: 400 0.8rem/1.55 var(--mono);
  tab-size: 2;
}

.content pre code {
  padding: 0;
  background: none;
  font-size: inherit;
}

.content table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.content th,
.content td {
  padding: 0.3rem 0.6rem;
  border: 2px solid var(--rule);
  text-align: left;
  vertical-align: top;
}

/* "Read more": native <details>, no JS */

.more > summary {
  display: inline-block;
  margin: 0.5rem 0 0;
  cursor: pointer;
  list-style: none;
}

.more > summary::-webkit-details-marker {
  display: none;
}

.more > summary .when-open,
.more[open] > summary .when-closed {
  display: none;
}

.more[open] > summary .when-open {
  display: inline;
}

.more[open] > summary {
  margin-bottom: 1.5rem;
}

/* Sidebar */

.sidebar {
  padding: 2rem var(--gutter);
  border-top: var(--thick) solid var(--rule);
}

@media (min-width: 72rem) {
  .sidebar {
    padding: 2rem 1.5rem;
    border-top: 0;
  }
}

.sidebar section + section {
  margin-top: 2.5rem;
}

.sidebar h2 {
  margin: 0 0 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: var(--thin) solid var(--rule);
  font: 700 0.85rem var(--mono);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.sidebar p {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
}

.sidebar ul {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.85rem;
  line-height: 1.5;
}

.sidebar li {
  padding: 0.1rem 0;
}

.subscriptions {
  columns: 15rem;
  column-gap: 2rem;
}

@media (min-width: 72rem) {
  .subscriptions {
    columns: auto;
  }
}

.subscriptions li {
  break-inside: avoid;
}

.subscriptions a {
  text-decoration: none;
}

.subscriptions a:hover {
  text-decoration: underline;
}

/* The last fetch of this feed failed. */
.subscriptions a.unavailable,
.subscriptions a.unavailable:hover {
  text-decoration: line-through;
}

/* Footer */

.site-footer {
  padding: 1.5rem var(--gutter) 2.5rem;
  border-top: var(--thick) solid var(--rule);
  font: 400 0.75rem/1.7 var(--mono);
}

.site-footer p {
  margin: 0;
}

/* Print: just the posts */

@media print {
  .site-nav,
  .sidebar {
    display: none;
  }
  a {
    text-decoration: none;
  }
}

/* Syntax highlighting (generated by planet.highlight) */
pre.code .err { color: oklch(50.5% 0.213 27.518) } /* Error, red-700 */
pre.code .k { color: oklch(45.9% 0.187 3.815); font-weight: bold } /* Keyword, pink-800 */
pre.code .kc { color: oklch(47% 0.157 37.304); font-weight: bold } /* Keyword.Constant, orange-800 */
pre.code .kd { color: oklch(45.9% 0.187 3.815); font-weight: bold } /* Keyword.Declaration, pink-800 */
pre.code .kn { color: oklch(45.9% 0.187 3.815); font-weight: bold } /* Keyword.Namespace, pink-800 */
pre.code .kp { color: oklch(45.9% 0.187 3.815); font-weight: bold } /* Keyword.Pseudo, pink-800 */
pre.code .kr { color: oklch(45.9% 0.187 3.815); font-weight: bold } /* Keyword.Reserved, pink-800 */
pre.code .kt { color: oklch(45.9% 0.187 3.815); font-weight: bold } /* Keyword.Type, pink-800 */
pre.code .nb { color: oklch(43.2% 0.232 292.759) } /* Name.Builtin, violet-800 */
pre.code .bp { color: oklch(43.2% 0.232 292.759) } /* Name.Builtin.Pseudo, violet-800 */
pre.code .nf { font-weight: bold } /* Name.Function */
pre.code .fm { font-weight: bold } /* Name.Function.Magic */
pre.code .l { color: oklch(47% 0.157 37.304) } /* Literal, orange-800 */
pre.code .ld { color: oklch(47% 0.157 37.304) } /* Literal.Date, orange-800 */
pre.code .s { color: oklch(44.8% 0.119 151.328) } /* Literal.String, green-800 */
pre.code .sa { color: oklch(44.8% 0.119 151.328) } /* Literal.String.Affix, green-800 */
pre.code .sb { color: oklch(44.8% 0.119 151.328) } /* Literal.String.Backtick, green-800 */
pre.code .sc { color: oklch(44.8% 0.119 151.328) } /* Literal.String.Char, green-800 */
pre.code .dl { color: oklch(44.8% 0.119 151.328) } /* Literal.String.Delimiter, green-800 */
pre.code .sd { color: oklch(44.8% 0.119 151.328) } /* Literal.String.Doc, green-800 */
pre.code .s2 { color: oklch(44.8% 0.119 151.328) } /* Literal.String.Double, green-800 */
pre.code .se { color: oklch(44.8% 0.119 151.328) } /* Literal.String.Escape, green-800 */
pre.code .sh { color: oklch(44.8% 0.119 151.328) } /* Literal.String.Heredoc, green-800 */
pre.code .si { color: oklch(44.8% 0.119 151.328) } /* Literal.String.Interpol, green-800 */
pre.code .sx { color: oklch(44.8% 0.119 151.328) } /* Literal.String.Other, green-800 */
pre.code .sr { color: oklch(44.8% 0.119 151.328) } /* Literal.String.Regex, green-800 */
pre.code .s1 { color: oklch(44.8% 0.119 151.328) } /* Literal.String.Single, green-800 */
pre.code .ss { color: oklch(42.4% 0.199 265.638) } /* Literal.String.Symbol, blue-800 */
pre.code .m { color: oklch(47% 0.157 37.304) } /* Literal.Number, orange-800 */
pre.code .mb { color: oklch(47% 0.157 37.304) } /* Literal.Number.Bin, orange-800 */
pre.code .mf { color: oklch(47% 0.157 37.304) } /* Literal.Number.Float, orange-800 */
pre.code .mh { color: oklch(47% 0.157 37.304) } /* Literal.Number.Hex, orange-800 */
pre.code .mi { color: oklch(47% 0.157 37.304) } /* Literal.Number.Integer, orange-800 */
pre.code .il { color: oklch(47% 0.157 37.304) } /* Literal.Number.Integer.Long, orange-800 */
pre.code .mo { color: oklch(47% 0.157 37.304) } /* Literal.Number.Oct, orange-800 */
pre.code .ow { color: oklch(45.9% 0.187 3.815); font-weight: bold } /* Operator.Word, pink-800 */
pre.code .c { color: oklch(44.4% 0.011 73.639); font-style: italic } /* Comment, stone-600 */
pre.code .ch { color: oklch(44.4% 0.011 73.639); font-style: italic } /* Comment.Hashbang, stone-600 */
pre.code .cm { color: oklch(44.4% 0.011 73.639); font-style: italic } /* Comment.Multiline, stone-600 */
pre.code .cp { color: oklch(44.4% 0.011 73.639); font-style: italic } /* Comment.Preproc, stone-600 */
pre.code .cpf { color: oklch(44.4% 0.011 73.639); font-style: italic } /* Comment.PreprocFile, stone-600 */
pre.code .c1 { color: oklch(44.4% 0.011 73.639); font-style: italic } /* Comment.Single, stone-600 */
pre.code .cs { color: oklch(44.4% 0.011 73.639); font-style: italic } /* Comment.Special, stone-600 */
pre.code .go { color: oklch(44.4% 0.011 73.639) } /* Generic.Output, stone-600 */
pre.code .gp { color: oklch(44.4% 0.011 73.639); font-weight: bold } /* Generic.Prompt, stone-600 */
@media (prefers-color-scheme: dark) {
  pre.code .err { color: oklch(80.8% 0.114 19.571) } /* Error, red-300 */
  pre.code .k { color: oklch(82.3% 0.12 346.018); font-weight: bold } /* Keyword, pink-300 */
  pre.code .kc { color: oklch(83.7% 0.128 66.29); font-weight: bold } /* Keyword.Constant, orange-300 */
  pre.code .kd { color: oklch(82.3% 0.12 346.018); font-weight: bold } /* Keyword.Declaration, pink-300 */
  pre.code .kn { color: oklch(82.3% 0.12 346.018); font-weight: bold } /* Keyword.Namespace, pink-300 */
  pre.code .kp { color: oklch(82.3% 0.12 346.018); font-weight: bold } /* Keyword.Pseudo, pink-300 */
  pre.code .kr { color: oklch(82.3% 0.12 346.018); font-weight: bold } /* Keyword.Reserved, pink-300 */
  pre.code .kt { color: oklch(82.3% 0.12 346.018); font-weight: bold } /* Keyword.Type, pink-300 */
  pre.code .nb { color: oklch(81.1% 0.111 293.571) } /* Name.Builtin, violet-300 */
  pre.code .bp { color: oklch(81.1% 0.111 293.571) } /* Name.Builtin.Pseudo, violet-300 */
  pre.code .nf { font-weight: bold } /* Name.Function */
  pre.code .fm { font-weight: bold } /* Name.Function.Magic */
  pre.code .l { color: oklch(83.7% 0.128 66.29) } /* Literal, orange-300 */
  pre.code .ld { color: oklch(83.7% 0.128 66.29) } /* Literal.Date, orange-300 */
  pre.code .s { color: oklch(87.1% 0.15 154.449) } /* Literal.String, green-300 */
  pre.code .sa { color: oklch(87.1% 0.15 154.449) } /* Literal.String.Affix, green-300 */
  pre.code .sb { color: oklch(87.1% 0.15 154.449) } /* Literal.String.Backtick, green-300 */
  pre.code .sc { color: oklch(87.1% 0.15 154.449) } /* Literal.String.Char, green-300 */
  pre.code .dl { color: oklch(87.1% 0.15 154.449) } /* Literal.String.Delimiter, green-300 */
  pre.code .sd { color: oklch(87.1% 0.15 154.449) } /* Literal.String.Doc, green-300 */
  pre.code .s2 { color: oklch(87.1% 0.15 154.449) } /* Literal.String.Double, green-300 */
  pre.code .se { color: oklch(87.1% 0.15 154.449) } /* Literal.String.Escape, green-300 */
  pre.code .sh { color: oklch(87.1% 0.15 154.449) } /* Literal.String.Heredoc, green-300 */
  pre.code .si { color: oklch(87.1% 0.15 154.449) } /* Literal.String.Interpol, green-300 */
  pre.code .sx { color: oklch(87.1% 0.15 154.449) } /* Literal.String.Other, green-300 */
  pre.code .sr { color: oklch(87.1% 0.15 154.449) } /* Literal.String.Regex, green-300 */
  pre.code .s1 { color: oklch(87.1% 0.15 154.449) } /* Literal.String.Single, green-300 */
  pre.code .ss { color: oklch(80.9% 0.105 251.813) } /* Literal.String.Symbol, blue-300 */
  pre.code .m { color: oklch(83.7% 0.128 66.29) } /* Literal.Number, orange-300 */
  pre.code .mb { color: oklch(83.7% 0.128 66.29) } /* Literal.Number.Bin, orange-300 */
  pre.code .mf { color: oklch(83.7% 0.128 66.29) } /* Literal.Number.Float, orange-300 */
  pre.code .mh { color: oklch(83.7% 0.128 66.29) } /* Literal.Number.Hex, orange-300 */
  pre.code .mi { color: oklch(83.7% 0.128 66.29) } /* Literal.Number.Integer, orange-300 */
  pre.code .il { color: oklch(83.7% 0.128 66.29) } /* Literal.Number.Integer.Long, orange-300 */
  pre.code .mo { color: oklch(83.7% 0.128 66.29) } /* Literal.Number.Oct, orange-300 */
  pre.code .ow { color: oklch(82.3% 0.12 346.018); font-weight: bold } /* Operator.Word, pink-300 */
  pre.code .c { color: oklch(70.9% 0.01 56.259); font-style: italic } /* Comment, stone-400 */
  pre.code .ch { color: oklch(70.9% 0.01 56.259); font-style: italic } /* Comment.Hashbang, stone-400 */
  pre.code .cm { color: oklch(70.9% 0.01 56.259); font-style: italic } /* Comment.Multiline, stone-400 */
  pre.code .cp { color: oklch(70.9% 0.01 56.259); font-style: italic } /* Comment.Preproc, stone-400 */
  pre.code .cpf { color: oklch(70.9% 0.01 56.259); font-style: italic } /* Comment.PreprocFile, stone-400 */
  pre.code .c1 { color: oklch(70.9% 0.01 56.259); font-style: italic } /* Comment.Single, stone-400 */
  pre.code .cs { color: oklch(70.9% 0.01 56.259); font-style: italic } /* Comment.Special, stone-400 */
  pre.code .go { color: oklch(70.9% 0.01 56.259) } /* Generic.Output, stone-400 */
  pre.code .gp { color: oklch(70.9% 0.01 56.259); font-weight: bold } /* Generic.Prompt, stone-400 */
}
