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

:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --secondary: #8b5cf6;
  --accent: #06b6d4;
  --dark: #0f172a;
  --dark-light: #1e293b;
  --gray: #64748b;
  --light: #f8fafc;
  --white: #ffffff;
  --bg-main: #0f172a;
  --bg-secondary: #1e293b;
  --text-primary: #f8fafc;
  --text-secondary: #64748b;
  --border-color: rgba(99, 102, 241, 0.2);
  --card-bg: #1e293b;

  --transition-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --transition-duration: 0.3s;
}

/* Обновите переходы везде */
* {
  transition: color var(--transition-duration) var(--transition-smooth),
    background-color var(--transition-duration) var(--transition-smooth),
    border-color var(--transition-duration) var(--transition-smooth),
    transform var(--transition-duration) var(--transition-smooth),
    opacity var(--transition-duration) var(--transition-smooth);
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background 0.3s ease, color 0.3s ease;
}

/* Animated Background */
.bg-animation {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: var(--bg-main);
  transition: background 0.3s ease;
}

.bg-animation::before {
  content: "";
  position: absolute;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle,
    rgba(99, 102, 241, 0.1) 1px,
    transparent 1px
  );
  background-size: 50px 50px;
  animation: moveBackground 20s linear infinite;
  opacity: 1;
}

/* Floating particles */
.particle {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.6;
  animation: float 20s infinite;
}

.particle:nth-child(1) {
  width: 80px;
  height: 80px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.3), transparent);
  top: 20%;
  left: 10%;
  animation-delay: 0s;
}

.particle:nth-child(2) {
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.2), transparent);
  top: 60%;
  right: 15%;
  animation-delay: 5s;
}

.particle:nth-child(3) {
  width: 100px;
  height: 100px;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.25), transparent);
  bottom: 20%;
  left: 20%;
  animation-delay: 10s;
}

@keyframes float {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  25% {
    transform: translate(50px, -50px) scale(1.1);
  }
  50% {
    transform: translate(-30px, 30px) scale(0.9);
  }
  75% {
    transform: translate(40px, 20px) scale(1.05);
  }
}

@keyframes moveBackground {
  0% {
    transform: translate(0, 0);
  }
  100% {
    transform: translate(50px, 50px);
  }
}

/* Navigation */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 1.5rem 5%;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  transition: all 0.3s ease;
  border-bottom: 1px solid var(--border-color);
}

nav.scrolled {
  padding: 1rem 5%;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.8;
  }
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  align-items: center;
}

.nav-links a {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  position: relative;
  transition: color 0.3s ease;
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width 0.3s ease;
}

.nav-links a:hover {
  color: var(--accent);
}

.nav-links a:hover::after {
  width: 100%;
}

/* Language Switcher */
.lang-switcher {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  background: var(--card-bg);
  padding: 0.4rem;
  border-radius: 25px;
  border: 1px solid var(--border-color);
}

.lang-btn {
  padding: 0.4rem 0.8rem;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.lang-btn.active {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
}

.lang-btn:hover:not(.active) {
  color: var(--primary);
}

/* Theme Toggle */
.theme-toggle {
  width: 50px;
  height: 26px;
  background: var(--card-bg);
  border: 2px solid var(--border-color);
  border-radius: 50px;
  position: relative;
  cursor: pointer;
  transition: all 0.3s ease;
}

.theme-toggle:hover {
  border-color: var(--primary);
}

.theme-toggle-slider {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 50%;
  transition: transform 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
}

/* Mobile Menu */
/* ========== ИСПРАВЛЕННОЕ МЕНЮ ========== */
.mobile-menu-btn {
  width: 30px;
  height: 30px;
  position: relative;
  z-index: 1001;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.mobile-menu-btn span {
  position: absolute;
  width: 100%;
  height: 3px;
  background: var(--text-primary);
  border-radius: 3px;
  transition: all 0.3s ease;
}

.mobile-menu-btn span:nth-child(1) {
  top: 20%;
}

.mobile-menu-btn span:nth-child(2) {
  top: 50%;
  transform: translateY(-50%);
}

.mobile-menu-btn span:nth-child(3) {
  bottom: 20%;
}

/* Анимация при открытии */
.mobile-menu-btn.active span:nth-child(1) {
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
  background: var(--primary);
}

.mobile-menu-btn.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
  bottom: 50%;
  transform: translateY(50%) rotate(-45deg);
  background: var(--primary);
}

/* Затемнение фона при открытом меню */
.nav-links::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: -1;
}

