@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");

:root {
  --background: #08090c;
  --card-background: rgba(17, 18, 23, 0.94);
  --card-border: rgba(255, 255, 255, 0.08);

  --primary: #ffffff;
  --secondary: #a1a1aa;
  --muted: #71717a;

  --button-background: rgba(255, 255, 255, 0.045);
  --button-hover: rgba(255, 255, 255, 0.08);

  --green: #25d366;

  --radius-large: 28px;
  --radius-medium: 18px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  padding: 40px 20px;

  display: flex;
  justify-content: center;
  align-items: center;

  position: relative;
  isolation: isolate;
  overflow-x: hidden;

  background: var(--background);
  color: var(--primary);
  font-family: "Inter", sans-serif;
}

/* ================================
   BACKGROUND
================================ */

.aurora {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.aurora::before,
.aurora::after {
  content: "";

  position: absolute;

  width: 850px;
  height: 850px;

  border-radius: 50%;
  filter: blur(165px);
  opacity: 0.24;

  animation: auroraMove 18s ease-in-out infinite alternate;
}

.aurora::before {
  top: -340px;
  left: -300px;
  background: #043672;
}

.aurora::after {
  right: -320px;
  bottom: -360px;
  background: #123f7a;
  animation-delay: -8s;
}

.background-grid {
  position: fixed;
  inset: 0;
  z-index: 1;

  pointer-events: none;

  background-image:
    linear-gradient(
      rgba(255, 255, 255, 0.022) 1px,
      transparent 1px
    ),
    linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.022) 1px,
      transparent 1px
    );

  background-size: 45px 45px;

  -webkit-mask-image: linear-gradient(
    to bottom,
    black,
    transparent 88%
  );

  mask-image: linear-gradient(
    to bottom,
    black,
    transparent 88%
  );

  animation: gridMove 28s linear infinite;
}

.cursor-light {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 2;

  width: 460px;
  height: 460px;

  border-radius: 50%;

  background: radial-gradient(
    circle,
    rgba(59, 130, 246, 0.13) 0%,
    rgba(59, 130, 246, 0.055) 38%,
    transparent 72%
  );

  filter: blur(12px);
  transform: translate(-50%, -50%);

  opacity: 0;
  pointer-events: none;

  transition: opacity 0.35s ease;
  will-change: left, top;
}

/* ================================
   PAGE AND PROFILE CARD
================================ */

.page-container {
  width: 100%;
  max-width: 460px;

  position: relative;
  z-index: 3;

  animation: pageAppear 0.7s ease;
}

.profile-card {
  width: 100%;
  position: relative;

  padding: 42px 32px 28px;

  border: 1px solid var(--card-border);
  border-radius: var(--radius-large);

  background: var(--card-background);

  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);

  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);

  transition:
    transform 0.35s ease,
    box-shadow 0.35s ease,
    border-color 0.35s ease;
}

.profile-card::before {
  content: "";

  position: absolute;
  top: 0;
  left: 18%;
  right: 18%;

  height: 1px;

  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.38),
    transparent
  );

  pointer-events: none;
}

.profile-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.12);

  box-shadow:
    0 38px 100px rgba(0, 0, 0, 0.5),
    0 0 70px rgba(59, 130, 246, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* ================================
   PROFILE HEADER
================================ */

.profile-header {
  width: 100%;

  display: flex;
  flex-direction: column;
  align-items: center;

  text-align: center;
}

.logo {
  width: 110px;
  height: 110px;

  margin: 0 auto 20px;

  position: relative;
  flex-shrink: 0;

  display: flex;
  justify-content: center;
  align-items: center;

  overflow: hidden;

  border: none;
  border-radius: 50%;

  background: transparent;
  box-shadow: 0 0 32px rgba(59, 130, 246, 0.12);

  animation: logoFloat 4.5s ease-in-out infinite;
}

.logo img {
  width: 100%;
  height: 100%;

  display: block;

  object-fit: cover;
  object-position: center;
  border-radius: 50%;

  transition: transform 0.35s ease;
}

.logo:hover img {
  transform: scale(1.04);
}

.status {
  width: fit-content;

  margin: 0 auto 16px;
  padding: 7px 11px;

  display: flex;
  align-items: center;
  gap: 7px;

  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;

  background: rgba(255, 255, 255, 0.035);
  color: #d4d4d8;

  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);

  font-size: 11px;
  font-weight: 500;
}

