/* ==========================================================
   Visual Brand — Samay Panwar
   Catppuccin Latte (light) · Catppuccin Mocha (dark)
   Fonts: Inter (headings) · Lora (body) · JetBrains Mono
   ========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Lora:ital,wght@0,400;0,600;1,400&family=JetBrains+Mono:wght@400;500&display=swap');

/* ── Token definitions ───────────────────── */
:root {
  /* Accent palette (ordered) */
  --lavender:  #8589c0;
  --blue:      #6b8fc4;
  --teal:      #6aa8a8;
  --sage:      #7ea882;
  --peach:     #d4906a;
  --rose:      #c48a8a;
  --marigold:  #c8a96e;
}

/* ── Light Mode — Catppuccin Latte warm ─── */
.theme-light {
  --background-primary:         #faf9f5;
  --background-primary-alt:     #f0ece3;
  --background-secondary:       #f0ece3;
  --background-secondary-alt:   #e8e2d8;

  --text-normal:                #4a4c60;
  --text-muted:                 #6b6d80;
  --text-faint:                 #9b9eb0;

  --text-accent:                var(--lavender);
  --text-accent-hover:          #7275b0;
  --interactive-accent:         var(--lavender);
  --interactive-accent-hover:   #7275b0;

  --background-modifier-border: #e2ddd4;
  --background-modifier-hover:  rgba(133, 137, 192, 0.08);
  --background-modifier-active-hover: rgba(133, 137, 192, 0.12);
  --text-selection:             rgba(133, 137, 192, 0.22);

  --code-background:            rgba(226, 221, 212, 0.5);
}

/* ── Dark Mode — Catppuccin Mocha ────────── */
.theme-dark {
  --background-primary:         #1e1e2e;
  --background-primary-alt:     #181825;
  --background-secondary:       #313244;
  --background-secondary-alt:   #1e1e2e;

  --text-normal:                #cdd6f4;
  --text-muted:                 #a6adc8;
  --text-faint:                 #6c7086;

  --text-accent:                #b4befe;
  --text-accent-hover:          #cdd0ff;
  --interactive-accent:         #b4befe;
  --interactive-accent-hover:   #cdd0ff;

  --background-modifier-border: #45475a;
  --background-modifier-hover:  rgba(180, 190, 254, 0.07);
  --background-modifier-active-hover: rgba(180, 190, 254, 0.10);
  --text-selection:             rgba(180, 190, 254, 0.2);

  --code-background:            rgba(49, 50, 68, 0.8);
}

/* ── Typography ──────────────────────────── */
body,
.markdown-preview-view,
.markdown-rendered {
  font-family: "Lora", Georgia, serif;
  line-height: 1.72;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

/* Heading family — Inter */
.markdown-rendered h1,
.markdown-rendered h2,
.markdown-rendered h3,
.markdown-rendered h4,
.markdown-rendered h5,
.markdown-rendered h6 {
  font-family: "Inter", Arial, sans-serif;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--text-normal);
}

.markdown-rendered h1 {
  font-size: 1.9em;
  margin-top: 0.5em;
  margin-bottom: 0.3em;
}

.markdown-rendered h2 {
  font-size: 1.45em;
  margin-top: 1.4em;
  margin-bottom: 0.25em;
}

.markdown-rendered h3 {
  font-size: 1.2em;
  margin-top: 1.1em;
  margin-bottom: 0.2em;
}

.markdown-rendered h4 {
  font-size: 1.05em;
  margin-top: 0.9em;
}

/* ── Reading width ───────────────────────── */
.markdown-preview-view .markdown-preview-sizer,
.markdown-rendered .markdown-preview-sizer {
  max-width: 780px;
}

/* ── Links ───────────────────────────────── */
.markdown-preview-view a,
.markdown-rendered a {
  color: var(--text-accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(133, 137, 192, 0.3);
  transition: border-color 0.15s ease, color 0.15s ease;
}

.theme-dark .markdown-preview-view a,
.theme-dark .markdown-rendered a {
  border-bottom-color: rgba(180, 190, 254, 0.28);
}

.markdown-preview-view a:hover,
.markdown-rendered a:hover {
  color: var(--text-accent-hover);
  border-bottom-color: var(--text-accent);
}

/* ── Inline code ─────────────────────────── */
.markdown-rendered code {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.88em;
  padding: 0.15em 0.38em;
  border-radius: 5px;
  background: var(--code-background);
  color: var(--peach);
}

.theme-dark .markdown-rendered code {
  color: #fab387;
}

/* ── Code blocks ─────────────────────────── */
.markdown-rendered pre {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.87em;
  border-radius: 10px;
  border: 1px solid var(--background-modifier-border);
  padding: 1em 1.1em;
  overflow: auto;
  line-height: 1.6;
}

.markdown-rendered pre code {
  background: transparent;
  padding: 0;
  color: var(--text-normal);
  font-size: 1em;
}

/* ── Blockquote ──────────────────────────── */
.markdown-rendered blockquote {
  border-left: 3px solid var(--text-accent);
  padding-left: 1em;
  margin-left: 0;
  color: var(--text-muted);
  font-style: italic;
}

/* ── Horizontal rule ─────────────────────── */
.markdown-rendered hr {
  border: none;
  border-top: 1px solid var(--background-modifier-border);
  margin: 2em 0;
}

/* ── Tables ──────────────────────────────── */
.markdown-rendered table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.93em;
}

.markdown-rendered th {
  font-family: "Inter", Arial, sans-serif;
  font-weight: 600;
  font-size: 0.82em;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--background-modifier-border);
  padding: 0.5em 0.75em;
  text-align: left;
}

.markdown-rendered td {
  padding: 0.5em 0.75em;
  border-bottom: 1px solid var(--background-modifier-border);
  color: var(--text-normal);
}

.markdown-rendered tr:last-child td {
  border-bottom: none;
}

/* ── Sidebar ─────────────────────────────── */
.theme-light .nav-files-container {
  background-color: #f0ece3;
}

.theme-dark .nav-files-container {
  background-color: #181825;
}
