/* ====== COLOR VARIABLES ====== */
:root {
  --black: #000000;
  --white: #ffffff;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
}

/* ====== СБРОС ====== */
* { margin:0; padding:0; box-sizing:border-box; }

/* УБИРАЕМ ОБВОДКУ ПРИ НАЖАТИИ (FOCUS) ГЛОБАЛЬНО */
*:focus {
  outline: none !important;
}

html {
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  background:
    linear-gradient(135deg,
      rgba(0, 0, 0, 0.7) 0%,
      rgba(0, 0, 0, 0.8) 100%),
    url('../images/background.jpg') center/cover no-repeat fixed;
  background-color: var(--black);
  color: var(--white);
  min-height:100vh;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

/* ====== Navigation (Base) ====== */
.fixed-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 20px 0;
  transition: padding 0.3s ease;
}

.fixed-header.scrolled {
  padding: 10px 0;
}

.header-content {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

.navbar {
  display: flex;
  justify-content: center;
  align-items: center;
}

.nav-list {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-link {
  color: var(--gray-300);
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, color 0.3s ease;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  backface-visibility: hidden;
  transform: translateZ(0);
  will-change: transform;
  -webkit-font-smoothing: subpixel-antialiased;
}

.nav-icon {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.hamburger {
  display: none;
}

/* =========================================
   DESKTOP STYLES (Min-width: 769px)
   ========================================= */
@media (min-width: 769px) {
  .nav-list {
    gap: 8px;
    background: rgba(255, 255, 255, 0.05);
    padding: 8px;
    border-radius: 50px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    flex-wrap: wrap;
    justify-content: center;
  }

  .nav-link {
    padding: 10px 24px;
    border-radius: 24px;
    border: 1px solid transparent;
  }

  .nav-link:active {
    color: var(--white);
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 10px 20px rgba(255, 255, 255, 0.1), 0 5px 10px rgba(0, 0, 0, 0.2);
  }

  @media (hover: hover) {
    .nav-link:hover {
      color: var(--white);
      transform: scale(1.05) translateZ(0);
      background: rgba(255, 255, 255, 0.1);
      border-color: rgba(255, 255, 255, 0.3);
      box-shadow: 0 10px 20px rgba(255, 255, 255, 0.1), 0 5px 10px rgba(0, 0, 0, 0.2);
    }
  }
}

/* =========================================
   MOBILE STYLES (Max-width: 768px)
   ========================================= */
@media (max-width: 768px) {
  .header-content {
    justify-content: flex-end;
    padding: 10px 20px;
    position: relative;
  }

  .hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    z-index: 1001;
    padding: 0;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: visible;
    outline: none !important;
  }

  @media (hover: hover) {
    .hamburger:hover {
      background: rgba(255, 255, 255, 0.1);
      border-color: rgba(255, 255, 255, 0.3);
    }
  }

  .hamburger:active {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
  }

  .hamburger span {
    width: 24px;
    height: 2px;
    background-color: var(--white);
    border-radius: 2px;
    transition: all 0.3s ease;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: block;
  }

  .hamburger span:nth-child(1) { top: 15px; }
  .hamburger span:nth-child(2) { top: 23px; }
  .hamburger span:nth-child(3) { top: 31px; }

  .hamburger.active span:nth-child(1) {
    top: 23px;
    transform: translateX(-50%) rotate(45deg);
  }
  .hamburger.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(-50%) scale(0);
  }
  .hamburger.active span:nth-child(3) {
    top: 23px;
    transform: translateX(-50%) rotate(-45deg);
  }

  .navbar {
    position: absolute;
    top: 100%;
    right: 20px;
    width: max-content;
    min-width: 200px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    padding: 16px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
  }

  .navbar.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .nav-list {
    flex-direction: column;
    gap: 8px;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
  }

  .nav-link {
    width: 100%;
    justify-content: flex-start;
    font-size: 1rem;
    padding: 12px 16px;
    border-radius: 12px;
    background: transparent;
    border: 1px solid transparent;
  }

  .nav-link:active {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.1);
  }

  @media (hover: hover) {
    .nav-link:hover {
      background: rgba(255, 255, 255, 0.1);
      border-color: rgba(255, 255, 255, 0.3);
      box-shadow: 0 4px 15px rgba(255, 255, 255, 0.1);
      transform: scale(1.02);
    }

    .project-button:hover,
    .spotify-link-btn:hover,
    .social-icon:hover {
      transform: translateY(-1px) scale(1.02);
    }
  }

  .nav-icon {
    width: 20px;
    height: 20px;
    margin-right: 12px;
  }
}

