@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Space+Mono:ital,wght@0,400;0,700;1,400&display=swap');

/* ========================
   ПЕРЕМЕННЫЕ
   ======================== */
:root {
  --black:    #090712;
  --deep:     #52446D;
  --purple:   #966AAD;
  --lavender: #C79ACD;
  --pink:     #FAD8F8;
  --sq: #FAD8F8;    /* □ square  */
  --ci: #966AAD;    /* ○ circle  */
  --tr: #00E5FF;    /* △ triangle */
  --cr: #C79ACD;    /* ✕ cross   */
}

/* ========================
   PRELOADER
   ======================== */
#preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--black);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.7s ease, visibility 0.7s ease;
}
#preloader.pl-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
#preloader-rain {
  position: absolute;
  inset: 0;
  opacity: 0.35;
}
.pl-scanlines {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0, transparent 3px,
    rgba(0,0,0,0.18) 3px, rgba(0,0,0,0.18) 4px
  );
  pointer-events: none;
}
.pl-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
}
.pl-logo {
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(48px, 10vw, 96px);
  font-weight: 900;
  letter-spacing: 12px;
  color: var(--pink);
  text-shadow: 0 0 60px rgba(250,216,248,0.4), 0 0 120px rgba(250,216,248,0.15);
  animation: pl-glitch 3s infinite;
}
@keyframes pl-glitch {
  0%, 92%, 100% { transform: none; text-shadow: 0 0 60px rgba(250,216,248,0.4), 0 0 120px rgba(250,216,248,0.15); }
  93%  { transform: translate(-3px, 0) skewX(-4deg); text-shadow: 3px 0 0 rgba(0,229,255,0.7), -3px 0 0 rgba(150,106,173,0.7); }
  94%  { transform: translate(3px, 0) skewX(2deg);  text-shadow: -3px 0 0 rgba(0,229,255,0.7), 3px 0 0 rgba(150,106,173,0.7); }
  95%  { transform: none; }
  96%  { transform: translate(0, -2px); opacity: 0.8; }
  97%  { transform: none; opacity: 1; }
}
.pl-subtitle {
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  letter-spacing: 6px;
  color: var(--tr);
  opacity: 0.7;
}
.pl-bar-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 320px;
}
.pl-bar-track {
  flex: 1;
  height: 2px;
  background: rgba(82,68,109,0.3);
  overflow: hidden;
}
.pl-bar-fill {
  height: 100%;
  width: 0%;
  background: var(--tr);
  box-shadow: 0 0 8px var(--tr);
  transition: width 0.1s linear;
}
.pl-bar-pct {
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--tr);
  min-width: 36px;
  text-align: right;
}
.pl-log {
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  letter-spacing: 2px;
  color: rgba(82,68,109,0.8);
  height: 14px;
  transition: opacity 0.3s;
}

/* ========================
   STICKY HEADER
   ======================== */
.sticky-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  height: 56px;
  background: rgba(9,7,18,0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(82,68,109,0.25);
  transform: translateY(-100%);
  opacity: 0;
  transition: transform 0.4s ease, opacity 0.4s ease;
  pointer-events: none;
}
.sticky-header.sh-visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: all;
}
.sh-logo {
  font-family: 'Orbitron', sans-serif;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 5px;
  color: var(--pink);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.sh-logo-img {
  height: 28px;
  width: auto;
  display: block;
}
.sh-nav {
  display: flex;
  gap: 0;
}
.sh-link {
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  letter-spacing: 2px;
  color: rgba(250,216,248,0.45);
  text-decoration: none;
  padding: 6px 16px;
  transition: color 0.2s;
}
.sh-link:hover { color: var(--tr); }
.sh-cta {
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--black);
  background: var(--tr);
  padding: 6px 14px;
  text-decoration: none;
  flex-shrink: 0;
  transition: background 0.2s;
}
.sh-cta:hover { background: var(--pink); }
@media (max-width: 800px) {
  .sh-nav { display: none; }
  .sticky-header { padding: 0 24px; }
}

/* ========================
   EXTRAS: cursor / trail / progress / glitch / sidebar / konami
   ======================== */

/* скрываем системный курсор только когда активен кастомный */
.has-custom-cursor,
.has-custom-cursor * { cursor: none !important; }

#custom-cursor { position: fixed; top: 0; left: 0; pointer-events: none; z-index: 99999; }
#cursor-dot {
  position: absolute;
  width: 6px; height: 6px;
  background: var(--tr);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 6px var(--tr);
  transition: transform 0.1s, background 0.2s;
}
#cursor-ring {
  position: absolute;
  width: 32px; height: 32px;
  border: 1px solid rgba(0,229,255,0.55);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.2s, height 0.2s, opacity 0.2s, border-color 0.2s;
}
#custom-cursor.hovering #cursor-dot { transform: translate(-50%,-50%) scale(2.2); background: var(--pink); }
#custom-cursor.hovering #cursor-ring { width: 48px; height: 48px; border-color: var(--pink); opacity: 0.6; }
#custom-cursor.clicking #cursor-dot { transform: translate(-50%,-50%) scale(0.5); }
#custom-cursor.clicking #cursor-ring { width: 20px; height: 20px; opacity: 1; }

/* cursor trail canvas */
#trail-canvas {
  position: fixed; inset: 0;
  pointer-events: none; z-index: 9990;
  width: 100%; height: 100%;
}

/* scroll progress */
#scroll-progress {
  position: fixed; top: 0; left: 0;
  height: 2px; width: 0%;
  background: linear-gradient(90deg, var(--ci), var(--tr));
  box-shadow: 0 0 8px var(--tr);
  z-index: 9998;
  transition: width 0.1s linear;
}

/* click ripple */
.click-ripple {
  position: fixed;
  border-radius: 50%;
  border: 1.5px solid var(--tr);
  pointer-events: none;
  z-index: 9995;
  animation: ripple-out 0.55s ease-out forwards;
}
@keyframes ripple-out {
  from { width: 0; height: 0; opacity: 0.9; transform: translate(-50%,-50%) scale(1); }
  to   { width: 80px; height: 80px; opacity: 0; transform: translate(-50%,-50%) scale(1); }
}

/* glitch на hero-name */
.hero-name { position: relative; }
@keyframes hero-glitch {
  0%,89%,100% { transform: none; clip-path: none; text-shadow: 0 0 40px rgba(250,216,248,0.3); }
  90% { transform: translate(-4px,0) skewX(-6deg); clip-path: polygon(0 20%,100% 20%,100% 40%,0 40%);
        text-shadow: 4px 0 0 rgba(0,229,255,0.8), -4px 0 0 rgba(150,106,173,0.8); }
  91% { transform: translate(4px,0) skewX(4deg);  clip-path: polygon(0 60%,100% 60%,100% 80%,0 80%);
        text-shadow: -4px 0 0 rgba(0,229,255,0.8), 4px 0 0 rgba(150,106,173,0.8); }
  92% { transform: none; clip-path: none; }
  93% { transform: translate(-2px,1px); opacity: 0.7; }
  94% { transform: none; opacity: 1; }
}
.hero-name { animation: hero-glitch 6s infinite; }

/* neon flicker на nav-link */
@keyframes neon-flicker {
  0%,19%,21%,23%,25%,54%,56%,100% { opacity: 1; }
  20%,22%,24%,55% { opacity: 0.15; }
}
.nav-link.flickering { animation: neon-flicker 0.4s ease; }

