/* Global Styles */
:root {
    --primary-color: #3498db;
    --secondary-color: #2c3e50;
    --accent-color: #e74c3c;
    --light-color: #ecf0f1;
    --dark-color: #2c3e50;
    --text-color: #333;
    --text-light: #7f8c8d;
    --white: #fff;
    --black: #000;
    --box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

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

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
}

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

section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
    font-size: 2.5rem;
    position: relative;
}

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

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 2px;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition);
    cursor: pointer;
    text-decoration: none;
    font-size: 0.9rem;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
    border: 2px solid var(--primary-color);
}

.btn-primary:hover {
    background: transparent;
    color: var(--primary-color);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    margin-left: 15px;
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: var(--white);
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: var(--transition);
}

nav.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 30px;
}

.nav-links a {
    color: var(--dark-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    position: relative;
}

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

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

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

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

.hamburger .line {
    width: 25px;
    height: 3px;
    background: var(--dark-color);
    margin: 5px;
    transition: var(--transition);
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    position: relative;
    overflow: hidden;
}

.hero .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 1;
}

.hero-content {
    flex: 1;
    max-width: 600px;
}

.hero-content h4 {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 15px;
    line-height: 1.2;
}

.hero-content h3 {
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 20px;
    color: var(--text-light);
}

.hero-content p {
    margin-bottom: 30px;
    font-size: 1.1rem;
}

.hero-buttons {
    display: flex;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    position: relative;
}

.image-wrapper {
    position: relative;
    width: 350px;
    height: 350px;
    border-radius: 50%;
    overflow: hidden;
    border: 10px solid rgba(255, 255, 255, 0.2);
    box-shadow: var(--box-shadow);
}

.image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.glow {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(52, 152, 219, 0.4) 0%, rgba(52, 152, 219, 0) 70%);
    animation: pulse 3s infinite;
}

.pattern {
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    background: radial-gradient(circle, transparent 40%, var(--primary-color) 40%);
    background-size: 20px 20px;
    opacity: 0.1;
    border-radius: 50%;
    animation: rotate 20s linear infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); opacity: 0.6; }
    50% { transform: scale(1.05); opacity: 0.9; }
    100% { transform: scale(0.95); opacity: 0.6; }
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* About Section */
.about {
    background: var(--white);
}

.about-content {
    display: flex;
    align-items: center;
    gap: 50px;
}

.about-image {
    flex: 1;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

.about-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: var(--transition);
}

.about-image:hover img {
    transform: scale(1.05);
}

.about-text {
    flex: 1;
}

.about-text h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--dark-color);
}

.about-text p {
    margin-bottom: 30px;
    font-size: 1.1rem;
}

.education {
    margin-bottom: 30px;
}

.education h4 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: var(--dark-color);
}

.edu-item {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px dashed #ddd;
}

.edu-item:last-child {
    border-bottom: none;
}

.edu-item h5 {
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: var(--dark-color);
}

.edu-item p {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-bottom: 5px;
}

.about-buttons {
    display: flex;
    margin-top: 30px;
}

/* Skills Section */
.skills {
    background: #f9f9f9;
}

.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.skill-category {
    background: var(--white);
    padding: 30px;
    border-radius: 10px;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

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

.skill-category h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: var(--dark-color);
    text-align: center;
}

.skill-items {
    margin-top: 20px;
}

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

.skill-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.skill-info span:first-child {
    font-weight: 600;
}

.skill-info span:last-child {
    color: var(--text-light);
}

.skill-bar {
    height: 10px;
    background: #f1f1f1;
    border-radius: 5px;
    overflow: hidden;
}

.skill-level {
    height: 100%;
    background: var(--primary-color);
    border-radius: 5px;
    width: 0;
    transition: width 1.5s ease;
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.project-card {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

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

.project-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.project-card:hover .project-image img {
    transform: scale(1.1);
}

.project-links {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: var(--transition);
}

.project-card:hover .project-links {
    opacity: 1;
}

.project-links a {
    color: var(--white);
    font-size: 1.5rem;
    margin: 0 15px;
    width: 50px;
    height: 50px;
    cursor: pointer;
    border-radius: 50%;
    background: var(--primary-color);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: var(--transition);
}

.project-links a:hover {
    background: var(--accent-color);
    transform: translateY(-5px);
}

.project-info {
    padding: 20px;
}

.project-info h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--dark-color);
}

