:root {
    --bg-color: #050505;
    --card-bg: rgba(20, 20, 30, 0.6);
    --text-primary: #e0e0e0;
    --text-secondary: #a0a0a0;
    --accent-cyan: #00f3ff;
    --accent-purple: #bc13fe;
    --accent-green: #0aff0a;
    --accent-red: #ff003c;
    --font-heading: 'Orbitron', sans-serif;
    --font-sub: 'Rajdhani', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --border-glow: 0 0 10px rgba(0, 243, 255, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: 'Rajdhani', sans-serif;
    overflow-x: hidden;
    line-height: 1.6;
}

html {
    scroll-behavior: smooth;
}

/* Canvas Background */
#sciFiCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

/* Scanlines */
.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom,
            rgba(255, 255, 255, 0),
            rgba(255, 255, 255, 0) 50%,
            rgba(0, 0, 0, 0.2) 50%,
            rgba(0, 0, 0, 0.2));
    background-size: 100% 4px;
    z-index: 9999;
    pointer-events: none;
    opacity: 0.15;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 50px;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    background: rgba(5, 5, 5, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 243, 255, 0.1);
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: 2px;
    color: var(--text-primary);
}

.highlight {
    color: var(--accent-cyan);
    text-shadow: 0 0 10px var(--accent-cyan);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    position: relative;
    transition: color 0.3s;
}

.nav-link:hover {
    color: var(--accent-cyan);
}

.nav-link::before {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    overflow: hidden;
    color: var(--accent-cyan);
    white-space: nowrap;
    transition: width 0.3s ease-in-out;
    border-right: 2px solid var(--accent-cyan);
}

.nav-link:hover::before {
    width: 100%;
}

.menu-toggle {
    display: none;
    /* Mobile handling later */
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Sections */
.section {
    padding: 100px 20px;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding-top: 60px;
}

.hero-content {
    text-align: center;
    z-index: 2;
}

.glitch-wrapper {
    position: relative;
    margin-bottom: 20px;
}

.glitch {
    font-family: var(--font-heading);
    font-size: 4rem;
    font-weight: 900;
    color: var(--text-primary);
    text-transform: uppercase;
    position: relative;
    display: inline-block;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
}

.glitch::before {
    left: 2px;
    text-shadow: -1px 0 var(--accent-red);
    clip: rect(24px, 550px, 90px, 0);
    animation: glitch-anim-2 3s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: -1px 0 var(--accent-cyan);
    clip: rect(85px, 550px, 140px, 0);
    animation: glitch-anim 2.5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% {
        clip: rect(10px, 9999px, 80px, 0);
    }

    20% {
        clip: rect(33px, 9999px, 15px, 0);
    }

    40% {
        clip: rect(80px, 9999px, 8px, 0);
    }

    60% {
        clip: rect(5px, 9999px, 60px, 0);
    }

    80% {
        clip: rect(40px, 9999px, 2px, 0);
    }

    100% {
        clip: rect(70px, 9999px, 90px, 0);
    }
}

@keyframes glitch-anim-2 {
    0% {
        clip: rect(65px, 9999px, 69px, 0);
    }

    20% {
        clip: rect(4px, 9999px, 13px, 0);
    }

    40% {
        clip: rect(98px, 9999px, 5px, 0);
    }

    60% {
        clip: rect(24px, 9999px, 90px, 0);
    }

    80% {
        clip: rect(8px, 9999px, 3px, 0);
    }

    100% {
        clip: rect(35px, 9999px, 46px, 0);
    }
}

.role-text {
    font-family: var(--font-mono);
    font-size: 1.2rem;
    color: var(--accent-cyan);
    margin-bottom: 30px;
    min-height: 1.5em;
}

.hero-badges {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
}

.badge {
    background: rgba(0, 243, 255, 0.1);
    border: 1px solid var(--accent-cyan);
    padding: 5px 10px;
    font-size: 0.8rem;
    font-family: var(--font-mono);
    color: var(--accent-cyan);
    border-radius: 4px;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    font-family: var(--font-heading);
    text-decoration: none;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
    transition: all 0.3s;
    margin: 0 10px;
    border: 1px solid transparent;
}

.primary-btn {
    background: var(--accent-cyan);
    color: #000;
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.4);
}

