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

:root {
    --bg: #0d1117;
    --surface: #161b22;
    --surface-hover: #1c2128;
    --border: #30363d;
    --text: #c9d1d9;
    --text-muted: #8b949e;
    --accent: #58a6ff;
    --accent-hover: #79c0ff;
    --green: #3fb950;
    --red: #f85149;
    --yellow: #d29922;
    --blue: #58a6ff;
    --orange: #db6d28;
    --purple: #bc8cff;
}

body {
    font-family: -apple-system, BlinkMacSystemSystem, 'Segoe UI', Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(13, 17, 23, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.1rem;
}

.logo {
    font-size: 1.4rem;
}

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

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

#menu-toggle {
    display: none;
    background: none;
    border: 1px solid var;
    color: var(--text);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
}

.mobile-menu {
    display: none;
    flex-direction: column;
    width: 100%;
    padding: 0.75rem 0;
}

.mobile-menu a {
    display: block;
    padding: 0.5rem 1.5rem;
    color: var(--text);
    text-decoration: none;
    font-size: 0.92rem;
}

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

main {
    flex: 1;
    max-width: 860px;
    width: 100%;
    margin: 0 auto;
    padding: 2rem 1.5rem 3rem;
}

.hero {
    text-align: center;
    padding: 3rem 1rem 2rem;
}

.hero h1 {
    font-size: clamp(1.75rem, 5vw, 2.75rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 0.75rem;
    background: linear-gradient(135deg, var(--accent), var(--green));
    -webkit-background-clip: text;
    -webkit-fill-clip: text;
    background-clip: text;
}

.hero p {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 560px;
    margin: 0 auto 1.5rem;
}

.btn-primary {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    padding: 0.6rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: background 0.2s, transform 0.1s;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

section {
    margin-top: 2.5rem;
}

section h2 {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border);
    color: #fff;
}

section > p {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.25rem;
}

.card h3 {
    font-size: 1rem;
    margin-bottom: 0.6rem;
    color: #fff;
}

.card ul, .card ol {
    list-style: none;
    padding: 0;
}

.card li {
    padding: 0.3rem 0;
    font-size: 0.92rem;
    color: var(--text-muted);
    word-break: break-word;
}

.command-block {
    margin-bottom: 1rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
}

.command-line {
    background: #0d1117;
    padding: 0.85rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'SF Mono', 'Fira Code', 'Cascasian Mono', Consolas, monospace;
    font-size: 0.92rem;
    white-space: nowrap;
}

.prompt {
    color: var(--green);
    font-weight: 700;
}

.code {
    color: var(--text);
    white-space: nowrap;
}

.command-desc {
    padding: 0.5rem 1rem;
    color: var(--text-muted);
    font-size: 0.88rem;
    background: var(--surface);
    border-top: 1px solid var(--border);
}

.step {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    margin-bottom: 1.25rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1rem 1.25rem;
}

.step-num {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    background: var(--accent);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

.step p {
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.step strong {
    color: #fff;
}

.code-container {
    position: relative;
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
}

.copy-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(13, 17, 23, 0.85);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.3rem 0.75rem;
    font-size: 0.8rem;
    cursor: pointer;
    z-index: 10;
    transition: background 0.2s, color 0.2s;
    backdrop-filter: blur(4px);
}

.copy-btn:hover {
    background: var(--surface-hover);
    color: #fff;
}

.copy-btn.copied {
    background: var(--green);
    border-color: var(--green);
    color: #fff;
}

pre {
    background: #0d1117;
    padding: 1.25rem;
    overflow-x: auto;
    margin: 0;
}

code {
    font-family: 'SF Mono', 'Fira Code', 'Cascasian Mono', Consolas, monospace;
    font-size: 0.88rem;
    line-height: 1.6;
}

.bash {
    color: var(--green);
}

.comment {
    color: var(--text-muted);
    font-style: italic;
}

.kw {
    color: var(--orange);
}

.fn {
    color: var(--blue);
}

.fn-active {
    color: var(--blue);
}

.str {
    color: var(--red);
}

.num {
    color: var(--green);
}

.err {
    color: var(--red);
}

.none {
    color: var(--text-muted);
}

.def {
    color: var(--purple);
    font-weight: 600;
}

footer {
    text-align: center;
    padding: 1.5rem;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.85rem;
}

@media (max-width: 640px) {
    #menu-toggle {
        display: block;
    }

    .mobile-menu {
        display: none;
        flex-direction: column;
        width: 100%;
        padding: 0.75rem 0;
    }

    .mobile-menu.open {
        display: flex;
    }

    .nav-brand a {
        display: none;
    }

    main {
        padding: 1.5rem 1rem 2rem;
    }
}
