:root {
  --bg-0: #0c0f12;
  --text: #e9eef3;
  --muted: #9aa3ad;
  --accent: #b8dcff; /* светло-голубой акцент */
  --glow: rgba(200, 230, 255, 0.6);
}

body {
  margin: 0;
  background: radial-gradient(circle at 50% 30%, #191b1f, #080a0c 80%);
  color: var(--text);
  font-family: Inter, system-ui, sans-serif;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

html, body {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}


/* === ЛОГОТИП === */
.logo-metal {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.3);
  opacity: 0;
  animation: logoIntro 4s cubic-bezier(0.33, 1, 0.68, 1) forwards;
  will-change: transform, opacity;
  z-index: 10;
}

.logo-metal img {
  width: 230px;
  filter:
    invert(1)
    brightness(3)
    contrast(1.4)
    drop-shadow(0 0 6px rgba(200,235,255,0.4))
    drop-shadow(0 0 14px rgba(180,220,255,0.3))
    drop-shadow(0 0 24px rgba(160,210,255,0.2));
  animation: whiteBlueBreath 8s ease-in-out infinite;
  transition: filter 0.5s ease;
  pointer-events: none;
}

/* усиленное свечение при наведении */
.logo-metal:hover img {
  filter:
    invert(1)
    brightness(3.4)
    contrast(1.5)
    drop-shadow(0 0 16px rgba(220,250,255,0.9))
    drop-shadow(0 0 36px rgba(190,240,255,0.7))
    drop-shadow(0 0 56px rgba(170,230,255,0.45));
}

/* === анимация появления и движения === */
@keyframes logoIntro {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.3);
  }
  30% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  58% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  60% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, calc(-50% - 40vh)) scale(0.7);
  }
}

/* дыхание */
@keyframes whiteBlueBreath {
  0%, 100% {
    filter:
      invert(1)
      brightness(3)
      contrast(1.4)
      drop-shadow(0 0 6px rgba(200,235,255,0.4))
      drop-shadow(0 0 14px rgba(180,220,255,0.3))
      drop-shadow(0 0 24px rgba(160,210,255,0.2));
  }
  50% {
    filter:
      invert(1)
      brightness(3.2)
      contrast(1.45)
      drop-shadow(0 0 12px rgba(220,250,255,0.6))
      drop-shadow(0 0 24px rgba(190,240,255,0.45))
      drop-shadow(0 0 36px rgba(170,230,255,0.3));
  }
}




/* --- СВЕТЯЩАЯСЯ ЛИНИЯ --- */
.logo-line {
  position: fixed;
  top: calc(8vh + 100px); /* выровнял под конечный логотип */
  left: 50%;
  transform: translateX(-50%);
  width: 220px;
  height: 2px;
  background: linear-gradient(90deg,
    transparent,
    rgba(200,235,255,0.9),
    transparent
  );
  border-radius: 2px;
  opacity: 0;
  animation: 
    lineAppear 1.5s ease forwards 4.5s,
    linePulse 4s ease-in-out 6s infinite;
  animation-fill-mode: both; /* сохраняет состояние */
}

/* плавное появление */
@keyframes lineAppear {
  from {
    opacity: 0;
    transform: translateX(-50%) scaleX(0.6);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) scaleX(1);
  }
}

/* дыхание */
@keyframes linePulse {
  0%, 100% {
    box-shadow: 0 0 10px rgba(190,230,255,0.4);
  }
  50% {
    box-shadow: 0 0 22px rgba(190,240,255,0.9);
  }
}


/* === ПРОЕКТЫ === */
main.projects {
	 flex: 1 0 auto;
  margin-top: 270px;
  text-align: center;
  opacity: 0;
  transition: opacity 1.6s ease;
}

main.projects.visible {
  opacity: 1;
}

main.projects h1 {
  font-size: 26px;
letter-spacing: 0.02em;
  color: #e3e9ee;
  margin-bottom: 40px;
}

main.projects h1 span {
  color: var(--accent);
  text-shadow: 0 0 8px rgba(180, 240, 255, 0.8);
}

