/* ============================================
   Ajit Gangurde — Personal Website
   Modern, polished design with wow factor
   ============================================ */

/* ---------- CSS Variables ---------- */
:root {
    --gradient-primary: linear-gradient(135deg, #0d6efd 0%, #6610f2 50%, #6f42c1 100%);
    --gradient-hero: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
    --gradient-accent: linear-gradient(135deg, #00c6ff 0%, #0072ff 100%);
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.15);
    --card-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    --card-hover-shadow: 0 16px 48px rgba(13, 110, 253, 0.15);
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-bs-theme="dark"] {
    --card-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    --card-hover-shadow: 0 16px 48px rgba(13, 110, 253, 0.25);
}

/* ---------- Global ---------- */
body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    transition: background-color 0.3s, color 0.3s;
    overflow-x: hidden;
}

/* ---------- Navbar (glassmorphism) ---------- */
.navbar-glass {
    background: rgba(15, 12, 41, 0.85) !important;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.navbar-glass .navbar-brand {
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.4rem;
    letter-spacing: -0.5px;
}
.navbar-glass .nav-link {
    color: rgba(255, 255, 255, 0.75) !important;
    font-weight: 500;
    position: relative;
    transition: var(--transition-smooth);
}
.navbar-glass .nav-link:hover,
.navbar-glass .nav-link.active {
    color: #fff !important;
}
.navbar-glass .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--gradient-accent);
    transition: var(--transition-smooth);
    transform: translateX(-50%);
}
.navbar-glass .nav-link:hover::after {
    width: 70%;
}

/* ---------- Hero Section ---------- */
.hero-section {
    background: var(--gradient-hero);
    position: relative;
    overflow: hidden;
    min-height: 85vh;
    display: flex;
    align-items: center;
}
.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(13, 110, 253, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 8s ease-in-out infinite;
}
.hero-section::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(111, 66, 193, 0.12) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 10s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-40px) scale(1.05); }
}

.hero-greeting {
    font-size: 1.1rem;
    color: #00c6ff;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-weight: 600;
    margin-bottom: 1rem;
}
.hero-name {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}
.hero-name .gradient-text {
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.7);
    max-width: 550px;
    line-height: 1.7;
}

/* Typing cursor effect */
.typing-cursor::after {
    content: '|';
    animation: blink 1s step-end infinite;
    color: #00c6ff;
    font-weight: 300;
}
@keyframes blink {
    50% { opacity: 0; }
}

/* Hero avatar ring */
.hero-avatar {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: var(--gradient-accent);
    padding: 4px;
    animation: pulse-ring 3s ease-in-out infinite;
    position: relative;
    z-index: 1;
}
.hero-avatar-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #1a1a2e;
    display: flex;
    align-items: center;
    justify-content: center;
}
@keyframes pulse-ring {
    0%, 100% { box-shadow: 0 0 0 0 rgba(0, 198, 255, 0.4); }
    50% { box-shadow: 0 0 0 20px rgba(0, 198, 255, 0); }
}

/* Hero CTA buttons */
.btn-glow {
    background: var(--gradient-accent);
    border: none;
    color: #fff;
    padding: 0.75rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}
.btn-glow:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 198, 255, 0.4);
    color: #fff;
}
.btn-glow::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}
.btn-glow:hover::before {
    left: 100%;
}
.btn-outline-glow {
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    padding: 0.75rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition-smooth);
    background: transparent;
}
.btn-outline-glow:hover {
    border-color: #00c6ff;
    color: #00c6ff;
    transform: translateY(-2px);
    background: rgba(0, 198, 255, 0.05);
}

/* ---------- Stats Counter ---------- */
.stats-bar {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 1.5rem 2rem;
    margin-top: 3rem;
}
.stat-item {
    text-align: center;
}
.stat-number {
    font-size: 2rem;
    font-weight: 800;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.stat-label {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ---------- Tech Stack (floating pills) ---------- */
.tech-section { position: relative; }
.tech-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    background: white;
    border: 1px solid #e9ecef;
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--transition-smooth);
    cursor: default;
}
.tech-pill:hover {
    transform: translateY(-4px);
    box-shadow: var(--card-hover-shadow);
    border-color: #0d6efd;
}
.tech-pill i {
    font-size: 1.1rem;
    color: #0d6efd;
}
[data-bs-theme="dark"] .tech-pill {
    background: #1e1e2e;
    border-color: #333;
    color: #e0e0e0;
}

/* ---------- Section Titles ---------- */
.section-title {
    font-size: 2rem;
    font-weight: 700;
    position: relative;
    display: inline-block;
}
.section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--gradient-accent);
    border-radius: 2px;
}
.section-title-center::after {
    left: 50%;
    transform: translateX(-50%);
}