/* scroll reveal */
.reveal { opacity: 0; transform: translateY(32px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* data sidebar */
#data-sidebar {
  position: fixed; right: 0; top: 0; bottom: 0;
  width: 28px; z-index: 100;
  pointer-events: none; opacity: 0.35;
}
#data-canvas { width: 28px; height: 100%; display: block; }

/* konami flash */
#konami-flash {
  position: fixed; inset: 0; z-index: 99998;
  background: radial-gradient(ellipse at center, rgba(0,229,255,0.15) 0%, transparent 70%);
  pointer-events: none; opacity: 0;
  transition: opacity 0.3s;
}
#konami-flash.active { opacity: 1; }

/* ========================
   БАЗА
   ======================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* overflow-x на html, НЕ на body — иначе position:fixed ломается */
html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: 'Space Mono', monospace;
  background: var(--black);
  color: var(--pink);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ========================
   HERO SECTION
   ======================== */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  overflow: hidden;
  background:
    url('image/city-bag-gradient-color.png') center center / cover no-repeat;
}

/* Тёмный оверлей — чтоб рамка читалась */
.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 50% 60% at 50% 50%, rgba(9,7,18,0.35) 0%, rgba(9,7,18,0.65) 100%),
    linear-gradient(to bottom, rgba(9,7,18,0.5) 0%, rgba(9,7,18,0.2) 40%, rgba(9,7,18,0.2) 60%, rgba(9,7,18,0.7) 100%);
  pointer-events: none;
  z-index: 1;
}

/* Canvas дождя */
#rain-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}

/* Сканлайны */
.scanlines {
  position: absolute;
  inset: 0;
  z-index: 3;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.08) 2px,
    rgba(0, 0, 0, 0.08) 4px
  );
  pointer-events: none;
  z-index: 2;
}

.hero-inner {
  position: relative;
  z-index: 4;
  width: min(900px, 90vw);
  padding: 60px 0 80px;
}

/* ========================
   НЕОНОВАЯ РАМКА (как в Фигме)
   ======================== */
.neon-frame {
  position: relative;
  padding: 50px 60px;
  border: 1px solid rgba(199,154,205,0.25);
  background: rgba(9,7,18,0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.hero-inner {
  margin-top: -8vh;
}

/* Углы рамки */
.neon-frame::before,
.neon-frame::after,
.neon-frame .fc-br::before,
.neon-frame .fc-br::after {
  content: '';
  position: absolute;
  width: 28px;
  height: 28px;
}

.neon-frame::before {
  top: -2px; left: -2px;
  border-top: 2px solid var(--tr);
  border-left: 2px solid var(--tr);
  box-shadow: -4px -4px 14px rgba(0,229,255,0.5);
}
.neon-frame::after {
  top: -2px; right: -2px;
  border-top: 2px solid var(--tr);
  border-right: 2px solid var(--tr);
  box-shadow: 4px -4px 14px rgba(0,229,255,0.5);
}
.neon-frame .fc-br::before {
  bottom: -2px; left: -2px;
  border-bottom: 2px solid var(--sq);
  border-left: 2px solid var(--sq);
  box-shadow: -4px 4px 14px rgba(250,216,248,0.5);
}
.neon-frame .fc-br::after {
  bottom: -2px; right: -2px;
  border-bottom: 2px solid var(--sq);
  border-right: 2px solid var(--sq);
  box-shadow: 4px 4px 14px rgba(250,216,248,0.5);
}

/* метки углов */
.frame-label {
  position: absolute;
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  letter-spacing: 2px;
  opacity: 0.4;
  color: var(--tr);
}
.frame-label.tl { top: 8px; left: 36px; }
.frame-label.tr { top: 8px; right: 36px; text-align: right; }
.frame-label.bl { bottom: 8px; left: 36px; }

/* ========================
   HERO NAVIGATION
   ======================== */
.hero-nav {
  display: flex;
  gap: 0;
  justify-content: center;
  margin-bottom: 48px;
  border-bottom: 1px solid rgba(199,154,205,0.15);
  padding-bottom: 24px;
}

.nav-link {
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(250,216,248,0.55);
  text-decoration: none;
  padding: 8px 24px;
  position: relative;
  transition: color 0.3s;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 50%;
  right: 50%;
  height: 1px;
  background: var(--lavender);
  transition: left 0.3s, right 0.3s;
  box-shadow: 0 0 8px var(--lavender);
}

.nav-link:hover {
  color: var(--pink);
}
.nav-link:hover::after {
  left: 24px;
  right: 24px;
}

/* ========================
   HERO TITLE
   ======================== */
.hero-title {
  text-align: center;
}

.hero-name {
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(52px, 10vw, 108px);
  font-weight: 900;
  letter-spacing: 8px;
  line-height: 1;
  color: var(--pink);
  text-shadow:
    0 0 20px rgba(250,216,248,0.6),
    0 0 60px rgba(199,154,205,0.3),
    0 0 120px rgba(150,106,173,0.2);
  position: relative;
  display: inline-block;
}

.hero-sub {
  font-family: 'Space Mono', monospace;
  font-size: clamp(12px, 1.8vw, 16px);
  letter-spacing: 6px;
  color: var(--tr);
  text-transform: uppercase;
  margin-top: 16px;
  opacity: 0.85;
  text-shadow: 0 0 12px rgba(0,229,255,0.5);
}

.hero-jp {
  font-size: 13px;
  letter-spacing: 4px;
  color: rgba(150,106,173,0.5);
  margin-top: 10px;
  font-style: italic;
}

/* Glitch анимация на имени */
@keyframes glitch {
  0%, 90%, 100% { clip-path: none; transform: none; }
  91% {
    clip-path: polygon(0 20%, 100% 20%, 100% 40%, 0 40%);
    transform: translate(-3px, 0);
    color: var(--tr);
  }
  93% {
    clip-path: polygon(0 60%, 100% 60%, 100% 75%, 0 75%);
    transform: translate(3px, 0);
    color: var(--sq);
  }
  95% {
    clip-path: polygon(0 45%, 100% 45%, 100% 55%, 0 55%);
    transform: translate(-2px, 0);
    color: var(--pink);
  }
  97% { clip-path: none; transform: none; color: var(--pink); }
}

.hero-name { animation: glitch 6s infinite; }

/* ========================
   КОНТЕНТ СЕКЦИИ
   ======================== */
.cyber-section {
  padding: 100px 40px 120px;
  max-width: 1100px;
  margin: 0 auto;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 60px;
}

.section-btn-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  flex-shrink: 0;
  border: 2px solid;
}

.section-title {
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(26px, 4.5vw, 44px);
  font-weight: 700;
  letter-spacing: 4px;
  text-transform: uppercase;
}

.section-divider {
  flex: 1;
  height: 1px;
  opacity: 0.3;
}

.section-code {
  font-size: 13px;
  letter-spacing: 2px;
  opacity: 0.4;
}

/* ========================
   КИБЕР ПАНЕЛЬ (карточка)
   ======================== */
.cyber-panel {
  position: relative;
  background: rgba(82,68,109,0.06);
  border: 1px solid rgba(199,154,205,0.15);
  padding: 32px;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.cyber-panel::before {
  content: '';
  position: absolute;
  top: -1px; left: 16px;
  width: 60px; height: 2px;
}

.cyber-panel:hover {
  border-color: rgba(199,154,205,0.35);
  box-shadow: 0 0 30px rgba(150,106,173,0.08), inset 0 0 40px rgba(82,68,109,0.05);
}

/* ========================
   □ ПОРТФОЛИО
   ======================== */
#portfolio .section-btn-icon {
  color: var(--sq);
  border-color: var(--sq);
  box-shadow: 0 0 16px rgba(250,216,248,0.3), inset 0 0 16px rgba(250,216,248,0.05);
  border-radius: 4px;
}
#portfolio .section-title  { color: var(--sq); text-shadow: 0 0 20px rgba(250,216,248,0.4); }
#portfolio .section-divider { background: linear-gradient(to right, var(--sq), transparent); }
#portfolio .cyber-panel::before { background: var(--sq); box-shadow: 0 0 8px var(--sq); }

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.project-card {
  border: 1px solid rgba(250,216,248,0.18);
  background: rgba(250,216,248,0.02);
  padding: 0;
  overflow: hidden;
  transition: all 0.3s;
  cursor: pointer;
}

.project-card:hover {
  border-color: rgba(250,216,248,0.5);
  box-shadow: 0 0 30px rgba(250,216,248,0.1);
  transform: translateY(-4px);
}

.card-thumb {
  height: 160px;
  background: linear-gradient(135deg, rgba(82,68,109,0.3) 0%, rgba(250,216,248,0.05) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Orbitron', sans-serif;
  font-size: 13px;
  letter-spacing: 4px;
  color: rgba(250,216,248,0.3);
  border-bottom: 1px solid rgba(250,216,248,0.1);
  position: relative;
  overflow: hidden;
}

.card-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 8px,
    rgba(250,216,248,0.02) 8px,
    rgba(250,216,248,0.02) 9px
  );
}