.nav-links.active::before {
  opacity: 1;
  visibility: visible;
}

/* Плавная анимация для пунктов меню */
.nav-links li {
  opacity: 0;
  transform: translateX(20px);
  transition: all 0.3s ease;
}

.nav-links.active li {
  opacity: 1;
  transform: translateX(0);
}

.nav-links.active li:nth-child(1) {
  transition-delay: 0.1s;
}
.nav-links.active li:nth-child(2) {
  transition-delay: 0.15s;
}
.nav-links.active li:nth-child(3) {
  transition-delay: 0.2s;
}
.nav-links.active li:nth-child(4) {
  transition-delay: 0.25s;
}
.nav-links.active li:nth-child(5) {
  transition-delay: 0.3s;
}
.nav-links.active li:nth-child(6) {
  transition-delay: 0.35s;
}
.nav-links.active li:nth-child(7) {
  transition-delay: 0.4s;
}
.nav-links.active li:nth-child(8) {
  transition-delay: 0.45s;
}

/* Hero Section - Fixed z-index */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 0 5%;
  position: relative;
  z-index: 1;
}

.hero-content {
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-text {
  position: relative;
  z-index: 2;
}

.hero-text h1 {
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: 800;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--text-primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: fadeInUp 1s ease;
}

.hero-text .subtitle {
  font-size: clamp(1.2rem, 3vw, 2rem);
  color: var(--text-secondary);
  margin-bottom: 2rem;
  animation: fadeInUp 1s ease 0.2s backwards;
}

.hero-text .profession {
  font-size: clamp(1rem, 2vw, 1.3rem);
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 2.5rem;
  animation: fadeInUp 1s ease 0.4s backwards;
  display: inline-block;
  position: relative;
}

.profession::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  animation: expandWidth 1s ease 0.6s backwards;
}

@keyframes expandWidth {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

.cta-buttons {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  animation: fadeInUp 1s ease 0.6s backwards;
}

.btn {
  padding: 1rem 2.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
  z-index: -1;
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn span {
  position: relative;
  z-index: 1;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: var(--white);
  box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(99, 102, 241, 0.4);
}

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

.btn-secondary:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-3px);
}

.btn-download {
  background: linear-gradient(135deg, var(--accent), var(--secondary));
  color: var(--white);
  box-shadow: 0 10px 30px rgba(6, 182, 212, 0.3);
}

.btn-download:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(6, 182, 212, 0.4);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Hero Image */
.hero-image {
  display: flex;
  justify-content: center;
  align-items: center;
  animation: fadeInRight 1s ease 0.4s backwards;
  position: relative;
  z-index: 2;
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.profile-container {
  position: relative;
  width: 400px;
  height: 400px;
}

.profile-image {
  width: 100%;
  height: 100%;
  border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8rem;
  animation: morphing 8s ease-in-out infinite;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(99, 102, 241, 0.4);
}

.profile-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@keyframes morphing {
  0%,
  100% {
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  }
  25% {
    border-radius: 58% 42% 75% 25% / 76% 46% 54% 24%;
  }
  50% {
    border-radius: 50% 50% 33% 67% / 55% 27% 73% 45%;
  }
  75% {
    border-radius: 33% 67% 58% 42% / 63% 68% 32% 37%;
  }
}

.profile-decoration {
  position: absolute;
  border: 3px solid var(--primary);
  border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  animation: rotateDecoration 10s linear infinite;
}

.profile-decoration:nth-child(1) {
  width: 420px;
  height: 420px;
  top: -10px;
  left: -10px;
  opacity: 0.5;
}

.profile-decoration:nth-child(2) {
  width: 440px;
  height: 440px;
  top: -20px;
  left: -20px;
  opacity: 0.3;
  animation-delay: -5s;
}

@keyframes rotateDecoration {
  0%,
  100% {
    transform: rotate(0deg);
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  }
  50% {
    transform: rotate(180deg);
    border-radius: 70% 30% 30% 70% / 70% 70% 30% 30%;
  }
}

/* Section Styles */
section {
  padding: 6rem 5%;
  max-width: 1400px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.section-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  margin-bottom: 3rem;
  text-align: center;
  position: relative;
  color: var(--text-primary);
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 2px;
}

/* About Section */
.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-text {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

.about-text p {
  margin-bottom: 1.5rem;
  animation: fadeIn 0.6s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.stat-card {
  background: var(--card-bg);
  padding: 2rem;
  border-radius: 20px;
  text-align: center;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.1), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.stat-card:hover::before {
  opacity: 1;
  animation: rotate 3s linear infinite;
}

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

.stat-card:hover {
  transform: translateY(-5px) scale(1.02);
  border-color: var(--primary);
  box-shadow: 0 10px 30px rgba(99, 102, 241, 0.2);
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  z-index: 1;
}

.stat-label {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-top: 0.5rem;
  position: relative;
  z-index: 1;
}

/* Skills Section */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.skill-category {
  background: var(--card-bg);
  padding: 2.5rem;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.skill-category::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(99, 102, 241, 0.1),
    transparent
  );
  transition: left 0.5s ease;
}

.skill-category:hover::before {
  left: 100%;
}

.skill-category:hover {
  transform: translateY(-10px);
  border-color: var(--primary);
  box-shadow: 0 15px 40px rgba(99, 102, 241, 0.3);
}

.skill-category h3 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  color: var(--accent);
  position: relative;
  z-index: 1;
}

.skill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  position: relative;
  z-index: 1;
}

