@import "tailwindcss";

@theme {
    --font-family: "Space Grotesk", sans-serif;
    --font-family-heading: "Copse", serif;

    --color-primary-50: #eff6ff;
    --color-primary-100: #dbeafe;
    --color-primary-200: #bfdbfe;
    --color-primary-300: #93c5fd;
    --color-primary-400: #60a5fa;
    --color-primary-500: #0f62fe;
    --color-primary-600: #0353e9;
    --color-primary-700: #0043ce;
    --color-primary-800: #002d9c;
    --color-primary-900: #001d6c;
    --color-primary-950: #001141;
}

@custom-variant dark (.dark &);

@layer base {
    button {
        cursor: pointer;
    }
}

@layer components {
    /* Roadmap Table Row States */
    .roadmap-row-done {
        background-color: #d4f4dd;
        color: #0d5c2e;
    }

    :is(.dark *) .roadmap-row-done {
        background-color: #05291d;
        color: #047f54;
    }

    .roadmap-row-inprog {
        background-color: #fef3cd;
        color: #7a6b0f;
    }

    :is(.dark *) .roadmap-row-inprog {
        background-color: #212107;
        color: #9aa40a;
    }

    .roadmap-row-queued {
        background-color: #e0ebf5;
        color: #2d5a7d;
    }

    :is(.dark *) .roadmap-row-queued {
        background-color: #0e1d46;
        color: #8aa9cf;
    }

    .roadmap-row-notstarted {
        background-color: #f5f5f5;
        color: #666666;
    }

    :is(.dark *) .roadmap-row-notstarted {
        background-color: #1a1a1a;
        color: #888888;
    }

    /* Documentation Prose Styles */
    .prose {
        max-width: none;
    }

    /* Headings */
    .prose h1,
    .prose h2,
    .prose h3,
    .prose h4,
    .prose h5,
    .prose h6 {
        scroll-margin-top: 5rem;
    }

    .prose h1 {
        font-size: 2.5rem;
        font-weight: bold;
        font-family: "Space Grotesk", sans-serif;
        color: #111827;
        margin-bottom: 1.5rem;
        margin-top: 2rem;
    }

    :is(.dark *) .prose h1 {
        color: #f3f4f6;
    }

    .prose h2 {
        font-size: 1.875rem;
        font-weight: bold;
        font-family: "Copse", serif;
        color: #111827;
        margin-bottom: 1rem;
        margin-top: 2rem;
    }

    :is(.dark *) .prose h2 {
        color: #f3f4f6;
    }

    .prose h3 {
        font-size: 1.5rem;
        font-weight: bold;
        font-family: "Copse", serif;
        color: #111827;
        margin-bottom: 0.75rem;
        margin-top: 1.5rem;
    }

    :is(.dark *) .prose h3 {
        color: #f3f4f6;
    }

    .prose h4,
    .prose h5,
    .prose h6 {
        font-family: "Copse", serif;
    }

    /* Paragraphs and Text */
    .prose p {
        color: #374151;
        margin-bottom: 1rem;
        line-height: 1.75;
    }

    :is(.dark *) .prose p {
        color: #d1d5db;
    }

    .prose strong {
        font-weight: bold;
        color: #111827;
    }

    :is(.dark *) .prose strong {
        color: #f3f4f6;
    }

    /* Lists */
    .prose ul,
    .prose ol {
        margin-bottom: 1rem;
        padding-left: 1.5rem;
        color: #374151;
    }

    :is(.dark *) .prose ul,
    :is(.dark *) .prose ol {
        color: #d1d5db;
    }

    .prose li {
        margin-bottom: 0.5rem;
    }

    /* Task Lists */
    .prose ul li input[type="checkbox"] {
        margin-right: 0.5rem;
        width: 1rem;
        height: 1rem;
        accent-color: #3B82F6;
    }

    .prose ul li input[type="checkbox"]:disabled {
        cursor: not-allowed;
    }

    /* Links */
    .prose a {
        color: #0f62fe;
        text-decoration: none;
    }

    .prose a:hover {
        color: #0353e9;
    }

    :is(.dark *) .prose a {
        color: #78a9ff;
    }

    :is(.dark *) .prose a:hover {
        color: #a6c8ff;
    }

    /* Blockquotes */
    .prose blockquote {
        border-left: 4px solid #0f62fe;
        padding-left: 1rem;
        margin-left: 0;
        margin-bottom: 1rem;
        color: #6b7280;
    }

    :is(.dark *) .prose blockquote {
        border-left-color: #78a9ff;
    }

    :is(.dark *) .prose blockquote {
        color: #9ca3af;
    }

    /* Tables */
    .prose table {
        width: 100%;
        border-collapse: collapse;
        margin-bottom: 1rem;
    }

    .prose th,
    .prose td {
        border: 1px solid #d1d5db;
        padding: 0.5rem 1rem;
        text-align: left;
    }

    :is(.dark *) .prose th,
    :is(.dark *) .prose td {
        border-color: #4b5563;
    }

    .prose th {
        background-color: #f3f4f6;
        font-weight: bold;
        text-transform: uppercase;
    }

    :is(.dark *) .prose th {
        background-color: #374151;
        color: #f3f4f6;
    }

    /* Horizontal Rules */
    .prose hr {
        border: 0;
        border-top: 2px solid #d1d5db;
        margin: 2rem 0;
    }

    :is(.dark *) .prose hr {
        border-top-color: #4b5563;
    }

    /* Images */
    .prose img {
        max-width: 100%;
        height: auto;
        margin: 1.5rem 0;
        border: 1px solid #d1d5db;
    }

    :is(.dark *) .prose img {
        border-color: #4b5563;
    }

    /* Superscript and Subscript */
    .prose sup {
        vertical-align: super;
        font-size: 0.75em;
    }

    .prose sub {
        vertical-align: sub;
        font-size: 0.75em;
    }

    /* Footnotes */
    .prose .footnotes {
        margin-top: 3rem;
        padding-top: 1.5rem;
        border-top: 2px solid #d1d5db;
        font-size: 0.875rem;
    }

    :is(.dark *) .prose .footnotes {
        border-top-color: #4b5563;
    }

    .prose .footnotes ol {
        padding-left: 1.5rem;
    }

    .prose .footnotes li {
        color: #6b7280;
    }

    :is(.dark *) .prose .footnotes li {
        color: #9ca3af;
    }

    /* Definition Lists */
    .prose dl {
        margin-bottom: 1rem;
    }

    .prose dt {
        font-weight: bold;
        color: #111827;
        margin-top: 1rem;
        margin-bottom: 0.25rem;
    }

    :is(.dark *) .prose dt {
        color: #f3f4f6;
    }

    .prose dd {
        margin-left: 1.5rem;
        margin-bottom: 0.5rem;
        color: #374151;
    }

    :is(.dark *) .prose dd {
        color: #d1d5db;
    }

    /* Math Equations (KaTeX) */
    .prose .katex {
        font-size: 1.1em;
    }

    .prose .katex-display {
        margin: 1.5rem 0;
        overflow-x: auto;
        overflow-y: hidden;
    }

    :is(.dark *) .prose .katex {
        color: #f3f4f6;
    }

    /* Inline Code */
    .prose code {
        background-color: #e5e5e5;
        padding: 0.125rem 0.375rem;
        border-radius: 0.25rem;
        font-size: 0.875rem;
        color: #171717;
        font-family: "JetBrains Mono", "Courier New", monospace;
    }

    :is(.dark *) .prose code {
        background-color: #262626;
        color: #fafafa;
    }

    /* Code Block Wrapper with Copy Button */
    .code-block-wrapper {
        position: relative;
        margin-bottom: 1.5rem;
        border: 1px solid #d1d5db !important;
        border-radius: 8px !important;
        background-color: #fafafa;
        overflow: hidden !important;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    }

    :is(.dark *) .code-block-wrapper {
        border-color: #374151 !important;
        background-color: #111827;
        box-shadow: none;
    }

    /* Reset prose pre styles inside wrapper */
    .prose .code-block-wrapper pre,
    .code-block-wrapper pre {
        border: none !important;
        border-radius: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        background-color: transparent !important;
    }

    .code-block-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        background-color: #f3f4f6;
        padding: 0.35rem 0.75rem;
        border-bottom: 1px solid #d1d5db;
    }

    :is(.dark *) .code-block-header {
        background-color: #1f2937;
        border-bottom-color: #374151;
    }

    .code-language {
        font-size: 0.65rem;
        font-weight: 600;
        color: #6b7280;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        font-family: "JetBrains Mono", "Courier New", monospace;
    }

    :is(.dark *) .code-language {
        color: #9ca3af;
    }

    .copy-button {
        display: flex;
        align-items: center;
        gap: 0.25rem;
        padding: 0.2rem 0.4rem;
        background-color: #e5e7eb;
        border: 1px solid #d1d5db;
        color: #374151;
        font-size: 0.65rem;
        font-weight: 500;
        text-transform: uppercase;
        transition: all 0.2s;
        cursor: pointer;
        border-radius: 4px;
    }

    :is(.dark *) .copy-button {
        background-color: #374151;
        border-color: #4b5563;
        color: #d1d5db;
    }

    .copy-button:hover {
        background-color: #0f62fe;
        color: white;
        border-color: #0f62fe;
    }

    .copy-button svg {
        width: 12px;
        height: 12px;
    }

    .code-block-wrapper pre {
        margin: 0;
        border-radius: 0;
        border: none;
        background-color: transparent;
    }

    .code-block-wrapper code {
        display: block;
        padding: 1rem;
        color: #1f2937;
    }

    :is(.dark *) .code-block-wrapper code {
        color: #e5e7eb;
    }

    /* Rouge Syntax Highlighting - Light Theme (GitHub-style) */
    .highlight table td { padding: 5px; }
    .highlight table pre { margin: 0; }
    .highlight .c, .highlight .ch, .highlight .cd, .highlight .cpf { color: #6a737d; font-style: italic; }
    .highlight .cm { color: #6a737d; font-style: italic; }
    .highlight .c1 { color: #6a737d; font-style: italic; }
    .highlight .cp { color: #6a737d; font-weight: bold; }
    .highlight .cs { color: #6a737d; font-weight: bold; font-style: italic; }
    .highlight .err { color: #cb2431; }
    .highlight .gi { color: #22863a; background-color: #e6ffec; }
    .highlight .gd { color: #cb2431; background-color: #ffeef0; }
    .highlight .ge { font-style: italic; }
    .highlight .ges { font-weight: bold; font-style: italic; }
    .highlight .gr { color: #cb2431; }
    .highlight .gt { color: #cb2431; }
    .highlight .gh { color: #6a737d; }
    .highlight .go { color: #6a737d; }
    .highlight .gp { color: #6a737d; }
    .highlight .gs { font-weight: bold; }
    .highlight .gu { color: #6a737d; }
    .highlight .k, .highlight .kv { color: #d73a49; font-weight: bold; }
    .highlight .kc { color: #005cc5; font-weight: bold; }
    .highlight .kd { color: #d73a49; font-weight: bold; }
    .highlight .kp { color: #d73a49; font-weight: bold; }
    .highlight .kr { color: #d73a49; font-weight: bold; }
    .highlight .kt { color: #d73a49; font-weight: bold; }
    .highlight .kn { color: #d73a49; font-weight: bold; }
    .highlight .ow { color: #d73a49; font-weight: bold; }
    .highlight .o { color: #d73a49; }
    .highlight .mf { color: #005cc5; }
    .highlight .mh { color: #005cc5; }
    .highlight .il { color: #005cc5; }
    .highlight .mi { color: #005cc5; }
    .highlight .mo { color: #005cc5; }
    .highlight .m, .highlight .mb, .highlight .mx { color: #005cc5; }
    .highlight .se { color: #005cc5; }
    .highlight .sa { color: #d73a49; }
    .highlight .sb { color: #032f62; }
    .highlight .sc { color: #032f62; }
    .highlight .sd { color: #032f62; }
    .highlight .s2 { color: #032f62; }
    .highlight .sh { color: #032f62; }
    .highlight .si { color: #032f62; }
    .highlight .sx { color: #032f62; }
    .highlight .sr { color: #032f62; }
    .highlight .s1 { color: #032f62; }
    .highlight .ss { color: #005cc5; }
    .highlight .s, .highlight .dl { color: #032f62; }
    .highlight .na { color: #6f42c1; }
    .highlight .nc { color: #6f42c1; font-weight: bold; }
    .highlight .nd { color: #6f42c1; font-weight: bold; }
    .highlight .ne { color: #6f42c1; font-weight: bold; }
    .highlight .nf, .highlight .fm { color: #6f42c1; font-weight: bold; }
    .highlight .no { color: #005cc5; }
    .highlight .bp { color: #24292e; }
    .highlight .nb { color: #005cc5; }
    .highlight .ni { color: #24292e; }
    .highlight .nn { color: #24292e; }
    .highlight .vc { color: #e36209; }
    .highlight .vg { color: #e36209; }
    .highlight .vi { color: #e36209; }
    .highlight .nv, .highlight .vm { color: #e36209; }
    .highlight .w { color: #24292e; }
    .highlight .nl { color: #005cc5; font-weight: bold; }
    .highlight .nt { color: #22863a; }
    .highlight { color: #24292e; }

    /* Dark mode - Monokai Theme */
    :is(.dark *) .highlight .c, :is(.dark *) .highlight .ch, :is(.dark *) .highlight .cd, :is(.dark *) .highlight .cpf { color: #75715e; }
    :is(.dark *) .highlight .cm { color: #75715e; }
    :is(.dark *) .highlight .c1 { color: #75715e; }
    :is(.dark *) .highlight .cp { color: #75715e; }
    :is(.dark *) .highlight .cs { color: #75715e; }
    :is(.dark *) .highlight .err { color: #f8f8f2; background-color: #f92672; }
    :is(.dark *) .highlight .gi { color: #a6e22e; background-color: transparent; }
    :is(.dark *) .highlight .gd { color: #f92672; background-color: transparent; }
    :is(.dark *) .highlight .gh { color: #75715e; }
    :is(.dark *) .highlight .go { color: #75715e; }
    :is(.dark *) .highlight .gp { color: #75715e; }
    :is(.dark *) .highlight .gu { color: #75715e; }
    :is(.dark *) .highlight .k, :is(.dark *) .highlight .kv { color: #f92672; }
    :is(.dark *) .highlight .kc { color: #66d9ef; }
    :is(.dark *) .highlight .kd { color: #66d9ef; }
    :is(.dark *) .highlight .kp { color: #66d9ef; }
    :is(.dark *) .highlight .kr { color: #66d9ef; }
    :is(.dark *) .highlight .kt { color: #66d9ef; }
    :is(.dark *) .highlight .kn { color: #f92672; }
    :is(.dark *) .highlight .ow { color: #f92672; }
    :is(.dark *) .highlight .o { color: #f92672; }
    :is(.dark *) .highlight .mf { color: #ae81ff; }
    :is(.dark *) .highlight .mh { color: #ae81ff; }
    :is(.dark *) .highlight .il { color: #ae81ff; }
    :is(.dark *) .highlight .mi { color: #ae81ff; }
    :is(.dark *) .highlight .mo { color: #ae81ff; }
    :is(.dark *) .highlight .m, :is(.dark *) .highlight .mb, :is(.dark *) .highlight .mx { color: #ae81ff; }
    :is(.dark *) .highlight .se { color: #ae81ff; }
    :is(.dark *) .highlight .sa { color: #66d9ef; }
    :is(.dark *) .highlight .sb { color: #e6db74; }
    :is(.dark *) .highlight .sc { color: #e6db74; }
    :is(.dark *) .highlight .sd { color: #e6db74; }
    :is(.dark *) .highlight .s2 { color: #e6db74; }
    :is(.dark *) .highlight .sh { color: #e6db74; }
    :is(.dark *) .highlight .si { color: #e6db74; }
    :is(.dark *) .highlight .sx { color: #e6db74; }
    :is(.dark *) .highlight .sr { color: #e6db74; }
    :is(.dark *) .highlight .s1 { color: #e6db74; }
    :is(.dark *) .highlight .ss { color: #e6db74; }
    :is(.dark *) .highlight .s, :is(.dark *) .highlight .dl { color: #e6db74; }
    :is(.dark *) .highlight .na { color: #a6e22e; }
    :is(.dark *) .highlight .nc { color: #a6e22e; }
    :is(.dark *) .highlight .nd { color: #a6e22e; }
    :is(.dark *) .highlight .ne { color: #a6e22e; }
    :is(.dark *) .highlight .nf, :is(.dark *) .highlight .fm { color: #a6e22e; }
    :is(.dark *) .highlight .no { color: #66d9ef; }
    :is(.dark *) .highlight .bp { color: #f8f8f2; }
    :is(.dark *) .highlight .nb { color: #f8f8f2; }
    :is(.dark *) .highlight .ni { color: #f8f8f2; }
    :is(.dark *) .highlight .nn { color: #f8f8f2; }
    :is(.dark *) .highlight .vc { color: #f8f8f2; }
    :is(.dark *) .highlight .vg { color: #f8f8f2; }
    :is(.dark *) .highlight .vi { color: #f8f8f2; }
    :is(.dark *) .highlight .nv, :is(.dark *) .highlight .vm { color: #f8f8f2; }
    :is(.dark *) .highlight .w { color: #f8f8f2; }
    :is(.dark *) .highlight .nl { color: #f8f8f2; }
    :is(.dark *) .highlight .nt { color: #f92672; }
    :is(.dark *) .highlight { color: #f8f8f2; }
}
