/* =========================================
   1. GLOBAL VARIABLES & RESET
   ========================================= */
:root {
    --bg-color: #0f1115;
    --text-main: #ffffff;
    --text-muted: #8b949e;
    --accent: #58a6ff;
    --watch-accent: #d4af37;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

html, body {
    background-color: var(--bg-color);
    color: var(--text-main);
    overflow-x: hidden;
    height: auto;
    min-height: 100%;
}

html { scroll-behavior: smooth; }

/* =========================================
   2. NAVIGATION & BACKGROUND
   ========================================= */
#bg-canvas {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    z-index: 0; /* Brings the canvas UP from behind the dark background */
    pointer-events: none;
}

.navbar {
    position: fixed;
    top: 0; left: 0;
    width: 100vw;
    background: rgba(15, 17, 21, 0.7);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid #30363d;
    z-index: 100;
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo { font-weight: bold; color: var(--text-main); text-decoration: none; font-size: 1.2rem;}
.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a { text-decoration: none; color: var(--text-muted); transition: color 0.3s; }
.nav-links a:hover { color: var(--accent); }

/* =========================================
   3. MAIN INDEX LAYOUT (Hero, Profile, Contact)
   ========================================= */
.content { 
    max-width: 800px; 
    margin: 0 auto; 
    padding: 8rem 2rem 2rem; 
    position: relative; /* Tells the browser to respect the z-index */
    z-index: 10;        /* Forces all your text and images ON TOP of the canvas */
}

.hero-content { display: flex; align-items: center; gap: 2.5rem; margin-bottom: 3rem; }

/* --- Restored Profile Glow --- */
.profile-pic { 
    width: 140px; 
    height: 140px; 
    border-radius: 50%; 
    object-fit: cover; 
    border: 2px solid #30363d; 
    box-shadow: 0 0 25px rgba(88, 166, 255, 0.25); 
}

.hero-text h1 { font-size: 3.5rem; letter-spacing: -2px; margin-bottom: 0.5rem;}
.subtitle { font-size: 1.2rem; color: var(--text-muted); margin-bottom: 1rem;}

/* --- Restored Server Pill Bubble --- */
.server-status {
    display: flex; 
    align-items: center; 
    gap: 0.5rem; 
    font-size: 0.8rem;
    color: var(--text-muted); 
    font-family: monospace; 
    background: rgba(22, 27, 34, 0.7); 
    padding: 0.5rem 1rem;              
    border-radius: 20px;               
    border: 1px solid #30363d;         
    width: fit-content;
    margin-top: 10px;
}

.pulse-dot { width: 8px; height: 8px; background-color: #238636; border-radius: 50%; animation: pulse 2s infinite; }
@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(35, 134, 54, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(35, 134, 54, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(35, 134, 54, 0); }
}

.contact-links { display: flex; gap: 15px; margin-top: 20px; flex-wrap: wrap;}
.contact-btn {
    padding: 8px 18px; border: 1px solid #333; border-radius: 20px; color: #a0a0a0;
    text-decoration: none; font-size: 0.9rem; background: rgba(255, 255, 255, 0.03); transition: 0.3s ease;
}
.contact-btn:hover { border-color: #00ff41; color: #ffffff; background: rgba(0, 255, 65, 0.05); }

/* =========================================
   4. STEVEN_BOT CHAT INTERFACE
   ========================================= */
.ai-chat-container {
    margin: 2rem 0 3rem; background: rgba(22, 27, 34, 0.4); backdrop-filter: blur(10px);
    border: 1px solid rgba(88, 166, 255, 0.2); border-radius: 12px; overflow: hidden; font-family: monospace;
}

/* --- Restored Hacker Green --- */
.chat-header {
    background: rgba(48, 54, 61, 0.5); 
    padding: 8px 15px; 
    display: flex; 
    justify-content: space-between;
    align-items: center; 
    border-bottom: 1px solid rgba(88, 166, 255, 0.1); 
    color: #23d18b !important; 
    font-weight: bold;
}

.gold-dot { width: 10px; height: 10px; background: var(--watch-accent); border-radius: 50%; }
.chat-window {
    height: 150px; overflow-y: auto; padding: 15px; font-size: 0.85rem; line-height: 1.4;
    display: flex; flex-direction: column; gap: 10px; scrollbar-width: none;
}
.chat-window::-webkit-scrollbar { display: none; }
.bot-msg { color: var(--text-main); align-self: flex-start; max-width: 90%; }
.user-msg { color: var(--accent); align-self: flex-end; text-align: right; max-width: 90%; }
.chat-input-area { display: flex; border-top: 1px solid rgba(88, 166, 255, 0.1); background: rgba(13, 17, 23, 0.6); }
#user-input { flex: 1; background: transparent; border: none; padding: 12px; color: var(--text-main); outline: none; }

/* --- Restored Gold Button --- */
#send-btn { 
    background: #d4af37 !important; 
    border: none; 
    color: #000; 
    font-weight: bold; 
    padding: 0 20px; 
    cursor: pointer; 
    border-radius: 4px; 
}

/* =========================================
   5. TERMINAL SKILLS & PROJECT CARDS
   ========================================= */
.skills-terminal { background: #0d1117; border: 1px solid #30363d; border-radius: 8px; margin-bottom: 4rem; }
.terminal-header { background: #161b22; padding: 0.5rem 1rem; display: flex; align-items: center; border-bottom: 1px solid #30363d; }
.terminal-buttons { display: flex; gap: 6px; margin-right: 15px; }
.btn { width: 12px; height: 12px; border-radius: 50%; }
.btn.close { background: #ff5f56; } .btn.min { background: #ffbd2e; } .btn.max { background: #27c93f; }
.terminal-title { color: var(--text-muted); font-family: monospace; font-size: 0.85rem; }
.terminal-body { padding: 1.5rem; font-family: monospace; font-size: 0.9rem; }

/* --- Restored Terminal Green Prompt --- */
.prompt { color: #23d18b !important; font-weight: bold; }

.json-code { color: #d2a8ff; white-space: pre-wrap; word-wrap: break-word; line-height: 1.5; margin-top: 1rem;}
.json-key { color: #79c0ff; }

.projects h2 { font-size: 1.8rem; margin-bottom: 2rem; border-bottom: 1px solid #30363d; padding-bottom: 0.5rem; }
.card-link { text-decoration: none; display: block; color: inherit; }
.project-card {
    background: rgba(22, 27, 34, 0.7); border: 1px solid #30363d; border-radius: 12px;
    padding: 1.5rem; margin-bottom: 1.5rem; transition: transform 0.3s, border-color 0.3s;
}
.project-card:hover { transform: translateY(-5px); border-color: var(--accent); }
.project-card h3 { color: var(--accent); margin-bottom: 0.5rem; }
.tech-stack { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 1rem; }
.tech-stack span { background: #21262d; padding: 0.3rem 0.7rem; border-radius: 15px; font-size: 0.75rem; color: var(--text-muted); }

.watch-card { background: rgba(25, 22, 15, 0.6); }
.watch-card:hover { border-color: var(--watch-accent); }
.watch-card h3 { color: var(--watch-accent); }
.watch-stack span { background: #2a2415; color: #bfa054; }

/* =========================================
   6. INDEPENDENT SCROLL SPLIT-PANE (Project Detail Pages)
   ========================================= */
body.detail-page { height: 100vh; overflow: hidden; }

.split-container {
    display: grid;
    grid-template-columns: 45% 55%; 
    height: calc(100vh - 60px); 
    margin-top: 60px;
    overflow: hidden;
}

.left-content, .right-collage {
    height: 100%;
    overflow-y: auto;
    padding: 3rem;
    scrollbar-width: none; 
}
.left-content::-webkit-scrollbar, .right-collage::-webkit-scrollbar { display: none; }

.left-content { background: rgba(15, 17, 21, 0.5); border-right: 1px solid #30363d; }
.category-tag { color: var(--accent); text-transform: uppercase; font-size: 0.75rem; font-weight: 800; letter-spacing: 1.5px; }
.detail-header h1 { font-size: 3rem; margin-top: 0.5rem; }
.project-subtitle { color: var(--text-muted); font-size: 1.1rem; margin-bottom: 2rem; }
.description h3 { margin: 2rem 0 1rem 0; color: var(--text-main); font-size: 1.2rem; }
.description p, .description li { color: var(--text-muted); line-height: 1.7; margin-bottom: 1rem; }
.description ul { padding-left: 1.2rem; }

.download-btn {
    display: inline-block; margin-top: 2rem; padding: 1rem 2rem; background: transparent;
    border: 1px solid var(--accent); color: var(--accent); text-decoration: none;
    border-radius: 6px; font-weight: bold; transition: 0.3s;
}
.download-btn:hover { background: var(--accent); color: #000; }

.embedded-diagram { margin-top: 40px; padding-top: 30px; border-top: 1px solid #333; width: 100%; }
.diagram-wrapper { background: rgba(255, 255, 255, 0.02); border-radius: 12px; padding: 10px; border: 1px solid #444; margin: 20px 0; }
.diagram-wrapper img { width: 100%; height: auto; display: block; border-radius: 8px; }

/* Right side Image Collage */
.right-collage { display: flex; flex-direction: column; gap: 20px; background: #0a0c10; }
.right-collage img { width: 100%; height: auto; max-height: 400px; object-fit: cover; border-radius: 12px; border: 1px solid #30363d; }

.spacer { height: 100px; }

/* =========================================
   7. MOBILE RESPONSIVENESS
   ========================================= */
@media (max-width: 1000px) {
    /* Restore natural scrolling for mobile */
    body.detail-page { height: auto; overflow: visible; }
    .split-container { display: block; height: auto; margin-top: 60px;}
    .left-content, .right-collage { height: auto; overflow: visible; padding: 2rem; border-right: none;}
    .right-collage img { max-height: 300px; }
    
    /* Index Page tweaks */
    .hero-content { flex-direction: column; align-items: flex-start; gap: 1.5rem; }
    .hero-text h1 { font-size: 2.5rem; }
    .detail-header h1 { font-size: 2.5rem; }
    .nav-links { display: none; } 
}