.status-dot {
  width: 7px;
  height: 7px;

  border-radius: 50%;
  background: var(--green);

  animation: statusPulse 2s ease-in-out infinite;
}

h1 {
  margin-bottom: 7px;

  font-size: 30px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -1.2px;
}

.username {
  margin-bottom: 17px;

  color: var(--muted);

  font-size: 13px;
  font-weight: 500;
}

.description {
  max-width: 330px;
  margin: 0 auto;

  color: var(--secondary);

  font-size: 14px;
  line-height: 1.7;
}

/* ================================
   LINKS
================================ */

.links {
  margin-top: 30px;

  display: flex;
  flex-direction: column;
  gap: 12px;
}

.link-card {
  min-height: 72px;
  padding: 13px 16px;

  display: flex;
  align-items: center;
  gap: 14px;

  position: relative;
  overflow: hidden;

  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-medium);

  background: var(--button-background);
  color: var(--primary);

  text-decoration: none;

  transition:
    transform 0.25s ease,
    background 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

.link-card::before {
  content: "";

  position: absolute;
  top: 0;
  left: -140%;

  width: 80%;
  height: 100%;

  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.09),
    transparent
  );

  transform: skewX(-20deg);
  transition: left 0.65s ease;

  pointer-events: none;
}

.link-card:hover {
  transform: translateY(-3px);

  background: var(--button-hover);
  border-color: rgba(255, 255, 255, 0.13);

  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.2);
}

.link-card:hover::before {
  left: 140%;
}

.link-card:active {
  transform: scale(0.985);
}

.link-card.primary {
  background: #f4f4f5;
  color: #09090b;
  border-color: transparent;
}

.link-card.primary:hover {
  background: #ffffff;
}

.link-icon {
  width: 44px;
  height: 44px;

  flex-shrink: 0;

  display: flex;
  justify-content: center;
  align-items: center;

  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
}

.primary .link-icon {
  background: rgba(0, 0, 0, 0.07);
}

.link-icon svg {
  width: 21px;
  height: 21px;
  fill: currentColor;
}

.link-content {
  min-width: 0;

  display: flex;
  flex-direction: column;
  gap: 4px;

  text-align: left;
}

.link-title {
  font-size: 14px;
  font-weight: 600;
}

.link-subtitle {
  color: var(--muted);

  font-size: 11px;
  font-weight: 400;
}

.primary .link-subtitle {
  color: #52525b;
}

.arrow {
  margin-left: auto;
  flex-shrink: 0;

  color: var(--muted);

  font-size: 18px;

  transition: transform 0.25s ease;
}

.primary .arrow {
  color: #52525b;
}

.link-card:hover .arrow {
  transform: translateX(3px);
}

/* ================================
   SOCIALS AND FOOTER
================================ */

.divider {
  height: 1px;
  margin: 28px 0 22px;

  background: rgba(255, 255, 255, 0.07);
}

.social-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.social-title {
  color: var(--muted);

  font-size: 12px;
  font-weight: 500;
}

.social-links {
  display: flex;
  gap: 9px;
}

.social-links a {
  width: 36px;
  height: 36px;

  display: flex;
  justify-content: center;
  align-items: center;

  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 11px;

  background: rgba(255, 255, 255, 0.035);
  color: var(--secondary);

  transition:
    transform 0.2s ease,
    background 0.2s ease,
    color 0.2s ease;
}

.social-links a:hover {
  transform: translateY(-2px);

  background: rgba(255, 255, 255, 0.08);
  color: var(--primary);
}

.social-links svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

footer {
  padding-top: 20px;

  display: flex;
  justify-content: space-between;
  align-items: center;

  color: #52525b;

  font-size: 11px;
}

/* ================================
   INTRO ANIMATION
================================ */

body.loading .profile-card {
  opacity: 0;
  transform: translateY(24px) scale(0.96);
}

