/* EXECUTIVE SLATE GLOBAL STYLES */
:root {
    --bg-obsidian: #020617;
    --bg-darker: #0f172a;
    --accent-indigo: #6366f1;
    --accent-glow: rgba(99, 102, 241, 0.5);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --glass: rgba(15, 23, 42, 0.75);
    --border: rgba(255, 255, 255, 0.1);
}

body {
    background-color: var(--bg-obsidian);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    margin: 0;
    overflow-x: hidden;
    transition: background-color 0.8s ease; /* For momentum theme switching */
}

h1, h2, h3, h4, .navbar-brand {
    font-family: 'Manrope', sans-serif;
    letter-spacing: -0.02em;
    line-height: 1.3; /* Increased from default to prevent clipping */
    padding-bottom: 5px; /* Safety padding */
}

.fw-extra-bold { font-weight: 800; }
.text-indigo { color: var(--accent-indigo) !important; }

/* Gradient Text Effect */
.text-gradient-indigo {
    background: linear-gradient(135deg, #fff 0%, #6366f1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;/* THE FIX: */
    padding-bottom: 10px; /* Extends the background area down */
    margin-bottom: -10px; /* Pulls the layout back up so it doesn't look gappy */
    display: inline-block; /* Required for padding to work on a text span */
}

/* Background Canvas */
#canvas-dots {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.35;
}

/* Glassmorphism Navigation */
.glass-nav {
    background: rgba(2, 6, 23, 0.85) !important;
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.nav-link {
    color: var(--text-secondary) !important;
    transition: 0.3s;
    font-size: 0.95rem;
}

.nav-link:hover, .nav-link.active {
    color: var(--accent-indigo) !important;
}

/* Detailed Cards */
.glass-card {
    background: var(--glass);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2.5rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-indigo);
    box-shadow: 0 20px 40px -10px rgba(99, 102, 241, 0.2);
}

/* Typography & Buttons */
.btn-indigo { 
    background: var(--accent-indigo); 
    color: white; 
    border-radius: 10px; 
    padding: 12px 28px;
    font-weight: 600;
    border: none;
    transition: 0.3s;
}

.btn-indigo:hover {
    background: #4f46e5;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(99, 102, 241, 0.4);
}

.btn-outline-light {
    border-radius: 10px;
    padding: 12px 28px;
    border: 1px solid var(--border);
    transition: 0.3s;
}

.btn-outline-light:hover {
    background: var(--bg-darker);
    border-color: var(--text-primary);
}

/* Section Spacing */
.py-10 { padding: 6rem 0; }

/* Custom Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-obsidian); }
::-webkit-scrollbar-thumb { background: #334155; border-radius: 10px; }

/* --- SCROLLYTELLING (Reading Page) --- */
.scrolly-container { position: relative; }

.sticky-book-wrapper {
    position: -webkit-sticky;
    position: sticky;
    top: 15vh;
    height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.scrolly-card {
    min-height: 80vh; /* Each card takes up screen height */
    display: flex;
    flex-direction: column;
    justify-content: center;
    opacity: 0.1;
    transform: translateY(40px);
    transition: all 0.8s ease;
    filter: blur(4px);
}

.scrolly-card.active {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
}

/* --- MOMENTUM SCROLL (Experience Page) --- */
.momentum-card {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.momentum-card.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- CHATBOT WIDGET --- */
#harshit-brain-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
}

.brain-window {
    width: 350px;
    height: 500px;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.chat-bubble {
    padding: 10px 15px;
    border-radius: 12px;
    font-size: 0.9rem;
    margin-bottom: 8px;
    max-width: 85%;
    line-height: 1.4;
}

.bubble-bot {
    background: #1e293b;
    color: #e2e8f0;
    border-top-left-radius: 2px;
}

.bubble-user {
    background: var(--accent-indigo);
    color: white;
    border-top-right-radius: 2px;
    align-self: flex-end;
}

/* --- MODERN EDITORIAL SCROLL --- */
.sticky-book-section {
    position: relative;
    /* Subtle spotlight effect behind the book */
    background: radial-gradient(circle at 25% 50%, rgba(99, 102, 241, 0.08) 0%, transparent 60%);
}

.sticky-image-wrapper {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 5;
    /* Add perspective for a 3D feel */
    perspective: 1000px;
}

/* The Book "Hero" Styling */
.book-glow {
    box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.5), 0 0 30px rgba(99, 102, 241, 0.2);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    border: 1px solid rgba(255,255,255,0.1);
}

.sticky-image-wrapper:hover .book-glow {
    transform: scale(1.02) rotateY(-5deg);
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.6), 0 0 50px rgba(99, 102, 241, 0.3);
}

/* The Right-Side Scrolling Panels */
.scroll-panel {
    min-height: 100vh; /* Full viewport height */
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-left: 2rem;
}

/* Clean, Borderless Text Design */
.editorial-content {
    border-left: 2px solid var(--accent-indigo); /* Minimal accent line */
    padding-left: 2.5rem;
    position: relative;
}

