:root {
  --primary-blue: #1d4ed8;
  --secondary-blue: #3b82f6;
  --light-blue: #dbeafe;
  --accent-blue: #60a5fa;
  --glass-bg: rgba(255, 255, 255, 0.8);
  --glass-border: rgba(219, 234, 254, 0.6);
  --glass-shadow: 0 10px 30px rgba(59, 130, 246, 0.1);
  --glass-blur: blur(20px);
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-card: #ffffff;
  --gradient-primary: linear-gradient(135deg, var(--secondary-blue) 0%, var(--primary-blue) 100%);
  --gradient-glass: linear-gradient(135deg, 
    rgba(219, 234, 254, 0.6) 0%, 
    rgba(191, 219, 254, 0.4) 100%);
  --gradient-card: linear-gradient(135deg, 
    rgba(255, 255, 255, 0.9) 0%, 
    rgba(248, 250, 252, 0.9) 100%);
}

header {
  background: #ffffff00;
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 999;
  margin-top: 20px;
  margin-bottom: 20px;
}

.header-container {
  max-width: 98%;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  /*background-color: #ffffffb0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.10);*/
  border-radius: 20px;
  /*backdrop-filter: blur(18px);*/
}

/* Логотип + текст с эффектом стекла */
.logo {
  padding: 10px 10px 10px 10px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    inset 0 -1px 0 rgba(0, 0, 0, 0.1);
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
  overflow: hidden;
  --mouse-x: 50%;
  --mouse-y: 50%;
}

/* Эффект стеклянного фона */
.logo::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  -webkit-backdrop-filter: blur(25px) saturate(200%);
  backdrop-filter: blur(25px) saturate(200%);
  background: 
    radial-gradient(
      circle at var(--mouse-x) var(--mouse-y),
      rgba(255, 255, 255, 0.25) 0%,
      rgba(255, 255, 255, 0.1) 30%,
      rgba(255, 255, 255, 0.05) 70%,
      transparent 100%
    ),
    linear-gradient(
      135deg, 
      rgba(255, 255, 255, 0.15) 0%,
      rgba(255, 255, 255, 0.08) 50%,
      rgba(255, 255, 255, 0.12) 100%
    );
  border-radius: 20px;
  z-index: -1;
  transition: all 0.3s ease;
}

/* Эффект преломления света */
.logo::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(
    circle 60px at var(--mouse-x) var(--mouse-y),
    rgba(255, 255, 255, 0.3) 0%,
    rgba(255, 255, 255, 0.15) 30%,
    transparent 70%
  );
  border-radius: 20px;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

/* Ховер эффекты */
.logo:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 12px 40px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    inset 0 -1px 0 rgba(0, 0, 0, 0.1);
}

.logo:hover::before {
  -webkit-backdrop-filter: blur(30px) saturate(220%);
  backdrop-filter: blur(30px) saturate(220%);
  background: 
    radial-gradient(
      circle at var(--mouse-x) var(--mouse-y),
      rgba(255, 255, 255, 0.35) 0%,
      rgba(255, 255, 255, 0.2) 30%,
      rgba(255, 255, 255, 0.1) 70%,
      transparent 100%
    );
}

.logo:hover::after {
  opacity: 1;
}

/* Изображение логотипа */
.logo img {
  height: 30px;
  transition: all 0.3s ease;
  filter: brightness(0.9);
}

.logo:hover img {
  transform: scale(1.05);
  filter: brightness(1);
}

/* Текст логотипа */
.logo span {
  font-size: 1.4em;
  font-weight: 600;
  color: #111;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.logo:hover span {
  color: #000;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* ========================== */
/*       DARK MODE LOGO       */
/* ========================== */

.logo.dark-mode {
  background: hsla(0, 0%, 6%, 0.301);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 20px;
  box-shadow:
    0 14px 42px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.10),
    inset 0 -1px 0 rgba(0, 0, 0, 0.55);
  transition: all 0.35s ease;
  position: relative;
  overflow: hidden;
}

