/* По умолчанию (светлая) */
[data-theme="light"] {
    --primary-color: #4b6cb7;
    --primary-dark: #182848;
    --bg-color: #f5f7fa;
    --card-bg: #ffffff;
    --text-color: #333333;
    --text-secondary: #666666;
    --border-color: #eaeaea;
    --hover-bg: #f8f9ff;
    --hobby-bg: #f0f4ff;
    --gradient-start: #4b6cb7;
    --gradient-end: #182848;
}

/* Темная тема */
[data-theme="dark"] {
    --primary-color: #8b5cf6;
    --primary-dark: #5c25bb;
    --bg-color: #0a0a0a;
    --card-bg: #1a1a1a;
    --text-color: #fafafa;
    --text-secondary: #a8a8a8;
    --border-color: #333333;
    --hover-bg: #2a2a2a;
    --hobby-bg: #39338b;
}

/* Основные стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
}

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

/* Шапка */
header {
    display: flex;
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    color: white;
    padding: 40px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.profile-img {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid rgba(255, 255, 255, 0.3);
    margin-right: 40px;
}

.header-info {
    flex: 1;
}

.header-info h1 {
    font-size: 2.8rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.header-info > p {
    font-size: 1.4rem;
    margin-bottom: 20px;
    opacity: 0.9;
    font-weight: 400;
}

/* Контакты */
.contact-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
}

.contact-info ul {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 1;
}

.contact-info li {
    display: flex;
    align-items: center;
    font-size: 1rem;
    padding: 5px 10px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

#contactHasLink:hover {
    background: rgba(255, 255, 255, 0.2);
}

.contact-info i {
    margin-right: 10px;
    font-size: 1.2rem;
    width: 20px;
    text-align: center;
}

.contact-info a {
    color: inherit;
    text-decoration: none;
    font-weight: 500;
}

.contact-info a:hover {
    text-decoration: underline;
}

/* Переключатель темы */
.theme-toggle-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 25px;
    width: 60px;
    height: 30px;
    padding: 2px;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    margin-left: 20px;
    flex-shrink: 0;
}

.theme-toggle-btn:hover {
    border-color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.3);
}

.theme-toggle-btn i {
    display: block;
    width: 22px;
    height: 22px;
    background: white;
    border-radius: 50%;
    position: absolute;
    left: 3px;
    top: 50%;
    transform: translateY(-50%);
    transition: all 0.3s ease;
    font-size: 0;
}

[data-theme="dark"] .theme-toggle-btn i {
    left: calc(100% - 25px);
    background: #8b5cf6;
}

/* Основное содержимое */
main {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

.main-content {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

aside {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

section {
    margin-bottom: 40px;
}

h2 {
    font-size: 1.6rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border-color);
    font-weight: 600;
}

/* О себе */
.main-content > section:first-child p {
    text-align: justify;
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.8;
}

/* Навыки */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.skills-grid li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: var(--hover-bg);
    border-radius: 10px;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

/* .skills-grid li:hover {
    background: var(--card-bg);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
} */

.skills-grid i {
    color: var(--primary-color);
    font-size: 1.3rem;
    width: 24px;
    text-align: center;
}

.skills-grid span {
    font-weight: 500;
    color: var(--text-color);
}

/* Языки */
aside > section:nth-child(2) ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

aside > section:nth-child(2) li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding: 12px 15px;
    background: var(--hover-bg);
    border-radius: 8px;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

aside > section:nth-child(2) li span:first-child {
    font-weight: 500;
    color: var(--text-color);
}

aside > section:nth-child(2) li span:last-child {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Хобби */
.hobbies {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.hobbies li {
    background: var(--hobby-bg);
    color: var(--text-color);
    padding: 10px 18px;
    border-radius: 25px;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

/* .hobbies li:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
} */

/* Образование */
.main-content section:nth-child(2) article {
    margin-bottom: 25px;
    padding: 20px;
    background: var(--hover-bg);
    border-radius: 10px;
    border-left: 4px solid var(--primary-color);
}

.main-content section:nth-child(2) article h3 {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.main-content section:nth-child(2) article p {
    margin-bottom: 8px;
    line-height: 1.6;
}

.main-content section:nth-child(2) article p:first-of-type {
    font-weight: 600;
    color: var(--text-color);
    font-size: 1.1rem;
}

.main-content section:nth-child(2) article p:last-of-type {
    color: var(--text-secondary);
    opacity: 0.9;
}

/* Проекты */
.main-content section:last-child article {
    margin-bottom: 35px;
    padding-bottom: 25px;
    border-bottom: 2px solid var(--border-color);
}

.main-content section:last-child article:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.main-content section:last-child article h3 {
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--primary-color);
    font-size: 1.4rem;
}

.main-content section:last-child article > div {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.7;
}

.main-content section:last-child article > div > p {
    margin-bottom: 12px;
}

.main-content section:last-child article ul {
    margin: 15px 0 20px 20px;
    padding: 0;
}

.main-content section:last-child article li {
    margin-bottom: 8px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.main-content section:last-child article strong {
    color: var(--primary-color);
    font-weight: 600;
}

.main-content section:last-child article > div > div:last-child {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    padding: 10px 20px;
    background: var(--hover-bg);
    border-radius: 8px;
    font-size: 1rem;
}

.main-content section:last-child article > div > div:last-child:hover {
    background: var(--primary-color);
}

.main-content section:last-child article > div > div:last-child:hover a {
    color: white;
}

.main-content section:last-child article > div > div:last-child:hover i {
    color: white;
}

.main-content section:last-child article a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.main-content section:last-child article a:hover {
    text-decoration: underline;
}

.main-content section:last-child article i {
    color: var(--primary-color);
    font-size: 1.2rem;
}

/* Адаптивность */
@media (max-width: 992px) {
    .container {
        padding: 20px;
    }
    
    header {
        padding: 30px;
        flex-direction: column;
        text-align: center;
    }
    
    .profile-img {
        margin: 0 auto 25px;
        width: 140px;
        height: 140px;
    }
    
    .header-info h1 {
        font-size: 2.2rem;
    }
    
    .header-info > p {
        font-size: 1.2rem;
    }
    
    .contact-info {
        flex-direction: column;
        gap: 20px;
    }
    
    .contact-info ul {
        justify-content: center;
    }
    
    .theme-toggle-btn {
        margin-left: 0;
        margin-top: 10px;
    }
}

@media (max-width: 768px) {
    main {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .main-content, aside {
        padding: 25px;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-info ul {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .contact-info li {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 15px;
    }
    
    header {
        padding: 25px 20px;
    }
    
    .main-content, aside {
        padding: 20px;
    }
    
    .header-info h1 {
        font-size: 1.8rem;
    }
    
    .header-info > p {
        font-size: 1.1rem;
    }
    
    h2 {
        font-size: 1.4rem;
    }
}