@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Outfit:wght@400;600;700;800&display=swap');

/* --- DESIGN SYSTEM & CSS VARIABLES --- */
:root {
  --font-headings: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --bg-color: #000000;
  /* Pure black base */
  --card-bg: rgba(12, 12, 12, 0.65);
  /* Translucent dark charcoal glass */
  --card-bg-hover: rgba(255, 255, 255, 0.08);
  --border-color: rgba(255, 255, 255, 0.1);
  --border-color-hover: rgba(255, 255, 255, 0.7);
  /* Glowing white border */

  --text-primary: #ffffff;
  --text-secondary: #94a3b8;
  /* Slate-400 */
  --text-muted: #475569;
  --primary-glow: linear-gradient(135deg, #ffffff, #94a3b8, #475569);
  --shadow-main: 0 20px 50px rgba(0, 0, 0, 0.5);
  --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- RESET & BASE STYLES --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html {
  background: linear-gradient(135deg, #000000 0%, #0c0c0c 50%, #1a1a1a 100%);
  background-color: #000000;
  height: 100%;
}

body {
  background: transparent;
  color: var(--text-primary);
  font-family: var(--font-body);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-x: hidden;
  position: relative;
  padding: 2rem 1rem;
}

/* --- BACKGROUND VECTOR SHAPES & GRADIENTS --- */
.bg-shapes {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.noise-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.035;
  /* Even more subtle, high-end look */
  z-index: 9999;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg width='150' height='150' viewBox='0 0 150 150' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.95' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 150px 150px;
}

.shape {
  position: absolute;
  width: 650px;
  height: 650px;
  fill: none;
  stroke: rgba(255, 255, 255, 0.045);
  stroke-width: 1.2px;
  transition: var(--transition-smooth);
}

.shape-left {
  top: 5%;
  left: -200px;
  transform: rotate(15deg);
  animation: slow-float-left 50s infinite ease-in-out alternate;
  will-change: transform;
}

.shape-right {
  bottom: -5%;
  right: -200px;
  transform: rotate(-25deg);
  animation: slow-float-right 55s infinite ease-in-out alternate;
  will-change: transform;
}

@keyframes slow-float-left {
  0% {
    transform: rotate(15deg) translate(0, 0) scale(1);
  }

  50% {
    transform: rotate(30deg) translate(40px, -50px) scale(1.08);
  }

  100% {
    transform: rotate(10deg) translate(-20px, 30px) scale(0.92);
  }
}

@keyframes slow-float-right {
  0% {
    transform: rotate(-25deg) translate(0, 0) scale(1);
  }

  50% {
    transform: rotate(-10deg) translate(-50px, 40px) scale(1.1);
  }

  100% {
    transform: rotate(-35deg) translate(30px, -20px) scale(0.92);
  }
}

/* --- GLASS CONTAINER --- */
.container {
  width: 100%;
  max-width: 460px;
  background: var(--card-bg);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--border-color);
  border-radius: 32px;
  padding: 3rem 2rem;
  box-shadow: var(--shadow-main);
  text-align: center;
  position: relative;
  z-index: 1;
  animation: container-entry 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  opacity: 0;
  transform: translateY(20px);
  transition: transform 0.2s cubic-bezier(0.25, 1, 0.5, 1);
}

@keyframes container-entry {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- PROFILE SECTION --- */
.profile {
  margin-bottom: 2.5rem;
}

.avatar-wrapper {
  position: relative;
  width: 110px;
  height: 110px;
  margin: 0 auto 1.5rem;
  border-radius: 50%;
  padding: 4px;
  background: var(--primary-glow);
  box-shadow: 0 8px 25px rgba(255, 255, 255, 0.15);
  animation: glow-pulse 3s infinite alternate ease-in-out;
  will-change: transform, box-shadow;
}

.avatar-wrapper::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  background: var(--primary-glow);
  z-index: -1;
  filter: blur(8px);
  opacity: 0.7;
}

.avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: #111827;
  /* Fallback background */
  border: 3px solid #080b14;
  display: block;
  transition: var(--transition-smooth);
}

.avatar-fallback {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: var(--font-headings);
  font-size: 2.5rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #0f172a, #1e293b);
  border: 3px solid #080b14;
}

@keyframes glow-pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 8px 20px rgba(255, 255, 255, 0.08);
  }

  100% {
    transform: scale(1.03);
    box-shadow: 0 8px 30px rgba(255, 255, 255, 0.2);
  }
}

