/* ---- BASE AND CSS VARIABLES ---- */
:root {
    /* DEFAULT DARK Cyberpunk Theme */
    --bg-color: #060913;
    --bg-accent: #0f172a;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    
    --primary-color: #0ff;
    --secondary-color: #ff00ff;
    
    --box-bg: rgba(15, 23, 42, 0.7);
    --border-color: rgba(0, 255, 255, 0.3);
    
    --glow-shadow: 0 0 10px var(--primary-color), 0 0 20px var(--primary-color);
    --hover-glow: 0 0 15px var(--primary-color), 0 0 30px var(--secondary-color);
    
    --cursor-size: 300px;
    --cursor-color: rgba(0, 255, 255, 0.05);
}

[data-theme="light"] {
    --bg-color: #f1f5f9;
    --bg-accent: #e2e8f0;
    --text-primary: #0f172a;
    --text-secondary: #334155;
    
    --primary-color: #2563eb;
    --secondary-color: #e11d48;
    
    --box-bg: rgba(255, 255, 255, 0.8);
    --border-color: rgba(37, 99, 235, 0.3);
    
    --glow-shadow: 0 0 10px rgba(37, 99, 235, 0.4);
    --hover-glow: 0 0 15px rgba(37, 99, 235, 0.6), 0 0 30px rgba(225, 29, 72, 0.4);
    --cursor-color: rgba(37, 99, 235, 0.05);
}

[data-theme="blue"] {
    --bg-color: #020617;
    --bg-accent: #0b2239;
    --text-primary: #e0f2fe;
    --text-secondary: #7dd3fc;
    
    --primary-color: #38bdf8;
    --secondary-color: #0ea5e9;
    
    --box-bg: rgba(11, 34, 57, 0.7);
    --border-color: rgba(56, 189, 248, 0.4);
    
    --glow-shadow: 0 0 10px var(--primary-color);
    --hover-glow: 0 0 15px var(--primary-color), 0 0 30px var(--secondary-color);
    --cursor-color: rgba(56, 189, 248, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
    font-family: 'Rajdhani', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    overflow-x: hidden;
    transition: background-color 0.4s ease, color 0.4s ease;
    cursor: default; /* Keep default, or use crosshair */
}

/* Custom Cursor Follower */
#cursor-glow {
    position: fixed;
    top: 0; left: 0;
    width: var(--cursor-size);
    height: var(--cursor-size);
    border-radius: 50%;
    background: radial-gradient(circle, var(--cursor-color) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 10;
    transition: width 0.2s, height 0.2s, background 0.4s ease;
}

/* Particle Canvas */
#particles-canvas {
    position: fixed;
    top: 0; left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
}

/* Typography elements */
h1, h2, h3, h4, .glitch {
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 1.5px;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: var(--bg-color);
}
::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 5px;
}

/* ---- THEME SWITCHER ---- */
.theme-switcher {
    position: fixed;
    top: 20px;
    right: 30px;
    display: flex;
    gap: 15px;
    z-index: 100;
    background: var(--box-bg);
    padding: 10px;
    border-radius: 30px;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
}
.theme-btn {
    background: transparent;
    border: none;
    font-size: 24px;
    cursor: pointer;
    transition: transform 0.3s, text-shadow 0.3s;
    opacity: 0.5;
    padding: 5px;
}
.theme-btn:hover {
    transform: scale(1.2);
    opacity: 0.8;
}
.theme-btn.active {
    opacity: 1;
    transform: scale(1.2);
    text-shadow: var(--glow-shadow);
}
@media (max-width: 600px) {
    .theme-switcher {
        top: auto;
        bottom: 20px; /* Move to bottom on mobile */
        right: 50%;
        transform: translateX(50%);
        gap: 20px;
    }
    .theme-btn { font-size: 32px; } /* Large touch-friendly */
}

/* ---- HERO SECTION ---- */
#hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    padding: 0 20px;
}

.profile-pic-container {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    margin-bottom: 30px;
    position: relative;
    padding: 5px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    animation: pulseBorder 2s infinite alternate;
}
@keyframes pulseBorder {
    0% { box-shadow: 0 0 15px var(--primary-color); }
    100% { box-shadow: 0 0 40px var(--secondary-color); }
}