.card-body { padding: 20px; }

.card-num {
  font-size: 12px;
  letter-spacing: 3px;
  color: var(--sq);
  opacity: 0.6;
  margin-bottom: 8px;
}

.card-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 15px;
  letter-spacing: 2px;
  color: var(--pink);
  margin-bottom: 12px;
}

.card-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tag {
  font-size: 13px;
  letter-spacing: 2px;
  padding: 3px 10px;
  border: 1px solid rgba(250,216,248,0.2);
  color: rgba(250,216,248,0.5);
}

/* ========================
   ○ ОБО МНЕ
   ======================== */
#about .section-btn-icon {
  color: var(--ci);
  border-color: var(--ci);
  box-shadow: 0 0 16px rgba(150,106,173,0.35), inset 0 0 16px rgba(150,106,173,0.05);
}
#about .section-title  { color: var(--ci); text-shadow: 0 0 20px rgba(150,106,173,0.5); }
#about .section-divider { background: linear-gradient(to right, var(--ci), transparent); }
#about .cyber-panel::before { background: var(--ci); box-shadow: 0 0 8px var(--ci); }

/* About — новый лейаут с фото */
.about-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  align-items: start;
}

.about-right {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Фото */
.about-photo-wrap {
  position: relative;
  padding: 0;
  overflow: hidden;
  aspect-ratio: 3/4;
}

.about-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  filter: contrast(1.08) saturate(0.85);
  transition: filter 0.4s;
}

.about-photo-wrap:hover .about-photo {
  filter: contrast(1.12) saturate(1) brightness(1.05);
}

.about-photo-scan {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 3px,
    rgba(9,7,18,0.18) 3px,
    rgba(9,7,18,0.18) 4px
  );
  pointer-events: none;
  z-index: 2;
}

.about-photo-corner {
  position: absolute;
  width: 18px;
  height: 18px;
  z-index: 3;
}
.apc-tl { top: 8px;    left: 8px;   border-top: 2px solid var(--tr); border-left: 2px solid var(--tr); }
.apc-tr { top: 8px;    right: 8px;  border-top: 2px solid var(--tr); border-right: 2px solid var(--tr); }
.apc-bl { bottom: 28px; left: 8px;  border-bottom: 2px solid var(--tr); border-left: 2px solid var(--tr); }
.apc-br { bottom: 28px; right: 8px; border-bottom: 2px solid var(--tr); border-right: 2px solid var(--tr); }

.about-photo-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 6px 12px;
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  letter-spacing: 2px;
  color: var(--tr);
  background: rgba(9,7,18,0.75);
  z-index: 3;
}

@media (max-width: 820px) {
  .about-layout { grid-template-columns: 1fr; }
  .about-photo-wrap { aspect-ratio: 4/3; max-height: 340px; }
}

/* Старый about-grid на случай если где-то ещё используется */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
@media (max-width: 700px) { .about-grid { grid-template-columns: 1fr; } }

.about-bio {
  font-size: 14px;
  line-height: 2;
  color: rgba(250,216,248,0.7);
  margin-bottom: 28px;
}

.about-bio span {
  color: var(--ci);
  font-weight: 700;
}

.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.skill-tag {
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  letter-spacing: 2px;
  padding: 6px 14px;
  border: 1px solid rgba(150,106,173,0.4);
  color: var(--lavender);
  background: rgba(150,106,173,0.06);
  transition: all 0.2s;
}

.skill-tag:hover {
  border-color: var(--ci);
  color: var(--ci);
  box-shadow: 0 0 12px rgba(150,106,173,0.3);
}

.figma-portfolio-link {
  display: inline-block;
  margin-bottom: 32px;
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  letter-spacing: 3px;
  color: var(--tr);
  text-decoration: none;
  border: 1px solid rgba(0,229,255,0.2);
  padding: 10px 20px;
  transition: all 0.2s;
  background: rgba(0,229,255,0.03);
}
.figma-portfolio-link:hover {
  border-color: var(--tr);
  background: rgba(0,229,255,0.07);
  box-shadow: 0 0 20px rgba(0,229,255,0.1);
}

.about-more-link {
  display: inline-block;
  margin-top: 24px;
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  letter-spacing: 3px;
  color: var(--tr);
  text-decoration: none;
  border-bottom: 1px solid rgba(0,229,255,0.3);
  padding-bottom: 2px;
  transition: all 0.2s;
}
.about-more-link:hover {
  color: var(--pink);
  border-color: var(--pink);
  text-shadow: 0 0 12px rgba(250,216,248,0.4);
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.stat-item {
  text-align: center;
  padding: 28px 16px;
  border: 1px solid rgba(150,106,173,0.2);
  background: rgba(150,106,173,0.04);
}

.stat-num {
  font-family: 'Orbitron', sans-serif;
  font-size: 36px;
  font-weight: 900;
  color: var(--ci);
  text-shadow: 0 0 20px rgba(150,106,173,0.5);
  line-height: 1;
}

.stat-label {
  font-size: 12px;
  letter-spacing: 3px;
  color: rgba(250,216,248,0.4);
  margin-top: 8px;
  text-transform: uppercase;
}

/* ========================
   △ УСЛУГИ
   ======================== */
#services .section-btn-icon {
  color: var(--tr);
  border-color: var(--tr);
  box-shadow: 0 0 16px rgba(0,229,255,0.3), inset 0 0 16px rgba(0,229,255,0.04);
  border-radius: 4px;
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
  border-radius: 0;
  background: rgba(0,229,255,0.08);
}
#services .section-title  { color: var(--tr); text-shadow: 0 0 20px rgba(0,229,255,0.4); }
#services .section-divider { background: linear-gradient(to right, var(--tr), transparent); }
#services .cyber-panel::before { background: var(--tr); box-shadow: 0 0 8px var(--tr); }

