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

:root {
  --purple-1: #8E7BEF;
  --purple-2: #AFB2F8;
  --glass-bg: rgba(255, 255, 255, 0.62);
  --glass-border: rgba(255, 255, 255, 0.85);
  --glass-shadow: rgba(142, 123, 239, 0.18);
  --text-primary: #1a1a2e;
  --text-secondary: #5a5a8a;
  --text-muted: #9898b8;
}

html, body {
  min-height: 100%;
  font-family: 'Outfit', sans-serif;
  overflow-x: hidden;
}

body {
  background: #0d0a1a;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  min-height: 100vh;
  padding: 40px 16px;
}

.banner-bg {
  position: fixed;
  inset: 0;
  background: url('sky.png') center center / cover no-repeat;
  z-index: 0;
  filter: brightness(0.75) saturate(1.1);
}

.banner-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(13, 10, 26, 0.15) 0%,
    rgba(13, 10, 26, 0.05) 40%,
    rgba(13, 10, 26, 0.4) 100%
  );
}

.noise-overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 128px 128px;
}

.container {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.glass-card {
  width: 100%;
  background: var(--glass-bg);
  backdrop-filter: blur(40px) saturate(1.8);
  -webkit-backdrop-filter: blur(40px) saturate(1.8);
  border: 1.5px solid var(--glass-border);
  border-radius: 32px;
  padding: 48px 36px 40px;
  box-shadow:
    0 8px 40px var(--glass-shadow),
    0 2px 0 rgba(255,255,255,0.9) inset,
    0 -1px 0 rgba(142,123,239,0.12) inset;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;

  opacity: 0;
  transform: translateY(32px) scale(0.97);
  animation: cardEntrance 0.9s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s forwards;
}

@keyframes cardEntrance {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.avatar-wrap {
  position: relative;
  margin-bottom: 24px;
  opacity: 0;
  animation: fadeUp 0.7s ease 0.4s forwards;
}

.avatar-ring {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  padding: 3px;
  background: linear-gradient(135deg, var(--purple-1), var(--purple-2), #ffffff, var(--purple-1));
  background-size: 300% 300%;
  animation: gradientSpin 4s linear infinite;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.6),
    0 8px 32px rgba(142, 123, 239, 0.45),
    0 2px 8px rgba(142, 123, 239, 0.3);
}

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

.avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: top center;
  display: block;
  border: 2px solid rgba(255,255,255,0.9);
}

.avatar-glow {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(175, 178, 248, 0.35) 0%, transparent 70%);
  z-index: -1;
  animation: glowPulse 3s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% { transform: scale(1); opacity: 0.7; }
  50% { transform: scale(1.15); opacity: 1; }
}

.nickname {
  font-family: 'Outfit', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, var(--purple-1), var(--purple-2), #c8caff, var(--purple-1));
  background-size: 300% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 3s linear infinite, fadeUp 0.7s ease 0.5s both;
  margin-bottom: 16px;
}

@keyframes shimmer {
  0% { background-position: 0% center; }
  100% { background-position: 300% center; }
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 28px;
  opacity: 0;
  animation: fadeUp 0.7s ease 0.6s forwards;
}

.badge {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(142, 123, 239, 0.25);
  border-radius: 100px;
  padding: 5px 14px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.01em;
  transition: all 0.25s ease;
}

.badge:hover {
  background: rgba(142, 123, 239, 0.12);
  border-color: var(--purple-1);
  color: var(--purple-1);
  transform: translateY(-1px);
}

.badge.star {
  background: linear-gradient(135deg, rgba(142, 123, 239, 0.12), rgba(175, 178, 248, 0.12));
  border-color: rgba(142, 123, 239, 0.35);
  color: var(--purple-1);
  font-weight: 600;
}

.divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(142, 123, 239, 0.25), transparent);
  margin: 4px 0 24px;
  opacity: 0;
  animation: fadeIn 0.7s ease 0.7s forwards;
}

.socials {
  display: flex;
  gap: 12px;
  width: 100%;
  margin-bottom: 28px;
  opacity: 0;
  animation: fadeUp 0.7s ease 0.75s forwards;
}

.social-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 18px 12px;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1.5px solid rgba(255, 255, 255, 0.9);
  border-radius: 22px;
  color: var(--text-primary);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow:
    0 2px 12px rgba(142, 123, 239, 0.1),
    0 1px 0 rgba(255,255,255,0.95) inset;
  position: relative;
  overflow: hidden;
}

.social-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(142, 123, 239, 0.12), rgba(175, 178, 248, 0.08));
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: inherit;
}

.social-btn:hover {
  transform: translateY(-4px) scale(1.03);
  border-color: rgba(142, 123, 239, 0.5);
  box-shadow:
    0 12px 32px rgba(142, 123, 239, 0.25),
    0 1px 0 rgba(255,255,255,0.95) inset;
}

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

.social-btn:active {
  transform: translateY(-1px) scale(0.98);
  transition-duration: 0.1s;
}

.social-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple-1), var(--purple-2));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 4px 12px rgba(142, 123, 239, 0.4);
  transition: box-shadow 0.3s ease;
}

.social-btn:hover .social-icon {
  box-shadow: 0 6px 20px rgba(142, 123, 239, 0.55);
}

.social-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.02em;
}

.social-handle {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 400;
  letter-spacing: 0.01em;
}

.projects-section {
  width: 100%;
  opacity: 0;
  animation: fadeUp 0.7s ease 0.85s forwards;
}

.section-title {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.projects {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.project-card {
  text-decoration: none;
  display: block;
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow:
    0 2px 10px rgba(142, 123, 239, 0.08),
    0 1px 0 rgba(255,255,255,0.95) inset;
  position: relative;
}

.project-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--purple-1), var(--purple-2));
  border-radius: 0 2px 2px 0;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.project-card:hover {
  transform: translateY(-3px) scale(1.015);
  border-color: rgba(142, 123, 239, 0.4);
  box-shadow:
    0 10px 30px rgba(142, 123, 239, 0.2),
    0 1px 0 rgba(255,255,255,0.95) inset;
}

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

.project-card:active {
  transform: translateY(0) scale(0.99);
  transition-duration: 0.1s;
}

.project-inner {
  padding: 16px 18px;
}

.project-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.project-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple-1), var(--purple-2));
  flex-shrink: 0;
  box-shadow: 0 0 6px rgba(142, 123, 239, 0.5);
}

.project-name {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  flex: 1;
}

.project-arrow {
  color: var(--purple-1);
  opacity: 0;
  transform: translateX(-4px);
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.project-card:hover .project-arrow {
  opacity: 1;
  transform: translateX(0);
}

.project-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 8px;
  font-weight: 400;
}

.project-link {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--purple-1);
  letter-spacing: 0.01em;
}

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

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

@media (max-width: 400px) {
  .glass-card {
    padding: 36px 20px 32px;
    border-radius: 24px;
  }
  .socials {
    gap: 8px;
  }
  .social-btn {
    padding: 14px 8px;
  }
}
