/* ==========================================================================
   FUTURISTIC AI PORTFOLIO DESIGN SYSTEM 2026 (LEVEL 2)
   ========================================================================== */

/* THEME ENGINE */
:root {
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-blur: blur(16px);
    
    --font-heading: 'Orbitron', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-code: 'JetBrains Mono', monospace;
}

/* Theme: Cyberpunk */
.theme-cyberpunk {
    --primary: #00F5FF;
    --secondary: #8B5CF6;
    --accent: #00FF9D;
    --background: #050816;
    --neon-pink: #FF00EA;
    --text-main: #E0E8F5;
    --text-muted: #8892B0;
}

/* Theme: Matrix */
.theme-matrix {
    --primary: #00FF41;
    --secondary: #008F11;
    --accent: #00FF41;
    --background: #0D0208;
    --neon-pink: #00FF41;
    --text-main: #00FF41;
    --text-muted: #008F11;
}

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

body {
    background-color: var(--background);
    color: var(--text-main);
    font-family: var(--font-body);
    overflow-x: hidden;
    line-height: 1.6;
    transition: background-color 0.5s;
}

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--background); }
::-webkit-scrollbar-thumb { background: var(--secondary); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* THREE.JS CONTAINER */
#canvas-container {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: -1; pointer-events: none;
}

/* BOOT SEQUENCE */
.boot-screen {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: #000;
    display: flex; justify-content: center; align-items: center; z-index: 9999; flex-direction: column; transition: opacity 1s ease-out;
}
.glitch-text {
    font-family: var(--font-heading); font-size: 3rem; color: var(--primary); animation: glitch 1s infinite alternate;
}
.loading-text { margin-top: 20px; color: var(--neon-pink); font-family: var(--font-code); animation: pulse 1.5s infinite; }
.progress-bar { width: 300px; height: 4px; background: rgba(255,255,255,0.1); margin-top: 20px; border-radius: 2px; overflow: hidden; }
.progress-fill {
    height: 100%; width: 0%; background: linear-gradient(90deg, var(--primary), var(--secondary));
    box-shadow: 0 0 10px var(--primary); animation: load 2.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes load { 0% { width: 0%; } 50% { width: 70%; } 100% { width: 100%; } }
@keyframes glitch { 0% { text-shadow: 2px 0 0 red, -2px 0 0 blue; } 100% { text-shadow: -2px 0 0 red, 2px 0 0 blue; } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

/* APP LAYOUT */
.app-container { display: flex; height: 100vh; width: 100vw; padding: 20px; gap: 20px; transition: opacity 1.5s ease-in; }

/* Sidebar */
.sidebar { width: 250px; height: calc(100vh - 40px); display: flex; flex-direction: column; padding: 30px 20px; position: sticky; top: 20px; }
.brand { text-align: center; margin-bottom: 50px; }
.logo-glow {
    font-family: var(--font-heading); font-size: 2.5rem; font-weight: 900; color: transparent;
    -webkit-text-stroke: 1px var(--primary); transition: all 0.3s ease;
}
.logo-glow:hover { color: var(--primary); text-shadow: 0 0 20px var(--primary); }
.nav-links { list-style: none; display: flex; flex-direction: column; gap: 15px; }
.nav-links li a {
    text-decoration: none; color: var(--text-muted); font-family: var(--font-heading); font-size: 1.1rem;
    padding: 12px 20px; border-radius: 8px; display: flex; align-items: center; gap: 15px; transition: all 0.3s ease; border: 1px solid transparent;
}
.nav-links li:hover a, .nav-links li.active a {
    color: #fff; background: color-mix(in srgb, var(--primary) 10%, transparent); border: 1px solid var(--primary); box-shadow: inset 0 0 10px color-mix(in srgb, var(--primary) 20%, transparent);
}
.icon { font-size: 1.2rem; color: var(--primary); }

/* Main Content Area */
.content-area { flex: 1; display: flex; flex-direction: column; gap: 20px; overflow: hidden; }
.topbar { height: 60px; display: flex; justify-content: space-between; align-items: center; padding: 0 30px; font-family: var(--font-code); font-size: 0.9rem; }
.status-indicator { display: flex; align-items: center; gap: 10px; color: var(--primary); }
.pulse-dot { width: 8px; height: 8px; background: var(--primary); border-radius: 50%; box-shadow: 0 0 10px var(--primary); animation: pulse 2s infinite; }
.top-controls { display: flex; align-items: center; gap: 15px; }
.scroll-container { flex: 1; overflow-y: auto; padding-right: 10px; scroll-behavior: smooth; }

/* GLASSMORPHISM & 3D SYSTEM */
.glass-card {
    background: var(--glass-bg); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border); border-radius: 16px; box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5); position: relative; overflow: hidden;
}
.glass-card::before {
    content: ''; position: absolute; top: 0; left: -100%; width: 50%; height: 100%;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.05), transparent); transform: skewX(-20deg); transition: 0.5s;
}
.glass-card:hover::before { left: 150%; }
.tilt-card-3d { transform-style: preserve-3d; transform: perspective(1000px); transition: transform 0.1s; }

