:root {
    --bg-color: #050505; /* True Black */
    --card-bg: #111111;
    --slate: #8892b0;
    --light-slate: #ccd6f6;
    --white: #ffffff;
    --gold: #D4AF37; /* Metallic Gold */
    --gold-dim: rgba(212, 175, 55, 0.1);
    --gold-glow: rgba(212, 175, 55, 0.4);
    --font-main: 'Inter', sans-serif;
    --font-mono: 'Fira Code', monospace;
    --font-head: 'Playfair Display', serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px; /* Adjust for fixed navbar */
}

body {
    background-color: var(--bg-color);
    color: var(--slate);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Canvas Background */
#canvas1 {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.25;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

/* Navigation */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 50px;
    position: fixed;
    width: 100%;
    background-color: rgba(5, 5, 5, 0.85);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    z-index: 100;
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
}

/* Preloader */
#preloader {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: var(--bg-color);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease-out;
}

.loader-text {
    color: var(--gold);
    font-family: var(--font-mono);
    font-size: 14px;
    margin-bottom: 10px;
    letter-spacing: 2px;
}

nav ul li a.active {
    color: var(--gold);
}

.loader-bar {
    width: 200px;
    height: 2px;
    background: #112240;
    position: relative;
    overflow: hidden;
}
/* --- NEW ADDITIONS --- */

/* 1. Infinite Tech Stack Marquee */
.tech-marquee {
    background-color: var(--card-bg);
    padding: 20px 0;
    overflow: hidden;
    border-top: 1px solid #233554;
    border-bottom: 1px solid #233554;
    white-space: nowrap;
    position: relative;
}

.tech-track {
    display: inline-block;
    animation: scroll 20s linear infinite;
}

.tech-track span {
    font-family: var(--font-mono);
    color: var(--light-slate);
    font-size: 16px;
    margin: 0 20px;
    font-weight: 600;
}

.tech-track .separator {
    color: var(--gold);
}

@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* 2. Publications Section */
.pub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.pub-card {
    background: var(--card-bg);
    border: 1px solid #233554;
    padding: 25px;
    border-radius: 8px;
    display: flex;
    gap: 20px;
    transition: 0.3s;
}

.pub-card:hover {
    border-color: var(--gold);
    transform: translateY(-5px);
}

.pub-icon {
    font-size: 30px;
    color: var(--gold);
    margin-top: 5px;
}

.pub-content h4 {
    color: var(--white);
    font-size: 18px;
    margin-bottom: 5px;
}

.pub-meta {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--gold);
    margin-bottom: 10px;
}

.pub-content p {
    font-size: 14px;
    color: var(--slate);
    margin-bottom: 15px;
}

.pub-link {
    font-size: 13px;
    color: var(--white);
    font-weight: 600;
}

.pub-link:hover {
    color: var(--gold);
    text-decoration: underline;
}

/* 3. AI Chatbot Widget */
.chat-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
}

#chat-toggle {
    width: 60px;
    height: 60px;
    background-color: var(--gold);
    border: none;
    border-radius: 50%;
    color: var(--bg-color);
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
    transition: transform 0.3s;
}

#chat-toggle:hover {
    transform: scale(1.1);
}

.chat-window {
    display: none;
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    height: 450px;
    background-color: #0a192f;
    border: 1px solid var(--gold);
    border-radius: 10px;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.chat-header {
    background-color: var(--gold);
    color: var(--bg-color);
    padding: 15px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-chat { cursor: pointer; font-size: 20px; }

.chat-body {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    font-size: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bot-msg, .user-msg {
    padding: 10px;
    border-radius: 8px;
    max-width: 80%;
}

.bot-msg {
    background-color: #112240;
    color: var(--light-slate);
    border-left: 2px solid var(--gold);
    align-self: flex-start;
}

.user-msg {
    background-color: var(--gold-dim);
    color: var(--white);
    align-self: flex-end;
    border: 1px solid var(--gold);
}

.chat-input-area {
    padding: 15px;
    border-top: 1px solid #233554;
    display: flex;
    gap: 10px;
}

/* Chat Typing Animation */
.typing-indicator span {
    animation: blink 1.4s infinite both;
    margin: 0 1px;
}

.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes blink {
    0% { opacity: 0.2; }
    20% { opacity: 1; }
    100% { opacity: 0.2; }
}

.chat-input-area input {
    flex: 1;
    background: transparent;
    border: 1px solid #233554;
    padding: 8px;
    color: var(--white);
    border-radius: 4px;
    outline: none;
}

.chat-input-area button {
    background: transparent;
    border: none;
    color: var(--gold);
    cursor: pointer;
    font-size: 18px;
}
.bar-fill {
    width: 0%;
    height: 100%;
    background: var(--gold);
    animation: load 1.5s ease-in-out forwards;
}

@keyframes load {
    0% { width: 0%; }
    100% { width: 100%; }
}
.logo {
    color: var(--gold);
    font-weight: 700;
    font-size: 1.8rem;
    font-family: var(--font-head);
    letter-spacing: 2px;
}

.logo .accent {
    color: var(--white);
}

.nav-links {
    display: flex;
    gap: 35px;
    list-style: none;
    align-items: center;
}

.nav-links a {
    color: var(--light-slate);
    font-size: 13px;
    font-family: var(--font-mono);
}

.nav-links a:hover {
    color: var(--gold);
}

.nav-num {
    color: var(--gold);
}

/* Resume Button */
.resume-btn {
    color: var(--gold) !important;
    border: 1px solid var(--gold);
    border-radius: 4px;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
}

.resume-btn:hover {
    background-color: var(--gold-dim);
}

/* Scroll Animations */
.hidden {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.645, 0.045, 0.355, 1);
}

.show {
    opacity: 1;
    transform: translateY(0);
}

/* Sections */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 100px 20px;
}

.section-header {
    display: flex;
    align-items: center;
    margin-bottom: 40px;
    width: 100%;
}

.section-title {
    font-size: 32px;
    color: var(--white);
    font-weight: 700;
    display: flex;
    align-items: center;
}

.section-title span {
    color: var(--gold);
    margin-right: 10px;
    font-family: var(--font-mono);
    font-size: 24px;
}

.line {
    height: 1px;
    background-color: #232323;
    flex-grow: 1;
    margin-left: 20px;
    max-width: 300px;
}

/* Hero */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    padding-top: 50px;
}

