/* Make sure these CSS variables are properly defined in your existing CSS */
:root {
    --primary-color: #9B4DCA;
    --secondary-color: #7B2CBF;
    --dark-purple: #5A189A;
    --light-purple: #E0AAFF;
    --white: #ffffff;
    --transition: all 0.3s ease;
    --theme-toggle:#7B2CBF;
}

/* Dark Mode Variables */
.dark-mode {
    --bg-color: #121212;
    --text-color: #f0f0f0;
    --header-bg: #1e1e1e;
    --card-bg: #1e1e1e;
    --contact-card-bg: #252525;
    --gallery-bg: #1a1a1a;
    --form-bg: #2a2a2a;
    --form-border: #444;
    --white: #f0f0f0;
    --tp:#333;
}

.light-mode {
    --bg-color: #f8f7fa;
    --text-color: #333;
    --header-bg: #fff;
    --card-bg: #fff;
    --contact-card-bg: #f9f6ff;
    --gallery-bg: #f9f6ff;
    --form-bg: #f9f6ff;
    --form-border: #eee;
    --white: #ffffff;
    --tp:#f0f0f0;
}

/* Fix for theme toggle button */
.theme-toggle-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--theme-toggle);
    padding: 5px;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
}

.theme-toggle-btn:hover {
    background-color: rgba(128, 128, 128, 0.2);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

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

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

.section {
    padding: 100px 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 50px;
    color: var(--secondary-color);
    position: relative;
    padding-bottom: 20px;
}

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

/* Header Styles */
header {
    background-color: var(--header-bg);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: var(--transition);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

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

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

.nav-link {
    color: var(--text-color);
    text-decoration: none;
    padding: 10px 15px;
    margin: 0 5px;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

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

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

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

.header-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}


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

.bar {
    width: 25px;
    height: 3px;
    background-color: var(--primary-color);
    margin: 5px 0;
    transition: var(--transition);
}

/* Home Section */
#home {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--tp);
    overflow: hidden;
}

.animated-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, var(--dark-purple), var(--primary-color), var(--secondary-color));
    background-size: 400% 400%;
    animation: gradient 15s ease infinite;
    z-index: -1;
}

@keyframes gradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.home-content {
    z-index: 1;
    max-width: 800px;
}

.home-content h2 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    letter-spacing: 2px;
}

.home-content p {
    font-size: 1.3rem;
    margin-bottom: 30px;
    letter-spacing: 1px;
}

.glowing-text {
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        text-shadow: 0 0 10px rgba(0, 0, 0, 0.7),
                     0 0 20px rgba(155, 77, 202, 0.7),
                     0 0 30px rgba(123, 44, 191, 0.7);
    }
    to {
        text-shadow: 0 0 15px rgba(255, 255, 255, 0.9),
                     0 0 25px rgba(155, 77, 202, 0.9),
                     0 0 35px rgba(123, 44, 191, 0.9);
    }
}

.scroll-down {
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--white);
    font-size: 1rem;
}

.bounce {
    margin-top: 10px;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-20px);
    }
    60% {
        transform: translateY(-10px);
    }
}

/* About Section */
#about {
    background-color: var(--card-bg);
}

.about-content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.profile-pic {
    flex: 1;
    min-width: 300px;
    text-align: center;
}

.profile-pic img {
    width: 100%;
    max-width: 300px;
    border-radius: 20px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
    transition: var(--transition);
}

.profile-pic img:hover {
    transform: scale(1.03);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.social-links {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    gap: 15px;
}

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

.social-icon:hover {
    background-color: var(--secondary-color);
    transform: translateY(-5px);
}

.about-text {
    flex: 2;
    min-width: 300px;
}

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

.skills {
    margin-top: 40px;
}

.skills h3 {
    margin-bottom: 20px;
    color: var(--text-color);
    font-size: 1.5rem;
}

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

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

.skill-bar {
    width: 100%;
    height: 10px;
    background-color: #eee;
    border-radius: 5px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 5px;
    transition: width 1.5s ease-in-out;
}

/* Gallery Section */
#gallery {
    background-color: var(--gallery-bg);
}

.gallery-filter {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.filter-btn {
    background: none;
    border: 2px solid var(--primary-color);
    padding: 8px 20px;
    margin: 5px;
    border-radius: 25px;
    color: var(--primary-color);
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
}

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

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    height: 250px;
}

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

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(123, 44, 191, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.gallery-overlay i {
    color: var(--white);
    font-size: 2rem;
    cursor: pointer;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1100;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 80%;
    max-height: 80%;
}

#caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: #ccc;
    padding: 10px 0;
    height: 150px;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.close-modal:hover {
    color: var(--primary-color);
}

/* Contact Section */
#contact {
    background-color: var(--card-bg);
}

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

.contact-info {
    flex: 1;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.contact-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px;
    border-radius: 10px;
    background-color: var(--contact-card-bg);
    transition: var(--transition);
}

.contact-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.contact-item i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.contact-item h3 {
    margin-bottom: 10px;
    color: var(--secondary-color);
}

.contact-form {
    flex: 2;
    min-width: 300px;
}

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

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

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

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

.submit-btn {
    padding: 12px 30px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border: none;
    border-radius: 25px;
    color: var(--white);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.submit-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Footer */
footer {
    background-color: var(--dark-purple);
    color: var(--white);
    padding: 50px 0 20px;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-bottom: 30px;
}

.footer-logo {
    flex: 1;
    min-width: 200px;
    margin-bottom: 20px;
}

.footer-logo h3 {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.footer-links {
    flex: 1;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}

.footer-links a {
    color: var(--white);
    text-decoration: none;
    margin-bottom: 10px;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--light-purple);
    padding-left: 5px;
}

.footer-social {
    flex: 1;
    min-width: 200px;
    display: flex;
    justify-content: center;
    gap: 15px;
}

.footer-social .social-icon {
    background-color: var(--secondary-color);
}

.footer-social .social-icon:hover {
    background-color: var(--primary-color);
}

.scroll-top {
    text-align: center;
    margin-top: 20px;
}

.scroll-top a {
    display: inline-block;
    width: 40px;
    height: 40px;
    background-color: var(--secondary-color);
    color: var(--white);
    border-radius: 50%;
    line-height: 40px;
    transition: var(--transition);
}

.scroll-top a:hover {
    background-color: var(--primary-color);
    transform: translateY(-5px);
}

/* Animations */
.fade-in {
    animation: fadeIn 1s ease-in;
}

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

/* Responsive Styles */
@media (max-width: 992px) {
    .section-title {
        font-size: 2rem;
    }
    .home-content h2 {
        font-size: 2.8rem;
    }
}

@media (max-width: 768px) {
    .hamburger-menu {
        display: block;
        z-index: 1001;
    }
    
    nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background-color: var(--header-bg);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 50px 0;
        transition: var(--transition);
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    }
    
    nav.active {
        right: 0;
    }
    
    .nav-links {
        flex-direction: column;
        width: 100%;
    }
    
    .nav-link {
        width: 100%;
        text-align: center;
        padding: 15px;
        font-size: 1.2rem;
    }
    
    .home-content h2 {
        font-size: 2.5rem;
    }
    
    .about-content, .contact-content {
        flex-direction: column;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .header-controls {
        z-index: 1001;
    }
}

@media (max-width: 576px) {
    html {
        font-size: 14px;
    }
    
    .section {
        padding: 80px 0;
    }
    
    .section-title {
        font-size: 1.8rem;
        margin-bottom: 30px;
    }
    
    .home-content h2 {
        font-size: 2rem;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        max-width: 95%;
    }
}