/* SECTIONS */
.section { min-height: calc(100vh - 100px); padding: 40px 0; display: flex; flex-direction: column; justify-content: center; position: relative;}
.section-title { font-family: var(--font-heading); font-size: 2.5rem; margin-bottom: 40px; text-transform: uppercase; letter-spacing: 2px; }
.highlight { color: transparent; -webkit-text-stroke: 1px var(--primary); text-shadow: 0 0 10px rgba(0, 245, 255, 0.3); }

/* Hero Section */
.hero-section { display: flex; flex-direction: row; align-items: center; justify-content: space-between; }
.hero-content { flex: 1; z-index: 2; }
.subtitle { color: var(--accent); font-family: var(--font-code); font-size: 1.1rem; margin-bottom: 15px; letter-spacing: 1px; }
.title {
    font-size: 4.5rem; font-family: var(--font-heading); font-weight: 900; line-height: 1.1; margin-bottom: 20px;
    background: linear-gradient(45deg, #fff, var(--primary)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; filter: drop-shadow(0 0 20px rgba(0,245,255,0.3)); text-transform: uppercase; letter-spacing: 2px;
}
.description { font-size: 1.2rem; color: var(--text-muted); max-width: 600px; margin-bottom: 40px; }

/* Buttons */
.btn {
    padding: 15px 30px; border-radius: 8px; font-family: var(--font-heading); font-weight: bold; cursor: pointer;
    text-transform: uppercase; letter-spacing: 1px; transition: all 0.3s ease; border: none; position: relative; overflow: hidden;
}
.btn-primary { background: transparent; color: var(--primary); border: 1px solid var(--primary); box-shadow: inset 0 0 15px rgba(0, 245, 255, 0.2), 0 0 15px rgba(0, 245, 255, 0.2); }
.btn-primary:hover { background: var(--primary); color: #000; box-shadow: 0 0 30px var(--primary); }
.btn-secondary { background: transparent; color: var(--text-muted); border: 1px solid var(--glass-border); margin-left: 20px; }
.btn-secondary:hover { border-color: #fff; color: #fff; background: rgba(255,255,255,0.05); }

/* Hero Visual */
.hero-visual { width: 400px; height: 400px; position: relative; display: flex; justify-content: center; align-items: center; }
.hologram-ring { width: 300px; height: 300px; border: 2px dashed var(--primary); border-radius: 50%; position: absolute; animation: rotate 20s linear infinite; box-shadow: 0 0 30px rgba(0,245,255,0.2), inset 0 0 30px rgba(0,245,255,0.2); }
.hologram-core { width: 150px; height: 150px; background: radial-gradient(circle, var(--secondary) 0%, transparent 70%); border-radius: 50%; animation: pulseCore 3s ease-in-out infinite alternate; }

@keyframes rotate { 0% { transform: rotate(0deg) scale(1) rotateX(60deg); } 50% { transform: rotate(180deg) scale(1.1) rotateX(60deg); } 100% { transform: rotate(360deg) scale(1) rotateX(60deg); } }
@keyframes pulseCore { 0% { transform: scale(0.8); opacity: 0.5; box-shadow: 0 0 20px var(--secondary); } 100% { transform: scale(1.2); opacity: 1; box-shadow: 0 0 60px var(--secondary); } }

/* Grids */
.about-grid, .project-grid, .skills-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.about-card, .project-card, .skill-card { padding: 30px; }
.about-card h3, .skill-card h3 { color: var(--primary); font-family: var(--font-heading); margin-bottom: 15px; }

.tech-list { list-style: none; }
.tech-list li { margin-bottom: 10px; padding-left: 20px; position: relative; font-family: var(--font-code); }
.tech-list li::before { content: '>'; color: var(--neon-pink); position: absolute; left: 0; font-family: var(--font-code); }

/* Projects */
.project-card { padding: 0; display: flex; flex-direction: column; }
.project-image { height: 200px; width: 100%; border-bottom: 1px solid var(--glass-border); }
.project-info { padding: 25px; flex: 1; display: flex; flex-direction: column; }
.project-info h3 { font-family: var(--font-heading); margin-bottom: 10px; color: var(--text-main);}
.project-info p { color: var(--text-muted); margin-bottom: 20px; flex: 1; }
.btn-outline { background: transparent; border: 1px solid var(--primary); color: var(--primary); padding: 5px 15px; font-size: 0.9rem; align-self: flex-start; text-decoration: none; cursor: pointer; transition: 0.3s;}
.btn-outline:hover { background: var(--primary); color: var(--background); box-shadow: 0 0 15px var(--primary); }

/* Skills Section */
.skill-bar-container { margin-bottom: 20px; }
.skill-name { font-family: var(--font-code); font-size: 0.9rem; margin-bottom: 5px; display: block; color: var(--text-main); }
.skill-bar { width: 100%; height: 6px; background: rgba(255,255,255,0.1); border-radius: 3px; overflow: hidden; }
.skill-fill { height: 100%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }

/* Timeline Section */
.timeline { position: relative; max-width: 800px; margin: 0 auto; padding: 40px 0; }
.timeline::after { content: ''; position: absolute; width: 2px; background: var(--secondary); top: 0; bottom: 0; left: 50%; margin-left: -1px; box-shadow: 0 0 15px var(--secondary); }
.timeline-item { padding: 20px 40px; position: relative; background: inherit; width: 50%; }
.timeline-item::after { content: ''; position: absolute; width: 16px; height: 16px; right: -8px; background: var(--background); border: 2px solid var(--primary); top: 25px; border-radius: 50%; z-index: 1; box-shadow: 0 0 10px var(--primary); }
.left { left: 0; }
.right { left: 50%; }
.right::after { left: -8px; }
.timeline-content { padding: 20px; border-radius: 16px; }
.timeline-content h3 { color: var(--primary); font-family: var(--font-heading); }
.timeline-content span { color: var(--accent); font-family: var(--font-code); font-size: 0.8rem; display: block; margin-bottom: 10px; }

/* Contact Section */
.contact-container { max-width: 600px; margin: 0 auto; width: 100%; }
.contact-form { display: flex; flex-direction: column; gap: 20px; }
.form-group { display: flex; flex-direction: column; gap: 8px; }
.form-group label { font-family: var(--font-code); color: var(--primary); font-size: 0.9rem; }
.form-group input, .form-group textarea {
    background: rgba(0,0,0,0.3); border: 1px solid var(--glass-border); padding: 15px; color: var(--text-main);
    border-radius: 8px; font-family: var(--font-body); outline: none; transition: border-color 0.3s;
}
.form-group input:focus, .form-group textarea:focus { border-color: var(--primary); box-shadow: 0 0 10px rgba(0,245,255,0.2); }
.form-group textarea { resize: vertical; min-height: 120px; }

/* AI Assistant Floating Button & Chat */
.ai-assistant-btn {
    position: fixed; bottom: 30px; right: 30px; width: 60px; height: 60px; border-radius: 50%;
    background: var(--background); border: 2px solid var(--accent); display: flex; justify-content: center; align-items: center;
    cursor: pointer; z-index: 1000; box-shadow: 0 0 20px rgba(0, 255, 157, 0.4); animation: float 3s ease-in-out infinite;
    font-size: 2rem; color: var(--accent);
}
.ai-assistant-btn svg { fill: var(--accent); width: 30px; height: 30px; }

.ai-chat-window {
    position: fixed; bottom: 100px; right: 30px; width: 350px; height: 450px; z-index: 999;
    display: none; flex-direction: column; transform-origin: bottom right; background: var(--background);
}
.ai-chat-header { padding: 15px; border-bottom: 1px solid var(--glass-border); font-family: var(--font-heading); color: var(--accent); display: flex; justify-content: space-between; align-items: center;}
.ai-chat-body { flex: 1; padding: 15px; overflow-y: auto; display: flex; flex-direction: column; gap: 15px; font-family: var(--font-code); font-size: 0.85rem;}
.ai-msg { padding: 10px 15px; border-radius: 12px; max-width: 85%; }
.ai-msg.bot { background: rgba(0, 255, 157, 0.1); border: 1px solid rgba(0, 255, 157, 0.3); align-self: flex-start; color: var(--text-main); }
.ai-msg.user { background: rgba(0, 245, 255, 0.1); border: 1px solid rgba(0, 245, 255, 0.3); align-self: flex-end; color: #fff; }
.ai-chat-input { display: flex; padding: 10px; border-top: 1px solid var(--glass-border); }
.ai-chat-input input { flex: 1; background: transparent; border: none; color: var(--text-main); font-family: var(--font-body); padding: 5px 10px; outline: none; }
.ai-chat-input button { background: transparent; border: none; color: var(--accent); cursor: pointer; font-family: var(--font-code); padding: 0 10px; }

/* Terminal Overlay */
.terminal-overlay {
    position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 600px; height: 400px; background: rgba(0, 0, 0, 0.8); z-index: 2000;
    display: none; flex-direction: column; border: 1px solid var(--primary);
    box-shadow: 0 0 30px rgba(0,245,255,0.2); font-family: var(--font-code);
}
.terminal-header {
    background: color-mix(in srgb, var(--primary) 10%, transparent); border-bottom: 1px solid var(--primary);
    padding: 10px; display: flex; justify-content: space-between; color: var(--primary);
}
.terminal-header button { background: none; border: none; color: var(--primary); cursor: pointer; }
.terminal-body {
    flex: 1; padding: 15px; overflow-y: auto; color: var(--text-main);
    display: flex; flex-direction: column; gap: 5px;
}
.terminal-input-line {
    display: flex; padding: 15px; border-top: 1px solid var(--glass-border); color: var(--primary);
}
.terminal-input-line input {
    flex: 1; background: transparent; border: none; color: var(--text-main); font-family: var(--font-code);
    outline: none; margin-left: 10px;
}

/* Project Modal */
.project-modal {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0, 0, 0, 0.8); z-index: 2000; display: none;
    justify-content: center; align-items: center; backdrop-filter: blur(10px);
}
.modal-content {
    width: 90%; max-width: 800px; padding: 40px; border: 1px solid var(--primary);
}

@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* Footer */
footer { text-align: center; padding: 30px; border-top: 1px solid var(--glass-border); margin-top: 50px; font-family: var(--font-code); color: var(--text-muted); font-size: 0.9rem; }

/* Mobile Menu Button */
#mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--primary);
    font-size: 2rem;
    cursor: pointer;
}

/* Responsive */
@media (max-width: 1024px) {
    .title { font-size: 3.5rem; }
    .hero-section { flex-direction: column; text-align: center; }
    .btn-secondary { margin-left: 0; margin-top: 15px; }
    .action-buttons { display: flex; flex-direction: column; align-items: center; }
    .hero-visual { margin-top: 50px; }
    .timeline::after { left: 31px; }
    .timeline-item { width: 100%; padding-left: 70px; padding-right: 25px; }
    .timeline-item::after { left: 23px; }
    .right { left: 0; }
    .terminal-overlay { width: 90%; }
}

@media (max-width: 768px) {
    #mobile-menu-btn { display: block; }
    
    .app-container { flex-direction: column; padding: 10px; }
    .sidebar { width: 100%; height: auto; position: relative; top: 0; padding: 15px; flex-direction: column; align-items: flex-start; z-index: 100;}
    .brand { margin-bottom: 0; display: flex; width: 100%; justify-content: space-between; align-items: center; }
    .logo-glow { font-size: 1.5rem; }
    
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 70px;
        left: 10px;
        right: 10px;
        background: rgba(0,0,0,0.9);
        padding: 20px;
        border-radius: 10px;
        z-index: 1000;
        backdrop-filter: blur(10px);
        border: 1px solid var(--primary);
        box-shadow: 0 10px 30px rgba(0,0,0,0.8);
    }
    .nav-links.active { display: flex; }
    .nav-links li a span { display: inline-block; }
    
    .title { font-size: 2.5rem; }
    .hero-visual { width: 300px; height: 300px; }
    .hologram-ring { width: 250px; height: 250px; }
    .hologram-core { width: 100px; height: 100px; }
    .top-controls { flex-direction: column; gap: 5px; align-items: flex-end; }
}
