:root {
    /* Светлая тема (по умолчанию) */
    --primary-color: #3a86ff;
    --secondary-color: #8338ec;
    --accent-color: #ff006e;
    --dark-color: #212529;
    --light-color: #f8f9fa;
    --bg-color: #f5f7fa;
    --card-bg: #ffffff;
    --text-color: #333333;
    --text-secondary: #6c757d;
    --border-color: rgba(0, 0, 0, 0.1);
    --card-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    --success-color: #28a745;
    --code-bg: #f1f1f1;
    --link-color: #3a86ff;
    --header-bg: rgba(255, 255, 255, 0.9);
    --primary-color-rgb: 58, 134, 255;
    --secondary-color-rgb: 131, 56, 236;
    --code-color: #333;
    --footer-bg: #f1f3f5;
}

[data-theme="dark"] {
    /* Темная тема */
    --primary-color: #4f8bff;
    --secondary-color: #9b5de5;
    --accent-color: #ff458b;
    --dark-color: #f8f9fa;
    --light-color: #212529;
    --bg-color: #121212;
    --card-bg: #1e1e1e;
    --text-color: #e0e0e0;
    --text-secondary: #a0a0a0;
    --border-color: rgba(255, 255, 255, 0.1);
    --card-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    --success-color: #28a745;
    --code-bg: #2d2d2d;
    --link-color: #5f9fff;
    --header-bg: rgba(30, 30, 30, 0.9);
    --primary-color-rgb: 79, 139, 255;
    --secondary-color-rgb: 155, 93, 229;
    --code-color: #e0e0e0;
    --footer-bg: #1a1a1a;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    transition: background-color 0.3s, color 0.3s, border-color 0.3s, box-shadow 0.3s;
}

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

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

header {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: var(--header-bg);
    backdrop-filter: blur(5px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 15px 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
}

.logo-container {
    width: 80px;
    height: 80px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-circle {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    position: relative;
    overflow: hidden;
    background: var(--card-bg);
    box-shadow: 
        8px 8px 16px rgba(0, 0, 0, 0.1),
        -8px -8px 16px rgba(255, 255, 255, 0.1);
}

.logo-gradient {
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        rgba(var(--primary-color-rgb), 0.2) 0%,
        rgba(var(--secondary-color-rgb), 0.2) 100%);
    animation: gradientRotate 8s linear infinite;
}

.logo-center {
    position: absolute;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.logo-symbol {
    width: 100%;
    height: 100%;
}

.logo-path {
    fill: none;
    stroke: var(--primary-color);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    animation: drawPath 2s ease forwards;
}

.logo-particles {
    position: absolute;
    width: 100%;
    height: 100%;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 50%;
    opacity: 0;
}

.particle:nth-child(1) {
    top: 20%;
    left: 20%;
    animation: particleFloat 3s ease-in-out infinite;
}

.particle:nth-child(2) {
    top: 20%;
    right: 20%;
    animation: particleFloat 3s ease-in-out infinite 0.5s;
}

.particle:nth-child(3) {
    bottom: 20%;
    left: 20%;
    animation: particleFloat 3s ease-in-out infinite 1s;
}

.particle:nth-child(4) {
    bottom: 20%;
    right: 20%;
    animation: particleFloat 3s ease-in-out infinite 1.5s;
}

.logo-connections {
    position: absolute;
    width: 100%;
    height: 100%;
}

.logo-connection {
    position: absolute;
    background: var(--primary-color);
    height: 2px;
    width: 20px;
    opacity: 0.3;
    animation: connectionPulse 2s ease-in-out infinite;
}

.logo-connection:nth-child(1) {
    top: 50%;
    left: 30%;
    transform: rotate(45deg);
    animation-delay: 0s;
}

.logo-connection:nth-child(2) {
    top: 50%;
    right: 30%;
    transform: rotate(-45deg);
    animation-delay: 0.5s;
}

.logo-connection:nth-child(3) {
    top: 30%;
    left: 50%;
    transform: rotate(90deg);
    animation-delay: 1s;
}

.logo-connection:nth-child(4) {
    bottom: 30%;
    left: 50%;
    transform: rotate(90deg);
    animation-delay: 1.5s;
}

@keyframes gradientRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes drawPath {
    to { stroke-dashoffset: 0; }
}

@keyframes particleFloat {
    0%, 100% { 
        transform: translate(0, 0);
        opacity: 0;
    }
    50% { 
        transform: translate(5px, -5px);
        opacity: 0.8;
    }
}

@keyframes connectionPulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.8; }
}