.profile-name {
  font-family: var(--font-headings);
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.profile-tag {
  font-size: 0.95rem;
  color: #ffffff;
  font-weight: 500;
  letter-spacing: 0.05em;

  margin-bottom: 0.75rem;
  display: inline-block;
  background: rgba(255, 255, 255, 0.08);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.profile-bio {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 320px;
  margin: 0 auto;
}

/* --- LINKS SECTION --- */
.links-container {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

/* Custom interactive link card */
.link-card {
  position: relative;
  display: flex;
  align-items: center;
  padding: 1.1rem 1.5rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 500;
  transition: var(--transition-smooth);
  overflow: hidden;
  opacity: 0;
  transform: translateY(15px);
  animation: card-entry 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  contain: layout style;
}

@keyframes card-entry {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.link-card:nth-child(1) {
  animation-delay: 0.2s;
}

.link-card:nth-child(2) {
  animation-delay: 0.4s;
}

.link-card:nth-child(3) {
  animation-delay: 0.6s;
}

.link-card:nth-child(4) {
  animation-delay: 0.8s;
}

/* Glowing cursor background tracking */
.link-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(180px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
      rgba(255, 255, 255, 0.08),
      transparent 60%);
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 1;
  pointer-events: none;
}

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

/* Border glowing transition */
.link-card:hover {
  background: var(--card-bg-hover);
  border-color: var(--border-color-hover);
  transform: translateY(-3px) scale(1.01);
  box-shadow: 0 10px 25px rgba(255, 255, 255, 0.05);
}

.link-card:active {
  transform: translateY(-1px) scale(0.995);
}

.icon-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  margin-right: 1.25rem;
  z-index: 2;
  transition: var(--transition-smooth);
}

/* Social-specific colors on hover */
.link-card.instagram:hover .icon-wrapper {
  background: rgba(255, 255, 255, 0.95);
  color: #000000;
}

.link-card.instagram:hover .icon-wrapper svg {
  fill: #000000;
}

.link-card.website:hover .icon-wrapper {
  background: rgba(255, 255, 255, 0.95);
  color: #000000;
}

.link-card.website:hover .icon-wrapper svg {
  fill: #000000;
}

.link-card.plateflipper:hover .icon-wrapper {
  background: rgba(255, 255, 255, 0.95);
  color: #000000;
}

.link-card.plateflipper:hover .icon-wrapper svg {
  fill: #000000;
}

.icon-wrapper svg {
  width: 24px;
  height: 24px;
  fill: #fff;
  transition: var(--transition-smooth);
}

.link-details {
  text-align: left;
  flex-grow: 1;
  z-index: 2;
}

.link-title {
  font-family: var(--font-headings);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.15rem;
}

.link-subtitle {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.arrow-icon {
  width: 20px;
  height: 20px;
  fill: var(--text-primary);
  transition: var(--transition-smooth);
  z-index: 2;
  transform: translateX(-5px);
  opacity: 0.45;
}

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

/* --- MEDIA QUERIES --- */
@media (max-width: 480px) {
  body {
    padding: 1.5rem 0.75rem;
  }

  .container {
    padding: 2.5rem 1.5rem;
    border-radius: 24px;
  }

  .avatar-wrapper {
    width: 95px;
    height: 95px;
  }

  .profile-name {
    font-size: 1.6rem;
  }

  .link-card {
    padding: 1rem 1.25rem;
  }

  .icon-wrapper {
    width: 40px;
    height: 40px;
    margin-right: 1rem;
  }
}

/* --- PREFERS REDUCED MOTION (a11y + performance) --- */
@media (prefers-reduced-motion: reduce) {
  .shape-left,
  .shape-right {
    animation: none;
  }

  .avatar-wrapper {
    animation: none;
  }

  .container,
  .link-card {
    animation: none;
    opacity: 1;
    transform: none;
  }
}