/* ====== BASE ====== */
:root {
  --bg-main: #020617;
  --bg-elevated: rgba(15, 23, 42, 0.9);
  --text-main: #e5e7eb;
  --text-muted: #9ca3af;
  --accent-green: #22c55e;
  --accent-purple: #7c3aed;
  --border-subtle: rgba(148, 163, 184, 0.35);
  --radius-card: 18px;
  --shadow-card: 0 22px 60px rgba(0, 0, 0, 0.75);
  --transition-fast: 0.18s ease-out;
  --transition-slow: 0.55s ease-out;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  color: var(--text-main);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, sans-serif;
  overflow-x: hidden;
}

/* Живой градиент прямо на body */
body {
  background: radial-gradient(circle at 50% 0%, #240d36 0, #000 65%);
  overflow-x: hidden;
  
}

.bg-blobs {
  position: fixed;
  inset: -10%;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

/* базовый стиль кляксы */
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  mix-blend-mode: screen;
  opacity: 0;
}


/* ====== Клякса 1 — зелёная, слева/центр ====== */
.blob-green {
  width: 40vw;
  height: 40vw;
  background: radial-gradient(circle, rgba(34, 197, 94, 0.75) 0, transparent 65%);
  animation: blobGreen 28s ease-in-out infinite;
}

/* ====== Клякса 2 — фиолетовая, центр → правый край ====== */
.blob-purple {
  width: 45vw;
  height: 45vw;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.7) 0, transparent 65%);
  animation: blobPurple 32s ease-in-out infinite;
}

/* ====== Клякса 3 — маленькая зелёная справа ====== */
.blob-green-small {
  width: 35vw;
  height: 35vw;
  right: -10%;      /* за край на 10%, чтобы было плавнее */
  top: 20%;         /* висит в верхней правой части */
  position: absolute;
  background: radial-gradient(circle, rgba(34, 197, 94, 0.65) 0, transparent 70%);
  filter: blur(80px);
  animation: blobRightCenter 28s ease-in-out infinite;
}


/* ===== ANIMATIONS ===== */

@keyframes blobGreen {
  0%, 100% {
    transform: translate3d(-20%, -10%, 0) scale(0.8);
    opacity: 0;
  }
  20% { opacity: 0.75; }
  40% {
    transform: translate3d(10%, 5%, 0) scale(1.2);
    opacity: 0.7;
  }
  60% {
    transform: translate3d(30%, 25%, 0) scale(1.3);
    opacity: 0.55;
  }
  80% {
    transform: translate3d(-5%, 45%, 0) scale(1.0);
    opacity: 0.3;
  }
}


@keyframes blobPurple {
  0%, 100% {
    transform: translate3d(40%, 60%, 0) scale(0.9);
    opacity: 0;
  }
  20% { opacity: 0.75; }
  45% {
    transform: translate3d(55%, 20%, 0) scale(1.2);
    opacity: 0.8;
  }
  70% {
    transform: translate3d(80%, -5%, 0) scale(1.3);
    opacity: 0.55;
  }
  90% {
    transform: translate3d(60%, 40%, 0) scale(1.0);
    opacity: 0.3;
  }
}


@keyframes blobRightCenter {
  /* старт и финал совпадают — зациклено без рывка */
  0%, 100% {
    transform: translate3d(0, 0, 0) scale(0.9);
    opacity: 0.35;
  }

  /* выдвигаемся к центру и чуть вверх */
  25% {
    transform: translate3d(-35%, -10%, 0) scale(1.15);
    opacity: 0.65;
  }

  /* спускаемся чуть ниже центра */
  55% {
    transform: translate3d(-25%, 25%, 0) scale(1.25);
    opacity: 0.55;
  }

  /* возвращаемся ближе к правой стороне, но ещё не в исходную точку */
  80% {
    transform: translate3d(-10%, 5%, 0) scale(1.05);
    opacity: 0.45;
  }
}
/* ====== LAYOUT ====== */

.page {
  max-width: 1120px;
  margin: 0 auto;
  padding: 32px 18px 28px;
}

/* ====== HEADER ====== */

.site-header {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 32px;
}

.logo-wrap {
  flex-shrink: 0;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  padding: 4px;
  background:
    radial-gradient(circle at 30% 0%, rgba(34, 197, 94, 0.8), transparent 65%),
    radial-gradient(circle at 70% 100%, rgba(124, 58, 237, 0.8), transparent 65%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.85);
}

.logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
}

