:root {
  --bg-color: #08090d;
  --card-bg: rgba(18, 22, 34, 0.65);
  --card-border: rgba(255, 255, 255, 0.08);
  --primary-accent: #6366f1;
  --primary-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
  --neon-cyan: #06b6d4;
  --max-accent: #2563eb;
  --tg-accent: #0284c7;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --radius-lg: 24px;
  --radius-md: 16px;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow-x: hidden;
  padding: 32px 16px;
  line-height: 1.5;
}

/* Canvas Particles Background */
#particles-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
}

/* Floating animated neon orbs */
.bg-glow-1 {
  position: fixed;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 580px;
  height: 480px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.28) 0%, rgba(168, 85, 247, 0.16) 45%, transparent 70%);
  filter: blur(85px);
  pointer-events: none;
  z-index: 0;
  animation: floatOrb1 10s ease-in-out infinite alternate;
}

.bg-glow-2 {
  position: fixed;
  bottom: -160px;
  right: -80px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(236, 72, 153, 0.22) 0%, rgba(6, 182, 212, 0.12) 50%, transparent 70%);
  filter: blur(95px);
  pointer-events: none;
  z-index: 0;
  animation: floatOrb2 12s ease-in-out infinite alternate;
}

@keyframes floatOrb1 {
  0% { transform: translateX(-50%) translateY(0) scale(1); }
  100% { transform: translateX(-46%) translateY(40px) scale(1.12); }
}

@keyframes floatOrb2 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-50px, -40px) scale(1.18); }
}

.container {
  width: 100%;
  max-width: 500px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Profile Card */
.profile-card {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  animation: fadeInDown 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.avatar-wrapper {
  position: relative;
  width: 116px;
  height: 116px;
  border-radius: 50%;
  padding: 4px;
  background: linear-gradient(135deg, #6366f1, #ec4899, #06b6d4, #6366f1);
  background-size: 300% 300%;
  animation: gradientRotate 6s ease infinite, avatarPulse 4s ease-in-out infinite;
  box-shadow: 0 0 35px rgba(99, 102, 241, 0.45);
}

@keyframes gradientRotate {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes avatarPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 30px rgba(99, 102, 241, 0.4); }
  50% { transform: scale(1.03); box-shadow: 0 0 45px rgba(236, 72, 153, 0.6); }
}

.avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #0f121d;
  display: block;
}

/* Online Pulse indicator */
.online-dot {
  position: absolute;
  bottom: 6px;
  right: 6px;
  width: 16px;
  height: 16px;
  background: #10b981;
  border: 3px solid #08090d;
  border-radius: 50%;
  box-shadow: 0 0 12px #10b981;
}

.online-dot::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 2px solid #10b981;
  animation: ping 1.8s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes ping {
  75%, 100% { transform: scale(2.2); opacity: 0; }
}

.user-name {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(180deg, #ffffff 30%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.user-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(99, 102, 241, 0.14);
  border: 1px solid rgba(99, 102, 241, 0.35);
  color: #c7d2fe;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 50px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  backdrop-filter: blur(8px);
}

.user-bio {
  color: var(--text-muted);
  font-size: 0.94rem;
  max-width: 90%;
  margin: 0 auto;
}

/* Sections */
.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
  margin-bottom: 12px;
  padding-left: 4px;
}

.section-title i {
  color: #818cf8;
}

/* Shimmer Light effect for special buttons */
.shimmer-effect {
  position: relative;
  overflow: hidden;
}

.shimmer-effect::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -70%;
  width: 50%;
  height: 200%;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.22) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: rotate(25deg);
  animation: shimmerSweep 4.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes shimmerSweep {
  0% { left: -70%; }
  35%, 100% { left: 160%; }
}

/* Priority Contact Section (не меняем логику, улучшаем динамику) */
.priority-contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.btn-contact {
  position: relative;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.96rem;
  color: #fff;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-contact:hover {
  transform: translateY(-4px) scale(1.02);
}

.btn-contact i.service-icon {
  font-size: 1.55rem;
  transition: transform 0.3s ease;
}

.btn-contact:hover i.service-icon {
  transform: scale(1.15) rotate(5deg);
}

