:root {
  --bg-dark: #0d0d0d;
  --bg-light: #ffffff;
  --text-dark: #0d0d0d;
  --text-light: #ffffff;
  --accent: #6c5ce7;
  --card-dark: #1a1a1a;
  --card-light: #f5f5f5;
  --border-light: rgba(255, 255, 255, 0.2);
  --border-dark: rgba(0, 0, 0, 0.2);
  --result-bg: #00cec9;
  --result-text: #fff;
  --text-muted: rgba(255, 255, 255, 0.7);
  --text-muted-light: rgba(0, 0, 0, 0.6);
}

[data-theme="dark"] {
  --bg: var(--bg-dark);
  --text: var(--text-light);
  --card: var(--card-dark);
  --border: var(--border-light);
  --text-muted-current: var(--text-muted);
}

[data-theme="light"] {
  --bg: var(--bg-light);
  --text: var(--text-dark);
  --card: var(--card-light);
  --border: var(--border-dark);
  --text-muted-current: var(--text-muted-light);
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Segoe UI', sans-serif;
  margin: 0;
  transition: background 0.3s, color 0.3s;
}

/* Control panel */
.control-panel {
  position: fixed;
  top: 10px;
  left: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 1000;
}

.capsule {
  background: var(--card);
  border-radius: 25px;
  padding: 5px 10px;
  display: flex;
  align-items: center;
}

.theme-btn {
  background: none;
  border: none;
  font-size: 1.2rem;
  color: var(--text);
  cursor: pointer;
}

/* Lang toggle */
.lang-toggle {
  display: flex;
  position: relative;
  cursor: pointer;
  width: 60px;
  height: 25px;
  background: #555;
  border-radius: 15px;
  align-items: center;
  justify-content: space-around;
}

.lang-slider {
  position: absolute;
  width: 28px;
  height: 25px;
  background: var(--accent);
  border-radius: 15px;
  top: 0;
  left: 0;
  transition: transform 0.3s ease;
}

.lang-opt {
  z-index: 2;
  font-size: 0.8rem;
  color: #fff;
}

/* Avatar */
.avatar-wrap {
  width: 150px;
  height: 150px;
  overflow: hidden;
  border-radius: 50%;
  margin: 0 auto;
  margin-top: 50px;
  display: flex;
  align-items: flex-start;
}

.avatar-img {
  width: 100%;
  transform: translateY(-10%);
}

/* Header */
.hero {
  text-align: center;
  padding: 20px 0;
}

.hero-name {
  font-size: 1.8rem;
  margin: 10px 0 5px 0;
}

.hero-role {
  font-size: 1.1rem;
  margin: 0;
  opacity: 0.85;
}

/* Кнопка с градиентом */
.btn {
  background-image: linear-gradient(45deg, #6c5ce7, #00b894);
  color: #fff;
  padding: 8px 15px;
  border-radius: 8px;
  text-decoration: none;
  display: inline-block;
  margin-top: 10px;
  margin-bottom: 10px;
  transition: background 0.3s;
  border: none;
  font-weight: 500;
}

.btn:hover {
  background-image: linear-gradient(45deg, #5a4ad1, #009974);
}

/* Contacts */
.contacts {
  display: flex;
  gap: 15px;
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 14px;
  padding: 12px 18px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  width: fit-content;
  margin: 0 auto;
}

.contacts-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  margin-top: 10px;
}

.contact-icon img {
  width: 28px;
  height: 28px;
  filter: invert(0) brightness(0) contrast(1);
  transition: transform 0.2s ease, filter 0.2s ease;
}

/* Темная тема для иконок */
[data-theme="dark"] .contact-icon img {
  filter: invert(1) brightness(1.2) contrast(1);
}

.contact-icon:hover img {
  transform: scale(1.2);
}

/* Sections */
.container {
  max-width: 900px;
  margin: 30px auto;
  padding: 0 15px;
}

.card {
  background: var(--card);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 25px;
  transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* Skill Grid */
.skill-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.skill-block {
  background: var(--bg);
  border-radius: 8px;
  padding: 12px;
  transition: transform 0.3s, box-shadow 0.3s;
  font-size: 0.95rem;
}

.skill-block:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.skill-badge {
  font-weight: bold;
  margin-bottom: 6px;
  color: var(--accent);
  display: block;
  text-align: center;
}

.skill-block ul {
  margin: 0;
  padding-left: 16px;
  font-size: 0.92rem;
  line-height: 1.5;
}

.skill-block li {
  margin: 4px 0;
  opacity: 0.9;
}

/* Адаптивность: 2 колонки на средних экранах, 1 на маленьких */
@media (max-width: 768px) {
  .skill-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 500px) {
  .skill-grid {
    grid-template-columns: 1fr;
  }
}

/* Job Experience */
.job-card {
  background: var(--bg);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 25px;
  transition: transform 0.3s, box-shadow 0.3s;
}

.job-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

.job-header {
  text-align: center;
  margin-bottom: 15px;
}

.job-company {
  font-size: 1.4rem;
  font-weight: bold;
  color: var(--accent);
  margin: 0 0 5px 0;
}

.job-years {
  font-size: 0.9rem;
  color: var(--text-muted-current);
  margin: 0 0 5px 0;
}

.job-role {
  font-weight: 600;
  margin: 0 0 5px 0;
  color: var(--text);
}

.job-sub {
  font-size: 0.95rem;
  color: var(--text-muted-current);
  margin: 0;
}

.job-divider {
  height: 1px;
  background: var(--border);
  margin: 15px 0;
  opacity: 0.3;
}

.achievements {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.achievement-card {
  background: var(--card);
  border-radius: 10px;
  padding: 14px;
  border: 1px solid var(--border);
  transition: transform 0.2s, box-shadow 0.2s;
}

.achievement-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.achievement-card h4 {
  text-align: center;
  font-size: 1.1rem;
  margin: 0 0 8px 0;
  color: var(--accent);
}

.task-action {
  font-size: 0.95rem;
  margin: 0 0 8px 0;
  line-height: 1.5;
  color: var(--text);
}

.task-result {
  background: var(--result-bg);
  color: var(--result-text);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  display: inline-block;
  margin-top: 4px;
}

/* Footer */
footer {
  text-align: center;
  padding: 15px;
  color: var(--text-muted-current);
  font-size: 0.9rem;
}