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

:root {
    --bg: #0d1117;
    --surface: #161b22;
    --border: #30363d;
    --accent: #58a6ff;
    --text: #c9d1d9;
    --text-muted: #8b949e;
    --green: #3fb950;
    --orange: #fb8500;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.7;
    color: var(--text);
    background: var(--bg);
    min-height: 100vh;
}

header {
    background: linear-gradient(90deg, var(--surface) 0%, rgba(88, 166, 255, 0.1) 100%);
    border-bottom: 1px solid var(--border);
    padding: 1.5rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--accent);
    letter-spacing: 0.5px;
    backdrop-filter: blur(5px);
}

aside {
    position: fixed;
    left: 0;
    top: 0;
    width: 260px;
    height: 100vh;
    background: var(--surface);
    border-right: 1px solid var(--border);
    padding-top: 5rem;
    overflow-y: auto;
}

aside nav ul {
    list-style: none;
}

aside nav li {
    border-bottom: 1px solid var(--border);
}

aside nav a {
    display: block;
    padding: 0.8rem 1.2rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
}

aside nav a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: var(--accent);
    transform: scaleY(0);
    transition: transform 0.2s ease;
}

aside nav a:hover {
    color: var(--accent);
    background: rgba(88, 166, 255, 0.1);
}

aside nav a:hover::before {
    transform: scaleY(1);
}

aside nav form {
    padding: 1rem 1.2rem;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

aside nav form .search-box {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

aside nav form input {
    flex: 1;
    padding: 0.7rem 0.8rem;
    background: rgba(88, 166, 255, 0.1);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text);
    font-size: 0.95rem;
    transition: all 0.2s ease;
    min-width: 1px;
}

aside nav form input::placeholder {
    color: var(--text-muted);
}

aside nav form input:focus {
    outline: none;
    background: rgba(88, 166, 255, 0.2);
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(88, 166, 255, 0.15);
}

aside nav form button {
    padding: 0.7rem 0.8rem;
    background: var(--accent);
    border: 1px solid var(--accent);
    border-radius: 4px;
    color: var(--bg);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0;
}

aside nav form button:hover {
    background: #79c0ff;
    border-color: #79c0ff;
    transform: scale(1.1);
}

aside nav form button:active {
    transform: scale(0.95);
}

main {
    margin-left: 260px;
    padding: 2rem;
}

article {
    background: var(--surface);
    padding: 3rem;
    border-radius: 6px;
    border: 1px solid var(--border);
    max-width: 900px;
    margin: 0 auto;
}

article h1 {
    color: var(--accent);
    font-size: 2.8rem;
    margin-bottom: 1rem;
    font-weight: 700;
    line-height: 1.2;
}

article h2 {
    color: var(--green);
    font-size: 2rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

article h3 {
    color: var(--orange);
    font-size: 1.4rem;
    margin-top: 1.5rem;
    margin-bottom: 0.8rem;
}

article p {
    margin-bottom: 1.2rem;
    color: var(--text);
    line-height: 1.8;
}

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

article a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

article a:hover {
    color: #79c0ff;
}

article a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

article ul,
article ol {
    margin-left: 2rem;
    margin-bottom: 1.2rem;
}

article li {
    margin-bottom: 0.8rem;
    color: var(--text);
}

article blockquote {
    border-left: 4px solid var(--accent);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    background: rgba(88, 166, 255, 0.05);
    color: var(--text-muted);
    font-style: italic;
    border-radius: 4px;
}

article code {
    background: rgba(88, 166, 255, 0.1);
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: var(--green);
    border: 1px solid rgba(88, 166, 255, 0.2);
}

article pre {
    background: rgba(0, 0, 0, 0.3);
    padding: 1.2rem;
    border-radius: 6px;
    overflow-x: auto;
    margin-bottom: 1.2rem;
    border: 1px solid var(--border);
}

article pre code {
    padding: 0;
    background: none;
    border: none;
    color: var(--text);
}

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

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

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

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

/* Responsive */
@media (max-width: 768px) {
    aside {
        width: 100%;
        height: auto;
        position: relative;
        padding-top: 0;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }

    aside nav ul {
        display: flex;
        flex-direction: row;
        justify-content: center;
    }

    aside nav li {
        border-bottom: none;
        border-right: 1px solid var(--border);
    }

    aside nav li:last-child {
        border-right: none;
    }

    aside nav a {
        padding: 0.8rem 1rem;
    }

    main {
        margin-left: 0;
        padding: 1rem;
    }

    article {
        padding: 1.5rem;
    }

    article h1 {
        font-size: 2rem;
    }

    header {
        font-size: 1.2rem;
    }
}
