/* Base Styles */
:root {
    --primary-color: #2563eb;
    --secondary-color: #1e293b;
    --accent-color: #0ea5e9;
    --light-color: #f8fafc;
    --dark-color: #0f172a;
    --text-color: #1e293b;
    --text-light: #64748b;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --navbar-height: 76px;
}

/* CRITICAL: Fix top whitespace - Reset all top margins */
html, body {
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    color: var(--text-color);
    line-height: 1.7;
    padding-top: var(--navbar-height);
    background-color: #ffffff;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: var(--dark-color);
    letter-spacing: -0.02em;
    line-height: 1.3;
    margin-top: 0;
}

a {
    color: var(--primary-color);
    transition: all 0.3s ease;
}

a:hover {
    color: var(--accent-color);
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), #3b82f6);
    border: none;
    border-radius: 8px;
    padding: 12px 28px;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1d4ed8, var(--primary-color));
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(37, 99, 235, 0.3);
    color: white;
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    padding: 10px 24px;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--primary-color);
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(37, 99, 235, 0.25);
    border-color: var(--primary-color);
}

/* NAVBAR - Sits flush at top */
.navbar.fixed-top {
    top: 0;
    z-index: 1030;
    background: rgba(15, 23, 42, 0.95) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin: 0;
    padding: 0;
}

.navbar-brand {
    font-weight: 600;
    font-size: 1.25rem;
    letter-spacing: -0.01em;
}

.navbar-nav .nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
    position: relative;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
    width: 80%;
    transform: translateX(-50%) scaleX(1);
}

