:root {
    --primary-color: #4361ee;
    --secondary-color: #3a0ca3;
    --accent-color: #f72585;
    --dark-color: #212529;
    --light-color: #f8f9fa;
    --text-color: #2b2d42;
    --gradient-bg: linear-gradient(135deg, #4361ee 0%, #3a0ca3 100%);
    --card-bg: rgba(255, 255, 255, 0.95);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #f8f9fa;
    overflow-x: hidden;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 2rem;
    background: var(--gradient-bg);
    color: white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.navbar .logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.navbar .nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.navbar .nav-links a {
    color: rgba(255,255,255,0.9);
    font-weight: 500;
    position: relative;
    padding: 0.5rem 0;
    transition: all 0.3s;
    font-size: 1.05rem;
}

.navbar .nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: white;
    transition: width 0.3s;
}

.navbar .nav-links a:hover::after {
    width: 100%;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 8rem 2rem 4rem;
    background: var(--gradient-bg);
    color: white;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    bottom: -50px;
    left: -50px;
    width: 200px;
    height: 200px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
}

.hero::after {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 300px;
    height: 300px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
}

.profile-img {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid rgba(255,255,255,0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 2.8rem;
    margin-bottom: 0.5rem;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: relative;
    z-index: 1;
}

.dynamic-titles {
    height: 60px;
    position: relative;
    margin: 0.8rem 0 1.5rem;
    overflow: hidden;
}

.title {
    position: absolute;
    width: 100%;
    font-size: 1.8rem;
    font-weight: 400;
    color: rgba(255,255,255,0.9);
    opacity: 0;
    transition: all 0.5s ease;
    top: 0;
    left: 0;
}

.title.active {
    opacity: 1;
}

.hero .intro {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: white;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    z-index: 1;
    line-height: 1.8;
}

.quote-container {
    margin: 2rem 0;
    position: relative;
    z-index: 1;
}

.quote {
    font-size: 1.2rem;
    font-style: italic;
    margin: 0.8rem 0;
    padding: 0.8rem 1.5rem;
    background: rgba(255,255,255,0.15);
    color: white;
    border-left: 4px solid white;
    border-radius: 0 8px 8px 0;
    display: inline-block;
    backdrop-filter: blur(5px);
}

/* Sections Common Styles */
section {
    padding: 6rem 2rem;
    position: relative;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    color: var(--dark-color);
    font-size: 2.5rem;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: var(--primary-color);
    margin: 0.8rem auto;
    border-radius: 2px;
}

/* Resume Section */
.resume-section {
    background-color: white;
}

.resume-container {
    max-width: 600px;
    margin: 0 auto;
}

.resume-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.05);
    transition: all 0.3s;
}

.resume-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
}

.resume-preview {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: rgba(67, 97, 238, 0.05);
    border-radius: 8px;
}

.resume-icon {
    font-size: 2.5rem;
    color: var(--accent-color);
}

.resume-info h3 {
    color: var(--dark-color);
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.resume-info p {
    color: var(--text-light);
    font-size: 0.95rem;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem 2rem;
    background: var(--primary-color);
    color: white;
    border-radius: 8px;
    font-weight: 500;
    font-size: 1.1rem;
    transition: all 0.3s;
    width: 100%;
    justify-content: center;
    border: none;
    cursor: pointer;
}

.download-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(67, 97, 238, 0.3);
}

/* Skills Section */
.skills-section {
    background-color: #f8fafc;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.skill-category {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.05);
    transition: all 0.3s;
}

.skill-category:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
}

