@font-face {
  font-family: "DepartureMono-Regular-Local";
  src: url("DepartureMono-Regular.woff") format("woff"),
       url("/assets/fonts/DepartureMono-Regular.woff") format("woff");
  font-display: swap;
  font-weight: normal;
  font-style: normal;
}

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
  cursor: url("/assets/img/cursor.png"), default;
}

#c {
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.ui {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 7vh 1.5rem 11vh;
  z-index: 2;
  pointer-events: none;
  transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
}

.
.ui.panel-active {
  opacity: 0;
  pointer-events: none;
}

.ui.panel-active .splash-title,
.ui.panel-active .cta {
  animation: none !important;
  filter: none !important;
  text-shadow: none !important;
  box-shadow: none !important;
}


.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(6, 2, 14, 0.45);
  z-index: 4;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.drawer-backdrop.open {
  opacity: 1;
  pointer-events: all;
}


.info-drawer {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translate3d(-50%, 105%, 0);
  will-change: transform;
  width: min(860px, 94vw);
  max-height: 82vh;
  background: #0c0718;
  border: 2px solid #b794f6;
  border-bottom: none;
  border-radius: 14px 14px 0 0;
  box-shadow: 0 -4px 20px rgba(139, 92, 246, 0.3);
  z-index: 5;
  display: flex;
  flex-direction: column;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  color: #e9d5ff;
  font-family: "DepartureMono-Regular-Local", monospace;
}

.info-drawer.open {
  transform: translate3d(-50%, 0, 0);
}

.splash-title {
  font-family: "Press Start 2P", monospace;
  font-size: clamp(1rem, 3vw, 2.2rem);
  padding-left: 0.28em;
  color: #050505;
  letter-spacing: 0.28em;
  text-align: center;
  line-height: 1.7;
  filter: drop-shadow(0 0 3px #ff5a00);
  animation: blackHoleGlow 8s ease-in-out infinite;
}

@keyframes blackHoleGlow {
  0%,
  100% {
    text-shadow:
      0 0 2px #fff9d8,
      0 0 8px #ffcc00,
      0 0 18px #ffb300,
      0 0 38px #ff6a00,
      0 0 70px rgba(255, 80, 0, 0.55);
  }
  18% {
    text-shadow:
      0 0 1px #fff9d8,
      0 0 5px #ffd84d,
      0 0 12px #ffb300,
      0 0 22px #ff7700,
      0 0 45px rgba(255, 100, 0, 0.4);
  }
  45% {
    text-shadow:
      0 0 3px #ffffff,
      0 0 12px #ffe766,
      0 0 30px #ffcc00,
      0 0 65px #ff8800,
      0 0 110px rgba(255, 120, 0, 0.85);
  }
  60% {
    text-shadow:
      0 0 1px #fff4c4,
      0 0 6px #ffcc00,
      0 0 15px #ff9900,
      0 0 30px #ff5500,
      0 0 55px rgba(255, 50, 0, 0.45);
  }
  82% {
    text-shadow:
      0 0 4px #ffffff,
      0 0 14px #ffe766,
      0 0 34px #ffcc00,
      0 0 80px #ff9900,
      0 0 140px rgba(255, 180, 0, 0.9);
  }
}

.animations-disabled {
  animation: none !important;
}

.button-group {
  pointer-events: all;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.3em;
}

.cta {
  pointer-events: all;
  background: rgba(15, 8, 28, 0.75);
  font-family: "Press Start 2P", monospace;
  font-size: clamp(0.65rem, 1.3vw, 0.85rem);
  color: #b794f6;
  text-decoration: none;
  display: inline-block;
  padding: 1.1em 2.2em;
  border: 2px solid #b794f6;
  letter-spacing: 0.14em;
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  cursor: url("/assets/img/pointer.png"), pointer;
  transition:
    color 0.22s,
    background 0.22s,
    border-color 0.22s,
    transform 0.22s,
    box-shadow 0.22s;
  box-shadow:
    0 0 16px rgba(183, 148, 246, 0.55),
    0 0 40px rgba(139, 92, 246, 0.25),
    inset 0 0 14px rgba(183, 148, 246, 0.1);
  animation: btnPulse 3.4s ease-in-out infinite;
  text-shadow: 0 0 8px rgba(183, 148, 246, 0.7);
}

.cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    110deg,
    transparent 30%,
    rgba(196, 181, 253, 0.2) 50%,
    transparent 70%
  );
  transform: translateX(-130%);
  transition: transform 0.45s ease;
}

