/* CSS переменные для светлой темы */
:root {
    --color-main: #2c3e50;
    --color-accent: #3498db;
    --color-light: #ecf0f1;
    --color-dark: #34495e;
    --color-text: #2c3e50;
    --color-white: #ffffff;
    --color-background: #ffffff;
    --color-card: #ffffff;
    --color-border: #e9ecef;
    --shadow: 0 2px 5px rgba(0,0,0,0.1);
    --radius: 8px;
    --space-sm: 10px;
    --space-md: 20px;
    --space-lg: 30px;
}

/* CSS переменные для темной темы */
[data-theme="dark"] {
    --color-main: #1a1a1a;
    --color-accent: #667eea;
    --color-light: #2d3748;
    --color-dark: #4a5568;
    --color-text: #e2e8f0;
    --color-white: #2d3748;
    --color-background: #1a202c;
    --color-card: #2d3748;
    --color-border: #4a5568;
    --shadow: 0 2px 5px rgba(0,0,0,0.3);
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--color-text);
    background: var(--color-background);
    min-height: 100vh;
    transition: all 0.3s ease;
}

/* КОНТЕЙНЕР СТРАНИЦЫ */
.page-container {
    max-width: 1200px;
    margin: 0 auto;
    background: var(--color-background);
    min-height: 100vh;
    box-shadow: 0 0 30px rgba(0,0,0,0.1);
    display: grid;
    grid-template-rows: auto auto 1fr auto;
    grid-template-areas:
        "header"
        "nav"
        "main"
        "footer";
}

/* Переключатель темы */
.theme-switcher {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.theme-toggle {
    background: var(--color-accent);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.theme-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* ШАПКА */
.header {
    background: linear-gradient(135deg, var(--color-main) 0%, var(--color-dark) 100%);
    color: var(--color-white);
    text-align: center;
    padding: var(--space-lg);
    font-size: 28px;
    font-weight: 300;
    letter-spacing: 2px;
    grid-area: header;
}

/* НАВИГАЦИЯ */
.nav {
    background: var(--color-dark);
    padding: 20px 0;
    grid-area: nav;
}

.nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    gap: 25px;
}

.nav-item {
    margin: 0;
}

.nav-link {
    color: var(--color-white);
    text-decoration: none;
    padding: 12px 25px;
    border-radius: 25px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-link:hover {
    background: rgba(255,255,255,0.1);
    transform: translateY(-2px);
}

/* ОСНОВНОЙ КОНТЕНТ */
.content {
    padding: 40px;
    max-width: 900px;
    margin: 0 auto;
    grid-area: main;
}

/* ГЛАВНАЯ СТРАНИЦА */
.profile-header {
    text-align: center;
    margin-bottom: 40px;
}

.profile-title {
    font-size: 32px;
    color: var(--color-text);
    margin-bottom: 10px;
    font-weight: 300;
}

.profile-photo {
    width: 220px;
    height: 280px;
    border-radius: 15px;
    object-fit: cover;
    margin: 20px auto;
    border: 4px solid var(--color-accent);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.profile-name {
    font-size: 24px;
    color: var(--color-text);
    margin: 10px 0;
    font-weight: 500;
}

.profile-group {
    font-size: 18px;
    color: var(--color-dark);
    margin: 5px 0;
}

.about-me {
    background: linear-gradient(135deg, var(--color-light) 0%, var(--color-border) 100%);
    padding: 25px;
    border-radius: 15px;
    margin: 30px 0;
    border-left: 5px solid var(--color-accent);
    font-size: 16px;
    line-height: 1.8;
    color: var(--color-text);
}

/* НАВЫКИ */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.skill-tag {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    padding: 12px 25px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 14px;
    box-shadow: 0 4px 15px rgba(79, 172, 254, 0.3);
    transition: all 0.3s ease;
    text-align: center;
}

.skill-tag:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(79, 172, 254, 0.4);
}

/* ОПЫТ РАБОТЫ */
.experience-section {
    margin-top: 50px;
}

.section-title {
    font-size: 28px;
    color: var(--color-text);
    text-align: center;
    margin-bottom: 30px;
    font-weight: 300;
}

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

.experience-card {
    background: var(--color-card);
    padding: 25px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--color-accent);
    transition: transform 0.3s ease;
    color: var(--color-text);
}

.experience-card:hover {
    transform: translateX(5px);
}

.experience-title {
    font-size: 20px;
    color: var(--color-text);
    margin: 0 0 10px 0;
    font-weight: 600;
}

.experience-desc {
    color: var(--color-dark);
    line-height: 1.6;
    margin: 0;
}

/* НОВОСТИ */
.news-container {
    display: grid;
    gap: 25px;
}

.news-card {
    background: var(--color-card);
    padding: 30px;
    border-radius: 15px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--color-accent);
    color: var(--color-text);
}

.news-title {
    font-size: 24px;
    color: var(--color-text);
    margin: 0 0 10px 0;
    font-weight: 600;
}

.news-meta {
    color: var(--color-dark);
    font-size: 14px;
    margin: 0 0 15px 0;
}

.news-text {
    color: var(--color-text);
    line-height: 1.7;
    margin: 0;
}

/* ТОВАРЫ */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.product-card {
    background: var(--color-card);
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
    color: var(--color-text);
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-image {
    width: 200px;
    height: 250px;
    border-radius: 10px;
    object-fit: cover;
    margin-bottom: 20px;
    border: 3px solid var(--color-border);
}

.product-name {
    font-size: 18px;
    color: var(--color-text);
    margin: 10px 0;
    font-weight: 600;
}

.product-price {
    font-size: 20px;
    color: #e74c3c;
    font-weight: 700;
    margin: 5px 0;
}

/* КОНТАКТЫ */
.contacts-container {
    text-align: center;
}

.contact-info {
    background: linear-gradient(135deg, var(--color-light) 0%, var(--color-border) 100%);
    padding: 25px;
    margin: 20px 0;
    border-radius: 15px;
    font-size: 18px;
    color: var(--color-text);
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.contact-item {
    background: var(--color-card);
    padding: 20px;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.contact-button {
    background: linear-gradient(135deg, var(--color-accent) 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 16px;
    border-radius: 30px;
    cursor: pointer;
    margin-top: 20px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.contact-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

/* ФУТЕР */
.footer {
    background: linear-gradient(135deg, var(--color-main) 0%, var(--color-dark) 100%);
    color: var(--color-white);
    text-align: center;
    padding: 30px;
    margin-top: 50px;
    grid-area: footer;
}

/* АДАПТИВНОСТЬ */
@media (max-width: 768px) {
    .nav-list {
        flex-direction: column;
        gap: 10px;
    }

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

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

    .content {
        padding: 20px;
    }

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

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

    .theme-switcher {
        position: static;
        text-align: center;
        margin-bottom: 20px;
    }
}