/* GitHub Dark re-skin for panr/hugo-theme-terminal
   Derived from your existing terminal.css and GitHub_Dark.icls token colors.
   Drop-in replacement/override. */
@import url('https://cdn.staticdelivr.com/gfonts/css2?family=Fira+Code:wght@300..700&display=swap');

:root {
  --background: #0d1117;
  --background-subtle: #161b22;
  --foreground: #c9d1d9;
  --foreground-bright: #f0f6fc;
  --muted: #8b949e;
  --accent: #ff7b72;
  --focus: #f85149;
  --border: #30363d;
  --radius: 6px;
  --font-size: 1rem;
  --line-height: 1.6;
  --shadow: 0 0 0 1px var(--border) inset;
  --code-inline-bg: var(--background-subtle);
  --code-block-bg: var(--background-subtle);
}

html {
  box-sizing: border-box;
}

*, *::before, *::after {
  box-sizing: inherit;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Fira Code","JetBrains Mono",Monaco,Consolas,"Ubuntu Mono",monospace;
  font-size: var(--font-size);
  line-height: var(--line-height);
  background-color: var(--background);
  color: var(--foreground);
  text-rendering: optimizeLegibility;
  font-variant-ligatures: contextual;
  -webkit-overflow-scrolling: touch;
  -webkit-text-size-adjust: 100%;
}

::selection {
  background: rgba(31, 111, 235, 0.35);
}

h1,h2,h3,h4,h5,h6 {
  color: var(--accent);
  margin: 24px 0 16px;
  font-weight: 600;
}

h1 { font-size: calc(var(--font-size) * 1.8); }
h2 { font-size: calc(var(--font-size) * 1.5); }
h3 { font-size: calc(var(--font-size) * 1.25); }
h4,h5,h6 { font-size: calc(var(--font-size) * 1.05); }

p, ul, ol, img, figure, video, table, pre, blockquote { margin: 16px 0; }

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

