/* === Базовые стили (мобильные устройства) === */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #10101a;
    color: #e0e0e0;
    line-height: 1.6;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}

ul {
    list-style: none;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

:root {
    --primary: #6c5ce7;
    --primary-light: #a29bfe;
    --primary-dark: #4a3db3;
    --accent: #00cec9;
    --bg-dark: #10101a;
    --bg-card: #1a1a28;
    --bg-card-hover: #242436;
    --text: #e0e0e0;
    --text-muted: #909090;
    --border: #2e2e3e;
    --gradient-1: linear-gradient(135deg, #6c5ce7, #a29bfe);
    --gradient-2: linear-gradient(135deg, #00cec9, #0984e3);
    --shadow: 0 8px 30px rgba(0,0,0,0.4);
    --radius: 16px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.3;
    color: #f5f5f5;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header__tag {
    display: inline-block;
    background: rgba(108, 92, 231, 0.15);
    color: var(--primary-light);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
}

.section-header__title {
    font-size: 2.2rem;
    margin-bottom: 12px;
}

.section-header__desc {
    color: var(--text-muted);
    font-size: 1.05rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Кнопки */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    text-align: center;
}

.btn--primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 15px rgba(108, 92, 231, 0.4);
}
.btn--primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(108, 92, 231, 0.6);
}

.btn--outline {
    background: transparent;
    border: 2px solid var(--border);
    color: #e0e0e0;
}
.btn--outline:hover {
    border-color: var(--primary-light);
    color: var(--primary-light);
}

.btn--sm { padding: 10px 20px; font-size: 0.9rem; }
.btn--lg { padding: 16px 36px; font-size: 1.1rem; }
.btn--full { width: 100%; }

/* Шапка */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(16, 16, 26, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.nav__logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 1.2rem;
    color: #f5f5f5;
}
.nav__logo-icon {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 1.4rem;
    font-weight: 800;
}

.nav__list {
    display: none;
}
.nav__list.active {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: #10101a;
    justify-content: center;
    align-items: center;
    gap: 24px;
    z-index: 999;
}

.nav__link {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 1.2rem;
}
.nav__link:hover {
    color: #fff;
}

.nav__cta {
    display: none;
}

.nav__burger {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1000;
}
.nav__burger span {
    display: block;
    width: 24px;
    height: 2px;
    background: #fff;
    transition: var(--transition);
}

/* Главный экран */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding: 100px 0 60px;
}

.hero__bg {
    display: none;
}

.hero__container {
    display: flex;
    flex-direction: column;
    gap: 40px;
    text-align: center;
}

.hero__badge {
    display: inline-block;
    background: rgba(0, 206, 201, 0.1);
    border: 1px solid rgba(0, 206, 201, 0.3);
    color: var(--accent);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 24px;
}

.hero__title {
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
    color: #f5f5f5;
}

.hero__highlight {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero__subtitle {
    font-size: 1.05rem;
    color: var(--text-muted);
    margin-bottom: 32px;
}

.hero__actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 40px;
}

.hero__stats {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    justify-content: center;
}

.hero__stat {
    display: flex;
    flex-direction: column;
}

.hero__stat-num {
    font-size: 1.8rem;
    font-weight: 800;
    color: #f5f5f5;
    line-height: 1;
}

.hero__stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.hero__visual {
    display: flex;
    justify-content: center;
}

.hero__code-block {
    background: #1e1e2c;
    border-radius: 12px;
    overflow: hidden;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
    border: 1px solid var(--border);
}