/* Modern Gradient Typography */
.editorial-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    background: linear-gradient(135deg, #ffffff 0%, #94a3b8 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.editorial-text {
    font-size: 1.15rem;
    color: #94a3b8;
    line-height: 1.8;
    max-width: 500px; /* Optimal reading width */
}

/* Mobile Adjustments */
@media (max-width: 991px) {
    .sticky-image-wrapper {
        position: relative;
        height: auto;
        padding: 4rem 0 2rem;
    }
    .scroll-panel {
        min-height: auto;
        margin-bottom: 5rem;
        padding-left: 0;
    }
    .editorial-content {
        border-left: none;
        padding-left: 0;
        border-top: 2px solid var(--accent-indigo);
        padding-top: 1.5rem;
    }
    .editorial-title { font-size: 2rem; }
}

/* --- SKILLS & CREDENTIALS --- */

/* Skill Chips (Floating Tags) */
.skill-chip {
    display: inline-block;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    padding: 12px 24px;
    border-radius: 50px; /* Pill shape */
    font-size: 0.9rem;
    font-weight: 500;
    margin-right: 10px;
    margin-bottom: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: default;
}

.skill-chip:hover {
    background: rgba(99, 102, 241, 0.1); /* Indigo tint */
    border-color: var(--accent-indigo);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(99, 102, 241, 0.15);
}

.skill-chip i { opacity: 0.7; margin-right: 8px; }

/* Certificate Data List (Ledger Style) */
.cert-list-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cert-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 2rem;
    background: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    border-radius: 8px;
}

.cert-row:hover {
    background: rgba(255, 255, 255, 0.03);
    border-bottom-color: transparent;
    transform: scale(1.01);
}

.cert-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 8px;
    color: var(--accent-indigo);
    margin-right: 1.5rem;
}

