/* VHP Theme - Vibe-coded Dark Mode */

:root {
    --bg-body: #0f172a;
    --bg-sidebar: #1e293b;
    --bg-card: #1e293b;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent: #38bdf8;
    --accent-hover: #0ea5e9;
    --border: #334155;
    --code-bg: #020617;
    --code-text: #e2e8f0;
    
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: 'JetBrains Mono', "Fira Code", Consolas, Monaco, "Courier New", monospace;
    
    --sidebar-width: 280px;
    --header-height: 60px;
    --container-width: 900px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

a:hover {
    color: var(--accent-hover);
}

/* Layout */
.layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 2rem;
    border-bottom: 1px solid var(--border);
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-text {
    background: linear-gradient(135deg, var(--accent), #818cf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sidebar-nav {
    flex: 1;
    padding: 1.5rem 0;
}

.sidebar-nav ul {
    list-style: none;
}

.sidebar-nav li a {
    display: block;
    padding: 0.75rem 2rem;
    color: var(--text-secondary);
    font-weight: 500;
    border-left: 3px solid transparent;
}

.sidebar-nav li a:hover,
.sidebar-nav li a.active {
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.05);
    border-left-color: var(--accent);
}

.sidebar-footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--border);
}

.github-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.github-link:hover {
    color: var(--text-primary);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 3rem;
    min-width: 0; /* Prevent overflow */
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
}

/* Mobile Header */
.mobile-header {
    display: none;
    height: var(--header-height);
    background-color: var(--bg-sidebar);
    border-bottom: 1px solid var(--border);
    padding: 0 1.5rem;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 90;
}

#menu-toggle {
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
}

/* Typography & Markdown Content */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

h1 {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-top: 0;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

h2 {
    font-size: 1.75rem;
    font-weight: 700;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.5rem;
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
}

p {
    margin-bottom: 1.25rem;
    color: var(--text-secondary);
    font-size: 1.05rem;
}

ul, ol {
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
    color: var(--text-secondary);
}

li {
    margin-bottom: 0.5rem;
}

code {
    font-family: var(--font-mono);
    background-color: rgba(56, 189, 248, 0.1);
    color: var(--accent);
    padding: 0.2em 0.4em;
    border-radius: 4px;
    font-size: 0.9em;
}

pre {
    background-color: var(--code-bg);
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border);
}

pre code {
    background-color: transparent;
    color: var(--code-text);
    padding: 0;
    font-size: 0.9rem;
}

blockquote {
    border-left: 4px solid var(--accent);
    padding-left: 1rem;
    margin-left: 0;
    margin-bottom: 1.5rem;
    color: var(--text-muted);
    font-style: italic;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
}

th, td {
    padding: 0.75rem;
    border: 1px solid var(--border);
    text-align: left;
}

th {
    background-color: rgba(255, 255, 255, 0.05);
    font-weight: 600;
    color: var(--text-primary);
}

img {
    max-width: 100%;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

hr {
    border: 0;
    border-top: 1px solid var(--border);
    margin: 2rem 0;
}

/* Footer */
.site-footer {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        padding: 2rem 1.5rem;
        padding-top: calc(var(--header-height) + 2rem);
    }
    
    .mobile-header {
        display: flex;
    }
}

/* Syntax Highlighting (Rouge/Pygments) */
.highlight {
    color: var(--code-text);
}

.highlight .c, .highlight .cm, .highlight .cp, .highlight .c1, .highlight .cs {
    color: #64748b; /* Comment */
    font-style: italic;
}

.highlight .k, .highlight .kc, .highlight .kd, .highlight .kp, .highlight .kr, .highlight .kt {
    color: #c084fc; /* Keyword - Purple */
    font-weight: bold;
}

.highlight .n, .highlight .na, .highlight .nb, .highlight .bp {
    color: #f1f5f9; /* Name */
}

.highlight .nf, .highlight .fm {
    color: #38bdf8; /* Function - Blue */
}

.highlight .nv, .highlight .vc, .highlight .vg, .highlight .vi {
    color: #f472b6; /* Variable - Pink */
}

.highlight .s, .highlight .sa, .highlight .sb, .highlight .sc, .highlight .dl, .highlight .sd, .highlight .s2, .highlight .se, .highlight .sh, .highlight .si, .highlight .sx, .highlight .sr, .highlight .s1, .highlight .ss {
    color: #4ade80; /* String - Green */
}

.highlight .m, .highlight .mb, .highlight .mf, .highlight .mh, .highlight .mi, .highlight .il, .highlight .mo {
    color: #fbbf24; /* Number - Amber */
}

.highlight .o, .highlight .ow {
    color: #94a3b8; /* Operator */
}

.highlight .nt {
    color: #f472b6; /* Tag Name */
}

.highlight .na {
    color: #c084fc; /* Attribute */
}