/* HEADER & HERO SECTIONS - Single definition, no duplicates */
.hero-section,
.page-header {
    background: linear-gradient(135deg, #1e293b 0%, #334155 50%, #2563eb 100%);
    color: white;
    padding: 80px 0 80px 0;
    margin: 0;
    text-shadow: 0 2px 8px rgba(0,0,0,0.15);
    position: relative;
    overflow: hidden;
}

.hero-section::before,
.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.hero-section .container,
.page-header .container {
    position: relative;
    z-index: 1;
}

.profile-img {
    width: 220px;
    height: 220px;
    object-fit: cover;
    border: 6px solid rgba(255,255,255,0.95);
    box-shadow: 0 20px 40px rgba(0,0,0,0.2), 0 0 0 1px rgba(255,255,255,0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
}

.profile-img:hover {
    transform: scale(1.03) translateY(-5px);
    box-shadow: 0 25px 50px rgba(0,0,0,0.3), 0 0 0 1px rgba(255,255,255,0.2);
}

.social-icons a {
    color: rgba(255,255,255,0.9);
    font-size: 1.5rem;
    margin: 0 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-block;
    padding: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
}

.social-icons a:hover {
    color: white;
    transform: translateY(-4px) scale(1.15);
    background: rgba(255,255,255,0.2);
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

/* MAIN CONTENT - Prevent collapsing margins */
main {
    margin: 0;
    padding: 0;
}

main > *:first-child {
    margin-top: 0 !important;
}

section {
    margin-top: 0;
    padding-top: 0;
}

/* ANCHOR LINKS - Account for fixed navbar */
:target {
    scroll-margin-top: calc(var(--navbar-height) + 20px);
}

/* Section Styles */
.section-title {
    position: relative;
    margin-bottom: 40px;
    padding-bottom: 20px;
    color: var(--dark-color);
    font-size: 2.25rem;
    font-weight: 700;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 2px;
}

/* Project Styles */
.project-section {
    padding: 50px 0;
    border-bottom: 1px solid var(--border-color);
}

.project-section:last-child {
    border-bottom: none;
}

.project-date {
    color: var(--text-light);
    font-style: italic;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.project-image {
    max-height: 450px;
    width: 100%;
    object-fit: contain;
    margin: 0 auto;
    display: block;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: white;
    padding: 8px;
}

.project-image:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.project-media {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.tech-tags .badge {
    margin-right: 8px;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 0.875rem;
    padding: 6px 14px;
    border-radius: 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(135deg, var(--primary-color), #3b82f6);
    color: white;
    border: none;
}

.tech-tags .badge:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 8px rgba(37, 99, 235, 0.3);
}

.tech-tags .badge i {
    margin-right: 5px;
}

/* Implementation Highlights */
.implementation-highlights {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 20px;
    border-radius: 12px;
    margin: 20px 0;
    border-left: 4px solid var(--primary-color);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.highlight-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 12px;
    padding: 10px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

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

.highlight-item:hover {
    background: rgba(37, 99, 235, 0.05);
}

.highlight-item i {
    color: var(--primary-color);
    margin-right: 14px;
    width: 24px;
    text-align: center;
    font-size: 1.1rem;
    margin-top: 2px;
    flex-shrink: 0;
}

/* Project Links */
.project-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.project-links .btn {
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.project-links .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.project-links .btn i {
    margin-right: 8px;
}

/* Project Note */
.project-note {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    padding: 16px 20px;
    border-left: 4px solid var(--primary-color);
    border-radius: 8px;
    margin-top: 24px;
    font-size: 0.95rem;
    border: 1px solid rgba(37, 99, 235, 0.2);
    box-shadow: var(--shadow-sm);
}

.project-note i {
    color: var(--primary-color);
    margin-right: 10px;
}

.project-note.technical {
    background-color: #f0f8ff;
    border-left: 4px solid #2e86de;
}

.project-note.technical i {
    color: #2e86de;
}

/* Schematic Image */
.schematic-image {
    max-height: 300px;
    border: 1px solid #ddd;
    padding: 10px;
    background: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.schematic-image:hover {
    transform: scale(1.02);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Timeline Styles */
.timeline {
    position: relative;
    padding-left: 50px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: var(--primary-color);
}

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

.timeline-item::before {
    content: '';
    position: absolute;
    left: -50px;
    top: 5px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: var(--primary-color);
    border: 3px solid white;
    box-shadow: 0 0 0 2px var(--primary-color);
}

.timeline-date {
    position: absolute;
    left: -200px;
    width: 150px;
    text-align: right;
    font-weight: bold;
    color: var(--primary-color);
}

.timeline-content {
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.timeline-content:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

/* Card Styles */
.card {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    background: white;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.card-img-top {
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    height: 220px;
    object-fit: cover;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--light-color);
}

.card:hover .card-img-top {
    transform: scale(1.08);
}

.card-body {
    padding: 20px;
}

/* Certificate Styles */
.certificate-container {
    position: relative;
    overflow: hidden;
    padding-top: 141.42%;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.certificate-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.certificate-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.certificate-card {
    transition: transform 0.3s ease;
}

.certificate-card:hover {
    transform: translateY(-5px);
}

/* Contact Form Styles */
.contact-form .form-control {
    border-radius: 0;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    transition: all 0.3s ease;
}

.contact-form .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

.contact-form textarea {
    min-height: 150px;
}

.info-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
}

.info-item i {
    color: var(--primary-color);
    margin-right: 15px;
    font-size: 1.2rem;
    margin-top: 3px;
}

/* Footer Styles */
footer {
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    color: white;
    padding: 60px 0 30px;
    margin-top: 80px;
}

footer h5 {
    color: white;
    margin-bottom: 20px;
    font-size: 1.1rem;
}

footer a {
    color: var(--light-color);
    transition: all 0.3s ease;
}

footer a:hover {
    color: white;
    text-decoration: none;
    transform: translateX(3px);
}

/* Scroll to Top Button */
#scrollToTopBtn {
    display: none;
    position: fixed;
    bottom: 110px;
    right: 30px;
    z-index: 998;
    border: none;
    outline: none;
    background: linear-gradient(135deg, var(--primary-color), #3b82f6);
    color: white;
    cursor: pointer;
    padding: 15px;
    border-radius: 50%;
    font-size: 20px;
    width: 50px;
    height: 50px;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#scrollToTopBtn:hover {
    background: linear-gradient(135deg, #1d4ed8, var(--primary-color));
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.5);
}

#scrollToTopBtn i {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Chatbot Styles */
#chatbot-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
}

#chatbot-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), #3b82f6);
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

#chatbot-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.6);
}

#chatbot-window {
    display: none;
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 380px;
    height: 550px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

#chatbot-window.active {
    display: flex;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#chatbot-header {
    background: linear-gradient(135deg, var(--primary-color), #3b82f6);
    color: white;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

#chatbot-header h3 {
    margin: 0;
    font-size: 18px;
    color: white;
}

#chatbot-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f8fafc;
}

.chat-message {
    margin-bottom: 15px;
    display: flex;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-message.bot {
    justify-content: flex-start;
}

.chat-message.user {
    justify-content: flex-end;
}

.message-content {
    max-width: 75%;
    padding: 12px 16px;
    border-radius: 12px;
    line-height: 1.5;
    font-size: 14px;
    white-space: pre-wrap;
}

.chat-message.bot .message-content {
    background: white;
    color: var(--text-color);
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.chat-message.user .message-content {
    background: var(--primary-color);
    color: white;
    border-bottom-right-radius: 4px;
}

#chatbot-input-container {
    padding: 15px;
    background: white;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 10px;
}

#chatbot-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 25px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s ease;
}

#chatbot-input:focus {
    border-color: var(--primary-color);
}

#chatbot-send {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--primary-color);
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

#chatbot-send:hover {
    background: #1d4ed8;
    transform: scale(1.05);
}

.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary-color);
    animation: typing 1.4s infinite;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.7;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    body {
        padding-top: 60px;
    }
    
    .hero-section, .page-header {
        padding: 60px 0 60px 0;
    }
    
    .profile-img {
        width: 150px;
        height: 150px;
    }
    
    .timeline-date {
        position: static;
        width: auto;
        text-align: left;
        margin-bottom: 10px;
    }
    
    .timeline::before {
        left: 5px;
    }
    
    .timeline-item::before {
        left: -35px;
    }
    
    .project-image {
        max-height: 300px;
    }
    
    .certificate-container {
        padding-top: 120%;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .project-links {
        flex-direction: column;
    }
    
    .project-links .btn {
        width: 100%;
        margin-bottom: 10px;
    }

    #scrollToTopBtn {
        bottom: 100px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 18px;
    }

    #chatbot-window {
        width: calc(100vw - 40px);
        height: calc(100vh - 150px);
        right: 20px;
        bottom: 90px;
    }
    
    #chatbot-container {
        bottom: 20px;
        right: 20px;
    }
}

/* Animation Effects */
@keyframes fadeInUp {
    from { 
        opacity: 0; 
        transform: translateY(20px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

.project-section {
    animation: fadeInUp 0.6s ease-out forwards;
}

.project-section:nth-child(1) { animation-delay: 0.1s; }
.project-section:nth-child(2) { animation-delay: 0.2s; }
.project-section:nth-child(3) { animation-delay: 0.3s; }
.project-section:nth-child(4) { animation-delay: 0.4s; }
.project-section:nth-child(5) { animation-delay: 0.5s; }
/* =========================
   Leadership Section
   ========================= */
#leadership .lead {
    font-size: 1.15rem;
    font-weight: 300;
    max-width: 800px; /* Keeps the intro text from being too wide */
    margin-left: auto;
    margin-right: auto;
}

.leadership-card {
    border: none; /* Remove default border */
    border-radius: 10px; /* Softer corners */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08); /* Softer, modern shadow */
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* The hover "effect" */
    height: 100%; /* Makes cards in the same row equal height */
}

.leadership-card:hover {
    transform: translateY(-8px); /* Lifts the card on hover */
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12); /* Stronger shadow on hover */
}

.leadership-card .card-title {
    font-weight: 600; /* Bolder title */
    margin-bottom: 1.25rem; /* More space below title */
}

/* Custom styled list */
.leadership-list {
    list-style: none; /* Remove default bullets */
    padding-left: 0;
}

.leadership-list li {
    position: relative;
    padding-left: 30px; /* Make space for custom icon */
    margin-bottom: 12px; /* Space out list items */
    font-size: 1.05rem; /* Slightly larger text */
}

/* Custom bullet icon (using Font Awesome) */
.leadership-list li::before {
    content: '\f005'; /* Font Awesome 'star' icon unicode */
    font-family: "Font Awesome 6 Free"; /* Use the solid icon font */
    font-weight: 900; 
    position: absolute;
    left: 0;
    top: 5px; /* Adjust vertical alignment */
    color: #007bff; /* Use your site's primary color */
    font-size: 0.9rem;
}
/* 🌙 Dark Mode */
body.dark-mode {
  background-color: #0f172a;
  color: #e2e8f0;
}

body.dark-mode .navbar {
  background: rgba(15, 23, 42, 0.95) !important;
}

body.dark-mode .card,
body.dark-mode .project-media,
body.dark-mode .project-section,
body.dark-mode .page-header,
body.dark-mode .hero-section {
  background-color: #1e293b !important;
  color: #e2e8f0;
  border-color: #334155 !important;
}

body.dark-mode h1, 
body.dark-mode h2, 
body.dark-mode h3, 
body.dark-mode h4 {
  color: #f1f5f9 !important;
}

body.dark-mode a {
  color: #60a5fa;
}

body.dark-mode a:hover {
  color: #93c5fd;
}

body.dark-mode .btn-primary {
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
  color: white;
}

body.dark-mode .btn-outline-primary {
  color: #93c5fd;
  border-color: #60a5fa;
}

body.dark-mode .btn-outline-primary:hover {
  background-color: #2563eb;
  color: white;
}

body.dark-mode .bg-light {
  background-color: #1e293b !important;
}

body.dark-mode .text-dark {
  color: #e2e8f0 !important;
}
/* 🔧 Fix unwanted white space below navbar */
body {
  margin: 0;
  padding: 0;
}

.navbar {
  margin-bottom: 0 !important;
}

.hero-section,
.page-header {
  margin-top: 0 !important;
  padding-top: calc(var(--navbar-height) + 20px);
}

main,
.container:first-of-type,
section:first-of-type {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Optional smooth fade when switching dark/light mode */
body {
  transition: background-color 0.4s ease, color 0.4s ease;
}
/* 🌙 Improve visibility for highlight items in dark mode */
body.dark-mode .highlight-item {
  background-color: #1e293b !important;
  color: #e2e8f0 !important;
  border: 1px solid #334155 !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

body.dark-mode .highlight-item i {
  color: #60a5fa !important; /* bright blue icons */
}

body.dark-mode .highlight-item span {
  color: #f1f5f9 !important; /* brighter text */
}

/* Optional: make highlight items in light mode a bit softer for consistency */
.highlight-item {
  background-color: #f8fafc;
  color: #1e293b;
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.3s ease;
}

.highlight-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}
/* 🌙 Improve text visibility for contact section and note boxes in dark mode */

/* Contact Information Section */
body.dark-mode .contact-info,
body.dark-mode .contact-info h2,
body.dark-mode .contact-info h5,
body.dark-mode .contact-info p,
body.dark-mode .contact-info a {
  color: #f1f5f9 !important; /* bright white-gray */
}

body.dark-mode .contact-info i {
  color: #60a5fa !important; /* accent blue for icons */
}

body.dark-mode .contact-info a:hover {
  color: #93c5fd !important;
}

/* Project Note / Innovation Boxes */
body.dark-mode .project-note {
  background-color: #1e293b !important;
  color: #e2e8f0 !important;
  border: 1px solid #334155 !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

body.dark-mode .project-note i {
  color: #3b82f6 !important; /* bright blue bulb icon */
}

body.dark-mode .project-note strong {
  color: #f8fafc !important;
}

/* General paragraph color fix */
body.dark-mode p,
body.dark-mode span,
body.dark-mode li {
  color: #e2e8f0 !important;
}
/* 🌙 Fix visibility for Key Takeaway and similar info boxes */
body.dark-mode .project-note {
  background: #1e293b !important; /* darker box for better contrast */
  color: #f1f5f9 !important;
  border: 1px solid #334155 !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  border-radius: 12px;
}

body.dark-mode .project-note i {
  color: #3b82f6 !important; /* blue lightbulb */
}

body.dark-mode .project-note strong {
  color: #f8fafc !important; /* bright title */
  font-weight: 600;
}

body.dark-mode .project-note:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 16px rgba(37, 99, 235, 0.35);
  transition: all 0.3s ease;
}

/* Optional: make it also look better in light mode for consistency */
.project-note {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #1e293b;
  padding: 15px 20px;
  border-radius: 12px;
  transition: all 0.3s ease;
}
/* 🌙 Fix timeline card visibility in dark mode */
body.dark-mode .timeline-item,
body.dark-mode .timeline-content,
body.dark-mode .card,
body.dark-mode .certificate-card {
  background-color: #1e293b !important;
  color: #f1f5f9 !important;
  border: 1px solid #334155 !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  border-radius: 12px;
}

body.dark-mode .timeline-content h5,
body.dark-mode .timeline-content h4,
body.dark-mode .timeline-content h3 {
  color: #f8fafc !important;
  font-weight: 600;
}

body.dark-mode .timeline-content p,
body.dark-mode .timeline-content span {
  color: #e2e8f0 !important;
}

body.dark-mode .timeline-content a.btn,
body.dark-mode .timeline-content .btn-outline-primary {
  color: #93c5fd !important;
  border-color: #60a5fa !important;
  background-color: transparent !important;
}

body.dark-mode .timeline-content a.btn:hover,
body.dark-mode .timeline-content .btn-outline-primary:hover {
  background-color: #2563eb !important;
  color: #ffffff !important;
  box-shadow: 0 0 10px rgba(37, 99, 235, 0.5);
  transform: translateY(-2px);
  transition: all 0.3s ease;
}

/* Optional: make the timeline line & dots bright in dark mode */
body.dark-mode .timeline::before {
  background-color: #3b82f6 !important;
}

body.dark-mode .timeline-dot {
  background-color: #3b82f6 !important;
  border-color: #60a5fa !important;
}
#mic-btn.listening {
  background-color: #2563eb;
  color: white;
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.7); }
  70% { box-shadow: 0 0 0 10px rgba(37, 99, 235, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0); }
}
.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
    transition: all 0.3s ease;
}
/* Chatbot Container */
#chatbot-container {
  position: fixed;
  bottom: 20px;
  right: 25px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

