/*
    ================================================================
    EIGHTEX MS: GLOBAL STYLESHEET (Merged: CV Design + Neon Cursor)
    ================================================================
*/

/* --- Variables & Theming --- */
:root {
    /* Dark Mode (Default) */
    --bg-main: #050505;
    --bg-contrast: #0a0a0a;
    --text-main: #ffffff;
    --text-muted: #b0b0b0;
    --neon-primary: #00f3ff; /* Cyan */
    --neon-secondary: #bc13fe; /* Pink/Purple */
    --glass-bg: rgba(20, 20, 20, 0.7);
    --border-color: rgba(255, 255, 255, 0.1);
    --input-bg: rgba(255, 255, 255, 0.05);
    --scroll-offset: 0px; /* JS controlled variable for Parallax */
    --link-color: var(--neon-primary);
}

/* Light Mode Variables */
body.light-mode {
    --bg-main: #f4f6f8;
    --bg-contrast: #ffffff;
    --text-main: #1a1a1a;
    --text-muted: #555555;
    --neon-primary: #2d5bff; /* Deep Blue */
    --neon-secondary: #d900ff; /* Deep Pink */
    --glass-bg: rgba(255, 255, 255, 0.85);
    --border-color: rgba(0, 0, 0, 0.1);
    --input-bg: rgba(0, 0, 0, 0.05);
    --link-color: var(--neon-secondary);
}

/* --- Base Setup --- */
body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: 'Rajdhani', sans-serif;
    transition: background-color 0.5s ease, color 0.5s ease;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Headers & Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-main);
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

/* Apply subtle neon glow to headers in Dark Mode */
body:not(.light-mode) h1,
body:not(.light-mode) h2,
body:not(.light-mode) h3 {
    text-shadow: 0 0 5px rgba(0, 243, 255, 0.3);
}

/* Hover effects for headers */
h1:hover, h2:hover, h3:hover, h4:hover, h5:hover, h6:hover {
    color: var(--neon-primary);
    text-shadow: 0 0 10px var(--neon-primary);
}

a {
    color: var(--link-color);
    text-decoration: none;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

body:not(.light-mode) a {
    text-shadow: 0 0 2px var(--link-color);
}
body:not(.light-mode) a:hover {
    text-shadow: 0 0 8px var(--neon-secondary);
    color: var(--neon-secondary);
}

/* Light Mode Text Fixes */
body:not(.light-mode) .text-white {
    color: #ffffff !important;
    text-shadow: 0 0 3px rgba(255, 255, 255, 0.2);
}
body.light-mode .text-white {
    color: var(--text-main) !important; 
    text-shadow: none; 
}

.font-orbitron { font-family: 'Orbitron', sans-serif; }
.font-rajdhani { font-family: 'Rajdhani', sans-serif; }
.bg-contrast { background-color: var(--bg-contrast); transition: 0.5s; }
.section-pad { padding-top: 80px; padding-bottom: 80px; }


/* --- PARALLAX BACKGROUND --- */
#body-content::before {
    content: '';
    position: fixed; 
    top: -50px; left: -50px;
    width: calc(100% + 100px); height: calc(100vh + 100px);
    z-index: -10; 
    opacity: 0.5; 
    transition: background-image 0.5s ease, background-color 0.5s ease; 
    transform: translate(var(--scroll-offset), var(--scroll-offset)); 
}

/* Dark Mode Grid */
#body-content::before {
    background-image: radial-gradient(circle at 100px 100px, rgba(0, 243, 255, 0.1) 1px, transparent 1px),
                      radial-gradient(circle at 50px 50px, rgba(188, 19, 254, 0.1) 1px, transparent 1px);
    background-size: 100px 100px;
    background-color: var(--bg-main);
}

/* Light Mode Grid */
body.light-mode #body-content::before {
    background-image: radial-gradient(circle at 100px 100px, rgba(45, 91, 255, 0.1) 1px, transparent 1px),
                      radial-gradient(circle at 50px 50px, rgba(217, 0, 255, 0.1) 1px, transparent 1px);
    background-size: 100px 100px;
    background-color: var(--bg-main);
}