.header-main {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.title-block {
  max-width: 520px;
}

.title {
  margin: 0 0 4px;
  font-size: clamp(1.8rem, 3vw, 2.3rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tagline {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.98rem;
}

.lang-switch {
  display: flex;
  gap: 8px;
}

.lang-btn {
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(15, 23, 42, 0.9);
  color: var(--text-main);
  padding: 6px 16px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast),
    transform var(--transition-fast), box-shadow var(--transition-fast),
    color var(--transition-fast);
}

.lang-btn:hover {
  border-color: var(--accent-green);
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.5);
}

.lang-btn.active {
  background: radial-gradient(circle at 0% 0%, rgba(34, 197, 94, 0.2), transparent 70%),
    rgba(15, 23, 42, 0.98);
  border-color: var(--accent-green);
  color: #eafff4;
  transform: translateY(-1px);
}

/* ====== CONTENT SECTIONS ====== */

.content {
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.section-title {
  margin: 0 0 16px;
  font-size: 1.1rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #e5e7eb;
}

.intro-text {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 720px;
}

/* ====== VIDEO SECTION ====== */

.video-text {
  margin: 0 0 14px;
  color: var(--text-muted);
  max-width: 720px;
  line-height: 1.6;
}

.video-frame {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.45);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.9);
  background:
    radial-gradient(circle at 0% 0%, rgba(34, 197, 94, 0.25), transparent 70%),
    radial-gradient(circle at 100% 100%, rgba(124, 58, 237, 0.35), transparent 70%),
    rgba(15, 23, 42, 0.96);
}

.video-element {
  display: block;
  width: 100%;
  max-height: 720px;
}

.video-note {
  margin: 10px 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ====== PROJECTS GRID ====== */

.projects-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr);
}

.project-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-card);
  background: rgba(3, 7, 18, 0.9);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(10px);
  transition: transform var(--transition-slow), box-shadow var(--transition-slow),
    border-color var(--transition-slow), background var(--transition-slow);
}

.project-glow {
  position: absolute;
  inset: -40%;
  opacity: 0;
  background:
    radial-gradient(circle at 0% 0%, rgba(34, 197, 94, 0.3), transparent 55%),
    radial-gradient(circle at 100% 100%, rgba(124, 58, 237, 0.4), transparent 55%);
  mix-blend-mode: screen;
  transition: opacity 0.3s ease-out;
  pointer-events: none;
}

.project-inner {
  position: relative;
  display: flex;
  flex-direction: column;
}

/* картинка-постер */
.project-thumb {
  position: relative;
  height: 150px;
  overflow: hidden;
  border-radius: var(--radius-card) var(--radius-card) 0 0;
  background:
    radial-gradient(circle at 0% 0%, rgba(34, 197, 94, 0.45), transparent 70%),
    radial-gradient(circle at 100% 100%, rgba(124, 58, 237, 0.5), transparent 70%);
}

.project-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
  transition: transform 0.45s ease-out;
}

.project-body {
  padding: 14px 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* текст */
.project-label {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-green);
  opacity: 0.9;
}

.project-title {
  margin: 0;
  font-size: 1.05rem;
}

.project-desc {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.project-tag {
  margin-top: 6px;
  align-self: flex-start;
  font-size: 0.76rem;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  color: #cbd5f5;
  background:
    radial-gradient(circle at 0% 0%, rgba(124, 58, 237, 0.32), transparent 70%),
    rgba(15, 23, 42, 0.95);
}

/* hover */
.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.95);
  border-color: rgba(34, 197, 94, 0.9);
  background: rgba(3, 7, 18, 0.98);
}

.project-card:hover .project-glow {
  opacity: 1;
}

.project-card:hover .project-thumb img {
  transform: scale(1.07);
}

/* ====== ABOUT / CONTACT ====== */

.about-text,
.contact-text {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 700px;
}

.contact-email {
  margin: 10px 0 0;
  font-size: 0.9rem;
  color: var(--text-main);
}

.contact-email a {
  color: var(--accent-green);
  text-decoration: none;
  border-bottom: 1px dashed rgba(34, 197, 94, 0.6);
  padding-bottom: 1px;
}

.contact-email a:hover {
  border-bottom-style: solid;
}

/* ====== FOOTER (убираем странную полосу) ====== */

.site-footer {
  margin-top: 24px;
  padding: 8px 0 2px;
  font-size: 0.78rem;
  color: #6b7280;
  display: flex;
  justify-content: center;
  pointer-events: none;
  background: transparent; /* без отдельной плашки */
  border-top: 1px solid rgba(15, 23, 42, 0.6);
}

.footer-text {
  opacity: 0.9;
  pointer-events: auto;
}

/* ====== RESPONSIVE ====== */

@media (min-width: 720px) {
  .projects-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .header-main {
    flex-direction: column;
    align-items: flex-start;
  }

  .logo-wrap {
    width: 100px;
    height: 100px;
  }

  .video-element {
    max-height: none;
  }
}