/* Внутренний стеклянный слой */
.logo.dark-mode::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  z-index: -1;

  background:
    radial-gradient(
      circle at var(--mouse-x) var(--mouse-y),
      rgba(120, 180, 255, 0.30) 0%,
      rgba(255, 255, 255, 0.06) 30%,
      rgba(255, 255, 255, 0.02) 60%,
      transparent 100%
    ),
    linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.10) 0%,
      rgba(255, 255, 255, 0.04) 50%,
      rgba(255, 255, 255, 0.08) 100%
    );

  -webkit-backdrop-filter: blur(25px) saturate(200%);
  backdrop-filter: blur(25px) saturate(200%);
  transition: all 0.35s ease;
}

/* Блик — выключен по умолчанию */
.logo.dark-mode::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  z-index: -1;
  pointer-events: none;

  background: radial-gradient(
    circle 190px at var(--mouse-x) var(--mouse-y),
    rgba(0, 255, 255, 0.55) 0%,
    rgba(81, 122, 255, 0.18) 30%,
    transparent 50%
  );

  opacity: 0;
  transition: opacity 0.3s ease;
}

/* Блик при наведении */
.logo.dark-mode:hover::after {
  opacity: 0.9;
}

/* Текст Edge+ */
.logo.dark-mode span {
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
  transition: color 0.25s ease, text-shadow 0.25s ease;
}

.logo.dark-mode:hover span {
  text-shadow: 0 1px 4px rgba(0, 0, 0, 1);
}

/* ========================== */
/*       SVG инверсия         */
/* ========================== */

/* Для img внутри логотипа */
.logo.dark-mode img {
  filter: brightness(0) invert(1);  /* ← делает SVG белым */
  transition: filter 0.25s ease;
}

.logo.dark-mode:hover img {
  filter: brightness(0.1) invert(1);
}

/* Для inline SVG (если будет) */
.logo.dark-mode svg {
  filter: brightness(0) invert(1);
  transition: filter 0.25s ease;
}

/* Цветные SVG (fill="currentColor") */
.logo.dark-mode svg * {
  fill: #fff !important;
  stroke: #fff !important;
}




/* Адаптивность */
@media (max-width: 768px) {
  .logo {
    padding: 10px 16px;
    gap: 10px;
  }
  
  .logo img {
    height: 32px;
  }
  
  .logo span {
    font-size: 1.2em;
  }
}

@media (max-width: 480px) {
  .logo {
    padding: 8px 12px;
    gap: 8px;
  }
  
  .logo img {
    height: 28px;
  }
  
  .logo span {
    font-size: 1.1em;
  }
}

/* Меню */

nav ul {
    padding: 5px 5px 5px 5px;
    display: flex;
    gap: 4px;
    border-radius: 20px;
    list-style: none;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --mouse-x: 50%;
    --mouse-y: 50%;
}

/* Основной слой стекла - более глянцевый */
nav ul::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    -webkit-backdrop-filter: blur(25px) saturate(200%) brightness(110%);
    backdrop-filter: blur(25px) saturate(200%) brightness(110%);
    background: 
        radial-gradient(
            circle at var(--mouse-x) var(--mouse-y),
            rgba(206, 206, 206, 0.3) 0%,
            rgba(255, 255, 255, 0.1) 30%,
            rgba(255, 255, 255, 0.05) 70%,
            transparent 100%
        ),
        linear-gradient(
            135deg, 
            rgba(255, 255, 255, 0.15) 0%,
            rgba(255, 255, 255, 0.08) 30%,
            rgba(255, 255, 255, 0.12) 70%,
            rgba(255, 255, 255, 0.1) 100%
        );
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    z-index: -1;
    transition: all 0.3s ease;
}

/* Эффект преломления света для светлого режима - темный */
nav ul::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(
        circle 80px at var(--mouse-x) var(--mouse-y),
        rgba(68, 68, 68, 0.15) 0%,
        rgba(0, 0, 0, 0.08) 30%,
        transparent 70%
    );
    border-radius: 20px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

/* Показываем эффект только при наведении на nav ul */
nav ul:hover::after {
    opacity: 1;
}

/* Внутренние блики для глянца */
.glass-shine {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(
            circle at 20% 20%,
            rgba(255, 255, 255, 0.25) 0%,
            transparent 40%
        ),
        radial-gradient(
            circle at 80% 80%,
            rgba(255, 255, 255, 0.15) 0%,
            transparent 40%
        );
    border-radius: 20px;
    z-index: -1;
    pointer-events: none;
}

