: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;
    --neon-green: #39ff14;
    
    --text-primary-dark: #ffffff;
    --text-primary-light: #1a1c20;
    --text-secondary-dark: #a0a0a0;
    --text-secondary-light: #505c6e;
    
    --shadow-cyan: 0 0 10px rgba(0, 242, 255, 0.5);
    --shadow-purple: 0 0 10px 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;
    --shadow-cyan: 0 0 10px rgba(0, 139, 139, 0.3);
    --shadow-purple: 0 0 10px rgba(139, 0, 255, 0.3);
}

* {
    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;
    line-height: 1.6;
    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.4;
    filter: brightness(0.6) contrast(1.2);
}

.light-mode #bg-video {
    opacity: 0.15;
    filter: brightness(1.2) contrast(0.8);
}

.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 Styling */
.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: 160px;
    height: 160px;
    border-radius: 50%;
    border: 3px solid var(--neon-cyan);
    box-shadow: var(--shadow-cyan);
    overflow: hidden;
    margin-bottom: 1.5rem;
    animation: pulseCyan 2s infinite;
}

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

.role-tag {
    color: var(--neon-cyan);
    font-size: 1.2rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
    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; /* Slight overlap for zigzag look */
}

.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);
}

#theme-toggle:hover {
    background: var(--neon-cyan);
    color: var(--bg-dark);
    box-shadow: 0 0 15px var(--neon-cyan);
    transform: rotate(30deg);
}

.light-mode .fa-sun { display: none; }
.dark-mode-only { display: block; }
.light-mode .fa-moon { display: block; }
.light-mode-only { display: none; }

.light-mode .light-mode-only { display: block; }
.light-mode .dark-mode-only { display: none; }

.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);
    letter-spacing: 1px;
}

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

.nav-links a {
    color: var(--text-main);
    text-decoration: none;
    padding: 0.6rem 1.2rem;
    border-radius: 4px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-weight: 500;
    border: 1px solid transparent;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--neon-cyan);
    border: 1px solid var(--neon-cyan);
    box-shadow: var(--shadow-cyan);
    background: rgba(0, 242, 255, 0.1);
}

main {
    margin-left: 280px;
    margin-top: 80px;
    padding: 3rem;
    max-width: calc(100vw - 280px);
}

.hero {
    min-height: 80vh;
    display: flex;
    align-items: center;
    padding: 0 4rem;
    background: var(--bg-card);
    border-radius: 30px;
    border: 1px solid rgba(188, 19, 254, 0.2);
    margin-bottom: 4rem;
    position: relative;
    overflow: hidden;
    animation: fadeIn 1s ease-out;
}

.hero-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 4rem;
}

.hero-content {
    flex: 1;
}

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

.image-frame {
    position: relative;
    width: 350px;
    height: 350px;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    background: linear-gradient(45deg, var(--neon-cyan), var(--neon-purple));
    padding: 5px;
    animation: morph 8s ease-in-out infinite alternate;
    box-shadow: var(--shadow-cyan), var(--shadow-purple);
}

.image-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
    filter: grayscale(20%) contrast(1.1);
}

@keyframes morph {
    0% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
    100% { border-radius: 70% 30% 30% 70% / 70% 70% 30% 30%; }
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(188, 19, 254, 0.1), transparent);
    pointer-events: none;
}

.hero h1 {
    font-size: 4.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(90deg, var(--text-main), var(--neon-cyan));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 20px rgba(0, 242, 255, 0.3);
}

.hero p {
    font-size: 1.5rem;
    color: var(--text-sub);
    margin-bottom: 2rem;
    letter-spacing: 3px;
}

.cta-button {
    display: inline-block;
    padding: 1.2rem 2.5rem;
    background: transparent;
    color: var(--neon-cyan);
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
    border: 2px solid var(--neon-cyan);
    box-shadow: var(--shadow-cyan);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.cta-button:hover {
    background: var(--neon-cyan);
    color: var(--bg-dark);
    box-shadow: 0 0 30px var(--neon-cyan);
    transform: translateY(-5px);
}

.cta-button:active {
    transform: scale(0.95);
}

.secondary-btn {
    margin-left: 1rem;
    border-color: var(--neon-purple) !important;
    color: var(--neon-purple) !important;
}

.secondary-btn:hover {
    background: var(--neon-purple) !important;
    color: var(--bg-dark) !important;
    box-shadow: 0 0 30px var(--neon-purple) !important;
}

/* Skills Grid */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
    margin-top: 3rem;
}

.skill-card {
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: 15px;
    border: 1px solid rgba(0, 242, 255, 0.1);
    transition: all 0.4s ease;
    backdrop-filter: blur(5px);
}

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

.skill-card h3 {
    color: var(--neon-purple);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    text-transform: uppercase;
}

.skill-level {
    color: var(--text-sub);
    font-size: 1.1rem;
}

/* Contact Section */
#contact1 {
    margin-top: 5rem;
    padding: 4rem;
    background: var(--bg-card);
    border-radius: 20px;
    border: 1px solid rgba(188, 19, 254, 0.2);
}

.contact-form {
    max-width: 800px;
    margin: 2rem auto 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.contact-form textarea {
    grid-column: span 2;
    min-height: 150px;
}

.contact-form input,
.contact-form textarea {
    padding: 1.2rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 242, 255, 0.2);
    border-radius: 8px;
    color: white;
    outline: none;
    transition: 0.3s;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--neon-cyan);
    box-shadow: var(--shadow-cyan);
    background: rgba(255, 255, 255, 0.1);
}

.contact-form button {
    grid-column: span 2;
    margin-top: 1rem;
}

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

.social-links {
    margin-top: 1.5rem;
}

.social-links a {
    color: var(--neon-purple);
    text-decoration: none;
    margin: 0 1rem;
    transition: 0.3s;
}

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

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

@keyframes pulseCyan {
    0% { box-shadow: 0 0 10px rgba(0, 242, 255, 0.5); }
    50% { box-shadow: 0 0 25px rgba(0, 242, 255, 0.8); }
    100% { box-shadow: 0 0 10px rgba(0, 242, 255, 0.5); }
}

/* Responsive */
@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);
    }
    
@media (max-width: 1024px) {
    .sidebar { width: 0; display: none; }
    main, footer { margin-left: 0; max-width: 100%; padding: 2rem; }
    
    .hero {
        padding: 4rem 2rem;
        min-height: auto;
    }
    
    .hero-container {
        flex-direction: column;
        text-align: center;
        gap: 3rem;
    }
    
    .hero-content { order: 2; }
    .hero-image { order: 1; }
    .image-frame { width: 280px; height: 280px; }
    
    .hero h1 { font-size: 3rem; }
}
}

/* 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); }
}