/* Chatbot Toggle Button */
#chatbot-toggle {
  background: #007bff;
  color: white;
  border: none;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  font-size: 24px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  cursor: pointer;
  transition: 0.3s;
}

#chatbot-toggle:hover {
  background: #0056b3;
}

/* Chatbot Window */
#chatbot-window {
  width: 330px;
  height: 420px;
  background: white;
  border-radius: 15px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.25);
  margin-bottom: 10px;
  display: none;
  flex-direction: column;
  overflow: hidden;
  animation: popUp 0.3s ease;
}

#chatbot-window.active {
  display: flex;
}

@keyframes popUp {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* Header */
#chatbot-header {
  background: #007bff;
  color: white;
  padding: 12px 15px;
  font-weight: bold;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#chatbot-header h3 {
  font-size: 1.1rem;
  margin: 0;
}

#chatbot-close {
  background: transparent;
  border: none;
  color: white;
  font-size: 22px;
  cursor: pointer;
}

/* Messages */
#chatbot-messages {
  flex: 1;
  padding: 10px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scroll-behavior: smooth;
}

/* Chat Bubbles */
.chat-message {
  display: flex;
}

.chat-message.user {
  justify-content: flex-end;
}

.chat-message.bot {
  justify-content: flex-start;
}

.message-content {
  max-width: 75%;
  padding: 10px 14px;
  border-radius: 18px;
  line-height: 1.3;
  word-wrap: break-word;
  font-size: 14px;
}