/* ====== Общее для секций ====== */
.section {
  width:100%;
  padding: 120px 16px;
  display:flex;
  align-items:center;
  justify-content:center;
  background: transparent;
  min-height: 100vh;
}

.hero-section {
  padding-top: 180px;
  padding-bottom: 120px;
}

.skills-section-large,
.projects-section-large,
.spotify-section-large {
  padding: 140px 16px;
}

/* ====== HERO ====== */
#hero .hero-inner {
  text-align:center;
  max-width:980px;
  width:100%;
  padding: 8px 12px;
}

.hero-avatar-outer {
  display: flex;
  justify-content: center;
  margin-bottom: 3rem;
}

.avatar-container {
  width:240px;
  height:240px;
  border-radius:24px;
  overflow:hidden;
  margin: 0 auto 32px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
  backdrop-filter: blur(10px);
  box-shadow: 0 25px 50px rgba(255, 255, 255, 0.05), 0 10px 30px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transform: translateZ(0);
  border: 2px solid rgba(255, 255, 255, 0.1);
  position: relative;
  transition: all 0.4s ease;
  cursor: pointer;
  backface-visibility: hidden;
  will-change: transform;
}
.avatar-container::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(0, 0, 0, 0.6) 100%);
  z-index: 1;
}

.avatar-container:hover {
  transform: scale(1.08) translateZ(0);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 10px 30px rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
}

.avatar-container:hover .avatar-image {
  transform: scale(1) translateZ(0);
}

.avatar-image {
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
  position: relative;
  z-index: 2;
  transition: transform 0.4s ease;
  backface-visibility: hidden;
  transform: translateZ(0);
}

.hero-title {
  font-size: clamp(3rem, 8vw, 6.5rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, var(--white) 0%, var(--gray-300) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 4px 20px rgba(255, 255, 255, 0.1);
}

.hero-subtitle {
  font-size: clamp(1.2rem, 2vw, 1.4rem);
  color: var(--gray-300);
  margin-bottom: 32px;
  line-height: 1.6;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* ====== Social icons ====== */
.social-icons-container {
  display:flex;
  gap: 24px;
  justify-content:center;
  align-items:center;
  margin-top: 24px;
}

.social-icon {
  width:90px;
  height:90px;
  border-radius:22px;
  display:flex;
  align-items:center;
  justify-content:center;
  text-decoration:none;
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  backface-visibility: hidden;
  transform: translateZ(0);
  will-change: transform;
  -webkit-font-smoothing: subpixel-antialiased;
}

@media (hover: hover) {
  .social-icon:hover {
    transform: scale(1.15) translateZ(0);
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 20px rgba(255, 255, 255, 0.1), 0 5px 10px rgba(0, 0, 0, 0.2);
  }

  .social-icon:hover svg {
    fill: var(--white) !important;
  }
}

.social-icon svg {
  fill: var(--gray-300) !important;
  width: 40px;
  height: 40px;
  display:block;
  position: relative;
  z-index: 2;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
  transition: fill 0.3s ease;
  backface-visibility: hidden;
}

/* ====== Skills Section ====== */
.skills-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.skills-title {
  font-size: 2.5rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 60px;
  background: linear-gradient(135deg, var(--white) 0%, var(--gray-300) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 4px 20px rgba(255, 255, 255, 0.1);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  margin-bottom: 80px;
}

.skill-category {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(0, 0, 0, 0.6) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 24px;
  padding: 0;
  margin: 0;
  box-shadow: 0 25px 50px rgba(255, 255, 255, 0.05), 0 10px 30px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: all 0.4s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
  position: relative;
  backface-visibility: hidden;
  transform: translateZ(0);
  will-change: transform;
}

.skill-category::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.02) 0%, transparent 100%);
  z-index: 1;
}

.skill-category > * { position: relative; z-index: 2; }

@media (hover: hover) {
  .skill-category:hover {
    transform: translateY(-8px) translateZ(0);
    border-color: rgba(255, 255, 255, 0.2);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0%, rgba(0, 0, 0, 0.5) 100%);
    box-shadow: 0 35px 70px rgba(255, 255, 255, 0.08), 0 15px 40px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  }
}

.skill-header {
  padding: 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.2);
}

.skill-category-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
  color: var(--white);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.skill-content { padding: 32px; }

.skill-category-description {
  color: var(--gray-300);
  line-height: 1.6;
  font-size: 1.1rem;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  margin: 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 40px;
}

.stat-item {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(0, 0, 0, 0.6) 100%);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  padding: 30px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);
  will-change: transform;
}

