/*
================================================================================
  GitHubDHC for GitHub Pages

  A standalone CSS stylesheet extracted from the GitHubDHC Obsidian theme
  for use with GitHub Pages (Jekyll) or any static HTML site.

  Author: Scott Kirvan
  Based on: GitHub's Primer Design System - Dark High Contrast theme
  Version: 2.0.2

  Usage:
  Add to your GitHub Pages _config.yml or HTML <head>:
  <link rel="stylesheet" href="github-pages-style.css">
================================================================================
*/

/* ─────────────────────────────────────────────────────────────────────────
   COLOR SYSTEM - GitHub Dark High Contrast
   ───────────────────────────────────────────────────────────────────────── */

:root {
    /* Background colors */
    --color-bg-default: #010409;
    --color-bg-muted: #010409;
    --color-bg-emphasis: #7a828e;

    /* Text colors */
    --color-text-primary: #f0f3f6;
    --color-text-secondary: #9ea7b3;
    --color-text-link: #71b7ff;
    --color-text-link-hover: #409eff;

    /* Border colors */
    --color-border-default: #3d444d;
    --color-border-emphasis: #7a828e;

    /* Code colors */
    --color-code-bg: #161b22;
    --color-inline-code-bg: rgba(110, 118, 129, 0.4);

    /* Table colors */
    --color-table-row-alt: #151b23;

    /* Callout/Alert colors */
    --color-note: #71b7ff;
    --color-tip: #26a148;
    --color-important: #b87fff;
    --color-warning: #e09b13;
    --color-caution: #e5534b;
}

/* ─────────────────────────────────────────────────────────────────────────
   BASE STYLES
   ───────────────────────────────────────────────────────────────────────── */

body {
    background-color: var(--color-bg-default);
    color: var(--color-text-primary);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    max-width: 85%;
    margin: 0 auto;
    padding: 54pt 54pt 54pt 54pt; /* 3/4 inch margins on all sides */
    border: 1px solid var(--color-border-emphasis);
    border-radius: 6px;
    box-sizing: border-box;
}

/* ─────────────────────────────────────────────────────────────────────────
   TYPOGRAPHY
   ───────────────────────────────────────────────────────────────────────── */

h1, h2, h3, h4, h5, h6 {
    color: var(--color-text-primary);
    font-weight: 600;
    line-height: 1.25;
    margin-top: 24px;
    margin-bottom: 16px;
}

h1 {
    font-size: 2em;
    padding-bottom: 0.3em;
    border-bottom: 1px solid var(--color-border-emphasis);
}

h2 {
    font-size: 1.5em;
    padding-bottom: 0.3em;
    border-bottom: 1px solid var(--color-border-emphasis);
}

h3 {
    font-size: 1.25em;
}

h4 {
    font-size: 1em;
}

h5 {
    font-size: 0.875em;
}

h6 {
    font-size: 0.85em;
}

p {
    margin-top: 0;
    margin-bottom: 16px;
}

/* ─────────────────────────────────────────────────────────────────────────
   LINKS
   ───────────────────────────────────────────────────────────────────────── */

a {
    color: var(--color-text-link);
    text-decoration: underline;
}

a:hover {
    color: var(--color-text-link-hover);
}

/* Links in headers - no underline */
h1 a,
h2 a,
h3 a,
h4 a,
h5 a,
h6 a {
    text-decoration: none;
}

/* ─────────────────────────────────────────────────────────────────────────
   CODE BLOCKS
   ───────────────────────────────────────────────────────────────────────── */

/* Inline code */
code {
    background-color: var(--color-inline-code-bg);
    padding: 0.2em 0.4em;
    border-radius: 6px;
    font-family: "SF Mono", Monaco, Inconsolata, "Fira Mono", "Droid Sans Mono", "Source Code Pro", monospace;
    font-size: 85%;
}

/* Code blocks */
pre {
    background-color: var(--color-code-bg);
    border-radius: 6px;
    padding: 1rem;
    margin: 16px 0;
    overflow-x: auto;
}

pre code {
    background-color: transparent;
    padding: 0;
    border-radius: 0;
    font-size: 100%;
}