.btn-contact .contact-details {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.btn-contact .label-sub {
  font-size: 0.72rem;
  font-weight: 500;
  opacity: 0.85;
}

.btn-contact .label-main {
  font-size: 1.05rem;
  font-weight: 700;
}

.btn-max {
  background: linear-gradient(135deg, #1d4ed8 0%, #3b82f6 100%);
  border: 1px solid rgba(96, 165, 250, 0.5);
  box-shadow: 0 10px 25px rgba(37, 99, 235, 0.38);
}

.btn-max:hover {
  box-shadow: 0 16px 36px rgba(37, 99, 235, 0.6);
  border-color: rgba(147, 197, 253, 0.8);
}

.btn-telegram {
  background: linear-gradient(135deg, #0284c7 0%, #38bdf8 100%);
  border: 1px solid rgba(56, 189, 248, 0.5);
  box-shadow: 0 10px 25px rgba(2, 132, 199, 0.38);
}

.btn-telegram:hover {
  box-shadow: 0 16px 36px rgba(2, 132, 199, 0.6);
  border-color: rgba(186, 230, 253, 0.8);
}

/* Portfolio Big CTA Card */
.portfolio-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  background: linear-gradient(135deg, rgba(30, 27, 75, 0.85) 0%, rgba(88, 28, 135, 0.75) 100%);
  border: 1px solid rgba(168, 85, 247, 0.45);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: #fff;
  box-shadow: 0 12px 30px rgba(126, 34, 206, 0.3);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.portfolio-banner:hover {
  transform: translateY(-4px) scale(1.015);
  border-color: rgba(236, 72, 153, 0.7);
  box-shadow: 0 18px 42px rgba(168, 85, 247, 0.55);
}

.portfolio-info {
  display: flex;
  align-items: center;
  gap: 16px;
}

.portfolio-icon-box {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--primary-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease;
}

.portfolio-banner:hover .portfolio-icon-box {
  transform: scale(1.1) rotate(-6deg);
}

.portfolio-text h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.portfolio-text p {
  font-size: 0.82rem;
  color: #e9d5ff;
}

.portfolio-arrow {
  font-size: 1.25rem;
  color: #e9d5ff;
  transition: transform 0.3s ease;
}

.portfolio-banner:hover .portfolio-arrow {
  transform: translateX(6px);
}

/* Glass Social Links List */
.social-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.social-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--text-main);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.social-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 3px;
  background: transparent;
  transition: all 0.3s ease;
}

.social-item:hover {
  transform: translateY(-3px) translateX(4px);
  background: rgba(28, 35, 52, 0.85);
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}

.social-item:hover::before {
  background: var(--primary-gradient);
  width: 4px;
}

.social-left {
  display: flex;
  align-items: center;
  gap: 15px;
}

.social-icon-wrapper {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.22rem;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.social-item:hover .social-icon-wrapper {
  transform: scale(1.12);
}

/* Custom social colors */
.icon-vk { background: rgba(39, 135, 245, 0.18); color: #2787f5; }
.icon-vkvideo { background: rgba(255, 59, 48, 0.18); color: #ff3b30; }
.icon-rutube { background: rgba(255, 69, 58, 0.18); color: #ff5252; }

.social-meta {
  display: flex;
  flex-direction: column;
}

.social-title {
  font-size: 0.96rem;
  font-weight: 600;
  line-height: 1.25;
}

.social-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.social-item i.item-arrow {
  font-size: 0.9rem;
  color: var(--text-muted);
  opacity: 0.6;
  transition: all 0.3s ease;
}

.social-item:hover i.item-arrow {
  opacity: 1;
  transform: translateX(4px) translateY(-2px);
  color: #fff;
}

/* Footer */
footer {
  text-align: center;
  padding: 22px 0 12px;
  color: #64748b;
  font-size: 0.82rem;
}

/* Portfolio Page Gallery */
.portfolio-container {
  max-width: 1100px;
  width: 100%;
  z-index: 2;
}

.portfolio-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--card-border);
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  color: var(--text-main);
  padding: 10px 20px;
  border-radius: var(--radius-md);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  backdrop-filter: blur(12px);
  transition: all 0.25s ease;
}

.btn-back:hover {
  background: rgba(99, 102, 241, 0.2);
  border-color: var(--primary-accent);
  transform: translateX(-4px);
}

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

.gallery-card {
  position: relative;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
}

.gallery-card:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: rgba(168, 85, 247, 0.6);
  box-shadow: 0 16px 38px rgba(168, 85, 247, 0.35);
}

.gallery-card img {
  width: 100%;
  height: 380px;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.gallery-card:hover img {
  transform: scale(1.06);
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(8, 9, 13, 0.94) 0%, rgba(8, 9, 13, 0.3) 60%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery-card:hover .gallery-overlay {
  opacity: 1;
}

.overlay-title {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
}

.overlay-badge {
  font-size: 0.78rem;
  color: #c7d2fe;
  margin-top: 5px;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Lightbox Modal */
.lightbox-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.94);
  z-index: 9999;
  backdrop-filter: blur(12px);
  justify-content: center;
  align-items: center;
  padding: 24px;
}

.lightbox-modal.active {
  display: flex;
  animation: fadeIn 0.25s ease forwards;
}

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

.lightbox-content {
  max-width: 90vw;
  max-height: 90vh;
  position: relative;
  animation: zoomIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes zoomIn {
  from { transform: scale(0.92); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.lightbox-img {
  max-width: 100%;
  max-height: 85vh;
  border-radius: 14px;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.12);
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: -48px;
  right: 0;
  font-size: 2rem;
  color: #fff;
  cursor: pointer;
  background: none;
  border: none;
  transition: transform 0.2s ease, color 0.2s ease;
}

.lightbox-close:hover {
  transform: rotate(90deg) scale(1.15);
  color: #ec4899;
}

/* Animations */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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