button {
  font: inherit;
  font-weight: 600;
  color: var(--foreground);
  background: #21262d;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 6px 12px;
  box-shadow: none;
  cursor: pointer;
  transition: background .12s ease, border-color .12s ease;
}
button:hover {
  background: #30363d;
  border-color: #8b949e;
}
button:active {
  background: #161b22;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

fieldset {
  display: block;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
}

label {
  display: inline-block;
  margin-bottom: 6px;
  color: var(--foreground-bright);
}

input, textarea, select {
  background: var(--background);
  color: var(--foreground);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 10px;
  font: inherit;
  transition: border-color .12s ease, box-shadow .12s ease;
}
input::placeholder, textarea::placeholder { color: var(--muted); }

select {
  background-image: linear-gradient(45deg, transparent 50%, var(--foreground) 50%), 
                    linear-gradient(135deg, var(--foreground) 50%, transparent 50%);
  background-position: calc(100% - 20px), calc(100% - 15px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 40px;
}

input[type="checkbox"], input[type="radio"] {
  width: auto;
  vertical-align: middle;
  background: var(--background);
  box-shadow: var(--shadow);
}
input[type="radio"] {
  width: 14px !important;
  height: 14px !important;
  border-radius: 999px;
}

input[type="checkbox"]:checked,
input[type="radio"]:checked {
  background: var(--accent);
  border-color: var(--accent);
}

img {
  display: block;
  max-width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0;
  background: transparent;
}

figure figcaption {
  color: var(--muted);
  text-align: center;
  font-size: .95em;
  margin-top: 8px;
}

ul, ol {
  margin-left: 2ch;
}
li::marker { color: var(--muted); }

code, kbd {
  font-family: "Fira Code","JetBrains Mono",Monaco,Consolas,"Ubuntu Mono",monospace !important;
  background: var(--code-inline-bg);
  color: var(--foreground);
  padding: 2px 6px;
  margin: 0 2px;
  font-size: 0.95em;
  border: 1px solid var(--border);
  border-radius: 4px;
}
kbd {
  border-top-color: #6e7681;
  border-left-color: #6e7681;
  border-right-color: #6e7681;
  border-bottom-color: var(--border);
}

pre {
  tab-size: 4;
  background: var(--code-block-bg) !important;
  color: var(--foreground);
  padding: 16px;
  overflow: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
pre code {
  background: none !important;
  border: none;
  padding: 0;
  margin: 0;
  font-size: inherit;
}

blockquote {
  border-left: 4px solid var(--border);
  padding: 0 16px;
  color: var(--muted);
  background: transparent;
}

table {
  width: 100%;
  border-collapse: collapse;
  table-layout: auto;
}
table, th, td {
  border: 1px solid var(--border);
}
th {
  background: var(--background-subtle);
  color: var(--foreground);
  text-align: left;
  letter-spacing: .02em;
  font-weight: 600;
}
th, td {
  padding: 10px 12px;
}

hr {
  border: none;
  height: 1px;
  background: var(--border);
}

sup, sub { line-height: 0; }

mark {
  background: rgba(187, 128, 9, 0.35);
  color: var(--foreground);
  border-radius: 2px;
  padding: 0 2px;
}

/* --------- GitHub Dark syntax colors (Chroma/Prism/hljs-ish) ---------- */

/* Hugo/Chroma token classes */
.chroma .k, /* Keyword */
.hljs-keyword { color: #ff7b72; }
.chroma .s, .chroma .sa, .chroma .sb, .chroma .sc, .chroma .sd, .chroma .s1, .chroma .s2, /* Strings */
.hljs-string { color: #a5d6ff; }
.chroma .m, .chroma .mi, .chroma .mf, .chroma .il, .chroma .mh, /* Numbers */
.hljs-number, .hljs-literal { color: #79c0ff; }
.chroma .o, .chroma .ow, /* Operators */
.hljs-operator { color: #79c0ff; }
.chroma .nf, .chroma .fm, /* Function name */
.hljs-function, .hljs-title { color: #d2a8ff; }
.chroma .nc, .chroma .nn, /* Class/Type name */
.hljs-class { color: #d2a8ff; }
.chroma .nt, .chroma .na, /* Tag & attribute name */
.hljs-attr, .hljs-attribute, .hljs-name { color: #7ee787; }
.chroma .c, .chroma .cm, .chroma .c1, .chroma .cp, /* Comments */
.hljs-comment { color: #68737e; font-style: italic; }
.chroma .p { color: var(--foreground); } /* Punctuation default */

/* Line numbers (if enabled) */
.chroma .ln, .chroma .lnt {
  color: #495162;
}

/* Code block header-style like GH (optional) */
/* .code-header { background: var(--background-subtle); border: 1px solid var(--border); border-bottom: 0; padding: 8px 12px; border-radius: var(--radius) var(--radius) 0 0; } */

/* Buttons – primary variant (optional, add class="primary") */
button.primary {
  background: #1f6feb;
  border-color: #1f6feb;
  color: #fff;
}
button.primary:hover {
  filter: brightness(1.1);
}

/* Alerts (optional utility classes) */
.alert {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  background: var(--background-subtle);
}
.alert.success { border-color: #238636; }
.alert.warn { border-color: #d29922; }
.alert.danger { border-color: #f85149; }

/* ---- Theme-specific accent overrides (Hugo Terminal) ---- */
/* Titles & links (general) */
.site-title, .site-title a,
.menu a,
.post-title, .post-title a,
.post__title, .post__title a,
.list__title, .list__title a,
.archive__item-title, .archive__item-title a,
.taxonomy__title, .taxonomy__title a { color: var(--accent) !important; }

/* Header brand/logo: keep readable on red badge */
.logo, .logo a,
.header .brand, .header .brand a {
  color: var(--foreground-bright) !important; /* make the text white */
  mix-blend-mode: normal !important;          /* avoid theme blending tricks */
  text-shadow: 0 0 0 transparent;             /* ensure no weird shadows */
}

/* Decorative separators often used under titles */
.post .title:after, .post-title:after, .list__title:after { border-color: var(--accent) !important; }

/* Terminal header/badge accents (best-effort across theme versions) */
.terminal .top, .terminal .title, .terminal .prompt, .terminal .badge,
.header .brand, .header .brand a {
  color: var(--accent) !important;
}

/* Primary button stays red as well */
button.primary {
  background: #f85149;
  border-color: #f85149;
  color: #fff;
}
button.primary:hover { filter: brightness(1.05); }

