/* ==========================================================
   Raj Chaudhary Portfolio - Modern Dark Design System
   ========================================================== */

:root {
    --bg-dark: #0b1120;
    --bg-surface: rgba(18, 26, 47, 0.75);
    --bg-surface-hover: rgba(30, 41, 69, 0.85);
    --border-color: rgba(255, 255, 255, 0.1);
    --border-color-hover: rgba(168, 85, 247, 0.5);
    
    --primary-color: #6366f1;
    --secondary-color: #a855f7;
    --accent-pink: #ec4899;
    --accent-cyan: #06b6d4;
    --accent-emerald: #10b981;
    
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-dim: #64748b;
    
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
    --gradient-secondary: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%);
    --gradient-dark: linear-gradient(180deg, rgba(15, 23, 42, 0.6) 0%, rgba(11, 17, 32, 0.85) 100%);
    --gradient-glow: rgba(99, 102, 241, 0.25);
    
    --font-main: 'Plus Jakarta Sans', sans-serif;
    --font-code: 'Fira Code', monospace;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body.bg-dark-theme {
    background-color: var(--bg-dark);
    background-image: 
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.18) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(168, 85, 247, 0.16) 0px, transparent 50%),
        radial-gradient(at 50% 50%, rgba(6, 182, 212, 0.12) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(236, 72, 153, 0.12) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text-main);
    font-family: var(--font-main);
    overflow-x: hidden;
    line-height: 1.6;
}

/* --- Typography Helpers --- */
.font-code {
    font-family: var(--font-code);
}

.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.text-gradient-cyan {
    background: var(--gradient-secondary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

/* --- Glassmorphism & Navbar --- */
.navbar-glass {
    background: rgba(11, 17, 32, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
    z-index: 1050;
}

.brand-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.nav-link-custom {
    color: var(--text-muted) !important;
    font-size: 0.95rem;
    padding: 0.5rem 0.8rem !important;
    border-radius: 8px;
    transition: all 0.25s ease;
}

.nav-link-custom:hover,
.nav-link-custom.active {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.05);
}

/* --- Buttons --- */
.btn-gradient-primary {
    background: var(--gradient-primary);
    color: #ffffff !important;
    border: none;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.35);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-gradient-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(168, 85, 247, 0.5);
    color: #ffffff;
}

.btn-outline-glass {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(8px);
    transition: all 0.3s ease;
}

.btn-outline-glass:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--secondary-color);
    color: #ffffff;
    transform: translateY(-2px);
}

/* --- Hero Section --- */
.hero-section {
    position: relative;
    padding: 100px 0 80px 0;
    background: radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.15) 0%, transparent 40%),
                radial-gradient(circle at 90% 80%, rgba(168, 85, 247, 0.12) 0%, transparent 40%);
}

.section-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border-radius: 30px;
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: #818cf8;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hero-avatar-wrapper {
    position: relative;
    display: inline-block;
}

.hero-avatar-img {
    width: 320px;
    height: 320px;
    object-fit: cover;
    border-radius: 30px;
    border: 2px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 50px rgba(99, 102, 241, 0.3);
}

.floating-badge {
    position: absolute;
    padding: 10px 16px;
    border-radius: 14px;
    background: rgba(17, 24, 39, 0.85);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: float 4s ease-in-out infinite;
}

.floating-badge-1 {
    top: 20px;
    left: -20px;
    animation-delay: 0s;
}

.floating-badge-2 {
    bottom: 30px;
    right: -20px;
    animation-delay: 2s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.stat-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 16px 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-box:hover {
    border-color: rgba(99, 102, 241, 0.4);
    transform: translateY(-4px);
    background: rgba(99, 102, 241, 0.05);
}

/* --- Glass Cards --- */
.glass-card {
    background: var(--bg-surface);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 28px;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
}

.glass-card:hover {
    border-color: var(--border-color-hover);
    transform: translateY(-6px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4), 0 0 25px rgba(168, 85, 247, 0.15);
}

/* --- Skill Pill Badge --- */
.skill-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    font-size: 0.85rem;
    font-weight: 500;
    color: #e2e8f0;
    transition: all 0.25s ease;
}

.skill-badge:hover {
    background: rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.4);
    color: #ffffff;
    transform: scale(1.04);
}

/* --- Work Experience Timeline --- */
.timeline-container {
    position: relative;
    padding-left: 30px;
}

.timeline-container::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 5px;
    bottom: 5px;
    width: 2px;
    background: linear-gradient(180deg, #6366f1 0%, #a855f7 50%, rgba(255, 255, 255, 0.1) 100%);
}

.timeline-item {
    position: relative;
    margin-bottom: 40px;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -30px;
    top: 6px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--bg-dark);
    border: 3px solid var(--primary-color);
    box-shadow: 0 0 12px var(--primary-color);
    z-index: 2;
    transition: all 0.3s ease;
}

.timeline-item:hover .timeline-dot {
    background: var(--secondary-color);
    border-color: #ffffff;
    transform: scale(1.2);
}

.company-tag {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent-cyan);
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid rgba(6, 182, 212, 0.25);
    padding: 4px 12px;
    border-radius: 20px;
    display: inline-block;
}

/* --- Project Cards & Filters --- */
.project-filter-btn {
    padding: 8px 20px;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.25s ease;
    cursor: pointer;
}

.project-filter-btn:hover,
.project-filter-btn.active {
    background: var(--gradient-primary);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.project-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.project-meta-item {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

/* --- Education Section --- */
.edu-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
    transition: all 0.3s ease;
}

.edu-card:hover {
    border-color: rgba(99, 102, 241, 0.4);
    background: rgba(99, 102, 241, 0.04);
    transform: translateX(6px);
}

/* --- Contact & Socials --- */
.contact-icon-box {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1.3rem;
    flex-shrink: 0;
}

.form-control-custom {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: #ffffff;
    padding: 12px 16px;
    transition: all 0.25s ease;
}

.form-control-custom:focus {
    background: rgba(255, 255, 255, 0.07);
    border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.25);
    color: #ffffff;
}

.social-icon-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: all 0.25s ease;
    text-decoration: none;
}

.social-icon-btn:hover {
    background: var(--gradient-primary);
    color: #ffffff;
    border-color: transparent;
    transform: translateY(-3px);
}

/* --- Alert Toast --- */
.toast-custom {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: rgba(17, 24, 39, 0.95);
    border: 1px solid var(--accent-emerald);
    color: #ffffff;
    padding: 14px 24px;
    border-radius: 12px;
    backdrop-filter: blur(16px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 2000;
    display: flex;
    align-items: center;
    gap: 12px;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.toast-custom.show {
    transform: translateY(0);
    opacity: 1;
}

/* --- Responsive adjustments --- */
@media (max-width: 991.98px) {
    .hero-avatar-wrapper {
        margin-top: 40px;
    }
    .hero-avatar-img {
        width: 260px;
        height: 260px;
    }
    .floating-badge-1 { left: -10px; }
    .floating-badge-2 { right: -10px; }
}

@media (max-width: 575.98px) {
    .hero-section {
        padding: 60px 0 40px 0;
    }
    .floating-badge {
        font-size: 0.75rem;
        padding: 6px 12px;
    }
}

/* --- Footer Custom Styling --- */
.footer-dark {
    background: rgba(11, 17, 32, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    position: relative;
}

.footer-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.footer-link:hover {
    color: #818cf8;
    transform: translateX(4px);
}

.footer-heading {
    font-size: 1rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.5px;
    position: relative;
    padding-bottom: 8px;
}

.footer-heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--gradient-primary);
    border-radius: 2px;
}