:root {
    --bg-main: #0a0f1d;
    --bg-card: #111827;
    --bg-card-hover: #1f2937;
    --border-color: #374151;
    --text-primary: #f9fafb;
    --text-secondary: #9ca3af;
    --accent-blue: #3b82f6;
    --accent-cyan: #06b6d4;
    --accent-green: #10b981;
    --radius-md: 12px;
    --radius-lg: 16px;
    --transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    word-break: break-word;
    overflow-wrap: break-word;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    max-width: 100%;
}

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    max-width: 100vw;
    width: 100%;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Навигация */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: rgba(10, 15, 29, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(55, 65, 81, 0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    transition: var(--transition);
}

.navbar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #fff;
}

.logo-icon { font-size: 1.8rem; }
.logo-title { font-weight: 800; font-size: 1.3rem; letter-spacing: -0.5px; }
.logo-subtitle { display: block; font-size: 0.75rem; color: var(--accent-cyan); text-transform: uppercase; font-weight: 600; }

.nav-links { display: flex; gap: 28px; }
.nav-link { color: var(--text-secondary); text-decoration: none; font-size: 0.95rem; font-weight: 500; transition: var(--transition); }
.nav-link:hover { color: #fff; }

/* Кнопки */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-blue) 0%, #2563eb 100%);
    color: #fff;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4); }
.btn-glow { box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3); }

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    border: 1px solid var(--border-color);
}
.btn-secondary:hover { background: rgba(255, 255, 255, 0.1); }

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}
.btn-outline:hover { border-color: var(--accent-cyan); color: var(--accent-cyan); }
.btn-large { padding: 16px 32px; font-size: 1.05rem; }
.btn-sm { padding: 8px 16px; font-size: 0.85rem; }
.btn-full { width: 100%; }
.btn-disabled { opacity: 0.5; cursor: not-allowed; }

/* Главный экран */
.hero-section {
    padding: 160px 0 100px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-glow {
    position: absolute;
    top: 20%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 300px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, rgba(6, 182, 212, 0) 70%);
    z-index: -1;
    filter: blur(50px);
}

.badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.badge-accent {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.3);
    color: #60a5fa;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 20px;
    letter-spacing: -1px;
}

.highlight-gradient {
    background: linear-gradient(135deg, #60a5fa 0%, #22d3ee 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-description {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 750px;
    margin: 0 auto 40px;
    line-height: 1.7;
}

.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* Секции */
.section { padding: 100px 0; }
.section-header { text-align: center; margin-bottom: 60px; max-width: 700px; margin-left: auto; margin-right: auto; }
.section-title { font-size: 2.5rem; font-weight: 800; margin-bottom: 16px; }
.section-subtitle { font-size: 1.1rem; color: var(--text-secondary); }

/* Хаб проектов (2 колонки) */
.projects-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px; }
.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 36px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--transition);
}
.project-card:hover { border-color: rgba(59, 130, 246, 0.5); transform: translateY(-5px); box-shadow: 0 15px 30px rgba(0,0,0,0.3); }
.featured-project { border-color: rgba(59, 130, 246, 0.4); background: linear-gradient(180deg, rgba(31, 41, 55, 0.5) 0%, rgba(17, 24, 39, 1) 100%); }

