:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #0f172a;
    --accent: #06b6d4;
    --light: #f8fafc;
    --gray: #64748b;
    --light-gray: #e2e8f0;
    --transition: all 0.3s ease;
    --shadow:
        0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius: 8px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f9fafb;
    color: #334155;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

section {
    padding: 80px 0;
}

h1,
h2,
h3,
h4 {
    color: var(--secondary);
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: 3.2rem;
    font-weight: 800;
}

h2 {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

h2::after {
    content: "";
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--accent);
    border-radius: 2px;
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
}

p {
    margin-bottom: 1rem;
    color: var(--gray);
}

.btn {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 12px 28px;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

/* Навигация */
header {
    background-color: white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--secondary);
    text-decoration: none;
}

.logo.bottom {
    color: var(--light);
}

.logo span {
    color: var(--primary);
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--secondary);
    font-weight: 600;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--primary);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--secondary);
    cursor: pointer;
}

/* Герой секция - ОБНОВЛЕНА ДЛЯ ФОТО */
.hero {
    padding-top: 140px;
    padding-bottom: 80px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.hero-text {
    flex: 1;
}

.hero-text h1 {
    margin-bottom: 1.5rem;
}

.hero-text p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    max-width: 600px;
}

.hero-btns {
    display: flex;
    gap: 15px;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Простая градиентная обводка */
.profile-placeholder {
    width: 350px;
    height: 350px;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px; /* Толщина обводки */
    background: linear-gradient(135deg, var(--primary), var(--accent), #8b5cf6);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

/* Внутренний белый круг (создает эффект рамки) */
.profile-placeholder::before {
    content: "";
    position: absolute;
    width: calc(100% - 12px);
    height: calc(100% - 12px);
    border-radius: 50%;
    background: white;
    z-index: 1;
}

/* Контейнер для фото */
.profile-photo {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    z-index: 2;
}

.profile-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 10%;
    transition: transform 0.3s ease;
    transform: scaleX(-1) scale(1.04);
    z-index: 3;
}

.profile-placeholder:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.profile-placeholder:hover img {
    transform: scaleX(-1) scale(1.06);
}

/* Секция навыков */
.skills-section {
    background-color: white;
}

.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.skill-category {
    background: var(--light);
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.skill-category:hover {
    transform: translateY(-5px);
}

.skill-category h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.skill-category h3 i {
    color: var(--primary);
}

.skill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill-tag {
    background: white;
    color: var(--secondary);
    padding: 8px 16px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.9rem;
    border: 1px solid #9b8f8f;
}

.skill-tag.highlight {
    background: var(--primary);
    color: white;
}

/* Секция проектов - ПЕРЕДЕЛАНА */
.projects-section {
    background-color: #f8fafc;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.project-card {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 3px solid transparent;
    /* Градиентная рамка */
    background:
        linear-gradient(white, white) padding-box,
        linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(6, 182, 212, 0.1))
            border-box;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.project-card:hover {
    transform: translateY(-10px);
    border: 3px solid;
    border-image: linear-gradient(135deg, var(--primary), var(--accent)) 1;
    box-shadow:
        0 15px 30px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(37, 99, 235, 0.1);
}

.project-image {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    overflow: hidden;
    position: relative;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .project-image img {
    transform: scale(1.05);
}

/* Бейдж "NEW" */
.project-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 2;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.4);
    }
    70% {
        box-shadow: 0 0 0 6px rgba(37, 99, 235, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0);
    }
}

.project-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.project-content h3 {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.project-content p {
    margin-bottom: 20px;
    font-size: 0.95rem;
    flex-grow: 1;
}

.project-stats {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: var(--gray);
    flex-wrap: wrap;
    gap: 10px;
}

.project-stats span {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Кнопка всегда снизу */
.project-card .btn {
    margin-top: auto;
    align-self: flex-start;
    width: 100%;
    text-align: center;
}

/* Секция опыта */
.experience-section {
    background-color: white;
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::after {
    content: "";
    position: absolute;
    width: 4px;
    background-color: var(--light-gray);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
    box-sizing: border-box;
    margin-bottom: 40px;
}

.timeline-item:nth-child(odd) {
    left: 0;
}

.timeline-item:nth-child(even) {
    left: 50%;
}

.timeline-content {
    padding: 20px;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.timeline-date {
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 10px;
}

.timeline-item::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    background-color: var(--primary);
    border-radius: 50%;
    top: 15px;
    z-index: 1;
}

.timeline-item:nth-child(odd)::after {
    right: -10px;
}

.timeline-item:nth-child(even)::after {
    left: -10px;
}

/* Секция контактов */
.contact-section {
    background: linear-gradient(135deg, var(--secondary) 0%, #1e293b 100%);
    color: white;
}

.contact-section h2 {
    color: white;
}

.contact-section h2::after {
    background: var(--accent);
}

.contact-container {
    display: flex;
    justify-content: space-between;
    gap: 50px;
}

.contact-info {
    flex: 1;
}

.contact-info p {
    color: #cbd5e1;
    margin-bottom: 30px;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-item {
    display: flex;
    /*align-items: center;*/
    gap: 15px;
}

.contact-item i {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.contact-item h4 {
    color: var(--light-gray);
}

.contact-form {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    padding: 30px;
    border-radius: var(--radius);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
    color: white;
    font-size: 1rem;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent);
}

/* Футер */
footer {
    background: #0f172a;
    color: white;
    padding: 40px 0;
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.social-links {
    display: flex;
    gap: 20px;
}

.social-links a {
    color: white;
    font-size: 1.5rem;
    transition: var(--transition);
}

.social-links a:hover {
    color: var(--accent);
}

.copyright {
    color: #94a3b8;
    font-size: 0.9rem;
}

/* Адаптивность - ОБНОВЛЕНА ДЛЯ ФОТО */
@media (max-width: 992px) {
    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 2rem;
    }

    .hero-content {
        flex-direction: column;
        text-align: center;
    }

    .hero-btns {
        justify-content: center;
    }

    .profile-placeholder {
        width: 280px;
        height: 280px;
        margin: 0 auto;
    }

    .timeline::after {
        left: 31px;
    }

    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }

    .timeline-item:nth-child(even) {
        left: 0;
    }

    .timeline-item::after {
        left: 21px;
    }

    .contact-container {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background: white;
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        margin: 10px 0;
    }

    .mobile-menu-btn {
        display: block;
    }

    .profile-placeholder {
        width: 220px;
        height: 220px;
    }

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

    .skills-container {
        grid-template-columns: 1fr;
    }

    .hero-btns {
        flex-direction: column;
        align-items: center;
    }

    .hero-btns .btn {
        width: 100%;
        max-width: 250px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.8rem;
    }

    .profile-placeholder {
        width: 180px;
        height: 180px;
    }

    section {
        padding: 60px 0;
    }

    .project-stats {
        flex-direction: column;
        gap: 5px;
    }
}