/* Background Glitch Animation */
@keyframes background-glitch-anim {
    0% { filter: contrast(120%) hue-rotate(0deg); opacity: 0.5; }
    20% { filter: contrast(100%) hue-rotate(5deg); opacity: 0.6; }
    40% { filter: contrast(150%) hue-rotate(0deg); opacity: 0.5; }
    60% { filter: contrast(100%) hue-rotate(-5deg); opacity: 0.7; }
    80% { filter: contrast(130%) hue-rotate(0deg); opacity: 0.5; }
    100% { filter: contrast(120%) hue-rotate(0deg); opacity: 0.5; }
}

body.scrolling #body-content::before {
    animation: background-glitch-anim 0.3s infinite linear alternate-reverse;
    opacity: 0.7;
}

/* --- NAVBAR --- */
.glass-nav {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--neon-primary);
    transition: 0.5s;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.nav-link {
    color: var(--text-main) !important;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
}

.nav-link::after {
    content: '';
    display: block;
    width: 0; height: 2px;
    background: var(--neon-secondary);
    transition: width 0.3s;
}
.nav-link:hover::after { width: 100%; }

.btn-icon {
    color: var(--text-main);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    transition: 0.3s;
}
.btn-icon:hover {
    color: var(--neon-primary);
    border-color: var(--neon-primary);
    box-shadow: 0 0 10px var(--neon-primary);
}

/* --- BUTTONS --- */
.btn-neon-primary, .btn-neon-secondary {
    border: 1px solid var(--neon-primary);
    color: var(--neon-primary);
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 2px;
    padding: 10px 30px;
    border-radius: 0;
    position: relative;
    overflow: hidden;
    transition: 0.4s;
    background: transparent;
}

.btn-neon-primary:hover {
    background: var(--neon-primary);
    color: var(--bg-main);
    box-shadow: 0 0 20px var(--neon-primary);
}

.btn-neon-secondary { border-color: var(--neon-secondary); color: var(--neon-secondary); }
.btn-neon-secondary:hover {
    background: var(--neon-secondary);
    color: var(--bg-main);
    box-shadow: 0 0 20px var(--neon-secondary);
}

/* --- GLITCH TEXT EFFECT --- */
.glitch-wrapper { position: relative; display: inline-block; }
.navbar-brand .glitch-wrapper { display: inline-flex; align-items: center; }
.glitch { position: relative; color: var(--text-main); font-family: 'Orbitron', sans-serif; }

.glitch::before, .glitch::after {
    content: attr(data-text);
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
}
.glitch::before {
    left: 2px; text-shadow: -1px 0 var(--neon-secondary);
    clip: rect(0px, 9999px, 15px, 0); 
    animation: glitch-anim 2s infinite steps(5) alternate-reverse; 
}
.glitch::after {
    left: -2px; text-shadow: -1px 0 var(--neon-primary);
    clip: rect(15px, 9999px, 30px, 0);
    animation: glitch-anim2 2s infinite steps(5) alternate-reverse; 
}

@keyframes glitch-anim {
    0%   { clip: rect(1px, 9999px, 15px, 0); transform: translate(1px, -1px); opacity: 0.9; }
    20%  { clip: rect(20px, 9999px, 40px, 0); transform: translate(-1px, 1px); opacity: 0.85; }
    40%  { clip: rect(5px, 9999px, 25px, 0); transform: translate(1px, -1px); opacity: 0.95; }
    100% { clip: rect(1px, 9999px, 15px, 0); transform: translate(-1px, 1px); opacity: 0.9; }
}
@keyframes glitch-anim2 {
    0%   { clip: rect(15px, 9999px, 30px, 0); transform: translate(-1px, 1px); opacity: 0.85; }
    50%  { clip: rect(25px, 9999px, 45px, 0); transform: translate(-1px, 1px); opacity: 0.8; }
    100% { clip: rect(15px, 9999px, 30px, 0); transform: translate(-1px, 1px); opacity: 0.85; }
}

/* Logo Glitch */
.logo-glitch-filter { transition: filter 0.2s ease-in-out; }
.logo-glitch-filter:not(:hover) { animation: image-transmission-glitch 4s infinite steps(2) alternate-reverse; }