.hero-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1100px;
    width: 100%;
}

.hero-text {
    flex: 1.5;
}

.mono-text {
    color: var(--gold);
    font-family: var(--font-mono);
    margin-bottom: 20px;
    font-size: 16px;
}

.hero-text h1 {
    font-size: 70px;
    color: var(--white);
    line-height: 1.1;
    font-weight: 700;
    margin-bottom: 10px;
}

.hero-text h2 {
    font-size: 50px;
    color: var(--slate);
    line-height: 1.1;
    margin-bottom: 30px;
    font-weight: 600;
}

.hero-text p {
    max-width: 500px;
    margin-bottom: 50px;
    font-size: 18px;
}

/* Hero Image */
.hero-img {
    flex: 1;
    display: flex;
    justify-content: center;
    position: relative;
}

.img-wrapper {
    position: relative;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    overflow: hidden;
}

.img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%) contrast(1.2);
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

.img-wrapper:hover img {
    filter: none;
}

.img-wrapper::after {
    content: '';
    position: absolute;
    top: -5px; left: -5px; right: -5px; bottom: -5px;
    border-radius: 50%;
    border: 2px solid var(--gold);
    z-index: 1;
    transition: all 0.3s ease;
}

.img-wrapper:hover::after {
    top: -10px; left: -10px; right: -10px; bottom: -10px;
    border-color: var(--gold);
    box-shadow: 0 0 20px var(--gold-glow);
}

/* Buttons */
.btn {
    color: var(--gold);
    background-color: transparent;
    border: 1px solid var(--gold);
    border-radius: 4px;
    padding: 1rem 1.5rem;
    font-size: 14px;
    font-family: var(--font-mono);
    cursor: pointer;
    margin-right: 20px;
}

.btn:hover {
    background-color: var(--gold-dim);
    box-shadow: 0 0 15px var(--gold-glow);
}

.social-link {
    font-size: 24px;
    margin-right: 20px;
    color: var(--slate);
}

.social-link:hover {
    color: var(--gold);
    transform: translateY(-3px);
}

.txt-type {
    color: var(--white);
    border-right: 2px solid var(--gold);
}

/* Timeline */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 40px auto 0;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 2px;
    background-color: #233554;
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -1px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    background-color: inherit;
    width: 50%;
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    right: -8px;
    background-color: var(--bg-color);
    border: 2px solid var(--gold);
    top: 15px;
    border-radius: 50%;
    z-index: 1;
}

.left { left: 0; }
.right { left: 50%; }
.right::after { left: -8px; }

.timeline-content {
    padding: 20px;
    background-color: var(--card-bg);
    border-radius: 6px;
    border: 1px solid #233554;
    transition: 0.3s;
}

.timeline-content:hover {
    border-color: var(--gold);
    transform: translateY(-3px);
}

.timeline-date {
    color: var(--gold);
    font-family: var(--font-mono);
    font-size: 12px;
    margin-bottom: 10px;
    display: block;
}

/* Skills Grid */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.skill-category {
    background-color: var(--card-bg);
    padding: 25px;
    border-radius: 5px;
    border: 1px solid #222;
    transition: 0.3s;
}

.skill-category:hover {
    border-color: var(--gold);
    transform: translateY(-5px);
}

