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

:root {
    --bg: #0d1117;
    --card-bg: #161b22;
    --text: #c9d1d9;
    --text-dim: #8b949e;
    --accent: #58a6ff;
    --border: #30363d;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    padding: 4rem 2rem;
}

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

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

.title {
    font-size: 2rem;
    font-weight: 600;
    color: var(--text);
}

.github-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

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

.projects-tree {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.project-group {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.2s;
}

.project-group:hover {
    border-color: #3d444d;
}

.project-header {
    padding: 1.5rem 1.75rem;
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: background 0.2s;
}

.project-header:hover {
    background: rgba(177, 186, 196, 0.03);
}

.expand-icon {
    font-size: 0.75rem;
    color: var(--text-dim);
    transition: transform 0.2s;
    width: 16px;
    text-align: center;
}

.project-group.expanded .expand-icon {
    transform: rotate(90deg);
}

.project-info {
    flex: 1;
}

.project-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.375rem;
}

.project-desc {
    font-size: 0.875rem;
    color: var(--text-dim);
    line-height: 1.5;
}

.repo-count {
    font-size: 0.8125rem;
    color: var(--text-dim);
    background: rgba(177, 186, 196, 0.1);
    padding: 0.375rem 0.875rem;
    border-radius: 20px;
    white-space: nowrap;
}

.repos {
    display: none;
    border-top: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.15);
}

.project-group.expanded .repos {
    display: block;
}

.repo-item {
    padding: 1.125rem 1.75rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    border-bottom: 1px solid rgba(48, 54, 61, 0.5);
    transition: background 0.15s;
}

.repo-item:last-child {
    border-bottom: none;
}

.repo-item:hover {
    background: rgba(177, 186, 196, 0.03);
}

.repo-details {
    flex: 1;
    min-width: 0;
}

.repo-name {
    color: var(--accent);
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.repo-name:hover {
    text-decoration: underline;
}

.repo-name svg {
    flex-shrink: 0;
}

.repo-description {
    font-size: 0.8125rem;
    color: var(--text-dim);
    margin-top: 0.375rem;
    line-height: 1.5;
}

.repo-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.tech-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: var(--text-dim);
    padding: 0.25rem 0.75rem;
    background: rgba(177, 186, 196, 0.08);
    border-radius: 6px;
}

.tech-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.tech-swift {
    background: #f05138;
}

.tech-kotlin {
    background: #7f52ff;
}

.tech-javascript {
    background: #f7df1e;
}

.tech-typescript {
    background: #3178c6;
}

.tech-html {
    background: #e34c26;
}

.tech-htmlcssjs {
    background: #58a6ff;
}

.privacy-badge {
    font-size: 0.6875rem;
    padding: 0.25rem 0.625rem;
    border-radius: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.badge-private {
    background: rgba(137, 87, 229, 0.15);
    color: #a371f7;
    border: 1px solid rgba(137, 87, 229, 0.3);
}

.badge-public {
    background: rgba(63, 185, 80, 0.1);
    color: #3fb950;
    border: 1px solid rgba(63, 185, 80, 0.2);
}

.footer {
    margin-top: 4rem;
    padding: 2rem;
    text-align: center;
    display: flex;
    justify-content: center;
}

.footer-content {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    font-size: 0.875rem;
    color: var(--text-dim);
    text-align: center;
}

.footer-text {
    margin: 0;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.footer-link {
    color: var(--text-dim) !important;
    text-decoration: underline;
    transition: color 0.2s;
    -webkit-text-fill-color: var(--text-dim);
}

.footer-link:hover {
    color: var(--accent) !important;
    -webkit-text-fill-color: var(--accent);
}

.footer-link:visited {
    color: var(--text-dim) !important;
    -webkit-text-fill-color: var(--text-dim);
}

.footer-link:link {
    color: var(--text-dim) !important;
    -webkit-text-fill-color: var(--text-dim);
}

.footer-separator {
    color: var(--text-dim);
}

@media (max-width: 640px) {
    body {
        padding: 2rem 1rem;
    }

    .header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        margin-bottom: 3rem;
    }

    .title {
        font-size: 1.5rem;
    }

    .project-header {
        padding: 1.25rem;
    }

    .repo-item {
        padding: 1rem 1.25rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .repo-meta {
        width: 100%;
    }

    .footer-content {
        flex-wrap: wrap;
    }
}
