/* =========================================================================
   Catppuccin for Obsidian Publish
   -------------------------------------------------------------------------
   Drop this file in the ROOT of your vault as `publish.css`, then publish it.
   Obsidian Publish auto-loads a root-level publish.css and applies it site-wide.

   Strategy: Publish can't load community themes, but it DOES inherit Obsidian's
   app CSS variables. So we set the Catppuccin palette + the base color scale +
   the accent, and the rest of the UI (callouts, tags, graph, links, code)
   follows automatically — the same mechanism the real Catppuccin theme uses.

   Default pairing:  dark = Mocha   |   light = Latte
   To use Frappe or Macchiato for dark mode instead, see the SWAP block below.

   Palette source: https://github.com/catppuccin/catppuccin (canonical hex)
   ========================================================================= */


/* =========================================================================
   1. DARK  —  MOCHA  (default dark flavor)
   ========================================================================= */
.theme-dark {
  /* --- raw palette --- */
  --ctp-rosewater: #f5e0dc;
  --ctp-flamingo:  #f2cdcd;
  --ctp-pink:      #f5c2e7;
  --ctp-mauve:     #cba6f7;
  --ctp-red:       #f38ba8;
  --ctp-maroon:    #eba0ac;
  --ctp-peach:     #fab387;
  --ctp-yellow:    #f9e2af;
  --ctp-green:     #a6e3a1;
  --ctp-teal:      #94e2d5;
  --ctp-sky:       #89dceb;
  --ctp-sapphire:  #74c7ec;
  --ctp-blue:      #89b4fa;
  --ctp-lavender:  #b4befe;

  --ctp-text:      #cdd6f4;
  --ctp-subtext1:  #bac2de;
  --ctp-subtext0:  #a6adc8;
  --ctp-overlay2:  #9399b2;
  --ctp-overlay1:  #7f849c;
  --ctp-overlay0:  #6c7086;
  --ctp-surface2:  #585b70;
  --ctp-surface1:  #45475a;
  --ctp-surface0:  #313244;
  --ctp-base:      #1e1e2e;
  --ctp-mantle:    #181825;
  --ctp-crust:     #11111b;

  /* --- Obsidian base color scale (dark = darkest at 00 → lightest at 100) --- */
  --color-base-00: var(--ctp-base);
  --color-base-05: var(--ctp-mantle);
  --color-base-10: var(--ctp-mantle);
  --color-base-20: var(--ctp-surface0);
  --color-base-25: var(--ctp-surface1);
  --color-base-30: var(--ctp-surface1);
  --color-base-35: var(--ctp-surface2);
  --color-base-40: var(--ctp-surface2);
  --color-base-50: var(--ctp-overlay0);
  --color-base-60: var(--ctp-overlay1);
  --color-base-70: var(--ctp-overlay2);
  --color-base-100: var(--ctp-text);

  /* --- named accent colors (callouts, graph, tags derive from these) --- */
  --color-red:    var(--ctp-red);
  --color-orange: var(--ctp-peach);
  --color-yellow: var(--ctp-yellow);
  --color-green:  var(--ctp-green);
  --color-cyan:   var(--ctp-teal);
  --color-blue:   var(--ctp-blue);
  --color-purple: var(--ctp-mauve);
  --color-pink:   var(--ctp-pink);

  /* --- accent (links / interactive). Mocha mauve as HSL + exact hex --- */
  --accent-h: 267;
  --accent-s: 84%;
  --accent-l: 81%;

  /* --- explicit semantic overrides for the classic Catppuccin look --- */
  --background-primary:        var(--ctp-base);
  --background-primary-alt:    var(--ctp-mantle);
  --background-secondary:      var(--ctp-mantle);
  --background-secondary-alt:  var(--ctp-crust);
  --background-modifier-border: var(--ctp-surface0);
  --background-modifier-border-hover: var(--ctp-surface1);

  --text-normal:    var(--ctp-text);
  --text-muted:     var(--ctp-subtext0);
  --text-faint:     var(--ctp-overlay1);
  --text-accent:        var(--ctp-mauve);
  --text-accent-hover:  var(--ctp-lavender);
  --interactive-accent:        var(--ctp-mauve);
  --interactive-accent-hover:  var(--ctp-lavender);

  --text-selection: hsla(267, 84%, 81%, 0.18);
  --hr-color:       var(--ctp-surface1);
  --blockquote-border-color: var(--ctp-mauve);
  --tag-background: var(--ctp-surface0);
  --tag-color:      var(--ctp-blue);
}


