/* Root CSS variables for light mode (default) */
:root {
    --bg-color: #ffffff;
    --text-color: #333333;
    --header-bg: #f8f9fa;
    --header-border: #e9ecef;
    --link-color: #0366d6;
    --link-hover: #0256b9;
    --code-bg: #f6f8fa;
    --code-border: #e1e4e8;
    --footer-bg: #f8f9fa;
    --footer-text: #586069;
    --shadow: rgba(0, 0, 0, 0.1);
}

/* Dark mode variables - automatically applied based on system preference */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #0d1117;
        --text-color: #c9d1d9;
        --header-bg: #161b22;
        --header-border: #30363d;
        --link-color: #58a6ff;
        --link-hover: #79c0ff;
        --code-bg: #161b22;
        --code-border: #30363d;
        --footer-bg: #161b22;
        --footer-text: #8b949e;
        --shadow: rgba(0, 0, 0, 0.3);
    }
}

/* Base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    line-height: 1.6;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header styles */
header {
    background-color: var(--header-bg);
    border-bottom: 1px solid var(--header-border);
    padding: 2rem 0;
    margin-bottom: 2rem;
    box-shadow: 0 2px 4px var(--shadow);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

header p {
    font-size: 1.1rem;
    color: var(--footer-text);
}

/* Main content */
main {
    min-height: 60vh;
    padding: 2rem 0;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
    line-height: 1.25;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.875rem; }

p {
    margin-bottom: 1rem;
}

/* Links */
a {
    color: var(--link-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--link-hover);
    text-decoration: underline;
}

/* Code blocks */
code {
    background-color: var(--code-bg);
    border: 1px solid var(--code-border);
    border-radius: 3px;
    padding: 0.2em 0.4em;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 85%;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

pre {
    background-color: var(--code-bg);
    border: 1px solid var(--code-border);
    border-radius: 6px;
    padding: 1rem;
    overflow-x: auto;
    margin-bottom: 1rem;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

pre code {
    background: none;
    border: none;
    padding: 0;
}

/* Lists */
ul, ol {
    margin-bottom: 1rem;
    padding-left: 2rem;
}

li {
    margin-bottom: 0.5rem;
}

/* Footer */
footer {
    background-color: var(--footer-bg);
    border-top: 1px solid var(--header-border);
    margin-top: 3rem;
    padding: 2rem 0;
    text-align: center;
    color: var(--footer-text);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

footer p {
    margin-bottom: 0.5rem;
}

footer a {
    color: var(--link-color);
    margin: 0 0.5rem;
}

/* Responsive design */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }
    
    header p {
        font-size: 1rem;
    }
    
    .container {
        padding: 0 15px;
    }
}

/* Additional utility classes */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