.skill-tag {
  background: rgba(99, 102, 241, 0.1);
  color: var(--text-primary);
  padding: 0.5rem 1rem;
  border-radius: 25px;
  font-size: 0.9rem;
  border: 1px solid rgba(99, 102, 241, 0.3);
  transition: all 0.3s ease;
  cursor: pointer;
}

.skill-tag:hover {
  background: var(--primary);
  color: white;
  transform: scale(1.05) translateY(-2px);
  box-shadow: 0 5px 15px rgba(99, 102, 241, 0.4);
}

/* Services Section */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2.5rem;
  margin-top: 3rem;
}

.service-card {
  background: var(--card-bg);
  padding: 2.5rem;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(99, 102, 241, 0.1),
    transparent
  );
  transition: left 0.5s ease;
}

.service-card:hover::before {
  left: 100%;
}

.service-card:hover {
  transform: translateY(-10px);
  border-color: var(--primary);
  box-shadow: 0 15px 40px rgba(99, 102, 241, 0.3);
}

.service-icon {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
  display: inline-block;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.service-card h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
  position: relative;
  z-index: 1;
}

.service-card p {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 1;
}

.service-features {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  position: relative;
  z-index: 1;
}

.feature-tag {
  background: rgba(99, 102, 241, 0.1);
  color: var(--text-primary);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  border: 1px solid rgba(99, 102, 241, 0.3);
  transition: all 0.3s ease;
}

.feature-tag:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(99, 102, 241, 0.4);
}

/* Светлая тема для Services */
[data-theme="light"] .service-card {
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .service-card:hover {
  box-shadow: 0 15px 40px rgba(99, 102, 241, 0.15);
}

[data-theme="light"] .service-card h3 {
  color: #0f172a;
}

[data-theme="light"] .service-card p {
  color: #475569;
}

[data-theme="light"] .feature-tag {
  background: rgba(99, 102, 241, 0.08);
  color: #4f46e5;
  border: 1px solid rgba(99, 102, 241, 0.2);
}

/* Адаптивность */
@media (max-width: 968px) {
  .services-grid {
    grid-template-columns: 1fr;
  }
}

/* Projects Section */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2.5rem;
  margin-top: 3rem;
}

.project-card {
  background: var(--card-bg);
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
}

.project-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(99, 102, 241, 0.1),
    rgba(139, 92, 246, 0.1)
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 0;
}

.project-card:hover::before {
  opacity: 1;
}

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 50px rgba(99, 102, 241, 0.3);
  border-color: var(--primary);
}

.project-image {
  height: 220px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease;
}

.project-image::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.project-card:hover .project-image::after {
  opacity: 1;
}

.project-card:hover .project-image {
  transform: scale(1.1);
}

.project-content {
  padding: 2rem;
  position: relative;
  z-index: 1;
}

.project-content h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.project-content p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.project-tag {
  background: rgba(99, 102, 241, 0.1);
  color: var(--accent);
  padding: 0.3rem 0.8rem;
  border-radius: 15px;
  font-size: 0.85rem;
  border: 1px solid rgba(99, 102, 241, 0.3);
  transition: all 0.3s ease;
}

.project-tag:hover {
  background: var(--primary);
  color: white;
  transform: scale(1.05);
}

.project-links {
  display: flex;
  gap: 1rem;
}

.project-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
}

