/* Base styles */
:root {
    --primary-color: #4361ee;
    --secondary-color: #3a0ca3;
    --accent-color: #4cc9f0;
    --text-color: #333;
    --light-text: #f8f9fa;
    --bg-color: #ffffff;
    --section-bg: #f8f9fa;
    --card-bg: #ffffff;
    --border-radius: 8px;
    --box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3, h4, h5, h6 {
    margin-bottom: 15px;
    line-height: 1.3;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}

a:hover {
    color: var(--secondary-color);
}

ul {
    list-style: none;
}

section {
    padding: 80px 0;
}

section:nth-child(even) {
    background-color: var(--section-bg);
}

.btn {
    display: inline-block;
    padding: 12px 25px;
    background-color: var(--primary-color);
    color: white;
    border-radius: var(--border-radius);
    font-weight: 500;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.btn:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
    box-shadow: var(--box-shadow);
    color: white;
}

/* Header styles */
header {
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 15px 0;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 0;
}

.logo span {
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    gap: 25px;
}

.nav-links a {
    color: var(--text-color);
    font-weight: 500;
    position: relative;
}

.nav-links a.active,
.nav-links a:hover {
    color: var(--primary-color);
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--primary-color);
    transition: var(--transition);
}

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

.hamburger {
    display: none;
    cursor: pointer;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    margin: 5px 0;
    transition: var(--transition);
}

/* Hero section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, rgba(67, 97, 238, 0.1) 0%, rgba(76, 201, 240, 0.1) 100%);
    text-align: center;
    padding-top: 80px;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    animation: fadeInDown 1s ease;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    color: #555;
    animation: fadeInUp 1s ease 0.3s forwards;
    opacity: 0;
}

.hero .btn {
    animation: fadeInUp 1s ease 0.6s forwards;
    opacity: 0;
}

/* About section */
.about p {
    font-size: 1.1rem;
    max-width: 800px;
    margin: 0 auto;
}

/* Skills section */
.skills ul {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.skills li {
    background-color: var(--card-bg);
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.skills li:hover {
    transform: translateY(-5px);
}

.skills strong {
    color: var(--primary-color);
}

/* Projects section */
.projects .container {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.project-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 40px;
}

.filter-btn {
    padding: 8px 20px;
    border: 2px solid var(--primary-color);
    border-radius: 25px;
    background: transparent;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-color);
    color: white;
}

.project-card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    padding: 25px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease-out;
}

.project-card.show {
    opacity: 1;
    transform: translateY(0);
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.project-card h3 {
    color: var(--primary-color);
}

.project-card a {
    align-self: flex-start;
    margin-top: auto;
    padding: 8px 15px;
    background-color: var(--primary-color);
    color: white;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    transition: var(--transition);
}

.project-card a:hover {
    background-color: var(--secondary-color);
}

/* Experience section */
.experience-card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: var(--box-shadow);
    position: relative;
    border-left: 4px solid var(--primary-color);
}

.experience-card h3 {
    color: var(--primary-color);
}

.experience-card ul {
    margin-top: 15px;
}

.experience-card li {
    margin-bottom: 10px;
    position: relative;
    padding-left: 20px;
}

.experience-card li::before {
    content: "•";
    color: var(--primary-color);
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* Education section */
.education-card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: var(--box-shadow);
    border-left: 4px solid var(--secondary-color);
}

.education-card h3 {
    color: var(--secondary-color);
}

/* Contact section */
.contact p {
    margin-bottom: 30px;
    font-size: 1.1rem;
}

.contact ul {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact li {
    display: flex;
    align-items: center;
    gap: 10px;
}

.contact li i {
    color: var(--primary-color);
    font-size: 1.2rem;
    width: 25px;
}

/* Contact list styling */
.contact-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-list li {
    display: flex;
    align-items: center;
}

.contact-list .icon {
    margin-right: 8px;
    color: var(--primary-color);
}

.contact-list .icon i {
    font-size: 1.2rem;
    width: 25px;
}

.contact-list li::before {
    content: none !important; /* disables unwanted icons if injected by CSS */
}

/* Hero section additions */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, rgba(67, 97, 238, 0.1) 0%, rgba(76, 201, 240, 0.1) 100%);
    text-align: center;
    padding-top: 80px;
}

.hero-content {
    width: 100%;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    animation: fadeInDown 1s ease;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    color: #555;
    animation: fadeInUp 1s ease 0.3s forwards;
    opacity: 0;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
    animation: fadeInUp 1s ease 0.6s forwards;
    opacity: 0;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
    animation: fadeInUp 1s ease 0.9s forwards;
    opacity: 0;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    transition: var(--transition);
}

