/*
 * ============================================================
 *  Theme Obsidian — AH AI Toolkit
 *  Source: skills-overview.html
 *  Usage:  <link rel="stylesheet" href="obsidian.css">
 *          + add Google Fonts import below to your <head>
 * ============================================================
 *
 *  Google Fonts import (paste into your HTML <head>):
 *
 *  <link rel="preconnect" href="https://fonts.googleapis.com">
 *  <link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600
 *    &family=Playfair+Display:ital,wght@1,400
 *    &family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet">
 * ============================================================
 */


/* ============================================================
   1. CSS CUSTOM PROPERTIES (Design Tokens)
   ============================================================ */
:root {
  /* --- Backgrounds --- */
  --bg:           #080808;    /* Page background — near black          */
  --surface:      #0f0f0f;    /* Raised surface (cards, panels)        */
  --card:         #141414;    /* Card background                       */
  --card2:        #1a1a1a;    /* Card hover / alternate shade          */

  /* --- Borders --- */
  --border:       #1e1e1e;    /* Default border                        */
  --border-hi:    #2e2e2e;    /* Highlighted / interactive border      */
  --border-cat:   #3d3d3d;    /* Category divider border               */

  /* --- Accent Colors --- */
  --teal:         #4ec9b0;    /* Primary accent — teal/mint            */
  --teal-dim:     rgba(78, 201, 176, 0.10); /* Teal at low opacity    */
  --purple:       #c586c0;    /* Secondary accent — purple/pink        */
  --orange:       #ce9178;    /* Tertiary accent — warm orange         */
  --blue:         #569cd6;    /* Quaternary accent — blue              */

  /* --- Text --- */
  --text:         #e2e2e2;    /* Body text                             */
  --text-dim:     #aaaaaa;    /* Secondary / de-emphasised text        */
  --text-muted:   #888888;    /* Muted / placeholder text              */

  /* --- Typography --- */
  --font-sans:    'Inter', sans-serif;
  --font-serif:   'Playfair Display', serif;
  --font-mono:    'JetBrains Mono', monospace;
  --mono:         var(--font-mono); /* shorthand alias */
}


/* ============================================================
   2. RESET
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}


/* ============================================================
   3. BASE STYLES
   ============================================================ */
body {
  background:  var(--bg);
  color:       var(--text);
  font-family: var(--font-sans);
  font-size:   14px;
  line-height: 1.6;
  min-height:  100vh;
}

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

