* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  height: 100%;
}

body {
  min-height: 100vh;
  min-height: -webkit-fill-available;
  background-color: #0a0a14;
  color: white;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  position: relative;
}

/* Красивый фон с градиентом */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 20% 50%, rgba(88, 101, 242, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(114, 137, 218, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 40% 80%, rgba(114, 137, 218, 0.08) 0%, transparent 50%),
    linear-gradient(45deg, #0a0a14 0%, #0d0d1a 50%, #0a0a14 100%);
  z-index: -2;
}

/* Текстура поверх градиента */
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(circle at 25% 25%, rgba(255, 255, 255, 0.05) 2px, transparent 2px),
    radial-gradient(circle at 75% 75%, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 50px 50px, 100px 100px;
  z-index: -1;
  opacity: 0.3;
}

#particleCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

.container {
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  padding: max(20px, 5vh) 20px;
  box-sizing: border-box;
}

.main-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  position: relative;
  opacity: 0;
  transform: translateY(20px);
  animation: contentAppear 0.8s ease-out forwards;
  animation-delay: 0.3s;
}

@keyframes contentAppear {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.profile-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 2.5rem;
  width: 100%;
  opacity: 0;
  transform: scale(0.9);
  animation: profileAppear 0.8s ease-out forwards;
  animation-delay: 0.5s;
}

@keyframes profileAppear {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.profile-image {
  width: clamp(140px, 25vw, 180px);
  height: clamp(140px, 25vw, 180px);
  border-radius: 50%;
  border: clamp(4px, 0.5vw, 6px) solid #5865F2;
  box-shadow: 
    0 0 clamp(25px, 5vw, 40px) rgba(88, 101, 242, 0.5),
    0 0 clamp(50px, 10vw, 80px) rgba(88, 101, 242, 0.2),
    inset 0 0 20px rgba(255, 255, 255, 0.1);
  overflow: hidden;
  margin-bottom: 2rem;
  position: relative;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.profile-image:hover {
  transform: scale(1.05) rotate(5deg);
  box-shadow: 
    0 0 clamp(35px, 7vw, 60px) rgba(88, 101, 242, 0.6),
    0 0 clamp(70px, 15vw, 120px) rgba(88, 101, 242, 0.3),
    inset 0 0 30px rgba(255, 255, 255, 0.15);
}

.profile-image::after {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, #5865F2, #7289DA, #5865F2);
  border-radius: 50%;
  z-index: -1;
  opacity: 0.7;
  filter: blur(10px);
}

.profile-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  transition: transform 0.4s ease;
}

.profile-image:hover img {
  transform: scale(1.1);
}

.name {
  font-size: clamp(2.2rem, 6vw, 3.5rem);
  font-weight: 800;
  margin: 0;
  background: linear-gradient(to right, #5865F2, #7289DA, #5865F2);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-align: center;
  line-height: 1.2;
  padding: 0 10px;
  word-break: break-word;
  text-shadow: 0 0 20px rgba(88, 101, 242, 0.3);
  position: relative;
  opacity: 0;
  transform: translateY(10px);
  animation: nameAppear 0.6s ease-out forwards;
  animation-delay: 0.7s;
}

@keyframes nameAppear {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.name::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 3px;
  background: linear-gradient(to right, transparent, #5865F2, transparent);
  border-radius: 2px;
  opacity: 0;
  animation: lineAppear 0.5s ease-out forwards;
  animation-delay: 1s;
}

@keyframes lineAppear {
  from {
    opacity: 0;
    width: 0;
  }
  to {
    opacity: 1;
    width: 100px;
  }
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
  width: 100%;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  padding: 1.5rem;
  border-radius: 20px;
  background: rgba(16, 18, 27, 0.8);
  border: 1px solid rgba(88, 101, 242, 0.2);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  text-decoration: none;
  color: white;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
  opacity: 0;
  transform: translateX(-20px);
  animation: contactSlide 0.6s ease-out forwards;
}

.contact-item:nth-child(1) {
  animation-delay: 0.9s;
}

.contact-item:nth-child(2) {
  animation-delay: 1s;
}

@keyframes contactSlide {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.contact-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, 
    transparent 0%,
    rgba(88, 101, 242, 0.1) 50%,
    transparent 100%);
  transition: left 0.6s ease;
}

.contact-item:hover::before {
  left: 100%;
}

.contact-item:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: #5865F2;
  box-shadow: 
    0 15px 35px rgba(88, 101, 242, 0.25),
    0 0 25px rgba(88, 101, 242, 0.15);
}

.contact-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 12px;
  background: linear-gradient(135deg, #5865F2, #7289DA);
  flex-shrink: 0;
  box-shadow: 0 0 15px rgba(88, 101, 242, 0.4);
  transition: transform 0.3s ease;
}

.contact-item:hover .contact-icon {
  transform: scale(1.1) rotate(360deg);
}

.contact-icon svg {
  width: 24px;
  height: 24px;
  transition: transform 0.3s ease;
}

.contact-item:hover .contact-icon svg {
  transform: scale(1.2);
}

.contact-text {
  flex: 1;
  min-width: 0;
}

.contact-label {
  font-size: 0.85rem;
  color: #A0A8FF;
  margin-bottom: 0.3rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  transition: color 0.3s ease;
}

.contact-item:hover .contact-label {
  color: #5865F2;
}

.contact-value {
  font-size: 1.1rem;
  font-weight: 600;
  word-break: break-word;
  transition: transform 0.3s ease;
}

.contact-item:hover .contact-value {
  transform: translateX(5px);
}

.social-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  opacity: 0;
  transform: translateY(20px);
  animation: socialAppear 0.6s ease-out forwards;
  animation-delay: 1.1s;
}

