/* --- Global Styles & Variables --- */
:root {
    --bg-color: #121212;
    --primary-color: #1e1e1e;
    --font-color: #e0e0e0;
    --secondary-font-color: #a0a0a0;
    --accent-color: #03dac6;
    --border-color: #333;
}
body.light-mode {
    --bg-color: #f5f5f5;
    --primary-color: #ffffff;
    --font-color: #333333;
    --secondary-font-color: #666666;
    --accent-color: #6200ea;
    --border-color: #e0e0e0;
}
body {
    background-color: var(--bg-color);
    color: var(--font-color);
    font-family: 'Poppins', sans-serif;
    margin: 0;
    transition: background-color 0.4s, color 0.4s;
    overflow-x: hidden;
    cursor: none; /* Hide the default cursor */
}
/* --- Stylish Cursor --- */
.cursor-dot, .cursor-follower {
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
}
.cursor-dot {
    width: 8px;
    height: 8px;
    background-color: var(--accent-color);
}
.cursor-follower {
    width: 30px;
    height: 30px;
    background-color: rgba(3, 218, 198, 0.2);
    border: 1px solid rgba(3, 218, 198, 0.4);
    transition: transform 0.2s ease-out, width 0.3s, height 0.3s, background-color 0.3s;
}
.cursor-follower.hovered {
    width: 45px;
    height: 45px;
    background-color: rgba(3, 218, 198, 0.4);
}
body.light-mode .cursor-dot { background-color: var(--accent-color); }
body.light-mode .cursor-follower {
    background-color: rgba(98, 0, 234, 0.2);
    border: 1px solid rgba(98, 0, 234, 0.4);
}
body.light-mode .cursor-follower.hovered { background-color: rgba(98, 0, 234, 0.4); }

/* --- Particle Background --- */
#particles-js { position: fixed; width: 100%; height: 100%; top: 0; left: 0; z-index: -1; }

/* --- Header & Navigation --- */
header { position: fixed; width: 100%; top: 0; left: 0; z-index: 1000; background-color: rgba(30, 30, 30, 0.8); backdrop-filter: blur(10px); transition: background-color 0.4s; }
body.light-mode header { background-color: rgba(255, 255, 255, 0.8); }
nav { display: flex; justify-content: space-between; align-items: center; max-width: 1200px; margin: 0 auto; padding: 1rem 2rem; }
.logo { font-size: 1.8rem; font-weight: 700; color: var(--accent-color); }
nav ul { list-style: none; display: flex; gap: 2rem; margin: 0; padding: 0; }
nav a { text-decoration: none; color: var(--font-color); font-weight: 600; position: relative; padding-bottom: 5px; }
nav a::after { content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 2px; background-color: var(--accent-color); transition: width 0.3s; }
nav a:hover::after, nav a.active::after { width: 100%; }

/* --- Main Content & Sections --- */
.container { max-width: 1200px; margin: 0 auto; padding: 8rem 2rem 4rem; text-align: center; }
section { padding: 4rem 0; }
h1, h2, h3 { color: var(--font-color); }
h1 { font-size: 3.5rem; }
h2 { font-size: 2.5rem; margin-bottom: 3rem; position: relative; display: inline-block; }
h2::after { content: ''; position: absolute; bottom: -10px; left: 50%; transform: translateX(-50%); width: 60px; height: 4px; background-color: var(--accent-color); border-radius: 2px; }

/* --- Hero Section (Home Page) --- */
#hero { min-height: 70vh; display: flex; flex-direction: column; justify-content: center; align-items: center; }
#ai-bio-container { min-height: 100px; max-width: 700px; margin-bottom: 1.5rem; }
.subtitle { font-size: 1.5rem; color: var(--secondary-font-color); margin-top: -1rem; margin-bottom: 1.5rem; }
#ai-bio-text { max-width: 700px; font-size: 1.1rem; line-height: 1.6; margin-bottom: 2rem; }
.hero-buttons button, .hero-buttons a { margin: 0.5rem; }

