:root {
    --bg-main: #050505;
    --bg-sec: #0f1115;
    --text-main: #f8fafc;
    --text-muted: #64748b;
    --neon-cyan: #00f3ff;
    --neon-purple: #bc13fe;
    --neon-red: #ff003c;
    --glass-bg: rgba(15, 17, 21, 0.6);
    --glass-border: rgba(0, 243, 255, 0.2);
    --font-heading: 'Orbitron', sans-serif;
    --font-term: 'Fira Code', monospace;
    --font-body: 'Inter', sans-serif;
}

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

html {
    scroll-behavior: smooth;
    font-family: var(--font-body);
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
}

body {
    overflow-x: hidden;
    position: relative;
}

a { text-decoration: none; color: inherit; }
.container { max-width: 1000px; margin: 0 auto; padding: 0 2rem; }
.text-center { text-align: center; }
.mt-2 { margin-top: 2rem; }
.mb-2 { margin-bottom: 2rem; }

/* Global Background Effects */
.scanlines {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    background-size: 100% 4px, 3px 100%;
    z-index: 9999;
    pointer-events: none;
    opacity: 0.6;
}

.bg-grid {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background-image: 
        linear-gradient(rgba(0, 243, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 243, 255, 0.05) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: -2;
    transform: perspective(500px) rotateX(60deg) scale(2);
    transform-origin: top;
    animation: grid-move 10s linear infinite;
    opacity: 0.3;
}

@keyframes grid-move {
    0% { background-position: 0 0; }
    100% { background-position: 0 40px; }
}

#particles-js {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: -1;
    pointer-events: none;
}

/* Typography */
h1, h2, h3, .logo { font-family: var(--font-heading); text-transform: uppercase; letter-spacing: 2px; }

.section-title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
    color: var(--neon-cyan);
    text-shadow: 0 0 10px rgba(0, 243, 255, 0.5);
}

.terminal-text, .prompt, #typing-text, .cursor {
    font-family: var(--font-term);
}

/* Navbar */
.navbar {
    position: fixed; top: 0; width: 100%; z-index: 1000;
    background: rgba(5, 5, 5, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: 0 4px 30px rgba(0, 243, 255, 0.1);
}

.nav-content {
    max-width: 1000px; margin: 0 auto; padding: 1.2rem 2rem;
    display: flex; justify-content: space-between; align-items: center;
}

.logo { font-size: 1.5rem; font-weight: 800; display: flex; align-items: center; gap: 0.8rem; }
.logo-img { height: 35px; width: 35px; object-fit: cover; border-radius: 50%; box-shadow: 0 0 10px var(--neon-cyan); }
.glow-text { color: var(--text-main); text-shadow: 0 0 8px var(--neon-cyan); }

.nav-links { display: flex; list-style: none; gap: 2rem; }
.cyber-link {
    font-family: var(--font-term);
    font-size: 0.9rem;
    color: var(--text-muted);
    position: relative;
    transition: color 0.3s ease;
}
.cyber-link:hover { color: var(--neon-cyan); text-shadow: 0 0 8px var(--neon-cyan); }
.cyber-link::before {
    content: '['; position: absolute; left: -10px; opacity: 0; transition: opacity 0.3s; color: var(--neon-purple);
}
.cyber-link::after {
    content: ']'; position: absolute; right: -10px; opacity: 0; transition: opacity 0.3s; color: var(--neon-purple);
}
.cyber-link:hover::before, .cyber-link:hover::after { opacity: 1; }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
    padding: 0.8rem 2rem;
    font-family: var(--font-term);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.3s ease;
    background: transparent;
    text-decoration: none;
}