.cta:hover {
  color: #ffffff;
  border-color: #d8b4fe;
  background: rgba(168, 85, 247, 0.18);
  box-shadow:
    0 0 30px rgba(196, 181, 253, 0.75),
    0 0 70px rgba(168, 85, 247, 0.45),
    inset 0 0 22px rgba(216, 180, 254, 0.18);
  animation: none;
}

.cta:hover::before {
  transform: translateX(130%);
}

.cta:active {
  transform: translateY(2px) scale(0.98);
}

@keyframes btnPulse {
  0%,
  100% {
    box-shadow:
      0 0 16px #a684e47e,
      0 0 40px #8d4fff,
      inset 0 0 14px rgba(255, 107, 53, 0.09);
  }
  50% {
    box-shadow:
      0 0 24px #ffbb008f,
      0 0 60px #a58700,
      inset 0 0 20px rgba(255, 107, 53, 0.13);
  }
}



.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(8, 3, 18, 0.45); /* Без backdrop-filter, чтобы не нагружать видеокарту */
  z-index: 4;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.drawer-backdrop.open {
  opacity: 1;
  pointer-events: all;
}

.info-drawer {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translate(-50%, 105%);
  width: min(860px, 94vw);
  max-height: 82vh;
  background: rgba(12, 7, 24, 0.92);
  border: 2px solid #b794f6;
  border-bottom: none;
  border-radius: 14px 14px 0 0;
  box-shadow:
    0 -8px 35px rgba(139, 92, 246, 0.35),
    0 0 60px rgba(255, 106, 0, 0.12),
    inset 0 0 20px rgba(183, 148, 246, 0.12);
  z-index: 5;
  display: flex;
  flex-direction: column;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  color: #e9d5ff;
  font-family: "DepartureMono-Regular-Local", monospace;
}

.info-drawer.open {
  transform: translate(-50%, 0);
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.4rem;
  background: rgba(28, 16, 52, 0.85);
  border-bottom: 1px solid rgba(183, 148, 246, 0.4);
  border-radius: 12px 12px 0 0;
}

.drawer-title {
  font-family: "Press Start 2P", monospace;
  font-size: clamp(0.65rem, 1.4vw, 0.85rem);
  color: #ffcc00;
  text-shadow: 0 0 8px rgba(255, 179, 0, 0.65);
  letter-spacing: 0.08em;
}

.drawer-close {
  background: transparent;
  border: 1px solid rgba(255, 106, 0, 0.6);
  color: #ff9900;
  font-family: "Press Start 2P", monospace;
  font-size: 0.7rem;
  padding: 0.45em 0.8em;
  border-radius: 6px;
  cursor: url("/assets/img/pointer.png"), pointer;
  transition: all 0.2s ease;
}

.drawer-close:hover {
  background: rgba(255, 106, 0, 0.2);
  color: #ffffff;
  border-color: #ffcc00;
  box-shadow: 0 0 12px rgba(255, 153, 0, 0.6);
}

.drawer-content {
  padding: 1.5rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
}


.drawer-content::-webkit-scrollbar {
  width: 8px;
}
.drawer-content::-webkit-scrollbar-track {
  background: rgba(10, 5, 20, 0.6);
}
.drawer-content::-webkit-scrollbar-thumb {
  background: #7c3aed;
  border-radius: 4px;
}
.drawer-content::-webkit-scrollbar-thumb:hover {
  background: #b794f6;
}

