:root {
    --primary-color: #6366F1;
    --accent-color: #10B981;
    --background-color: #F8FAFC;
    --text-color: #1E293B;
    --light-gray: #e2e8f0;
    --card-bg: rgba(255, 255, 255, 0.8);
    --card-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --gradient-primary: linear-gradient(135deg, #6366F1, #10B981);
    --gradient-hover: linear-gradient(135deg, #4F46E5, #059669);
    --transition: all 0.3s ease-in-out;
    --border-radius: 12px;
    --glass-bg: rgba(255, 255, 255, 0.25);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    --glass-border: 1px solid rgba(255, 255, 255, 0.18);
}

.dark-mode {
    --primary-color: #818CF8;
    --accent-color: #34D399;
    --background-color: #0F172A;
    --text-color: #F1F5F9;
    --light-gray: #334155;
    --card-bg: rgba(30, 41, 59, 0.8);
    --card-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
    --glass-bg: rgba(15, 23, 42, 0.5);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
    --glass-border: 1px solid rgba(255, 255, 255, 0.08);
}

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

html {
    scroll-behavior: smooth;
}

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

section {
    padding: 5rem 1rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

h1, h2, h3, h4, h5, h6 {
    margin-bottom: 1rem;
    line-height: 1.2;
}

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

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* Dark Mode Toggle */
.theme-switch-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    padding: 0.25rem;
    position: relative;
    z-index: 100;
}

@media (max-width: 768px) {
    .theme-switch-wrapper {
        position: absolute;
        top: 1rem;
        right: 1rem;
        background: var(--glass-bg);
        padding: 0.3rem 0.6rem;
        border-radius: 20px;
        box-shadow: var(--glass-shadow);
    }
}




.theme-switch {
    display: inline-block;
    height: 24px;
    position: relative;
    width: 50px;
    margin-right: 10px;
}

.theme-switch input {
    display: none;
}

.slider {
    width: 50px;
    height: 24px;
    background: var(--light-gray);
    border-radius: 34px;
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 4px;
    transition: background 0.3s ease;
  }
  
  .slider .icon {
    width: 16px;
    height: 16px;
    color: var(--primary-color);
    transition: transform 0.4s ease;
  }
  
  .slider .moon {
    transform: translateX(0);
    opacity: 0;
  }
  
  .slider .sun {
    transform: translateX(0);
    opacity: 1;
  }
  
  input:checked + .slider {
    background: var(--primary-color);
  }
  
  input:checked + .slider .moon {
    opacity: 1;
    transform: translateX(0);
  }
  
  input:checked + .slider .sun {
    opacity: 0;
    transform: translateX(0);
  }
  

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    box-shadow: var(--glass-shadow);
    border-bottom: var(--glass-border);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 999;
}

.nav-menu {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}


.logo {
    display: flex;
    align-items: center;
}

.logo-text {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-menu {
    display: flex;
    align-items: center;
}

.nav-link {
    margin: 0 1rem;
    color: var(--text-color);
    font-weight: 500;
    position: relative;
}

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

.nav-link:hover::after,
.nav-link:focus::after {
    width: 100%;
}
  

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
        z-index: 1001; /
    }

    .nav-menu {
        position: fixed;
        top: 70px; /* Below navbar */
        left: -100%;
        width: 100%;
        flex-direction: column;
        background: var(--glass-bg);
        backdrop-filter: blur(10px);
        transition: 0.3s ease;
        padding: 2rem 0;
        text-align: center;
        z-index: 1000;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-link {
        margin: 1rem 0;
    }

    .theme-switch-wrapper {
        position: absolute;
        top: 1rem;
        right: 1rem;
        z-index: 999; 
    }
}


.menu-toggle {
    display: none;
    cursor: pointer;
}

.right-elements {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-left: auto;
}

.navbar {
    justify-content: space-between;
    position: relative;
}

.nav-menu {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}


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

.hero-section {
    display: flex;
    min-height: 100vh;
    align-items: center;
    justify-content: space-between;
    padding: 7rem 5% 5rem;
    position: relative;
    overflow: hidden;
}

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

.hero-content h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.highlight {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.typing-container {
    height: 3rem;
    margin-bottom: 1.5rem;
}

#typed-text {
    font-size: 2rem;
    font-weight: 600;
    color: var(--primary-color);
}

.cursor {
    display: inline-block;
    width: 3px;
    height: 42px;
    background-color: var(--text-color);
    margin-left: 5px;
    animation: blink 1s infinite;
    position: relative;
    top: 5px;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-color);
    margin-bottom: 2rem;
}

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

