/* ===== ГЛОБАЛЬНЫЕ СТИЛИ ===== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --primary: #6366f1; --primary-hover: #4f46e5; --primary-light: #818cf8;
    --success: #10b981; --danger: #ef4444;
    --background: #0b0b14; --surface: #161625; --surface-hover: #1e1e33;
    --border: rgba(255,255,255,0.08);
    --text-primary: #fff; --text-secondary: #94a3b8; --text-muted: #64748b;
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.5);
    --radius-md: 12px; --radius-lg: 20px; --radius-xl: 24px;
    --transition: 0.25s ease; --sidebar-width: 260px;
}

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

/* ===== PIXEL ART BACKGROUND ===== */
body::before {
    content: ''; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(90deg, rgba(99,102,241,0.03) 1px, transparent 1px),
                linear-gradient(rgba(99,102,241,0.03) 1px, transparent 1px),
                radial-gradient(circle at top right, rgba(99,102,241,0.1), transparent 50%),
                radial-gradient(circle at bottom left, rgba(139,92,246,0.08), transparent 50%);
    background-size: 32px 32px, 32px 32px, 100% 100%, 100% 100%;
    z-index: -2; pointer-events: none;
}

body::after {
    content: ''; position: fixed; top: 5%; right: 3%;
    width: 120px; height: 120px;
    background-image: linear-gradient(45deg, #6366f1 25%, transparent 25%),
                      linear-gradient(-45deg, #6366f1 25%, transparent 25%),
                      linear-gradient(45deg, transparent 75%, #6366f1 75%),
                      linear-gradient(-45deg, transparent 75%, #6366f1 75%);
    background-size: 16px 16px; background-position: 0 0, 0 8px, 8px -8px, -8px 0;
    opacity: 0.08; z-index: -1; pointer-events: none;
    animation: pixelRotate 30s linear infinite;
}
@keyframes pixelRotate { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* ===== SIDEBAR ===== */
.sidebar {
    position: fixed; left: 0; top: 0; width: var(--sidebar-width); height: 100vh;
    background: rgba(22,22,37,0.95); backdrop-filter: blur(20px);
    border-right: 1px solid var(--border); display: flex; flex-direction: column; z-index: 1000;
}
.sidebar-header { padding: 24px 20px; border-bottom: 1px solid var(--border); }
.logo { display: flex; align-items: center; gap: 12px; }
.logo-icon { font-size: 32px; }
.logo-text { font-size: 22px; font-weight: 700; background: var(--gradient-primary); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.sidebar-nav { flex: 1; padding: 16px 12px; }
.nav-section { margin-bottom: 8px; }
.nav-toggle {
    width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 16px;
    background: transparent; border: none; border-radius: var(--radius-md);
    color: var(--text-secondary); cursor: pointer; font-size: 14px; font-weight: 500;
    transition: all var(--transition); text-align: left;
}
.nav-toggle:hover { background: var(--surface-hover); color: var(--text-primary); }
.nav-toggle.active { background: rgba(99,102,241,0.1); color: var(--primary-light); }
.nav-icon { font-size: 18px; }
.nav-arrow { margin-left: auto; font-size: 10px; transition: transform var(--transition); }
.nav-toggle.active .nav-arrow { transform: rotate(180deg); }
.nav-content { max-height: 0; overflow: hidden; transition: max-height var(--transition); }
.nav-content.active { max-height: 250px; }
.nav-links { list-style: none; padding: 8px 0; }
.nav-links li { margin: 4px 0; }
.nav-link {
    display: block; padding: 10px 16px 10px 48px; color: var(--text-secondary);
    text-decoration: none; border-radius: var(--radius-md); font-size: 13px;
    transition: all var(--transition);
}
.nav-link:hover { background: var(--surface-hover); color: var(--text-primary); }
.sidebar-footer { padding: 20px; border-top: 1px solid var(--border); text-align: center; }
.copyright { font-size: 12px; color: var(--text-muted); }

/* ===== MAIN CONTENT ===== */
.main-content { margin-left: var(--sidebar-width); padding: 40px; }
.container { max-width: 900px; margin: 0 auto; }
.section { margin-bottom: 70px; scroll-margin-top: 30px; }
.section-title {
    font-size: 28px; font-weight: 700; margin-bottom: 28px;
    background: var(--gradient-primary); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}

/* ===== ABOUT CARD ===== */
.about-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-xl); padding: 32px;
    display: flex; gap: 28px; align-items: center;
}
.about-avatar {
    width: 100px; height: 100px; border-radius: 50%; overflow: hidden;
    flex-shrink: 0; border: 3px solid var(--primary);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
}
.about-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.about-info h2 { font-size: 24px; margin-bottom: 6px; }
.about-role { color: var(--primary-light); font-size: 14px; font-weight: 500; margin-bottom: 14px; }
.about-desc { color: var(--text-secondary); line-height: 1.7; margin-bottom: 20px; }
.about-stats { display: flex; gap: 28px; }
.stat { text-align: center; }
.stat-value { display: block; font-size: 22px; font-weight: 700; color: var(--primary-light); }
.stat-label { font-size: 12px; color: var(--text-muted); }

/* ===== SKILLS ===== */
.skills-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 18px; }
.skill-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 22px; transition: all var(--transition);
}
.skill-card:hover { border-color: var(--primary); transform: translateY(-3px); }
.skill-icon { font-size: 32px; margin-bottom: 14px; }
.skill-card h3 { font-size: 15px; margin-bottom: 10px; }
.skill-bar { height: 5px; background: var(--background); border-radius: 3px; overflow: hidden; margin-bottom: 10px; }
.skill-fill { height: 100%; background: var(--gradient-primary); border-radius: 3px; }
.skill-card p { font-size: 13px; color: var(--text-muted); }

/* ===== SOCIALS ===== */
.socials-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.social-card {
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    padding: 22px; background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-lg); text-decoration: none; color: var(--text-primary);
    transition: all var(--transition);
}
.social-card:hover { border-color: var(--primary); transform: translateY(-3px); }
.social-icon { font-size: 28px; }
.social-handle { font-size: 12px; color: var(--text-muted); }

/* ===== PROJECTS ===== */
.project-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-xl); padding: 28px;
}
.project-header { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.project-icon { font-size: 36px; }
.project-info h3 { font-size: 19px; margin-bottom: 3px; }
.project-tech { font-size: 13px; color: var(--text-muted); }
.project-link { margin-left: auto; color: var(--primary-light); text-decoration: none; font-weight: 500; }
.project-link:hover { color: var(--primary); }
.project-desc { color: var(--text-secondary); line-height: 1.7; margin-bottom: 18px; }
.project-features { display: flex; flex-wrap: wrap; gap: 10px; }
.feature {
    padding: 7px 14px; background: var(--background); border: 1px solid var(--border);
    border-radius: 18px; font-size: 12px; color: var(--text-secondary);
}

/* ===== DONATE ===== */
.donate-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-xl); padding: 36px; text-align: center;
    max-width: 580px; margin: 0 auto;
}
.donate-icon { font-size: 54px; margin-bottom: 14px; }
.donate-card h2 { font-size: 22px; margin-bottom: 6px; }
.donate-card > p { color: var(--text-secondary); margin-bottom: 28px; }
.donate-methods { display: flex; flex-direction: column; gap: 14px; margin-bottom: 18px; }
.donate-method {
    display: flex; align-items: center; gap: 14px; padding: 18px;
    background: var(--background); border: 1px solid var(--border);
    border-radius: var(--radius-md); text-align: left;
}
.method-icon { font-size: 26px; flex-shrink: 0; }
.method-info { flex: 1; min-width: 0; }
.method-info strong { display: block; margin-bottom: 5px; font-size: 14px; }
.method-info p { font-size: 12px; color: var(--text-muted); word-break: break-all; font-family: monospace; margin-bottom: 3px; }
.method-info small { font-size: 11px; color: var(--text-secondary); }
.copy-btn {
    padding: 9px 16px; background: var(--primary); border: none;
    border-radius: var(--radius-md); color: white; cursor: pointer;
    font-size: 12px; font-weight: 500; transition: all var(--transition);
}
.copy-btn:hover { background: var(--primary-hover); }
.donate-warning {
    margin-top: 20px; padding: 14px; background: rgba(239,68,68,0.1);
    border: 1px solid var(--danger); border-radius: var(--radius-md);
    color: var(--danger); font-size: 13px; font-weight: 500;
}

