/* GitHub Rising Stars - V2 Style (inspired by skills.sh) */
:root {
    --bg: #0a0a0a;
    --card-bg: #111111;
    --sidebar-bg: #0a0a0a;
    --text: #e5e5e5;
    --text-muted: #737373;
    --border: #262626;
    --accent: #22c55e;
    --accent-hover: #16a34a;
    --star: #eab308;
    --link: #3b82f6;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    font-size: 14px;
}

/* App Layout */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
}

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

.sidebar-header .logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
}

.sidebar-header .logo span {
    color: var(--accent);
}

.nav-section {
    padding: 16px;
}

.nav-section h3 {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 12px;
    padding-left: 12px;
}

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

.nav-item { margin-bottom: 2px; }

.nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 6px;
    font-size: 13px;
    transition: all 0.15s;
}

.nav-link:hover {
    background: var(--border);
    color: var(--text);
}

.nav-link.active {
    background: var(--accent);
    color: #000;
}

.nav-link .count {
    background: rgba(255,255,255,0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
}

.nav-link.active .count {
    background: rgba(0,0,0,0.2);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 40px;
    max-width: 1400px;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

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

.breadcrumb a:hover { color: var(--text); }

/* Page Header */
.page-header {
    margin-bottom: 32px;
}

.page-header h1 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 8px;
}

.page-header .subtitle {
    color: var(--text-muted);
    font-size: 15px;
}

/* Content Grid - Two Column */
.content-grid {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 40px;
}

/* Left Column - Main Content */
.main-column {}

/* Right Column - Meta Sidebar */
.meta-column {
    position: sticky;
    top: 40px;
    height: fit-content;
}

.meta-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.meta-item {
    margin-bottom: 20px;
}

.meta-item:last-child { margin-bottom: 0; }

.meta-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.meta-value {
    font-size: 24px;
    font-weight: 600;
}

.meta-value.small {
    font-size: 14px;
    font-weight: 400;
}

.meta-value a {
    color: var(--link);
    text-decoration: none;
}

.meta-value a:hover { text-decoration: underline; }

.meta-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.meta-tag {
    background: var(--border);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.badge-success {
    background: rgba(34, 197, 94, 0.15);
    color: var(--accent);
}

/* TOC - Quick Index */
.toc {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 32px;
}

.toc h2 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.toc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
}

.toc-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text);
    transition: all 0.15s;
}

.toc-item:hover {
    border-color: var(--accent);
    transform: translateY(-1px);
}

.toc-rank {
    font-size: 18px;
    min-width: 30px;
}

.toc-info { flex: 1; }

.toc-info h3 {
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 2px;
}

.toc-info .stars {
    font-size: 12px;
    color: var(--star);
}

.toc-info .index {
    font-size: 11px;
    color: var(--accent);
    margin-left: 8px;
}

/* Project Section */
.project-section {
    margin-bottom: 48px;
    scroll-margin-top: 20px;
}

.project-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.project-title h2 {
    font-size: 22px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.project-title h2 .emoji { font-size: 24px; }

.project-title .repo {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}

.project-title .repo a {
    color: var(--link);
    text-decoration: none;
}

.project-stats {
    display: flex;
    gap: 16px;
    font-size: 13px;
}

.project-stats .stat {
    display: flex;
    align-items: center;
    gap: 4px;
}

.project-stats .stat.stars { color: var(--star); font-weight: 600; }

/* Demo Media */
.demo-media {
    margin-bottom: 24px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.demo-media img,
.demo-media video {
    width: 100%;
    display: block;
}

.demo-media .caption {
    padding: 10px 14px;
    background: var(--card-bg);
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Content Sections */
.content-section {
    margin-bottom: 24px;
}

.content-section h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--accent);
}

.content-section p {
    margin-bottom: 12px;
    color: var(--text);
    line-height: 1.7;
}

.content-section ul {
    margin: 12px 0;
    padding-left: 20px;
}

.content-section li {
    margin-bottom: 8px;
    color: var(--text);
}

.content-section li strong {
    color: var(--text);
}

.content-section code {
    background: var(--border);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'JetBrains Mono', 'SF Mono', monospace;
    font-size: 12px;
}

.content-section pre {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
    overflow-x: auto;
    margin: 12px 0;
}

.content-section pre code {
    background: none;
    padding: 0;
    font-size: 13px;
    line-height: 1.5;
}

/* Highlight Box */
.highlight-box {
    background: rgba(34, 197, 94, 0.08);
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: 8px;
    padding: 16px;
    margin: 16px 0;
}

.highlight-box h4 {
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 8px;
}

.highlight-box p {
    margin: 0;
    font-size: 13px;
}

/* Tech Stack */
.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0;
}

.tech-tag {
    background: var(--border);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
}

/* Project Links */
.project-links {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.15s;
}

.btn-primary {
    background: var(--accent);
    color: #000;
}

.btn-primary:hover { background: var(--accent-hover); }

.btn-secondary {
    background: var(--border);
    color: var(--text);
}

.btn-secondary:hover { background: #333; }

/* Footer */
footer {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
    font-size: 13px;
    border-top: 1px solid var(--border);
    margin-top: 60px;
}

/* Mobile */
@media (max-width: 1100px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    .meta-column {
        position: static;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 16px;
    }
    
    .meta-card { margin-bottom: 0; }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
    }
    
    .sidebar.open { transform: translateX(0); }
    
    .main-content {
        margin-left: 0;
        padding: 20px;
    }
    
    .menu-toggle {
        display: flex;
        position: fixed;
        top: 10px;
        left: 10px;
        z-index: 200;
        background: var(--card-bg);
        border: 1px solid var(--border);
        padding: 8px 12px;
        border-radius: 6px;
        color: var(--text);
        cursor: pointer;
        align-items: center;
        gap: 6px;
        font-size: 13px;
    }
    
    .toc-grid { grid-template-columns: 1fr; }
}

@media (min-width: 769px) {
    .menu-toggle { display: none; }
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #444; }
