:root {
    /* Dark Mode (Default) - Dark Blue Theme */
    --bg-color: #0b1121;
    /* Darker Blue-Black */
    --card-bg: rgba(15, 23, 42, 0.7);
    /* Slate 900 with opacity */
    --card-border: rgba(59, 130, 246, 0.2);
    /* Blue border */
    --primary: #3b82f6;
    /* Blue 500 */
    --primary-hover: #2563eb;
    /* Blue 600 */
    --text-main: #f1f5f9;
    /* Slate 100 */
    --text-muted: #94a3b8;
    /* Slate 400 */
    --accent-gradient: linear-gradient(135deg, #3b82f6 0%, #0ea5e9 100%);
    /* Blue to Sky */
    --card-hover-shadow: 0 0 20px rgba(59, 130, 246, 0.2);
}

/* Light Theme overrides */
[data-theme="light"] {
    --bg-color: #f8fafc;
    --card-bg: rgba(255, 255, 255, 0.8);
    --card-border: rgba(226, 232, 240, 1);
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --accent-gradient: linear-gradient(135deg, #4f46e5 0%, #ec4899 100%);
    --card-hover-shadow: 0 10px 30px rgba(99, 102, 241, 0.15);
}

[data-theme="light"] .hero-background {
    background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, rgba(248, 250, 252, 0) 70%);
}

[data-theme="light"] #searchInput {
    background: rgba(255, 255, 255, 0.9);
    color: #0f172a;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .filter-btn {
    background: white;
    color: #64748b;
}

[data-theme="light"] .filter-btn:hover,
[data-theme="light"] .filter-btn.active {
    color: white;
}

[data-theme="light"] .skill-title {
    color: #0f172a;
}

[data-theme="light"] .badge {
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.2);
    color: #4f46e5;
}

[data-theme="light"] .modal-content {
    background: #ffffff;
}

[data-theme="light"] .modal-header h2 {
    color: #0f172a;
}

[data-theme="light"] .modal-desc {
    color: #334155;
}

[data-theme="light"] .code-block {
    background: #f1f5f9;
}

[data-theme="light"] .code-block code {
    color: #4f46e5;
}

[data-theme="light"] .tag {
    background: rgba(99, 102, 241, 0.1);
    color: #4338ca;
    /* Darker indigo for general tags */
    font-weight: 600;
}

[data-theme="light"] .tag.security {
    background: rgba(239, 68, 68, 0.1);
    color: #b91c1c;
}

[data-theme="light"] .tag.ai {
    background: rgba(16, 185, 129, 0.1);
    color: #047857;
}

[data-theme="light"] .tag.marketing {
    background: rgba(245, 158, 11, 0.1);
    color: #b45309;
}

[data-theme="light"] .tag.web {
    background: rgba(59, 130, 246, 0.1);
    color: #1d4ed8;
}

[data-theme="light"] .tag.game-dev {
    background: rgba(139, 92, 246, 0.1);
    color: #6d28d9;
}

[data-theme="light"] .tag.ops {
    background: rgba(107, 114, 128, 0.1);
    color: #374151;
}

/* Gray Theme overrides */
[data-theme="gray"] {
    --bg-color: #1a1a1a;
    --card-bg: #262626;
    --card-border: #404040;
    --primary: #a3a3a3;
    /* Neutral gray */
    --primary-hover: #d4d4d4;
    --text-main: #e5e5e5;
    --text-muted: #a3a3a3;
    --accent-gradient: linear-gradient(135deg, #e5e5e5 0%, #a3a3a3 100%);
    --card-hover-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

[data-theme="gray"] .badge {
    color: #e5e5e5;
    background: #333;
    border-color: #555;
    border-radius: 4px;
}

[data-theme="gray"] .hero-background {
    background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, rgba(26, 26, 26, 0) 70%);
}

[data-theme="gray"] .skill-title {
    color: #e5e5e5;
}

[data-theme="gray"] .gradient-text {
    background: none;
    -webkit-text-fill-color: #e5e5e5;
    color: #e5e5e5;
}

[data-theme="gray"] .skill-card {
    border-radius: 4px;
}

[data-theme="gray"] #searchInput,
[data-theme="gray"] .filter-btn,
[data-theme="gray"] .modal-content {
    border-radius: 4px;
}

[data-theme="gray"] .code-block {
    background: #111;
    border-color: #333;
}

[data-theme="gray"] .code-block code {
    color: #d4d4d4;
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

.app-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Hero Section */
.hero {
    padding: 80px 20px 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: -50%;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    height: 1000px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.15) 0%, rgba(3, 7, 18, 0) 70%);
    z-index: -1;
    pointer-events: none;
}

.badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.2);
    color: #c4b5fd;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 24px;
}

.gradient-text {
    font-size: 4rem;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.hero p {
    color: var(--text-muted);
    font-size: 1.25rem;
    max-width: 600px;
    margin: 0 auto 40px;
}

/* Search */
.search-container {
    position: relative;
    max-width: 600px;
    margin: 0 auto 32px;
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    width: 20px;
    height: 20px;
}

#searchInput {
    width: 100%;
    padding: 16px 16px 16px 48px;
    border-radius: 12px;
    border: 1px solid var(--card-border);
    background: rgba(31, 41, 55, 0.5);
    color: white;
    font-size: 1.125rem;
    font-family: inherit;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

#searchInput:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.1);
}