/* ===== CONTACT ===== */
.contact-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-xl); padding: 36px; text-align: center;
}
.contact-card p { color: var(--text-secondary); margin-bottom: 22px; }
.contact-btn {
    display: inline-block; padding: 13px 28px; background: var(--gradient-primary);
    color: white; text-decoration: none; border-radius: var(--radius-md);
    font-weight: 500; transition: all var(--transition);
}
.contact-btn:hover { transform: translateY(-2px); }

/* ===== FOOTER ===== */
.main-footer { padding: 36px; text-align: center; color: var(--text-muted); font-size: 14px; border-top: 1px solid var(--border); }

/* ===== LANGUAGE SWITCHER ===== */
.lang-switcher {
    position: fixed; bottom: 20px; right: 20px; display: flex; gap: 8px; z-index: 1000;
}
.lang-btn {
    padding: 10px 16px; background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-md); color: var(--text-secondary); cursor: pointer;
    font-size: 13px; font-weight: 600; transition: all var(--transition);
}
.lang-btn:hover, .lang-btn.active { background: var(--primary); color: white; border-color: var(--primary); }

/* ===== NOTIFICATIONS ===== */
.notification {
    position: fixed; top: 20px; right: 20px; padding: 14px 20px;
    border-radius: var(--radius-md); color: white; font-size: 14px; font-weight: 500;
    z-index: 2000; animation: slideIn 0.3s ease; box-shadow: var(--shadow-lg);
}
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
.notification.success { background: var(--success); }
.notification.error { background: var(--danger); }

/* ===== MEDIA QUERIES ===== */
@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); transition: transform var(--transition); }
    .sidebar.open { transform: translateX(0); }
    .main-content { margin-left: 0; padding: 24px; }
    .about-card { flex-direction: column; text-align: center; }
    .about-stats { justify-content: center; }
    .project-header { flex-direction: column; text-align: center; }
    .project-link { margin-left: 0; }
}