:root {
    --bg-color: #ffffff;
    --text-color: #1a1a1a;
    --secondary-text: #555555;
    --accent: #0058ff;
    --accent-light: #e6f0ff;
    --card-bg: #f9fafb;
    --border: #e5e7eb;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

[data-theme="dark"] {
    --bg-color: #111111;
    --text-color: #f0f0f0;
    --secondary-text: #a0a0a0;
    --accent: #3b82f6;
    --accent-light: #1e293b;
    --card-bg: #1a1a1a;
    --border: #333333;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg-color: #111111;
        --text-color: #f0f0f0;
        --secondary-text: #a0a0a0;
        --accent: #3b82f6;
        --accent-light: #1e293b;
        --card-bg: #1a1a1a;
        --border: #333333;
    }
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

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

header {
    padding: 20px 0;
    position: sticky;
    top: 0;
    background: var(--bg-color);
    border-bottom: 1px solid var(--border);
    z-index: 100;
    backdrop-filter: blur(10px);
}

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

.logo {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--text-color);
    text-decoration: none;
}

.logo span {
    color: var(--accent);
}

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

button {
    background: var(--card-bg);
    border: 1px solid var(--border);
    color: var(--text-color);
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

button:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.hero {
    padding: 80px 0 60px;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: -1px;
}

.hero h2 {
    font-size: 1.5rem;
    color: var(--accent);
    font-weight: 500;
    margin-bottom: 20px;
}

.hero p {
    max-width: 700px;
    margin: 0 auto 30px;
    color: var(--secondary-text);
    font-size: 1.1rem;
}

.contacts {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    background: var(--text-color);
    color: var(--bg-color);
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.2s;
}

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

.btn-outline {
    background: transparent;
    border: 2px solid var(--border);
    color: var(--text-color);
}

section {
    padding: 60px 0;
    border-top: 1px solid var(--border);
}

.section-title {
    font-size: 1.8rem;
    margin-bottom: 40px;
    text-align: center;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--accent);
    margin: 10px auto 0;
    border-radius: 2px;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

@media (max-width: 768px) {
    .grid-2 {
        grid-template-columns: 1fr;
    }
    .hero h1 { font-size: 2.2rem; }
    .hero h2 { font-size: 1.2rem; }
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    padding: 24px;
    border-radius: 12px;
    transition: box-shadow 0.3s;
}

.card:hover {
    box-shadow: var(--shadow);
}

.job-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--accent);
}

.company {
    font-weight: 500;
    margin-bottom: 10px;
}

.date {
    font-size: 0.85rem;
    color: var(--secondary-text);
    display: block;
    margin-bottom: 15px;
}

.card ul {
    list-style: none;
}

.card ul li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 8px;
    font-size: 0.95rem;
    color: var(--secondary-text);
}

.card ul li::before {
    content: "•";
    color: var(--accent);
    position: absolute;
    left: 0;
    font-weight: bold;
}

.skills-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.skill-tag {
    background: var(--accent-light);
    color: var(--accent);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid transparent;
    transition: all 0.2s;
}

.skill-tag:hover {
    border-color: var(--accent);
}

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

.project-card {
    border-left: 3px solid var(--accent);
    padding: 20px;
    background: var(--card-bg);
    border-radius: 0 8px 8px 0;
}

.project-card h4 {
    margin-bottom: 8px;
}

.project-card p {
    font-size: 0.9rem;
    color: var(--secondary-text);
}

footer {
    padding: 40px 0;
    text-align: center;
    color: var(--secondary-text);
    font-size: 0.9rem;
    border-top: 1px solid var(--border);
}

/* ===== Language Dropdown Styles ===== */
.lang-dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.arrow {
    font-size: 0.8em;
    transition: transform 0.2s;
}

.lang-dropdown.open .arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    list-style: none;
    padding: 4px 0;
    margin: 0;
    min-width: 80px;
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
    z-index: 1000;
}

.lang-dropdown.open .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    padding: 8px 16px;
    cursor: pointer;
    color: var(--text-color);
    transition: background 0.2s;
    text-align: center;
    font-weight: 500;
}

.dropdown-menu li:hover {
    background: var(--accent-light);
    color: var(--accent);
}

/* Жёсткое управление видимостью dropdown */
.lang-dropdown .dropdown-menu {
    display: none !important;
}
.lang-dropdown.open .dropdown-menu {
    display: block !important;
}

.lang-dropdown .dropdown-menu {
    display: none !important;
}
.lang-dropdown.open .dropdown-menu {
    display: flex !important; /* или block, смотря что нужно */
}

/* Для мобильных устройств увеличиваем область касания */
@media (max-width: 768px) {
    .dropdown-menu li {
        padding: 12px 16px;
    }
}