/* Усиленные тени для объема */
nav ul {
    background: transparent;
}

/* Эффекты при наведении */
nav ul:hover {
    transform: translateY(-2px);
}

nav ul:hover::before {
  -webkit-backdrop-filter: blur(30px) saturate(220%) brightness(115%);
    backdrop-filter: blur(30px) saturate(220%) brightness(115%);
    background: 
        radial-gradient(
            circle at var(--mouse-x) var(--mouse-y),
            rgba(255, 255, 255, 0.4) 0%,
            rgba(255, 255, 255, 0.2) 30%,
            rgba(255, 255, 255, 0.1) 70%,
            transparent 100%
        ),
        linear-gradient(
            135deg, 
            rgba(255, 255, 255, 0.2) 0%,
            rgba(255, 255, 255, 0.12) 30%,
            rgba(255, 255, 255, 0.15) 70%,
            rgba(255, 255, 255, 0.12) 100%
        );
}

/* СТИЛИ ССЫЛОК - ИСПРАВЛЕНО: фон только при наведении */
nav ul li a {
    text-decoration: none;
    font-size: 15px;
    padding: 12px 20px;
    border-radius: 15px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #747474;
    background: transparent;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid transparent;
}

/* Фон появляется ТОЛЬКО при наведении */
nav ul li a:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #000;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    transform: translateY(-1px);
    border-color: rgba(255, 255, 255, 0.2);
}

nav ul li a.active {
    background: rgba(219, 214, 214, 0.705);
    color: rgb(47, 139, 214);
    text-shadow: 0 1px 3px rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Стили для иконок */
nav ul li a i {
    font-size: 18px;
    transition: all 0.3s ease;
}

/* ТЕМНЫЙ РЕЖИМ - ГЛЯНЦЕВОЕ СТЕКЛО */
nav.dark-mode::before {
  background: #000;
}

/* === ТЁМНЫЙ РЕЖИМ === */

nav.dark-mode ul::before {
  -webkit-backdrop-filter: blur(25px) saturate(180%) brightness(88%);
  backdrop-filter: blur(25px) saturate(180%) brightness(88%);
  background:
    radial-gradient(
      circle at var(--mouse-x) var(--mouse-y),
      rgba(255, 255, 255, 0.12) 0%,
      rgba(255, 255, 255, 0.06) 25%,
      rgba(255, 255, 255, 0.03) 45%,
      transparent 70%
    ),
    hsla(0, 0%, 6%, 0.301); /* тёмная подложка как у нижней панели */
  border: 1px solid rgba(255, 255, 255, 0.10);
}

nav.dark-mode ul:hover::before {
  -webkit-backdrop-filter: blur(30px) saturate(200%) brightness(85%);
  backdrop-filter: blur(30px) saturate(200%) brightness(85%);
  background:
    radial-gradient(
      circle at var(--mouse-x) var(--mouse-y),
      rgba(255, 255, 255, 0.20) 0%,
      rgba(255, 255, 255, 0.10) 30%,
      rgba(255, 255, 255, 0.05) 60%,
      transparent 80%
    ),
    hsla(0, 0%, 6%, 0.301);
}

/* Эффект преломления для темного режима - БЕЛЫЙ */
nav.dark-mode ul::after {
    background: radial-gradient(
        circle 80px at var(--mouse-x) var(--mouse-y),
        rgba(255, 255, 255, 0.25) 0%,
        rgba(255, 255, 255, 0.12) 30%,
        transparent 70%
    );
}

/* Ссылки в темном режиме */
nav.dark-mode ul li a {
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
    border-color: transparent;
    background: transparent;
}

nav.dark-mode ul li a:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
    border-color: rgba(255, 255, 255, 0.1);
}

nav.dark-mode ul li a.active {
    background: rgba(60, 65, 61, 0.603);
    color: rgb(112 193 245);
    text-shadow: 0 1px 3px rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.3);
}