.stat-item::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.02) 0%, transparent 100%);
  z-index: 1;
}

.stat-item > * { position: relative; z-index: 2; }

@media (hover: hover) {
  .stat-item:hover {
    transform: translateY(-5px) translateZ(0);
    border-color: rgba(255, 255, 255, 0.2);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0%, rgba(0, 0, 0, 0.5) 100%);
    box-shadow: 0 20px 40px rgba(255, 255, 255, 0.08), 0 10px 30px rgba(0, 0, 0, 0.4);
  }
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 8px;
  background: linear-gradient(135deg, var(--white) 0%, var(--gray-300) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  color: var(--gray-300);
  font-size: 1rem;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* ====== Projects ====== */
.projects-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.projects-title {
  font-size:2.5rem;
  font-weight:800;
  text-align:center;
  margin-bottom:40px;
  background: linear-gradient(135deg, var(--white) 0%, var(--gray-300) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 4px 20px rgba(255, 255, 255, 0.1);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.project-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(0, 0, 0, 0.8) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 24px;
  padding: 0;
  margin: 0;
  box-shadow: 0 25px 50px rgba(255, 255, 255, 0.05), 0 10px 30px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease, background 0.4s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
  position: relative;
  backface-visibility: hidden;
  transform: translateZ(0);
  will-change: transform;
  display: flex;
  flex-direction: row;
  min-height: 250px;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.02) 0%, transparent 100%);
  z-index: 1;
}

.project-card > * { position: relative; z-index: 2; }

@media (hover: hover) {
  .project-card:hover {
    transform: translateY(-8px) translateZ(0);
    border-color: rgba(255, 255, 255, 0.2);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0%, rgba(0, 0, 0, 0.5) 100%);
    box-shadow: 0 35px 70px rgba(255, 255, 255, 0.08), 0 15px 40px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  }
}

.project-card-image-wrapper {
  width: 40%;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

.project-card-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.project-card:hover .project-card-image {
  transform: scale(1.05);
}

.project-card-content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.project-card-title {
  font-size: 1.5rem; /* Изменено с 1.25rem */
  font-weight: 700;
  margin: 0 0 12px 0;
  color: var(--white);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.project-card-description {
  color: var(--gray-300);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 24px;
  flex-grow: 1;
}

.project-card-button {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background: rgba(255, 255, 255, 0.05);
  color: var(--white);
  padding: 12px 24px;
  border-radius:12px;
  text-decoration:none;
  font-weight:700;
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  border: none;
  outline: none;
  font-size: 1.1rem; /* Изменено с 1rem */
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  backface-visibility: hidden;
  transform: translateZ(0);
  will-change: transform;
  -webkit-font-smoothing: subpixel-antialiased;
  cursor: pointer;
  margin-top: auto;
}

@media (hover: hover) {
  .project-card-button:hover {
    transform: scale(1.1) translateZ(0);
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 10px 20px rgba(255, 255, 255, 0.1), 0 5px 10px rgba(0, 0, 0, 0.2);
  }
}

/* ====== Project Modal ====== */
.project-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  padding: 20px;
}

.project-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.project-modal-content {
  background: linear-gradient(135deg, rgba(25, 25, 25, 0.9) 0%, rgba(10, 10, 10, 0.95) 100%);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
  width: 100%;
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 40px;
  position: relative;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.project-modal-overlay.active .project-modal-content {
  transform: scale(1);
}

.project-modal-close {
  position: sticky;
  top: 0;
  right: 0;
  margin-left: auto;
  margin-bottom: 20px;
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  color: var(--white);
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  z-index: 10000;
}

@media (hover: hover) {
  .project-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
    box-shadow: 0 10px 20px rgba(255, 255, 255, 0.1);
  }
}

.project-modal-close svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.project-modal-header {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 24px;
}

.project-modal-image-wrapper {
  width: 120px;
  height: 120px;
  border-radius: 24px;
  overflow: hidden;
  flex-shrink: 0;
  cursor: pointer;
  transition: transform 0.4s ease;
}

.project-modal-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-modal-title {
  font-size: 2rem; /* Изменено с 1.8rem */
  font-weight: 800;
  color: var(--white);
}

.project-modal-body {
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.project-modal-description {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--gray-300);
  margin-bottom: 24px;
}

.project-modal-info {
  margin-bottom: 24px;
  font-size: 1rem;
  color: var(--gray-400);
}

.project-modal-info p {
  margin-bottom: 8px;
}

.project-modal-technologies h4 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--white);
}

.tech-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 32px;
}

.tech-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  padding: 8px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 1rem;
  font-weight: 500;
}