/* Секция Услуги с изо-фоном */
.services-bg-section {
  position: relative;
  overflow: hidden;
  background: var(--black);
  padding: 0;
}

#iso-canvas-svc {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.services-inner {
  position: relative;
  z-index: 2;
  max-width: 1100px;
  margin: 0 auto;
  padding: 100px 40px 120px;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

.service-card {
  border: 1px solid rgba(0,229,255,0.2);
  background: rgba(9,7,18,0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 32px 24px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s;
  cursor: default;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(to right, transparent, var(--tr), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.service-card:hover {
  border-color: rgba(0,229,255,0.5);
  background: rgba(9,7,18,0.45);
  box-shadow: 0 0 40px rgba(0,229,255,0.15), inset 0 0 20px rgba(0,229,255,0.04);
  transform: translateY(-5px);
}

.service-card:hover::before { opacity: 1; }

.service-icon {
  font-size: 28px;
  margin-bottom: 20px;
  display: block;
  filter: drop-shadow(0 0 8px rgba(0,229,255,0.4));
}

.service-name {
  font-family: 'Orbitron', sans-serif;
  font-size: 13px;
  letter-spacing: 2px;
  color: var(--tr);
  margin-bottom: 12px;
}

.service-desc {
  font-size: 12px;
  line-height: 1.8;
  color: rgba(250,216,248,0.5);
}

/* ========================
   ✕ СВЯЗЬ
   ======================== */
#contact .section-btn-icon {
  color: var(--cr);
  border-color: var(--cr);
  box-shadow: 0 0 16px rgba(199,154,205,0.3), inset 0 0 16px rgba(199,154,205,0.05);
}
#contact .section-title  { color: var(--cr); text-shadow: 0 0 20px rgba(199,154,205,0.4); }
#contact .section-divider { background: linear-gradient(to right, var(--cr), transparent); }
#contact .cyber-panel::before { background: var(--cr); box-shadow: 0 0 8px var(--cr); }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}

@media (max-width: 700px) { .contact-grid { grid-template-columns: 1fr; } }

.contact-info-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(199,154,205,0.1);
}

.contact-info-icon {
  font-size: 18px;
  width: 36px;
  text-align: center;
  opacity: 0.7;
}

.contact-info-label {
  font-size: 12px;
  letter-spacing: 3px;
  color: var(--cr);
  opacity: 0.7;
}

.contact-info-value {
  font-size: 13px;
  color: var(--pink);
  margin-top: 3px;
}

.contact-note {
  font-size: 12px;
  line-height: 2;
  color: rgba(250,216,248,0.5);
  margin-top: 24px;
}

.neon-btn {
  display: inline-block;
  margin-top: 28px;
  padding: 14px 36px;
  font-family: 'Orbitron', sans-serif;
  font-size: 13px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--cr);
  border: 1px solid var(--cr);
  background: rgba(199,154,205,0.05);
  cursor: pointer;
  transition: all 0.25s;
  text-decoration: none;
}

.neon-btn:hover {
  background: rgba(199,154,205,0.12);
  box-shadow: 0 0 24px rgba(199,154,205,0.25), inset 0 0 24px rgba(199,154,205,0.05);
  color: var(--pink);
}

/* ========================
   ПОРТФОЛИО — карточки-ссылки
   ======================== */
.project-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform 0.25s, box-shadow 0.25s;
}
.project-link:hover {
  transform: translateY(-4px);
  box-shadow: 0 0 32px rgba(250,216,248,0.15), 0 0 0 1px var(--sq);
}

.card-thumb {
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  margin-bottom: 14px;
  position: relative;
  overflow: hidden;
  background: rgba(82,68,109,0.25);
  border: 1px solid rgba(82,68,109,0.4);
  font-family: 'Orbitron', sans-serif;
  font-size: 13px;
  letter-spacing: 2px;
  color: rgba(250,216,248,0.4);
}
.card-thumb::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(82,68,109,0.07) 3px,
    rgba(82,68,109,0.07) 4px
  );
  pointer-events: none;
}
.card-thumb--proava { background: linear-gradient(rgba(9,7,18,0.35),rgba(9,7,18,0.35)), url('image/cover_portfolio/cover_pro_aba_club.png') center/cover no-repeat; }
.card-thumb--aba    { background: linear-gradient(rgba(9,7,18,0.35),rgba(9,7,18,0.35)), url('image/cover_portfolio/cover_aba_con_2026.png') center/cover no-repeat; }
.card-thumb--swp    { background: linear-gradient(rgba(9,7,18,0.35),rgba(9,7,18,0.35)), url('image/cover_portfolio/cover_subwaterpumps.png') center/cover no-repeat; }
.card-thumb--psih   { background: linear-gradient(rgba(9,7,18,0.35),rgba(9,7,18,0.35)), url('image/cover_portfolio/cover_psihogolik_design.png') center/cover no-repeat; }
.card-thumb--imax   { background: linear-gradient(rgba(9,7,18,0.35),rgba(9,7,18,0.35)), url('image/cover_portfolio/cover_imax_tattoo.png') center/cover no-repeat; }

.card-thumb-label {
  font-family: 'Orbitron', sans-serif;
  font-size: 12px;
  letter-spacing: 3px;
  color: rgba(250,216,248,0.5);
  text-transform: uppercase;
  position: relative;
  z-index: 1;
}

/* ========================
   СОЦСЕТИ В БЛОКЕ СВЯЗИ
   ======================== */
.social-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}

.social-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border: 1px solid rgba(82,68,109,0.35);
  border-radius: 6px;
  text-decoration: none;
  color: var(--pink);
  background: rgba(82,68,109,0.08);
  transition: all 0.25s;
  cursor: pointer;
}
.social-item:hover {
  background: rgba(82,68,109,0.2);
  border-color: var(--lavender);
  transform: translateX(4px);
}
.social-ico {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  opacity: 0.8;
}
.social-platform {
  font-family: 'Orbitron', sans-serif;
  font-size: 13px;
  letter-spacing: 2px;
  opacity: 0.5;
  margin-bottom: 2px;
}
.social-handle {
  font-size: 12px;
  letter-spacing: 1px;
}
.social-arrow {
  margin-left: auto;
  opacity: 0.3;
  font-size: 16px;
  transition: opacity 0.2s, transform 0.2s;
}
.social-item:hover .social-arrow {
  opacity: 0.9;
  transform: translateX(3px);
}