.skill-category h4 {
    color: var(--white);
    margin-bottom: 20px;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.skill-category h4 i {
    color: var(--gold);
}

.skill-category ul {
    list-style: none;
}

.skill-category li {
    font-family: var(--font-mono);
    font-size: 13px;
    margin-bottom: 10px;
    color: var(--slate);
}

.skill-category li::before {
    content: "▹";
    color: var(--gold);
    margin-right: 10px;
}

/* --- SPOTLIGHT CARD EFFECT --- */
.project-card, .small-card {
    background-color: rgba(17, 34, 64, 0.4); 
    border: 1px solid rgba(212, 175, 55, 0.1); 
    border-radius: 12px;
    position: relative;
    overflow: hidden; 
    transition: transform 0.3s ease, border-color 0.3s ease;
    
    --mouse-x: 0px;
    --mouse-y: 0px;
    --spotlight-color: rgba(212, 175, 55, 0.15);
}

.project-card::before, .small-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 12px;
    z-index: 1; 
    opacity: 0;
    transition: opacity 0.5s ease;
    
    background: radial-gradient(
        600px circle at var(--mouse-x) var(--mouse-y),
        var(--spotlight-color),
        transparent 40%
    );
    pointer-events: none;
}

.project-card:hover::before, .small-card:hover::before {
    opacity: 1;
}

.project-card:hover, .small-card:hover {
    transform: translateY(-5px); 
    border-color: rgba(212, 175, 55, 0.5); 
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

.project-content, .card-header, h3, p, ul, .project-links {
    position: relative;
    z-index: 2;
}

.project-card {
    padding: 2.5rem;
    margin-bottom: 30px;
}

.small-card {
    padding: 2rem;
    height: 100%;
}

.project-overline {
    color: var(--gold);
    font-family: var(--font-mono);
    font-size: 13px;
    margin-bottom: 10px;
}

.project-title {
    color: var(--white);
    font-size: 28px;
    margin-bottom: 20px;
    font-weight: 700;
}

.project-desc {
    background-color: #0a0a0a;
    padding: 20px;
    border-radius: 4px;
    color: var(--light-slate);
    margin-bottom: 20px;
    border-left: 3px solid var(--gold);
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    font-family: var(--font-mono);
    font-size: 13px;
    margin-bottom: 20px;
    color: var(--slate);
    list-style: none;
}

.project-links a {
    color: var(--white);
    font-size: 20px;
    margin-right: 15px;
}

.project-links a:hover {
    color: var(--gold);
}

/* Other Projects Grid */
.center-header {
    text-align: center;
    color: var(--white);
    font-size: 28px;
    margin: 80px 0 50px;
}

.other-projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.card-header .fa-folder {
    color: var(--gold);
    font-size: 40px;
}

.small-card h3 {
    color: var(--white);
    font-size: 20px;
    margin-bottom: 10px;
}

.card-tech {
    display: flex;
    gap: 15px;
    font-family: var(--font-mono);
    font-size: 12px;
    margin-top: 20px;
    color: var(--slate);
    list-style: none;
}

/* Contact */
.center-text {
    text-align: center;
    margin-bottom: 100px;
}

.small-center {
    justify-content: center;
}

.big-title {
    font-size: 50px;
    color: var(--white);
    margin-bottom: 20px;
    font-weight: 700;
}

.big-btn {
    margin-top: 30px;
    padding: 1.25rem 2rem;
}

/* Footer & Game Trigger */
footer {
    text-align: center;
    padding: 30px;
    background-color: #020202;
}

.social-footer a {
    margin: 0 10px;
    font-size: 20px;
    color: var(--slate);
}

.social-footer a:hover {
    color: var(--gold);
}

.game-trigger {
    cursor: pointer;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--slate);
    margin-top: 15px;
    text-decoration: underline;
    transition: 0.3s;
    display: inline-block;
}
.game-trigger:hover { color: var(--gold); }

/* Game Modal */
.modal {
    display: none; 
    position: fixed; 
    z-index: 1000; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    background-color: rgba(0,0,0,0.9); 
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    margin: 5% auto;
    padding: 20px;
    width: 360px;
    text-align: center;
    background: var(--card-bg);
    border: 1px solid var(--gold);
    border-radius: 10px;
}

.close-game {
    color: var(--white);
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-game:hover { color: var(--gold); }

#gameCanvas {
    background-color: #000;
    border: 1px solid #333;
    display: block;
    margin: 20px auto;
}

.score-board {
    font-family: var(--font-mono);
    color: var(--gold);
    font-size: 18px;
    margin-bottom: 10px;
}

/* Responsive */
@media (max-width: 900px) {
    .hero-container {
        flex-direction: column-reverse;
        text-align: center;
    }
    .hero-img { margin-bottom: 40px; }
    .hero-btns { justify-content: center; display: flex; }
    .img-wrapper { width: 200px; height: 200px; }
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .hero-text h1 { font-size: 40px; }
    .hero-text h2 { font-size: 28px; }
    .timeline::after { left: 31px; }
    .timeline-item { width: 100%; padding-left: 70px; padding-right: 25px; }
    .timeline-item::after { left: 22px; }
    .right { left: 0%; }
}