.controls {
    display: flex;
    gap: 20px;
    align-items: center;
}

.language-toggle, .theme-toggle {
    display: flex;
    gap: 10px;
    align-items: center;
    background: var(--card-bg);
    padding: 8px;
    border-radius: 20px;
    box-shadow: 
        4px 4px 8px rgba(0, 0, 0, 0.1),
        -4px -4px 8px rgba(255, 255, 255, 0.1);
}

.lang-btn, .theme-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    position: relative;
}

.lang-btn i {
    font-size: 14px;
    color: var(--primary-color);
}

.lang-btn span {
    font-weight: 600;
    font-size: 14px;
}

.theme-btn {
    width: 36px;
    height: 36px;
    justify-content: center;
    font-size: 16px;
}

.lang-btn:hover, .theme-btn:hover {
    background: rgba(var(--primary-color-rgb), 0.1);
    color: var(--primary-color);
    transform: translateY(-2px);
}

.lang-btn.active, .theme-btn.active {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 8px rgba(var(--primary-color-rgb), 0.3);
}

.lang-btn.active i {
    color: white;
}

/* Стили для всплывающих подсказок */
[title] {
    position: relative;
}

[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 6px 12px;
    background: var(--card-bg);
    color: var(--text-color);
    font-size: 12px;
    border-radius: 8px;
    white-space: nowrap;
    box-shadow: 
        2px 2px 4px rgba(0, 0, 0, 0.1),
        -2px -2px 4px rgba(255, 255, 255, 0.1);
    z-index: 1000;
    animation: tooltipFade 0.3s ease;
}

@keyframes tooltipFade {
    from { opacity: 0; transform: translate(-50%, 10px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin: 50px 0;
    position: relative;
    overflow: hidden;
    padding: 0 20px;
}

.hero::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 150%;
    height: 500px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    opacity: 0.05;
    transform: translate(-50%, -50%) rotate(-5deg);
    border-radius: 50%;
    z-index: -1;
}

.avatar {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid var(--card-bg);
    box-shadow: var(--card-shadow);
    margin-bottom: 30px;
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(var(--primary-color-rgb), 0.3);
}

.avatar::after {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    z-index: -1;
    opacity: 0.5;
    animation: pulse 3s infinite;
    filter: blur(10px);
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.3;
    }
    100% {
        transform: scale(1);
        opacity: 0.5;
    }
}

h1 {
    font-size: 2.8rem;
    margin-bottom: 15px;
    color: var(--text-color);
    position: relative;
    display: inline-block;
}

h1::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    border-radius: 3px;
}

.title {
    font-size: 1.4rem;
    color: var(--text-secondary);
    margin-bottom: 25px;
    font-weight: 500;
}

.location {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--text-secondary);
    margin-bottom: 35px;
    font-size: 1.1rem;
}

.location i {
    color: var(--accent-color);
}

.contact-buttons {
    display: flex;
    gap: 15px;
    margin: 20px 0;
    flex-wrap: wrap;
    justify-content: center;
}

.btn {
    padding: 12px 24px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-size: 14px;
    box-shadow: 
        4px 4px 8px rgba(0, 0, 0, 0.1),
        -4px -4px 8px rgba(255, 255, 255, 0.1);
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 
        6px 6px 12px rgba(0, 0, 0, 0.15),
        -6px -6px 12px rgba(255, 255, 255, 0.15);
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-success:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 
        6px 6px 12px rgba(0, 0, 0, 0.15),
        -6px -6px 12px rgba(255, 255, 255, 0.15);
}

.btn i {
    font-size: 16px;
}

.section {
    background-color: var(--card-bg);
    border-radius: 15px;
    padding: 40px;
    margin-bottom: 40px;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    overflow: hidden;
}

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

.section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: linear-gradient(to bottom, var(--primary-color), var(--secondary-color));
    border-radius: 10px 0 0 10px;
}

.section-title {
    font-size: 1.7rem;
    margin-bottom: 25px;
    color: var(--text-color);
    position: relative;
    padding-bottom: 15px;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    border-radius: 3px;
}

.about-text {
    margin-bottom: 30px;
    font-size: 1.1rem;
    color: var(--text-color);
    line-height: 1.8;
}

.skills {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.skill {
    background-color: rgba(var(--primary-color-rgb), 0.1);
    color: var(--primary-color);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.skill:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 5px 10px rgba(var(--primary-color-rgb), 0.3);
}

.experience-item {
    margin-bottom: 35px;
    padding-bottom: 35px;
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

.experience-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.job-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-color);
}

.company {
    font-size: 1.1rem;
    color: var(--primary-color);
    margin-bottom: 8px;
    font-weight: 600;
}