.social-tg:hover   { border-color: #29a9eb; color: #29a9eb; }
.social-wa:hover   { border-color: #25d366; color: #25d366; }
.social-ig:hover   { border-color: #e1306c; color: #e1306c; }
.social-vk:hover   { border-color: #4c75a3; color: #4c75a3; }
.social-mail:hover { border-color: #FAD8F8; color: #FAD8F8; }
.social-li:hover   { border-color: #0a66c2; color: #0a66c2; }

/* ========================
   МИНИ-ИГРА — ARCADE
   ======================== */
.arcade-trigger {
  padding: 5px 14px;
  font-family: 'Orbitron', sans-serif;
  font-size: 13px;
  letter-spacing: 2px;
  color: var(--tr);
  border: 1px solid rgba(0,229,255,0.5);
  background: rgba(0,229,255,0.04);
  cursor: pointer;
  transition: all 0.25s;
  text-transform: uppercase;
  white-space: nowrap;
  position: relative;
  z-index: 20;
}
.arcade-trigger:hover {
  background: rgba(0,229,255,0.12);
  box-shadow: 0 0 16px rgba(0,229,255,0.25);
  border-color: var(--tr);
}

/* Оверлей */
.arcade-overlay {
  position: fixed;
  inset: 0;
  background: rgba(9,7,18,0.92);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  backdrop-filter: blur(6px);
}
.arcade-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

/* Панель игры */
.arcade-panel {
  width: min(460px, 92vw);
  border: 1px solid var(--tr);
  background: rgba(9,7,18,0.97);
  padding: 28px 28px 32px;
  position: relative;
  box-shadow: 0 0 60px rgba(0,229,255,0.15), inset 0 0 40px rgba(0,229,255,0.02);
}
.arcade-panel::before,
.arcade-panel::after {
  content: '';
  position: absolute;
  width: 12px; height: 12px;
  border-color: var(--tr);
  border-style: solid;
}
.arcade-panel::before { top: -1px; left: -1px;  border-width: 2px 0 0 2px; }
.arcade-panel::after  { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; }

.arcade-head {
  font-family: 'Orbitron', sans-serif;
  font-size: 13px;
  letter-spacing: 3px;
  color: var(--tr);
  margin-bottom: 6px;
}
.arcade-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 22px;
  font-weight: 900;
  color: var(--pink);
  margin-bottom: 20px;
  letter-spacing: 2px;
}

/* Статусная строка */
.arcade-hud {
  display: flex;
  justify-content: space-between;
  margin-bottom: 24px;
  font-family: 'Orbitron', sans-serif;
  font-size: 13px;
  letter-spacing: 2px;
}
.arcade-hud-block span { display: block; color: rgba(250,216,248,0.35); font-size: 13px; margin-bottom: 3px; }
.arcade-hud-block strong { color: var(--pink); font-size: 18px; }
.arcade-lives { color: #e1306c; letter-spacing: 4px; font-size: 16px; }

/* Кнопки — абсолютное позиционирование, PS-раскладка */
.arcade-buttons {
  position: relative;
  width: 220px;
  height: 220px;
  margin: 0 auto 24px;
}

.arcade-btn {
  position: absolute;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  border: 2px solid rgba(82,68,109,0.4);
  background: rgba(9,7,18,0.8);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s;
  user-select: none;
  pointer-events: auto;
}
.arcade-btn .btn-sym  { font-size: 24px; line-height: 1; }
.arcade-btn .btn-key  { font-family: 'Space Mono', monospace; font-size: 13px; opacity: 0.4; margin-top: 4px; letter-spacing: 1px; }

/* Активная (нужно нажать) */
.arcade-btn.active-sq { border-color: #FAD8F8; box-shadow: 0 0 30px rgba(250,216,248,0.7), inset 0 0 20px rgba(250,216,248,0.12); color: #FAD8F8; }
.arcade-btn.active-ci { border-color: #966AAD; box-shadow: 0 0 30px rgba(150,106,173,0.8), inset 0 0 20px rgba(150,106,173,0.18); color: #966AAD; }
.arcade-btn.active-tr { border-color: #00E5FF; box-shadow: 0 0 30px rgba(0,229,255,0.8),   inset 0 0 20px rgba(0,229,255,0.18);   color: #00E5FF; }
.arcade-btn.active-cr { border-color: #C79ACD; box-shadow: 0 0 30px rgba(199,154,205,0.7), inset 0 0 20px rgba(199,154,205,0.12); color: #C79ACD; }

/* Правильно нажата */
.arcade-btn.hit { transform: scale(0.88); }

/* Неправильно */
.arcade-btn.miss { border-color: #ff3355 !important; box-shadow: 0 0 24px rgba(255,51,85,0.7) !important; }

@keyframes btnPulse {
  from { transform: scale(0.97); }
  to   { transform: scale(1.04); }
}

/* Таймер-бар */
.arcade-timer-bar {
  height: 3px;
  background: rgba(82,68,109,0.3);
  border-radius: 2px;
  margin-bottom: 18px;
  overflow: hidden;
}
.arcade-timer-fill {
  height: 100%;
  background: var(--tr);
  border-radius: 2px;
  width: 100%;
  transition: width linear;
  box-shadow: 0 0 8px rgba(0,229,255,0.6);
}
.arcade-timer-fill.danger { background: #ff3355; box-shadow: 0 0 8px rgba(255,51,85,0.6); }

/* Сообщение */
.arcade-msg {
  text-align: center;
  font-family: 'Orbitron', sans-serif;
  font-size: 12px;
  letter-spacing: 2px;
  height: 20px;
  color: var(--tr);
  margin-bottom: 16px;
}
.arcade-msg.good  { color: #00E5FF; }
.arcade-msg.bad   { color: #ff3355; }
.arcade-msg.combo { color: #FAD8F8; }

/* Кнопка закрыть */
.arcade-close {
  position: absolute;
  top: 14px; right: 18px;
  background: none;
  border: none;
  color: rgba(250,216,248,0.35);
  font-size: 18px;
  cursor: pointer;
  font-family: 'Space Mono', monospace;
  transition: color 0.2s;
}
.arcade-close:hover { color: var(--pink); }

/* Game over */
.arcade-gameover {
  display: none;
  text-align: center;
  padding: 20px 0 10px;
}
.arcade-gameover.show { display: block; }
.arcade-gameover-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 28px;
  font-weight: 900;
  color: #ff3355;
  letter-spacing: 4px;
  margin-bottom: 8px;
  text-shadow: 0 0 30px rgba(255,51,85,0.5);
}
.arcade-gameover-score {
  font-family: 'Orbitron', sans-serif;
  font-size: 13px;
  letter-spacing: 2px;
  color: var(--lavender);
  margin-bottom: 20px;
}
.arcade-gameover-best {
  font-size: 12px;
  letter-spacing: 2px;
  color: rgba(250,216,248,0.4);
  margin-bottom: 24px;
}
.arcade-restart {
  padding: 10px 32px;
  font-family: 'Orbitron', sans-serif;
  font-size: 13px;
  letter-spacing: 3px;
  border: 1px solid var(--tr);
  background: rgba(0,229,255,0.05);
  color: var(--tr);
  cursor: pointer;
  transition: all 0.2s;
}
.arcade-restart:hover {
  background: rgba(0,229,255,0.12);
  box-shadow: 0 0 20px rgba(0,229,255,0.2);
}

/* ========================
   КОНТРОЛЛЕР
   ======================== */
/* ========================
   FOG REVEAL
   ======================== */
.fog-section {
  position: relative;
  width: 100%;
  height: 420px;
  overflow: hidden;
  background: var(--black);
  display: flex;
  align-items: center;
  user-select: none;
  -webkit-user-select: none;
  justify-content: center;
}

#fog-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

.fog-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 0 40px;
  max-width: 700px;
}

.fog-label {
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  letter-spacing: 4px;
  color: var(--tr);
  opacity: 0.5;
  margin-bottom: 20px;
}

.fog-statement {
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(36px, 7vw, 72px);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: 3px;
  color: var(--pink);
  text-shadow: 0 0 60px rgba(250,216,248,0.25);
  margin-bottom: 16px;
}

.fog-sub {
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  letter-spacing: 4px;
  color: var(--tr);
  margin-bottom: 32px;
  opacity: 0.7;
}

.fog-quote {
  font-size: 15px;
  line-height: 1.9;
  color: rgba(250,216,248,0.6);
  font-style: italic;
  margin-bottom: 16px;
}

.fog-author {
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  letter-spacing: 3px;
  color: var(--deep);
}

.fog-hint {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  letter-spacing: 3px;
  color: var(--tr);
  z-index: 3;
  pointer-events: none;
  white-space: nowrap;
  animation: fogHintPulse 2.5s ease-in-out infinite;
}

@keyframes fogHintPulse {
  0%, 100% { opacity: 0.35; }
  50%       { opacity: 0.7; }
}

/* ========================
   THEME HUD
   ======================== */
.theme-hud {
  position: fixed;
  bottom: 170px;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  font-family: 'Orbitron', sans-serif;
  font-size: 13px;
  letter-spacing: 4px;
  color: var(--tr);
  background: rgba(9,7,18,0.85);
  border: 1px solid var(--tr);
  padding: 8px 20px;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
  white-space: nowrap;
  box-shadow: 0 0 20px rgba(0,229,255,0.2);
}

.theme-hud.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ========================
   CONTROLLER
   ======================== */
#controller-hint {
  position: fixed;
  bottom: 202px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  letter-spacing: 3px;
  color: var(--tr);
  opacity: 0;
  animation: hint-pulse 2.5s ease-in-out 1.5s 3 forwards;
  pointer-events: none;
  white-space: nowrap;
}
#controller-hint.hint-gone { display: none; }
@keyframes hint-pulse {
  0%   { opacity: 0;   transform: translateX(-50%) translateY(4px); }
  30%  { opacity: 0.8; transform: translateX(-50%) translateY(0); }
  70%  { opacity: 0.8; transform: translateX(-50%) translateY(0); }
  100% { opacity: 0;   transform: translateX(-50%) translateY(-4px); }
}

#controller-wrap {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) scale(0.6);
    transform-origin: center bottom;
    z-index: 999;
    transform-style: preserve-3d;
    will-change: transform, filter;
}

/* ambientGlow теперь управляется через GSAP (динамическая тень при наклоне) */

/* тачпад дышит */
@keyframes touchpadBreath {
    0%, 100% { filter: drop-shadow(0 0 5px rgba(199,154,205,0.3)); }
    50%       { filter: drop-shadow(0 0 20px rgba(199,154,205,0.75)) drop-shadow(0 0 10px rgba(250,216,248,0.5)); }
}
#touchpad-up { animation: touchpadBreath 3s ease-in-out infinite; }

/* кнопка микрофона пульсирует */
@keyframes micButtonPulse {
    0%, 100% { filter: drop-shadow(0 0 2px rgba(199,154,205,0.3)); opacity: 0.55; }
    50%       { filter: drop-shadow(0 0 12px rgba(199,154,205,1)); opacity: 1; }
}
#glowing-microphone-button { animation: micButtonPulse 2s ease-in-out infinite; }

/* триггеры мерцают поочерёдно */
@keyframes triggerShimmer {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.7; filter: drop-shadow(0 2px 10px rgba(150,106,173,0.7)); }
}
#l-1 { animation: triggerShimmer 3.5s ease-in-out infinite; }
#r-1 { animation: triggerShimmer 3.5s ease-in-out infinite 0.7s; }

/* ========================
   REVIEWS
   ======================== */
.reviews-ticker-wrap {
  overflow: hidden;
  padding: 8px 0 60px;
  mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
}
.reviews-ticker {
  display: flex;
  gap: 24px;
  width: max-content;
  animation: rv-scroll 40s linear infinite;
}
.reviews-ticker:hover { animation-play-state: paused; }
@keyframes rv-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ── Портфолио карусель: стрелки и точки (только мобилка) ── */
.portfolio-carousel-wrap {
  display: none;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 12px;
}
.pf-arrow {
  background: transparent;
  border: 1px solid rgba(0,229,255,0.4);
  color: var(--tr);
  font-size: 22px;
  width: 40px;
  height: 40px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s;
  line-height: 1;
}
.pf-arrow:active { background: rgba(0,229,255,0.1); border-color: var(--tr); }

.pf-dots {
  display: none;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
}
.pf-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(0,229,255,0.2);
  border: 1px solid rgba(0,229,255,0.4);
  transition: background 0.3s, transform 0.3s;
  cursor: pointer;
}
.pf-dot.active {
  background: var(--tr);
  border-color: var(--tr);
  transform: scale(1.4);
  box-shadow: 0 0 8px rgba(0,229,255,0.6);
}

/* ── Dots индикатор карусели (скрыт на десктопе) ── */
.rv-dots {
  display: none;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
}
.rv-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(150,106,173,0.3);
  border: 1px solid rgba(150,106,173,0.5);
  transition: background 0.3s, transform 0.3s;
  cursor: pointer;
}
.rv-dot.active {
  background: var(--tr);
  border-color: var(--tr);
  transform: scale(1.4);
  box-shadow: 0 0 8px rgba(0,229,255,0.6);
}
.rv-card {
  width: 360px;
  flex-shrink: 0;
  border: 1px solid rgba(82,68,109,0.3);
  background: rgba(82,68,109,0.06);
  padding: 32px 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: border-color 0.3s, transform 0.3s;
  position: relative;
}
.rv-card:hover {
  border-color: rgba(0,229,255,0.35);
  transform: translateY(-4px);
  background: rgba(0,229,255,0.03);
}
.rv-quote {
  font-family: 'Orbitron', sans-serif;
  font-size: 48px;
  font-weight: 900;
  color: var(--tr);
  opacity: 0.2;
  line-height: 1;
  position: absolute;
  top: 16px;
  right: 24px;
}
.rv-text {
  font-size: 13px;
  line-height: 1.85;
  color: rgba(250,216,248,0.65);
  flex: 1;
}
.rv-author {
  display: flex;
  flex-direction: column;
  gap: 3px;
  border-left: 2px solid var(--tr);
  padding-left: 12px;
}
.rv-name {
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  letter-spacing: 2px;
  color: var(--pink);
}
.rv-role {
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--deep);
}
.rv-stars {
  font-size: 12px;
  color: var(--tr);
  letter-spacing: 2px;
}

/* ========================
   FOOTER PADDING (место под контроллер)
   ======================== */
/* ========================
   FOOTER
   ======================== */
/* ========================
   ISO FLOOR
   ======================== */
.iso-section {
  position: relative;
  width: 100%;
  height: 420px;
  overflow: hidden;
  background: var(--black);
}

#iso-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.iso-hint {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  letter-spacing: 3px;
  color: var(--tr);
  opacity: 0.35;
  pointer-events: none;
  white-space: nowrap;
}

/* ========================
   FOOTER
   ======================== */
.site-footer {
  position: relative;
  margin-top: 80px;
  padding-bottom: 120px; /* место под джойстик */
  background: linear-gradient(to bottom, transparent, rgba(9,7,18,0.98));
}

.footer-line {
  position: absolute;
  top: 0;
  left: 40px;
  right: 40px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--deep) 20%, var(--tr) 50%, var(--deep) 80%, transparent);
  box-shadow: 0 0 12px rgba(0,229,255,0.25);
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 40px 0;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: start;
  gap: 32px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-spacer { /* пустой центр — место под джойстик */ }

.footer-logo {
  font-family: 'Orbitron', sans-serif;
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 6px;
  color: var(--pink);
  text-shadow: 0 0 24px rgba(250,216,248,0.4);
}

.footer-tagline {
  font-size: 12px;
  letter-spacing: 3px;
  color: var(--deep);
  margin-top: 6px;
}

.footer-socials {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.footer-soc {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(82,68,109,0.5);
  color: var(--deep);
  transition: all 0.25s;
  background: rgba(9,7,18,0.6);
}

.footer-soc svg {
  width: 16px;
  height: 16px;
}

.footer-soc:hover {
  border-color: var(--tr);
  color: var(--tr);
  box-shadow: 0 0 16px rgba(0,229,255,0.3);
  background: rgba(0,229,255,0.06);
}

.footer-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.footer-sys {
  font-family: 'Orbitron', sans-serif;
  font-size: 13px;
  letter-spacing: 3px;
  color: var(--tr);
  opacity: 0.6;
}

.footer-bar {
  display: block;
  width: 120px;
  height: 3px;
  background: rgba(82,68,109,0.3);
  position: relative;
  overflow: hidden;
}

.footer-bar-fill {
  display: block;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--deep), var(--tr));
  box-shadow: 0 0 8px rgba(0,229,255,0.5);
  animation: footerBar 3s ease-in-out infinite alternate;
}

@keyframes footerBar {
  from { opacity: 0.4; }
  to   { opacity: 1; }
}

.footer-year {
  font-size: 12px;
  letter-spacing: 2px;
  color: rgba(199,154,205,0.4);
}

@media (max-width: 700px) {
  .footer-inner {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 40px 24px 0;
  }
  .footer-spacer { display: none; }
  .footer-socials { justify-content: center; }
  .footer-copy { align-items: center; }
}

/* ========================
   PORTFOLIO — CASE HINT
   ======================== */
.project-case { cursor: pointer; }

.card-case-hint {
  margin-top: 12px;
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  letter-spacing: 3px;
  color: var(--tr);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.25s, transform 0.25s;
}
.project-case:hover .card-case-hint {
  opacity: 1;
  transform: translateY(0);
}

/* ========================
   CASE STUDY MODALS
   ======================== */
.case-overlay {
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: rgba(9,7,18,0.9);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.case-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.case-panel {
  width: min(680px, 100%);
  max-height: 88vh;
  overflow-y: auto;
  background: rgba(9,7,18,0.98);
  border: 1px solid rgba(0,229,255,0.3);
  padding: 40px;
  position: relative;
  transform: translateY(20px);
  transition: transform 0.3s;
  scrollbar-width: thin;
  scrollbar-color: var(--deep) transparent;
}
.case-overlay.open .case-panel { transform: translateY(0); }

.case-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: 1px solid rgba(82,68,109,0.4);
  color: var(--deep);
  font-size: 14px;
  width: 32px;
  height: 32px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.case-close:hover { border-color: var(--tr); color: var(--tr); }

.case-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.case-num {
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  letter-spacing: 3px;
  color: var(--tr);
  opacity: 0.6;
}
.case-tags { display: flex; gap: 8px; }

.case-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 3px;
  color: var(--pink);
  margin-bottom: 8px;
}

.case-sub {
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--deep);
  margin-bottom: 32px;
}

/* Tabs */
.case-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid rgba(82,68,109,0.3);
  margin-bottom: 28px;
}

.case-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 10px 20px;
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--deep);
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: -1px;
}
.case-tab:hover { color: var(--lavender); }
.case-tab.active {
  color: var(--tr);
  border-bottom-color: var(--tr);
}

