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

:root {
  --bg-primary: #0a0a0f;
  --text-primary: #f0f0f5;
  --text-secondary: #8e8ea8;
  --text-muted: #8585a0;
  --accent: #5b54e8;
  --accent-soft: rgba(108, 99, 255, 0.12);
  --accent-glow: rgba(108, 99, 255, 0.3);
  --glass-bg: rgba(255, 255, 255, 0.035);
  --glass-border: rgba(255, 255, 255, 0.07);
  --transition: 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

html {
  height: 100%;
}

body {
  min-height: 100%;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: flex;
  flex-direction: column;
}

/* Ambient background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 20% 40%, rgba(108, 99, 255, 0.07) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 60%, rgba(99, 179, 255, 0.05) 0%, transparent 55%),
    radial-gradient(ellipse 50% 50% at 50% 100%, rgba(168, 85, 247, 0.04) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* Subtle grid */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.012) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.012) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

/* ─── Layout ─── */
.container {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  padding: 3rem 2rem 2rem;
  max-width: 600px;
  margin: 0 auto;
  width: 100%;
}

/* ─── Hero ─── */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* Avatar */
.avatar-wrapper {
  position: relative;
  margin-bottom: 1.6rem;
  opacity: 0;
  animation: fadeUp 0.7s ease forwards 0.15s;
}

.avatar-wrapper::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--accent), #a855f7, #63b3ff, var(--accent));
  animation: ringRotate 6s linear infinite;
  z-index: 0;
}

.avatar-wrapper::after {
  content: '';
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--accent), #a855f7, #63b3ff, var(--accent));
  filter: blur(16px);
  opacity: 0.3;
  animation: ringRotate 6s linear infinite;
  z-index: -1;
}

.avatar {
  position: relative;
  z-index: 1;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  border: 3px solid var(--bg-primary);
  object-fit: cover;
  display: block;
}

/* Name */
.name {
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin-bottom: 0.5rem;
  opacity: 0;
  animation: fadeUp 0.7s ease forwards 0.25s;
  background: linear-gradient(135deg, var(--text-primary) 0%, #b0b0c5 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Title */
.title {
  font-size: clamp(0.8rem, 1.8vw, 0.95rem);
  font-weight: 400;
  color: var(--text-secondary);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.8rem;
  opacity: 0;
  animation: fadeUp 0.7s ease forwards 0.35s;
}

/* Tagline */
.tagline {
  font-size: clamp(0.85rem, 1.5vw, 0.95rem);
  font-weight: 300;
  color: var(--text-secondary);
  opacity: 0;
  animation: fadeUp 0.7s ease forwards 0.4s;
  max-width: 420px;
  line-height: 1.65;
  text-align: center;
}

/* ─── Dividers ─── */
.divider {
  width: 40px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  margin: 1.8rem 0;
  opacity: 0;
  animation: fadeUp 0.7s ease forwards 0.45s;
}

.divider-sm {
  width: 30px;
  margin: 1.4rem 0;
  animation-delay: 0.7s;
}

/* ─── Skills ─── */
.skills {
  text-align: center;
  opacity: 0;
  animation: fadeUp 0.7s ease forwards 0.5s;
}

.section-label {
  font-size: 0.65rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  margin-bottom: 0.8rem;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
  max-width: 440px;
}

.skill-tag {
  display: inline-block;
  padding: 0.3rem 0.7rem;
  border-radius: 6px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text-secondary);
  transition: var(--transition);
  white-space: nowrap;
}

/* No hover on non-interactive elements */

/* ─── About ─── */
.about {
  text-align: center;
  max-width: 440px;
  opacity: 0;
  animation: fadeUp 0.7s ease forwards 0.6s;
}

.about p {
  font-size: 0.85rem;
  font-weight: 300;
  color: var(--text-secondary);
  line-height: 1.7;
}

.about strong {
  font-weight: 500;
  color: var(--text-primary);
}

/* ─── Social Links ─── */
.social {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  opacity: 0;
  animation: fadeUp 0.7s ease forwards 0.75s;
}

.social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.social a:hover {
  color: var(--text-primary);
  background: var(--accent-soft);
  border-color: rgba(108, 99, 255, 0.3);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(108, 99, 255, 0.12);
}

.social a:active {
  transform: translateY(-1px);
}

.social a svg {
  width: 19px;
  height: 19px;
  fill: currentColor;
  transition: var(--transition);
}

/* ─── CTA ─── */
.cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.6rem;
  padding: 0.6rem 1.4rem;
  border-radius: 100px;
  background: var(--accent);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 500;
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: var(--transition);
  opacity: 0;
  animation: fadeUp 0.7s ease forwards 0.85s;
  box-shadow: 0 4px 20px var(--accent-glow);
}

.cta:hover {
  background: #4e47d4;
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--accent-glow);
}

.cta:active {
  transform: translateY(0);
}

.cta svg {
  transition: transform 0.3s ease;
}

.cta:hover svg {
  transform: translateX(3px);
}

/* ─── Footer ─── */
.footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 1.5rem 2rem;
  color: var(--text-muted);
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  opacity: 0;
  animation: fadeUp 0.7s ease forwards 0.95s;
}

/* ─── Animations ─── */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes ringRotate {
  to { transform: rotate(360deg); }
}

/* ─── Focus ─── */
.social a:focus-visible,
.cta:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ─── Responsive ─── */
@media (max-width: 600px) {
  .container {
    padding: 2.5rem 1.25rem 1.5rem;
  }

  .avatar {
    width: 110px;
    height: 110px;
  }

  .cta {
    width: 100%;
    justify-content: center;
    padding: 0.75rem 1.6rem;
    font-size: 0.88rem;
  }

  .social {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.4rem;
  }

  /* Minimum 44px tap targets (WCAG) */
  .social a {
    width: 44px;
    height: 44px;
    border-radius: 10px;
  }

  .social a svg {
    width: 18px;
    height: 18px;
  }

  .skill-tags {
    gap: 0.35rem;
  }

  .skill-tag {
    padding: 0.3rem 0.6rem;
    font-size: 0.72rem;
  }

  .about p {
    font-size: 0.82rem;
  }

  .divider {
    margin: 1.4rem 0;
  }

  .divider-sm {
    margin: 1rem 0;
  }
}

/* ─── Reduced motion ─── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ─── Print ─── */
@media print {
  body::before,
  body::after { display: none; }
  body { background: #fff; color: #000; }
  .name { -webkit-text-fill-color: #000; background: none; }
  .title, .tagline, .about p, .skill-tag, .footer { color: #333; }
  .about strong { color: #000; }
  .social a, .skill-tag { background: none; border: 1px solid #ccc; }
  .cta { background: #333; }
  .avatar-wrapper::before, .avatar-wrapper::after { display: none; }
  .avatar { border-color: #ccc; }
}
