/* ============================================================
   Python Developer Portfolio — style.css
   Светлая тема + градиентные акценты (фиолетовый → синий)
   ============================================================ */

/* ---------- CSS-переменные ---------- */
:root {
    --bg: #f4f4f4;
    --bg-alt: #ffffff;
    --surface: #ffffff;
    --text: #333333;
    --text-muted: #666666;
    --border: #e6e6ef;

    --grad-from: #667eea;
    --grad-to: #764ba2;
    --gradient: linear-gradient(135deg, var(--grad-from), var(--grad-to));

    --accent: #667eea;
    --accent-soft: rgba(102, 126, 234, 0.12);

    --shadow-sm: 0 4px 14px rgba(80, 80, 120, 0.08);
    --shadow-md: 0 12px 32px rgba(80, 80, 120, 0.14);
    --shadow-lg: 0 24px 60px rgba(102, 126, 234, 0.28);

    --radius: 18px;
    --radius-sm: 12px;
    --container: 1120px;
    --transition: 0.3s cubic-bezier(0.22, 1, 0.36, 1);

    --font: "Segoe UI", Roboto, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
}

/* ---------- Сброс и база ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    margin: 0;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.65;
    color: var(--text);
    background-color: var(--bg);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

ul { list-style: none; margin: 0; padding: 0; }

h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 0.5em; font-weight: 700; }

p { margin: 0 0 1em; }

strong { color: var(--grad-to); }

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 20px;
}

/* ---------- Кнопки ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 50px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition), background var(--transition), color var(--transition);
    white-space: nowrap;
}

.btn--primary {
    background: var(--gradient);
    color: #fff;
    box-shadow: var(--shadow-lg);
}

.btn--primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 28px 60px rgba(102, 126, 234, 0.42);
}

.btn--ghost {
    background: transparent;
    color: var(--grad-to);
    border-color: var(--border);
    box-shadow: var(--shadow-sm);
}

.btn--ghost:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-3px);
}

.btn--sm { padding: 9px 20px; font-size: 0.9rem; }

/* ---------- Хедер / навигация ---------- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid transparent;
    transition: box-shadow var(--transition), border-color var(--transition);
}

.header.is-scrolled {
    box-shadow: var(--shadow-sm);
    border-bottom-color: var(--border);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.nav__logo {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}
.nav__logo span {
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.nav__menu {
    display: flex;
    align-items: center;
    gap: 28px;
}

.nav__link {
    position: relative;
    font-weight: 500;
    color: var(--text-muted);
    transition: color var(--transition);
}
.nav__link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 0;
    height: 2px;
    background: var(--gradient);
    border-radius: 2px;
    transition: width var(--transition);
}
.nav__link:hover { color: var(--text); }
.nav__link:hover::after { width: 100%; }

/* Бургер */
.nav__burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
}
.nav__burger span {
    display: block;
    width: 22px;
    height: 2px;
    margin: 0 auto;
    background: var(--text);
    border-radius: 2px;
    transition: transform var(--transition), opacity var(--transition);
}
.nav__burger.is-active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__burger.is-active span:nth-child(2) { opacity: 0; }
.nav__burger.is-active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
    position: relative;
    padding: 160px 0 100px;
    overflow: hidden;
}

.hero__glow {
    position: absolute;
    top: -30%;
    right: -15%;
    width: 620px;
    height: 620px;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.35), rgba(118, 75, 162, 0.15) 45%, transparent 70%);
    filter: blur(30px);
    pointer-events: none;
    z-index: 0;
}

.hero__inner { position: relative; z-index: 1; max-width: 820px; }

.hero__badge {
    display: inline-block;
    padding: 8px 18px;
    margin-bottom: 24px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.4px;
    color: var(--grad-to);
    background: var(--accent-soft);
    border-radius: 50px;
}

.hero__title {
    font-size: clamp(2.2rem, 7vw, 4.4rem);
    letter-spacing: -1.5px;
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 16px;
}

.hero__subtitle {
    font-size: clamp(1.05rem, 2.6vw, 1.5rem);
    color: var(--text-muted);
    max-width: 620px;
    margin-bottom: 36px;
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 56px;
}

.hero__stats {
    display: flex;
    flex-wrap: wrap;
    gap: 44px;
}
.hero__stats li { display: flex; flex-direction: column; }
.hero__stats strong {
    font-size: 1.9rem;
    font-weight: 800;
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    line-height: 1.1;
}
.hero__stats span { font-size: 0.88rem; color: var(--text-muted); }

/* ---------- Секции ---------- */
.section { padding: 96px 0; }
.section--alt { background: var(--bg-alt); }

.section__title {
    font-size: clamp(1.7rem, 4vw, 2.5rem);
    letter-spacing: -0.5px;
}
.section__title::after {
    content: "";
    display: block;
    width: 64px;
    height: 4px;
    margin-top: 14px;
    border-radius: 4px;
    background: var(--gradient);
}
.section__subtitle {
    color: var(--text-muted);
    font-size: 1.05rem;
    margin-bottom: 44px;
}