/* Content */
.case-content { display: none; }
.case-content.active { display: block; }

.case-content p {
  font-size: 14px;
  line-height: 1.9;
  color: rgba(250,216,248,0.65);
  margin-bottom: 16px;
}
.case-content ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}
.case-content li {
  font-size: 13px;
  line-height: 1.7;
  color: rgba(250,216,248,0.6);
  padding-left: 18px;
  position: relative;
}
.case-content li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--tr);
  font-size: 12px;
}
.case-content .hl { color: var(--tr); font-weight: 700; }

.case-site-btn {
  display: inline-block;
  margin-top: 28px;
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  letter-spacing: 3px;
  color: var(--black);
  background: var(--tr);
  padding: 12px 24px;
  text-decoration: none;
  transition: all 0.2s;
}
.case-site-btn:hover {
  background: var(--pink);
  box-shadow: 0 0 24px rgba(250,216,248,0.3);
}


/* ════════════════════════════════════════
   MOBILE — 768px (планшет)
════════════════════════════════════════ */
@media (max-width: 768px) {

  /* Убираем декоративные фиксированные элементы */
  #controller-wrap,
  #controller-hint,
  #data-sidebar,
  #trail-canvas { display: none !important; }

  /* Курсор — возвращаем системный на тач */
  .has-custom-cursor,
  .has-custom-cursor * { cursor: auto !important; }
  #custom-cursor { display: none !important; }

  /* Скролл-прогресс остаётся */

  /* ── Hero ── */
  .hero-inner {
    width: 92vw;
    padding: 40px 0 60px;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
  }
  .hero-name { font-size: min(48px, 11vw); letter-spacing: 2px; }
  .neon-frame { padding: 32px 16px; }
  .hero-nav {
    flex-wrap: wrap;
    gap: 0;
    justify-content: center;
    margin-bottom: 32px;
  }
  .nav-link { font-size: 13px; padding: 6px 12px; }
  .arcade-trigger { font-size: 13px; padding: 6px 12px; }

  /* ── Портфолио — карусель ── */
  .portfolio-carousel-wrap { display: flex; overflow: hidden; max-width: 100%; }
  .portfolio-grid {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    max-width: 100%;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 16px;
    padding-bottom: 8px;
  }
  .portfolio-grid::-webkit-scrollbar { display: none; }
  .portfolio-grid .project-card {
    min-width: 80vw;
    scroll-snap-align: center;
    flex-shrink: 0;
  }
  .pf-dots { display: flex; }
  .cyber-section { padding: 48px 20px; }

  /* ── Reviews — свайп-карусель ── */
  .reviews-ticker-wrap {
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    mask-image: none;
    -webkit-mask-image: none;
    padding-bottom: 16px;
    scrollbar-width: none;
  }
  .reviews-ticker-wrap::-webkit-scrollbar { display: none; }
  .reviews-ticker {
    animation: none !important;
    width: max-content;
  }
  .rv-card {
    width: 80vw;
    scroll-snap-align: center;
  }
  .rv-dots { display: flex; }  /* показываем точки */

  /* ── Services ── */
  .services-bg-section { padding: 48px 20px 60px; }

  /* ── About ── */
  .about-layout { grid-template-columns: 1fr; gap: 32px; }
  .about-photo-wrap { max-height: 280px; }

  /* ── Section header ── */
  .section-header { gap: 10px; }
  .section-title { font-size: clamp(18px, 5vw, 28px); }
  .section-divider { display: none; }

  /* ── Footer ── */
  .site-footer { padding-bottom: 40px; }

  /* ── Sticky header ── */
  .sticky-header { padding: 0 20px; }
  .sh-nav { display: none; }

  /* ── Fog section ── */
  .fog-statement { font-size: clamp(28px, 8vw, 52px); }

  /* ── Case modal ── */
  .case-panel {
    width: 96vw;
    max-height: 92vh;
    padding: 24px 20px;
  }
  .case-tabs { gap: 6px; }
  .case-tab { font-size: 13px; padding: 6px 12px; }
}

