:root {
  --accent: #b0b0b0;
}

:root[data-theme="light"] {
  --background: #f5f2ea;
  --foreground: #1a170f;
  --accent: #555555;
}

.theme-toggle {
  background: none;
  border: none;
  color: var(--foreground);
  font-family: inherit;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  padding: 5px 10px;
  margin-left: 10px;
  white-space: nowrap;
}

.theme-toggle:hover {
  color: var(--accent);
}

.theme-toggle .active {
  color: var(--accent);
  font-weight: bold;
}

.terminal-path {
  margin-top: 2.5rem;
  margin-bottom: 2rem;
  padding: 0.5rem 0.75rem;
  border-left: 2px solid var(--accent);
  font-family: monospace;
  font-size: 0.95rem;
  color: color-mix(in srgb, var(--foreground) 75%, transparent);
  background: color-mix(in srgb, var(--foreground) 4%, transparent);
}

.terminal-path__user {
  color: var(--accent);
  font-weight: bold;
}

.terminal-path__sep {
  opacity: 0.6;
}

.terminal-path__cwd {
  color: var(--foreground);
}

.terminal-path__prompt {
  margin-left: 0.4em;
  color: var(--accent);
  font-weight: bold;
}

.terminal-path__cursor {
  display: inline-block;
  margin-left: 0.2em;
  animation: terminal-blink 1s steps(2, start) infinite;
}

@keyframes terminal-blink {
  to {
    visibility: hidden;
  }
}

:root {
  --hl-keyword: #ff79c6;
  --hl-name: #f8f8f2;
  --hl-function: #50fa7b;
  --hl-type: #8be9fd;
  --hl-string: #f1fa8c;
  --hl-number: #bd93f9;
  --hl-comment: #6272a4;
  --hl-operator: #ff79c6;
  --hl-builtin: #8be9fd;
}

:root[data-theme="light"] {
  --hl-keyword: #af00db;
  --hl-name: #1a170f;
  --hl-function: #2c7a2c;
  --hl-type: #0066b8;
  --hl-string: #a3661a;
  --hl-number: #6f42c1;
  --hl-comment: #6a737d;
  --hl-operator: #af00db;
  --hl-builtin: #0066b8;
}

.chroma .k,
.chroma .kc,
.chroma .kd,
.chroma .kn,
.chroma .kp,
.chroma .kr { color: var(--hl-keyword); }
.chroma .kt { color: var(--hl-type); }

.chroma .n,
.chroma .nx,
.chroma .nv,
.chroma .vi,
.chroma .vg,
.chroma .vc,
.chroma .vm { color: var(--hl-name); }

.chroma .nf,
.chroma .fm { color: var(--hl-function); }

.chroma .nb,
.chroma .bp,
.chroma .nd,
.chroma .nc,
.chroma .nn,
.chroma .nt { color: var(--hl-builtin); }

.chroma .s,
.chroma .sa,
.chroma .sb,
.chroma .sc,
.chroma .dl,
.chroma .sd,
.chroma .s1,
.chroma .s2,
.chroma .se,
.chroma .sh,
.chroma .si,
.chroma .sx,
.chroma .sr,
.chroma .ss { color: var(--hl-string); }

.chroma .m,
.chroma .mb,
.chroma .mf,
.chroma .mh,
.chroma .mi,
.chroma .il,
.chroma .mo { color: var(--hl-number); }

.chroma .c,
.chroma .ch,
.chroma .cm,
.chroma .c1,
.chroma .cs,
.chroma .cp,
.chroma .cpf { color: var(--hl-comment); font-style: italic; }

.chroma .o,
.chroma .ow { color: var(--hl-operator); }

.chroma .p { color: var(--hl-name); }

.post-year-separator {
  margin: 2.5rem 0 1rem;
  font-family: monospace;
  font-size: 0.85rem;
  color: color-mix(in srgb, var(--foreground) 45%, transparent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

code:not(.chroma code) {
  background: color-mix(in srgb, var(--foreground) 8%, transparent);
  padding: 0.1em 0.35em;
  border-radius: 3px;
  font-size: 0.92em;
}