.cert-details h5 { margin: 0; font-size: 1.1rem; color: #fff; }
.cert-meta { font-family: 'Courier New', monospace; font-size: 0.85rem; color: #64748b; }

.cert-action {
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
}

.cert-row:hover .cert-action {
    opacity: 1;
    transform: translateX(0);
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .cert-row { flex-direction: column; align-items: flex-start; gap: 1rem; }
    .cert-action { opacity: 1; transform: none; margin-top: 0.5rem; }
}

/* --- AI LAB */
/* --- AI LAB MODERN STYLES --- */

/* Browser Window Effect for CRM */
.browser-frame {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    transition: transform 0.4s ease;
}

.browser-header {
    background: rgba(255, 255, 255, 0.05);
    padding: 10px 15px;
    display: flex;
    gap: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.browser-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}
.dot-red { background: #ef4444; }
.dot-yellow { background: #f59e0b; }
.dot-green { background: #10b981; }

/* Modern Project Cards (Streamlit) */
.project-card-modern {
    background: linear-gradient(145deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0.01) 100%);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 2rem;
    height: 100%;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.project-card-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-indigo), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-card-modern:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.05);
}

.project-card-modern:hover::before { opacity: 1; }

/* Tech Stack Badges (Code Style) */
.code-badge {
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
    color: #94a3b8;
    background: rgba(0, 0, 0, 0.3);
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Terminal Footer */
.terminal-box {
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 1.5rem;
    font-family: 'Courier New', monospace;
    color: #10b981; /* Terminal Green */
    font-size: 0.9rem;
}

.terminal-prompt { color: #6366f1; margin-right: 10px; }

/* --- EDUCATION TIMELINE --- */
.timeline-wrapper {
    position: relative;
    padding-left: 3rem; /* Space for the line */
}

/* The vertical connecting line */
.timeline-line {
    position: absolute;
    left: 0;
    top: 15px; /* Start slightly down to align with first dot */
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--accent-indigo) 0%, rgba(99, 102, 241, 0.1) 100%);
}

/* The glowing nodes */
.timeline-node {
    position: absolute;
    left: -9px; /* Centered on the 2px line */
    top: 0;
    width: 20px;
    height: 20px;
    background: var(--bg-obsidian); /* Matches body bg to look hollow */
    border: 2px solid var(--accent-indigo);
    border-radius: 50%;
    z-index: 1;
}

/* Pulsing animation for the "Current" stage */
.timeline-node.active-pulse {
    background: var(--accent-indigo);
    box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.7);
    animation: pulse-indigo 2s infinite;
}

@keyframes pulse-indigo {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(99, 102, 241, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(99, 102, 241, 0); }
}

/* Stat Blocks (for grades/ranks) */
.stat-block {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1rem;
    border-radius: 8px;
    height: 100%;
}

/* --- HOLISTIC FOOTER STYLES --- */
footer {
    background: var(--bg-darker);
    border-top: 1px solid var(--border);
    padding: 5rem 0 2rem; /* Inner spacing */
    /* margin-top: 8rem;     /* Outer spacing: Pushes footer away from content */
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-brand {
    font-family: 'Manrope', sans-serif;
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--text-primary);
    display: inline-block;
    margin-bottom: 1rem;
    text-decoration: none;
}

.footer-heading {
    color: var(--text-primary);
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

/* Ensure links are readable */
.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-block; /* Helps with hover animation */
}

.footer-links a:hover {
    color: var(--accent-indigo);
    transform: translateX(5px);
}

.social-circle {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    transition: all 0.3s ease;
    border: 1px solid var(--border);
}

.social-circle:hover {
    background: var(--accent-indigo);
    border-color: var(--accent-indigo);
    color: white;
    transform: translateY(-3px);
}

.footer-bottom {
    border-top: 1px solid var(--border);
    margin-top: 4rem;
    padding-top: 2rem;
    font-size: 0.8rem;
}

/* --- CONTACT MODAL STYLING --- */
.modal-content.glass-card {
    background: #0f172a; /* Matches your Obsidian theme */
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.form-control {
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
}

.form-control:focus {
    background-color: rgba(255, 255, 255, 0.05);
    color: #fff;
    border-color: var(--accent-indigo);
    box-shadow: 0 0 0 0.25rem rgba(99, 102, 241, 0.25);
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.9rem;
}

/* Blog Posts */
/* Blog Card Hover Effect */
.group-hover-trigger:hover img {
    transform: scale(1.05);
    transition: transform 0.5s ease;
}
.transition-transform {
    transition: transform 0.5s ease;
}

/* CHAT WIDGET STYLES */
/* Container: Handles fixed positioning for both bubble and button */
/* Container: Aligns Bot (left) and Text (right) */
.chat-widget-wrapper {
    position: fixed; 
    bottom: 30px; 
    right: 30px; 
    z-index: 9999; 
    display: flex; 
    align-items: center; 
    gap: 12px; /* Space between bot and message */
}

/* 1. The Speech Bubble (Message) */
.chat-tooltip {
    position: relative;
    background: rgba(15, 23, 42, 0.8); /* Dark translucent background */
    backdrop-filter: blur(10px);        /* Glass effect */
    border: 1px solid rgba(255, 255, 255, 0.1); /* The border color */
    color: #fff;
    padding: 10px 18px;
    border-radius: 12px;
    border-top-left-radius: 2px;
    font-size: 0.95rem;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    animation: fadeSlideIn 1s ease-out;
    font-family: 'Manrope', sans-serif;
    letter-spacing: 0.5px;
    margin-left: 10px; /* Added margin to give the tail space */
}

/* 2. The Tail Outline (The Border) */
.chat-tooltip::before {
    content: "";
    position: absolute;
    left: -9px; /* Pushed out to form the border */
    top: 14px;
    width: 0; 
    height: 0; 
    border-top: 9px solid transparent;
    border-bottom: 9px solid transparent; 
    border-right: 9px solid rgba(0, 0, 0, 0.1); /* Match the bubble border color */
}

/* 3. The Tail Fill (The Inside Color) */
.chat-tooltip::after {
    content: "";
    position: absolute;
    left: -8px; /* Slightly inward to cover the border triangle */
    top: 15px;
    width: 0; 
    height: 0; 
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent; 
    border-right: 8px solid rgba(255, 255, 255, 0.1); /* Match the background color (Solid to hide the line) */
}

/* 2. The Bot Button */
.chat-launcher-btn {
    width: 60px; 
    height: 60px;
    background: var(--accent-indigo); 
    color: white; 
    border: none; 
    border-radius: 50%; 
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.4); 
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    justify-content: center;
    order: -1; /* Ensures button stays on the left visually */
}

.chat-launcher-btn:hover { 
    transform: scale(1.1); 
}

/* Animation */
@keyframes fadeSlideIn {
    from { opacity: 0; transform: translateX(-10px); }
    to { opacity: 1; transform: translateX(0); }
}

.chat-window {
    position: fixed; bottom: 100px; right: 30px; width: 350px; height: 500px;
    background: rgba(15, 23, 42, 0.95); backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 20px;
    z-index: 9999; display: flex; flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease-out;
}
@keyframes slideUp { from { opacity:0; transform:translateY(20px); } to { opacity:1; transform:translateY(0); } }

.chat-header { padding: 15px; border-bottom: 1px solid rgba(255,255,255,0.1); display: flex; justify-content: space-between; align-items: center; }
.status-dot { width: 8px; height: 8px; background: #10b981; border-radius: 50%; position: absolute; bottom: 0; right: 0; border: 2px solid #0f172a; }

.chat-body { flex-grow: 1; padding: 15px; overflow-y: auto; }
.chat-footer { padding: 15px; border-top: 1px solid rgba(255,255,255,0.1); }

.chat-msg { padding: 10px 15px; border-radius: 12px; font-size: 0.9rem; max-width: 85%; margin-bottom: 10px; line-height: 1.4; }
.chat-msg.bot { background: rgba(255, 255, 255, 0.05); color: #e2e8f0; border-top-left-radius: 2px; margin-right: auto; }
.chat-msg.user { background: var(--accent-indigo); color: white; border-top-right-radius: 2px; margin-left: auto; }