/* --- Современный стиль для сайта Алекса --- */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;600;700&family=Orbitron:wght@600;800&display=swap');

:root {
    --bg-main: #0f1626;
    --bg-card: rgba(255, 255, 255, 0.05);
    --accent: #ff2e63;
    --accent-grad: linear-gradient(90deg, #ff2e63, #00fff0, #a855f7);
    --text-main: #f0f0f0;
    --text-muted: #9ca3af;
    --transition: all 0.3s ease;
}

/* ---------- BASE ---------- */
* { box-sizing: border-box; }

body {
    font-family: 'Manrope', sans-serif;
    background: radial-gradient(circle at top right, #1a1a2e 0%, #0f1626 100%);
    color: var(--text-main);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    overflow-x: hidden;
    transition: background 0.5s ease, color 0.5s ease;
}

/* ---------- HEADER ---------- */
header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(15, 22, 38, 0.85);
    backdrop-filter: blur(10px);
    padding: 18px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 25px rgba(0, 0, 0, 0.4);
}

header h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: 2px;
    background: var(--accent-grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-transform: uppercase;
    margin: 0;
    transition: var(--transition);
    animation: neonGlow 5s ease-in-out infinite alternate;
}

@keyframes neonGlow {
    0% { filter: drop-shadow(0 0 6px #ff2e63); }
    100% { filter: drop-shadow(0 0 14px #00fff0); }
}

header h1:hover { transform: scale(1.05) rotate(-1deg); }

/* ---------- NAV ---------- */
nav a {
    color: var(--text-main);
    text-decoration: none;
    margin: 0 18px;
    font-weight: 600;
    position: relative;
    letter-spacing: 0.5px;
    transition: var(--transition);
}
nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--accent-grad);
    transition: var(--transition);
    border-radius: 2px;
}
nav a:hover { color: #ffffff; transform: translateY(-2px); }
nav a:hover::after { width: 100%; }

/* ---------- SECTION ---------- */
section {
    padding: 80px 20px;
    max-width: 1100px;
    margin: 0 auto;
}
h2 {
    font-size: 2.4em;
    color: var(--text-main);
    margin-bottom: 30px;
    text-align: center;
    letter-spacing: 0.5px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}
h2.show { opacity:1; transform:translateY(0); }

#blog p {
    max-width:700px;
    margin:0 auto 40px;
    color:var(--text-muted);
    font-size:1.1em;
}

/* ---------- GRID ---------- */
.grid {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
}

/* ---------- CARD ---------- */
.card {
    background: var(--bg-card);
    border-radius: 18px;
    padding: 24px;
    width: 300px;
    min-height: 200px;
    box-shadow: 0 0 20px rgba(255,46,99,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    backdrop-filter: blur(12px);
    opacity: 0;
    transform: translateY(40px);
    transition:
        opacity 0.8s ease-out,
        transform 1s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.4s ease;
}

/* плавное появление без рывков */
.card.visible {
    opacity: 1;
    transform: translateY(0);
}

/* при наведении — мягче, без скачка */
.card:hover {
    transform: translateY(-4px) scale(1.015);
    box-shadow: 0 8px 25px rgba(255,46,99,0.25);
}

/* предотвращает переворот на мобильных */
@media (max-width: 768px) {
    .card {
        transform: none !important;
        opacity: 1 !important;
        transition: opacity 0.6s ease;
    }
    .card:hover {
        transform: none;
        box-shadow: 0 0 20px rgba(255,46,99,0.15);
    }
}

/* ---------- BUTTON ---------- */
button {
    background: var(--accent-grad);
    color:white;
    border:none;
    border-radius:12px;
    padding:10px 24px;
    font-size:1em;
    cursor:pointer;
    transition: var(--transition);
    background-size:200% 200%;
    animation: gradientShift 6s ease infinite;
}
button:hover {
    transform: translateY(-2px);
    box-shadow:0 0 15px rgba(255,46,99,0.3);
}
@keyframes gradientShift {
    0% { background-position:0% 50%; }
    50% { background-position:100% 50%; }
    100% { background-position:0% 50%; }
}

/* ---------- FOOTER ---------- */
footer {
    text-align:center;
    padding:40px 20px;
    border-top:1px solid rgba(255,255,255,0.08);
    color: var(--text-muted);
    background: rgba(15,22,38,0.9);
    backdrop-filter: blur(10px);
    margin-top:60px;
}

/* ---------- DARK THEME ---------- */
body.dark { background-color:#0b0b0b; color:#f2f2f2; }
#theme-toggle { cursor:pointer; transition: transform 0.3s; }
#theme-toggle.active { transform: rotate(180deg); }

/* ---------- ADAPTIVE ---------- */
@media (max-width:768px) {
    header { flex-direction: column; }
    nav { margin-top:10px; flex-wrap:wrap; justify-content:center; }
    .grid { flex-direction: column; align-items:center; }
}
.projects-popup-container {
  position: relative;
  display: inline-block;
  margin-left: 20px;
}

#projects-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  transition: 0.3s;
}

#projects-btn:hover {
  transform: scale(1.05);
}

.projects-popup {
  display: flex;
  flex-direction: column;
  position: absolute;
  right: 0;
  top: 45px;
  background: rgba(15,22,38,0.95);
  border-radius: 12px;
  padding: 10px 0;
  min-width: 200px;
  box-shadow: 0 8px 35px rgba(0,0,0,0.3);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-20px);
  transition: all 0.3s ease;
  z-index: 1000;
}

.projects-popup.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.projects-popup a {
  display: block;
  padding: 10px 20px;
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  background: linear-gradient(90deg, #ff2e63, #00fff0, #a855f7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: background 0.3s, color 0.3s;
}

.projects-popup a:hover {
  background: linear-gradient(90deg, #00fff0, #a855f7, #ff2e63);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
/* Бургер кнопка */
.burger {
    display: none;
    font-size: 28px;
    background: none;
    border: none;
    color: var(--text-main);
    cursor: pointer;
    transition: var(--transition);
    margin-left: auto;
}

.burger:hover {
    color: var(--accent);
}

/* --- Мобильная адаптивность --- */
@media (max-width: 768px) {
    nav {
        display: none;
        flex-direction: column;
        gap: 12px;
        background: rgba(15, 22, 38, 0.95);
        position: absolute;
        top: 75px;
        right: 20px;
        padding: 15px;
        border-radius: 12px;
        box-shadow: 0 8px 35px rgba(0,0,0,0.3);
        z-index: 999;
    }

    .burger {
        display: block;
    }
}
/* --- Хедер --- */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(15,22,38,0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 30px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.4);
  transition: padding 0.3s ease;
  flex-wrap: wrap;
}

/* Логотип и название */
.header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.header-left .logo {
  width: 32px;
  height: 32px;
}
header h1 {
  font-size: 1.4rem;
  color: #fff;
  margin: 0;
  transition: font-size 0.3s ease;
}

/* Навигация */
#nav-links {
  display: flex;
  gap: 20px;
}
#nav-links a {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s, transform 0.2s;
}
#nav-links a:hover {
  color: #00b0ff;
  transform: translateY(-2px);
}

/* Бургер для мобилки */
.burger {
  display: none;
  font-size: 1.5rem;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
}

/* Popup "Другие проекты" */
.projects-popup-container {
  position: relative;
}
.projects-popup {
  display: none;
  position: absolute;
  top: 110%;
  left: 0;
  background: #252931;
  padding: 10px 15px;
  border-radius: 10px;
  min-width: 200px;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 6px 25px rgba(0,0,0,0.3);
  transition: opacity 0.25s ease, transform 0.25s ease;
  opacity: 0;
  transform: translateY(-10px);
  z-index: 1000;
}
.projects-popup.show {
  display: flex;
  opacity: 1;
  transform: translateY(0);
}

/* Ссылки с градиентной анимацией */
.projects-popup a {
  color: #9fd2ff;
  text-decoration: none;
  font-weight: 500;
  padding: 4px 0;
  position: relative;
  transition: color 0.25s;
}
.projects-popup a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0%;
  height: 2px;
  background: linear-gradient(90deg,#00b0ff,#76c8ff);
  transition: width 0.3s ease;
}
.projects-popup a:hover {
  color: #00b0ff;
}
.projects-popup a:hover::after {
  width: 100%;
}

@keyframes fadeIn {
  from {opacity: 0; transform: translateY(-5px);}
  to {opacity: 1; transform: translateY(0);}
}

/* Responsive */
@media(max-width:768px){
  .burger { display:block; }
  #nav-links { display:none; flex-direction: column; gap:10px; margin-top:10px; }
  #nav-links.show { display:flex; }
}
.site-footer {
    background: var(--bg-secondary, #0f1626);
    padding: 40px 20px;
    color: var(--text-muted, #ccc);
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 14px;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    max-width: 1100px;
    margin: 0 auto;
    gap: 20px;
}

.footer-logo {
    width: 32px;
    height: 32px;
    margin-bottom: 10px;
}

.footer-left p {
    margin: 4px 0;
}

.footer-links, .footer-extra {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.footer-links a, .footer-extra a {
    color: var(--accent, #ff2e63);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover, .footer-extra a:hover {
    color: #fff;
}

.legal {
    font-size: 12px;
    opacity: 0.7;
    margin-top: 6px;
}

@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }
}
/* Анимация-фон секции */
.welcome-section {
  position: relative;
  height: 300px; /* нужная высота блока */
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  margin-bottom: 30px; /* уменьшенный отступ */
}

.welcome-section canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

.welcome-section .welcome-text h2 {
  color: #fff;
  margin-bottom: 12px;
  font-size: 1.9rem;
}

.welcome-section .welcome-text p {
  color: var(--text-muted);
  max-width: 720px;
  margin: 0 auto;
  font-size: 1.05rem;
}
.section-title {
  margin-top: 20px;
  text-align: center;
}


