/* ==========================================================================
    1. COLOR SYSTEM & DESIGN TOKENS
    ========================================================================== */
:root {
    --bg-void: #030712;
    --bg-surface: rgba(15, 23, 42, 0.65);
    --bg-surface-hover: rgba(30, 41, 59, 0.7);
    
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-active: rgba(99, 102, 241, 0.4);
    --border-highlight: rgba(255, 255, 255, 0.15);

    --accent-indigo: #6366f1;
    --accent-indigo-glow: rgba(99, 102, 241, 0.25);
    --accent-cyan: #06b6d4;
    --accent-emerald: #10b981;
    --accent-violet: #8b5cf6;
    --accent-amber: #f59e0b;

    --text-heading: #f8fafc;
    --text-body: #cbd5e1;
    --text-secondary: #64748b;
}

body {
    background-color: var(--bg-void);
    color: var(--text-body);
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    letter-spacing: -0.01em;
}

.font-mono {
    font-family: 'Fira Code', monospace;
}

/* Ambient Background Mesh & Spotlight Effect */
.ambient-mesh {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: 
        radial-gradient(circle at 50% 0%, rgba(99, 102, 241, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 85% 30%, rgba(6, 182, 212, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 15% 70%, rgba(139, 92, 246, 0.05) 0%, transparent 45%);
    pointer-events: none;
    z-index: 0;
}

.spotlight-glow {
    position: fixed;
    top: -250px;
    left: -250px;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--accent-indigo-glow) 0%, rgba(0,0,0,0) 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.7;
    transform: translate(-50%, -50%);
}

/* ==========================================================================
    2. GLASS PANELS & CARDS
    ========================================================================== */
.glass-panel {
    background: var(--bg-surface);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    position: relative;
    overflow: hidden;
}

.glass-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-highlight), transparent);
}

.sticky-sidebar {
    position: sticky;
    top: 2rem;
}

/* Command Search Bar */
.search-hero-box {
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(24px);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 0.5rem 0.8rem 0.5rem 1.2rem;
    box-shadow: 0 20px 40px -15px rgba(0,0,0,0.5);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.search-hero-box:focus-within {
    border-color: var(--accent-indigo);
    box-shadow: 0 0 0 1px var(--accent-indigo), 0 0 25px var(--accent-indigo-glow);
}

.search-input {
    background: transparent;
    border: none;
    color: var(--text-heading);
    font-size: 1rem;
    font-weight: 500;
}

.search-input:focus {
    outline: none;
    box-shadow: none;
    background: transparent;
    color: var(--text-heading);
}

.search-input::placeholder {
    color: var(--text-secondary);
}

.kbd-shortcut {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    font-family: 'Fira Code', monospace;
}

/* Custom Inputs */
.custom-select {
    background-color: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--border-subtle);
    color: var(--text-heading);
    border-radius: 10px;
    padding: 0.45rem 0.8rem;
    font-size: 0.85rem;
}

.custom-select:focus {
    border-color: var(--accent-indigo);
    box-shadow: 0 0 0 2px var(--accent-indigo-glow);
    outline: none;
    background-color: rgba(15, 23, 42, 0.95);
    color: var(--text-heading);
}

/* ==========================================================================
    3. TIMELINE & ARCHIVE CARDS
    ========================================================================== */
.timeline-container {
    position: relative;
    padding-left: 1.75rem;
}

/* Vertical Glowing Timeline Bar */
.timeline-container::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--accent-indigo) 0%, rgba(99, 102, 241, 0.1) 100%);
    border-radius: 2px;
}

.timeline-node {
    position: relative;
    margin-bottom: 2.5rem;
}

/* Dot Indicator on Timeline */
.timeline-node::before {
    content: '';
    position: absolute;
    left: -1.75rem;
    top: 1.5rem;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent-indigo);
    box-shadow: 0 0 10px var(--accent-indigo);
    border: 2px solid var(--bg-void);
    z-index: 2;
}

/* Year Separator Banner */
.timeline-year-banner {
    position: relative;
    margin-left: -1.75rem;
    margin-bottom: 2rem;
    margin-top: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.year-badge {
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid var(--accent-indigo);
    color: #a5b4fc;
    padding: 0.35rem 1rem;
    border-radius: 100px;
    font-family: 'Fira Code', monospace;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.2);
}

.year-line {
    height: 1px;
    flex-grow: 1;
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.3), transparent);
}

/* Archive Item Card */
.archive-card {
    background: var(--bg-surface);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 1.5rem;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.archive-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
    opacity: 0;
    transition: opacity 0.35s ease;
}

.archive-card:hover {
    transform: translateY(-4px);
    background: var(--bg-surface-hover);
    border-color: var(--border-active);
    box-shadow: 
        0 20px 40px -15px rgba(0, 0, 0, 0.6),
        0 0 25px rgba(99, 102, 241, 0.15);
}

.archive-card:hover::before {
    opacity: 1;
}

/* Category Badges */
.badge-cat {
    font-family: 'Fira Code', monospace;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    letter-spacing: 0.05em;
}

.cat-engineering { background: rgba(6, 182, 212, 0.1); color: #22d3ee; border: 1px solid rgba(6, 182, 212, 0.25); }
.cat-design      { background: rgba(139, 92, 246, 0.1); color: #c084fc; border: 1px solid rgba(139, 92, 246, 0.25); }
.cat-updates     { background: rgba(16, 185, 129, 0.1); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.25); }

/* Filter Chips */
.category-chip {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    border-radius: 100px;
    padding: 0.45rem 1rem;
    font-size: 0.825rem;
    font-weight: 600;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    user-select: none;
}

.category-chip:hover {
    color: var(--text-heading);
    border-color: var(--border-highlight);
    background: rgba(255, 255, 255, 0.05);
}

.category-chip.active {
    background: rgba(99, 102, 241, 0.15);
    border-color: var(--accent-indigo);
    color: #a5b4fc;
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.2);
}

.category-chip .chip-count {
    background: rgba(255, 255, 255, 0.08);
    padding: 0.1rem 0.45rem;
    border-radius: 100px;
    font-size: 0.7rem;
    font-family: 'Fira Code', monospace;
}

/* Sidebar Year Links */
.year-nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    font-family: 'Fira Code', monospace;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.year-nav-link:hover, .year-nav-link.active {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-heading);
}

.year-nav-link.active {
    color: #a5b4fc;
    border-left: 2px solid var(--accent-indigo);
}