/* Portfolio Website - Main Stylesheet */
/* CSS Variables */
:root {
    /* Theme Colors */
    --neon-blue: #00f3ff;
    --neon-purple: #9d00ff;
    --neon-pink: #ff00f7;
    
    /* Dark Theme (Default) */
    --bg-color: #0a0a0f;
    --bg-secondary: #1a1a2e;
    --text-color: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.8);
    --glass-bg: rgba(255, 255, 255, 0.1);
    --border-color: rgba(255, 255, 255, 0.1);
    --card-bg: rgba(255, 255, 255, 0.05);
    
    /* Legacy support */
    --dark-bg: var(--bg-color);
}

/* Light Theme - Sophisticated and Easy on Eyes */
[data-theme="light"] {
    --bg-color: #d0c7db;
    --bg-secondary: #bfb1c9;
    --text-color: #2d3748;
    --text-secondary: rgba(45, 55, 72, 0.85);
    --glass-bg: rgba(208, 199, 219, 0.95);
    --border-color: rgba(107, 70, 193, 0.25);
    --card-bg: rgba(230, 226, 240, 0.9);
    
    /* Softer neon colors that work well on light backgrounds */
    --neon-blue: #0066cc;
    --neon-purple: #6b46c1;
    --neon-pink: #db2777;
}

/* Light mode section backgrounds - rich purple variations */
[data-theme="light"] .profile-section {
    background: linear-gradient(45deg, rgba(107, 70, 193, 0.15), rgba(0, 102, 204, 0.1));
}

[data-theme="light"] .projects-section {
    background: linear-gradient(45deg, rgba(107, 70, 193, 0.12), rgba(0, 102, 204, 0.08));
}

[data-theme="light"] .experience-section {
    background: linear-gradient(to bottom, rgba(208, 199, 219, 0), rgba(107, 70, 193, 0.12));
}

[data-theme="light"] .skills-section {
    background: linear-gradient(to bottom, rgba(107, 70, 193, 0.12), rgba(0, 102, 204, 0.08));
}

[data-theme="light"] .contact-section {
    background: linear-gradient(to bottom, rgba(107, 70, 193, 0.1), rgba(208, 199, 219, 0));
}

/* Fix text visibility in light mode */
[data-theme="light"] .profile-text,
[data-theme="light"] .project-description,
[data-theme="light"] .timeline-description,
[data-theme="light"] .contact-subtitle,
[data-theme="light"] .timeline-description ul li,
[data-theme="light"] .modal-details p,
[data-theme="light"] .modal-details ul li,
[data-theme="light"] .skill-name,
[data-theme="light"] .loading-text {
    color: var(--text-color);
}

/* Navigation dots visibility in light mode */
[data-theme="light"] .nav-label {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 12px rgba(45, 55, 72, 0.08);
    backdrop-filter: blur(8px);
}

/* Improve card visibility in light mode */
[data-theme="light"] .project-card,
[data-theme="light"] .timeline-content,
[data-theme="light"] .skill-category,
[data-theme="light"] .contact-form,
[data-theme="light"] .contact-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 12px rgba(45, 55, 72, 0.06);
    backdrop-filter: blur(10px);
}

/* Theme toggle in light mode */
[data-theme="light"] .theme-toggle {
    background: rgba(255, 255, 255, 0.85);
    border: 2px solid var(--neon-blue);
    box-shadow: 0 0 20px rgba(0, 102, 204, 0.15);
    backdrop-filter: blur(8px);
}

[data-theme="light"] .theme-toggle:hover {
    background: var(--neon-blue);
    color: white;
    box-shadow: 0 0 30px rgba(0, 102, 204, 0.3);
}

/* Audio button light theme */
[data-theme="light"] .audio-toggle {
    background: rgba(255, 255, 255, 0.85);
    border: 2px solid var(--neon-purple);
    box-shadow: 0 0 20px rgba(107, 70, 193, 0.15);
    backdrop-filter: blur(8px);
}

[data-theme="light"] .audio-toggle:hover {
    background: var(--neon-purple);
    color: white;
    box-shadow: 0 0 30px rgba(107, 70, 193, 0.3);
}

[data-theme="light"] .audio-toggle.muted {
    color: rgba(107, 70, 193, 0.5);
    border-color: rgba(107, 70, 193, 0.5);
    box-shadow: 0 0 20px rgba(107, 70, 193, 0.1);
}

/* Enhanced glitch effect for light theme */
[data-theme="light"] .glitch {
    text-shadow: 0.05em 0 0 var(--neon-blue),
                 -0.025em -0.05em 0 var(--neon-purple),
                 0.025em 0.05em 0 var(--neon-pink);
}

[data-theme="light"] .glitch-loading {
    text-shadow: 0.05em 0 0 var(--neon-blue),
                 -0.025em -0.05em 0 var(--neon-purple),
                 0.025em 0.05em 0 var(--neon-pink);
}

