/* === БАЗОВЫЕ НАСТРОЙКИ === */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #06b6d4;
    --dark: #0f172a;
    --dark-light: #1e293b;
    --light: #f8fafc;
    --gray: #94a3b8;
    --gradient: linear-gradient(135deg, #6366f1, #06b6d4);
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Open Sans', sans-serif;
    background-color: var(--dark);
    color: var(--light);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4 { font-family: 'Montserrat', sans-serif; }
a { text-decoration: none; color: inherit; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* === НАВИГАЦИЯ === */
.navbar {
    position: fixed; top: 0; width: 100%;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000; padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.nav-container {
    max-width: 1200px; margin: 0 auto; padding: 0 20px;
    display: flex; justify-content: space-between; align-items: center;
}
.logo {
    font-size: 1.8rem; font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.nav-menu { display: flex; list-style: none; gap: 30px; }
.nav-menu a {
    font-weight: 600; transition: color 0.3s; position: relative;
}
.nav-menu a::after {
    content: ''; position: absolute; bottom: -5px; left: 0;
    width: 0; height: 2px; background: var(--gradient); transition: width 0.3s;
}
.nav-menu a:hover::after { width: 100%; }
.nav-menu a:hover { color: var(--secondary); }
.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; }
.hamburger span {
    width: 25px; height: 3px; background: var(--light);
    border-radius: 2px; transition: 0.3s;
}

/* === ГЛАВНЫЙ ЭКРАН === */
.hero {
    min-height: 100vh; display: flex; flex-direction: column;
    justify-content: center; align-items: center;
    padding: 100px 20px 50px;
    background: radial-gradient(ellipse at top, rgba(99, 102, 241, 0.15), transparent 50%),
                radial-gradient(ellipse at bottom, rgba(6, 182, 212, 0.1), transparent 50%);
}
.hero-content {
    max-width: 1200px; display: grid;
    grid-template-columns: 1fr 1fr; gap: 60px; align-items: center;
}
.hero-text h1 { font-size: 3rem; margin-bottom: 20px; line-height: 1.2; }
.highlight {
    background: var(--gradient); -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.subtitle { font-size: 1.3rem; color: var(--gray); margin-bottom: 15px; }
.description { color: var(--gray); margin-bottom: 30px; max-width: 500px; }
.hero-buttons { display: flex; gap: 15px; flex-wrap: wrap; }
.btn {
    padding: 14px 30px; border-radius: 10px; font-weight: 600;
    font-size: 1rem; cursor: pointer; transition: all 0.3s;
    border: none; display: inline-block;
}
.btn-primary {
    background: var(--gradient); color: white;
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 15px 40px rgba(99, 102, 241, 0.4); }
.btn-secondary {
    background: transparent; color: var(--light);
    border: 2px solid var(--gray);
}
.btn-secondary:hover { border-color: var(--primary); color: var(--primary); }

/* Блок кода */
.code-block {
    background: var(--dark-light); border-radius: 15px;
    overflow: hidden; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.code-header {
    background: rgba(0, 0, 0, 0.3); padding: 12px 15px;
    display: flex; gap: 8px;
}
.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27ca40; }
.code-content { padding: 20px; overflow-x: auto; }
.code-content code {
    font-family: 'Courier New', monospace; font-size: 0.9rem; line-height: 1.8;
}
.keyword { color: #c678dd; }
.variable { color: #e5c07b; }
.property { color: #e06c75; }
.string { color: #98c379; }

.scroll-indicator {
    position: absolute; bottom: 30px; text-align: center;
    animation: bounce 2s infinite;
}
.scroll-indicator span {
    display: block; font-size: 0.9rem; color: var(--gray); margin-bottom: 10px;
}
.scroll-indicator i { color: var(--primary); font-size: 1.5rem; }
@keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(10px); } }

/* === ПРОЕКТЫ === */
.projects { padding: 100px 0; background: var(--dark-light); }
.section-title {
    text-align: center; font-size: 2.5rem; margin-bottom: 15px;
    background: var(--gradient); -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.section-subtitle { text-align: center; color: var(--gray); margin-bottom: 50px; }
.projects-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 30px;
}
.project-card {
    background: var(--dark); border-radius: 20px; padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s; position: relative; overflow: hidden;
}
.project-card::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: var(--gradient); opacity: 0; transition: opacity 0.3s; z-index: 0;
}
.project-card:hover::before { opacity: 0.1; }
.project-card > * { position: relative; z-index: 1; }
.project-card:hover {
    transform: translateY(-10px); border-color: var(--primary);
    box-shadow: 0 20px 50px rgba(99, 102, 241, 0.2);
}
.project-icon {
    width: 70px; height: 70px; background: var(--gradient);
    border-radius: 15px; display: flex; align-items: center;
    justify-content: center; font-size: 1.8rem; margin-bottom: 20px;
}
.project-card h3 { font-size: 1.4rem; margin-bottom: 12px; }
.project-card p { color: var(--gray); margin-bottom: 20px; font-size: 0.95rem; }
.project-tags { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.project-tags span {
    background: rgba(99, 102, 241, 0.2); color: var(--primary);
    padding: 5px 12px; border-radius: 20px; font-size: 0.8rem; font-weight: 600;
}
.project-link {
    display: flex; align-items: center; gap: 10px;
    color: var(--secondary); font-weight: 600; transition: gap 0.3s;
}
.project-card:hover .project-link { gap: 15px; }

/* === ОБО МНЕ === */
.about { padding: 100px 0; }
.about-content {
    display: grid; grid-template-columns: 2fr 1fr; gap: 60px; align-items: center;
}
.about-text p { color: var(--gray); margin-bottom: 20px; }
.skills h3 { margin-bottom: 20px; font-size: 1.3rem; }
.skill-item { margin-bottom: 20px; }
.skill-item span { display: block; margin-bottom: 8px; font-weight: 600; }
.skill-bar { height: 10px; background: var(--dark-light); border-radius: 5px; overflow: hidden; }
.skill-progress {
    height: 100%; background: var(--gradient);
    border-radius: 5px; transition: width 1s ease;
}
.about-stats { display: grid; grid-template-columns: 1fr; gap: 20px; }
.stat-card {
    background: var(--dark-light); padding: 30px; border-radius: 15px;
    text-align: center; border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s;
}
.stat-card:hover { transform: translateY(-5px); }
.stat-card i {
    font-size: 2.5rem; background: var(--gradient);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    margin-bottom: 15px;
}
.stat-card h3 { font-size: 2rem; margin-bottom: 5px; }
.stat-card p { color: var(--gray); }

/* === КОНТАКТЫ === */
.contact { padding: 100px 0; background: var(--dark-light); }
.contact-content { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; }
.contact-info { display: flex; flex-direction: column; gap: 30px; }
.contact-item { display: flex; gap: 20px; align-items: center; }
.contact-item i {
    width: 50px; height: 50px; background: var(--gradient);
    border-radius: 12px; display: flex; align-items: center;
    justify-content: center; font-size: 1.3rem;
}
.contact-item h4 { margin-bottom: 5px; }
.contact-item p { color: var(--gray); }
.contact-form { display: flex; flex-direction: column; gap: 20px; }
.contact-form input, .contact-form textarea {
    padding: 15px 20px; background: var(--dark);
    border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 10px;
    color: var(--light); font-family: inherit; font-size: 1rem;
    transition: border-color 0.3s;
}
.contact-form input:focus, .contact-form textarea:focus {
    outline: none; border-color: var(--primary);
}
.contact-form textarea { resize: vertical; }

/* === ФУТЕР === */
.footer {
    padding: 40px 0; background: var(--dark);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.footer .container {
    display: flex; justify-content: space-between;
    align-items: center; flex-wrap: wrap; gap: 20px;
}
.footer p { color: var(--gray); }
.social-links { display: flex; gap: 15px; }
.social-links a {
    width: 40px; height: 40px; background: var(--dark-light);
    border-radius: 50%; display: flex; align-items: center;
    justify-content: center; transition: all 0.3s;
}
.social-links a:hover { background: var(--gradient); transform: translateY(-3px); }

/* === АДАПТИВ === */
@media (max-width: 968px) {
    .hero-content { grid-template-columns: 1fr; text-align: center; }
    .hero-text h1 { font-size: 2.5rem; }
    .hero-buttons { justify-content: center; }
    .about-content { grid-template-columns: 1fr; }
    .contact-content { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .nav-menu {
        position: fixed; top: 70px; left: -100%; width: 100%;
        background: var(--dark-light); flex-direction: column;
        padding: 30px; transition: 0.3s;
    }
    .nav-menu.active { left: 0; }
    .hamburger { display: flex; }
    .hero-text h1 { font-size: 2rem; }
    .section-title { font-size: 2rem; }
    .projects-grid { grid-template-columns: 1fr; }
    .footer .container { flex-direction: column; text-align: center; }
}