.project-info p {
    margin-bottom: 15px;
    color: var(--text-light);
    font-size: 0.95rem;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.project-tech span {
    background: #f1f1f1;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--text-light);
}

/* Experience Section */
.experience {
    background: var(--white);
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    background: var(--primary-color);
}

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

.timeline-date {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color);
    color: var(--white);
    padding: 8px 15px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: var(--box-shadow);
}

.timeline-content {
    width: calc(50% - 40px);
    padding: 20px;
    background: #f9f9f9;
    border-radius: 10px;
    box-shadow: var(--box-shadow);
    position: relative;
}

.timeline-item:nth-child(odd) .timeline-content {
    margin-left: auto;
}

.timeline-content::after {
    content: '';
    position: absolute;
    top: 20px;
    width: 0;
    height: 0;
    border-style: solid;
}

.timeline-item:nth-child(even) .timeline-content::after {
    right: 100%;
    border-width: 10px 15px 10px 0;
    border-color: transparent #f9f9f9 transparent transparent;
}

.timeline-item:nth-child(odd) .timeline-content::after {
    left: 100%;
    border-width: 10px 0 10px 15px;
    border-color: transparent transparent transparent #f9f9f9;
}

.timeline-content h3 {
    font-size: 1.2rem;
    margin-bottom: 5px;
    color: var(--primary-color);
}

.timeline-content h4 {
    font-size: 1rem;
    margin-bottom: 10px;
    color: var(--dark-color);
}

.timeline-content p {
    margin-bottom: 10px;
    font-size: 0.95rem;
}

.projects-worked {
    margin-top: 15px;
}

.projects-worked span {
    font-weight: 600;
    color: var(--dark-color);
}

.projects-worked ul {
    margin-top: 5px;
    padding-left: 20px;
}

.projects-worked li {
    font-size: 0.9rem;
    color: var(--text-light);
}

/* Courses Section */
.courses {
    background: #f9f9f9;
}

.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.course-card {
    background: var(--white);
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

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

.course-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.course-card h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

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

/* Contact Section */
.contact {
    background: var(--white);
}

.contact-content {
    display: flex;
    gap: 50px;
}

.contact-info {
    flex: 1;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 30px;
}

.contact-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-right: 20px;
    margin-top: 5px;
}

.contact-item h3 {
    font-size: 1.2rem;
    margin-bottom: 5px;
    color: var(--dark-color);
}

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

.social-links {
    display: flex;
    margin-top: 30px;
}

.social-links a {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f1f1f1;
    color: var(--dark-color);
    margin-right: 15px;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-5px);
}

.contact-form {
    flex: 1;
    background: #f9f9f9;
    padding: 30px;
    border-radius: 10px;
    box-shadow: var(--box-shadow);
}