@keyframes image-transmission-glitch {
    0% { filter: hue-rotate(0deg) saturate(100%); opacity: 1; transform: translate(0, 0); }
    10% { filter: hue-rotate(20deg) saturate(150%); opacity: 0.95; transform: translate(1px, -1px); }
    60% { filter: contrast(1.5); opacity: 0.8; transform: translate(2px, 0); }
    100% { filter: hue-rotate(0deg) saturate(100%); opacity: 1; transform: translate(0, 0); }
}

/* --- CARDS --- */
.holo-card {
    background: var(--bg-contrast);
    border: 1px solid var(--border-color);
    padding: 30px;
    transition: 0.4s;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}
.holo-card:hover {
    transform: translateY(-10px);
    border-color: var(--neon-primary);
    box-shadow: inset 0 0 20px rgba(0, 243, 255, 0.1), 0 10px 30px rgba(0, 243, 255, 0.2);
}
.holo-card i { color: var(--neon-secondary); transition: 0.4s; text-shadow: 0 0 5px var(--neon-secondary); }
.holo-card:hover i { color: var(--neon-primary); transform: scale(1.1); text-shadow: 0 0 10px var(--neon-primary); }

/* --- PRICING --- */
.pricing-box {
    background: var(--bg-contrast);
    border: 1px solid var(--border-color);
    padding: 40px 20px;
    text-align: center;
    transition: 0.4s;
    position: relative;
}
.pricing-box:hover { transform: scale(1.03); box-shadow: 0 0 25px var(--neon-primary); }
.price { font-size: 3rem; font-weight: bold; color: var(--neon-primary); text-shadow: 0 0 10px var(--neon-primary); margin: 20px 0; }
.pricing-box ul { list-style: none; padding: 0; margin-bottom: 30px; }
.pricing-box ul li { padding: 10px 0; border-bottom: 1px solid var(--border-color); color: var(--text-muted); }

/* --- FORM & FOOTER --- */
.neon-input {
    background: var(--input-bg);
    border: none; border-bottom: 2px solid var(--border-color); color: var(--text-main); border-radius: 0; transition: 0.3s;
}
.neon-input:focus {
    background: var(--input-bg); border-color: var(--neon-primary); color: var(--text-main);
    box-shadow: 0 5px 10px -5px var(--neon-primary); outline: none;
}

footer { padding: 50px 0; border-top: 1px solid var(--border-color); background: var(--bg-contrast); }
footer a { color: var(--text-muted); transition: 0.3s; }
footer a:hover { color: var(--neon-primary); text-shadow: 0 0 5px var(--neon-primary); }

.hidden { opacity: 0; transform: translateY(30px); transition: opacity 0.8s ease-out, transform 0.8s ease-out; }
.show { opacity: 1; transform: translateY(0); }
.delay-100 { transition-delay: 0.1s; }
.delay-200 { transition-delay: 0.2s; }
.delay-300 { transition-delay: 0.3s; }
.hero { min-height: 100vh; padding-top: 80px; position: relative; overflow: hidden; }

/* =========================================
   CV MODAL DESIGN (Sidebar + Timeline)
   ========================================= */
.cv-container {
    display: flex;
    flex-wrap: wrap;
    border: 1px solid var(--neon-primary);
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.1);
}

/* Sidebar (Left Column) */
.cv-sidebar {
    background: var(--bg-contrast);
    border-right: 1px solid var(--border-color);
    padding: 30px 20px;
    text-align: center;
    width: 100%;
}

/* Main Content (Right Column) */
.cv-main-content {
    background: var(--bg-main);
    padding: 30px;
    width: 100%;
}

@media (min-width: 768px) {
    .cv-sidebar { width: 35%; text-align: left; }
    .cv-main-content { width: 65%; }
}

/* Profile Image */
.cv-photo-frame {
    width: 150px; height: 150px;
    border-radius: 50%;
    border: 3px solid var(--neon-secondary);
    padding: 5px; margin: 0 auto 20px;
    box-shadow: 0 0 15px var(--neon-secondary);
}
.cv-photo { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }

/* Contact Info */
.cv-contact-item {
    display: flex; align-items: center; margin-bottom: 15px; color: var(--text-muted); font-size: 0.9rem;
}
.cv-contact-item i {
    width: 30px; height: 30px; background: var(--bg-main); color: var(--text-main);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    margin-right: 10px; border: 1px solid var(--border-color);
}