/* Better gradient text for light theme */
[data-theme="light"] .profile-title,
[data-theme="light"] .projects-title,
[data-theme="light"] .section-title,
[data-theme="light"] .subtitle {
    background: linear-gradient(45deg, var(--neon-blue), var(--neon-purple));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Enhanced project links for light theme */
[data-theme="light"] .project-link {
    border-color: var(--neon-purple);
    color: var(--neon-purple);
}

[data-theme="light"] .project-link:hover {
    background: var(--neon-purple);
    color: white;
    box-shadow: 0 2px 8px rgba(107, 70, 193, 0.2);
}

/* Better tech items for light theme */
[data-theme="light"] .tech-item {
    background: rgba(248, 249, 250, 0.8);
    border-color: var(--neon-blue);
    color: var(--neon-blue);
}

[data-theme="light"] .tech-item:hover {
    background: var(--neon-blue);
    color: white;
    box-shadow: 0 2px 8px rgba(0, 102, 204, 0.2);
}

/* Contact Form Light Theme Fixes */
[data-theme="light"] .form-label {
    color: var(--text-color);
}

[data-theme="light"] .form-input {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid var(--border-color);
    color: var(--text-color);
}

[data-theme="light"] .form-input::placeholder {
    color: var(--text-secondary);
}

[data-theme="light"] .form-input:focus {
    border-color: var(--neon-blue);
    box-shadow: 0 0 15px rgba(0, 102, 204, 0.2);
    background: rgba(255, 255, 255, 0.95);
}

[data-theme="light"] .submit-btn {
    background: linear-gradient(45deg, var(--neon-blue), var(--neon-purple));
    color: white;
}

[data-theme="light"] .contact-info-content h3 {
    color: var(--text-color);
}

[data-theme="light"] .contact-info-content p {
    color: var(--text-secondary);
}

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

body {
    font-family: 'Rajdhani', sans-serif;
    background: var(--bg-color);
    color: var(--text-color);
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

/* Theme Toggle Button */
.theme-toggle {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 1000;
    width: 60px;
    height: 60px;
    border: 2px solid var(--neon-blue);
    border-radius: 50%;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    color: var(--neon-blue);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.3);
}

/* Audio Toggle Button */
.audio-toggle {
    position: fixed;
    top: 2rem;
    right: 5rem; /* Positioned to the left of theme toggle */
    z-index: 1000;
    width: 60px;
    height: 60px;
    border: 2px solid var(--neon-purple);
    border-radius: 50%;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    color: var(--neon-purple);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px rgba(157, 0, 255, 0.3);
}

.theme-toggle:hover {
    background: var(--neon-blue);
    color: var(--bg-color);
    transform: scale(1.1);
    box-shadow: 0 0 30px rgba(0, 243, 255, 0.5);
}

.theme-toggle:active {
    transform: scale(0.95);
}

.audio-toggle:hover {
    background: var(--neon-purple);
    color: var(--bg-color);
    transform: scale(1.1);
    box-shadow: 0 0 30px rgba(157, 0, 255, 0.5);
}

.audio-toggle:active {
    transform: scale(0.95);
}

.audio-toggle.muted {
    color: rgba(157, 0, 255, 0.5);
    border-color: rgba(157, 0, 255, 0.5);
    box-shadow: 0 0 20px rgba(157, 0, 255, 0.1);
}

/* Theme toggle animation */
.theme-toggle i {
    transition: transform 0.3s ease;
}

.theme-toggle:hover i {
    transform: rotate(180deg);
}

/* Smooth Scroll Navigation */
.scroll-navigation {
    position: fixed;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.nav-dot {
    position: relative;
    width: 16px;
    height: 16px;
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.nav-dot .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    border: 2px solid var(--neon-blue);
    transition: all 0.3s ease;
    position: relative;
}

.nav-dot:hover .dot {
    background: var(--neon-blue);
    transform: scale(1.2);
    box-shadow: 0 0 10px var(--neon-blue);
}

.nav-dot.active .dot {
    background: var(--neon-blue);
    transform: scale(1.5);
    box-shadow: 0 0 15px var(--neon-blue);
}

.nav-label {
    position: absolute;
    right: 100%;
    margin-right: 1rem;
    padding: 0.5rem 1rem;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    color: var(--text-color);
    border-radius: 20px;
    font-size: 0.8rem;
    white-space: nowrap;
    border: 1px solid var(--border-color);
    opacity: 0;
    visibility: hidden;
    transform: translateX(10px);
    transition: all 0.3s ease;
    pointer-events: none;
}

.nav-dot:hover .nav-label {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

/* Responsive navigation */
@media (max-width: 1024px) {
    .scroll-navigation {
        right: 1rem;
    }
    
    .nav-label {
        display: none;
    }
}

@media (max-width: 768px) {
    .scroll-navigation {
        display: none;
    }
}

/* Hero Section */
#hero-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -1;
}

.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.glitch-wrapper {
    position: relative;
    text-align: center;
}

.glitch {
    font-size: 5rem;
    font-weight: bold;
    position: relative;
    text-shadow: 0.05em 0 0 var(--neon-blue),
                 -0.025em -0.05em 0 var(--neon-purple),
                 0.025em 0.05em 0 var(--neon-pink);
    animation: glitch 2s infinite;
    opacity: 0; /* Hidden initially for smooth transition */
    transition: opacity 0.3s ease;
}

.glitch span {
    position: absolute;
    top: 0;
    left: 0;
}

.glitch span:first-child {
    animation: glitch 650ms infinite;
    clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
    transform: translate(-0.025em, -0.0125em);
    opacity: 0.75;
}

.glitch span:last-child {
    animation: glitch 375ms infinite;
    clip-path: polygon(0 80%, 100% 20%, 100% 100%, 0 100%);
    transform: translate(0.0125em, 0.025em);
    opacity: 0.75;
}

.subtitle {
    font-size: 1.5rem;
    margin-top: 1rem;
    background: linear-gradient(45deg, var(--neon-blue), var(--neon-purple));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    opacity: 0;
    animation: fadeIn 1s ease forwards 1s;
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    opacity: 0;
    animation: fadeIn 1s ease forwards 2s;
}

.scroll-indicator p {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
}

.scroll-indicator .line {
    width: 2px;
    height: 50px;
    background: linear-gradient(to bottom, var(--neon-blue), transparent);
    animation: scrollLine 2s ease-in-out infinite;
}

/* Profile Section */
.profile-section {
    min-height: 100vh;
    padding: 4rem 2rem;
    position: relative;
    background: linear-gradient(45deg, rgba(0,243,255,0.1), rgba(157,0,255,0.1));
}

.profile-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.profile-card {
    perspective: 1000px;
    width: 100%;
    max-width: 500px;
    aspect-ratio: 1;
    margin: 0 auto;
}

.profile-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.8s cubic-bezier(0.75, 0, 0.85, 1);
}

.profile-card:hover .profile-card-inner {
    transform: rotateY(180deg);
}

.profile-front, .profile-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 20px;
    overflow: hidden;
    border: 2px solid var(--neon-blue);
    box-shadow: 0 0 20px rgba(0,243,255,0.3);
}

