:root {
  /* Lab Dark Color Palette */
  --bg-dark: #090c12;
  --bg-grid: #0d121c;
  --bg-card: #131a26;
  --bg-card-hover: #1b2434;
  
  --border-lab: rgba(0, 229, 180, 0.2);
  --border-lab-hover: rgba(0, 229, 180, 0.6);
  --border-hazard: rgba(255, 94, 126, 0.3);

  /* Neon Lab Accents */
  --accent-cyan: #00CAC2;
  --accent-cyan-glow: rgba(0, 229, 180, 0.25);
  
  --accent-green: #20e070;
  --accent-green-glow: rgba(32, 224, 112, 0.4);

  --accent-pink: #ff5e7e;
  --accent-pink-glow: rgba(255, 94, 126, 0.3);

  --accent-yellow: #ffd166;
  
  --text-main: #f0f4fc;
  --text-muted: #8b9bb4;
  --text-dim: #54657e;
  --text-code: #00e5b4;

  /* Fonts */
  --font-heading: 'Fredoka', cursive, sans-serif;
  --font-body: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-mono: 'Space Mono', monospace;

  /* Shadows & Lab FX */
  --shadow-card: 0 8px 24px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 20px var(--accent-cyan-glow);
  --radius-lg: 16px;
  --radius-md: 10px;
  --radius-sm: 6px;
  --radius-full: 9999px;

  --transition-fast: 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-normal: 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  font-family: var(--font-body);
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  position: relative;
  overflow-x: hidden;
  padding: 2.5rem 1.25rem;

  /* Mad Scientist Lab Grid & CRT Scanline Pattern */
  background-image: 
    radial-gradient(circle at 50% 0%, rgba(0, 229, 180, 0.12) 0%, transparent 70%),
    radial-gradient(circle at 80% 90%, rgba(255, 94, 126, 0.08) 0%, transparent 60%),
    linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 32px 32px, 32px 32px;
}

#canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  z-index: 0;
}

/* Base Container */
.container {
  width: 100%;
  max-width: 620px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  z-index: 1;
}

.profile-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
}

/* Specimen Container Halo */
.avatar-wrapper {
  position: relative;
  width: 160px;
  height: 160px;
  margin-bottom: 1.25rem;
}

.avatar-glow {
  position: absolute;
  inset: -8px;
  border-radius: var(--radius-full);
  background: radial-gradient(circle, var(--accent-cyan-glow), transparent 70%);
  animation: labPulse 3s ease-in-out infinite alternate;
}

.avatar-frame {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: var(--radius-full);
  padding: 5px;
  background: var(--bg-card);
  border: 2px solid var(--accent-cyan);
  box-shadow: 0 0 20px var(--accent-cyan-glow), inset 0 0 15px rgba(0, 229, 180, 0.15);
  overflow: hidden;
  transition: transform var(--transition-normal), border-color var(--transition-normal);
}

.avatar-frame:hover {
  transform: scale(1.04);
  border-color: var(--accent-pink);
  box-shadow: 0 0 25px var(--accent-pink-glow), inset 0 0 15px rgba(255, 94, 126, 0.2);
}

.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-full);
  background: #090d14;
  display: block;
}

@keyframes labPulse {
  0% { opacity: 0.4; transform: scale(0.98); }
  100% { opacity: 0.9; transform: scale(1.05); }
}

/* Lab Title Header */
.lab-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  color: var(--accent-cyan);
  text-transform: uppercase;
  margin-bottom: 0.25rem;
  opacity: 0.9;
}

.profile-title {
  font-family: var(--font-heading);
  font-size: 2.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-main);
  text-shadow: 0 0 20px rgba(0, 229, 180, 0.3);
  margin-bottom: 0.25rem;
  line-height: 1.1;
}

.profile-tagline {
  font-size: 1rem;
  color: white;
  font-weight: 500;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.brain-icon {
  color: var(--accent-pink);
  font-size: 1.1rem;
}

/* --------------------------------------------------------------------------
   4. Industrial Lab Console Links
   -------------------------------------------------------------------------- */
.links-section {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.link-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-lab);
  color: var(--text-main);
  text-decoration: none;
  box-shadow: var(--shadow-card);
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
}

/* Corner Tech Accents */
.link-card::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 12px;
  height: 12px;
  border-top: 2px solid transparent;
  border-right: 2px solid transparent;
  transition: border-color var(--transition-fast);
}

.link-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-lab-hover);
  transform: translateX(4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7), 0 0 15px var(--accent-cyan-glow);
}

/* Custom Platform Accents */
.link-card.twitch:hover { border-color: rgba(145, 70, 255, 0.6); box-shadow: 0 0 18px rgba(145, 70, 255, 0.25); }
.link-card.youtube:hover { border-color: rgba(255, 0, 0, 0.6); box-shadow: 0 0 18px rgba(255, 0, 0, 0.25); }
.link-card.twitter:hover { border-color: rgba(29, 161, 242, 0.6); box-shadow: 0 0 18px rgba(29, 161, 242, 0.25); }
.link-card.tiktok:hover { border-color: rgba(255, 94, 126, 0.6); box-shadow: 0 0 18px rgba(255, 94, 126, 0.25); }
.link-card.business:hover { border-color: var(--accent-cyan); box-shadow: 0 0 18px var(--accent-cyan-glow); }

.link-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.icon-box {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.link-card:hover .icon-box {
  transform: scale(1.06);
  border-color: rgba(255, 255, 255, 0.2);
}

.icon-box svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* Icon Colors */
.twitch .icon-box { color: #a970ff; }
.youtube .icon-box { color: #ff4d4d; }
.twitter .icon-box { color: #38bdf8; }
.tiktok .icon-box { color: #ff7597; }
.business .icon-box { color: var(--accent-cyan); }

.link-content {
  display: flex;
  flex-direction: column;
}

.link-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.2;
}

.link-subtitle {
  font-family: var(--font-mono);
  font-size: 0.785rem;
  color: var(--text-muted);
}

.link-arrow {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent-cyan);
  transition: transform var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.link-card:hover .link-arrow {
  transform: translateX(4px);
  color: var(--text-main);
}

/* --------------------------------------------------------------------------
   5. Footer
   -------------------------------------------------------------------------- */
.site-footer {
  margin-top: 1.5rem;
  text-align: center;
  font-family: var(--font-mono);
  color: var(--text-dim);
  font-size: 0.775rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding-top: 1.5rem;
}

.footer-brain {
  color: var(--accent-pink);
}

/* --------------------------------------------------------------------------
   6. Responsive Mobile Tweaks
   -------------------------------------------------------------------------- */
@media (max-width: 480px) {
  body {
    padding: 1.75rem 1rem;
  }

  .profile-title {
    font-size: 2.25rem;
  }

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

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

  .icon-box {
    width: 38px;
    height: 38px;
  }
}
