/* Базовые настройки и переменные */
:root {
    --bg-color: #f4f7f6;
    --text-main: #2b3a42;
    --text-muted: #637381;
    --accent-color: #0056b3;
    --card-bg: #ffffff;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    --transition: all 0.4s ease;
}

body, html {
    margin: 0; padding: 0;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: var(--text-main);
    scroll-behavior: smooth;
    
    /* Создаем эффект затемненных полей по краям экрана */
    background-color: #d1d8e0; /* Базовый темный серо-голубой цвет */
    background-image: linear-gradient(to right, #cbd5e1 0%, #f4f7f6 12%, #f4f7f6 88%, #cbd5e1 100%);
    background-attachment: fixed; /* Поля остаются на месте при прокрутке страницы */
}

/* Навигация и кнопка темы */
header {
    position: fixed; top: 0; width: 100%;
    background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(5px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05); z-index: 1000;
}

nav {
    display: flex; justify-content: center; align-items: center;
    padding: 20px; gap: 30px; flex-wrap: wrap;
}

nav a {
    text-decoration: none; color: var(--text-main);
    font-weight: 500; font-size: 0.95rem; transition: var(--transition);
}

nav a:hover { color: var(--accent-color); }

.theme-btn {
    background: transparent; border: 1px solid var(--accent-color);
    color: var(--accent-color); padding: 6px 16px;
    border-radius: 20px; cursor: pointer; font-weight: 600;
    transition: var(--transition); margin-left: auto;
}
.theme-btn:hover { background: var(--accent-color); color: #fff; }

/* Экраны (Секции) */
section {
    min-height: 100vh; display: flex; align-items: center;
    justify-content: center; padding: 100px 20px 60px; box-sizing: border-box;
}

.container {
    max-width: 1000px; width: 100%; opacity: 0;
    transform: translateY(30px); transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.container.visible { opacity: 1; transform: translateY(0); }

/* Стили первого экрана с фото */
.hero-wrapper { display: flex; align-items: center; gap: 60px; justify-content: space-between; }
.hero-text { flex: 1; text-align: left; }
.hero-text h1 { font-size: 3.5rem; margin-bottom: 10px; color: var(--text-main); }
.hero-text h2 { font-size: 1.5rem; color: var(--accent-color); margin-bottom: 30px; font-weight: 400; }
.hero-text p { font-size: 1.1rem; line-height: 1.8; color: var(--text-muted); margin-bottom: 20px; }

/* Кнопка скачивания резюме */
.hero-actions {
    margin-top: 35px;
}

.hero-btn {
    display: inline-block;
    background-color: var(--accent-color);
    color: #ffffff;
    padding: 14px 28px;
    text-decoration: none;
    border-radius: 30px;
    font-weight: 600;
    font-size: 1.05rem;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(0, 86, 179, 0.2);
}

.hero-btn:hover {
    background-color: #004494;
    color: #ffffff;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 86, 179, 0.3);
}

/* Блок фото */
.hero-photo {
    flex-shrink: 0; width: 300px; height: 300px;
    border-radius: 50%; overflow: hidden;
    background-color: #e2e8f0; display: flex;
    align-items: center; justify-content: center;
    box-shadow: var(--shadow); border: 8px solid var(--card-bg);
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.photo-placeholder { color: var(--text-muted); font-size: 1rem; text-align: center; line-height: 1.5; }

/* Стили карточек кейсов */
.case-header { text-align: center; margin-bottom: 50px; }
.case-header h2 { font-size: 2.5rem; margin: 0 0 10px 0; }
.case-header .positioning { color: var(--accent-color); font-weight: 600; font-size: 1.1rem; }

.card {
    background: var(--card-bg); border-radius: 12px; padding: 40px;
    box-shadow: var(--shadow); display: grid; grid-template-columns: 1fr 1fr; gap: 40px;
}
.card .full-width { grid-column: span 2; }
.card h3 { margin-top: 0; color: var(--text-main); border-bottom: 2px solid var(--bg-color); padding-bottom: 10px; }
.card p, .card ul { color: var(--text-muted); line-height: 1.6; font-size: 1rem; }
.card ul { padding-left: 20px; }

.tech-stack { grid-column: span 2; margin-top: 20px; display: flex; gap: 10px; flex-wrap: wrap; }
.tech-tag { background: var(--bg-color); color: var(--accent-color); padding: 8px 15px; border-radius: 20px; font-size: 0.85rem; font-weight: 600; }


/* Адаптивность */
@media (max-width: 850px) {
    .hero-wrapper { flex-direction: column-reverse; text-align: center; gap: 40px; }
    .hero-text { text-align: center; }
    
    /* Делаем меню компактным и свайпаемым по горизонтали */
    nav { 
        flex-wrap: nowrap; 
        overflow-x: auto; 
        justify-content: flex-start; 
        padding: 10px 15px; 
        gap: 15px;
        -webkit-overflow-scrolling: touch; /* Плавный скролл на iOS */
        -ms-overflow-style: none;  /* Скрытие скроллбара IE/Edge */
        scrollbar-width: none;  /* Скрытие скроллбара Firefox */
    }
    nav::-webkit-scrollbar { display: none; } /* Скрытие скроллбара Chrome/Safari */
    
    nav a { white-space: nowrap; font-size: 0.85rem; }
    
    .theme-btn { 
        margin-left: 0; 
        width: auto; 
        margin-top: 0; 
        white-space: nowrap; 
        padding: 6px 12px; 
        font-size: 0.85rem;
    }
}

/* =========================================
   ПОДВАЛ (FOOTER) И КОНТАКТЫ
   ========================================= */
footer {
    background-color: var(--card-bg);
    padding: 80px 20px 30px;
    text-align: center;
    border-top: 1px solid rgba(0,0,0,0.05);
    margin-top: 40px;
    display: flex;
    justify-content: center;
}

.footer-content h2 {
    font-size: 2.2rem;
    margin-bottom: 15px;
    color: var(--text-main);
}

.footer-content > p {
    color: var(--text-muted);
    margin-bottom: 40px;
    font-size: 1.1rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 60px;
    flex-wrap: wrap;
}

.contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    font-size: 1.05rem;
}

.email-btn {
    background-color: var(--bg-color);
    color: var(--text-main);
    border: 1px solid rgba(0,0,0,0.1);
}

.email-btn:hover {
    background-color: var(--text-main);
    color: #fff;
}

.tg-btn {
    background-color: #0088cc; /* Фирменный цвет Telegram */
    color: #fff;
    border: 1px solid #0088cc;
    box-shadow: 0 4px 15px rgba(0, 136, 204, 0.2);
}

.tg-btn:hover {
    background-color: #0077b3;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 136, 204, 0.4);
}

.footer-bottom {
    border-top: 1px solid rgba(0,0,0,0.05);
    padding-top: 25px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .card { grid-template-columns: 1fr; gap: 30px; padding: 25px; }
    .card .full-width, .tech-stack { grid-column: span 1; }
    .hero-text h1 { font-size: 2.5rem; }
    .case-header h2 { font-size: 2rem; }
    /* Уменьшаем отступы секций на мобильных */
    section { padding: 90px 15px 50px; }
}