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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e9f0 100%);
    min-height: 100vh;
    padding: 20px 16px;
    color: #2c3e50;
}

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

header {
    margin-bottom: 30px;
}

header a,
footer a {
    color: #4f46e5;
    text-decoration: underline;
    text-underline-offset: 2px;
}

h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 6px;
    letter-spacing: -0.5px;
}

.subtitle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.subtitle {
    color: #64748b;
    font-size: 0.95rem;
}

.search-button {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    background: white;
    color: #475569;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.search-button:hover {
    background: #f8fafc;
    color: #3b82f6;
    border-color: #3b82f6;
}

.search-button:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

.category-section {
    margin-bottom: 32px;
}

h2 {
    font-size: 1.1rem;
    color: #334155;
    margin-bottom: 12px;
    padding-left: 8px;
    border-left: 3px solid #3b82f6;
    font-weight: 600;
}

.projects-list {
    list-style: none;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.project-item {
    border-bottom: 1px solid #e2e8f0;
}

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

.project-item a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    text-decoration: none;
    color: #1e293b;
    transition: background-color 0.2s ease;
    gap: 16px;
}

.project-item a:hover {
    background-color: #f8fafc;
}

.project-info {
    flex: 1;
    min-width: 0;
}

.project-title {
    font-weight: 600;
    font-size: 1rem;
    color: #1e293b;
    margin-bottom: 4px;
}

.project-item a:hover .project-title {
    color: #3b82f6;
}

.project-description {
    font-size: 0.75rem;
    color: #64748b;
    line-height: 1.4;
}

.project-path {
    font-size: 0.8rem;
    color: #94a3b8;
    font-family: "SF Mono", Monaco, Consolas, monospace;
    flex-shrink: 0;
}

@media (max-width: 600px) {
    h1 { font-size: 1.5rem; }
    .project-path { display: none; }
}

.filter-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 600px;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.filter-container.active {
    opacity: 1;
    pointer-events: auto;
}

.filter-input {
    width: 100%;
    padding: 12px 16px;
    font-size: 1rem;
    border: 2px solid #3b82f6;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    outline: none;
    font-family: inherit;
}

.filter-hint {
    margin-top: 8px;
    font-size: 0.75rem;
    color: #64748b;
    text-align: center;
    background: white;
    padding: 8px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.project-item.focused a {
    background-color: #eff6ff;
    box-shadow: inset 3px 0 0 #3b82f6;
}

.project-item.focused .project-title {
    color: #3b82f6;
}

.project-item.hidden {
    display: none;
}

.category-section.hidden {
    display: none;
}

footer {
    text-align: center;
    margin-top: 50px;
    padding: 20px;
    color: #64748b;
    font-size: 0.85rem;
}

footer p {
    margin: 0;
}

@media (prefers-color-scheme: dark) {
    body {
        background: #0f1117;
        color: #e8e9f0;
    }

    header a,
    footer a {
        color: #6c63ff;
    }

    h1 {
        color: #e8e9f0;
    }

    .subtitle {
        color: #8b8fa8;
    }

    h2 {
        color: #e8e9f0;
        border-left-color: #6c63ff;
    }

    .projects-list {
        background: #1a1d27;
        border: 1px solid #2e3248;
        box-shadow: 0 1px 3px #0006;
    }

    .project-item {
        border-bottom-color: #2e3248;
    }

    .project-item a {
        color: #e8e9f0;
    }

    .project-item a:hover {
        background-color: #242736;
    }

    .project-title {
        color: #e8e9f0;
    }

    .project-item a:hover .project-title {
        color: #6c63ff;
    }

    .project-description {
        color: #8b8fa8;
    }

    .project-path {
        color: #8b8fa8;
    }

    .filter-input {
        background: #1a1d27;
        color: #e8e9f0;
        border-color: #6c63ff;
        box-shadow: 0 8px 24px #0009;
    }

    .filter-hint {
        background: #1a1d27;
        color: #8b8fa8;
        border: 1px solid #2e3248;
        box-shadow: 0 4px 12px #0006;
    }

    .project-item.focused a {
        background-color: #6c63ff33;
        box-shadow: inset 3px 0 0 #6c63ff;
    }

    .project-item.focused .project-title {
        color: #6c63ff;
    }

    footer {
        color: #8b8fa8;
    }

    .search-button {
        background: #1a1d27;
        color: #8b8fa8;
        border-color: #2e3248;
    }

    .search-button:hover {
        background: #242736;
        color: #6c63ff;
        border-color: #6c63ff;
    }

    .search-button:focus-visible {
        outline-color: #6c63ff;
    }
}
