@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    font-size: 17px;
    line-height: 1.6;
    color: #f2f2f5;
    background: #0a0a0d;
    overflow-x: hidden;
}

/* ===== Декоративный фон ===== */

.bg-decor {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.28;
}

.blob-1 {
    width: 420px;
    height: 420px;
    top: -120px;
    left: -100px;
    background: #6c5ce7;
    animation: drift1 22s ease-in-out infinite;
}

.blob-2 {
    width: 360px;
    height: 360px;
    top: 40%;
    right: -140px;
    background: #D66F00;
    opacity: 0.16;
    animation: drift2 26s ease-in-out infinite;
}

.blob-3 {
    width: 300px;
    height: 300px;
    bottom: -100px;
    left: 30%;
    background: #6c5ce7;
    opacity: 0.14;
    animation: drift1 30s ease-in-out infinite reverse;
}

@keyframes drift1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(40px, 30px) scale(1.08); }
}

@keyframes drift2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-30px, 20px) scale(1.05); }
}

.site-header, main, .site-footer {
    position: relative;
    z-index: 1;
}

/* ===== Прогресс-бар скролла ===== */

.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, #6c5ce7, #D66F00);
    z-index: 200;
}

/* ===== Плавное появление секций ===== */

[data-reveal] {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-reveal].is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== Градиентный акцент в заголовке ===== */

.grad-text {
    background: linear-gradient(90deg, #6c5ce7, #a78bfa, #D66F00);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: gradShift 6s ease-in-out infinite;
}

@keyframes gradShift {
    0%, 100% { background-position: 0% center; }
    50% { background-position: 100% center; }
}

@media (prefers-reduced-motion: reduce) {
    .blob, .grad-text {
        animation: none !important;
    }
    [data-reveal] {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
    html {
        scroll-behavior: auto;
    }
}

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

ul {
    list-style: none;
}

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

.container {
    max-width: 1000px;
    width: 100%;
    margin: 0 auto;
    padding: 0 24px;
}

h1, h2, h3 {
    font-weight: 600;
    line-height: 1.25;
}

/* ===== Header ===== */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 10, 13, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #1d1d22;
    transition: box-shadow 0.3s ease;
}

.site-header.is-scrolled {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
}

.logo {
    font-weight: 700;
    font-size: 20px;
    letter-spacing: 0.5px;
}

.site-header nav ul {
    display: flex;
    gap: 30px;
}

.site-header nav a {
    position: relative;
    color: #c8c8d0;
    font-size: 15px;
    transition: color 0.2s ease;
}

.site-header nav a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, #6c5ce7, #D66F00);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s ease;
}

.site-header nav a:hover {
    color: #fff;
}

.site-header nav a:hover::after {
    transform: scaleX(1);
}

/* ===== Buttons ===== */

.btn {
    position: relative;
    display: inline-block;
    padding: 14px 28px;
    border-radius: 50px;
    font-weight: 500;
    font-size: 15px;
    transition: all 0.25s ease;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -75%;
    width: 50%;
    height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.35), transparent);
    transform: skewX(-20deg);
    transition: left 0.6s ease;
}

.btn:hover::before {
    left: 125%;
}

.btn-primary {
    background: #6c5ce7;
    color: #fff;
    box-shadow: 0 0 0 rgba(108, 92, 231, 0);
}

.btn-primary:hover {
    background: #5b4bd1;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(108, 92, 231, 0.35);
}

/* ===== Hero ===== */

.hero {
    padding: 130px 0 90px;
    text-align: center;
}

.hero-eyebrow {
    color: #6c5ce7;
    font-weight: 600;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 18px;
}

.hero h1 {
    font-size: 44px;
    max-width: 780px;
    margin: 0 auto 24px;
}

.hero-lead {
    color: #a3a3ad;
    font-size: 18px;
    max-width: 560px;
    margin: 0 auto 36px;
}

/* ===== Sections generic ===== */

section h2 {
    font-size: 30px;
    margin-bottom: 30px;
}

.about, .portfolio, .contacts {
    padding: 80px 0;
    border-top: 1px solid #1d1d22;
}

/* ===== About ===== */