.form-group {
    margin-bottom: 20px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* Footer */
footer {
    background: var(--dark-color);
    color: var(--white);
    text-align: center;
    padding: 20px 0;
    font-size: 0.9rem;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    box-shadow: var(--box-shadow);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
}

.back-to-top.active {
    opacity: 1;
    visibility:collapse
}

/* Add this to your existing CSS file */

/* Mobile Navigation */
.nav-links.active {
    transform: translateX(0);
}

/* Responsive Design */
@media (max-width: 992px) {
    .hero .container {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-content {
        margin-bottom: 50px;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .about-content {
        flex-direction: column;
    }
    
    .contact-content {
        flex-direction: column;
    }
    
    .timeline::before {
        left: 31px;
    }
    
    .timeline-item {
        padding-left: 70px;
    }
    
    .timeline-date {
        left: 0;
        transform: none;
    }
    
    .timeline-content {
        width: 100%;
    }
    
    .timeline-item:nth-child(odd) .timeline-content {
        margin-left: 0;
    }
    
    .timeline-content::after {
        display: none;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 80px;
        left: 0;
        width: 100%;
        background: var(--white);
        flex-direction: column;
        align-items: center;
        padding: 20px 0;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
        transform: translateX(-100%);
        transition: var(--transition);
    }
    
    .nav-links li {
        margin: 15px 0;
    }
    
    .hamburger {
        display: block;
        margin-right: 3rem;
    }
    
    .hamburger.active .line:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .hamburger.active .line:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active .line:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-content h3 {
        font-size: 1.2rem;
    }
    
    .image-wrapper {
        width: 280px;
        height: 280px;
    }
}

/* Animation Classes */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.active {
    opacity: 1;
    transform: translateY(0);
}

/* Skill Bars Animation */
.skill-level.active {
    width: var(--level);
}

/* Project Card Hover Effect */
.project-card {
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.8) 0%, rgba(46, 204, 113, 0.8) 100%);
    opacity: 0;
    transition: var(--transition);
    z-index: 1;
}

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

.project-info {
    position: relative;
    z-index: 2;
}

/* Button Hover Effects */
.btn-primary {
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: var(--white);
    transition: var(--transition);
    z-index: -1;
}

.btn-primary:hover::before {
    width: 100%;
}

.btn-secondary {
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-secondary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: var(--primary-color);
    transition: var(--transition);
    z-index: -1;
}

.btn-secondary:hover::before {
    width: 100%;
}

/* Form Submission Feedback */
.form-message {
    padding: 10px;
    margin-bottom: 20px;
    border-radius: 5px;
    display: none;
}

.form-message.success {
    background: #d4edda;
    color: #155724;
    display: block;
}

.form-message.error {
    background: #f8d7da;
    color: #721c24;
    display: block;
}

/* Loading Spinner */
.spinner {
    display: none;
    width: 40px;
    height: 40px;
    margin: 10px auto;
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Dark Mode Toggle */
.theme-switch-wrapper {
    display: flex;
    align-items: center;
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1001;
}

.theme-switch {
    display: inline-block;
    height: 34px;
    position: relative;
    width: 60px;
}

.theme-switch input {
    display: none;
}

.slider {
    background-color: #ccc;
    bottom: 0;
    cursor: pointer;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    background-color: #fff;
    bottom: 4px;
    content: "";
    height: 26px;
    left: 4px;
    position: absolute;
    transition: .4s;
    width: 26px;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--primary-color);
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.slider i {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: var(--white);
}

.slider .fa-sun {
    left: 8px;
    opacity: 0;
    transition: opacity 0.4s;
}

.slider .fa-moon {
    right: 8px;
    opacity: 1;
    transition: opacity 0.4s;
}

input:checked + .slider .fa-sun {
    opacity: 1;
}

input:checked + .slider .fa-moon {
    opacity: 0;
}

/* Dark Mode Styles */
body.dark-mode {
    background-color: #121212;
    color: #f1f1f1;
}

.dark-mode .section-title,
.dark-mode .about-text h3,
.dark-mode .edu-item h5,
.dark-mode .project-info h3,
.dark-mode .timeline-content h4,
.dark-mode .contact-item h3 {
    color: #f1f1f1;
}

.dark-mode nav {
    background: rgba(18, 18, 18, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.dark-mode .nav-links a {
    color: #f1f1f1;
}

.dark-mode .hamburger .line {
    background: #f1f1f1;
}

.dark-mode .skill-category,
.dark-mode .project-card,
.dark-mode .course-card,
.dark-mode .contact-form {
    background: #1e1e1e;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.dark-mode .timeline-content {
    background: #1e1e1e;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.dark-mode .project-tech span,
.dark-mode .social-links a {
    background: #2d2d2d;
    color: #f1f1f1;
}

.dark-mode .form-group input,
.dark-mode .form-group textarea {
    background: #2d2d2d;
    border-color: #444;
    color: #f1f1f1;
}

.dark-mode .form-group input:focus,
.dark-mode .form-group textarea:focus {
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.3);
}

.dark-mode .btn-secondary {
    color: #f1f1f1;
    border-color: #f1f1f1;
}

.dark-mode .btn-secondary:hover {
    color: var(--dark-color);
}

.project-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 2rem;
  }
  
  .filter-btn {
    padding: 0.5rem 1.25rem;
    background: transparent;
    color: #333; /* Default text color */
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
  }
  
  /* Hover Effect */
  .filter-btn:hover {
    background: #f0f0f0;
    border-color: #bbb;
  }
  
  /* Active Button */
  .filter-btn.active {
    background: #646cff; /* Purple-blue (change to your theme color) */
    color: white;
    border-color: #646cff;
  }
  
  /* Optional: Animation on click */
  .filter-btn:active {
    transform: scale(0.95);
  }