.blob {
    position: absolute;
    width: 500px;
    height: 500px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(16, 185, 129, 0.2));
    border-radius: 42% 58% 70% 30% / 45% 45% 55% 55%;
    animation: morph 15s linear infinite;
}

@keyframes morph {
    0%, 100% {
        border-radius: 42% 58% 70% 30% / 45% 45% 55% 55%;
    }
    25% {
        border-radius: 58% 42% 30% 70% / 55% 55% 45% 45%;
    }
    50% {
        border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    }
    75% {
        border-radius: 70% 30% 30% 70% / 70% 70% 30% 30%;
    }
}

.profile-img-placeholder {
    width: 300px;
    height: 300px;
    background-color: var(--glass-bg);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(10px);
    box-shadow: var(--glass-shadow);
    border: var(--glass-border);
    z-index: 1;
}

.profile-img-placeholder.large {
    width: 200px;
    height: 200px;
}

.profile-img-placeholder i {
    font-size: 150px;
    color: var(--primary-color);
}

.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 30px;
    font-weight: 500;
    transition: var(--transition);
    cursor: pointer;
    text-align: center;
    border: none;
}

.primary-btn {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.primary-btn:hover {
    background: var(--gradient-hover);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

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

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

.hero-cta {
    display: flex;
    gap: 1rem;
}

.profile-image-container {
    position: relative;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(174, 5, 236, 0.1);
    transition: all 0.4s ease;
}

.profile-image-container:hover {
    transform: scale(1.05) rotate(3deg);
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.profile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.profile-image-container:hover .profile-image {
    transform: scale(1.1);
}

#particles-js {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 0;
    top: 0;
    left: 0;
}
.hero-section {
    position: relative;
    z-index: 1;
}
.hero-content, .hero-image {
    position: relative;
    z-index: 2;
}



/* Section Header */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--text-color);
    position: relative;
    display: inline-block;
}

.underline {
    height: 4px;
    width: 100px;
    background: var(--gradient-primary);
    margin: 0 auto;
    border-radius: 5px;
}

/* About Section */
.about-section {
    background-color: var(--background-color);
    position: relative;
}

.about-container {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    align-items: center;
    justify-content: center;
}

.about-image {
    flex: 1;
    min-width: 300px;
    max-width: 500px;
    display: flex;
    justify-content: center;
}

.profile-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: var(--glass-shadow);
    border: var(--glass-border);
    transform: translateY(0);
    transition: var(--transition);
}

.profile-card:hover {
    transform: translateY(-10px);
}

.profile-details {
    text-align: center;
    margin-top: 1rem;
}

.profile-details h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.social-icons {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    justify-content: center;
}

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

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

.about-content {
    flex: 1;
    min-width: 300px;
    max-width: 600px;
}

.bio-info {
    margin-bottom: 2rem;
}

.bio-info p {
    margin-bottom: 1rem;
}

.personal-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
}

.info-item {
    display: flex;
    flex-direction: column;
}

.info-label {
    font-weight: 600;
    color: var(--primary-color);
}

.about-cta {
    display: flex;
    justify-content: flex-start;
}

/* Skills Section */
.skills-section {
    background-color: var(--background-color);
    position: relative;
}

.skills-container {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.skill-category h3 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary-color);
    font-size: 1.8rem;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
}

.skill-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    border: var(--glass-border);
    transform: translateY(0);
}

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

.skill-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    color: white;
    border-radius: 50%;
    margin-bottom: 1rem;
}

.skill-icon i {
    font-size: 1.5rem;
}

.skill-card h4 {
    margin-bottom: 1rem;
}

.skill-progress {
    height: 10px;
    background-color: var(--light-gray);
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 10px;
    width: 0;
    transition: width 1.5s ease-in-out;
}

/* Education & Experience Section */
.education-section {
    background-color: var(--background-color);
    position: relative;
}

.education-swiper {
    padding: 2rem 0;
    width: 100%;
}

.swiper-slide.timeline-item {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--card-shadow);
    border: var(--glass-border);
    max-width: 350px;
    height: auto;
}

.swiper-slide h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.swiper-slide p {
    margin-bottom: 1rem;
}

.swiper-button-next,
.swiper-button-prev {
    color: var(--primary-color);
}

.swiper-pagination-bullet-active {
    background: var(--primary-color);
}

/* Projects Section */
.projects-section {
    background-color: var(--background-color);
    position: relative;
}

