/* assets/css/syntax-highlighting.css
 *
 * Styles for the Prism.js token classes that
 * @11ty/eleventy-plugin-syntaxhighlight adds to fenced code blocks at
 * build time (see eleventy.config.js). No client-side highlighting
 * library ships to the browser, just these CSS rules. A plain,
 * low-saturation theme. Swap the hex values below for any Prism theme
 * you like (https://github.com/PrismJS/prism-themes has dozens,
 * including Nord and Dracula variants).
 */

pre[class*='language-'],
code[class*='language-'] {
  color: var(--font-color);
  background: none;
  font-family:
    ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, 'DejaVu Sans Mono', monospace;
  text-align: left;
  white-space: pre;
  word-spacing: normal;
  word-break: normal;
  word-wrap: normal;
  line-height: 1.6;
  tab-size: 2;
  hyphens: none;
}

pre[class*='language-'] {
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  overflow: auto;
  background: var(--bg-secondary-color);
  border: 1px solid var(--color-lightGrey);
  border-radius: 6px;
  font-size: 0.9rem;
}

:not(pre) > code {
  background: var(--bg-secondary-color);
  border: 1px solid var(--color-lightGrey);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  font-family:
    ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, 'DejaVu Sans Mono', monospace;
  font-size: 0.9em;
}

.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
  color: var(--color-darkGrey);
  font-style: italic;
}

.token.punctuation {
  color: var(--font-color);
  opacity: 0.75;
}

.token.property,
.token.tag,
.token.constant,
.token.symbol,
.token.deleted {
  color: #b3556f;
}

.token.boolean,
.token.number {
  color: #a56526;
}

.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin,
.token.inserted {
  color: #4f8a3d;
}

.token.operator,
.token.entity,
.token.url,
.language-css .token.string,
.style .token.string,
.token.variable {
  color: #3b7c99;
}

.token.atrule,
.token.attr-value,
.token.function,
.token.class-name {
  color: #a2632e;
}

.token.keyword {
  color: var(--color-primary);
  font-weight: 600;
}

.token.regex,
.token.important {
  color: #a2632e;
}

.token.important,
.token.bold {
  font-weight: 600;
}

.token.italic {
  font-style: italic;
}

/* Dark mode: lighter token colors for better contrast */
@media (prefers-color-scheme: dark) {
  .token.comment,
  .token.prolog,
  .token.doctype,
  .token.cdata {
    color: #a1a1aa;
  }

  .token.punctuation {
    color: var(--font-color);
    opacity: 0.85;
  }

  .token.property,
  .token.tag,
  .token.constant,
  .token.symbol,
  .token.deleted {
    color: #f4758a;
  }

  .token.boolean,
  .token.number {
    color: #e8a855;
  }

  .token.selector,
  .token.attr-name,
  .token.string,
  .token.char,
  .token.builtin,
  .token.inserted {
    color: #7bc96f;
  }

  .token.operator,
  .token.entity,
  .token.url,
  .language-css .token.string,
  .style .token.string,
  .token.variable {
    color: #7dd3fc;
  }

  .token.atrule,
  .token.attr-value,
  .token.function,
  .token.class-name {
    color: #fbbf24;
  }

  .token.regex,
  .token.important {
    color: #fbbf24;
  }
}