.hero__code-header {
    background: #181824;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.hero__code-dot { width: 10px; height: 10px; border-radius: 50%; }
.hero__code-dot--red { background: #ff5f56; }
.hero__code-dot--yellow { background: #ffbd2e; }
.hero__code-dot--green { background: #27c93f; }

.hero__code-filename {
    margin-left: auto;
    color: #6c5ce7;
    font-size: 0.8rem;
    font-weight: 500;
}

.hero__code-body {
    padding: 16px;
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 0.8rem;
    line-height: 1.7;
    overflow-x: auto;
    color: #ccc;
}

.code-keyword { color: #c792ea; }
.code-class { color: #82aaff; }
.code-prop { color: #ffcb6b; }
.code-string { color: #c3e88d; }
.code-method { color: #f78c6c; }

.hero__scroll-indicator {
    display: none;
}

/* Обо мне */
.about {
    padding: 80px 0;
    background: #14141f;
}

.about__grid {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.about__name {
    font-size: 1.7rem;
    margin-bottom: 20px;
}

.about__text {
    color: var(--text-muted);
    margin-bottom: 16px;
    font-size: 1rem;
    line-height: 1.8;
}

.about__contacts-short {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 28px;
    padding: 20px;
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border);
}

.about__contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #d0d0d0;
    font-size: 0.95rem;
}
.about__contact-item svg { color: var(--primary-light); flex-shrink: 0; }
.about__contact-item a:hover { color: var(--primary-light); }

.about__skills-title { font-size: 1.4rem; margin-bottom: 24px; }

.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 28px;
}

.skill-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px;
    text-align: center;
    transition: var(--transition);
}
.skill-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.skill-card__icon {
    width: 44px; height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    margin: 0 auto 8px;
    font-size: 0.95rem;
}
.skill-card__icon--php { background: #787cb5; color: #fff; }
.skill-card__icon--bitrix { background: #2f80ed; color: #fff; }
.skill-card__icon--js { background: #f7df1e; color: #000; }
.skill-card__icon--vue { background: #42b883; color: #fff; }
.skill-card__icon--css { background: #1572b6; color: #fff; }
.skill-card__icon--dle { background: #e74c3c; color: #fff; }

.skill-card__label { display: block; font-weight: 600; font-size: 0.9rem; color: #f5f5f5; margin-bottom: 4px; }
.skill-card__level { font-size: 0.75rem; color: var(--text-muted); }

.about__specialization h4 { font-size: 1rem; margin-bottom: 12px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { background: rgba(108, 92, 231, 0.1); border: 1px solid rgba(108, 92, 231, 0.3); color: var(--primary-light); padding: 4px 12px; border-radius: 50px; font-size: 0.8rem; font-weight: 500; }

/* Портфолио */
.portfolio { padding: 80px 0; background: #10101a; }

/* ---------- Слайдер портфолио ---------- */
.portfolio__slider-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.portfolio__slider-viewport {
    overflow: hidden;
    width: 100%;
}

.portfolio__grid {
    display: flex;
    gap: 24px;
    transition: transform 0.5s ease;
    --cards-per-view: 1;
}

.portfolio__grid .portfolio-card {
    flex: 0 0 calc((100% - 24px * (var(--cards-per-view) - 1)) / var(--cards-per-view));
    min-width: 0;
}

.portfolio__slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: rgba(26,26,40,0.8);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    cursor: pointer;
    transition: var(--transition);
}
.portfolio__slider-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
}
.portfolio__slider-btn--prev { left: -20px; }
.portfolio__slider-btn--next { right: -20px; }

/* Адаптив для слайдера */
@media (min-width: 576px) {
    .portfolio__grid { --cards-per-view: 2; }
}
@media (min-width: 768px) {
    .portfolio__grid { --cards-per-view: 3; }
}
@media (min-width: 1200px) {
    .portfolio__grid { --cards-per-view: 3; }
}

.portfolio-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: var(--transition);
    cursor: pointer;
}
.portfolio-card:hover { border-color: var(--primary-light); transform: translateY(-4px); box-shadow: 0 15px 30px rgba(108, 92, 231, 0.2); }

.portfolio-card__image { height: 200px; position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.portfolio-card__overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.3s; z-index: 2; }
.portfolio-card:hover .portfolio-card__overlay { opacity: 1; }
.portfolio-card__view-btn { background: rgba(255,255,255,0.1); backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,0.2); color: #fff; padding: 8px 20px; border-radius: 50px; font-weight: 600; cursor: pointer; }

.portfolio-card__mockup { width: 85%; background: rgba(255,255,255,0.05); border-radius: 8px; padding: 10px; backdrop-filter: blur(4px); border: 1px solid rgba(255,255,255,0.1); }
.mockup-header { display: flex; gap: 6px; margin-bottom: 12px; }
.mockup-header span { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.5); }
.mockup-body { display: flex; flex-direction: column; gap: 8px; }
.mockup-line { height: 6px; background: rgba(255,255,255,0.15); border-radius: 4px; }
.mockup-line--lg { width: 100%; } .mockup-line--md { width: 70%; } .mockup-line--sm { width: 40%; }
.mockup-block { width: 100%; height: 30px; background: rgba(255,255,255,0.1); border-radius: 4px; }
.mockup-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
.mockup-block--sm { height: 20px; }
.mockup-body--centered { align-items: center; }
.mockup-circle { width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,0.2); margin-bottom: 8px; }
.mockup-badge { width: 50%; height: 16px; background: var(--primary); border-radius: 20px; align-self: flex-end; }
.mockup-code-lines { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.mockup-code-lines span { height: 6px; background: rgba(255,255,255,0.15); border-radius: 4px; width: 100%; }
.mockup-code-lines span:nth-child(2) { width: 80%; } .mockup-code-lines span:nth-child(3) { width: 60%; } .mockup-code-lines span:nth-child(4) { width: 90%; }
.mockup-body--columns { flex-direction: row; gap: 8px; height: 60px; }
.mockup-column { flex: 1; background: rgba(255,255,255,0.1); border-radius: 4px; }
.mockup-column--wide { flex: 2; }

.portfolio-card__body { padding: 20px; }
.portfolio-card__category { font-size: 0.8rem; color: var(--primary-light); text-transform: uppercase; font-weight: 600; letter-spacing: 0.5px; }
.portfolio-card__title { font-size: 1.2rem; margin: 8px 0 10px; color: #f5f5f5; }
.portfolio-card__desc { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 16px; line-height: 1.6; }
.portfolio-card__footer { display: flex; justify-content: space-between; align-items: center; }
.portfolio-card__price { font-weight: 700; color: var(--accent); font-size: 1.1rem; }

/* ---------- Модальное окно ---------- */
.modal {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 2000;
    align-items: center;
    justify-content: center;
}
.modal.active {
    display: flex;
}
.modal__overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.8);
    cursor: pointer;
}
.modal__container {
    position: relative;
    background: var(--bg-card);
    border-radius: 20px;
    max-width: 700px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.7);
    z-index: 2001;
    animation: modalIn 0.3s ease;
}
@keyframes modalIn {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
.modal__close {
    position: absolute;
    top: 12px; right: 16px;
    background: none;
    border: none;
    font-size: 2rem;
    color: #fff;
    cursor: pointer;
    z-index: 10;
}
.modal__image {
    height: 250px;
    background-size: cover;
    background-position: center;
    border-radius: 20px 20px 0 0;
}
.modal__content {
    padding: 24px;
}
.modal__category { font-size: 0.85rem; color: var(--primary-light); text-transform: uppercase; }
.modal__title { font-size: 1.8rem; margin: 8px 0 16px; color: #fff; }
.modal__desc { color: var(--text-muted); font-size: 1rem; line-height: 1.7; margin-bottom: 20px; }
.modal__price { font-size: 1.4rem; font-weight: 700; color: var(--accent); }

/* Отзывы */
.reviews { padding: 80px 0; background: #14141f; }
.reviews__kwork-link { color: var(--primary-light); text-decoration: underline; }
.reviews__grid { display: grid; grid-template-columns: 1fr; gap: 24px; }

.review-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; padding: 22px; transition: var(--transition); }
.review-card:hover { border-color: #555; }
.review-card__header { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.review-card__avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--primary); display: flex; align-items: center; justify-content: center; font-weight: 700; color: #fff; font-size: 0.9rem; }
.review-card__avatar--me { background: #f39c12; }
.review-card__user-info { flex: 1; }
.review-card__username { font-weight: 600; color: #f5f5f5; font-size: 0.95rem; }
.review-card__stars { color: #f1c40f; letter-spacing: 2px; }
.review-card__text { color: #d0d0d0; font-size: 0.95rem; line-height: 1.7; margin-bottom: 12px; }
.review-card__tag { display: inline-block; background: rgba(108,92,231,0.15); color: var(--primary-light); padding: 2px 12px; border-radius: 50px; font-size: 0.75rem; font-weight: 600; }
.review-card__response { margin-top: 16px; padding: 14px; background: rgba(255,255,255,0.03); border-left: 3px solid #f39c12; border-radius: 0 8px 8px 0; }
.review-card__response-header { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.review-card__response-text { color: #b0b0b0; font-size: 0.9rem; }

/* Контакты */
.contact { padding: 80px 0; background: #10101a; }
.contact__grid { display: flex; flex-direction: column; gap: 30px; }
.contact__form { background: var(--bg-card); padding: 28px; border-radius: 16px; border: 1px solid var(--border); position: relative; }
.form-group { margin-bottom: 18px; }
.form-label { display: block; margin-bottom: 6px; color: #d0d0d0; font-weight: 500; font-size: 0.9rem; }
.form-input, .form-textarea { width: 100%; padding: 12px 16px; background: #15151f; border: 1px solid var(--border); border-radius: 8px; color: #f5f5f5; font-family: inherit; font-size: 1rem; transition: border-color 0.2s; }
.form-input:focus, .form-textarea:focus { outline: none; border-color: var(--primary); }
.form-textarea { resize: vertical; min-height: 110px; }
.form-error { color: #e74c3c; font-size: 0.8rem; margin-top: 4px; display: none; }
.form-error.visible { display: block; }
.form-success {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    text-align: center;
    padding: 20px;
    color: #2ecc71;
    font-weight: 600;
    display: none;
    z-index: 5;
}
.form-success.active {
    display: block;
}
.form-success.active ~ .form-group,
.form-success.active ~ .btn--full {
    opacity: 0;
    pointer-events: none;
}

.contact__info-card, .contact__social-card { background: var(--bg-card); padding: 28px; border-radius: 16px; border: 1px solid var(--border); margin-bottom: 20px; }
.contact__info-title { font-size: 1.2rem; color: #f5f5f5; margin-bottom: 18px; }
.contact__info-list { display: flex; flex-direction: column; gap: 14px; }
.contact__info-list li { display: flex; align-items: center; gap: 10px; color: #d0d0d0; font-size: 0.95rem; }
.contact__info-list svg { color: var(--primary-light); }
.contact__kwork-btn { display: flex; align-items: center; gap: 8px; background: #1e1e2c; padding: 12px 18px; border-radius: 8px; color: #f5f5f5; font-weight: 600; transition: var(--transition); font-size: 0.9rem; }
.contact__kwork-btn:hover { background: #2a2a3c; color: var(--primary-light); }

/* Футер */
.footer { background: #0a0a14; padding: 50px 0 25px; border-top: 1px solid var(--border); }
.footer__grid { display: flex; flex-direction: column; gap: 30px; margin-bottom: 30px; }
.footer__brand-desc { color: var(--text-muted); margin-top: 12px; font-size: 0.9rem; line-height: 1.6; }
.footer__links h4 { color: #f5f5f5; margin-bottom: 14px; font-size: 1rem; }
.footer__links ul { display: flex; flex-direction: column; gap: 8px; }
.footer__links ul li a, .footer__links ul li span { color: var(--text-muted); font-size: 0.9rem; }
.footer__links ul li a:hover { color: #fff; }
.footer__bottom { text-align: center; padding-top: 25px; border-top: 1px solid var(--border); color: var(--text-muted); font-size: 0.85rem; }

/* === Планшеты (min-width: 768px) === */
@media (min-width: 768px) {
    .nav { height: 72px; }
    .nav__list { display: flex; position: static; height: auto; background: none; flex-direction: row; transform: none; gap: 24px; }
    .nav__link { font-size: 1rem; }
    .nav__cta { display: inline-flex; }
    .nav__burger { display: none; }

    .hero { padding: 120px 0 80px; }
    .hero__container { flex-direction: row; text-align: left; }
    .hero__title { font-size: 2.8rem; }
    .hero__actions { justify-content: flex-start; }
    .hero__stats { justify-content: flex-start; }
    .hero__scroll-indicator { display: flex; position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); flex-direction: column; align-items: center; gap: 8px; color: var(--text-muted); font-size: 0.8rem; animation: float 2s infinite; }
    @keyframes float { 0%,100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(-8px); } }
    .scroll-dot { animation: scrollDot 1.5s infinite; }
    @keyframes scrollDot { 0%,100% { opacity:1; transform: translateY(0); } 50% { opacity:0.3; transform: translateY(6px); } }

    .about__grid { flex-direction: row; }
    .skills-grid { grid-template-columns: repeat(3,1fr); }
    .portfolio__grid { --cards-per-view: 3; }
    .reviews__grid { grid-template-columns: repeat(2,1fr); }
    .contact__grid { flex-direction: row; }
    .footer__grid { flex-direction: row; flex-wrap: wrap; }
}

/* === Десктопы (min-width: 992px) === */
@media (min-width: 992px) {
    .hero__container { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; }
    .hero__bg { display: block; position: absolute; top: -40%; right: -20%; width: 700px; height: 700px; background: radial-gradient(circle, rgba(108,92,231,0.15) 0%, transparent 70%); border-radius: 50%; pointer-events: none; }
    .hero__title { font-size: 3.2rem; }
    .about__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; }
    .portfolio__grid { --cards-per-view: 3; }
    .reviews__grid { grid-template-columns: repeat(3,1fr); }
    .contact__grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 40px; }
    .footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; }
}