/* ─────────────────────────────────────────────────────────────────────────
   LISTS
   ───────────────────────────────────────────────────────────────────────── */

ul, ol {
    margin-top: 0;
    margin-bottom: 16px;
    padding-left: 2em;
}

li {
    margin-top: 0.25em;
    margin-bottom: 0.25em;
}

/* ─────────────────────────────────────────────────────────────────────────
   TABLES
   ───────────────────────────────────────────────────────────────────────── */

table {
    border-collapse: collapse;
    width: 100%;
    margin: 16px 0;
    border-spacing: 0;
}

table thead tr {
    background-color: var(--color-bg-default);
}

table tbody tr {
    background-color: var(--color-bg-default);
    border-top: 1px solid var(--color-border-default);
}

table tbody tr:nth-child(2n) {
    background-color: var(--color-table-row-alt);
}

table th,
table td {
    padding: 6px 13px;
    border: 1px solid var(--color-border-default);
}

table th {
    font-weight: 600;
    text-align: left;
}

/* ─────────────────────────────────────────────────────────────────────────
   BLOCKQUOTES
   ───────────────────────────────────────────────────────────────────────── */

blockquote {
    margin: 0 0 16px 0;
    padding: 0 1em;
    color: var(--color-text-secondary);
    border-left: 0.25em solid var(--color-bg-emphasis);
}

blockquote > :first-child {
    margin-top: 0;
}

blockquote > :last-child {
    margin-bottom: 0;
}

/* ─────────────────────────────────────────────────────────────────────────
   GITHUB ALERTS (Callouts)
   ───────────────────────────────────────────────────────────────────────── */

/* Note: GitHub Pages may render alerts differently depending on your setup.

   IMPORTANT: Standard Jekyll/GitHub Pages does NOT automatically convert [!NOTE] syntax
   to styled callouts. You need to either:

   1. Use HTML with classes in your markdown:
      <blockquote class="alert-note">
      <p><strong>Note</strong></p>
      <p>Your content here</p>
      </blockquote>

   2. Add a Jekyll plugin like jekyll-github-alerts to auto-convert the syntax

   3. Use the data-callout attribute:
      <blockquote data-callout="note">
      <p>Your content here</p>
      </blockquote>
*/

/* Base callout styling - GitHub style */
blockquote[data-callout],
blockquote.alert,
blockquote.alert-note,
blockquote.alert-tip,
blockquote.alert-important,
blockquote.alert-warning,
blockquote.alert-caution,
blockquote.alert-info,
blockquote.alert-success,
blockquote.alert-danger,
blockquote.alert-error {
    border: none;
    border-left: 4px solid #71b7ff;
    background-color: var(--color-bg-default);
    padding: 11px 16px;
    margin: 11px 0;
    border-radius: 0;
}