.chat-message.user .message-content {
  background: #007bff;
  color: white;
  border-bottom-right-radius: 4px;
}

.chat-message.bot .message-content {
  background: #f1f1f1;
  color: #333;
  border-bottom-left-radius: 4px;
}

/* Input Area */
.input-area {
  display: flex;
  align-items: center;
  padding: 10px;
  border-top: 1px solid #eee;
  background: #fafafa;
}

#chatbot-input {
  flex: 1;
  padding: 10px;
  border-radius: 20px;
  border: 1px solid #ccc;
  margin-right: 8px;
  font-size: 14px;
}

#chatbot-send, #mic-btn {
  background: #007bff;
  color: white;
  border: none;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: 0.3s;
}

#chatbot-send:hover, #mic-btn:hover {
  background: #0056b3;
}
/* --- Chatbot Styles --- */
#chatbot-container {
  position: fixed;
  bottom: 20px;
  right: 25px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

#chatbot-toggle {
  background: #007bff;
  color: white;
  border: none;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  font-size: 24px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  cursor: pointer;
  transition: 0.3s;
}
#chatbot-toggle:hover {
  background: #0056b3;
}

#chatbot-window {
  width: 330px;
  height: 420px;
  background: white;
  border-radius: 15px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.25);
  margin-bottom: 10px;
  display: none;
  flex-direction: column;
  overflow: hidden;
  animation: popUp 0.3s ease;
}