@media screen and (max-width: 799px) {

  /* === ФИКСИРОВАННАЯ ПАНЕЛЬ === */
  .bottom-nav-wrapper {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 10px 12px max(14px, env(safe-area-inset-bottom));
    z-index: 9999;
    pointer-events: none;
  }

  .bottom-nav {
    pointer-events: auto;
  }

  /* === ОСНОВНАЯ ПАНЕЛЬ (не растягивается) === */
  .bottom-nav .mobile-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    padding: 8px 8px 8px 8px;
    width: max-content;
    max-width: calc(100vw - 24px);
    border-radius: 25px;
    list-style: none;
    position: relative;
    overflow: hidden;
    background: transparent;
    --mouse-x: 50%;
    --mouse-y: 50%;
    box-shadow:
      0 15px 35px rgba(0,0,0,.10),
      inset 0 2px 0 rgba(255,255,255,.25),
      inset 0 -2px 0 rgba(0,0,0,.10);
  }

  /* === СЛОИ ГЛЯНЦЕВОГО СТЕКЛА === */
  .bottom-nav .mobile-nav::before {
    content: '';
    position: absolute; inset: 0;
    -webkit-backdrop-filter: blur(25px) saturate(200%) brightness(110%);
            backdrop-filter: blur(25px) saturate(200%) brightness(110%);
    background:
      radial-gradient(
        circle at var(--mouse-x) var(--mouse-y),
        rgba(206,206,206,0.3) 0%,
        rgba(255,255,255,0.1) 30%,
        rgba(255,255,255,0.05) 70%,
        transparent 100%
      ),
      linear-gradient(
        135deg,
        rgba(255,255,255,0.15) 0%,
        rgba(255,255,255,0.08) 30%,
        rgba(255,255,255,0.12) 70%,
        rgba(255,255,255,0.1) 100%
      );
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 20px;
    z-index: -1;
    transition: all .3s ease;
  }

  .bottom-nav .mobile-nav::after {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(
      circle 80px at var(--mouse-x) var(--mouse-y),
      rgba(68,68,68,0.15) 0%,
      rgba(0,0,0,0.08) 30%,
      transparent 70%
    );
    border-radius: 20px;
    z-index: -1;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
  }

  .bottom-nav .mobile-nav:hover::after,
  .bottom-nav .mobile-nav:focus-within::after,
  .bottom-nav .mobile-nav.touched::after {
    opacity: 1;
  }

  /* === ЭЛЕМЕНТЫ МЕНЮ === */
  .bottom-nav .mobile-nav li {
    list-style: none;
    flex: 0 0 auto;
  }

  .bottom-nav .mobile-nav li a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 4px;
    padding: 8px 12px;
    min-height: 54px;
    border-radius: 25px;
    text-decoration: none;
    white-space: nowrap;
    font-size: 12px;
    color: #444; /* светлый по умолчанию */
    background: transparent;
    border: 1px solid transparent;
    transition: all .25s ease;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
  }

  .bottom-nav .mobile-nav li a i {
    display: block;
    font-size: 20px;
    line-height: 1;
    transition: transform .25s ease;
  }

  .bottom-nav .mobile-nav li a span {
    display: block;
    font-size: 10px;
    font-weight: 500;
    line-height: 1.1;
    margin-top: 2px;
    transition: all .25s ease;
  }

  /* === ХОВЕР / АКТИВ === */
  .bottom-nav .mobile-nav li a:hover {
    background: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.2);
    color: #000;
    transform: translateY(-1px);
  }

  .bottom-nav .mobile-nav li a:hover i {
    transform: scale(1.06);
  }

  .bottom-nav .mobile-nav li a.active {
    background: rgba(245, 243, 243, 0.747);
    color: rgb(60, 151, 226);
    border-color: rgba(255, 255, 255, 0.3);
    text-shadow: 0 1px 3px rgba(255, 255, 255, 0.3);
  }

  /* === ТЕМНЫЙ РЕЖИМ: читаемость как у nav ul.dark-mode === */
  .dark-mode .bottom-nav .mobile-nav::before {
    -webkit-backdrop-filter: blur(25px) saturate(180%) brightness(90%);
            backdrop-filter: blur(25px) saturate(180%) brightness(90%);
    background:
      radial-gradient(
        circle at var(--mouse-x) var(--mouse-y),
        rgba(255,255,255,0.15) 0%,
        rgba(255,255,255,0.08) 20%,
        rgba(255,255,255,0.05) 40%,
        transparent 100%
      ),
      linear-gradient(
        135deg,
        rgba(255,255,255,0.1) 0%,
        rgba(255,255,255,0.05) 30%,
        rgba(255,255,255,0.08) 70%,
        rgba(255,255,255,0.06) 100%
      );
      background: hsla(0, 0%, 8%, 0.411);
    border: 1px solid rgba(255,255,255,0.1);
  }

  .dark-mode .bottom-nav .mobile-nav::after {
    background: radial-gradient(
      circle 80px at var(--mouse-x) var(--mouse-y),
      rgba(255,255,255,0.25) 0%,
      rgba(255,255,255,0.12) 30%,
      transparent 70%
    );
  }

  /* — текст и иконки становятся светлыми */
  .dark-mode .bottom-nav .mobile-nav li a {
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 3px rgba(0,0,0,0.7);
  }

  .dark-mode .bottom-nav .mobile-nav li a:hover {
    background: rgba(255,255,255,0.12);
    color: #fff;
    text-shadow: 0 1px 4px rgba(0,0,0,0.9);
    border-color: rgba(255,255,255,0.1);
  }

  .dark-mode .bottom-nav .mobile-nav li a.active {
    background: rgba(60, 65, 61, 0.603);
    color: rgb(112 193 245);
    text-shadow: 0 1px 4px rgba(194, 194, 194, 0.8);
    border-color: rgb(131 131 131 / 20%);
  }

  /* === отступ под контент === */
  .content {
    padding-bottom: calc(90px + env(safe-area-inset-bottom));
  }
}