/* =========================================================================
   2. LIGHT  —  LATTE
   ========================================================================= */
.theme-light {
  --ctp-rosewater: #dc8a78;
  --ctp-flamingo:  #dd7878;
  --ctp-pink:      #ea76cb;
  --ctp-mauve:     #8839ef;
  --ctp-red:       #d20f39;
  --ctp-maroon:    #e64553;
  --ctp-peach:     #fe640b;
  --ctp-yellow:    #df8e1d;
  --ctp-green:     #40a02b;
  --ctp-teal:      #179299;
  --ctp-sky:       #04a5e5;
  --ctp-sapphire:  #209fb5;
  --ctp-blue:      #1e66f5;
  --ctp-lavender:  #7287fd;

  --ctp-text:      #4c4f69;
  --ctp-subtext1:  #5c5f77;
  --ctp-subtext0:  #6c6f85;
  --ctp-overlay2:  #7c7f93;
  --ctp-overlay1:  #8c8fa1;
  --ctp-overlay0:  #9ca0b0;
  --ctp-surface2:  #acb0be;
  --ctp-surface1:  #bcc0cc;
  --ctp-surface0:  #ccd0da;
  --ctp-base:      #eff1f5;
  --ctp-mantle:    #e6e9ef;
  --ctp-crust:     #dce0e8;

  --color-base-00: var(--ctp-base);
  --color-base-05: var(--ctp-mantle);
  --color-base-10: var(--ctp-mantle);
  --color-base-20: var(--ctp-surface0);
  --color-base-25: var(--ctp-surface1);
  --color-base-30: var(--ctp-surface1);
  --color-base-35: var(--ctp-surface2);
  --color-base-40: var(--ctp-surface2);
  --color-base-50: var(--ctp-overlay0);
  --color-base-60: var(--ctp-overlay1);
  --color-base-70: var(--ctp-overlay2);
  --color-base-100: var(--ctp-text);

  --color-red:    var(--ctp-red);
  --color-orange: var(--ctp-peach);
  --color-yellow: var(--ctp-yellow);
  --color-green:  var(--ctp-green);
  --color-cyan:   var(--ctp-teal);
  --color-blue:   var(--ctp-blue);
  --color-purple: var(--ctp-mauve);
  --color-pink:   var(--ctp-pink);

  /* Latte mauve as HSL */
  --accent-h: 266;
  --accent-s: 85%;
  --accent-l: 58%;

  --background-primary:        var(--ctp-base);
  --background-primary-alt:    var(--ctp-mantle);
  --background-secondary:      var(--ctp-mantle);
  --background-secondary-alt:  var(--ctp-crust);
  --background-modifier-border: var(--ctp-surface0);
  --background-modifier-border-hover: var(--ctp-surface1);

  --text-normal:    var(--ctp-text);
  --text-muted:     var(--ctp-subtext0);
  --text-faint:     var(--ctp-overlay1);
  --text-accent:        var(--ctp-mauve);
  --text-accent-hover:  var(--ctp-lavender);
  --interactive-accent:        var(--ctp-mauve);
  --interactive-accent-hover:  var(--ctp-lavender);

  --text-selection: hsla(266, 85%, 58%, 0.15);
  --hr-color:       var(--ctp-surface1);
  --blockquote-border-color: var(--ctp-mauve);
  --tag-background: var(--ctp-surface0);
  --tag-color:      var(--ctp-blue);
}


/* =========================================================================
   3. PUBLISH-SPECIFIC ELEMENTS
   Tie the site header, sidebars, and nav to the palette so they match content.
   ========================================================================= */
.published-container {
  --site-body-background: var(--background-primary);
}

/* Site header / title bar */
.site-header,
.site-header-left,
.site-body-left-column,
.site-body-right-column {
  background-color: var(--background-secondary);
}