.tech-item svg {
  width: 24px;
  height: 24px;
}

.project-modal-button {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background: rgba(255, 255, 255, 0.05);
  color: var(--white);
  padding: 16px 32px;
  border-radius:16px;
  text-decoration:none;
  font-weight:700;
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  border: none;
  outline: none;
  font-size: 1.2rem; /* Изменено с 1.1rem */
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  backface-visibility: hidden;
  transform: translateZ(0);
  will-change: transform;
  -webkit-font-smoothing: subpixel-antialiased;
  cursor: pointer;
}

@media (hover: hover) {
  .project-modal-button:hover {
    transform: scale(1.1) translateZ(0);
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 10px 20px rgba(255, 255, 255, 0.1), 0 5px 10px rgba(0, 0, 0, 0.2);
  }
  .project-modal-image-wrapper:hover {
    transform: scale(1.08);
  }
}

/* ====== Footer ====== */
.footer {
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.95) 100%);
  backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 60px 16px 40px;
  position: relative;
  overflow: hidden;
  will-change: transform, opacity;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, transparent 100%);
  z-index: 1;
}

.footer > * { position: relative; z-index: 2; }

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--white);
}

.footer-brand p {
  color: var(--gray-300);
  line-height: 1.6;
  font-size: 1.1rem;
}

.footer-links h4 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--white);
}

.footer-links ul { list-style: none; }
.footer-links li { margin-bottom: 12px; }

.footer-links a {
  color: var(--gray-300);
  text-decoration: none;
  transition: color 0.3s ease;
  font-size: 1.1rem;
}

@media (hover: hover) {
  .footer-links a:hover { color: var(--white); }
  .footer-legal a:hover { color: var(--white); }
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-copyright { color: var(--gray-300); font-size: 1rem; }

.footer-legal { display: flex; gap: 24px; }

.footer-legal a {
  color: var(--gray-300);
  text-decoration: none;
  transition: color 0.3s ease;
  font-size: 1rem;
}

/* ====== Spotify Section ====== */
.spotify-title {
  font-size: 2.5rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 40px;
  background: linear-gradient(135deg, var(--white) 0%, var(--gray-300) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 4px 20px rgba(255, 255, 255, 0.1);
}

.spotify-player-wrapper {
  width: 100%;
  display: flex;
  justify-content: center;
}

.spotify-player {
  width: 100%;
  max-width: 500px;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.6) 100%);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  padding: 40px;
  border-radius: 28px;
  box-shadow: 0 35px 70px rgba(255, 255, 255, 0.05), 0 15px 40px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  margin: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--white);
  position: relative;
  overflow: hidden;
}

.spotify-player::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(0, 0, 0, 0.8) 100%);
  z-index: 1;
}

.spotify-player > * { position: relative; z-index: 2; }

.spotify-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 36px;
}

.spotify-logo-title {
  display: flex;
  align-items: center;
  gap: 16px;
}

.spotify-logo-small {
  width: 36px;
  height: 36px;
  color: var(--gray-300);
  filter: drop-shadow(0 2px 8px rgba(255, 255, 255, 0.2));
}

.spotify-player-title {
  font-size: 1.6rem;
  margin: 0;
  font-weight: 700;
  color: var(--white);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.spotify-playing-indicator {
  color: var(--gray-300);
  font-weight: 700;
  font-size: 1rem;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  gap: 6px;
}

.playing-dot {
  color: var(--gray-300);
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0% { opacity: 0.5; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.2); }
  100% { opacity: 0.5; transform: scale(0.8); }
}

.spotify-content { margin-bottom: 36px; }

.spotify-track-info {
  display: flex;
  gap: 24px;
  align-items: center;
  margin-bottom: 28px;
}

.album-cover-container { flex-shrink: 0; }

.album-cover-image {
  width: 120px;
  height: 120px;
  border-radius: 18px;
  object-fit: cover;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6), 0 6px 20px rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.2);
  transition: all 0.4s ease;
  cursor: pointer;
  backface-visibility: hidden;
  transform: translateZ(0);
  will-change: transform;
}

.album-cover-image:hover {
  transform: scale(1.08) translateZ(0);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 10px 30px rgba(255, 255, 255, 0.2);
}

.track-details { flex: 1; }

