:root {
    --bg-dark: #0b0e14;
    --bg-light: #f5f7fa;
    --bg-card-dark: rgba(20, 24, 32, 0.7);
    --bg-card-light: rgba(255, 255, 255, 0.85);
    
    --neon-cyan: #00f2ff;
    --neon-purple: #bc13fe;
    
    --text-primary-dark: #ffffff;
    --text-primary-light: #1a1c20;
    --text-secondary-dark: #a0a0a0;
    --text-secondary-light: #505c6e;
    
    --shadow-cyan: 0 0 15px rgba(0, 242, 255, 0.5);
    --shadow-purple: 0 0 15px rgba(188, 19, 254, 0.5);

    /* Default Dark Theme */
    --bg-body: var(--bg-dark);
    --bg-card: var(--bg-card-dark);
    --text-main: var(--text-primary-dark);
    --text-sub: var(--text-secondary-dark);
    --sidebar-bg: rgba(15, 18, 25, 0.9);
    --nav-bg: rgba(10, 10, 15, 0.8);
}

.light-mode {
    --bg-body: var(--bg-light);
    --bg-card: var(--bg-card-light);
    --text-main: var(--text-primary-light);
    --text-sub: var(--text-secondary-light);
    --sidebar-bg: rgba(240, 242, 245, 0.9);
    --nav-bg: rgba(255, 255, 255, 0.85);
    --neon-purple: #8b00ff;
    --neon-cyan: #008b8b;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Underdog', 'Rajdhani', sans-serif;
}

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    overflow-x: hidden;
    transition: background-color 0.4s ease, color 0.4s ease;
}

#bg-video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
    opacity: 0.3;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, transparent, var(--bg-body));
    z-index: -1;
}

/* Sidebar */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 280px;
    height: 100vh;
    background: var(--sidebar-bg);
    backdrop-filter: blur(10px);
    border-right: 1px solid rgba(0, 242, 255, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 100px;
    z-index: 999;
    transition: background 0.4s ease;
}

.profile-img-container {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    border: 3px solid var(--neon-cyan);
    box-shadow: var(--shadow-cyan);
    overflow: hidden;
    margin-bottom: 1rem;
}

.profile-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.role-tag {
    color: var(--neon-cyan);
    font-size: 1.1rem;
    font-weight: bold;
    text-shadow: var(--shadow-cyan);
    margin-bottom: 2rem;
}

.sidebar-socials {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 120px;
    margin-top: auto;
    margin-bottom: 3rem;
    position: relative;
}

.sidebar-socials a {
    color: var(--text-secondary);
    font-size: 2rem;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: var(--bg-card);
    border-radius: 50%;
    border: 1px solid rgba(0, 242, 255, 0.2);
}

.sidebar-socials a:nth-child(odd) {
    align-self: flex-start;
}

.sidebar-socials a:nth-child(even) {
    align-self: flex-end;
    margin-top: -0.5rem;
}

.sidebar-socials a:hover {
    color: var(--neon-cyan);
    text-shadow: var(--shadow-cyan);
    transform: translateY(-3px);
}

nav {
    background: var(--nav-bg);
    backdrop-filter: blur(15px);
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1001;
    border-bottom: 1px solid rgba(188, 19, 254, 0.3);
    transition: background 0.4s ease;
}

#theme-toggle {
    background: transparent;
    border: 1px solid var(--neon-cyan);
    color: var(--neon-cyan);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    margin-left: 2rem;
    box-shadow: var(--shadow-cyan);
}

.nav-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.logo {
    color: var(--neon-purple);
    font-size: 1.8rem;
    font-weight: 800;
    text-shadow: var(--shadow-purple);
}

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

.nav-links a {
    color: var(--text-main);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: 0.3s;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--neon-cyan);
    text-shadow: var(--shadow-cyan);
}

main {
    margin-left: 280px;
    margin-top: 100px;
    padding: 2rem;
}

.projects-section {
    max-width: 1200px;
    margin: 0 auto;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
    animation: fadeIn 1s ease-out;
}

.project-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid rgba(0, 242, 255, 0.1);
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backdrop-filter: blur(5px);
}

.project-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: var(--neon-cyan);
    box-shadow: var(--shadow-cyan);
}

.project-card.featured {
    border-color: rgba(188, 19, 254, 0.3);
}

.project-card.featured:hover {
    border-color: var(--neon-purple);
    box-shadow: var(--shadow-purple);
}

.project-card h3 {
    font-size: 1.6rem;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.project-card p {
    color: var(--text-sub);
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.project-tags span {
    background: rgba(188, 19, 254, 0.2);
    color: var(--neon-purple);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    border: 1px solid rgba(188, 19, 254, 0.3);
}

.project-card:hover .project-tags span {
    background: var(--neon-purple);
    color: white;
}

footer {
    text-align: center;
    padding: 3rem;
    background: var(--nav-bg);
    margin-top: 5rem;
    border-top: 1px solid rgba(188, 19, 254, 0.2);
    margin-left: 280px;
    transition: background 0.4s ease;
}

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

@media (max-width: 1100px) {
    .sidebar {
        position: relative;
        width: 100%;
        height: auto;
        padding: 120px 20px 40px;
        border-right: none;
        border-bottom: 1px solid rgba(0, 242, 255, 0.2);
    }
    main, footer {
        margin-left: 0;
    }
}

/* Click Pulse Animation */
.click-pulse {
    animation: clickPulse 0.4s ease-out;
}

@keyframes clickPulse {
    0% { transform: scale(1); }
    50% { transform: scale(0.92); filter: brightness(1.5); }
    100% { transform: scale(1); }
}