/* Section Headers */
.cv-section-title {
    background: var(--bg-contrast); color: var(--text-main); padding: 8px 15px;
    font-family: 'Orbitron', sans-serif; font-size: 1.1rem;
    border-left: 4px solid var(--neon-primary);
    margin-bottom: 20px; margin-top: 20px; text-transform: uppercase; letter-spacing: 1px;
}

/* Experience/Timeline Items */
.cv-job-item {
    margin-bottom: 20px; border-left: 1px solid var(--border-color); padding-left: 15px; position: relative;
}
.cv-job-item::before {
    content: ''; position: absolute; left: -4px; top: 5px;
    width: 7px; height: 7px; background: var(--neon-secondary); border-radius: 50%;
}
.cv-job-title { color: var(--neon-primary); font-weight: bold; font-size: 1.1rem; }
.cv-job-company { color: var(--text-main); font-weight: 600; }
.cv-job-date { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 5px; }


/* =========================================
   CUSTOM NEON CURSOR & GLITCH TRAILS (Added)
   ========================================= */

/* Hide Default Cursor (Only on Desktop) */
@media (min-width: 992px) {
    body, a, button, input, textarea, .btn {
        cursor: none !important;
    }
}

/* 1. The Main Pointer (Precise) */
.custom-cursor {
    position: fixed; top: 0; left: 0;
    width: 20px; height: 20px;
    border: 2px solid var(--neon-primary);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none; z-index: 10000;
    mix-blend-mode: difference;
    transition: width 0.2s ease, height 0.2s ease, background-color 0.2s, border-color 0.2s;
    display: none;
}
/* Center Dot */
.custom-cursor::after {
    content: ''; position: absolute; top: 50%; left: 50%;
    width: 4px; height: 4px; background: var(--neon-primary);
    border-radius: 50%; transform: translate(-50%, -50%);
    box-shadow: 0 0 10px var(--neon-primary);
}

/* 2. The Trailing Ghost (Smooth Follow) */
.cursor-trail {
    position: fixed; top: 0; left: 0;
    width: 40px; height: 40px;
    border: 1px solid var(--neon-secondary);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none; z-index: 9999;
    opacity: 0.6;
    transition: width 0.3s ease, height 0.3s ease, opacity 0.3s;
    box-shadow: 0 0 15px var(--neon-secondary);
    display: none;
}

/* Show on Desktop Only */
@media (min-width: 992px) {
    .custom-cursor, .cursor-trail { display: block; }
}

/* Hover State */
.custom-cursor.hovered {
    width: 50px; height: 50px;
    background-color: rgba(0, 243, 255, 0.1);
    border-color: var(--neon-primary);
    mix-blend-mode: normal;
    box-shadow: 0 0 30px var(--neon-primary);
}
.custom-cursor.hovered::after {
    background: var(--neon-secondary);
    box-shadow: 0 0 20px var(--neon-secondary);
}
.cursor-trail.hovered {
    width: 70px; height: 70px;
    border-color: var(--neon-primary);
    opacity: 0.3;
}

/* Active/Click State */
.custom-cursor.active {
    transform: translate(-50%, -50%) scale(0.8);
    background-color: var(--neon-primary);
}

/* Cursor Glitch Animation */
@keyframes cursor-glitch-anim {
    0% { transform: translate(-50%, -50%) skew(0deg); clip-path: circle(50%); }
    20% { transform: translate(-55%, -45%) skew(-20deg); clip-path: circle(40%); }
    40% { transform: translate(-45%, -55%) skew(20deg); clip-path: circle(60%); }
    60% { transform: translate(-50%, -50%) skew(0deg); opacity: 0.8; }
    80% { transform: translate(-52%, -48%) skew(5deg); }
    100% { transform: translate(-50%, -50%) skew(0deg); opacity: 1; }
}
.custom-cursor.glitching {
    animation: cursor-glitch-anim 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) both infinite;
    border-color: #ff003c;
    box-shadow: 2px 0 #ff003c, -2px 0 #00f3ff;
}