/* Quick Filters */
.quick-filters {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.filter-btn {
    background: rgba(31, 41, 55, 0.4);
    border: 1px solid var(--card-border);
    color: var(--text-muted);
    padding: 8px 16px;
    border-radius: 999px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.filter-btn:hover {
    background: rgba(31, 41, 55, 0.8);
    color: white;
}

.filter-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Stats */
.stats-bar {
    text-align: center;
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.875rem;
    margin-bottom: 40px;
}

.separator {
    margin: 0 8px;
}

/* Grid */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    padding-bottom: 80px;
}

.skill-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 24px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.skill-card:hover {
    transform: translateY(-4px);
    border-color: rgba(139, 92, 246, 0.4);
    box-shadow: var(--card-hover-shadow);
}

.skill-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.skill-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #fff;
    line-height: 1.3;
}

.skill-icon {
    color: var(--primary);
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    margin-left: 12px;
}

.skill-desc {
    color: var(--text-muted);
    font-size: 0.9375rem;
    margin-bottom: 20px;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.skill-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: auto;
}

.tag {
    font-size: 0.75rem;
    padding: 4px 8px;
    background: rgba(139, 92, 246, 0.1);
    color: #c4b5fd;
    border-radius: 6px;
    font-family: 'JetBrains Mono', monospace;
}

/* Tag colors based on type */
.tag.security {
    background: rgba(239, 68, 68, 0.1);
    color: #fca5a5;
}

.tag.ai {
    background: rgba(16, 185, 129, 0.1);
    color: #6ee7b7;
}

.tag.marketing {
    background: rgba(245, 158, 11, 0.1);
    color: #fcd34d;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 80px 0;
    color: var(--text-muted);
}

.empty-state i {
    color: rgba(255, 255, 255, 0.1);
    margin-bottom: 16px;
    width: 64px;
    height: 64px;
}

.hidden {
    display: none !important;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    animation: fadeIn 0.3s forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

.modal-content {
    background: #0f172a;
    border: 1px solid var(--card-border);
    border-radius: 24px;
    width: 100%;
    max-width: 600px;
    max-height: 85vh;
    padding: 32px;
    position: relative;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: scale(0.95);
    animation: zoomIn 0.3s 0.1s forwards cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 0;
}

@keyframes zoomIn {
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.close-btn {
    position: absolute;
    top: 24px;
    right: 24px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.2s;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.modal-badge {
    text-transform: uppercase;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--primary);
    margin-bottom: 8px;
}

.modal-header h2 {
    font-size: 2rem;
    margin-bottom: 16px;
    color: white;
}

.modal-desc {
    font-size: 1.1rem;
    color: #e5e7eb;
    margin-bottom: 32px;
}

.info-group {
    margin-bottom: 24px;
}

.info-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.code-block {
    background: #1e293b;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid var(--card-border);
}

.code-block code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9375rem;
    color: #a5b4fc;
    overflow-x: auto;
}

.copy-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s;
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

/* Footer */
footer {
    margin-top: auto;
    border-top: 1px solid var(--card-border);
    padding: 40px 0;
    text-align: center;
}

.footer-content {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.links {
    margin-top: 16px;
}

.links a {
    color: var(--text-muted);
    text-decoration: none;
    margin: 0 12px;
    transition: color 0.2s;
}

.links a:hover {
    color: var(--primary);
}

/* Mobile */
@media (max-width: 768px) {
    .gradient-text {
        font-size: 2.5rem;
    }

    .hero {
        padding: 40px 20px;
    }

    .top-controls {
        position: absolute;
        top: 20px;
        right: 20px;
    }
}

.top-controls {
    position: absolute;
    top: 30px;
    right: 30px;
    display: flex;
    gap: 12px;
    z-index: 10;
}

.control-btn {
    background: rgba(31, 41, 55, 0.4);
    border: 1px solid var(--card-border);
    color: var(--text-muted);
    height: 40px;
    min-width: 40px;
    border-radius: 999px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    font-size: 0.875rem;
    padding: 0 12px;
}

/* Icon-only buttons */
.control-btn:has(i) {
    padding: 0 10px;
}

.control-btn:hover {
    background: rgba(31, 41, 55, 0.8);
    color: white;
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.control-btn i {
    width: 20px;
    height: 20px;
}

.font-bold {
    font-weight: 700;
}

/* Light/Gray theme adjustments for buttons */
[data-theme="light"] .control-btn {
    background: white;
    color: #64748b;
}

[data-theme="light"] .control-btn:hover {
    color: #4f46e5;
    background: white;
}

[data-theme="gray"] .control-btn {
    background: #333;
    color: #bbb;
}

[data-theme="gray"] .control-btn:hover {
    color: #fff;
}

/* Nav Row */
.hero-nav-row {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
}

.badge {
    /* Remove default margin as it is handled by row gap */
    margin-bottom: 0 !important;
}

.doc-nav {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.doc-link {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid transparent;
    transition: all 0.2s;
    background: rgba(31, 41, 55, 0.3);
}

.doc-link:hover {
    color: white;
    background: rgba(31, 41, 55, 0.8);
    border-color: var(--primary);
}

[data-theme="light"] .doc-link {
    background: white;
    color: #64748b;
    border-color: var(--card-border);
}

[data-theme="light"] .doc-link:hover {
    color: #4f46e5;
    border-color: #4f46e5;
}

[data-theme="gray"] .doc-link {
    background: #333;
    color: #aaa;
    border-color: #444;
}

[data-theme="gray"] .doc-link:hover {
    color: white;
    border-color: #666;
}