.project-link:hover {
  color: var(--accent);
  transform: translateX(5px);
}

/* Project Image - для настоящих картинок */
.project-image img {
  width: 96%;
  height: 95%;
  object-fit: cover;
  transition: transform 0.3s ease;
  border-radius: 15px;
}

.project-card:hover .project-image img {
  transform: scale(1.1);
}

/* Иконка "View" при наведении */
.project-image::before {
  content: "👁️";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  font-size: 3rem;
  z-index: 2;
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: none;
}

.project-card:hover .project-image::before {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}

/* Убираем иконку для проектов с эмодзи (без img) */
.project-image:not(:has(img))::before {
  content: none;
}

/* Бейдж "В разработке" */
.dev-badge {
  display: inline-block;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: white;
  padding: 0.3rem 0.8rem;
  border-radius: 15px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1rem;
  animation: pulse-badge 2s ease-in-out infinite;
}

@keyframes pulse-badge {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(245, 158, 11, 0);
  }
}

/* Адаптивность */
/* ========== УЛУЧШЕННАЯ МОБИЛЬНАЯ ВЕРСИЯ ========== */
@media (max-width: 768px) {
  /* Герой секция */
  .hero {
    padding-top: 120px;
    min-height: auto;
  }

  .hero-content {
    gap: 2rem;
  }

  .profile-container {
    width: 250px;
    height: 250px;
    margin: 0 auto;
  }

  .profile-decoration:nth-child(1) {
    width: 270px;
    height: 270px;
  }

  .profile-decoration:nth-child(2) {
    width: 290px;
    height: 290px;
  }

  /* Секции */
  section {
    padding: 3rem 1rem;
  }

  .section-title {
    font-size: 2rem;
    margin-bottom: 2rem;
  }

  /* Навигация */
  .nav-links {
    width: 85%;
    padding: 4rem 1.5rem;
    gap: 1rem;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    display: block;
    padding: 0.8rem;
    border-radius: 8px;
    transition: background 0.3s ease;
  }

  .nav-links a:hover {
    background: rgba(99, 102, 241, 0.1);
  }

  /* Кнопки */
  .cta-buttons {
    gap: 1rem;
  }

  .btn {
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
    width: 100%;
    justify-content: center;
  }

  /* Карточки */
  .services-grid,
  .projects-grid,
  .skills-grid {
    gap: 1.5rem;
  }

  .service-card,
  .project-card,
  .skill-category {
    padding: 1.5rem;
  }

  /* Статистика */
  .about-stats {
    gap: 1rem;
  }

  .stat-card {
    padding: 1.5rem 1rem;
  }

  .stat-number {
    font-size: 2rem;
  }

  /* Контакты */
  .contact-methods {
    gap: 1rem;
  }

  .contact-card {
    padding: 1.5rem;
  }

  /* Footer */
  footer {
    padding: 1.5rem 1rem;
    font-size: 0.9rem;
  }
}

/* Очень маленькие экраны */
@media (max-width: 480px) {
  .hero-text h1 {
    font-size: 2rem;
  }

  .hero-text .subtitle {
    font-size: 1.1rem;
  }

  .logo {
    font-size: 1.2rem;
  }

  .mobile-menu-btn {
    padding: 3px;
  }

  .mobile-menu-btn span {
    width: 20px;
    height: 2px;
  }

  /* Улучшенный переключатель языков на мобильных */
  .lang-switcher {
    padding: 0.3rem;
    gap: 0.2rem;
  }

  .lang-btn {
    padding: 0.3rem 0.6rem;
    font-size: 0.8rem;
    min-width: 45px;
  }

  /* Компактные табы */
  .skill-tag,
  .feature-tag,
  .project-tag {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
  }

  /* Иконки соцсетей меньше */
  .social-link {
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
  }

  /* Кнопка скролла вверх */
  .scroll-top {
    width: 40px;
    height: 40px;
    bottom: 1rem;
    right: 1rem;
    font-size: 0.9rem;
  }
}

/* Горизонтальная ориентация на мобильных */
@media (max-height: 600px) and (orientation: landscape) {
  .hero {
    min-height: auto;
    padding: 100px 5% 4rem;
  }

  .profile-container {
    width: 200px;
    height: 200px;
  }

  .hero-content {
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
  }
}

/* Contact Section */
.contact-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.contact-content > p {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 3rem;
}

.contact-methods {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.contact-card {
  background: var(--card-bg);
  padding: 2rem;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.contact-card::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.1), transparent);
  transform: translate(-50%, -50%);
  transition: width 0.5s ease, height 0.5s ease;
  border-radius: 50%;
}

.contact-card:hover::before {
  width: 300px;
  height: 300px;
}

.contact-card:hover {
  transform: translateY(-5px) rotate(2deg);
  border-color: var(--primary);
  box-shadow: 0 10px 30px rgba(99, 102, 241, 0.2);
}

.contact-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
  display: inline-block;
  animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.contact-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  position: relative;
  z-index: 1;
}

.contact-card a {
  color: var(--accent);
  text-decoration: none;
  word-break: break-all;
  position: relative;
  z-index: 1;
  transition: all 0.3s ease;
}

.contact-card a:hover {
  text-decoration: underline;
  color: var(--primary);
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
}

.social-link {
  width: 50px;
  height: 50px;
  background: var(--card-bg);
  border: 2px solid var(--border-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 1.3rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.social-link::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  transform: translate(-50%, -50%);
  transition: width 0.3s ease, height 0.3s ease;
  border-radius: 50%;
  z-index: -1;
}

.social-link:hover::before {
  width: 100%;
  height: 100%;
}

.social-link:hover {
  color: white;
  border-color: var(--primary);
  transform: translateY(-5px) rotate(360deg);
}

/* Footer */
footer {
  background: var(--card-bg);
  padding: 2rem 5%;
  text-align: center;
  border-top: 1px solid var(--border-color);
  position: relative;
  z-index: 2;
}

footer p {
  color: var(--text-secondary);
}

/* Scroll to Top Button */
.scroll-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 999;
  box-shadow: 0 5px 20px rgba(99, 102, 241, 0.4);
}

.scroll-top.visible {
  opacity: 1;
  visibility: visible;
}

.scroll-top:hover {
  transform: translateY(-5px) scale(1.1);
}

/* Language content visibility */
[data-lang]:not([data-lang="ru"]) {
  display: none;
}
body[data-current-lang="en"] [data-lang="en"] {
  display: block;
}
body[data-current-lang="en"] [data-lang="ru"] {
  display: none;
}
body[data-current-lang="uz"] [data-lang="uz"] {
  display: block;
}
body[data-current-lang="uz"] [data-lang="ru"] {
  display: none;
}

/* Responsive */
@media (max-width: 968px) {
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    height: 100vh;
    width: 70%;
    max-width: 300px;
    background: var(--card-bg);
    flex-direction: column;
    padding: 5rem 2rem;
    gap: 1.5rem;
    transition: right 0.3s ease;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.5);
  }

  .nav-links.active {
    right: 0;
  }

  .mobile-menu-btn {
    display: flex;
    z-index: 1001;
  }

  .mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
  }

  .mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
  }

  .mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .hero-image {
    order: -1;
  }

  .profile-container {
    width: 300px;
    height: 300px;
  }

  .profile-decoration:nth-child(1) {
    width: 320px;
    height: 320px;
  }

  .profile-decoration:nth-child(2) {
    width: 340px;
    height: 340px;
  }

  .about-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

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

  .cta-buttons {
    flex-direction: column;
  }

  .btn {
    text-align: center;
    justify-content: center;
  }
}

@media (max-width: 640px) {
  .about-stats {
    grid-template-columns: 1fr;
  }

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

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

  .lang-switcher {
    gap: 0.3rem;
  }

  .lang-btn {
    padding: 0.3rem 0.6rem;
    font-size: 0.8rem;
  }
}

/* Animations */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ========== ВАШИ СУЩЕСТВУЮЩИЕ СТИЛИ (НЕ ТРОГАЙТЕ) ========== */
[data-theme="light"] {
  --bg-main: #ffffff;
  --bg-secondary: #f8fafc;
  --card-bg: #ffffff;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --border-color: rgba(99, 102, 241, 0.15);
  --dark: #0f172a;
  --dark-light: #ffffff;
}

[data-theme="light"] .bg-animation::before {
  background: radial-gradient(
    circle,
    rgba(99, 102, 241, 0.08) 1px,
    transparent 1px
  );
}

[data-theme="light"] nav {
  background: rgba(255, 255, 255, 0.95);
}

[data-theme="light"] .theme-toggle-slider {
  transform: translateX(24px);
}

/* ========== ДОБАВЬТЕ МОИ СТИЛИ НИЖЕ ========== */

/* ========== УЛУЧШЕННАЯ СВЕТЛАЯ ТЕМА ========== */
[data-theme="light"] .service-card,
[data-theme="light"] .project-card,
[data-theme="light"] .skill-category,
[data-theme="light"] .contact-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] .service-card:hover,
[data-theme="light"] .project-card:hover,
[data-theme="light"] .skill-category:hover,
[data-theme="light"] .contact-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.3);
}

/* Разные фоны для разных секций */
[data-theme="light"] .service-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
}

[data-theme="light"] .skill-category {
  background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%);
}

[data-theme="light"] .contact-card {
  background: linear-gradient(135deg, #ffffff 0%, #f0f9ff 100%);
}

/* Тень для текста в светлой теме */
[data-theme="light"] .hero-text h1 {
  text-shadow: 0 2px 10px rgba(99, 102, 241, 0.2);
}

/* Более насыщенные градиенты */
[data-theme="light"] .stat-number {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  -webkit-background-clip: text;
}

/* Улучшенные кнопки */
[data-theme="light"] .btn-primary {
  box-shadow: 0 10px 30px rgba(99, 102, 241, 0.25);
}

[data-theme="light"] .btn-secondary {
  border-color: rgba(99, 102, 241, 0.3);
  color: #4f46e5;
}

[data-theme="light"] .btn-secondary:hover {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
}

/* ========== ДОПОЛНИТЕЛЬНЫЕ УЛУЧШЕНИЯ ========== */

/* Плавный скролл */
html {
  scroll-behavior: smooth;
}

/* Оптимизация для сенсорных устройств */
@media (hover: none) {
  .btn:hover,
  .skill-tag:hover,
  .project-card:hover {
    transform: none;
  }

  .project-card:active,
  .service-card:active {
    transform: scale(0.98);
  }
}

/* Улучшение читаемости на светлой теме */
[data-theme="light"] .nav-links a,
[data-theme="light"] .hero-text h1,
[data-theme="light"] .section-title {
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Градиентные подложки для секций */
#services {
  position: relative;
}

#services::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--primary),
    var(--accent),
    transparent
  );
  opacity: 0.3;
}

/* Анимация появления */
@keyframes slideInFromLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInFromRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.about-text {
  animation: slideInFromLeft 0.8s ease-out;
}

.about-stats {
  animation: slideInFromRight 0.8s ease-out;
}

/* ========== РАЗНЫЕ СТИЛИ КАРТОЧЕК ========== */

/* About - минималистичные карточки */
.about-stats .stat-card {
  border-radius: 16px;
  border: 2px solid transparent;
  background: linear-gradient(var(--card-bg), var(--card-bg)) padding-box,
    linear-gradient(135deg, var(--primary), transparent) border-box;
}

/* Skills - стеклянный эффект */
.skill-category {
  backdrop-filter: blur(10px);
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(99, 102, 241, 0.2);
}

[data-theme="light"] .skill-category {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(99, 102, 241, 0.1);
}

/* Services - с акцентной рамкой */
.service-card {
  border-left: 4px solid var(--primary);
  border-radius: 16px;
}

/* Projects - с hover эффектом свечения */
.project-card {
  position: relative;
}

.project-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 4px 4px 0 0;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.project-card:hover::after {
  opacity: 1;
}

/* Contact - круглые иконки */
.contact-card .contact-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
}

/* ========== PRODUCTION OPTIMIZATIONS ========== */

/* Улучшение производительности */
* {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* GPU acceleration для анимаций */
.project-card,
.service-card,
.skill-category,
.stat-card,
.contact-card {
  will-change: transform;
  transform: translateZ(0);
}

/* Lazy loading для изображений */
img[loading="lazy"] {
  opacity: 0;
  transition: opacity 0.3s;
}

img[loading="lazy"].loaded {
  opacity: 1;
}

/* Accessibility improvements */
:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}

/* Reduce motion для пользователей с настройками */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ========== УЛУЧШЕННЫЙ OVERLAY ДЛЯ МОБИЛЬНОГО МЕНЮ ========== */

/* Затемнение фона при открытом меню */
.nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 999;
  backdrop-filter: blur(2px);
}

.nav-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Мобильное меню */
@media (max-width: 968px) {
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    height: 100vh;
    width: 70%;
    max-width: 300px;
    background: var(--card-bg);
    flex-direction: column;
    padding: 5rem 2rem;
    gap: 1.5rem;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.5);
    z-index: 1000;
  }

  .nav-links.active {
    right: 0;
  }
}