#chatbot-window.active {
  display: flex !important;
}

@keyframes popUp {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

#chatbot-header {
  background: #007bff;
  color: white;
  padding: 12px 15px;
  font-weight: bold;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
#chatbot-header h3 { margin: 0; font-size: 1.1rem; }
#chatbot-close { background: transparent; border: none; color: white; font-size: 22px; cursor: pointer; }

#chatbot-messages {
  flex: 1;
  padding: 10px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scroll-behavior: smooth;
}

.chat-message { display: flex; }
.chat-message.user { justify-content: flex-end; }
.chat-message.bot { justify-content: flex-start; }

.message-content {
  max-width: 75%;
  padding: 10px 14px;
  border-radius: 18px;
  line-height: 1.3;
  word-wrap: break-word;
  font-size: 14px;
}
.chat-message.user .message-content {
  background: #007bff;
  color: white;
  border-bottom-right-radius: 4px;
}
.chat-message.bot .message-content {
  background: #f1f1f1;
  color: #333;
  border-bottom-left-radius: 4px;
}

.input-area {
  display: flex;
  align-items: center;
  padding: 10px;
  border-top: 1px solid #eee;
  background: #fafafa;
}
#chatbot-input {
  flex: 1;
  padding: 10px;
  border-radius: 20px;
  border: 1px solid #ccc;
  margin-right: 8px;
}
#chatbot-send, #mic-btn {
  background: #007bff;
  color: white;
  border: none;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