@keyframes socialAppear {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.social-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: #A0A8FF;
  margin-bottom: 1.5rem;
  text-align: center;
  letter-spacing: 1px;
  position: relative;
  padding-bottom: 10px;
  opacity: 0;
  animation: titleAppear 0.5s ease-out forwards;
  animation-delay: 1.2s;
}

@keyframes titleAppear {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.social-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 2px;
  background: linear-gradient(to right, transparent, #5865F2, transparent);
  opacity: 0;
  animation: socialLineAppear 0.5s ease-out forwards;
  animation-delay: 1.3s;
}

@keyframes socialLineAppear {
  from {
    opacity: 0;
    width: 0;
  }
  to {
    opacity: 1;
    width: 60px;
  }
}

.social-links {
  display: flex;
  gap: 1.8rem;
  justify-content: center;
  width: 100%;
}

.social-icon {
  color: white;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 65px;
  height: 65px;
  border-radius: 50%;
  background: rgba(16, 18, 27, 0.8);
  border: 2px solid rgba(88, 101, 242, 0.3);
  text-decoration: none;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
  opacity: 0;
  transform: scale(0.5) rotate(-180deg);
  animation: iconPop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.social-icon:nth-child(1) {
  animation-delay: 1.4s;
}

.social-icon:nth-child(2) {
  animation-delay: 1.5s;
}

.social-icon:nth-child(3) {
  animation-delay: 1.6s;
}

@keyframes iconPop {
  0% {
    opacity: 0;
    transform: scale(0.5) rotate(-180deg);
  }
  70% {
    transform: scale(1.1) rotate(10deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

.social-icon::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, rgba(88, 101, 242, 0.2) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.social-icon:hover::before {
  opacity: 1;
}

.social-icon:hover {
  transform: translateY(-10px) scale(1.15) rotate(5deg);
  border-color: #5865F2;
  box-shadow: 
    0 20px 40px rgba(88, 101, 242, 0.3),
    0 0 35px rgba(88, 101, 242, 0.2);
}

.social-icon img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  filter: brightness(1.2);
  z-index: 1;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.social-icon:hover img {
  transform: scale(1.3) rotate(360deg);
  filter: brightness(1.5) drop-shadow(0 0 8px rgba(88, 101, 242, 0.5));
}

/* Адаптация для мобильных */
@media (max-width: 768px) {
  .container {
    padding: max(15px, 3vh) 15px;
  }
  
  .main-content {
    max-width: 90%;
  }
  
  .profile-image {
    width: 130px;
    height: 130px;
    margin-bottom: 1.8rem;
  }
  
  .name {
    font-size: 2rem;
  }
  
  .contact-item {
    padding: 1.2rem;
    border-radius: 16px;
  }
  
  .contact-icon {
    width: 44px;
    height: 44px;
  }
  
  .contact-icon svg {
    width: 20px;
    height: 20px;
  }
  
  .social-icon {
    width: 58px;
    height: 58px;
  }
  
  .social-icon img {
    width: 28px;
    height: 28px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: max(10px, 2vh) 10px;
  }
  
  .profile-image {
    width: 120px;
    height: 120px;
    margin-bottom: 1.5rem;
  }
  
  .name {
    font-size: 1.8rem;
  }
  
  .contact-info {
    gap: 1.2rem;
  }
  
  .contact-item {
    padding: 1rem;
    gap: 1rem;
  }
  
  .social-links {
    gap: 1.5rem;
  }
  
  .social-icon {
    width: 55px;
    height: 55px;
  }
  
  .social-icon img {
    width: 26px;
    height: 26px;
  }
}

@media (max-width: 320px) {
  .profile-image {
    width: 100px;
    height: 100px;
  }
  
  .name {
    font-size: 1.6rem;
  }
  
  .contact-item {
    flex-direction: column;
    text-align: center;
    gap: 0.8rem;
  }
  
  .contact-icon {
    margin-bottom: 0.5rem;
  }
  
  .social-links {
    gap: 1.2rem;
  }
}

/* Ландшафтная ориентация */
@media (orientation: landscape) and (max-height: 600px) {
  .container {
    padding: 10px;
  }
  
  .profile-section {
    margin-bottom: 1.5rem;
  }
  
  .profile-image {
    width: 100px;
    height: 100px;
    margin-bottom: 1rem;
  }
  
  .name {
    font-size: 1.8rem;
    margin-bottom: 1rem;
  }
  
  .contact-info {
    gap: 1rem;
    margin-bottom: 1.5rem;
  }
}

/* Анимация для устройств с ограниченной анимацией */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
  
  .main-content,
  .profile-section,
  .name,
  .contact-item,
  .social-section,
  .social-title,
  .social-icon {
    opacity: 1;
    transform: none;
  }
}