:root {
  /* Light Mode Syntax Tokens (GitHub Light inspired) */
  --hl-fg: #24292f;
  --hl-keyword: #cf222e;      /* Red */
  --hl-variable: #953800;     /* Orange */
  --hl-comment: #6e7781;      /* Gray */
  --hl-operator: #24292f;     /* Dark Gray */
  --hl-string: #0a3069;       /* Dark Blue */
  --hl-number: #0550ae;       /* Blue */
  --hl-function: #8250df;     /* Purple */
  --hl-bracket: #24292f;
  --hl-constant: #0550ae;
}

@media (prefers-color-scheme: dark) {
  :root {
    /* Dark Mode Syntax Tokens (GitHub Dark inspired) */
    --hl-fg: #c9d1d9;
    --hl-keyword: #ff7b72;      /* Coral */
    --hl-variable: #ffa657;     /* Orange */
    --hl-comment: #8b949e;      /* Gray */
    --hl-operator: #c9d1d9;     /* Light Gray */
    --hl-string: #a5d6ff;       /* Light Blue */
    --hl-number: #79c0ff;       /* Blue */
    --hl-function: #d2a8ff;     /* Purple */
    --hl-bracket: #c9d1d9;
    --hl-constant: #79c0ff;
  }
}

code {
  color: var(--hl-fg);
}

/* General Syntax Highlighting */
.keyword, .keyword_modifier, .type_builtin, .keyword_type, .keyword_return, .keyword_conditional, .keyword_repeat, .keyword_operator, .keyword_exception, .type, .storage, .tag {
  color: var(--hl-keyword);
}

.variable, .function_builtin, .attr-name {
  color: var(--hl-variable);
}

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

.operator, .punctuation, .punctuation_delimiter {
  color: var(--hl-operator);
}

.string, .character, .attr-value {
  color: var(--hl-string);
}

.number, .constant_builtin, .constant, .boolean {
  color: var(--hl-number);
}

.function, .keyword_function, .method {
  color: var(--hl-function);
}

.punctuation_bracket, .bracket {
  color: var(--hl-bracket);
}

/* Language Specific Overrides if needed */
code.diff .addition { color: #1a7f37; } /* Green */
code.diff .deletion { color: #cf222e; } /* Red */

@media (prefers-color-scheme: dark) {
  code.diff .addition { color: #3fb950; }
  code.diff .deletion { color: #ff7b72; }
}

/* Bash specific adjustments */
code.bash .constant { color: var(--hl-variable); }