#chatbot-send:hover, #mic-btn:hover { background: #0056b3; }
/* --- Chatbot Call-to-Action (CTA) Bubble --- */
/* --- Chatbot Call-to-Action (CTA) Bubble - SIDE POSITION --- */
.chatbot-cta {
    position: absolute;
    bottom: 8px;        /* Align vertically with the button */
    right: 75px;        /* Move to the LEFT of the button (60px button + gap) */
    width: 200px;       /* Fixed width for better mobile fit */
    background: white;
    padding: 12px 16px;
    border-radius: 15px;
    border-bottom-right-radius: 2px; /* Sharp corner pointing to button */
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    font-size: 13px;
    line-height: 1.4;
    color: #333;
    border: 1px solid #e2e8f0;
    z-index: 9999;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    
    /* Animation: Slide out from the button */
    opacity: 0;
    animation: floatOut 0.5s ease-out forwards 1s;
}

.chatbot-cta strong {
    color: var(--primary-color, #007bff);
    display: block;
    font-size: 14px;
    margin-bottom: 2px;
}

.chatbot-cta-close {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 0;
    font-size: 16px;
    line-height: 1;
    opacity: 0.6;
}

.chatbot-cta-close:hover {
    opacity: 1;
    color: #ef4444;
}

/* Animation: Slides slightly to the left */
@keyframes floatOut {
    from { opacity: 0; transform: translateX(10px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Hide on extremely small screens to prevent overlap */
@media (max-width: 320px) {
    .chatbot-cta {
        display: none;
    }
}
/* ⭐ ENHANCED CHATBOT STYLES - ADD TO YOUR styles.css */

/* Quick Reply Buttons */
.quick-reply-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    margin: 5px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    font-weight: 500;
}

.quick-reply-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.quick-reply-btn:active {
    transform: translateY(0);
}

#quick-replies {
    padding: 10px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px;
    max-height: 100px;
    overflow-y: auto;
    border-top: 1px solid #eee;
}

/* Enhanced Typing Indicator */
.typing-indicator {
    display: flex;
    gap: 5px;
    padding: 15px;
    align-items: center;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #667eea;
    animation: bounce 1.4s infinite ease-in-out;
}

.typing-indicator span:nth-child(1) { animation-delay: -0.32s; }
.typing-indicator span:nth-child(2) { animation-delay: -0.16s; }

@keyframes bounce {
    0%, 80%, 100% { 
        transform: scale(0);
        opacity: 0.5;
    }
    40% { 
        transform: scale(1);
        opacity: 1;
    }
}

/* Message Animations */
.chat-message {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Microphone Button Animation */
#mic-btn.listening {
    background: #ff4444;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.1); }
}

/* Settings Panel */
.chatbot-settings {
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
    padding: 8px !important;
    font-size: 11px !important;
    color: #666 !important;
    text-align: center;
}

/* Dark Mode Support */
body.dark-mode #quick-replies {
    border-top-color: #444;
}

body.dark-mode .chatbot-settings {
    background: #2a2a2a;
    border-top-color: #444;
    color: #aaa !important;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .quick-reply-btn {
        font-size: 12px;
        padding: 6px 12px;
    }

    #quick-replies {
        max-height: 80px;
    }
}
/* Chatbot Light Theme */
.chatbot-container.light {
    background: #ffffff;
    color: #000;
    border-color: #ddd;
}

