:root {
    --bg-primary: #0a0e14;
    --bg-secondary: #151a23;
    --bg-card: #1a1f2e;
    --accent-primary: #00ff88;
    --accent-secondary: #00d4ff;
    --text-primary: #e6e8eb;
    --text-secondary: #9499a3;
    --border: #2a3142;
    --shadow: rgba(0, 255, 136, 0.1);
    --grid-color: rgba(0, 255, 136, 0.03);
}

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

body {
    font-family: 'JetBrains Mono', monospace;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Animated Grid Background */
.grid-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(var(--grid-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridScroll 20s linear infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes gridScroll {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(50px, 50px);
    }
}

/* Navbar */
.navbar {
    position: sticky;
    top: 0;
    background: rgba(10, 14, 20, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid var(--border);
    z-index: 100;
    animation: slideDown 0.5s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Syne', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.logo-bracket {
    color: var(--accent-primary);
    font-size: 1.8rem;
}

.logo-text {
    color: var(--text-primary);
    letter-spacing: 0.05em;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--accent-primary);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover {
    color: var(--accent-primary);
}

.nav-link:hover::before {
    width: 80%;
}

.nav-link.active {
    color: var(--accent-primary);
    background: rgba(0, 255, 136, 0.1);
}

/* Main Content */
.content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 4rem 2rem;
    position: relative;
    z-index: 1;
}

/* Tab Content */
.tab-content {
    display: none;
    animation: fadeIn 0.5s ease-out;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hero Section */
.hero {
    text-align: center;
    margin-bottom: 6rem;
}

.hero-title {
    font-family: 'Syne', sans-serif;
    font-size: 5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.title-line {
    display: block;
    animation: slideInLeft 0.8s ease-out backwards;
}

.title-line:nth-child(1) {
    animation-delay: 0.1s;
}

.title-line:nth-child(2) {
    animation-delay: 0.3s;
}

.title-line:nth-child(3) {
    animation-delay: 0.5s;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.title-line.accent {
    color: var(--accent-primary);
    text-shadow: 0 0 30px var(--shadow);
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    animation: fadeIn 0.8s ease-out 0.7s backwards;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    animation: fadeIn 0.8s ease-out 0.9s backwards;
}

/* Buttons */
.btn {
    padding: 1rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    border: none;
    font-family: 'JetBrains Mono', monospace;
}

.btn-primary {
    background: var(--accent-primary);
    color: var(--bg-primary);
    box-shadow: 0 4px 20px rgba(0, 255, 136, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(0, 255, 136, 0.5);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--border);
}

.btn-secondary:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--accent-primary);
    border: 2px solid var(--accent-primary);
    font-size: 0.85rem;
    padding: 0.75rem 1.5rem;
}

.btn-outline:hover {
    background: var(--accent-primary);
    color: var(--bg-primary);
    transform: translateY(-2px);
}

.btn-download {
    background: var(--accent-primary);
    color: var(--bg-primary);
    font-size: 0.85rem;
    padding: 0.75rem 1.5rem;
}

.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 255, 136, 0.4);
}

/* Featured Project */
.featured-project {
    display: flex;
    justify-content: center;
    margin-bottom: 4rem;
}

.project-card {
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 16px;
    padding: 2.5rem;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.05), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.project-card:hover::before {
    opacity: 1;
}

.project-card.featured {
    max-width: 700px;
    width: 100%;
    border-color: var(--accent-primary);
    box-shadow: 0 8px 40px rgba(0, 255, 136, 0.15);
}

.project-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent-primary);
    box-shadow: 0 12px 50px rgba(0, 255, 136, 0.25);
}

.project-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.project-icon {
    width: 60px;
    height: 60px;
    background: rgba(0, 255, 136, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-primary);
}

.project-header h3 {
    font-family: 'Syne', sans-serif;
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.version-badge {
    background: rgba(0, 255, 136, 0.15);
    color: var(--accent-primary);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
}

.project-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.project-features {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.feature-tag {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    padding: 0.4rem 0.9rem;
    border-radius: 6px;
    font-size: 0.8rem;
    border: 1px solid var(--border);
}

.project-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Section Header */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-family: 'Syne', sans-serif;
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Projects Tree List */
.projects-tree {
    max-width: 900px;
    margin: 0 auto;
}

.tree-item {
    background: var(--bg-card);
    border-left: 3px solid var(--accent-primary);
    margin-bottom: 1rem;
    padding: 1.5rem 2rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
}

.tree-item:hover {
    background: rgba(26, 31, 46, 0.8);
    border-left-color: var(--accent-secondary);
    transform: translateX(5px);
}

.tree-item::before {
    content: '├──';
    position: absolute;
    left: -2rem;
    color: var(--accent-primary);
    font-family: monospace;
    font-size: 1.2rem;
}

.tree-item:last-child::before {
    content: '└──';
}

.tree-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.tree-name {
    font-family: 'Syne', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.tree-icon {
    color: var(--accent-primary);
    font-size: 1.2rem;
}

.tree-version {
    background: rgba(0, 255, 136, 0.15);
    color: var(--accent-primary);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.tree-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.tree-meta {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.tree-features {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tree-tag {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    padding: 0.3rem 0.7rem;
    border-radius: 4px;
    font-size: 0.75rem;
    border: 1px solid var(--border);
}

.tree-expand {
    background: transparent;
    color: var(--accent-primary);
    border: 1px solid var(--accent-primary);
    padding: 0.5rem 1.2rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'JetBrains Mono', monospace;
}

.tree-expand:hover {
    background: var(--accent-primary);
    color: var(--bg-primary);
}

.tree-code {
    margin-top: 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    max-height: 500px;
    overflow-y: auto;
    display: none;
    animation: slideDown 0.3s ease-out;
}

.tree-code.active {
    display: block;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
        padding: 0 1.5rem;
    }
    to {
        opacity: 1;
        max-height: 500px;
        padding: 1.5rem;
    }
}

.tree-code pre {
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.6;
}

.loading {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

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

/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 3rem;
    }

    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .hero-cta {
        flex-direction: column;
    }

    .project-actions {
        flex-direction: column;
    }
}

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

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

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

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