:root {
    --bg-color: #fdfbf7;
    --text-color: #4a4238;
    --sidebar-bg: #f5f0e6;
    --sidebar-border: #e6dec8;
    --accent-color: #8c7b6c;
    --link-color: #a67c52;
    --link-hover: #8c6239;
    --code-bg: #f0ebe0;
    --border-color: #e6dec8;
    --active-bg: #e6dec8;
}

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

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

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

/* Sidebar */
.sidebar {
    width: 280px;
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--sidebar-border);
    padding: 2rem;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    flex-shrink: 0;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--sidebar-border) transparent;
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background-color: var(--sidebar-border);
    border-radius: 3px;
}

.logo {
    margin-bottom: 2rem;
    font-weight: 700;
    font-size: 1.5rem;
}

.logo a {
    color: var(--text-color);
    text-decoration: none;
}

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

.sidebar nav li {
    margin-bottom: 0.5rem;
}

.sidebar nav a {
    display: block;
    padding: 0.5rem 0.75rem;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 6px;
    transition: background-color 0.2s;
    font-weight: 500;
}

.sidebar nav a:hover {
    background-color: rgba(0, 0, 0, 0.03);
}

.sidebar nav a.active {
    background-color: var(--active-bg);
    color: #2c241b;
    font-weight: 600;
}

/* Content */
.content {
    flex: 1;
    padding: 3rem 4rem;
    max-width: 100%;
}

.container {
    max-width: 800px;
    margin: 0 auto;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    color: #2c241b;
    margin-top: 2rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

h1 {
    font-size: 2.5rem;
    margin-top: 0;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}

h2 {
    font-size: 1.8rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

h3 {
    font-size: 1.4rem;
}

p {
    margin-bottom: 1.2rem;
}

a {
    color: var(--link-color);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}

a:hover {
    color: var(--link-hover);
    border-bottom-color: var(--link-hover);
}

/* Code */
code {
    font-family: 'JetBrains Mono', monospace;
    background-color: var(--code-bg);
    padding: 0.2em 0.4em;
    border-radius: 4px;
    font-size: 0.9em;
}

pre {
    background-color: #2c241b;
    color: #fdfbf7;
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 1.5rem;
}

pre code {
    background-color: transparent;
    padding: 0;
    color: inherit;
}

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

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

th {
    background-color: var(--sidebar-bg);
    font-weight: 600;
}

/* Footer */
footer {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: #8c7b6c;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .layout {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        border-right: none;
        border-bottom: 1px solid var(--sidebar-border);
    }

    .content {
        padding: 2rem;
    }
}