/* ===== Карточки проектов с эффектом преломления света (версия с чётким кругом) ===== */

/* Контейнер */
.projects-container {
  display: flex;
  width: 90%;
  margin: 40px auto;
  gap: 20px;
  padding: 0;
}

/* Основная карточка */
.project-card {
  flex: 1;
  padding: 35px 30px;
  color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;

  min-height: 320px;
  cursor: pointer;
  border-radius: 16px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;

  /* для преломления света */
  position: relative;
  overflow: hidden;
  isolation: isolate;
  --mouse-x: 50%;
  --mouse-y: 50%;
}

/* Цветовые схемы карточек */
.web-projects {
  background: linear-gradient(135deg, #2ecc71, #27ae60);
}

.desktop-projects {
  background: linear-gradient(135deg, #3498db, #2980b9);
}

/* --- Псевдослои --- */
.project-card::before,
.project-card::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

/* Мягкий глянец поверх */
.project-card::before {
  background:
    linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.12) 0%,
      rgba(255, 255, 255, 0.06) 50%,
      rgba(255, 255, 255, 0.10) 100%
    );
  mix-blend-mode: screen;
  opacity: 0.9;
  transition: opacity .25s ease, filter .25s ease;
}

/* Световое преломление — один крупный чёткий круг */
.project-card::after {
  background:
    radial-gradient(
      circle 90% at var(--mouse-x) var(--mouse-y),
      rgba(255, 255, 255, 0.65) 0%,
      rgba(255, 255, 255, 0.25) 30%,
      rgba(255, 255, 255, 0.08) 50%,
      transparent 70%
    );
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* Блик-полоска (добавляется JS-скриптом) */
.project-card .glass-shine {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(
      120deg,
      rgba(255, 255, 255, 0.00) 0%,
      rgba(255, 255, 255, 0.10) 30%,
      rgba(255, 255, 255, 0.00) 60%
    );
  mix-blend-mode: screen;
  transform: translateX(calc(var(--mouse-x) - 50%)) translateY(calc(var(--mouse-y) - 50%));
  transition: opacity .25s ease, transform .1s linear;
  opacity: .35;
}

/* Контент всегда поверх бликов */
.project-card > *:not(.glass-shine) {
  position: relative;
  z-index: 1;
}

/* ===== Ховер эффекты ===== */
.project-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.project-card:hover .project-icon {
  transform: scale(1.15);
  background: rgba(255, 255, 255, 0.3);
}

.project-card:hover::after {
  opacity: 1;
}

.project-card:hover .glass-shine {
  opacity: .5;
}

/* Иконка проекта */
.project-icon {
  font-size: 52px;
  margin-bottom: 25px;
  background: rgba(255, 255, 255, 0.2);
  width: 90px;
  height: 90px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease, background 0.3s ease;
}

/* Заголовок */
.project-card h3 {
  font-size: 24px;
  margin-bottom: 18px;
  font-weight: 600;
}

/* Текст */
.project-card p {
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 25px;
  opacity: 0.95;
  padding: 0 10px;
}

/* Кнопка */
.project-btn {
  padding: 12px 30px;
  background: white;
  border: none;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  font-size: 16px;
  position: relative;
  z-index: 2;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .12);
}

