* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", sans-serif;
  display: flex;
  min-height: 100vh;
  background: linear-gradient(135deg, #f5f7fa 0%, #f0f4f8 100%);
  color: #1a1a1a;
  position: relative;
  line-height: 1.6;
}

body.menu-open {
  overflow: hidden;
}

.overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 997;
  transition: opacity 0.3s ease;
}

.overlay.active {
  display: block;
}

header.mobile-header {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  padding: 18px 20px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
  z-index: 1000;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

header.mobile-header h1 {
  font-size: 1.25em;
  color: #1a202c;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.hamburger {
  display: none;
  cursor: pointer;
  position: relative;
  width: 25px;
  height: 25px; /* Высота для 3 линий по 3px + 2 отступа по 5px */
  transition: all 0.3s ease;
}

.hamburger div {
  width: 25px;
  height: 3px;
  background: linear-gradient(90deg, #3B82F6 0%, #2563EB 100%);
  margin: 5px 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: absolute;
  border-radius: 2px;
}

.hamburger div:nth-child(1) {
  top: -3px;
}

.hamburger div:nth-child(2) {
  top: 6px; /* Центр */
}

.hamburger div:nth-child(3) {
  top: 15px; /* Низ */
}

/* Анимация крестика */
.hamburger.open div:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}

.hamburger.open div:nth-child(2) {
  opacity: 0;
}

.hamburger.open div:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

.profile-photo {
  width: 100%;
  border-radius: 16px;
  margin-bottom: 32px;
  object-fit: cover;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.profile-photo:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

aside nav a {
  display: block;
  margin-bottom: 8px;
  text-decoration: none;
  color: #4a5568;
  font-weight: 500;
  font-size: 0.95em;
  padding: 12px 16px;
  border-radius: 10px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border-bottom: none;
  position: relative;
  overflow: hidden;
}

aside nav a::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 3px;
  background: linear-gradient(180deg, #3B82F6 0%, #2563EB 100%);
  transform: scaleY(0);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

aside nav a:hover {
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.08) 0%, rgba(37, 99, 235, 0.05) 100%);
  color: #3B82F6;
  transform: translateX(4px);
}

aside nav a:hover::before {
  transform: scaleY(1);
}

aside nav a.active {
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.12) 0%, rgba(37, 99, 235, 0.08) 100%);
  color: #2563EB;
  font-weight: 600;
}

aside nav a.active::before {
  transform: scaleY(1);
}

a {
  color: #3B82F6;
  text-decoration: none;
  transition: all 0.2s ease;
  border-bottom: 1px solid transparent;
  font-weight: 500;
}

a:hover {
  color: #2563EB;
  border-bottom-color: rgba(37, 99, 235, 0.3);
}

aside {
  width: 300px;
  background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
  padding: 40px 28px;
  border-right: 1px solid rgba(0, 0, 0, 0.06);
  position: fixed;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.03);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 999;
  backdrop-filter: blur(10px);
}

main {
  margin-left: 300px;
  padding: 48px 48px 80px;
  max-width: 920px;
  width: 100%;
}

section {
  position: relative;
  scroll-margin-top: 80px;
  margin-bottom: 32px;
  background: #ffffff;
  padding: 40px;
  border-radius: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(0, 0, 0, 0.03);
  animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

section:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08), 0 4px 8px rgba(0, 0, 0, 0.04);
  border-color: rgba(59, 130, 246, 0.1);
}

section#me {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(37, 99, 235, 0.05) 100%);
  border: 1px solid rgba(59, 130, 246, 0.1);
}

section#me h2 {
  background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 2.4em;
}

section#me h2::after {
  width: 100px;
  height: 5px;
}

section#me p {
  font-size: 1.1em;
  color: #4a5568;
}

section h2 {
  font-size: 2em;
  margin-bottom: 24px;
  color: #1a202c;
  position: relative;
  font-weight: 700;
  letter-spacing: -0.02em;
}

section h3 {
  margin-bottom: 16px;
  margin-top: 24px;
  color: #2d3748;
  position: relative;
  font-weight: 600;
  font-size: 1.3em;
  letter-spacing: -0.01em;
}

section h2::after {
  content: "";
  display: block;
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, #3B82F6 0%, #2563EB 100%);
  margin-top: 12px;
  border-radius: 2px;
}

section p {
  line-height: 1.7;
  font-size: 1.05em;
  margin-bottom: 16px;
  color: #4a5568;
}

section p strong {
  font-weight: 600;
  color: #2d3748;
}

ul {
  margin: 20px 0;
  padding-left: 28px;
  list-style-type: none;
}

ul li {
  margin-bottom: 12px;
  color: #4a5568;
  line-height: 1.7;
  position: relative;
  padding-left: 24px;
}

ul li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: #3B82F6;
  font-weight: bold;
  font-size: 1.1em;
}

hr {
  border: none;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  margin: 0;
  height: 0;
  width: 100%;
  position: relative;
}

hr::after {
  content: '';
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, #3B82F6 50%, transparent 100%);
  border-radius: 1px;
}