.primary-btn:hover {
    background: transparent;
    color: var(--accent-cyan);
    border-color: var(--accent-cyan);
    box-shadow: 0 0 30px rgba(0, 243, 255, 0.6);
}

.secondary-btn {
    background: transparent;
    color: var(--accent-purple);
    border: 1px solid var(--accent-purple);
}

.secondary-btn:hover {
    background: var(--accent-purple);
    color: #000;
    box-shadow: 0 0 30px rgba(188, 19, 254, 0.6);
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    40% {
        transform: translateX(-50%) translateY(-10px);
    }

    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* Section Titles */
.section-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: var(--text-primary);
    margin-bottom: 60px;
    text-align: center;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60%;
    height: 4px;
    background: var(--accent-purple);
    box-shadow: 0 0 15px var(--accent-purple);
}

.section-title.smaller {
    font-size: 1.8rem;
    left: 0;
    transform: none;
    text-align: left;
    margin-bottom: 30px;
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

.glass-card,
.terminal-card {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 30px;
    border-radius: 10px;
    transition: transform 0.3s, border-color 0.3s;
}

.glass-card:hover,
.terminal-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-cyan);
}

.terminal-header {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
    align-items: center;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.red {
    background: #ff5f56;
}

.yellow {
    background: #ffbd2e;
}

.green {
    background: #27c93f;
}

.terminal-title {
    margin-left: 10px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.terminal-body {
    font-family: var(--font-mono);
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.highlight-text {
    color: var(--accent-green);
}

.summary-text {
    color: var(--text-primary);
    font-family: var(--font-sub);
    font-size: 1.1rem;
    line-height: 1.8;
}

.accent {
    color: var(--accent-cyan);
    font-weight: 600;
}

.stats-card {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.stat-item {
    background: rgba(0, 243, 255, 0.05);
    border: 1px solid rgba(0, 243, 255, 0.2);
    padding: 20px;
    text-align: center;
    border-radius: 8px;
    transition: all 0.3s;
}

.stat-item:hover {
    background: rgba(0, 243, 255, 0.1);
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.2);
}

.stat-item h3 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: var(--accent-cyan);
    margin-bottom: 5px;
}

.stat-item p {
    font-family: var(--font-mono);
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
}

/* Timeline */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 20px;
    height: 100%;
    width: 2px;
    background: rgba(255, 255, 255, 0.1);
}

.timeline-item {
    position: relative;
    margin-bottom: 50px;
    padding-left: 50px;
}

.timeline-dot {
    position: absolute;
    left: 16px;
    top: 5px;
    width: 10px;
    height: 10px;
    background: var(--accent-purple);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-purple);
    z-index: 10;
}