.projects-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.project-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    border: var(--glass-border);
    height: 100%;
    display: flex;
    flex-direction: column;
}

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

.project-img {
    overflow: hidden;
    height: 200px;
}

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

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

.project-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.project-content h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.project-content p {
    margin-bottom: 1rem;
    flex-grow: 1;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tag {
    background: var(--glass-bg);
    color: var(--primary-color);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.project-links {
    display: flex;
    justify-content: flex-end;
}

.project-btn {
    font-size: 0.9rem;
    padding: 0.6rem 1.2rem;
}

/* Certifications Section */
.certifications-section {
    background-color: var(--background-color);
    position: relative;
}

.certifications-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
}

.cert-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    border: var(--glass-border);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.cert-card:hover {
    transform: translateY(-10px);
}

.cert-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    color: white;
    border-radius: 50%;
    margin-bottom: 1rem;
}

.cert-icon i {
    font-size: 1.5rem;
}

.cert-content h3 {
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.cert-date {
    display: inline-block;
    background: var(--light-gray);
    color: var(--text-color);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    margin-top: 0.5rem;
}

/* Contact Section */
.contact-section {
    background-color: var(--background-color);
    position: relative;
}

.contact-container {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: center;
}

.contact-info {
    flex: 1;
    min-width: 300px;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    padding: 1rem;
    display: flex;
    align-items: center;
    box-shadow: var(--card-shadow);
    border: var(--glass-border);
    transition: var(--transition);
}

.contact-card:hover {
    transform: translateX(10px);
}

.contact-icon {
    min-width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    color: white;
    border-radius: 50%;
    margin-right: 1rem;
}

.contact-details h3 {
    margin-bottom: 0.3rem;
    color: var(--primary-color);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: white;
    transition: var(--transition);
    box-shadow: 0 5px 15px rgba(99, 102, 241, 0.3);
}

.social-link:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.4);
}

.contact-form-container {
    flex: 1;
    min-width: 300px;
    max-width: 600px;
}

.contact-form {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--card-shadow);
    border: var(--glass-border);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--light-gray);
    border-radius: var(--border-radius);
    background: var(--glass-bg);
    color: var(--text-color);
    font-family: 'Poppins', sans-serif;
    transition: var(--transition);
}

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

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