.project-list {
  display: flex;
  flex-direction: column;
  gap: 26px;
  align-items: center;
}

.project-card {
  width: 400px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 26px 30px;
  text-decoration: none;
  color: var(--text);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015));
  box-shadow: 0 0 28px rgba(180, 230, 255, 0.1);
  transition: all 0.4s ease;
  opacity: 0;
  transform: translateY(60px);
  backdrop-filter: blur(4px);
}

.project-card.show {
  opacity: 1;
  transform: translateY(0);
}

.project-card:hover {
  box-shadow: 0 0 30px rgba(190, 240, 255, 0.25);
  transform: translateY(-5px);
}

/* исправление преждевременного появления неактивных карточек */
.project-card.disabled {
  opacity: 0; /* изначально как все */
  cursor: default;
  pointer-events: none;
  transition: opacity 0.4s ease;
  transform: translateY(60px); /* стартовое положение — снизу */
    transition:
    opacity 0.4s ease,
    transform 0.3s ease;
}

/* когда появляется (через .show) — применяем полупрозрачность */
.project-card.disabled.show {
  opacity: 0.45;
  transform: translateY(0);
}
/* --- чтобы .disabled тоже схлопывалась до конца --- */
.project-card.collapse,
.project-card.disabled.collapse {
  opacity: 0 !important;
  transform: scaleY(0.1) scaleX(0.8);
  margin: 0;
  transition:
    transform 0.45s ease-in,
    opacity 0.4s ease-in,
    margin 0.4s ease-in;
}
.project-card h2 {
  margin: 0 0 8px;
  font-size: 28px;
  color: #fff;
  text-shadow: 0 0 6px rgba(210, 250, 255, 0.5);
  letter-spacing: 0.05em;
}

.project-card p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

/* === ФУТЕР === */
footer {
  flex-shrink: 0;
  width: 100%;
  text-align: center;
  padding: 60px 0 40px;
  color: #cfd8e3;
  font-size: 16px;
  letter-spacing: 0.06em;

  opacity: 0;
  transform: translateY(10px); /* ← раньше было слишком много, теперь чуть выше */
  transition: opacity 1.6s ease, transform 1.6s ease;
}

footer.visible {
  opacity: 1;
  transform: translateY(0); /* плавное появление без выхода за пределы viewport */
}

footer .container {
  animation: footerGlow 6s ease-in-out infinite alternate;
}

@keyframes footerGlow {
  0%, 100% {
    text-shadow:
      0 0 6px rgba(200, 230, 255, 0.4),
      0 0 16px rgba(180, 230, 255, 0.25);
  }
  50% {
    text-shadow:
      0 0 12px rgba(220, 250, 255, 0.8),
      0 0 26px rgba(180, 240, 255, 0.5);
  }
}


/* === СХЛОПЫВАНИЕ ПРОЕКТОВ === */
.projects.collapse h1,
.project-card.collapse {
  transition:
    transform 0.45s ease-in,
    opacity 0.4s ease-in,
    margin 0.4s ease-in;
  transform: scaleY(0.1) scaleX(0.8);
  opacity: 0;
  margin: 0;
}

.projects.collapse {
  transition: opacity 0.4s ease-in;
  opacity: 0;
}

/* === ЛОГОТИП — УВЕЛИЧЕНИЕ И УГАСАНИЕ === */


/* === ВТЯГИВАНИЕ / WARP === */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at center,
      rgba(0,0,0,0) 0%,
      rgba(0,0,0,0.35) 65%,
      rgba(0,0,0,0.75) 100%),
    repeating-linear-gradient(
      transparent 0 10px,
      rgba(200, 240, 255, 0.04) 10px 11px
    );
  opacity: 0;
  transform: scaleY(0.9);
  transition: opacity 0.4s ease;
  pointer-events: none;
  z-index: 9998;
}

body.warp-active::after {
  opacity: 1;
  animation: warp-lines 0.65s ease-in forwards;
}