.track-name {
  font-weight: 800;
  margin: 0 0 8px 0;
  font-size: 1.5rem;
  color: var(--white);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.artist-name {
  margin: 0;
  color: var(--gray-300);
  font-size: 1.2rem;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.progress-container { margin-top: 24px; }

.progress-time {
  display: flex;
  justify-content: space-between;
  font-size: 0.95rem;
  margin-bottom: 12px;
  color: var(--gray-300);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.progress-bar {
  width: 100%;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  height: 8px;
  overflow: hidden;
  cursor: default;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
  position: relative;
}

.progress-bar-fill {
  width: 40%;
  height: 100%;
  background: linear-gradient(90deg, var(--gray-400), var(--gray-300), var(--gray-400));
  border-radius: 8px;
  transition: width 0.1s ease;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
  position: relative;
  animation: shimmer 2s infinite;
}

.progress-bar-fill::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 16px; height: 16px;
  background: var(--white);
  border-radius: 50%;
  transform: translate(50%, -4px);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

@keyframes shimmer {
  0% { background-position: -200px 0; }
  100% { background-position: 200px 0; }
}

.spotify-controls {
  display: flex;
  gap: 28px;
  justify-content: center;
  align-items: center;
  margin-bottom: 36px;
}

.spotify-control-btn, .spotify-play-btn {
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  border-radius: 50%;
  padding: 16px;
  backface-visibility: hidden;
  transform: translateZ(0);
  will-change: transform;
  -webkit-font-smoothing: subpixel-antialiased;
}

.spotify-control-btn {
  width: 56px;
  height: 56px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--white);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

@media (hover: hover) {
  .spotify-control-btn:hover {
    transform: scale(1.15) translateZ(0);
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.4);
  }
}

.spotify-control-btn:active { transform: scale(1) translateZ(0); }

.spotify-control-btn svg {
  width: 26px;
  height: 26px;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4));
}

.spotify-play-btn {
  width: 80px;
  height: 80px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--white);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

@media (hover: hover) {
  .spotify-play-btn:hover {
    transform: scale(1.15) translateZ(0);
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.6), 0 10px 30px rgba(0, 0, 0, 0.4);
  }
}

.spotify-play-btn:active { transform: scale(1) translateZ(0); }

.spotify-play-btn svg {
  width: 32px;
  height: 32px;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4));
}

.spotify-link-container { text-align: center; }

.spotify-link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  color: var(--white);
  padding: 16px 36px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 700;
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(15px);
  width: auto;
  min-width: 200px;
  font-size: 1.1rem;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  backface-visibility: hidden;
  transform: translateZ(0);
  will-change: transform;
  -webkit-font-smoothing: subpixel-antialiased;
}

@media (hover: hover) {
  .spotify-link-btn:hover {
    transform: scale(1.1) translateZ(0);
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4), 0 8px 20px rgba(0, 0, 0, 0.3);
  }
}

/* ====== Lightbox Modal ====== */
.lightbox-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  z-index: 11000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  padding: 20px;
}

.lightbox-modal.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-image {
  max-width: 90%;
  max-height: 90%;
  border-radius: 16px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
  transform: scale(0.9);
  transition: transform 0.3s ease;
  object-fit: contain;
}

.lightbox-modal.active .lightbox-image {
  transform: scale(1);
}

.lightbox-close {
  position: absolute;
  top: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  color: var(--white);
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  z-index: 10000;
  transition: top 0.3s ease;
}

body.scrolled-mode .lightbox-close {
  top: 20px;
}

@media (hover: hover) {
  .lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
    box-shadow: 0 10px 20px rgba(255, 255, 255, 0.1);
  }
}

.lightbox-close svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 768px) {
  .skills-grid, .stats-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .skill-header, .skill-content {
    padding: 24px;
  }

  .skill-category-title {
    font-size: 1.3rem;
  }

  .stat-item {
    padding: 24px;
  }

  .stat-number {
    font-size: 2.2rem;
  }

  .lightbox-close {
    top: 30px;
    right: 20px;
    width: 48px;
    height: 48px;
  }

  .project-item, .skill-category, .spotify-player {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }
  .projects-grid {
    grid-template-columns: 1fr;
  }
  .project-card {
    flex-direction: column;
  }
  .project-card-image-wrapper {
    width: 100%;
    padding-top: 100%;
  }

  .read-more {
    display: inline-block;
    margin-left: 5px;
    font-weight: 600;
    text-decoration: underline;
    transition: color 0.3s ease;
  }

  .read-more:active {
    color: var(--white) !important;
  }
}

@media (max-width: 480px) {
  .section {
    padding: 60px 16px;
  }

  .hero-section {
    padding-top: 120px;
  }

  .project-item {
    margin: 16px 0;
  }

  .spotify-player {
    padding: 20px;
  }

  .spotify-track-info {
    flex-direction: row;
    text-align: left;
    align-items: center;
    gap: 16px;
  }
}