strong { color: #fff; font-weight: 600; }

code {
  font-family: var(--font-mono);
  font-size:   10.5px;
  background:  #1a1a1a;
  border:      1px solid var(--border);
  padding:     1px 4px;
  border-radius: 3px;
  color:       var(--teal);
}

pre {
  background:    #111;
  border:        1px solid var(--border);
  border-radius: 7px;
  padding:       12px 14px;
  overflow-x:    auto;
}
pre code {
  background: none;
  border:     none;
  padding:    0;
  color:      #d4d4d4;
  font-size:  10.5px;
  line-height: 1.6;
}


/* ============================================================
   4. TYPOGRAPHY UTILITIES
   ============================================================ */

/* Eyebrow / overline label — monospace, all-caps, muted */
.eyebrow {
  font-family:    var(--font-mono);
  font-size:      11px;
  letter-spacing: 0.22em;
  color:          var(--text-muted);
}

/* Page title */
h1 {
  font-size:      clamp(30px, 4vw, 48px);
  font-weight:    300;
  letter-spacing: -0.03em;
  color:          #fff;
}

/* Italic serif accent inside headings — wrap text in <em> */
h1 em {
  font-family: var(--font-serif);
  font-style:  italic;
  color:       var(--teal);
}

/* Subtitle / caption — monospace, small, dim */
.subtitle {
  font-size:   12px;
  color:       var(--text-dim);
  font-family: var(--font-mono);
}

/* Section headings */
h2 {
  font-size:    14.5px;
  font-weight:  600;
  color:        #ddd;
  padding-bottom: 5px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}
h3 { font-size: 13px; font-weight: 600; color: #ccc; }
h4 { font-size: 12px; font-weight: 600; color: #bbb; }


/* ============================================================
   5. SURFACE & CARD COMPONENTS
   ============================================================ */

/* Bordered panel / card */
.panel {
  background:    var(--surface);
  border:        1px solid var(--border);
  border-radius: 14px;
  overflow:      hidden;
}

.card {
  background:    var(--card);
  border:        1px solid var(--border);
  border-radius: 8px;
  padding:       12px 14px;
  transition:    background 0.12s;
}
.card:hover { background: var(--card2); }


/* ============================================================
   6. BADGE UTILITIES
   ============================================================ */
.badge {
  font-family:    var(--font-mono);
  font-size:      7.5px;
  letter-spacing: 0.05em;
  padding:        1px 4px;
  border-radius:  3px;
  text-transform: uppercase;
}

.badge-teal   { background: rgba(78,  201, 176, 0.12); color: var(--teal);   }
.badge-purple { background: rgba(197, 134, 192, 0.12); color: var(--purple); }
.badge-orange { background: rgba(206, 145, 120, 0.12); color: var(--orange); }
.badge-blue   { background: rgba(86,  156, 214, 0.12); color: var(--blue);   }
.badge-muted  { background: rgba(85,  85,  85,  0.18); color: #aaa;          }


/* ============================================================
   7. DOT INDICATORS
   ============================================================ */
.dot {
  display:       inline-block;
  width:         7px;
  height:        7px;
  border-radius: 50%;
  flex-shrink:   0;
}
.dot-teal   { background: var(--teal);   }
.dot-purple { background: var(--purple); }
.dot-orange { background: var(--orange); }
.dot-blue   { background: var(--blue);   }
.dot-muted  { background: #888;          }


/* ============================================================
   8. BUTTON
   ============================================================ */
.btn {
  background:    none;
  border:        1px solid var(--border-hi);
  color:         var(--text-dim);
  font-family:   var(--font-mono);
  font-size:     11px;
  padding:       4px 11px;
  border-radius: 5px;
  cursor:        pointer;
  transition:    all 0.15s;
}
.btn:hover {
  border-color: var(--teal);
  color:        var(--teal);
}
.btn-full {
  width:      100%;
  padding:    5px;
  font-size:  9.5px;
}
.btn-full:hover { background: var(--teal-dim); }


/* ============================================================
   9. STICKY TOPBAR
   ============================================================ */
.topbar {
  position:       sticky;
  top:            0;
  z-index:        50;
  background:     rgba(8, 8, 8, 0.92);
  backdrop-filter: blur(12px);
  border-bottom:  1px solid var(--border);
  padding:        12px 32px;
  display:        flex;
  align-items:    center;
  gap:            14px;
}


/* ============================================================
  10. SIDEBAR
   ============================================================ */
.sidebar {
  padding:    26px 16px;
  background: #0a0a0a;
}
.sidebar-title {
  font-family:    var(--font-mono);
  font-size:      8.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color:          var(--text-muted);
  margin-bottom:  8px;
  display:        flex;
  align-items:    center;
  gap:            6px;
}
/* Decorative rule after sidebar title */
.sidebar-title::after {
  content:    '';
  flex:       1;
  height:     1px;
  background: var(--border);
}


/* ============================================================
  11. BLOCKQUOTE
   ============================================================ */
blockquote {
  border-left:   3px solid var(--teal);
  padding:       6px 13px;
  background:    var(--teal-dim);
  margin-bottom: 10px;
  border-radius: 0 4px 4px 0;
  color:         var(--text-dim);
  font-size:     12px;
}


/* ============================================================
  12. TOAST NOTIFICATION
   ============================================================ */
.toast {
  position:  fixed;
  bottom:    24px;
  left:      50%;
  transform: translateX(-50%) translateY(10px);
  background:    #1c1c1c;
  border:        1px solid var(--border-hi);
  color:         var(--teal);
  font-family:   var(--font-mono);
  font-size:     11px;
  padding:       7px 15px;
  border-radius: 6px;
  opacity:       0;
  pointer-events: none;
  transition:    opacity 0.18s, transform 0.18s;
  z-index:       999;
}
.toast.show {
  opacity:   1;
  transform: translateX(-50%) translateY(0);
}


/* ============================================================
  13. TABLE OF CONTENTS
   ============================================================ */
/* Numbered index used in TOC lists — e.g. 01, 02, 03 */
.toc-num {
  font-family: var(--font-mono);
  font-size:   10px;
  color:       var(--teal);
  flex-shrink: 0;
}


/* ============================================================
  14. TABLES
   ============================================================ */
table {
  width:           100%;
  border-collapse: collapse;
  font-size:       11.5px;
}
th {
  background:  #131313;
  color:       #aaa;
  font-weight: 500;
  padding:     5px 8px;
  border:      1px solid var(--border);
  text-align:  left;
}
td {
  padding: 5px 8px;
  border:  1px solid var(--border);
  color:   var(--text-dim);
}
tr:nth-child(even) td { background: #0d0d0d; }


/* ============================================================
  14. RESPONSIVE BREAKPOINT
   ============================================================ */
@media (max-width: 900px) {
  .topbar { padding: 12px 16px; }
  .sidebar { display: none; } /* hide sidebar on mobile */
}