.skill-icon {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    width: 60px;
    height: 60px;
    background: rgba(67, 97, 238, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.skill-category h3 {
    color: var(--dark-color);
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.skill-category ul {
    list-style: none;
}

.skill-category li {
    padding: 0.8rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    font-size: 1rem;
}

.skill-category li:last-child {
    border-bottom: none;
}

.skill-category li::before {
    content: '▹';
    color: var(--primary-color);
    margin-right: 0.8rem;
    font-size: 1.2rem;
}

.leetcode-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-top: 0.5rem;
}

.solved {
    background: var(--primary-color);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Contact Section */
.contact-section {
    background-color: white;
}

.contact-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    max-width: 800px;
    margin: 0 auto;
}

.contact-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s;
    min-width: 200px;
    color: white;
    font-size: 1.05rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.contact-button i {
    margin-right: 0.8rem;
    font-size: 1.2rem;
}

.linkedin { background: #0077b5; }
.github { background: #333; }
.email { background: var(--accent-color); }

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

/* Footer */
footer {
    text-align: center;
    padding: 2.5rem;
    background: var(--gradient-bg);
    color: white;
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: rgba(255,255,255,0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar {
        padding: 1rem;
    }

    .navbar .nav-links {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: var(--gradient-bg);
        flex-direction: column;
        align-items: center;
        padding: 2rem 0;
        transition: left 0.3s;
        backdrop-filter: blur(10px);
    }

    .navbar .nav-links.active {
        left: 0;
    }

    .menu-toggle {
        display: block;
    }

    .hamburger {
        width: 25px;
        height: 3px;
        background: white;
        position: relative;
    }

    .hamburger::before,
    .hamburger::after {
        content: '';
        position: absolute;
        width: 25px;
        height: 3px;
        background: white;
        transition: all 0.3s;
    }

    .hamburger::before {
        top: -8px;
    }

    .hamburger::after {
        top: 8px;
    }

    .menu-toggle.active .hamburger {
        background: transparent;
    }

    .menu-toggle.active .hamburger::before {
        transform: rotate(45deg);
        top: 0;
    }

    .menu-toggle.active .hamburger::after {
        transform: rotate(-45deg);
        top: 0;
    }

    .hero {
        padding: 7rem 1.5rem 3rem;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .title {
        font-size: 1.5rem;
    }

    .dynamic-titles {
        height: 50px;
    }

    section {
        padding: 4rem 1.5rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    .contact-button {
        min-width: 100%;
    }
}

/* Chatbot Styles */
.chatbot-container {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 350px;
    max-height: 500px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: translateY(20px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    border: 1px solid rgba(0,0,0,0.1);
}

.chatbot-container.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.chatbot-header {
    background: var(--gradient-bg);
    color: white;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.close-chatbot {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0 0.5rem;
}

.chatbot-messages {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    background: #f9f9f9;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.message {
    max-width: 80%;
    padding: 0.8rem 1rem;
    border-radius: 12px;
    font-size: 0.9rem;
    line-height: 1.4;
}

.user-message {
    align-self: flex-end;
    background: var(--primary-color);
    color: white;
    border-bottom-right-radius: 5px;
}

.bot-message {
    align-self: flex-start;
    background: white;
    color: var(--text-color);
    border: 1px solid rgba(0,0,0,0.1);
    border-bottom-left-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.chatbot-input {
    display: flex;
    padding: 0.8rem;
    border-top: 1px solid rgba(0,0,0,0.1);
    background: white;
}

.chatbot-query {
    flex: 1;
    padding: 0.8rem;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 8px;
    font-size: 0.9rem;
    outline: none;
    transition: border 0.3s;
}

.chatbot-query:focus {
    border-color: var(--primary-color);
}

.send-query {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0 1rem;
    margin-left: 0.5rem;
    cursor: pointer;
    transition: background 0.3s;
}

.send-query:hover {
    background: var(--secondary-color);
}

.chatbot-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--gradient-bg);
    color: white;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(67, 97, 238, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    transition: all 0.3s;
}

.chatbot-toggle:hover {
    transform: scale(1.1);
}

/* Loading animation */
.typing-indicator {
    display: flex;
    padding: 0.8rem 1rem;
    background: white;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.1);
    align-self: flex-start;
    margin-bottom: 0.8rem;
}

.typing-indicator span {
    height: 8px;
    width: 8px;
    background: var(--primary-color);
    border-radius: 50%;
    display: inline-block;
    margin: 0 2px;
    animation: typing 1s infinite ease-in-out;
}

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

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

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

@media (max-width: 480px) {
    .chatbot-container {
        width: 90%;
        right: 5%;
        bottom: 70px;
        max-height: 60vh;
    }
    
    .chatbot-toggle {
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
    }
}