.profile-pic {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    background-color: var(--bg-color);
    border: 3px solid var(--bg-color);
}

/* Glitch Effect */
.glitch {
    position: relative;
    font-size: 4rem;
    font-weight: 900;
    color: var(--text-primary);
    text-shadow: 0 0 5px var(--primary-color);
    margin-bottom: 10px;
}
.glitch::before, .glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    opacity: 0.8;
}
.glitch::before {
    left: 2px;
    text-shadow: -2px 0 var(--secondary-color);
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 5s infinite linear alternate-reverse;
}
.glitch::after {
    left: -2px;
    text-shadow: -2px 0 var(--primary-color);
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim2 5s infinite linear alternate-reverse;
}
@keyframes glitch-anim {
    0% { clip: rect(10px, 9999px, 86px, 0); }
    5% { clip: rect(69px, 9999px, 81px, 0); }
    10% { clip: rect(51px, 9999px, 44px, 0); }
    15% { clip: rect(70px, 9999px, 53px, 0); }
    20% { clip: rect(44px, 9999px, 15px, 0); }
    100% { clip: rect(44px, 9999px, 15px, 0); }
}
@keyframes glitch-anim2 {
    0% { clip: rect(81px, 9999px, 98px, 0); }
    5% { clip: rect(78px, 9999px, 12px, 0); }
    10% { clip: rect(98px, 9999px, 73px, 0); }
    15% { clip: rect(21px, 9999px, 51px, 0); }
    20% { clip: rect(51px, 9999px, 88px, 0); }
    100% { clip: rect(51px, 9999px, 88px, 0); }
}

.neon-text {
    font-size: 2rem;
    color: var(--primary-color);
    text-transform: uppercase;
    text-shadow: var(--glow-shadow);
    margin-bottom: 20px;
}

.bio {
    font-size: 1.4rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin-bottom: 40px;
    line-height: 1.6;
}

/* Buttons */
.header-actions {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.neon-btn {
    position: relative;
    display: inline-block;
    padding: 15px 30px;
    color: var(--primary-color);
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
    letter-spacing: 2px;
    background: transparent;
    border: 2px solid var(--primary-color);
    cursor: pointer;
    overflow: hidden;
    transition: 0.2s;
    border-radius: 5px;
    box-shadow: 0 0 10px inset var(--primary-color);
}
.neon-btn:hover {
    color: var(--bg-color);
    background: var(--primary-color);
    box-shadow: 0 0 10px var(--primary-color), 0 0 30px var(--primary-color), 0 0 60px var(--primary-color);
    transform: translateY(-3px);
}
.neon-btn.btn-secondary {
    border-color: var(--secondary-color);
    color: var(--secondary-color);
    box-shadow: 0 0 10px inset var(--secondary-color);
}
.neon-btn.btn-secondary:hover {
    background: var(--secondary-color);
    color: var(--bg-color);
    box-shadow: 0 0 10px var(--secondary-color), 0 0 30px var(--secondary-color), 0 0 60px var(--secondary-color);
}
.btn-sm {
    padding: 10px 20px;
    font-size: 0.9rem;
}
.w-full {
    width: 100%;
}

/* Dropdown styling */
.dropdown {
    position: relative;
    display: inline-block;
}
.dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--box-bg);
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.5);
    z-index: 100;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 10px;
}
.dropdown-content a {
    color: var(--text-primary);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    transition: 0.3s;
    font-family: 'Orbitron', sans-serif;
    font-size: 1rem;
    text-align: center;
}
.dropdown-content a:hover {
    background-color: rgba(0, 255, 255, 0.2);
    color: var(--primary-color);
    text-shadow: var(--glow-shadow);
}
.dropdown:hover .dropdown-content, .dropdown-content.show {
    display: block;
}

/* Scroll indicator */
.scroll-down {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
}
.mouse {
    width: 30px;
    height: 50px;
    border: 2px solid var(--text-secondary);
    border-radius: 15px;
    position: relative;
}
.wheel {
    width: 4px;
    height: 8px;
    background: var(--primary-color);
    border-radius: 2px;
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    animation: scrollWheel 2s infinite ease-in-out;
    box-shadow: 0 0 5px var(--primary-color);
}
@keyframes scrollWheel {
    0% { top: 10px; opacity: 1; }
    100% { top: 30px; opacity: 0; }
}