.project-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.project-status { font-size: 0.85rem; font-weight: 700; padding: 4px 10px; border-radius: 6px; }
.status-active { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.status-dev { background: rgba(156, 163, 175, 0.15); color: #9ca3af; }
.project-domain { font-family: 'Fira Code', monospace; color: var(--accent-cyan); font-weight: 600; font-size: 0.95rem; }

.project-title { font-size: 1.35rem; margin-bottom: 12px; color: #fff; }
.project-desc { color: var(--text-secondary); font-size: 0.95rem; margin-bottom: 24px; }
.project-tech { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.project-tech span { background: rgba(255, 255, 255, 0.05); border: 1px solid var(--border-color); padding: 4px 10px; border-radius: 6px; font-size: 0.8rem; color: #d1d5db; }

/* Компетенции (2 колонки, 5-й элемент на всю ширину) */
.competencies-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.cert-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 28px;
    display: flex;
    gap: 20px;
    align-items: flex-start;
    transition: var(--transition);
}
.cert-card:hover { border-color: var(--accent-cyan); background: var(--bg-card-hover); transform: translateY(-4px); }
.cert-card-full { grid-column: 1 / -1; }
.cert-icon { font-size: 2.2rem; background: rgba(255,255,255,0.03); padding: 12px; border-radius: 12px; border: 1px solid var(--border-color); flex-shrink: 0; }
.cert-body { flex-grow: 1; }
.cert-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; flex-wrap: wrap; gap: 8px; }
.cert-title { font-size: 1.15rem; color: #fff; }
.cert-badge { font-size: 0.75rem; font-weight: 700; color: #34d399; background: rgba(16, 185, 129, 0.1); padding: 2px 8px; border-radius: 4px; border: 1px solid rgba(16, 185, 129, 0.3); }
.cert-desc { font-size: 0.9rem; color: var(--text-secondary); margin-bottom: 18px; }
.cert-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* О подходе */
.about-box {
    background: linear-gradient(135deg, rgba(31, 41, 55, 0.8) 0%, rgba(17, 24, 39, 0.8) 100%);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 50px;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}
.about-icon { font-size: 3rem; margin-bottom: 20px; }
.about-box h2 { font-size: 2rem; margin-bottom: 16px; }
.about-box p { color: var(--text-secondary); font-size: 1.05rem; line-height: 1.8; }

/* Контакты */
.contact-container { text-align: center; max-width: 600px; }
.contact-title { font-size: 2.2rem; margin-bottom: 16px; }
.contact-subtitle { color: var(--text-secondary); margin-bottom: 30px; font-size: 1.05rem; }
.contact-btns { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* Подвал */
.footer { border-top: 1px solid var(--border-color); padding: 40px 0; font-size: 0.9rem; color: var(--text-secondary); }
.footer-content { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; }

/* Кнопка наверх */
.scroll-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-blue) 0%, #2563eb 100%);
    color: #fff;
    border: none;
    font-size: 1.3rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
    z-index: 1500;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}
.scroll-top-btn.show { opacity: 1; visibility: visible; transform: translateY(0); }
.scroll-top-btn:hover { transform: translateY(-4px) scale(1.05); }

@media (max-width: 900px) {
    .projects-grid, .competencies-grid { grid-template-columns: 1fr; }
    .cert-card-full { grid-column: auto; }
}

@media (max-width: 768px) {
    .hero-title { 
        font-size: 2rem; 
        word-break: break-word;
    }
    .navbar-content {
        height: auto;
        padding-top: 10px;
        padding-bottom: 10px;
        flex-wrap: wrap;
        gap: 12px;
    }
    .nav-links {
        display: flex;
        order: 3;
        width: 100%;
        overflow-x: auto;
        white-space: nowrap;
        gap: 18px;
        padding: 8px 0 4px;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .nav-links::-webkit-scrollbar {
        display: none;
    }
    .nav-link {
        font-size: 0.9rem;
    }
    .about-box { padding: 30px; }
    .cert-card { flex-direction: column; }
    .hero-actions {
        flex-direction: column;
        width: 100%;
        align-items: stretch;
        gap: 12px;
    }
    .hero-actions .btn {
        width: 100%;
        margin: 0;
    }
    .hero-glow {
        width: 300px;
        height: 150px;
    }
    .nav-action .btn {
        padding: 8px 14px;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .logo-subtitle {
        display: none;
    }
    .nav-action .btn {
        padding: 6px 10px;
        font-size: 0.75rem;
    }
    .hero-title {
        font-size: 1.6rem;
    }
    .contact-title {
        font-size: 1.6rem;
    }
    .container {
        padding: 0 16px;
    }
    .scroll-top-btn {
        width: 40px;
        height: 40px;
        bottom: 15px;
        right: 15px;
        font-size: 1.1rem;
    }
}