.profile-front {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-back {
    background: var(--glass-bg);
    transform: rotateY(180deg);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
}

.profile-image {
    width: 80%;
    height: 80%;
    object-fit: cover;
    border-radius: 15px;
    border: 3px solid var(--neon-purple);
}

.profile-content {
    position: relative;
    z-index: 1;
}

.profile-title {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(45deg, var(--neon-blue), var(--neon-purple));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.profile-text {
    font-size: 1.2rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    color: #fff;
}

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

.tech-item {
    padding: 0.5rem 1rem;
    background: rgba(255,255,255,0.1);
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--neon-blue);
    border: 1px solid var(--neon-blue);
    transition: all 0.3s ease;
}

.tech-item:hover {
    background: var(--neon-blue);
    color: var(--dark-bg);
}

/* Projects Section */
.projects-section {
    min-height: 100vh;
    padding: 6rem 2rem;
    position: relative;
    background: linear-gradient(45deg, rgba(0,243,255,0.05), rgba(157,0,255,0.05));
}

.projects-title {
    text-align: center;
    font-size: 3rem;
    margin-bottom: 4rem;
    background: linear-gradient(45deg, var(--neon-blue), var(--neon-purple));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

.project-card {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: auto;
}

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

.project-video {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    background: #000;
    max-height: 100vh;
    -webkit-overflow-scrolling: touch;
}

.project-content {
    padding: 2rem;
}

.project-title {
    font-size: 1.5rem;
    color: var(--neon-blue);
    margin-bottom: 1rem;
}

.project-description {
    font-size: 1rem;
    color: #fff;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.project-links {
    display: flex;
    gap: 1rem;
}

.project-link {
    padding: 0.8rem 1.5rem;
    border: 1px solid var(--neon-purple);
    border-radius: 20px;
    color: var(--neon-purple);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.project-link:hover {
    background: var(--neon-purple);
    color: var(--dark-bg);
}

.section-title {
    text-align: center;
    font-size: 3rem;
    margin: 4rem auto;
    background: linear-gradient(45deg, var(--neon-blue), var(--neon-purple));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Footer */
.footer {
    position: relative;
    background: var(--bg-color);
    padding: 4rem 0 2rem;
    overflow: hidden;
}

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

.footer-container {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    gap: 4rem;
    margin-bottom: 3rem;
}

.footer-left {
    flex: 1;
}

.footer-left h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.footer-left p {
    color: var(--text-color-light);
    margin-bottom: 1.5rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.footer-bottom p {
    color: var(--text-color-light);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--card-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: var(--primary-color);
    color: var(--bg-color);
    transform: translateY(-3px);
}