.timeline-date {
    font-family: var(--font-mono);
    color: var(--accent-purple);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.timeline-content h3 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.timeline-content h4 {
    font-family: var(--font-sub);
    font-size: 1.2rem;
    color: var(--accent-cyan);
    margin-bottom: 10px;
}

.location {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 15px;
    font-style: italic;
}

.job-details {
    list-style-type: none;
    margin-left: 15px;
}

.job-details li {
    margin-bottom: 5px;
    position: relative;
    font-size: 1rem;
}

.job-details li::before {
    content: '>';
    color: var(--accent-green);
    position: absolute;
    left: -15px;
}

/* Skills */
.skills-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.skill-category h3 {
    font-family: var(--font-heading);
    color: var(--text-primary);
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.skill-category h3 i {
    color: var(--accent-cyan);
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.skill-tag {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 8px 16px;
    border-radius: 20px;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-primary);
    transition: all 0.3s;
}

.skill-tag:hover {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.2);
    transform: scale(1.05);
}

/* Projects */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.project-card {
    text-align: center;
    position: relative;
    overflow: hidden;
}

.project-icon {
    font-size: 3rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
    transition: color 0.3s;
}

.project-card:hover .project-icon {
    color: var(--accent-purple);
    text-shadow: 0 0 15px var(--accent-purple);
}

.blink {
    animation: blinker 1.5s linear infinite;
    color: var(--accent-red);
}

@keyframes blinker {
    50% {
        opacity: 0;
    }
}

/* Education & Footer */
.dual-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.edu-list {
    list-style: none;
    border-left: 2px solid rgba(0, 243, 255, 0.3);
    padding-left: 20px;
}

.edu-item {
    margin-bottom: 30px;
}

.edu-item h4 {
    color: var(--text-primary);
    font-size: 1.2rem;
}

.sub-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.pub-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.pub-card i {
    font-size: 2rem;
    color: var(--accent-cyan);
    margin-bottom: 15px;
}

.contact-wrapper {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 30px 0;
}

.contact-btn {
    text-decoration: none;
    color: var(--text-primary);
    padding: 10px 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    transition: all 0.3s;
}

.contact-btn:hover {
    background: var(--accent-cyan);
    color: #000;
}

footer {
    text-align: center;
    margin-top: 50px;
    font-family: var(--font-mono);
    color: var(--text-secondary);
    font-size: 0.8rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 20px;
}

/* Initial state for animated elements */
.glass-card,
.timeline-item,
.skill-tag,
.stat-item {
    opacity: 0;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Chat Widget */
.chat-widget-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: var(--accent-cyan);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.4);
    z-index: 9999;
    transition: all 0.3s;
    animation: pulse 2s infinite;
}

.chat-widget-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 0 30px rgba(0, 243, 255, 0.8);
}

.chat-widget-btn i {
    font-size: 1.5rem;
    color: #000;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 243, 255, 0.7);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(0, 243, 255, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(0, 243, 255, 0);
    }
}

.chat-window {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 350px;
    height: 500px;
    background: rgba(5, 5, 5, 0.95);
    border: 1px solid var(--accent-cyan);
    border-radius: 10px;
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 9999;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.chat-window.active {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

.chat-header {
    background: rgba(0, 243, 255, 0.1);
    padding: 15px;
    border-bottom: 1px solid var(--accent-cyan);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header h3 {
    font-family: var(--font-heading);
    color: var(--accent-cyan);
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.online-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-green);
    border-radius: 50%;
    box-shadow: 0 0 5px var(--accent-green);
}

.close-chat {
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.3s;
}

.close-chat:hover {
    color: var(--accent-red);
}

.chat-body {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    font-family: var(--font-mono);
    font-size: 0.9rem;
}

.message {
    max-width: 80%;
    padding: 10px;
    border-radius: 5px;
    line-height: 1.4;
}

.bot-message {
    align-self: flex-start;
    background: rgba(0, 243, 255, 0.1);
    border: 1px solid rgba(0, 243, 255, 0.3);
    color: var(--text-primary);
    border-top-left-radius: 0;
}

.user-message {
    align-self: flex-end;
    background: rgba(188, 19, 254, 0.2);
    border: 1px solid rgba(188, 19, 254, 0.3);
    color: var(--text-primary);
    border-bottom-right-radius: 0;
}

.chat-input-area {
    padding: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: 10px;
}

.chat-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 10px;
    border-radius: 5px;
    color: var(--text-primary);
    font-family: var(--font-mono);
    outline: none;
}

.chat-input:focus {
    border-color: var(--accent-cyan);
}

.send-btn {
    background: var(--accent-cyan);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 5px;
    cursor: pointer;
    color: #000;
    transition: all 0.3s;
}

.send-btn:hover {
    background: #fff;
    box-shadow: 0 0 10px #fff;
}

/* Mobile */
@media (max-width: 768px) {
    .navbar {
        padding: 20px;
    }

    .nav-links {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

    .glitch {
        font-size: 2.5rem;
    }

    .about-grid,
    .dual-column {
        grid-template-columns: 1fr;
    }

    .timeline::before {
        left: 10px;
    }

    .timeline-item {
        padding-left: 30px;
    }

    .timeline-dot {
        left: 6px;
    }

    .chat-window {
        width: 100%;
        height: 100%;
        bottom: 0;
        right: 0;
        border-radius: 0;
        z-index: 10000;
    }
}