/* ---------- Cards (hover lift) ---------- */
.card-hover {
    border: none;
    border-radius: 16px;
    box-shadow: var(--card-shadow);
    transition: var(--transition-smooth);
    overflow: hidden;
}
.card-hover:hover {
    transform: translateY(-8px);
    box-shadow: var(--card-hover-shadow);
}
.card-hover .card-body { padding: 1.5rem; }

/* Blog card accent strip */
.card-hover::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-accent);
    opacity: 0;
    transition: var(--transition-smooth);
}
.card-hover:hover::before {
    opacity: 1;
}

/* ---------- Tag badges ---------- */
.tag-badge {
    padding: 0.3rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(13, 110, 253, 0.1);
    color: #0d6efd;
    border: 1px solid rgba(13, 110, 253, 0.2);
}
[data-bs-theme="dark"] .tag-badge {
    background: rgba(0, 198, 255, 0.1);
    color: #00c6ff;
    border-color: rgba(0, 198, 255, 0.2);
}

/* ---------- Scroll animations ---------- */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children */
.stagger-children > *:nth-child(1) { transition-delay: 0.1s; }
.stagger-children > *:nth-child(2) { transition-delay: 0.2s; }
.stagger-children > *:nth-child(3) { transition-delay: 0.3s; }
.stagger-children > *:nth-child(4) { transition-delay: 0.4s; }
.stagger-children > *:nth-child(5) { transition-delay: 0.5s; }
.stagger-children > *:nth-child(6) { transition-delay: 0.6s; }

/* ---------- Footer ---------- */
.footer-modern {
    background: var(--gradient-hero);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.footer-modern a {
    transition: var(--transition-smooth);
}
.footer-modern a:hover {
    color: #00c6ff !important;
}
.social-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.15);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
}
.social-icon:hover {
    background: var(--gradient-accent);
    border-color: transparent;
    color: #fff;
    transform: translateY(-3px);
}

/* ---------- Blog content styling ---------- */
.blog-content h2 { margin-top: 2.5rem; margin-bottom: 1rem; font-weight: 700; }
.blog-content h3 { margin-top: 2rem; margin-bottom: 0.75rem; font-weight: 600; }
.blog-content p { margin-bottom: 1.2rem; line-height: 1.85; }
.blog-content pre {
    background: #1e1e2e;
    color: #d4d4d4;
    padding: 1.25rem;
    border-radius: 12px;
    overflow-x: auto;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
}
.blog-content code { font-size: 0.9em; font-family: 'Cascadia Code', 'Fira Code', monospace; }
.blog-content p code {
    background: rgba(13, 110, 253, 0.08);
    color: #0d6efd;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    font-size: 0.875em;
}
.blog-content img { max-width: 100%; height: auto; border-radius: 12px; margin: 1.5rem 0; }
.blog-content blockquote {
    border-left: 4px solid;
    border-image: var(--gradient-accent) 1;
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    background: rgba(13, 110, 253, 0.03);
    border-radius: 0 8px 8px 0;
}
.blog-content ul, .blog-content ol { margin-bottom: 1rem; }
.blog-content li { margin-bottom: 0.35rem; line-height: 1.75; }
.blog-content table { width: 100%; margin-bottom: 1.5rem; border-radius: 8px; overflow: hidden; }
.blog-content th { background: #f8f9fa; padding: 0.75rem; border: 1px solid #dee2e6; }
.blog-content td { padding: 0.75rem; border: 1px solid #dee2e6; }

/* Dark mode adjustments */
[data-bs-theme="dark"] .blog-content p code { background: rgba(0, 198, 255, 0.1); color: #00c6ff; }
[data-bs-theme="dark"] .blog-content th { background: #2d2d3d; }
[data-bs-theme="dark"] .card { border-color: rgba(255, 255, 255, 0.08); }
[data-bs-theme="dark"] .bg-light { background-color: #1a1a2e !important; }
[data-bs-theme="dark"] .tech-pill { border-color: rgba(255, 255, 255, 0.1); }

/* ---------- Focus indicators (accessibility) ---------- */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: 3px solid #00c6ff;
    outline-offset: 2px;
}

/* ---------- Touch targets (WCAG 2.1) ---------- */
.nav-link { min-height: 44px; display: inline-flex; align-items: center; }
.btn-lg { min-height: 44px; }
.btn-sm { min-height: auto; }

/* ---------- Cookie consent banner ---------- */
#cookie-consent {
    font-size: 0.85rem;
    background: rgba(15, 12, 41, 0.95) !important;
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}
#cookie-consent .btn { padding: 0.25rem 0.75rem; font-size: 0.8rem; border-radius: 50px; }

/* ---------- Page transitions ---------- */
main { animation: fadeIn 0.4s ease-out; }
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .hero-name { font-size: 2.2rem; }
    .hero-section { min-height: 70vh; }
    .stats-bar { padding: 1rem; }
    .stat-number { font-size: 1.5rem; }
}

/* ---------- Reduced Motion (accessibility) ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .fade-up { opacity: 1; transform: none; }
    main { animation: none; }
}