.cyber-btn {
    color: var(--neon-cyan);
    border: 1px solid var(--neon-cyan);
    box-shadow: inset 0 0 10px rgba(0, 243, 255, 0.2), 0 0 10px rgba(0, 243, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.cyber-btn:hover {
    background: rgba(0, 243, 255, 0.1);
    box-shadow: inset 0 0 20px rgba(0, 243, 255, 0.4), 0 0 20px rgba(0, 243, 255, 0.4);
    color: #fff;
    text-shadow: 0 0 5px #fff;
}

.telegram-btn {
    border-color: var(--neon-purple);
    color: var(--neon-purple);
    box-shadow: inset 0 0 10px rgba(188, 19, 254, 0.2), 0 0 10px rgba(188, 19, 254, 0.2);
}
.telegram-btn:hover {
    background: rgba(188, 19, 254, 0.1);
    box-shadow: inset 0 0 20px rgba(188, 19, 254, 0.4), 0 0 20px rgba(188, 19, 254, 0.4);
    color: #fff;
}

.instagram-btn {
    border-color: #e040fb;
    color: #e040fb;
    box-shadow: inset 0 0 10px rgba(224, 64, 251, 0.2), 0 0 10px rgba(224, 64, 251, 0.2);
}
.instagram-btn:hover {
    background: rgba(224, 64, 251, 0.1);
    box-shadow: inset 0 0 20px rgba(224, 64, 251, 0.4), 0 0 20px rgba(224, 64, 251, 0.4);
    color: #fff;
}

.linkedin-btn {
    border-color: #00b4d8;
    color: #00b4d8;
    box-shadow: inset 0 0 10px rgba(0, 180, 216, 0.2), 0 0 10px rgba(0, 180, 216, 0.2);
}
.linkedin-btn:hover {
    background: rgba(0, 180, 216, 0.1);
    box-shadow: inset 0 0 20px rgba(0, 180, 216, 0.4), 0 0 20px rgba(0, 180, 216, 0.4);
    color: #fff;
}

/* UI Panels */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 8px;
    padding: 2rem;
}

.cyber-border {
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
    position: relative;
}
.cyber-border:hover {
    border-color: var(--neon-cyan);
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.2);
    transform: translateY(-5px);
}

.cyber-panel {
    padding: 0; overflow: hidden;
    border: 1px solid #333;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.panel-header {
    background: #1a1c23;
    padding: 0.8rem 1rem;
    display: flex; align-items: center; gap: 0.5rem;
    border-bottom: 1px solid #333;
}

.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27c93f; }

.panel-title { font-family: var(--font-term); font-size: 0.8rem; color: #888; margin-left: 1rem; }
.panel-content { padding: 2rem; font-family: var(--font-term); color: #a0aec0; }
.panel-content p { margin-bottom: 1rem; }

/* Sections */
.section-padding { padding: 6rem 0; min-height: auto; }
.hero { min-height: 100vh; display: flex; align-items: center; justify-content: center; position: relative; }
.hero-content { z-index: 2; text-align: center; width: 100%; display: flex; flex-direction: column; align-items: center;}

.glitch-title {
    font-size: clamp(3rem, 8vw, 6rem);
    color: var(--text-main);
    text-shadow: 0 0 15px var(--neon-cyan);
    position: relative;
    margin-bottom: 1rem;
}

.terminal-container {
    background: rgba(0, 0, 0, 0.6);
    padding: 1rem 2rem;
    border-radius: 4px;
    border-left: 3px solid var(--neon-cyan);
    display: inline-block;
    margin-bottom: 2rem;
    font-size: clamp(0.9rem, 2vw, 1.2rem);
    text-align: left;
    max-width: 800px;
    width: 100%;
}

.prompt { color: var(--neon-red); }
#typing-text { color: var(--neon-cyan); }
.cursor { color: var(--text-main); animation: blink 1s step-end infinite; }

@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

.cyber-orb {
    position: absolute; width: 40vw; height: 40vw; max-width: 400px; max-height: 400px;
    background: radial-gradient(circle, var(--neon-purple) 0%, transparent 70%);
    border-radius: 50%; filter: blur(80px); opacity: 0.15;
    top: 50%; left: 50%; transform: translate(-50%, -50%);
    z-index: 1; animation: orb-pulse 8s ease-in-out infinite;
    pointer-events: none;
}

@keyframes orb-pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.15; }
    50% { transform: translate(-50%, -50%) scale(1.1); opacity: 0.25; }
}

/* Skills */
.skills-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 2rem; }
.skill-card {
    display: flex; align-items: center; gap: 1.5rem;
    padding: 1.5rem;
}
.skill-card h3 { font-size: 1.2rem; color: #e2e8f0; margin: 0; }
.skill-icon {
    font-family: var(--font-term); font-size: 1.5rem; color: var(--neon-purple);
    font-weight: bold; text-shadow: 0 0 5px rgba(188, 19, 254, 0.5);
}

/* Footer */
footer { padding: 2rem 0; border-top: 1px solid var(--glass-border); color: var(--text-muted); font-size: 0.9rem; position: relative; z-index: 2; background: var(--bg-main); }

/* Animations */
.fade-in { opacity: 0; transform: translateY(40px); transition: opacity 0.8s ease-out, transform 0.8s ease-out; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

@media (max-width: 768px) {
    .nav-links { display: none; }
    .section-padding { padding: 4rem 0; }
    .terminal-container { padding: 1rem; width: 90%; }
}