/* ---------- Обо мне ---------- */
.about {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 48px;
    margin-top: 44px;
    align-items: start;
}
.about__text p { color: var(--text-muted); }
.about__text strong { color: var(--text); }

.checklist { margin: 0 0 1.2em; }
.checklist li {
    position: relative;
    padding-left: 32px;
    margin-bottom: 12px;
    color: var(--text-muted);
}
.checklist li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0;
    display: grid;
    place-items: center;
    width: 20px;
    height: 20px;
    margin-top: 4px;
    font-size: 0.72rem;
    font-weight: 700;
    color: #fff;
    background: var(--gradient);
    border-radius: 50%;
}

.about__cards { display: grid; gap: 18px; }

.mini-card {
    padding: 22px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition), box-shadow var(--transition);
}
.mini-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.mini-card__icon { font-size: 1.6rem; }
.mini-card h3 { font-size: 1.05rem; margin: 10px 0 6px; }
.mini-card p { margin: 0; font-size: 0.92rem; color: var(--text-muted); }

/* ---------- Услуги ---------- */
.services {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.card {
    position: relative;
    padding: 32px 28px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 4px;
    background: var(--gradient);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition);
}
.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-md);
    border-color: transparent;
}
.card:hover::before { transform: scaleX(1); }

.card__icon { font-size: 2.1rem; display: block; margin-bottom: 16px; }
.card h3 { font-size: 1.15rem; margin-bottom: 10px; }
.card p { margin: 0; color: var(--text-muted); font-size: 0.94rem; }

/* ---------- Кейсы ---------- */
.cases { display: grid; gap: 28px; margin-top: 44px; }

.case {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: box-shadow var(--transition), transform var(--transition);
}
.case:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); }

.case__header {
    padding: 28px 32px;
    background: var(--gradient);
    color: #fff;
}
.case__header h3 { margin: 0; font-size: 1.4rem; color: #fff; }
.case__tag {
    display: inline-block;
    padding: 4px 12px;
    margin-bottom: 12px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50px;
}

.case__body { padding: 32px; display: grid; gap: 22px; }
.case__row h4 {
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--grad-to);
    margin-bottom: 8px;
}
.case__row p { margin: 0; color: var(--text-muted); }
.case__row--result {
    padding: 20px;
    background: var(--accent-soft);
    border-left: 4px solid var(--accent);
    border-radius: var(--radius-sm);
}
.case__row--result p { color: var(--text); }

/* ---------- Контакты ---------- */
.contacts { text-align: center; }
.contacts .section__title::after { margin-left: auto; margin-right: auto; }
.contacts__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    margin: 8px 0 28px;
}
.contacts__links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 28px;
}
.contacts__links a {
    font-weight: 600;
    color: var(--text-muted);
    border-bottom: 2px solid transparent;
    transition: color var(--transition), border-color var(--transition);
}
.contacts__links a:hover { color: var(--grad-to); border-color: var(--grad-to); }

/* ---------- Футер ---------- */
.footer {
    padding: 32px 0;
    text-align: center;
    border-top: 1px solid var(--border);
    background: var(--bg);
}
.footer p { margin: 0; font-size: 0.9rem; color: var(--text-muted); }

/* ---------- Анимация появления при скролле ---------- */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: opacity, transform;
}
.reveal.is-visible { opacity: 1; transform: none; }

/* Уважение к настройкам пользователя */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; transition: none; }
    * { transition-duration: 0.01ms !important; }
}

/* ============================================================
   АДАПТИВНОСТЬ (mobile-first подход для контрольных точек)
   ============================================================ */

/* Планшеты */
@media (max-width: 900px) {
    .about { grid-template-columns: 1fr; gap: 32px; }
}

/* Мобильные */
@media (max-width: 720px) {
    .header { position: fixed; }

    .nav__burger { display: flex; }

    .nav__menu {
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        padding: 16px 20px 28px;
        background: rgba(255, 255, 255, 0.97);
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow-md);
        transform: translateY(-140%);
        opacity: 0;
        pointer-events: none;
        transition: transform var(--transition), opacity var(--transition);
    }
    .nav__menu.is-open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }
    .nav__link {
        display: block;
        padding: 12px 4px;
        font-size: 1.05rem;
        border-bottom: 1px solid var(--border);
    }
    .nav__link::after { display: none; }

    .hero { padding: 128px 0 72px; }
    .hero__actions { gap: 12px; }
    .hero__actions .btn { flex: 1 1 100%; }
    .hero__stats { gap: 28px; }

    .section { padding: 68px 0; }

    .case__header, .case__body { padding: 24px 20px; }
    .card { padding: 26px 22px; }
}

/* Очень маленькие экраны (320px+) */
@media (max-width: 380px) {
    .container { padding: 0 16px; }
    .hero__title { letter-spacing: -0.5px; }
    .hero__stats { gap: 20px; }
    .btn { padding: 13px 20px; font-size: 0.94rem; }
}