.submit-btn {
    background: var(--gradient-primary);
    color: white;
    width: 100%;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.submit-btn:hover {
    background: var(--gradient-hover);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

/* Footer */
footer {
    background: linear-gradient(135deg, #0F172A, #1E293B);
    color: white;
    padding: 3rem 1rem 1rem;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    gap: 2rem;
}

.footer-logo {
    flex: 1;
    min-width: 250px;
}

.footer-logo p {
    margin-top: 1rem;
    opacity: 0.8;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-nav,
.footer-social {
    min-width: 150px;
}

.footer-nav h3,
.footer-social h3 {
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.footer-nav ul li {
    margin-bottom: 0.5rem;
}

.footer-nav a {
    color: white;
    opacity: 0.8;
    transition: var(--transition);
}

.footer-nav a:hover {
    opacity: 1;
    color: var(--accent-color);
}

.footer-social .social-icons {
    justify-content: flex-start;
}

.footer-social .social-icons a {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.footer-social .social-icons a:hover {
    background: var(--accent-color);
}

.footer-bottom {
    max-width: 1200px;
    margin: 2rem auto 0;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    font-size: 0.9rem;
    opacity: 0.7;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 1.0rem;
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 99;
    box-shadow: 0 5px 15px rgba(99, 102, 241, 0.3);
}

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

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.4);
}


.modal {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.modal-content {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    max-width: 800px;
    width: 100%;
    padding: 2rem;
    position: relative;
    color: var(--text-color);
    box-shadow: var(--glass-shadow);
    animation: fadeInUp 0.5s ease-in-out;
}

.modal-content img {
    width: 100%;
    margin: 1rem 0;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
}

.modal-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.modal-tags span {
    background: var(--gradient-primary);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.close-btn {
    position: absolute;
    top: 15px; right: 20px;
    font-size: 1.5rem;
    color: var(--primary-color);
    cursor: pointer;
}

.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--card-bg);
    color: var(--text-color);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: var(--glass-shadow);
    display: flex;
    align-items: center;
    gap: 1rem;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.3s ease;
    z-index: 10000;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast-spinner {
    width: 18px;
    height: 18px;
    border: 3px solid var(--light-gray);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 992px) {
    .hero-section {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-content {
        margin-bottom: 3rem;
    }
    
    .hero-cta {
        justify-content: center;
    }
    
    .about-container {
        flex-direction: column;
    }
    
    .timeline::after {
        left: 31px;
    }
    
    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }
    
    .timeline-item:nth-child(even) {
        left: 0;
    }
    
    .timeline-dot {
        left: 15px;
        right: auto;
    }
    
    .timeline-item:nth-child(even) .timeline-dot {
        left: 15px;
    }
    
    .timeline-date {
        position: relative;
        right: auto;
        left: auto;
        top: auto;
        width: auto;
        margin-bottom: 1rem;
    }
    
    .timeline-item:nth-child(even) .timeline-date {
        left: auto;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: var(--glass-bg);
        backdrop-filter: blur(10px);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        padding: 2rem 0;
        box-shadow: var(--glass-shadow);
        border-bottom: var(--glass-border);
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-link {
        margin: 1rem 0;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    #typed-text {
        font-size: 1.5rem;
    }
    
    .cursor {
        height: 32px;
    }
    
    .personal-info {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    section {
        padding: 4rem 1rem;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    #typed-text {
        font-size: 1.2rem;
    }
    
    .cursor {
        height: 24px;
    }
    
    .profile-img-placeholder {
        width: 250px;
        height: 250px;
    }
    
    .profile-img-placeholder i {
        font-size: 120px;
    }
    
    .skills-grid,
    .projects-container,
    .certifications-container {
        grid-template-columns: 1fr;
    }
}

.loader {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(255,255,255,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}
.loader::after {
    content: "";
    width: 50px; height: 50px;
    border: 6px solid #ccc;
    border-top: 6px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#download-cv:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

#chatbot-container {
    position: fixed;
    bottom: 5.5rem;
    right: 1.0rem;
    z-index: 9999;
    font-family: 'Poppins', sans-serif;
}
#chatbot-toggle {
    background: var(--gradient-primary);
    color: white;
    padding: 0.8rem;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: var(--card-shadow);
}
#chatbot-box {
    width: 300px;
    background: var(--card-bg);
    border: var(--glass-border);
    box-shadow: var(--card-shadow);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: absolute;
    bottom: 60px;
    right: 0;
}
#chatbot-box.hidden {
    display: none;
}
#chatbot-header {
    background: var(--primary-color);
    color: white;
    padding: 0.8rem;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
#chatbot-close {
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0 0.5rem;
    transition: transform 0.2s ease;
}
#chatbot-close:hover {
    transform: scale(1.3);
    color: var(--accent-color);
}
#chatbot-messages {
    padding: 0.5rem;
    height: 200px;
    overflow-y: auto;
    font-size: 0.9rem;
}
#chatbot-input {
    border: none;
    padding: 0.8rem;
    outline: none;
}
#chatbot-messages em {
    color: gray;
    font-style: italic;
}


@media (max-width: 576px) {
    #chatbot-toggle {
        padding: 0.6rem;
        font-size: 1rem;
    }

    .back-to-top {
        width: 45px;
        height: 45px;
        bottom: 1.5rem;
    }

    #chatbot-container {
        bottom: 5rem; /* keep spacing on small screen */
    }
}

.skill-badge {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    align-items: center;
}

.skill-badge img {
    width: 32px;
    height: 32px;
    filter: drop-shadow(0 0 3px rgba(0, 0, 0, 0.15));
    transition: transform 0.3s ease;
}

.skill-badge img:hover {
    transform: scale(1.2);
}

.cert-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 8px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
    transition: transform 0.3s ease;
}

.cert-logo:hover {
    transform: scale(1.1);
}

.quote-preloader {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: var(--background-color);
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 1.0s ease;
    font-family: 'Poppins', sans-serif;
    text-align: center;
    padding: 2rem;
}

.quote-preloader .loader-spinner {
    width: 50px;
    height: 50px;
    border: 6px solid #ccc;
    border-top-color: var(--primary-color);
    border-radius: 50%;
    margin-bottom: 2rem;
    animation: spin 3s linear infinite;
}

.quote-text {
    font-size: 1.1rem;
    max-width: 600px;
    font-weight: 500;
    opacity: 0.8;
    animation: fadeIn 3s ease-in-out;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

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

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        transform: none; 

    .right-elements {
        position: absolute;
        right: 1rem;
        top: 1rem;
        z-index: 1001;
    }

    .theme-switch-wrapper {
        position: static; 
        margin-left: 0;
    }
}
}