/* ==========================================================================
   CodeVagas Design System (Inspired by Stripe, Énois & StackVagas)
   Complete Dark & Light Mode Theme Engine
   ========================================================================== */

:root {
    --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    
    /* Light Mode Variables (Stripe Light) */
    --bg-page: #f8fafc;
    --bg-card: rgba(255, 255, 255, 0.9);
    --border-card: #e2e8f0;
    --text-heading: #0f172a;
    --text-body: #334155;
    --text-muted: #64748b;
    --accent-purple: #7c3aed;
    --accent-indigo: #4f46e5;
    --accent-sky: #0284c7;
}

.dark {
    /* Dark Mode Variables (Stripe / Énois Dark) */
    --bg-page: #060911;
    --bg-card: rgba(15, 23, 42, 0.7);
    --border-card: rgba(51, 65, 85, 0.6);
    --text-heading: #f8fafc;
    --text-body: #cbd5e1;
    --text-muted: #94a3b8;
    --accent-purple: #a855f7;
    --accent-indigo: #6366f1;
    --accent-sky: #38bdf8;
}

html, body {
    font-family: var(--font-sans);
    background-color: var(--bg-page);
    color: var(--text-body);
    transition: background-color 0.25s ease, color 0.25s ease;
    overflow-x: hidden;
    width: 100%;
    min-width: 320px;
    -webkit-tap-highlight-color: transparent;
}

/* Hide scrollbar for horizontal mobile tabs while preserving touch momentum scrolling */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

/* Ambient Radial Background & Stripe Mesh Effect */
.bg-ambient-mesh {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
    background-color: var(--bg-page);
    transition: background-color 0.25s ease;
}

/* Light mode mesh glows */
html:not(.dark) .bg-ambient-mesh::before {
    content: '';
    position: absolute;
    top: -20%;
    left: 50%;
    transform: translateX(-50%);
    width: 850px;
    height: 550px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.12) 0%, rgba(168, 85, 247, 0.08) 40%, transparent 70%);
    filter: blur(80px);
    border-radius: 50%;
}

html:not(.dark) .bg-ambient-mesh::after {
    content: '';
    position: absolute;
    top: 25%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.08) 0%, transparent 70%);
    filter: blur(90px);
    border-radius: 50%;
}

/* Dark mode mesh glows */
.dark .bg-ambient-mesh {
    background-color: #060911;
}

.dark .bg-ambient-mesh::before {
    content: '';
    position: absolute;
    top: -20%;
    left: 50%;
    transform: translateX(-50%);
    width: 850px;
    height: 550px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.18) 0%, rgba(168, 85, 247, 0.12) 40%, transparent 75%);
    filter: blur(80px);
    border-radius: 50%;
}

.dark .bg-ambient-mesh::after {
    content: '';
    position: absolute;
    top: 25%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.08) 0%, transparent 70%);
    filter: blur(100px);
    border-radius: 50%;
}

/* Subtle Geometric Grid Overlay */
.bg-grid-pattern {
    background-image: radial-gradient(rgba(148, 163, 184, 0.15) 1px, transparent 1px);
    background-size: 32px 32px;
}

.dark .bg-grid-pattern {
    background-image: radial-gradient(rgba(148, 163, 184, 0.12) 1px, transparent 1px);
}

/* Glassmorphism Header */
.glass-header {
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    background-color: rgba(255, 255, 255, 0.85);
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    transition: background-color 0.25s ease, border-color 0.25s ease;
}

.dark .glass-header {
    background-color: rgba(6, 9, 17, 0.8);
    border-bottom: 1px solid rgba(51, 65, 85, 0.4);
}

/* Surface Cards */
.surface-card {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 1rem;
    box-shadow: 0 2px 12px -2px rgba(0, 0, 0, 0.04);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (min-width: 640px) {
    .surface-card {
        border-radius: 1.25rem;
        box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05);
    }
    .surface-card:hover {
        border-color: rgba(99, 102, 241, 0.5);
        transform: translateY(-2px);
        box-shadow: 0 12px 30px -8px rgba(99, 102, 241, 0.18), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    }
    .dark .surface-card:hover {
        border-color: rgba(99, 102, 241, 0.5);
        transform: translateY(-2px);
        box-shadow: 0 12px 35px -10px rgba(99, 102, 241, 0.18), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    }
}

.dark .surface-card {
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(51, 65, 85, 0.6);
    box-shadow: none;
}

/* Gradient Text */
.gradient-text-hero {
    background: linear-gradient(135deg, #a855f7 0%, #6366f1 50%, #0284c7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.dark .gradient-text-hero {
    background: linear-gradient(135deg, #a855f7 0%, #6366f1 50%, #38bdf8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Pill Badges */
.tag-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.175rem 0.55rem;
    border-radius: 0.5rem;
    font-size: 0.7rem;
    font-weight: 600;
    line-height: 1.15rem;
    white-space: nowrap;
    transition: all 0.2s ease;
}

@media (min-width: 640px) {
    .tag-badge {
        gap: 0.35rem;
        padding: 0.22rem 0.65rem;
        border-radius: 9999px;
        font-size: 0.75rem;
        line-height: 1.25rem;
    }
}

.tag-meta {
    background-color: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #475569;
}

.dark .tag-meta {
    background-color: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(51, 65, 85, 0.7);
    color: #94a3b8;
}

.tag-tech {
    background-color: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.25);
    color: #4f46e5;
}

.dark .tag-tech {
    background-color: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: #a5b4fc;
}

.tag-applied {
    background-color: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #059669;
}

.dark .tag-applied {
    background-color: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.35);
    color: #6ee7b7;
}

.tag-remote {
    background-color: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.35);
    color: #059669;
}

.dark .tag-remote {
    background-color: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: #34d399;
}

.tag-es,
.tag-local {
    background-color: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.35);
    color: #b45309;
}

.dark .tag-es,
.dark .tag-local {
    background-color: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.4);
    color: #fcd34d;
}

/* Primary Button (Stripe / Énois Gradient) */
.btn-primary-gradient {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: #ffffff;
    box-shadow: 0 2px 10px 0 rgba(79, 70, 229, 0.3);
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-primary-gradient:hover:not(:disabled) {
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.45);
    transform: translateY(-1px);
}

.btn-primary-gradient:active:not(:disabled) {
    transform: scale(0.98);
}

/* Secondary / Ghost Buttons */
.btn-ghost-dark {
    background-color: #f1f5f9;
    border: 1px solid #cbd5e1;
    color: #334155;
    transition: all 0.2s ease;
}

.btn-ghost-dark:hover {
    background-color: #e2e8f0;
    color: #0f172a;
    border-color: #94a3b8;
}

.dark .btn-ghost-dark {
    background-color: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(51, 65, 85, 0.6);
    color: #cbd5e1;
}

.dark .btn-ghost-dark:hover {
    background-color: rgba(51, 65, 85, 0.8);
    color: #ffffff;
    border-color: rgba(100, 116, 139, 0.8);
}

/* Monospace font utility */
.font-mono-clean {
    font-family: var(--font-mono);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 7px;
    height: 7px;
}
::-webkit-scrollbar-track {
    background: var(--bg-page);
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 9999px;
}
.dark ::-webkit-scrollbar-thumb {
    background: #1e293b;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}
.dark ::-webkit-scrollbar-thumb:hover {
    background: #334155;
}