/* ============================================================================
   Jhooq shared brand skin — rebrands the hugo-clarity theme to the crafted
   design system by overriding the theme's OWN CSS custom properties.
   Loaded via config `customCSS`, i.e. AFTER the theme bundle, so these win.
   No markup fights, no SASS recompile — the whole theme (header, article,
   code, tables, footer) re-colors through hugo-clarity's own variables.

   Default = LIGHT (best for a screenshot-heavy long-form blog); the theme's
   existing toggle flips to the crafted dark palette below.
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Chakra+Petch:wght@500;600;700&display=swap');

/* ---- LIGHT (default) : crafted palette mapped onto hugo-clarity's vars ---- */
html {
  --light:        #ffffff;   /* paper (post page background) */
  --haze:         #eef1f7;   /* subtle ground (home/list bg, footer, inline code) */
  --xhaze:        #e2e7f1;
  --gray:         #1a2030;   /* strong ink */
  --text:         #2b3346;   /* body text — readable, not pure black */
  --theme:        #3f6fd8;   /* links + primary accent (was clarity teal) */
  --accent:       #7c4ddb;   /* secondary pop (crafted violet) */
  --header-text:  #1a2030;
  --bg:           #0d1220;   /* dark ground for code blocks / notices on light */
  --footer-bg:    #eef1f7;
  --table-border: #dfe4ee;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ---- DARK : crafted brand dark (overrides the theme's own dim mixin) ---- */
html[data-mode="dim"] {
  --light:        #e6e9f2;   /* the theme uses --light as text in dark mode */
  --haze:         #131826;
  --xhaze:        #1a2030;
  --gray:         #e6e9f2;
  --text:         #e6e9f2;
  --theme:        #5b8def;
  --accent:       #8b5cf6;
  --header-text:  #e6e9f2;
  --bg:           #0b0f17;   /* body bg in dark (choice-bg resolves to --bg) */
  --footer-bg:    #0b0f17;
  --code-bg:      #131826;
  --table-border: #252c40;
}

/* ---- Chakra Petch on the display surfaces (headings + brand + post titles) ---- */
h1, h2, h3,
.nav_brand,
.post_title, .article_title, .single_title,
.post-title, .archive_title {
  font-family: 'Chakra Petch', var(--font);
  letter-spacing: 0.2px;
}

/* ---- Crafted brand lockup (mark + "Crafted by Jhooq") in the dark header ---- */
.nav_brand { display: inline-flex; align-items: center; gap: 10px; }
.jq-mark { width: 30px; height: 30px; flex-shrink: 0; display: block; }
.jq-word {
  font-family: 'Chakra Petch', var(--font); font-weight: 700; font-size: 1.15rem;
  letter-spacing: 0.3px; color: #e6e9f2;   /* header bar is dark in both modes */
  white-space: nowrap;
}
.jq-word .jq-by { font-weight: 500; color: #8a93a8; }

/* ---- Neutralize inline code (crafted chip, not hugo-clarity red) ---- */
/* scoped to article area (main) so nav/other code is untouched; block code
   (pre > code) is excluded via :not(pre) so syntax highlighting stays intact */
main :not(pre) > code {
  background: var(--haze);
  border: 1px solid var(--table-border);
  color: var(--text) !important;   /* beat hugo-clarity's crimson inline-code rule */
  border-radius: 5px;
  padding: 0.1em 0.4em;
  font-size: 0.9em;
}

/* ---- Small crafted touches ---- */
/* gradient underline accent on primary links in article body */
.content a:not(.nav_item):hover { text-decoration-color: var(--accent); }
/* code blocks: crafted rounded dark card even in light mode */
.content pre { border-radius: 10px; }
/* the "Learn" cross-nav item gets the accent so it reads as the portal door */
.nav_item[href*="crafted.jhooq.com"],
.nav_item[href^="/learn"] { color: var(--theme); font-weight: 600; }