/* --- About & Skills Page --- */
.about-content p { max-width: 800px; margin: 0 auto 3rem auto; text-align: left; line-height: 1.7; }
.skills-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 2rem; text-align: left; }
.skill-category h3 { color: var(--accent-color); border-bottom: 2px solid var(--border-color); padding-bottom: 0.5rem; margin-bottom: 1rem; }
.skill-category ul { list-style: none; padding: 0; }
.skill-category li { background-color: var(--primary-color); padding: 10px 15px; margin-bottom: 8px; border-radius: 5px; border-left: 3px solid var(--accent-color); transition: transform 0.2s; }
.skill-category li:hover { transform: translateX(5px); }

/* --- Experience Page (Timeline) --- */
.timeline { position: relative; max-width: 800px; margin: 2rem auto; text-align: left; }
.timeline::after { content: ''; position: absolute; width: 3px; background-color: var(--accent-color); top: 0; bottom: 0; left: 50%; margin-left: -1.5px; }
.timeline-item { padding: 10px 40px; position: relative; width: 50%; box-sizing: border-box; }
.timeline-item:nth-child(odd) { left: 0; padding-right: 25px; text-align: right; }
.timeline-item:nth-child(even) { left: 50%; padding-left: 25px; text-align: left; }
.timeline-item h3 { margin-top: 0; }
.timeline-date { font-weight: 600; color: var(--accent-color); margin-bottom: 0.5rem; }
.timeline-item ul { padding-left: 20px; }

/* --- Projects Page --- */
.project-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 2rem; }
.project-card { background-color: var(--primary-color); border: 1px solid var(--border-color); border-radius: 8px; padding: 2rem; text-align: left; transition: transform 0.3s, box-shadow 0.3s; }
.project-card:hover { transform: translateY(-10px); box-shadow: 0 10px 20px rgba(0,0,0,0.2); }
.project-card h3 { margin-top: 0; color: var(--accent-color); }
.tech-tags { margin: 1rem 0; }
.tech-tags span { display: inline-block; background-color: var(--bg-color); border: 1px solid var(--border-color); padding: 5px 10px; border-radius: 15px; font-size: 0.8rem; margin-right: 5px; margin-bottom: 5px; }
.project-links .btn { text-decoration: none; margin-top: 1rem; width: 100%; box-sizing: border-box; text-align: center; }
.project-links .btn i { margin-left: 8px; }

/* --- Contact Page --- */
#contact-form { max-width: 700px; margin: 2rem auto; text-align: left; }
.form-group { margin-bottom: 1.5rem; position: relative; }
.form-group label { display: block; margin-bottom: 0.5rem; font-weight: 600; }
.form-group input, .form-group textarea { width: 100%; padding: 12px; border-radius: 5px; border: 1px solid var(--border-color); background-color: var(--primary-color); color: var(--font-color); font-family: 'Poppins', sans-serif; font-size: 1rem; transition: border-color 0.3s, background-color 0.4s; box-sizing: border-box; }
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--accent-color); }
.contact-info { margin-top: 3rem; }
.contact-info p { margin: 0.5rem 0; }
.social-links { margin-top: 1rem; }
.social-links a { font-size: 1.5rem; margin: 0 1rem; color: var(--secondary-font-color); transition: color 0.3s; }
.social-links a:hover { color: var(--accent-color); }
.resume-download-section { margin-top: 3rem; }