@keyframes warp-lines {
  0% {
    transform: scaleY(1);
    background-size: 100% 20px;
    opacity: 0.15;
  }
  50% {
    transform: scaleY(1.7);
    background-size: 100% 10px;
    opacity: 0.4;
  }
  100% {
    transform: scaleY(3);
    background-size: 100% 4px;
    filter: blur(6px);
    opacity: 0;
  }
}
/* === СБРОС ЗАМОРОЖЕННОЙ АНИМАЦИИ logoIntro === */
.logo-metal.to-center {
  animation: none; /* отключаем старую анимацию logoIntro */
  transition:
    top 0.6s ease-in-out,
    transform 0.6s ease-in-out;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  z-index: 9999;
}
/* === ДВИЖЕНИЕ ЛОГОТИПА ВНИЗ ПЕРЕД УВЕЛИЧЕНИЕМ === */
.logo-metal.portal-move {
  animation: moveDown 0.6s ease-in-out forwards;
}

@keyframes moveDown {
  0% {
    top: 60px;
    transform: translate(-50%, 0) scale(0.7);
  }
  100% {
    top: 65%; /* можно менять (например 70%) */
    transform: translate(-50%, -50%) scale(1.1);
  }
}

/* --- короткий сдвиг вниз перед увеличением --- */
.logo-metal.portal-shift {
  transition: top 0.6s ease, transform 0.6s ease;
  top: 55%; /* немного ниже */
  transform: translate(-50%, -50%) scale(0.9);
}

/* --- плавное увеличение и исчезновение без glow --- */
.logo-metal.portal-zoom img {
	 animation: none !important; /* отключаем дыхание */
  transition:
    transform 3.0s cubic-bezier(0.33, 1, 0.68, 1), /* easeOutCubic — плавное торможение */
    opacity 1.4s ease-in,
    filter 1.4s ease-in;
  transform: scale(90) translateY(10%); /* лёгкий сдвиг вниз */
  opacity: 0;
  filter:
    invert(1)
    brightness(0.9)
    contrast(1.1)
	blur(3.5);
}
.logo-metal.portal-zoom {
  transform-origin: center 60%; /* визуально “уходит вперёд и вниз” */
}
/* === 📱 АДАПТИВНОСТЬ === */

/* --- до 900px: планшеты --- */
@media (max-width: 900px) {
	html, body {
  padding-left: 13px;
  padding-right: 13px;
}
  .logo-metal img {
    width: 180px;
  }

  main.projects {
    margin-top: 220px;
  }

  .project-card {
    width: 80%;
    max-width: 360px;
    padding: 20px 24px;
  }

  .project-card h2 {
    font-size: 24px;
  }

  .project-card p {
    font-size: 14px;
  }

  footer {
    font-size: 14px;
    padding: 40px 0 30px;
  }
}

/* --- до 600px: мобильные телефоны --- */
@media (max-width: 600px) {
	html, body {
  padding-left: 13px;
  padding-right: 13px;
}
  .logo-metal img {
    width: 150px;
  }

  main.projects {
    margin-top: 180px;
    padding: 0 16px;
  }

  .project-list {
    gap: 20px;
  }

  .project-card {
    width: 100%;
    padding: 18px 20px;
    border-radius: 12px;
    box-shadow: 0 0 16px rgba(180, 230, 255, 0.1);
  }

  .project-card h2 {
    font-size: 22px;
    text-shadow: none;
  }

  .project-card p {
    font-size: 13.5px;
    line-height: 1.45;
  }

  h1 {
    font-size: 20px;
	margin-bottom: 30px;
  }

  footer {
    font-size: 13px;
  }
}

/* --- до 400px: компактные экраны (iPhone SE и т.п.) --- */
@media (max-width: 400px) {
	html, body {
  padding-left: 13px;
  padding-right: 13px;
}
 main.projects h1 {
    font-size: 20px;
	margin-bottom: 30px;
  }

  .logo-metal img {
    width: 130px;
  }
  

  main.projects {
    margin-top: 160px;
  }

  .project-card {
    padding: 16px 18px;
  }

  .project-card h2 {
    font-size: 20px;
  }

  .project-card p {
    font-size: 13px;
  }

  footer {
    font-size: 12.5px;
    padding-bottom: 20px;
  }
}