.info-section {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.section-heading {
  font-family: "Press Start 2P", monospace;
  font-size: 0.85rem;
  color: #d8b4fe;
  letter-spacing: 0.1em;
  text-shadow: 0 0 10px rgba(183, 148, 246, 0.5);
  border-left: 3px solid #ff8800;
  padding-left: 0.6rem;
}

.section-text {
  font-size: 0.95rem;
  line-height: 1.65;
  color: #ddd6fe;
}

.section-text strong {
  color: #ffcc00;
}

/* Навыки */
.skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.skill-tag {
  background: rgba(139, 92, 246, 0.14);
  border: 1px solid rgba(183, 148, 246, 0.5);
  color: #f3e8ff;
  padding: 0.45rem 0.85rem;
  border-radius: 6px;
  font-size: 0.85rem;
  box-shadow: inset 0 0 8px rgba(183, 148, 246, 0.15);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.skill-tag:hover {
  transform: translateY(-2px);
  border-color: #ffcc00;
  box-shadow: 0 0 12px rgba(255, 187, 0, 0.35);
}

/* Сетка портфолио */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.project-card {
  background: rgba(22, 13, 40, 0.78);
  border: 1px solid rgba(183, 148, 246, 0.35);
  border-radius: 10px;
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.8rem;
  transition: border-color 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
}

.project-card:hover {
  border-color: #d8b4fe;
  transform: translateY(-3px);
  box-shadow:
    0 6px 20px rgba(139, 92, 246, 0.25),
    inset 0 0 14px rgba(183, 148, 246, 0.08);
}

.project-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.project-title {
  font-family: "Press Start 2P", monospace;
  font-size: 0.75rem;
  color: #ffcc00;
}

.project-badge {
  font-size: 0.72rem;
  padding: 0.2rem 0.5rem;
  background: rgba(255, 136, 0, 0.15);
  border: 1px solid rgba(255, 170, 0, 0.5);
  color: #ffd84d;
  border-radius: 4px;
}

.project-desc {
  font-size: 0.88rem;
  line-height: 1.5;
  color: #cbd5e1;
}

.project-link {
  align-self: flex-start;
  font-size: 0.85rem;
  color: #b794f6;
  text-decoration: none;
  border-bottom: 1px dashed #b794f6;
  padding-bottom: 2px;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.project-link:hover {
  color: #ffcc00;
  border-color: #ffcc00;
}

/* Кнопки соцсетей */
.links-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.social-btn {
  font-family: "Press Start 2P", monospace;
  font-size: 0.65rem;
  color: #e9d5ff;
  text-decoration: none;
  padding: 0.75rem 1.1rem;
  border: 1px solid #b794f6;
  border-radius: 8px;
  background: rgba(168, 85, 247, 0.1);
  transition: all 0.2s ease;
}

.social-btn:hover {
  background: rgba(168, 85, 247, 0.28);
  color: #fff;
  box-shadow: 0 0 15px rgba(183, 148, 246, 0.5);
}

/* CRT-слой поверх экрана */
.splash-crt {
  position: fixed;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  background:
    radial-gradient(
      ellipse at center,
      transparent 56%,
      rgba(0, 0, 0, 0.62) 100%
    ),
    repeating-linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0.028) 0 1px,
      transparent 1px 3px
    );
}

@keyframes uiFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.ui-power-on {
  animation: uiFadeIn 1.2s ease-out 0.2s backwards;
}

@media (max-width: 600px) {
  .ui {
    padding-bottom: 5vh;
  }
  .info-drawer {
    width: 100vw;
    max-height: 88vh;
    border-left: none;
    border-right: none;
  }
  .drawer-content {
    padding: 1.1rem;
  }
}