.date-location {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    align-items: center;
    flex-wrap: wrap;
}

.date-location > span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.responsibilities {
    list-style-type: none;
}

.responsibilities li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 12px;
    line-height: 1.7;
}

.responsibilities li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.5rem;
}

footer {
    text-align: center;
    padding: 30px 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
    background-color: var(--footer-bg);
    margin-top: 50px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.social-icons a {
    color: var(--text-secondary);
    font-size: 1.5rem;
    transition: all 0.3s;
}

.social-icons a:hover {
    color: var(--primary-color);
    transform: translateY(-3px);
}

.code-decoration {
    position: absolute;
    opacity: 0;
    font-family: monospace;
    font-size: 0.8rem;
    user-select: none;
    color: transparent;
    z-index: 0;
    pointer-events: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

[data-theme="dark"] .code-decoration {
    opacity: 0;
}

.tech-pattern {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 25px 25px, var(--border-color) 1px, transparent 0),
        radial-gradient(circle at 75px 75px, var(--border-color) 1px, transparent 0);
    background-size: 100px 100px;
    opacity: 0.3;
    z-index: -1;
    pointer-events: none;
}

@media (max-width: 1440px) {
    .container {
        max-width: 90%;
    }
}

@media (max-width: 1200px) {
    .container {
        max-width: 95%;
    }
    
    .section {
        padding: 35px;
    }
}

@media (max-width: 991px) {
    .section {
        padding: 30px;
    }
    
    h1 {
        font-size: 2.4rem;
    }
    
    .title {
        font-size: 1.2rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .job-title {
        font-size: 1.3rem;
    }
    
    .company {
        font-size: 1rem;
    }

    .avatar {
        width: 180px;
        height: 180px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .controls {
        gap: 10px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .avatar {
        width: 160px;
        height: 160px;
    }
    
    .section {
        padding: 25px;
    }
    
    .section-title {
        font-size: 1.4rem;
    }
    
    .contact-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 250px;
        justify-content: center;
    }
    
    .date-location {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .skills {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .header-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .controls {
        width: 100%;
        justify-content: center;
    }
    
    h1 {
        font-size: 1.8rem;
    }

    .avatar {
        width: 140px;
        height: 140px;
    }
    
    .section {
        padding: 20px;
    }
    
    .about-text, .responsibilities li {
        font-size: 1rem;
    }

    .skills {
        gap: 8px;
    }

    .skill {
        font-size: 0.9rem;
        padding: 6px 12px;
    }
}

@media (max-width: 360px) {
    h1 {
        font-size: 1.6rem;
    }

    .avatar {
        width: 120px;
        height: 120px;
    }

    .section-title {
        font-size: 1.3rem;
    }

    .job-title {
        font-size: 1.2rem;
    }

    .date-location {
        font-size: 0.9rem;
    }
}

@media (min-height: 1000px) {
    .hero {
        margin: 80px 0;
    }

    .section {
        margin-bottom: 60px;
    }
}

@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        margin: 30px 0;
    }

    .avatar {
        width: 120px;
        height: 120px;
    }

    .section {
        padding: 20px;
        margin-bottom: 20px;
    }
}

@media (hover: none) {
    .avatar:hover {
        transform: none;
    }

    .skill:hover {
        transform: none;
    }

    .btn:hover {
        transform: none;
    }
}

@media (hover: hover) {
    .avatar:hover {
        transform: scale(1.05);
    }

    .skill:hover {
        transform: translateY(-3px);
    }

    .btn:hover {
        transform: translateY(-2px);
    }
}

@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .avatar {
        border-width: 3px;
    }

    .section::before {
        width: 4px;
    }
}

/* Стили для сообщения об ошибке загрузки данных */
.error-message {
    padding: 20px;
    margin: 20px auto; /* Центрируем блок, если возможно */
    border: 1px solid #e74c3c; /* Красная рамка */
    background-color: #fbeae5; /* Бледно-красный фон */
    color: #c0392b; /* Темно-красный текст */
    border-radius: 5px;
    text-align: center;
    max-width: 600px; /* Ограничим ширину для лучшей читаемости */
}

.error-message p {
    margin-bottom: 10px;
}

.error-message p:last-child {
    margin-bottom: 0;
}

.error-message small {
    color: #7f8c8d; /* Серый цвет для деталей ошибки */
    font-size: 0.9em;
    display: block; /* Чтобы занимал всю ширину */
    margin-top: 5px;
    word-wrap: break-word; /* Перенос длинных сообщений об ошибках */
} 