/*
 * Color Palette:
 * --purple: #8B5CF6 (primary accent)
 * --dark: #1A1A1A (almost black)
 * --charcoal: #2D2D2D (dark gray)
 * --tan: #C9A67C (camel hair)
 * --white: #FFFFFF
 * --light-gray: #F5F5F5
 */

:root {
    --purple: #8B5CF6;
    --purple-dark: #7C3AED;
    --purple-light: #A78BFA;
    --dark: #1A1A1A;
    --charcoal: #2D2D2D;
    --tan: #C9A67C;
    --tan-dark: #B89968;
    --white: #FFFFFF;
    --light-gray: #F5F5F5;
    --code-bg: #1E1E1E;
}

/* Reset and Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    background: #0a0a0a !important;
}

body {
    font-family: "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #1A1A1A !important;
    color: #FFFFFF !important;
    line-height: 1.65;
    font-size: 18px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}

/* Override theme.css defaults */
header, footer, .page {
    max-width: 1000px;
    margin: 0 auto;
    padding-left: 2rem;
    padding-right: 2rem;
}

/* Header */
header {
    background: rgba(26, 26, 26, 0.98);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(139, 92, 246, 0.2);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}

.header-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

header #logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    text-decoration: none;
}

header #logo img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid var(--purple);
}

.site-title {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin: 0;
    background: linear-gradient(135deg, var(--white) 0%, var(--purple-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

header nav {
    width: 100%;
}

nav .navigation {
    display: flex;
    gap: 2rem;
    justify-content: center;
}

nav a {
    color: #FFFFFF;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0.3px;
    transition: color 0.2s ease;
    position: relative;
}

nav a:hover {
    color: var(--purple-light);
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--purple);
    transition: width 0.3s ease;
}

nav a:hover::after {
    width: 100%;
}

/* Main Content */
main {
    min-height: calc(100vh - 200px);
    position: relative;
    z-index: 1;
}

.page {
    padding-top: 4rem;
    padding-bottom: 4rem;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--white);
    font-weight: 600;
    letter-spacing: -0.5px;
    line-height: 1.2;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

h1 {
    font-size: 3rem;
    margin-top: 0;
    background: linear-gradient(135deg, var(--white) 0%, var(--tan) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

h2 {
    font-size: 2rem;
    color: var(--tan);
    border-bottom: 2px solid rgba(139, 92, 246, 0.3);
    padding-bottom: 0.5rem;
}

h3 {
    font-size: 1.5rem;
    color: var(--purple-light);
}

h4 {
    font-size: 1.25rem;
    color: #FFFFFF;
}

p {
    margin-bottom: 1.5rem;
    color: #FFFFFF;
}

a {
    color: var(--purple-light);
    text-decoration: none;
    transition: color 0.2s ease;
}

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

/* Lists */
ul, ol {
    margin-left: 2rem;
    margin-bottom: 1.5rem;
}

li {
    margin-bottom: 0.5rem;
    color: #FFFFFF;
}

/* Code Blocks */
code {
    background: var(--code-bg);
    color: var(--purple-light);
    padding: 0.2em 0.5em;
    border-radius: 4px;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', 'Droid Sans Mono', monospace;
    font-size: 0.9em;
    border: 1px solid rgba(139, 92, 246, 0.2);
}

pre {
    background: var(--code-bg) !important;
    padding: 1.5rem !important;
    border-radius: 12px;
    overflow-x: auto;
    margin: 2rem 0;
    border: 1px solid rgba(139, 92, 246, 0.3);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
}

pre code {
    background: none !important;
    padding: 0 !important;
    border: none !important;
    color: #F8F8F2;
    font-size: 15px;
    line-height: 1.7;
}

/* Override Prism theme to match our dark style */
pre[class*="language-"],
code[class*="language-"] {
    background: var(--code-bg) !important;
    color: #F8F8F2 !important;
}

/* Syntax Highlighting (GitHub Dark inspired) */
pre code .keyword { color: #FF79C6; }
pre code .string { color: #F1FA8C; }
pre code .comment { color: #6272A4; font-style: italic; }
pre code .function { color: #50FA7B; }
pre code .number { color: #BD93F9; }
pre code .operator { color: #FF79C6; }
pre code .class-name { color: var(--tan); }
pre code .punctuation { color: #F8F8F2; }

/* Blockquotes */
blockquote {
    border-left: 4px solid var(--purple);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: var(--tan);
    background: rgba(139, 92, 246, 0.05);
    padding: 1rem 1rem 1rem 1.5rem;
    border-radius: 0 8px 8px 0;
}

/* Footer */
footer {
    border-top: 1px solid rgba(139, 92, 246, 0.2);
    padding: 3rem 2rem;
    text-align: center;
    color: #999;
    font-size: 14px;
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(20px);
}

footer a {
    color: var(--tan);
}

footer p {
    margin-bottom: 0.5rem;
    color: #999;
}

footer .small {
    font-size: 12px;
    color: #666;
}

/* Home Page */
#home {
    text-align: center;
    padding: 6rem 0;
}

#home h1 {
    font-size: 4rem;
    margin-bottom: 1rem;
    text-transform: none;
}

#home p {
    font-size: 1.3rem;
    color: var(--tan);
    margin-bottom: 3rem;
}

#home a {
    display: inline-block;
    padding: 0.8rem 2rem;
    background: var(--purple);
    color: var(--white);
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    margin: 0 0.5rem;
}

#home a:hover {
    background: var(--purple-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(139, 92, 246, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    #home h1 {
        font-size: 2.5rem;
    }

    nav .navigation {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }

    header, footer, .page {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    pre {
        padding: 1rem;
        font-size: 13px;
    }
}

/* Images */
img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
}

th, td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid rgba(139, 92, 246, 0.2);
}

th {
    background: var(--charcoal);
    color: var(--tan);
    font-weight: 600;
}

tr:hover {
    background: rgba(139, 92, 246, 0.05);
}

/* Horizontal Rule */
hr {
    border: none;
    border-top: 1px solid rgba(139, 92, 246, 0.3);
    margin: 3rem 0;
}

/* Selection */
::selection {
    background: var(--purple);
    color: var(--white);
}

::-moz-selection {
    background: var(--purple);
    color: var(--white);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--charcoal);
}

::-webkit-scrollbar-thumb {
    background: var(--purple);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--purple-dark);
}