/* ════════════════════════════════════════
   MOBILE — 480px (телефон)
════════════════════════════════════════ */
@media (max-width: 480px) {

  /* ── Hero ── */
  .neon-frame { padding: 24px 16px; }
  .hero-nav { display: none; }          /* убираем nav, есть sticky header */
  .frame-label.tr { display: none; }

  /* ── Кнопка arcade ── */
  .arcade-trigger {
    display: block;
    margin: 0 auto;
    font-size: 13px;
  }

  /* ── Секции ── */
  .cyber-section { padding: 40px 16px; }
  .services-bg-section { padding: 40px 16px 52px; }

  /* ── Портфолио ── */
  .card-body { padding: 16px; }
  .card-title { font-size: 14px; }

  /* ── About stats ── */
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
  .stat-num { font-size: clamp(24px, 7vw, 36px); }

  /* ── Reviews ── */
  .rv-card { width: 260px; padding: 24px 20px 18px; }
  .rv-text { font-size: 12px; }

  /* ── Services ── */
  .services-grid { grid-template-columns: 1fr; }
  .service-card { padding: 24px 20px; }

  /* ── Contact ── */
  .contact-links { flex-direction: column; gap: 12px; }

  /* ── Footer ── */
  .footer-logo { font-size: 20px; }
  .footer-tagline { font-size: 12px; }
  .footer-soc { width: 34px; height: 34px; }

  /* ── Fog ── */
  .fog-statement { font-size: clamp(26px, 9vw, 44px); }
  .fog-quote { font-size: 12px; }

  /* ── Preloader ── */
  .pl-logo { font-size: clamp(36px, 12vw, 64px); }
  .pl-bar-wrap { width: 260px; }

  /* ── Arcade overlay ── */
  .arcade-panel { width: 96vw; padding: 24px 20px; }
  .arcade-buttons { width: 180px; height: 180px; }
}