.about-inner {
    display: flex;
    align-items: center;
    gap: 50px;
}

.about-photo {
    flex: 0 0 220px;
    position: relative;
    width: 220px;
    height: 220px;
    border-radius: 28px;
    padding: 4px;
    background: linear-gradient(155deg, #6c5ce7, #D66F00);
}

.about-photo img {
    width: 100%;
    height: 100%;
    border-radius: 24px;
    object-fit: cover;
    background: #111114;
}

.about-content {
    flex: 1;
    min-width: 0;
}

.about-content h2 {
    margin-bottom: 20px;
}

.about p {
    color: #c8c8d0;
    max-width: 680px;
    margin-bottom: 30px;
}

.stack {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.stack li {
    background: #17171c;
    border: 1px solid #26262e;
    color: #d6d6de;
    padding: 9px 18px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
}

/* ===== Portfolio ===== */

.project-card {
    position: relative;
    display: flex;
    align-items: stretch;
    background: #111114;
    border: 1px solid #201f26;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.project-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(115deg, transparent 40%, rgba(255, 255, 255, 0.06) 50%, transparent 60%);
    background-size: 250% 250%;
    background-position: 120% 0;
    transition: background-position 0.7s ease;
    pointer-events: none;
    z-index: 1;
}

.project-card:hover::before {
    background-position: -20% 0;
}

.project-card:hover {
    transform: translateY(-4px);
    border-color: #6c5ce7;
    box-shadow: 0 16px 40px rgba(108, 92, 231, 0.18);
}

.project-preview {
    position: relative;
    z-index: 2;
    flex: 0 0 320px;
}

.project-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-info {
    position: relative;
    z-index: 2;
    padding: 36px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.project-info h3 {
    font-size: 24px;
    margin-bottom: 12px;
}

.project-info p {
    color: #a3a3ad;
    margin-bottom: 20px;
}

.project-link {
    color: #6c5ce7;
    font-weight: 600;
    font-size: 15px;
}

/* ===== Contacts ===== */

.contacts-lead {
    color: #a3a3ad;
    margin-bottom: 36px;
}

.contacts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.contact-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: #111114;
    border: 1px solid #201f26;
    border-radius: 14px;
    padding: 26px;
    transition: all 0.25s ease;
}

.contact-item:hover {
    border-color: #6c5ce7;
    transform: translateY(-3px);
}

.contact-label {
    color: #7a7a85;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.contact-value {
    font-size: 16px;
    font-weight: 500;
    word-break: break-word;
}

/* ===== Footer ===== */

.site-footer {
    padding: 30px 0;
    text-align: center;
    color: #6a6a74;
    font-size: 14px;
}

/* ==========================================================
   Планшеты: 769px - 1024px
   ========================================================== */
@media (min-width: 769px) and (max-width: 1024px) {
    .hero h1 {
        font-size: 38px;
    }
    .project-preview {
        flex: 0 0 260px;
    }
    .contacts-grid {
        gap: 16px;
    }
}

/* ==========================================================
   Мобильные: до 768px
   ========================================================== */
@media (max-width: 768px) {
    .header-inner {
        flex-direction: column;
        gap: 14px;
        padding: 16px 20px;
    }
    .site-header nav ul {
        gap: 18px;
    }

    .hero {
        padding: 60px 0 60px;
    }
    .hero h1 {
        font-size: 30px;
    }
    .hero-lead {
        font-size: 16px;
    }

    section h2 {
        font-size: 24px;
    }
    .about, .portfolio, .contacts {
        padding: 56px 0;
    }
    .about-inner {
        flex-direction: column;
        text-align: center;
        gap: 28px;
    }
    .about-photo {
        width: 160px;
        height: 160px;
        flex-basis: 160px;
    }
    .about p {
        margin-left: auto;
        margin-right: auto;
    }
    .stack {
        justify-content: center;
    }

    .project-card {
        flex-direction: column;
    }
    .project-preview {
        flex: none;
        width: 100%;
        aspect-ratio: 5 / 3;
    }
    .project-info {
        padding: 26px;
    }

    .contacts-grid {
        grid-template-columns: 1fr;
    }
}