body.loaded .profile-card {
  opacity: 1;
  transform: translateY(0) scale(1);

  transition:
    opacity 0.8s ease,
    transform 0.8s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.35s ease,
    border-color 0.35s ease;
}

body.loading .logo {
  opacity: 0;
  filter: blur(14px);
  transform: translateY(-12px) scale(0.85);
}

body.loaded .logo {
  opacity: 1;
  filter: blur(0);
  transform: translateY(0) scale(1);

  transition:
    opacity 0.8s ease 0.2s,
    filter 0.8s ease 0.2s,
    transform 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.2s;
}

body.loading .status,
body.loading h1,
body.loading .username,
body.loading .description {
  opacity: 0;
  transform: translateY(12px);
}

body.loaded .status,
body.loaded h1,
body.loaded .username,
body.loaded .description {
  opacity: 1;
  transform: translateY(0);

  transition:
    opacity 0.65s ease,
    transform 0.65s ease;
}

body.loaded .status {
  transition-delay: 0.35s;
}

body.loaded h1 {
  transition-delay: 0.45s;
}

body.loaded .username {
  transition-delay: 0.55s;
}

body.loaded .description {
  transition-delay: 0.65s;
}

body.loading .link-card {
  opacity: 0;
  transform: translateY(18px);
}

body.loaded .link-card {
  opacity: 1;
  transform: translateY(0);

  transition:
    opacity 0.6s ease,
    transform 0.6s cubic-bezier(0.22, 1, 0.36, 1),
    background 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

body.loaded .link-card:nth-child(1) {
  transition-delay: 0.78s;
}

body.loaded .link-card:nth-child(2) {
  transition-delay: 0.9s;
}

body.loaded .link-card:nth-child(3) {
  transition-delay: 1.02s;
}

body.loading .divider,
body.loading .social-section,
body.loading footer {
  opacity: 0;
  transform: translateY(12px);
}

body.loaded .divider,
body.loaded .social-section,
body.loaded footer {
  opacity: 1;
  transform: translateY(0);

  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}

body.loaded .divider {
  transition-delay: 1.05s;
}

body.loaded .social-section {
  transition-delay: 1.15s;
}

body.loaded footer {
  transition-delay: 1.25s;
}

body.loading .aurora,
body.loading .background-grid {
  opacity: 0;
}

body.loaded .aurora {
  opacity: 1;
  transition: opacity 1.5s ease;
}

body.loaded .background-grid {
  opacity: 1;
  transition: opacity 1.4s ease 0.25s;
}

/* ================================
   KEYFRAMES
================================ */

@keyframes pageAppear {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes gridMove {
  from {
    background-position: 0 0;
  }

  to {
    background-position: 90px 90px;
  }
}

@keyframes auroraMove {
  0% {
    transform: translate(0, 0) scale(1);
  }

  50% {
    transform: translate(150px, 90px) scale(1.16);
  }

  100% {
    transform: translate(-60px, 180px) scale(0.94);
  }
}

@keyframes statusPulse {
  0%,
  100% {
    box-shadow:
      0 0 8px rgba(37, 211, 102, 0.55),
      0 0 0 0 rgba(37, 211, 102, 0.28);
  }

  50% {
    box-shadow:
      0 0 14px rgba(37, 211, 102, 0.9),
      0 0 0 7px rgba(37, 211, 102, 0);
  }
}

@keyframes logoFloat {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-5px);
  }
}

/* ================================
   RESPONSIVE
================================ */

@media (max-width: 520px) {
  body {
    padding: 24px 14px;
    align-items: flex-start;
  }

  .profile-card {
    padding: 34px 20px 24px;
    border-radius: 24px;
  }

  .logo {
    width: 88px;
    height: 88px;
  }

  h1 {
    font-size: 27px;
  }

  .description {
    font-size: 13px;
  }

  .link-card {
    min-height: 68px;
    padding: 12px 14px;
  }

  footer {
    padding-left: 6px;
    padding-right: 6px;
  }
}

@media (hover: none), (pointer: coarse) {
  .cursor-light {
    display: none;
  }

  .profile-card:hover,
  .link-card:hover,
  .social-links a:hover {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}