/* --- Buttons --- */
.btn { display: inline-block; padding: 12px 24px; background-color: var(--accent-color); color: var(--bg-color); text-decoration: none; border-radius: 5px; font-weight: 600; transition: transform 0.3s, box-shadow 0.3s; border: none; cursor: pointer; }
body.light-mode .btn { color: #fff; }
.btn:hover { transform: translateY(-3px); box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2); }
.btn-secondary { background-color: transparent; border: 2px solid var(--accent-color); color: var(--accent-color); }
.ai-btn { position: absolute; top: 0; right: 0; background: linear-gradient(90deg, var(--accent-color), #3ddc84); color: #121212; border: none; padding: 6px 12px; font-size: 0.8rem; border-radius: 15px; font-weight: 600; transition: transform 0.3s; cursor: pointer; display: flex; align-items: center; gap: 5px; }
.ai-btn:hover { transform: scale(1.05); }
body.light-mode .ai-btn { background: linear-gradient(90deg, var(--accent-color), #8e44ad); color: #fff; }

/* --- Theme Switch --- */
.theme-switch-wrapper { display: flex; align-items: center; }
.theme-switch { position: relative; display: inline-block; width: 60px; height: 34px; }
.theme-switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #333; transition:.4s; display: flex; align-items: center; justify-content: space-between; padding: 0 5px; }
.slider.round { border-radius: 34px; }
.slider i { color: #f0e68c; }
.slider:before { position: absolute; content: ""; height: 26px; width: 26px; left: 4px; bottom: 4px; background-color: white; transition:.4s; border-radius: 50%; }
input:checked + .slider { background-color: #ccc; }
input:checked + .slider:before { transform: translateX(26px); }

/* --- AI Chatbot Styles --- */
#chatbot-container { position: fixed; bottom: 30px; right: 30px; z-index: 1001; }
#chatbot-toggle { width: 60px; height: 60px; background-color: var(--accent-color); color: var(--bg-color); border-radius: 50%; display: flex; justify-content: center; align-items: center; font-size: 1.8rem; box-shadow: 0 5px 15px rgba(0,0,0,0.2); transition: transform 0.3s; cursor: pointer; }
#chatbot-toggle:hover { transform: scale(1.1); }
body.light-mode #chatbot-toggle { color: #fff; }
#chatbot-window { position: absolute; bottom: 80px; right: 0; width: 350px; height: 450px; background-color: var(--primary-color); border: 1px solid var(--border-color); border-radius: 15px; box-shadow: 0 10px 20px rgba(0,0,0,0.2); display: flex; flex-direction: column; overflow: hidden; transform: scale(0); transform-origin: bottom right; transition: transform 0.3s ease-out; }
#chatbot-window.open { transform: scale(1); }
#chatbot-header { padding: 1rem; background-color: var(--bg-color); border-bottom: 1px solid var(--border-color); display: flex; justify-content: space-between; align-items: center; }
#chatbot-header h3 { margin: 0; color: var(--accent-color); }
#chatbot-close { background: none; border: none; color: var(--font-color); font-size: 1.5rem; cursor: pointer; }
#chatbot-body { flex-grow: 1; padding: 1rem; overflow-y: auto; }
.chat-message { margin-bottom: 1rem; padding: 0.75rem 1rem; border-radius: 10px; max-width: 80%; word-wrap: break-word; }
.chat-message.user { background-color: var(--accent-color); color: var(--bg-color); margin-left: auto; border-bottom-right-radius: 0; }
body.light-mode .chat-message.user { color: #fff; }
.chat-message.bot { background-color: var(--bg-color); border: 1px solid var(--border-color); border-bottom-left-radius: 0; }
.chat-message.bot.thinking span { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--secondary-font-color); margin: 0 2px; animation: bounce 1.4s infinite ease-in-out both; }
.chat-message.bot.thinking span:nth-child(1) { animation-delay: -0.32s; }
.chat-message.bot.thinking span:nth-child(2) { animation-delay: -0.16s; }
@keyframes bounce { 0%, 80%, 100% { transform: scale(0); } 40% { transform: scale(1.0); } }
#chatbot-input-container { display: flex; padding: 0.5rem; border-top: 1px solid var(--border-color); }
#chatbot-input { flex-grow: 1; border: none; background: transparent; padding: 0.75rem; color: var(--font-color); }
#chatbot-input:focus { outline: none; }
#chatbot-send { background: none; border: none; color: var(--accent-color); font-size: 1.2rem; padding: 0.5rem 1rem; cursor: pointer; }

/* --- Footer --- */
footer { padding: 2rem; text-align: center; color: var(--secondary-font-color); }
