/* === 1. Глобальные настройки === */
:root {
    --bg-main: #0B0E14;      
    --bg-card: #151922;      
    --primary: #5E6AD2;      
    --primary-hover: #4b55aa;
    --accent-teal: #22D3EE;  
    --accent-green: #10B981; 
    --text-white: #F9FAFB;
    --text-gray: #9CA3AF;    
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.06);
    --shadow-card: 0 10px 40px -10px rgba(0,0,0,0.5);
    --font-main: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace; 
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden; /* Защита от горизонтального скролла */
    position: relative;
}

body {
    background-color: var(--bg-main);
    color: var(--text-white);
    font-family: var(--font-main);
    line-height: 1.6;
    font-size: 16px;
}

a { text-decoration: none; color: inherit; transition: 0.3s ease; }
ul { list-style: none; }
button { font-family: inherit; border: none; cursor: pointer; background: none; }

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* === 2. Фон (Обертка) === */
.bg-wrapper {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    overflow: hidden;
    z-index: -1;
    pointer-events: none;
}

.bg-glow {
    position: absolute;
    width: 600px; height: 600px;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.15;
    animation: pulseGlow 10s infinite alternate;
}
.glow-purple { top: -200px; left: -200px; background: var(--primary); }
.glow-blue { bottom: -200px; right: -200px; background: var(--accent-teal); animation-delay: 5s; }

@keyframes pulseGlow {
    0% { transform: scale(1); opacity: 0.15; }
    100% { transform: scale(1.1); opacity: 0.25; }
}