/* Callout titles - make them bold and colored */
blockquote[data-callout] > p:first-child strong:first-child,
blockquote.alert > p:first-child strong:first-child,
blockquote[data-callout] > p:first-child b:first-child,
blockquote.alert > p:first-child b:first-child {
    color: inherit;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* Add icon support using SVG icons before callout titles */
blockquote[data-callout="note"] > p:first-child::before,
blockquote[data-callout="info"] > p:first-child::before,
blockquote.alert-note > p:first-child::before,
blockquote.alert-info > p:first-child::before {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 8px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="%2371b7ff"><path d="M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8Zm8-6.5a6.5 6.5 0 1 0 0 13 6.5 6.5 0 0 0 0-13ZM6.5 7.75A.75.75 0 0 1 7.25 7h1a.75.75 0 0 1 .75.75v2.75h.25a.75.75 0 0 1 0 1.5h-2a.75.75 0 0 1 0-1.5h.25v-2h-.25a.75.75 0 0 1-.75-.75ZM8 6a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z"/></svg>');
    background-size: contain;
    background-repeat: no-repeat;
    vertical-align: text-bottom;
}

blockquote[data-callout="tip"] > p:first-child::before,
blockquote[data-callout="success"] > p:first-child::before,
blockquote.alert-tip > p:first-child::before,
blockquote.alert-success > p:first-child::before {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 8px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="%232bd853"><path d="M8 1.5c-2.363 0-4 1.69-4 3.75 0 .984.424 1.625.984 2.304l.214.253c.223.264.47.556.673.848.284.411.537.896.621 1.49a.75.75 0 0 1-1.484.211c-.04-.282-.163-.547-.37-.847a8.456 8.456 0 0 0-.542-.68c-.084-.1-.173-.205-.268-.32C3.201 7.75 2.5 6.766 2.5 5.25 2.5 2.31 4.863 0 8 0s5.5 2.31 5.5 5.25c0 1.516-.701 2.5-1.328 3.259-.095.115-.184.22-.268.319-.207.245-.383.453-.541.681-.208.3-.33.565-.37.847a.751.751 0 0 1-1.485-.212c.084-.593.337-1.078.621-1.489.203-.292.45-.584.673-.848.075-.088.147-.173.213-.253.561-.679.985-1.32.985-2.304 0-2.06-1.637-3.75-4-3.75ZM5.75 12h4.5a.75.75 0 0 1 0 1.5h-4.5a.75.75 0 0 1 0-1.5ZM6 15.25a.75.75 0 0 1 .75-.75h2.5a.75.75 0 0 1 0 1.5h-2.5a.75.75 0 0 1-.75-.75Z"/></svg>');
    background-size: contain;
    background-repeat: no-repeat;
    vertical-align: text-bottom;
}

blockquote[data-callout="important"] > p:first-child::before,
blockquote.alert-important > p:first-child::before {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 8px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="%23d2a8ff"><path d="M0 1.75C0 .784.784 0 1.75 0h12.5C15.216 0 16 .784 16 1.75v9.5A1.75 1.75 0 0 1 14.25 13H8.06l-2.573 2.573A1.458 1.458 0 0 1 3 14.543V13H1.75A1.75 1.75 0 0 1 0 11.25Zm1.75-.25a.25.25 0 0 0-.25.25v9.5c0 .138.112.25.25.25h2a.75.75 0 0 1 .75.75v2.19l2.72-2.72a.749.749 0 0 1 .53-.22h6.5a.25.25 0 0 0 .25-.25v-9.5a.25.25 0 0 0-.25-.25Zm7 2.25v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 9a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"/></svg>');
    background-size: contain;
    background-repeat: no-repeat;
    vertical-align: text-bottom;
}

blockquote[data-callout="warning"] > p:first-child::before,
blockquote.alert-warning > p:first-child::before {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 8px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="%23f0b72f"><path d="M6.457 1.047c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0 1 14.082 15H1.918a1.75 1.75 0 0 1-1.543-2.575Zm1.763.707a.25.25 0 0 0-.44 0L1.698 13.132a.25.25 0 0 0 .22.368h12.164a.25.25 0 0 0 .22-.368Zm.53 3.996v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 11a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"/></svg>');
    background-size: contain;
    background-repeat: no-repeat;
    vertical-align: text-bottom;
}

blockquote[data-callout="caution"] > p:first-child::before,
blockquote[data-callout="danger"] > p:first-child::before,
blockquote[data-callout="error"] > p:first-child::before,
blockquote.alert-caution > p:first-child::before,
blockquote.alert-danger > p:first-child::before,
blockquote.alert-error > p:first-child::before {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 8px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="%23ff9492"><path d="M4.47.22A.749.749 0 0 1 5 0h6c.199 0 .389.079.53.22l4.25 4.25c.141.14.22.331.22.53v6a.749.749 0 0 1-.22.53l-4.25 4.25A.749.749 0 0 1 11 16H5a.749.749 0 0 1-.53-.22L.22 11.53A.749.749 0 0 1 0 11V5c0-.199.079-.389.22-.53Zm.84 1.28L1.5 5.31v5.38l3.81 3.81h5.38l3.81-3.81V5.31L10.69 1.5ZM8 4a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 8 4Zm0 8a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z"/></svg>');
    background-size: contain;
    background-repeat: no-repeat;
    vertical-align: text-bottom;
}

/* Alert type colors - BRIGHT GitHub colors */
blockquote[data-callout="note"],
blockquote[data-callout="info"],
blockquote.alert-note,
blockquote.alert-info {
    border-left-color: #71b7ff;
}

blockquote[data-callout="note"] > p:first-child,
blockquote[data-callout="info"] > p:first-child,
blockquote.alert-note > p:first-child,
blockquote.alert-info > p:first-child {
    color: #71b7ff;
}

blockquote[data-callout="tip"],
blockquote[data-callout="success"],
blockquote.alert-tip,
blockquote.alert-success {
    border-left-color: #2bd853;
}

blockquote[data-callout="tip"] > p:first-child,
blockquote[data-callout="success"] > p:first-child,
blockquote.alert-tip > p:first-child,
blockquote.alert-success > p:first-child {
    color: #2bd853;
}

blockquote[data-callout="important"],
blockquote.alert-important {
    border-left-color: #d2a8ff;
}

blockquote[data-callout="important"] > p:first-child,
blockquote.alert-important > p:first-child {
    color: #d2a8ff;
}

blockquote[data-callout="warning"],
blockquote.alert-warning {
    border-left-color: #f0b72f;
}

blockquote[data-callout="warning"] > p:first-child,
blockquote.alert-warning > p:first-child {
    color: #f0b72f;
}

blockquote[data-callout="caution"],
blockquote[data-callout="danger"],
blockquote[data-callout="error"],
blockquote.alert-caution,
blockquote.alert-danger,
blockquote.alert-error {
    border-left-color: #ff9492;
}

blockquote[data-callout="caution"] > p:first-child,
blockquote[data-callout="danger"] > p:first-child,
blockquote[data-callout="error"] > p:first-child,
blockquote.alert-caution > p:first-child,
blockquote.alert-danger > p:first-child,
blockquote.alert-error > p:first-child {
    color: #ff9492;
}

/* ─────────────────────────────────────────────────────────────────────────
   IMAGES
   ───────────────────────────────────────────────────────────────────────── */

img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 8px 0;
}

/* Inline images (like badges) */
p img,
a img {
    display: inline-block;
    margin: 0 2px;
    vertical-align: middle;
}

/* ─────────────────────────────────────────────────────────────────────────
   HORIZONTAL RULES
   ───────────────────────────────────────────────────────────────────────── */

hr {
    height: 0.25em;
    padding: 0;
    margin: 24px 0;
    background-color: var(--color-border-default);
    border: 0;
}

/* ─────────────────────────────────────────────────────────────────────────
   DETAILS/SUMMARY
   ───────────────────────────────────────────────────────────────────────── */

details {
    margin-top: 16px;
    margin-bottom: 16px;
}

summary {
    cursor: pointer;
    margin-bottom: 8px;
    font-weight: 600;
}

/* ─────────────────────────────────────────────────────────────────────────
   SYNTAX HIGHLIGHTING (Optional)
   ───────────────────────────────────────────────────────────────────────── */

/* If using syntax highlighting, add these classes.
   Adjust colors as needed for your syntax highlighter. */

.highlight .c { color: #7a828e; } /* Comment */
.highlight .k { color: #ff7b72; } /* Keyword */
.highlight .s { color: #a5d6ff; } /* String */
.highlight .n { color: #f0f3f6; } /* Name */
.highlight .o { color: #ff7b72; } /* Operator */
.highlight .p { color: #f0f3f6; } /* Punctuation */
.highlight .m { color: #79c0ff; } /* Number */

/* ─────────────────────────────────────────────────────────────────────────
   RESPONSIVE DESIGN
   ───────────────────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
    body {
        max-width: 100%;
        padding: 20px;
        font-size: 14px;
    }

    h1 {
        font-size: 1.75em;
    }

    h2 {
        font-size: 1.4em;
    }

    pre {
        padding: 0.5rem;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    table {
        display: block;
        overflow-x: auto;
    }
}

/* ─────────────────────────────────────────────────────────────────────────
   PRINT STYLES
   ───────────────────────────────────────────────────────────────────────── */

@media print {
    body {
        background-color: white;
        color: black;
        max-width: 100%;
    }

    a {
        color: black;
        text-decoration: underline;
    }

    pre, code {
        background-color: #f6f8fa;
        color: black;
    }
}