/* Navigation tree (left sidebar) hover + active states */
.nav-file-title:hover,
.nav-folder-title:hover {
  background-color: var(--ctp-surface0);
}
.nav-file-title.is-active {
  background-color: var(--ctp-surface1);
  color: var(--ctp-mauve);
}

/* Search input */
.search-input-container input {
  background-color: var(--background-secondary-alt);
  color: var(--text-normal);
}

/* Local graph nodes / links */
.graph-view.color-fill { color: var(--ctp-mauve); }
.graph-view.color-line { color: var(--ctp-surface2); }
.graph-view.color-text { color: var(--ctp-text); }
.graph-view.color-fill-tag { color: var(--ctp-green); }
.graph-view.color-fill-attachment { color: var(--ctp-peach); }


/* =========================================================================
   4. (OPTIONAL) Code-block syntax highlighting — a light Catppuccin Prism pass
   Comment out if you don't want it.
   ========================================================================= */
.theme-dark .token.comment,
.theme-dark .token.prolog,
.theme-dark .token.doctype     { color: var(--ctp-overlay1); }
.theme-dark .token.keyword,
.theme-dark .token.tag         { color: var(--ctp-mauve); }
.theme-dark .token.string,
.theme-dark .token.char        { color: var(--ctp-green); }
.theme-dark .token.function    { color: var(--ctp-blue); }
.theme-dark .token.number,
.theme-dark .token.boolean     { color: var(--ctp-peach); }
.theme-dark .token.operator,
.theme-dark .token.punctuation { color: var(--ctp-sky); }
.theme-dark .token.property,
.theme-dark .token.constant    { color: var(--ctp-yellow); }

.site-footer {
  display: none !important;
}

/* =========================================================================
   SWAP BLOCK — use Frappe or Macchiato for DARK mode instead of Mocha.
   To switch: copy ONE palette block below over the `--ctp-*` palette values
   inside the `.theme-dark` rule in section 1, and update --accent-h/s/l.

   ---- FRAPPE (accent-h:277  accent-s:59%  accent-l:76%) ----
     --ctp-rosewater:#f2d5cf; --ctp-flamingo:#eebebe; --ctp-pink:#f4b8e4;
     --ctp-mauve:#ca9ee6;     --ctp-red:#e78284;      --ctp-maroon:#ea999c;
     --ctp-peach:#ef9f76;     --ctp-yellow:#e5c890;   --ctp-green:#a6d189;
     --ctp-teal:#81c8be;      --ctp-sky:#99d1db;      --ctp-sapphire:#85c1dc;
     --ctp-blue:#8caaee;      --ctp-lavender:#babbf1;
     --ctp-text:#c6d0f5;      --ctp-subtext1:#b5bfe2; --ctp-subtext0:#a5adce;
     --ctp-overlay2:#949cbb;  --ctp-overlay1:#838ba7; --ctp-overlay0:#737994;
     --ctp-surface2:#626880;  --ctp-surface1:#51576d; --ctp-surface0:#414559;
     --ctp-base:#303446;      --ctp-mantle:#292c3c;   --ctp-crust:#232634;

   ---- MACCHIATO (accent-h:267  accent-s:83%  accent-l:80%) ----
     --ctp-rosewater:#f4dbd6; --ctp-flamingo:#f0c6c6; --ctp-pink:#f5bde6;
     --ctp-mauve:#c6a0f6;     --ctp-red:#ed8796;      --ctp-maroon:#ee99a0;
     --ctp-peach:#f5a97f;     --ctp-yellow:#eed49f;   --ctp-green:#a6da95;
     --ctp-teal:#8bd5ca;      --ctp-sky:#91d7e3;      --ctp-sapphire:#7dc4e4;
     --ctp-blue:#8aadf4;      --ctp-lavender:#b7bdf8;
     --ctp-text:#cad3f5;      --ctp-subtext1:#b8c0e0; --ctp-subtext0:#a5adcb;
     --ctp-overlay2:#939ab7;  --ctp-overlay1:#8087a2; --ctp-overlay0:#6e738d;
     --ctp-surface2:#5b6078;  --ctp-surface1:#494d64; --ctp-surface0:#363a4f;
     --ctp-base:#24273a;      --ctp-mantle:#1e2030;   --ctp-crust:#181926;
   ========================================================================= */