/* === 3. Навигация === */
.navbar {
    position: fixed; top: 0; left: 0; width: 100%;
    background: rgba(11, 14, 20, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    z-index: 1000; padding: 15px 0;
}
.nav-container { display: flex; justify-content: space-between; align-items: center; }
.logo { font-family: var(--font-main); font-weight: 800; font-size: 1.4rem; z-index: 1002; }
.logo span { color: var(--primary); }
.nav-links { display: flex; gap: 30px; align-items: center; }
.nav-links a { color: var(--text-gray); font-size: 0.95rem; font-weight: 500; }
.nav-links a:hover { color: var(--text-white); }
.burger { display: none; flex-direction: column; gap: 6px; z-index: 1002; padding: 5px; }
.burger .line { width: 24px; height: 2px; background: var(--text-white); transition: 0.3s; }

/* === 4. Hero === */
.hero {
    padding-top: 120px; padding-bottom: 60px;
    display: flex; align-items: center;
    overflow: hidden;
}
.hero-content { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; width: 100%; }
.badge {
    display: inline-block; padding: 6px 14px; background: rgba(94, 106, 210, 0.15);
    color: #818cf8; border-radius: 50px; font-size: 0.8rem; font-weight: 600; margin-bottom: 20px;
}
.hero h1 { font-size: 3rem; line-height: 1.2; font-weight: 800; margin-bottom: 20px; word-wrap: break-word; }
.gradient-text {
    background: linear-gradient(135deg, #fff 0%, var(--accent-teal) 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.hero p { color: var(--text-gray); font-size: 1.1rem; margin-bottom: 30px; max-width: 480px; }
.hero-visual { display: flex; justify-content: center; width: 100%; }
.info-card {
    background: #0f1117; border: 1px solid var(--glass-border); border-radius: 16px;
    padding: 25px; width: 100%; max-width: 350px; box-shadow: var(--shadow-card);
}
.info-row { display: flex; justify-content: space-between; margin-bottom: 15px; font-size: 0.95rem; }
.info-row .label { color: var(--text-gray); }
.info-row .value { font-weight: 600; text-align: right; }
.text-green { color: var(--accent-green); }
.decoration-line { height: 1px; background: var(--glass-border); margin: 20px 0; }
.mini-code { font-family: var(--font-mono); font-size: 0.8rem; color: #6b7280; line-height: 1.5; }

/* === 5. Проекты === */
.projects { padding: 60px 0; }
.section-title { font-size: 2rem; font-weight: 700; margin-bottom: 40px; text-align: center; }
.project-card {
    display: grid; grid-template-columns: 1fr 1fr; background: var(--bg-card);
    border: 1px solid var(--glass-border); border-radius: 20px; margin-bottom: 50px;
    overflow: hidden; transition: transform 0.4s ease;
    width: 100%;
}
.project-card:hover { transform: translateY(-5px); border-color: rgba(94, 106, 210, 0.3); }
.project-info { padding: 40px; display: flex; flex-direction: column; justify-content: center; }
.project-tag {
    display: inline-block; font-size: 0.8rem; padding: 6px 12px; border-radius: 6px;
    width: fit-content; margin-bottom: 15px; font-weight: 600;
}
.project-tag.android { color: var(--accent-green); background: rgba(16, 185, 129, 0.1); }
.project-tag.web { color: var(--accent-teal); background: rgba(34, 211, 238, 0.1); }
.project-info h3 { font-size: 1.8rem; margin-bottom: 15px; }
.project-desc { color: var(--text-gray); margin-bottom: 25px; font-size: 0.95rem; }
.link-arrow { color: var(--primary); font-weight: 600; display: inline-flex; align-items: center; gap: 8px; font-size: 1rem; }
.link-arrow:hover .arrow { transform: translateX(5px); }

.project-mockup { background: #0d1016; display: flex; align-items: center; justify-content: center; padding: 30px; min-height: 280px; }
.reverse { direction: rtl; } .reverse .project-info { direction: ltr; }
.mobile-mockup .screen {
    width: 100%; max-width: 180px; aspect-ratio: 9/18; background: #1f2937;
    border-radius: 20px; border: 6px solid #374151; position: relative;
    box-shadow: 0 20px 40px -10px rgba(0,0,0,0.5); overflow: hidden; display: flex; flex-direction: column;
}
.app-ui-header { height: 12%; background: #111827; padding: 10px; display: flex; gap: 8px; align-items: center; }
.ui-avatar { width: 24px; height: 24px; background: var(--primary); border-radius: 50%; }
.ui-text-sm { height: 6px; width: 40px; background: #374151; border-radius: 4px; }
.app-ui-cover { flex: 1; display: flex; align-items: center; justify-content: center; background: radial-gradient(circle, #374151 0%, #1f2937 100%); }
.play-icon { width: 40px; height: 40px; background: #fff; color: #000; border-radius: 50%; display: flex; align-items: center; justify-content: center; padding-left: 4px; }
.app-ui-controls { height: 20%; background: #111827; padding: 15px; }
.bar { height: 4px; width: 100%; background: #374151; border-radius: 3px; margin-bottom: 8px; } .bar.short { width: 60%; }
.browser-ui {
    width: 100%; max-width: 320px; aspect-ratio: 16/10; background: #1f2937;
    border-radius: 8px; box-shadow: 0 20px 40px -10px rgba(0,0,0,0.5); overflow: hidden; display: flex; flex-direction: column;
}
.browser-tabs { height: 15%; background: #111827; display: flex; align-items: flex-end; padding-left: 10px; }
.tab { width: 35%; height: 80%; background: #374151; border-radius: 6px 6px 0 0; margin-right: 5px; font-size: 0.7rem; color: #9ca3af; display: flex; align-items: center; padding-left: 10px; white-space: nowrap; overflow: hidden; }
.tab.active { background: #1f2937; color: #fff; }
.web-content { flex: 1; display: flex; padding: 5%; gap: 5%; }
.web-sidebar { width: 20%; background: #374151; border-radius: 4px; opacity: 0.3; }
.web-grid { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.card { background: #374151; border-radius: 4px; opacity: 0.5; }

/* === 6. Технологии === */
.tech-stack { background: #11141c; padding: 60px 0; border-top: 1px solid var(--glass-border); border-bottom: 1px solid var(--glass-border); }
.center-text { text-align: center; }
.section-subtitle { color: var(--text-gray); margin-bottom: 40px; max-width: 600px; margin-left: auto; margin-right: auto; font-size: 1rem; }
.tech-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.center-grid { justify-content: center; max-width: 800px; margin: 0 auto; }
.tech-card { background: var(--bg-main); padding: 25px; border-radius: 16px; border: 1px solid var(--glass-border); transition: 0.3s; }
.tech-card:hover { border-color: var(--primary); transform: translateY(-5px); }
.tech-card .icon { font-size: 2rem; margin-bottom: 15px; }
.tech-card h3 { font-size: 1.2rem; margin-bottom: 10px; }
.tech-card p { font-size: 0.9rem; color: var(--text-gray); }

/* === 7. Футер === */
footer { padding: 60px 0 30px; }
.footer-cta { text-align: center; margin-bottom: 50px; }
.footer-cta h3 { font-size: 1.3rem; margin-bottom: 10px; font-weight: 500; }
.email-link {
    font-size: 1.5rem; font-weight: 700; color: var(--primary);
    border-bottom: 2px solid rgba(94, 106, 210, 0.3); transition: 0.3s;
    word-break: break-all;
}
.email-link:hover { color: var(--text-white); border-color: var(--text-white); }
.footer-bottom { display: flex; justify-content: center; align-items: center; border-top: 1px solid var(--glass-border); padding-top: 30px; }
.footer-col { display: flex; flex-direction: column; align-items: center; }
.logo-small { font-weight: 700; font-size: 1.1rem; margin-bottom: 5px; }
.logo-small span { color: var(--primary); }
.footer-col p { color: #6b7280; font-size: 0.85rem; }

/* === 8. АДАПТИВНОСТЬ (Mobile) === */
@media (max-width: 768px) {
    .container { padding: 0 15px; }
    .hero { padding-top: 100px; padding-bottom: 50px; text-align: center; }
    .hero-content { grid-template-columns: 1fr; gap: 40px; }
    .hero h1 { font-size: 2.2rem; }
    .hero p { margin-left: auto; margin-right: auto; }
    .info-card { margin: 0 auto; }
    
    /* Скрываем навигацию, показываем бургер */
    .nav-links {
        position: fixed; right: 0; top: 0; height: 100vh;
        background-color: var(--bg-main); display: flex; flex-direction: column;
        align-items: center; justify-content: center; width: 70%;
        transform: translateX(100%); transition: transform 0.3s ease-in-out;
        z-index: 1000; border-left: 1px solid var(--glass-border);
    }
    
    /* Класс для открытия меню (переключение через JS) */
    .nav-links.nav-active { transform: translateX(0%); }
    
    .nav-links a { font-size: 1.2rem; margin: 20px 0; }
    .burger { display: flex; }
    
    /* Анимация бургера */
    .burger.toggle .line1 { transform: rotate(-45deg) translate(-5px, 6px); }
    .burger.toggle .line2 { opacity: 0; }
    .burger.toggle .line3 { transform: rotate(45deg) translate(-5px, -6px); }
    
    .project-card { display: flex; flex-direction: column; margin-bottom: 40px; height: auto; }
    .reverse { flex-direction: column; }
    .project-info { padding: 30px 20px; text-align: center; }
    .project-tag { margin: 0 auto 15px auto; }
    .project-mockup { padding: 30px 20px; min-height: 250px; }
    .email-link { font-size: 1.2rem; }
}

@media (max-width: 380px) {
    .hero h1 { font-size: 1.8rem; }
    .logo { font-size: 1.2rem; }
    .project-info h3 { font-size: 1.5rem; }
}

/* === 9. Анимации === */
.animate-up { opacity: 0; transform: translateY(30px); transition: 0.8s cubic-bezier(0.2, 0.8, 0.2, 1); }
.visible { opacity: 1; transform: translateY(0); }
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }