:root {
  /* Основные цвета */
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --secondary: #8b5cf6;
  --accent: #0ea5e9;
  
  /* Темная тема по умолчанию */
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-card: rgba(30, 41, 59, 0.7);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --border-color: rgba(255, 255, 255, 0.1);
  --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  
  /* Общие настройки */
  --transition: all 0.3s ease;
  --border-radius: 12px;
}

/* Светлая тема */
[data-theme="light"] {
  --bg-primary: #f1f5f9;
  --bg-secondary: #e2e8f0;
  --bg-card: rgba(255, 255, 255, 0.8);
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --border-color: rgba(0, 0, 0, 0.1);
  --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.025);
}

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

body {
  background: linear-gradient(135deg, var(--bg-primary), var(--bg-secondary));
  color: var(--text-primary);
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
}

body::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 10% 20%, rgba(37, 99, 235, 0.15) 0%, rgba(37, 99, 235, 0) 20%),
              radial-gradient(circle at 90% 80%, rgba(139, 92, 246, 0.15) 0%, rgba(139, 92, 246, 0) 20%);
  z-index: -1;
}

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

/* Header & Navigation */
header {
  padding: 20px 0;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background: rgba(30, 41, 59, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
}

[data-theme="light"] header {
  background: rgba(241, 245, 249, 0.95);
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
}

.logo i {
  color: var(--primary);
}

.nav-links {
  display: flex;
  gap: 30px;
}

.nav-links a {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  font-size: 1.1rem;
  position: relative;
  padding: 5px 0;
  transition: var(--transition);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: var(--transition);
}

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

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

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

.theme-switcher, .lang-switcher {
  display: flex;
  gap: 10px;
  align-items: center;
}

.theme-btn, .lang-btn {
  background: transparent;
  border: 1px solid var(--text-secondary);
  color: var(--text-primary);
  padding: 5px 15px;
  border-radius: 20px;
  cursor: pointer;
  transition: var(--transition);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.theme-btn:hover, .lang-btn:hover:not(.active) {
  background: rgba(255, 255, 255, 0.1);
}

[data-theme="light"] .theme-btn:hover, 
[data-theme="light"] .lang-btn:hover:not(.active) {
  background: rgba(0, 0, 0, 0.05);
}

.mobile-toggle {
  display: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-primary);
}

/* Hero Section */
.hero {
  padding: 180px 0 100px;
  text-align: center;
  position: relative;
}

.hero h1 {
  font-size: 4rem;
  margin-bottom: 20px;
  line-height: 1.1;
  background: linear-gradient(to right, #60a5fa, #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.3rem;
  max-width: 700px;
  margin: 0 auto 40px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.cta-button {
  display: inline-block;
  background: var(--primary);
  color: white;
  padding: 15px 40px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  transition: var(--transition);
  border: 2px solid var(--primary);
  box-shadow: var(--shadow);
}

.cta-button:hover {
  background: transparent;
  color: var(--primary);
  transform: translateY(-3px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Section Styling */
section {
  padding: 100px 0;
  position: relative;
}

.section-header {
  text-align: center;
  margin-bottom: 70px;
}

.section-header h2 {
  font-size: 2.5rem;
  margin-bottom: 15px;
  position: relative;
  display: inline-block;
}

.section-header h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 70px;
  height: 4px;
  background: var(--primary);
  border-radius: 2px;
}

.section-header p {
  max-width: 700px;
  margin: 20px auto 0;
  color: var(--text-secondary);
  font-size: 1.1rem;
  line-height: 1.7;
}

/* Projects Section */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 30px;
}

.project-card {
  background: var(--bg-card);
  border-radius: var(--border-radius);
  overflow: hidden;
  transition: var(--transition);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(10px);
}

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow);
  border-color: rgba(37, 99, 235, 0.3);
}

.project-img {
  height: 220px;
  background: linear-gradient(45deg, #4f46e5, #7c3aed);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: white;
}

.project-content {
  padding: 25px;
}

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

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

.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.tech {
  background: rgba(37, 99, 235, 0.1);
  color: #60a5fa;
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 0.9rem;
}

/* About Section */
.about-content {
  display: flex;
  gap: 50px;
  align-items: center;
}

.about-text {
  flex: 1;
}

.about-text h3 {
  font-size: 2rem;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.about-text p {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 25px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
  margin-top: 40px;
}

.stat-item {
  text-align: center;
  background: var(--bg-card);
  padding: 25px;
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
}

.stat-item .number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 10px;
}

.about-image {
  flex: 1;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  height: 400px;
  background: linear-gradient(45deg, #2563eb, #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: white;
}

/* Contact Section */
.contact-wrapper {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 50px;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.contact-item {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.contact-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--primary);
}

.contact-details h4 {
  font-size: 1.3rem;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.contact-details p {
  color: var(--text-secondary);
  line-height: 1.6;
}

.contact-form {
  background: var(--bg-card);
  padding: 40px;
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
}

.form-group {
  margin-bottom: 25px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--text-primary);
}

.form-control {
  width: 100%;
  padding: 15px;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 1rem;
  transition: var(--transition);
}

[data-theme="light"] .form-control {
  background: rgba(255, 255, 255, 0.5);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
}

textarea.form-control {
  min-height: 150px;
  resize: vertical;
}

.submit-btn {
  background: var(--primary);
  color: white;
  border: none;
  padding: 15px 40px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1.1rem;
  cursor: pointer;
  transition: var(--transition);
  width: 100%;
}

.submit-btn:hover {
  background: var(--primary-dark);
}

/* Footer */
footer {
  background: rgba(15, 23, 42, 0.9);
  padding: 60px 0 30px;
  border-top: 1px solid var(--border-color);
}

[data-theme="light"] footer {
  background: rgba(241, 245, 249, 0.9);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  margin-bottom: 50px;
}

.footer-col h4 {
  font-size: 1.3rem;
  margin-bottom: 25px;
  position: relative;
  padding-bottom: 10px;
  color: var(--text-primary);
}

.footer-col h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 3px;
  background: var(--primary);
}

.footer-col p {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 20px;
}

.social-links {
  display: flex;
  gap: 15px;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  transition: var(--transition);
}

[data-theme="light"] .social-links a {
  background: rgba(0, 0, 0, 0.05);
}

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

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 15px;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-links a:hover {
  color: var(--primary);
  gap: 15px;
}

.footer-links i {
  font-size: 0.8rem;
}

.copyright {
  text-align: center;
  padding-top: 30px;
  border-top: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 992px) {
  .about-content {
    flex-direction: column;
  }
  
  .contact-wrapper {
    grid-template-columns: 1fr;
  }
  
  .footer-content {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  
  .mobile-toggle {
    display: block;
  }
  
  .hero h1 {
    font-size: 3rem;
  }
  
  .projects-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
  }
  
  .header-controls {
    gap: 10px;
  }
  
  .theme-btn span, .lang-btn {
    display: none;
  }
  
  .theme-btn, .lang-btn {
    padding: 8px 12px;
  }
}