/* CSS Reset */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Ayu Dark Theme - Default */
:root {
    /* Colors */
    --bg-primary: #0a0e14;
    --bg-secondary: #0f131a;
    --text-primary: #b3b1ad;
    --text-secondary: #8a8986;
    --text-heading: #e6e1cf;
    --accent-coffee: #c9a227;
    --accent-coffee-light: #dbb73a;
    --accent-coffee-dark: #a68518;
    --accent-blue: #59c2ff;
    --accent-green: #aad94c;
    --accent-purple: #d2a6ff;
    --border-color: #1f2430;
    --divider-color: #2d3340;

    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;

    /* Typography */
    --font-family: 'Roboto', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-size-base: 14px;
    --font-size-sm: 12px;
    --font-size-lg: 16px;
    --font-size-xl: 18px;
    --font-size-h1: 24px;
    --font-size-h2: 18px;
    --line-height-base: 1.5;
    --line-height-heading: 1.3;

    /* Layout */
    --max-width: 210mm;
    --section-gap: var(--spacing-lg);
}

/* Ayu Light Theme */
@media (prefers-color-scheme: light) {
    :root {
        --bg-primary: #fafafa;
        --bg-secondary: #ffffff;
        --text-primary: #5c6166;
        --text-secondary: #828c99;
        --text-heading: #242936;
        --accent-coffee: #6b4f0f;
        --accent-coffee-light: #8B6914;
        --accent-coffee-dark: #4a3609;
        --accent-blue: #399ee6;
        --accent-green: #86b300;
        --accent-purple: #a37acc;
        --border-color: #e7e8e9;
        --divider-color: #d9d9d9;
    }
}

/* Base Typography */
html {
    font-size: var(--font-size-base);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    color: var(--text-primary);
    background-color: var(--bg-primary);
    min-height: 100vh;
}

/* Headings - Hierarchical styling */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Roboto', sans-serif;
    line-height: var(--line-height-heading);
    font-weight: 500;
}

/* h1 - Most prominent, special font */
h1 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-coffee-dark);
}

/* h2 - High contrast */
h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--accent-coffee);
}

/* h3 - Medium-high contrast */
h3 {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--accent-coffee);
    padding-left: 0.25rem;
}

/* h4 - Medium contrast */
h4 {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--accent-coffee-light);
    padding-left: 0.5rem;
}

/* h5 - Lower contrast */
h5 {
    font-size: 1rem;
    font-weight: 500;
    color: var(--accent-coffee-light);
    padding-left: 0.75rem;
}

/* h6 - Lowest contrast */
h6 {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--accent-coffee-light);
    padding-left: 1rem;
}

/* Links */
a {
    color: var(--accent-blue);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Lists */
ul,
ol {
    list-style-position: inside;
}

li {
    line-height: 1.3;
}

/* Print Styles - Critical for PDF export and ATS compatibility */
@media print {
    :root {
        /* Force high-contrast colors for ATS readability */
        --bg-primary: #ffffff;
        --bg-secondary: #ffffff;
        --text-primary: #000000;
        --text-secondary: #333333;
        --text-heading: #000000;
        --accent-coffee: #333333;
        --accent-coffee-light: #555555;
        --accent-coffee-dark: #000000;
        --accent-blue: #000000;
        --accent-green: #333333;
        --accent-purple: #333333;
        --border-color: #cccccc;
        --divider-color: #666666;
    }

    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    html {
        font-size: 11pt;
        /* Standard print size */
    }

    body {
        background: white !important;
        margin: 0;
        padding: 0;
        font-size: 11pt;
        line-height: 1.4;
    }

    /* Remove decorative elements that confuse ATS */
    * {
        box-shadow: none !important;
        text-shadow: none !important;
    }

    /* Ensure links are visible and parseable */
    a {
        color: #000000 !important;
        text-decoration: underline;
    }

    /* Page breaks - prevent orphaned headers */
    h1,
    h2,
    h3,
    h4,
    h5,
    h6 {
        page-break-after: avoid;
        break-after: avoid;
        color: #000000 !important;
    }

    section {
        page-break-inside: avoid;
        break-inside: avoid;
    }

    /* Ensure lists are readable by ATS */
    ul,
    ol {
        list-style-position: outside;
        margin-left: 1.5em;
    }

    li {
        page-break-inside: avoid;
    }
}