.social-icons a:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
}

.social-icons i {
    font-size: 1.2rem;
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Responsive styles */
@media screen and (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background-color: white;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transition: 0.5s;
        box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
    }
    
    .nav-links.active {
        left: 0;
    }
    
    .hamburger {
        display: block;
    }
    
    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    section {
        padding: 60px 0;
    }
    
    .projects .container {
        gap: 30px;
    }
}

@media screen and (min-width: 769px) {
    .projects .container {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
        gap: 30px;
    }
    
    .projects h2 {
        grid-column: 1 / -1;
    }
}

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

.hero .container {
    position: relative;
    z-index: 2;
}

/* Add hover effects to project cards */
.project-card {
    position: relative;
    overflow: hidden;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transform: translateY(-100%);
    transition: transform 0.3s ease;
}

.project-card:hover::before {
    transform: translateY(0);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

/* Skill item animations */
.skills li {
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.skills li::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transition: width 0.5s ease;
    z-index: -1;
}

.skills li:hover::after {
    width: 100%;
}

/* Add animated underline to section headings */
section h2 {
    position: relative;
    display: inline-block;
    margin-bottom: 40px;
}

section h2::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -10px;
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transition: width 0.5s ease;
}

section:hover h2::after {
    width: 100%;
}

/* Typing animation styles */
#typed {
    font-size: 1.2rem;
    color: #555;
}

.typed-cursor {
    font-size: 1.2rem;
    color: var(--primary-color);
}

/* Skill progress bars */
.skill-categories {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.skill-category {
    background-color: var(--card-bg);
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: transform 0.3s ease;
}

.skill-category:hover {
    transform: translateY(-5px);
}

.skill-category h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
}

.skill-category h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -5px;
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transition: width 0.3s ease;
}

.skill-category:hover h3::after {
    width: 100%;
}

.skill-item {
    margin-bottom: 15px;
}

.skill-item span {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.progress-bar {
    height: 8px;
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 4px;
    width: 0;
    animation: progressAnimation 1.5s ease-out forwards;
}

@keyframes progressAnimation {
    from { width: 0; }
}

/* Add scroll reveal animation */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Chat widget floating styles */
.chat-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 340px;
    height: 420px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(67,97,238,0.18);
    display: none;
    flex-direction: column;
    z-index: 1001;
    overflow: hidden;
    transition: box-shadow 0.3s, transform 0.3s;
}

.chat-widget:not(.minimized) {
    display: flex;
}

.chat-header {
    background: var(--primary-color);
    color: #fff;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 16px 16px 0 0;
}

.chat-header h3 {
    font-size: 1.1em;
    font-weight: 600;
    margin: 0;
}

.minimize-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.1em;
    cursor: pointer;
}

.chat-messages {
    flex: 1;
    padding: 18px;
    overflow-y: auto;
    background: #f8f9fa;
}

.message {
    margin: 10px 0;
    padding: 10px 16px;
    border-radius: 14px;
    max-width: 80%;
    word-break: break-word;
    font-size: 0.98em;
}

.message.user {
    background: #e3f2fd;
    margin-left: auto;
    border-radius: 14px 14px 0 14px;
}

.message.bot {
    background: #f5f5f5;
    margin-right: auto;
    border-radius: 14px 14px 14px 0;
}

.chat-input {
    padding: 14px 18px;
    border-top: 1px solid #eee;
    background: #fff;
}

.chat-input form {
    display: flex;
    gap: 8px;
}

.chat-input input[type="text"] {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 1em;
    outline: none;
}

.chat-input button[type="submit"] {
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    font-size: 1.1em;
    cursor: pointer;
    transition: background 0.2s;
}

.chat-input button[type="submit"]:hover {
    background: var(--secondary-color);
}

/* Floating chat icon */
.chat-toggle-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2em;
    box-shadow: 0 4px 16px rgba(67,97,238,0.18);
    cursor: pointer;
    z-index: 1002;
    transition: background 0.2s, transform 0.2s;
}

.chat-toggle-btn:hover {
    background: var(--secondary-color);
    transform: scale(1.08);
}

@media (max-width: 600px) {
    .chat-widget {
        width: 98vw;
        right: 1vw;
        left: 1vw;
        min-width: unset;
        max-width: 100vw;
        height: 60vh;
        bottom: 10px;
    }
    .chat-toggle-btn {
        right: 10px;
        bottom: 10px;
        width: 52px;
        height: 52px;
        font-size: 1.6em;
    }
}