.web-projects .project-btn { color: #27ae60; }
.desktop-projects .project-btn { color: #2980b9; }

.project-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* ===== Тёмный режим ===== */
.dark-mode .project-card::before {
  background:
    linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.08) 0%,
      rgba(255, 255, 255, 0.04) 50%,
      rgba(255, 255, 255, 0.07) 100%
    );
  mix-blend-mode: screen;
}

.dark-mode .project-card::after {
  background:
    radial-gradient(
      circle 260px at var(--mouse-x) var(--mouse-y),
      rgba(180, 220, 255, 0.55) 0%,
      rgba(140, 200, 255, 0.25) 30%,
      rgba(120, 180, 255, 0.08) 55%,
      transparent 75%
    );
}

/* ===== Адаптивность ===== */
@media (max-width: 799px) {
  .projects-container {
    flex-direction: column;
    gap: 25px;
    width: 95%;
  }

  .project-card {
    min-height: 280px;
    border-radius: 14px;
    padding: 30px 25px;
  }

  .project-icon {
    width: 80px;
    height: 80px;
    font-size: 46px;
  }

  /* скрываем навигацию, как у тебя было */
  nav ul { display: none !important; }

  /* при касании на мобильных включаем преломление */
  .project-card.touched::after { opacity: 1; }
}

/* ===== Уважение к prefers-reduced-motion ===== */
@media (prefers-reduced-motion: reduce) {
  .project-card,
  .project-card::before,
  .project-card::after,
  .project-card .glass-shine,
  .project-btn,
  .project-icon {
    transition: none !important;
  }
}

.test-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.test-open-btn {
  padding: 10px 16px;
  border-radius: 999px;
  border: none;
  background: #007aff;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
}

/* ============================= */
/*       БАЗА ДЛЯ ДИАЛОГОВ       */
/* ============================= */

.dialog {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  overflow: auto;

  /* затемнённый фон + blur, как у системных оверлеев */
  background: rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);

  opacity: 1;
  transition: opacity .28s ease;
}

/* плавность фона при закрытии (твоя fade-out логика) */
.dialog.fade-out {
  opacity: 0;
}

/* Кастомный скроллбар */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
}

/* ==============================*/
/*       БЛОК КАРТОЧЕК           */
/* ==============================*/
.blog-card {
  background: var(--glass-bg);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 20px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--glass-shadow);
}

.blog-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
  border-radius: 4px 4px 0 0;
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.blog-card:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 20px 40px rgba(59, 130, 246, 0.15);
  border-color: var(--accent-blue);
}

.blog-card:hover::before {
  transform: scaleX(1);
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin: 30px 0;
}

/* ==============================*/
/*       ДИАЛОГОВЫЕ ОКНА         */
/* ==============================*/

/*Диалоговые окна*/
.dialog-content .container {
  background-color: #fff;
}

.dialog {
  display: none;
  position: fixed;
  z-index: 1000 !important;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgb(255, 255, 255);
  animation: fadeIn 0.5s ease;
  padding: 50px;
}

.dialog-setttings {
  display: none;
  position: fixed;
  z-index: 1000 !important;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.733);
  animation: fadeIn 0.5s ease;
}

.dialog-message {
  display: none;
  position: fixed;
  z-index: 1000 !important;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.733);
  animation: fadeIn 0.5s ease;
}

.dmessage {
  background-color: #fefefe;
  margin: 10% auto;
  padding: 20px;
  border: 1px solid #888;
  width: 400px;
  height: 250px;
  animation: slideIn 0.3s ease;
  border-radius: 25px;
  text-align: center;
  align-items: center;
}

.dmessage .universal-card {
  width: 85%;
  height: 10%;
}

.dialog-open {
  overflow: hidden;
}

.icon {
  width: 10% !important;
}