/* ════════════════════════════════════════
   LANDSCAPE MOBILE — убираем джойстик
════════════════════════════════════════ */
@media (orientation: landscape) and (max-height: 600px) {
  #controller-wrap,
  #controller-hint { display: none !important; }
}

/* ════════════════════════════════════════
   MOBILE WOW EFFECTS
════════════════════════════════════════ */

/* Touch trail canvas — hidden on desktop, visible on mobile */
#mob-trail {
  display: none;
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 500;
}
@media (max-width: 768px) {
  #mob-trail { display: block; }
}

/* ── Floating symbols ── */
.mob-symbols {
  display: none;
}
@media (max-width: 768px) {
  .mob-symbols {
    display: block;
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 1;
  }
  .mob-symbols span {
    position: absolute;
    font-family: 'Space Mono', monospace;
    font-size: var(--sz, 14px);
    color: var(--tr);
    opacity: 0;
    bottom: -10%;
    animation: mob-float var(--dur, 9s) var(--delay, 0s) infinite linear;
  }
  @keyframes mob-float {
    0%   { opacity: 0;          transform: translateY(0)     rotate(0deg);   }
    8%   { opacity: var(--op, 0.09); }
    92%  { opacity: var(--op, 0.07); }
    100% { opacity: 0;          transform: translateY(-110vh) rotate(360deg); }
  }
}

/* ── Section title glitch reveal on mobile ── */
@media (max-width: 768px) {
  .section-title.mob-glitch-in {
    animation: mob-title-glitch 0.55s cubic-bezier(.22,1,.36,1) forwards;
  }
  @keyframes mob-title-glitch {
    0%   { opacity: 0; clip-path: inset(50% 0 50% 0); transform: translateX(-8px); }
    18%  { opacity: 1; clip-path: inset(15% 0 65% 0); transform: translateX( 5px); }
    36%  { clip-path: inset(70% 0  5% 0); transform: translateX(-4px); }
    54%  { clip-path: inset( 5% 0 75% 0); transform: translateX( 3px); }
    72%  { clip-path: inset(40% 0 15% 0); transform: translateX(-2px); }
    90%  { clip-path: inset( 0% 0  0% 0); transform: translateX( 1px); }
    100% { opacity: 1; clip-path: inset( 0% 0  0% 0); transform: translateX(0); }
  }
}

/* ── Hero name tap glitch ── */
@keyframes mob-hero-glitch {
  0%   { text-shadow: 0 0 0 transparent; transform: translateX(0) skewX(0deg); }
  8%   { text-shadow: -5px 0 var(--tr), 5px 0 #ff00ff; transform: translateX(-5px) skewX(-3deg); }
  16%  { text-shadow:  6px 0 var(--tr), -6px 0 #ff00ff; transform: translateX(6px)  skewX( 4deg); }
  24%  { text-shadow: -3px 0 var(--tr), 3px 0 #ff00ff;  transform: translateX(-3px) skewX(-2deg); }
  32%  { text-shadow:  7px 0 var(--tr), -7px 0 #ff00ff;  transform: translateX(4px)  skewX( 5deg); }
  40%  { text-shadow: -4px 0 var(--tr), 4px 0 #ff00ff;  transform: translateX(-4px) skewX(-3deg); }
  56%  { text-shadow:  2px 0 var(--tr), -2px 0 #ff00ff;  transform: translateX(2px)  skewX( 1deg); }
  72%  { text-shadow: 0 0 40px var(--tr), 0 0 60px rgba(250,216,248,0.4); transform: translateX(0) skewX(0deg); }
  100% { text-shadow: 0 0 80px rgba(250,216,248,0.15);  transform: translateX(0) skewX(0deg); }
}
.hero-name.hero-tap-glitch {
  animation: mob-hero-glitch 0.9s ease forwards;
}

/* ── Big touch ripple ── */
.mob-ripple {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9000;
  border: 1.5px solid var(--tr);
  width: 0;
  height: 0;
  transform: translate(-50%, -50%);
  animation: mob-ripple-anim 0.75s ease-out forwards;
}
@keyframes mob-ripple-anim {
  0%   { width: 0;     height: 0;     opacity: 0.7; box-shadow: 0 0 0 0 var(--tr); }
  60%  { opacity: 0.3; }
  100% { width: 180px; height: 180px; opacity: 0;   box-shadow: 0 0 20px 6px rgba(0,229,255,0.1); }
}

/* ── Portfolio horizontal swipe carousel on phone ── */
@media (max-width: 480px) {
  .portfolio-grid {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 16px;
    padding: 0 16px 16px;
    margin: 0 -16px;
  }
  .portfolio-grid::-webkit-scrollbar { display: none; }
  .portfolio-grid > * {
    flex: 0 0 80vw;
    scroll-snap-align: center;
    min-width: 0;
  }
  /* Swipe hint indicator */
  .portfolio-grid::after {
    content: '';
    flex: 0 0 16px;
  }
}

/* ── Hero inner: keep neon-frame above symbols ── */
@media (max-width: 768px) {
  .hero-inner { position: relative; z-index: 2; }
}
