/* ===== Базовые стили ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.7;
    color: #333;
    background-color: #f8f9fa;
    font-size: 18px;
}

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

a {
    color: #667eea;
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: #5568d3;
}

/* ===== Навигация ===== */
nav {
    background: white;
    padding: 15px 0;
    border-bottom: 1px solid #e0e0e0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.nav-logo {
    font-size: 24px;
    font-weight: 700;
    color: #667eea;
}

.nav-menu {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    align-items: center;
}

.nav-menu a {
    color: #555;
    font-size: 16px;
    font-weight: 500;
}

.nav-menu a:hover {
    color: #667eea;
}

/* Гамбургер-кнопка */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 5px;
    background: none;
    border: none;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: #667eea;
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

/* ===== Шапка главной ===== */
.header-content {
    display: flex;
    align-items: center;
    gap: 50px;
    flex-wrap: wrap;
}

.photo-placeholder {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    text-align: center;
    flex-shrink: 0;
    overflow: hidden;
}

.photo-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.header-text h1 {
    font-size: 3rem;
    color: #1a1a2e;
    margin-bottom: 12px;
    line-height: 1.2;
}

.header-text .title {
    font-size: 1.4rem;
    color: #667eea;
    margin-bottom: 20px;
}

.header-text p {
    color: #555;
    font-size: 18px;
    margin-bottom: 15px;
}

.contacts {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.contact-btn {
    padding: 12px 24px;
    background: #667eea;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 16px;
    transition: background 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.contact-btn:hover {
    background: #5568d3;
}

/* ===== Шапка кейса ===== */
.case-header {
    background: white;
    padding: 60px 0;
    border-bottom: 1px solid #e0e0e0;
}

.case-header h1 {
    font-size: 2.5rem;
    color: #1a1a2e;
    margin-bottom: 15px;
    line-height: 1.2;
}

.case-header .subtitle {
    font-size: 1.3rem;
    color: #667eea;
    margin-bottom: 25px;
}

.case-header p {
    color: #555;
    font-size: 18px;
    max-width: 800px;
}

/* ===== Секции ===== */
section {
    padding: 60px 0;
}

section h2 {
    font-size: 2rem;
    color: #1a1a2e;
    margin-bottom: 30px;
    text-align: center;
}

section h3 {
    font-size: 1.4rem;
    color: #1a1a2e;
    margin: 25px 0 15px 0;
}

/* ===== Услуги (главная) ===== */
.services-section {
    background: white;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.service-item {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 10px;
    border-left: 4px solid #667eea;
}

.service-item h3 {
    color: #1a1a2e;
    margin-bottom: 12px;
    font-size: 1.3rem;
}

.service-item p {
    color: #666;
    font-size: 16px;
}

/* ===== Навыки (главная) ===== */
.skills-section {
    background: #f8f9fa;
}

.skills-compact {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    max-width: 900px;
    margin: 0 auto;
}

.skill-tag {
    background: white;
    color: #3f51b5;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 16px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.08);
}

/* ===== Проекты (главная) ===== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 35px;
}

.project-card {
    background: white;
    border-radius: 12px;
    padding: 35px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.project-card h3 {
    color: #1a1a2e;
    margin-bottom: 18px;
    font-size: 1.5rem;
}

.project-card .problem {
    color: #666;
    margin-bottom: 18px;
    font-size: 16px;
}

.project-card .result {
    background: #e8f5e9;
    padding: 18px;
    border-radius: 8px;
    margin-bottom: 25px;
}

.project-card .result strong {
    color: #2e7d32;
    font-size: 16px;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 25px;
}

.project-tag {
    background: #e3f2fd;
    color: #1976d2;
    padding: 6px 14px;
    border-radius: 15px;
    font-size: 14px;
}

.project-link {
    display: inline-block;
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: color 0.3s;
}

.project-link:hover {
    color: #5568d3;
}

/* ===== Карточки (кейсы) ===== */
.card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.08);
    margin-bottom: 25px;
}

.card-warning {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
}

.card-success {
    background: #d4edda;
    border-left: 4px solid #28a745;
}

.card-info {
    background: #e3f2fd;
    border-left: 4px solid #1976d2;
}

/* ===== Таблицы ===== */
.table-responsive {
    overflow-x: auto;
    margin: 20px 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

th, td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
    font-size: 16px;
}

th {
    background: #667eea;
    color: white;
    font-weight: 600;
}

tr:hover {
    background: #f8f9fa;
}

/* ===== Скриншоты ===== */
.screenshot {
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.15);
    margin: 15px 0;
    display: block;
}

.screenshot-limited {
    max-width: 1000px;
    width: 80%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.15);
    margin: 15px auto;
    display: block;
}

.screenshot-caption {
    text-align: center;
    color: #666;
    font-size: 14px;
    margin-top: 8px;
    font-style: italic;
}

/* ===== Теги ===== */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
}

.tag {
    background: #e3f2fd;
    color: #1976d2;
    padding: 6px 14px;
    border-radius: 15px;
    font-size: 14px;
}

/* ===== Кнопки ===== */
.btn {
    display: inline-block;
    padding: 12px 24px;
    background: #667eea;
    color: white;
    border-radius: 6px;
    font-size: 16px;
    transition: background 0.3s;
    margin: 5px 10px 5px 0;
}

.btn:hover {
    background: #5568d3;
    color: white;
}

.btn-secondary {
    background: white;
    color: #667eea;
    border: 1px solid #667eea;
}

.btn-secondary:hover {
    background: #f0f0f0;
}

/* ===== Цитаты ===== */
blockquote {
    background: #f8f9fa;
    border-left: 4px solid #667eea;
    padding: 20px 25px;
    margin: 25px 0;
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: #555;
    font-size: 17px;
}

/* ===== Списки ===== */
ul, ol {
    margin: 15px 0;
    padding-left: 25px;
}

li {
    margin: 8px 0;
}

/* ===== Подвал ===== */
footer {
    background: #1a1a2e;
    color: white;
    padding: 40px 0;
    text-align: center;
}

footer p {
    opacity: 0.9;
    font-size: 16px;
}

footer a {
    color: #667eea;
}

/* ===== Адаптивность ===== */
@media (max-width: 768px) {
    body {
        font-size: 16px;
    }

    .hamburger {
        display: flex;
    }

    .nav-menu {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 15px;
        padding: 20px 0;
        border-top: 1px solid #e0e0e0;
    }

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

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

    .header-text h1 {
        font-size: 2.2rem;
    }

    .contacts {
        justify-content: center;
    }

    .case-header h1 {
        font-size: 2rem;
    }

    .case-header .subtitle {
        font-size: 1.1rem;
    }

    section {
        padding: 40px 0;
    }

    section h2 {
        font-size: 1.6rem;
    }

    .card {
        padding: 20px;
    }

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

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

    th, td {
        padding: 10px;
        font-size: 14px;
    }

    .screenshot-limited {
        width: 100%;
    }
}