.chatbot-container.light .chatbot-header {
    background: #2563eb;
    color: #fff;
}

/* Chatbot Dark Theme */
.chatbot-container.dark {
    background: #0f172a;
    color: #ffffff;
    border-color: #1e293b;
}

.chatbot-container.dark .chatbot-header {
    background: #1e293b;
    color: #fff;
}
/* =========================================
   CHATBOT DARK MODE FIX
   ========================================= */

/* 1. Main Window Background */
body.dark-mode #chatbot-window {
    background-color: #1e293b !important; /* Dark Slate */
    color: #f1f5f9 !important;
    border-color: #334155 !important;
    box-shadow: 0 5px 20px rgba(0,0,0,0.5);
}

/* 2. Header Styling */
body.dark-mode #chatbot-header {
    background: linear-gradient(135deg, #0f172a, #1e293b); /* Darker gradient */
    border-bottom: 1px solid #334155;
}

/* 3. Messages Area Background */
body.dark-mode #chatbot-messages {
    background-color: #0f172a !important; /* Very Dark Slate */
}

/* 4. Bot Message Bubbles (Grey/Blue instead of White) */
body.dark-mode .chat-message.bot .message-content {
    background-color: #334155 !important; 
    color: #f1f5f9 !important;
    border: 1px solid #475569;
    box-shadow: none;
}

/* 5. Links inside Bot Messages */
body.dark-mode .chat-message.bot .message-content a {
    color: #60a5fa !important; /* Light Blue */
}

/* 6. Input Area (Where you type) */
body.dark-mode #chatbot-input-container {
    background-color: #1e293b !important;
    border-top: 1px solid #334155 !important;
}

/* 7. The Input Field Itself */
body.dark-mode #chatbot-input {
    background-color: #0f172a !important;
    color: #f1f5f9 !important;
    border: 1px solid #334155 !important;
}

body.dark-mode #chatbot-input::placeholder {
    color: #94a3b8;
}

/* 8. Quick Replies (If you use them) */
body.dark-mode .quick-reply-btn {
    background: #334155;
    color: #e2e8f0;
    border: 1px solid #475569;
}

body.dark-mode .quick-reply-btn:hover {
    background: #475569;
}