/* ---- COMMON SECTION LAYOUT ---- */
.section {
    padding: 100px 20px;
    max-width: 1200px;
    margin: 0 auto;
}
.section-title {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 60px;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}
@media (max-width: 600px) {
    .section-title { font-size: 2rem; }
}

.neon-border-box {
    background: var(--box-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 30px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}
.hover-glow:hover {
    box-shadow: var(--hover-glow);
    border-color: var(--primary-color);
    transform: translateY(-5px);
}

/* ---- SKILLS SECTION ---- */
.skills-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}
@media (max-width: 800px) {
    .skills-wrapper { grid-template-columns: 1fr; }
}
.category-title {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 30px;
    text-shadow: var(--glow-shadow);
}
.skill {
    margin-bottom: 25px;
}
.skill-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 1.2rem;
    font-weight: 600;
}
.progress-bar {
    width: 100%;
    height: 10px;
    background: rgba(0,0,0,0.5);
    border-radius: 5px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255,255,255,0.1);
}
.progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    width: 0; /* Animated by JS */
    transition: width 1.5s ease-out;
    box-shadow: 0 0 10px var(--primary-color);
}

.icons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 20px;
}
.tool {
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    transition: 0.3s;
}
.tool-icon {
    font-size: 3rem;
    margin-bottom: 10px;
    filter: drop-shadow(0 0 5px var(--primary-color));
}

/* ---- PROJECTS SECTION ---- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
}
.project-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 250px;
}
.project-title {
    font-size: 1.6rem;
    color: var(--secondary-color);
    margin-bottom: 15px;
    text-shadow: 0 0 5px var(--secondary-color);
}
.project-desc {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 25px;
}

/* ---- CONTACT SECTION ---- */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}
.contact-wrapper.centered-contact {
    display: flex;
    justify-content: center;
    align-items: center;
}
.contact-wrapper.centered-contact .contact-info {
    width: 100%;
    max-width: 500px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.contact-info h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}
.info-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}
.info-item a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1.1rem;
    transition: 0.3s;
}
.info-item a:hover {
    color: var(--primary-color);
    text-shadow: var(--glow-shadow);
}
.terminal-deco {
    margin-top: auto;
    font-family: monospace;
    color: var(--secondary-color);
    background: rgba(0,0,0,0.5);
    padding: 15px;
    border-radius: 5px;
    border-left: 3px solid var(--secondary-color);
}
.blink { animation: blink 1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ---- CHATBOT ---- */
.chatbot-trigger {
    position: fixed;
    bottom: 40px;
    right: 40px;
    width: 60px;
    height: 60px;
    background: var(--bg-accent);
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 30px;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.4);
}
.chatbot-trigger:hover {
    transform: scale(1.1);
}
.chatbot-window {
    position: fixed;
    bottom: 120px;
    right: 40px;
    width: 300px;
    background: var(--bg-color);
    border-radius: 10px;
    overflow: hidden;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 30px rgba(0,0,0,0.8);
    transition: opacity 0.3s, transform 0.3s;
}
.chatbot-window.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
}
.chat-header {
    background: var(--box-bg);
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    color: var(--primary-color);
    font-family: 'Orbitron', sans-serif;
}
.close-chat {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 24px;
    cursor: pointer;
}
.chat-messages {
    height: 250px;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.bot-msg, .user-msg {
    padding: 10px;
    border-radius: 8px;
    max-width: 80%;
    font-size: 0.95rem;
}
.bot-msg {
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid var(--primary-color);
    align-self: flex-start;
}
.user-msg {
    background: rgba(255, 0, 255, 0.1);
    border: 1px solid var(--secondary-color);
    align-self: flex-end;
}
.chat-input {
    display: flex;
    padding: 10px;
    border-top: 1px solid var(--border-color);
    background: var(--box-bg);
    gap: 10px;
}
.chat-input input {
    flex-grow: 1;
    background: transparent;
    border: none;
    color: var(--text-primary);
    outline: none;
    padding: 5px;
}
