/* Базовые стили и сброс */
:root {
    --primary-color: #3498db;
    --secondary-color: #2c3e50;
    --accent-color: #e74c3c;
    --light-color: #ecf0f1;
    --dark-color: #2c3e50;
    --text-color: #333;
    --text-light: #7f8c8d;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #f9f9f9;
    overflow-x: hidden;
}

/* Типография */
h1, h2, h3, h4 {
    margin-bottom: 1rem;
    color: var(--secondary-color);
    font-weight: 600;
}

h1 {
    font-size: 2.5rem;
    line-height: 1.2;
}

h2 {
    font-size: 2rem;
    position: relative;
    padding-bottom: 0.5rem;
}

h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background-color: var(--primary-color);
}

p {
    margin-bottom: 1rem;
    color: var(--text-light);
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}

a:hover {
    color: var(--accent-color);
}

/* Layout */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

section {
    padding: 4rem 0;
    border-bottom: 1px solid #eee;
}

section:last-child {
    border-bottom: none;
}

/* Header */
header {
    background-color: white;
    box-shadow: var(--shadow);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary-color);
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 2rem;
}

.nav-links a {
    color: var(--secondary-color);
    font-weight: 500;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.hamburger {
    display: none;
    cursor: pointer;
}

/* Hero section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.1) 0%, rgba(231, 76, 60, 0.1) 100%);
    margin-top: 60px;
}

.hero-content {
    display: flex;
    align-items: center;
    gap: 3rem;
}

.hero-text {
    flex: 1;
}

.hero-image {
    flex: 1;
    text-align: center;
}

.hero-image img {
    max-width: 100%;
    border-radius: 50%;
    box-shadow: var(--shadow);
    border: 5px solid white;
}

.job-title {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    display: inline-block;
}

.btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    background-color: var(--primary-color);
    color: white;
    border-radius: 5px;
    font-weight: 500;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    margin-right: 1rem;
    margin-top: 1rem;
}

.btn:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: white;
}

/* About section */
.about {
    background-color: white;
}

/* Experience section */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 2px;
    background-color: var(--primary-color);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -1px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
    opacity: 0;
    transform: translateY(20px);
    transition: var(--transition);
}

.timeline-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.timeline-item:nth-child(odd) {
    left: 0;
}

.timeline-item:nth-child(even) {
    left: 50%;
}

.timeline-content {
    padding: 1.5rem;
    background-color: white;
    border-radius: 5px;
    box-shadow: var(--shadow);
    position: relative;
}

.timeline-content::after {
    content: '';
    position: absolute;
    width: 15px;
    height: 15px;
    background-color: white;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    top: 20px;
}

.timeline-item:nth-child(odd) .timeline-content::after {
    right: -8px;
}

.timeline-item:nth-child(even) .timeline-content::after {
    left: -8px;
}

.timeline-date {
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

/* Education section */
.education {
    background-color: #f5f7fa;
}

.education-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.education-card {
    background-color: white;
    padding: 2rem;
    border-radius: 5px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    opacity: 0;
    transform: translateY(20px);
}

.education-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.education-card:hover {
    transform: translateY(-5px);
}

.education-card h3 {
    color: var(--primary-color);
}

/* Skills section */
.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.skills-category {
    background-color: white;
    padding: 2rem;
    border-radius: 5px;
    box-shadow: var(--shadow);
    opacity: 0;
    transform: translateY(20px);
}

.skills-category.visible {
    opacity: 1;
    transform: translateY(0);
    transition: var(--transition) 0.2s;
}

.skills-list {
    list-style: none;
}

.skills-list li {
    margin-bottom: 0.8rem;
    position: relative;
    padding-left: 1.5rem;
}

.skills-list li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--primary-color);
}

/* Contact section */
.contact {
    background-color: white;
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
    background-color: #f5f7fa;
    padding: 2rem;
    border-radius: 5px;
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: inherit;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

.error {
    color: var(--accent-color);
    font-size: 0.8rem;
    margin-top: 0.3rem;
    display: none;
}

.form-control.error-input {
    border-color: var(--accent-color);
}

.success-message {
    color: #27ae60;
    text-align: center;
    margin-top: 1rem;
    display: none;
}

/* Footer */
footer {
    background-color: var(--secondary-color);
    color: white;
    text-align: center;
    padding: 2rem 0;
}

.social-links {
    display: flex;
    justify-content: center;
    list-style: none;
    margin-bottom: 1rem;
}

.social-links li {
    margin: 0 1rem;
}

.social-links a {
    color: white;
    font-size: 1.5rem;
}

.copyright {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

/* Анимации */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Адаптивность */
@media (max-width: 992px) {
    .hero-content {
        flex-direction: column;
        text-align: center;
    }

    .hero-text {
        order: 2;
    }

    .hero-image {
        order: 1;
        margin-bottom: 2rem;
    }

    .timeline::after {
        left: 31px;
    }

    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }

    .timeline-item:nth-child(even) {
        left: 0;
    }

    .timeline-content::after {
        left: 23px !important;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 60px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 60px);
        background-color: white;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transition: var(--transition);
    }

    .nav-links.active {
        left: 0;
    }

    .nav-links li {
        margin: 1rem 0;
    }

    .hamburger {
        display: block;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    section {
        padding: 3rem 0;
    }
}