footer {
  text-align: center;
  font-size: 0.85em;
  color: #a0aec0;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.cases_button {
  margin: 28px 0 0;
}

.link_cases {
  display: inline-block;
  background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
  color: #ffffff;
  padding: 14px 28px;
  border-radius: 12px;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
}

.link_cases:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
  background: linear-gradient(135deg, #2563EB 0%, #3B82F6 100%);
  color: #ffffff;
  border-bottom: none;
}

.text_italic {
  font-style: italic;
  color: #718096;
  font-size: 0.95em;
}

/* === МОДАЛЬНЫЕ ОКНА === */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.modal.active {
  display: flex;
  animation: fadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-content {
  background-color: #fff;
  padding: 32px;
  border-radius: 20px;
  max-width: 500px;
  width: 100%;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 20px;
  font-size: 1.8rem;
  cursor: pointer;
  color: #718096;
  transition: all 0.2s ease;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}

.modal-close:hover {
  color: #3B82F6;
  background: rgba(59, 130, 246, 0.1);
}

.open-modal-link {
  color: #3B82F6;
  text-decoration: none;
  border-bottom: 1px dotted #3B82F6;
  transition: all 0.2s ease;
  cursor: pointer;
}

.open-modal-link:hover {
  color: #2563EB;
  border-bottom-color: #2563EB;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideIn {
  from { transform: translateY(-20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}


@media (max-width: 768px) {
  html,
  body {
    height: auto;
    overflow-x: hidden;
  }

  body {
    flex-direction: column;
    display: block;
  }

  header.mobile-header {
    display: flex;
  }

  .hamburger {
    display: block;
  }

  aside {
    transform: translateX(100%);
    position: fixed;
    top: 0;
    right: 0;
    left: auto;
    height: 100%;
    width: 280px;
    z-index: 998;
    background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
    padding-top: 80px;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
  }

  aside.active {
    transform: translateX(0);
  }

  main {
    margin-left: 0;
    padding: 80px 20px 40px;
    margin-top: 0;
  }
  
  section {
    padding: 28px 24px;
    border-radius: 16px;
  }
  
  section h2 {
    font-size: 1.7em;
  }
}

/* ===== ДОПОЛНИТЕЛЬНЫЕ УЛУЧШЕНИЯ ===== */

/* Улучшенные карточки опыта работы */
#experience h3 {
  color: #3B82F6;
  font-size: 0.95em;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  margin-top: 32px;
  padding: 8px 16px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(37, 99, 235, 0.05) 100%);
  border-radius: 8px;
  display: inline-block;
}

#experience h3:first-of-type {
  margin-top: 0;
}

#experience > p:first-of-type {
  font-size: 1.15em;
  margin-top: 12px;
  margin-bottom: 4px;
}

/* Улучшенные теги для навыков и инструментов */
.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}

.skill-tag {
  display: inline-block;
  padding: 6px 14px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(37, 99, 235, 0.08) 100%);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 20px;
  font-size: 0.9em;
  color: #2563EB;
  font-weight: 500;
  transition: all 0.2s ease;
}

.skill-tag:hover {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(37, 99, 235, 0.12) 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(59, 130, 246, 0.2);
}

/* Улучшенная секция контактов */
#contacts {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(37, 99, 235, 0.03) 100%);
  border: 2px solid rgba(59, 130, 246, 0.15);
}

#contacts h3 {
  color: #2563EB;
  margin-top: 0;
}

#contacts a {
  display: inline-block;
  margin: 4px 8px 4px 0;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 8px;
  transition: all 0.2s ease;
}

#contacts a:hover {
  background: #3B82F6;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}


/* Улучшенные ссылки в публикациях */
#online-publications a {
  display: inline-flex;
  align-items: center;
  padding: 4px 0;
  transition: all 0.2s ease;
}

#online-publications a:hover {
  padding-left: 8px;
}

/* Улучшенные кейсы */
#cases h3 {
  position: relative;
  padding-left: 16px;
}

#cases h3::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 24px;
  background: linear-gradient(180deg, #3B82F6 0%, #2563EB 100%);
  border-radius: 2px;
}

/* Плавная прокрутка с отступом */
html {
  scroll-padding-top: 100px;
}

/* Улучшенные разделители в кейсах */
#cases hr {
  margin: 40px 0;
  border-top: 2px solid rgba(0, 0, 0, 0.06);
}

#cases hr::after {
  width: 80px;
  height: 3px;
}

/* Эффект свечения для кнопок */
.link_cases {
  position: relative;
  overflow: hidden;
}

.link_cases::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.link_cases:hover::before {
  width: 300px;
  height: 300px;
}

/* Улучшенная типографика для списков */
section ul li {
  transition: all 0.2s ease;
}

/* Декоративный фон для секции "Про меня" */
#about {
  position: relative;
  overflow: hidden;
}

#about::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.05) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

/* Улучшенная секция образования */
#education h3 {
  color: #3B82F6;
  font-size: 0.95em;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  margin-top: 32px;
  padding: 8px 16px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(37, 99, 235, 0.05) 100%);
  border-radius: 8px;
  display: inline-block;
}

#education h3:first-of-type {
  margin-top: 0;
}