@keyframes fadeIn {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

.dialog-content {
  background-color: #fefefe;
  margin: 5% auto;
  /*padding: 20px;*/
  /*border: 1px solid #888;*/
  width: 100%;
  animation: slideIn 0.3s ease;
  /*border-radius: 25px;*/
}

.dialog-content-settings {
  background-color: #fefefe;
  margin: 5% auto;
  padding: 20px;
  border: 1px solid #888;
  width: 80%;
  animation: slideIn 0.3s ease;
  border-radius: 25px;
}

@keyframes slideIn {
  0% {
    transform: translateY(-50px);
  }
  100% {
    transform: translateY(0);
  }
}

.close {
  color: #000000;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.close:hover,
.close:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
}

.scrollable-content {
  padding: 10px;
  height: 100%;
  overflow-y: scroll;
}

.dialog.fade-out {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.dialog-setttings.fade-out {
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* ============================= */
/*        СКРОЛЛИНГ              */
/* ============================= */


.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 4px;
  width: 0%;
  background: linear-gradient(90deg, #3b82f6, #8b5cf6, #a78bfa);
  z-index: 999999;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.6);
  transition: width 0.1s ease-out;
}

/* Индикатор скролла */
.scroll-hint {
  margin-top: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  opacity: 0.6;
  animation: bounce 2s infinite;
}

.scroll-hint span {
  font-size: 0.85rem;
  color: #94a3b8;
  letter-spacing: 1px;
}

.scroll-hint .arrow {
  width: 22px;
  height: 22px;
  border-right: 2px solid #94a3b8;
  border-bottom: 2px solid #94a3b8;
  transform: rotate(45deg);
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

/* ============================= */
/*    ДЛЯ СТРАНИЦЫ О САЙТЕ       */
/* ============================= */

.shimmer-title {
  font-size: clamp(2.5rem, 7vw, 5rem);
  font-weight: 800;
  letter-spacing: 1px;
  margin-bottom: 20px;
  text-align: center;
 background: linear-gradient(
    90deg,
    var(--primary-blue) 0%,      /* #1d4ed8 */
    var(--secondary-blue) 25%,   /* #3b82f6 */
    var(--accent-blue) 50%,      /* #60a5fa */
    #8b5cf6 65%,                 /* фиолетовый */
    #a78bfa 80%,                 /* сиреневый */
    #c084fc 90%,                 /* светло-фиолетовый */
    var(--secondary-blue) 100%   /* возврат к голубому */
    );
  background-size: 300% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmerFlow 4s ease-in-out infinite;
}

@keyframes shimmerFlow {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.about-hero {
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 120px 20px 40px;
  gap: 16px;
}
        
.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  color: var(--text-secondary);
  max-width: 600px;
  line-height: 1.8;
  transition: color 0.3s ease;
}

.scroll-hint {
  margin-top: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  opacity: 0.6;
  animation: bounce 2s infinite;
}

.scroll-hint span {
  font-size: 0.85rem;
  color: var(--text-muted);
  letter-spacing: 1px;
}

.scroll-hint .arrow {
  width: 22px;
  height: 22px;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: rotate(45deg);
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

.about-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 20px 80px;
}

.about-card {
  background: var(--glass-bg);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 35px;
  margin-bottom: 25px;
  box-shadow: var(--glass-shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.about-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 50px rgba(59, 130, 246, 0.18);
  border-color: var(--accent-blue);
}

.about-card h2 {
  font-size: 1.6rem;
  color: var(--text-primary);
  margin-bottom: 18px;
  position: relative;
  padding-bottom: 12px;
}

.about-card h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--secondary-blue), #8b5cf6);
}

.about-card p {
  font-size: 1.05rem;
  line-height: 1.9;
  color: var(--text-secondary);
  margin-bottom: 15px;
        }

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.feature-item {
  background: var(--gradient-card);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 25px 20px;
  text-align: center;
  transition: transform 0.3s ease;
}

.feature-item:hover {
  transform: translateY(-3px);
}

.feature-item i {
  font-size: 2rem;
  background: linear-gradient(135deg, var(--secondary-blue), #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 12px;
  display: block;
}

.feature-item h4 {
  color: var(--text-primary);
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.feature-item p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.6;
}


  /* Адаптивность */
  @media (max-width: 768px) {
  .about-card { padding: 28px 22px; }
  .about-hero { padding-top: 100px; }
}