/* CoreMet — Design System Theme
   Defines all CSS custom properties (colors, typography, spacing, shadows)
   ========================================================================= */

/* Nature-style typography — Arial/Helvetica sans-serif stack */
/* No external font import needed for Arial */

:root {
    /* ── Primary Brand ────────────────────────────────────── */
    --cm-primary:        #1a365d;
    --cm-primary-light:  #2b6cb0;
    --cm-primary-hover:  #2c5282;
    --cm-accent:         #38b2ac;
    --cm-accent-hover:   #2c9f99;

    /* ── Entity-Type Colors (consistent across all pages) ─── */
    --cm-metabolite:     #e27a3f;   /* orange  */
    --cm-protein:        #3182ce;   /* blue    */
    --cm-gene:           #d69e2e;   /* gold    */
    --cm-disease:        #e53e3e;   /* red     */
    --cm-microbe:        #38a169;   /* green   */
    --cm-drug:           #805ad5;   /* purple  */
    --cm-snp:            #319795;   /* teal    */

    /* ── Semantic UI Colors ───────────────────────────────── */
    --cm-interaction:    #38a169;
    --cm-warning:        #d69e2e;
    --cm-low:            #a0aec0;

    /* ── Organism Accent Colors ───────────────────────────── */
    --org-human:          #3182ce;
    --org-mouse:          #e53e3e;
    --org-rat:            #38a169;
    --org-ecoli:          #d69e2e;
    --org-yeast:          #805ad5;
    --org-fly:            #ed8936;
    --org-worm:           #319795;
    --org-cow:            #b83280;
    --org-plant:          #48bb78;
    --org-pseudomonas:    #4299e1;

    /* ── Surfaces ─────────────────────────────────────────── */
    --cm-bg:             #ffffff;
    --cm-surface:        #ffffff;
    --cm-surface-alt:    #f8f9fa;
    --cm-border:         #e2e8f0;

    /* ── Text ─────────────────────────────────────────────── */
    --cm-text:           #1a202c;
    --cm-text-secondary: #718096;
    --cm-text-on-dark:   #f7fafc;

    /* ── Typography (Nature Journal style) ─────────────────── */
    --font-ui:            Arial, Helvetica, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-reading:       Arial, Helvetica, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono:          Arial, Helvetica, sans-serif;

    --text-xs:    0.75rem;
    --text-sm:    0.875rem;
    --text-base:  1rem;
    --text-lg:    1.125rem;
    --text-xl:    1.5rem;
    --text-2xl:   2rem;
    --text-hero:  2.5rem;

    /* ── Spacing ──────────────────────────────────────────── */
    --space-xs:   4px;
    --space-sm:   8px;
    --space-md:   16px;
    --space-lg:   24px;
    --space-xl:   32px;
    --space-2xl:  48px;

    /* ── Shadows ──────────────────────────────────────────── */
    --shadow-sm:   0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md:   0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-lg:   0 4px 6px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.06);
    --shadow-xl:   0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);

    /* ── Radii ────────────────────────────────────────────── */
    --radius-sm:  4px;
    --radius-md:  6px;
    --radius-lg:  8px;
    --radius-xl:  12px;
    --radius-full: 9999px;

    /* ── Transitions ──────────────────────────────────────── */
    --transition-fast:   0.15s ease;
    --transition-normal: 0.25s ease;
}

/* ── Base Reset & Defaults ─────────────────────────────────── */

*, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-family: var(--font-ui);
    font-size: var(--text-base);
    color: var(--cm-text);
    background-color: var(--cm-bg);
    line-height: 1.6;
    padding-top: 64px;   /* navbar height */
    margin: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-ui);
    font-weight: 700;
    color: var(--cm-text);
    line-height: 1.3;
    margin-top: 0;
}

a {
    color: var(--cm-primary-light);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--cm-primary-hover);
    text-decoration: underline;
}

/* ── Page Container ────────────────────────────────────────── */

.cm-page-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--space-lg);
}

/* ── Scrollbar (webkit) ────────────────────────────────────── */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--cm-surface-alt);
}

::-webkit-scrollbar-thumb {
    background: var(--cm-low);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--cm-text-secondary);
}

/* ── Selection ─────────────────────────────────────────────── */

::selection {
    background: var(--cm-accent);
    color: var(--cm-text-on-dark);
}
