/* ==========================================================================
   wiill_fletch • Minimal Natural Luxury Bio Links
   Aesthetic: Soft pleasing, minimal high-end, organic natural tone falloff,
   uncluttered quiet luxury typography and soothing tactile surfaces.
   ========================================================================== */

/* Design Tokens */
:root {
  /* Default: Soft Velvet Dark Stone */
  --bg-canvas: #121316;
  --bg-gradient-top: radial-gradient(circle at 50% 0%, rgba(65, 82, 125, 0.12) 0%, transparent 60%);
  --bg-gradient-bottom: radial-gradient(circle at 80% 100%, rgba(55, 60, 75, 0.08) 0%, transparent 60%);
  
  --surface-card: rgba(255, 255, 255, 0.035);
  --surface-card-hover: rgba(255, 255, 255, 0.065);
  --surface-card-active: rgba(255, 255, 255, 0.085);
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.18);
  --border-focus: rgba(255, 255, 255, 0.28);
  
  --text-main: #f3f3f5;
  --text-muted: #8e9099;
  --text-whisper: #5e606a;
  
  --icon-bg: rgba(255, 255, 255, 0.045);
  --icon-border: rgba(255, 255, 255, 0.08);
  --icon-color: #e5e5ea;
  
  --badge-bg: rgba(255, 255, 255, 0.04);
  --badge-border: rgba(255, 255, 255, 0.07);
  --badge-text: #9a9ba4;
  --accent-dot: #5c7cfa;
  
  --card-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.35);
  --card-shadow-hover: 0 8px 30px -4px rgba(0, 0, 0, 0.45);
  --avatar-shadow: 0 10px 30px -6px rgba(0, 0, 0, 0.4);
  
  --modal-bg: #16171b;
  --modal-backdrop: rgba(10, 11, 14, 0.75);

  --radius-card: 16px;
  --radius-pill: 999px;
  --ease-soft: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Light Theme: Soft Warm Sand & Linen */
[data-theme="light"] {
  --bg-canvas: #f7f6f2;
  --bg-gradient-top: radial-gradient(circle at 50% 0%, rgba(235, 226, 212, 0.6) 0%, transparent 65%);
  --bg-gradient-bottom: radial-gradient(circle at 80% 100%, rgba(224, 228, 235, 0.5) 0%, transparent 65%);
  
  --surface-card: #ffffff;
  --surface-card-hover: #ffffff;
  --surface-card-active: #faf9f6;
  
  --border-subtle: rgba(0, 0, 0, 0.06);
  --border-hover: rgba(0, 0, 0, 0.14);
  --border-focus: rgba(0, 0, 0, 0.22);
  
  --text-main: #19191b;
  --text-muted: #6e6f77;
  --text-whisper: #9e9fa6;
  
  --icon-bg: rgba(0, 0, 0, 0.035);
  --icon-border: rgba(0, 0, 0, 0.05);
  --icon-color: #26262a;
  
  --badge-bg: #ffffff;
  --badge-border: rgba(0, 0, 0, 0.07);
  --badge-text: #66676f;
  --accent-dot: #3b5bdb;
  
  --card-shadow: 0 2px 14px -2px rgba(28, 25, 23, 0.04), 0 6px 24px -4px rgba(28, 25, 23, 0.03);
  --card-shadow-hover: 0 6px 20px -2px rgba(28, 25, 23, 0.06), 0 12px 32px -4px rgba(28, 25, 23, 0.04);
  --avatar-shadow: 0 8px 24px -4px rgba(28, 25, 23, 0.12);
  
  --modal-bg: #ffffff;
  --modal-backdrop: rgba(28, 26, 24, 0.45);
}

/* Base & Typography */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  width: 100%;
  overflow-x: hidden;
  background-color: var(--bg-canvas);
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-canvas);
  color: var(--text-main);
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  overflow-x: hidden;
  position: relative;
  line-height: 1.5;
  transition: background-color 0.3s ease, color 0.3s ease;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Natural Ambient Diffused Atmosphere */
.natural-ambient {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.ambient-light {
  position: absolute;
  inset: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.light-top {
  background: var(--bg-gradient-top);
}

.light-bottom {
  background: var(--bg-gradient-bottom);
}

/* Main Container */
.page-container {
  width: 100%;
  max-width: 540px;
  min-height: 100vh;
  padding: 24px 20px 48px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   Top Header & Actions
   ========================================================================== */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-bottom: 24px;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--badge-bg);
  border: 1px solid var(--badge-border);
  border-radius: var(--radius-pill);
  padding: 5px 12px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--badge-text);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
  transition: var(--ease-soft) 0.2s;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--accent-dot);
}

.top-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.control-btn {
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s var(--ease-soft);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
}

.control-btn:hover {
  background: var(--surface-card-hover);
  border-color: var(--border-hover);
  color: var(--text-main);
  transform: translateY(-1px);
}

.control-btn:active {
  transform: translateY(0);
}

/* Theme Icon Visibility */
[data-theme="dark"] .sun-icon { display: block; }
[data-theme="dark"] .moon-icon { display: none; }
[data-theme="light"] .sun-icon { display: none; }
[data-theme="light"] .moon-icon { display: block; }

/* ==========================================================================
   Profile Header
   ========================================================================== */
.profile-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 26px;
}

.avatar-container {
  position: relative;
  margin-bottom: 16px;
}

.avatar-subtle-glow {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(92, 124, 250, 0.2) 0%, transparent 70%);
  filter: blur(10px);
  z-index: 1;
  pointer-events: none;
}

.avatar-frame {
  position: relative;
  z-index: 2;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  padding: 2px;
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--avatar-shadow);
  transition: transform 0.3s var(--ease-soft);
}

.avatar-image {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  background-color: #0b0c0f;
}

.profile-meta {
  margin-bottom: 18px;
}

.profile-handle {
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-main);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 4px;
}

.verified-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  background: var(--accent-dot);
  color: #ffffff;
  border-radius: 50%;
}

.profile-tagline {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 400;
  max-width: 360px;
  margin: 0 auto;
  line-height: 1.4;
}

/* ==========================================================================
   Quick Socials Bar
   ========================================================================== */
.quick-icons-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.social-pill-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  text-decoration: none;
  transition: all 0.2s var(--ease-soft);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.02);
}

.social-pill-btn:hover {
  background: var(--surface-card-hover);
  border-color: var(--border-hover);
  color: var(--text-main);
  transform: translateY(-2px);
}

.social-pill-btn:active {
  transform: translateY(0);
}

/* ==========================================================================
   Links Group (Minimal High-End Cards)
   ========================================================================== */
.links-group {
  display: flex;
  flex-direction: column;
  gap: 11px;
  margin-bottom: 28px;
  width: 100%;
}

.link-item {
  display: flex;
  align-items: center;
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  padding: 14px 18px;
  text-decoration: none;
  color: var(--text-main);
  position: relative;
  transition: all 0.22s var(--ease-soft);
  box-shadow: var(--card-shadow);
  width: 100%;
  box-sizing: border-box;
}

.link-item:hover {
  background: var(--surface-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: var(--card-shadow-hover);
}

.link-item:active {
  background: var(--surface-card-active);
  transform: translateY(0);
}

/* Subtle Streamer Accent for Twitch (Clean & Quiet) */
.highlight-stream {
  border-color: rgba(92, 124, 250, 0.28);
}
.highlight-stream:hover {
  border-color: rgba(92, 124, 250, 0.48);
}

/* Link Icon Box */
.link-icon-wrap {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--icon-bg);
  border: 1px solid var(--icon-border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-right: 14px;
  color: var(--icon-color);
  transition: transform 0.2s var(--ease-soft), color 0.2s ease;
}

.link-item:hover .link-icon-wrap {
  color: var(--text-main);
  transform: scale(1.04);
}

/* Text Meta */
.link-text-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.link-heading-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.link-heading {
  font-size: 0.975rem;
  font-weight: 600;
  color: var(--text-main);
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.quiet-tag {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 1px 7px;
  border-radius: var(--radius-pill);
  background: rgba(92, 124, 250, 0.12);
  color: var(--accent-dot);
  border: 1px solid rgba(92, 124, 250, 0.2);
  flex-shrink: 0;
}

.link-subheading {
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-weight: 400;
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Right Chevron Arrow */
.link-chevron {
  color: var(--text-whisper);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 10px;
  flex-shrink: 0;
  transition: color 0.2s ease, transform 0.2s var(--ease-soft);
}

.link-item:hover .link-chevron {
  color: var(--text-main);
  transform: translate(2px, -2px);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.minimal-copy-btn {
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 7px 16px;
  border-radius: var(--radius-pill);
  font-size: 0.8125rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  transition: all 0.2s var(--ease-soft);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.02);
}

.minimal-copy-btn:hover {
  background: var(--surface-card-hover);
  border-color: var(--border-hover);
  color: var(--text-main);
  transform: translateY(-1px);
}

.powered-by {
  font-size: 0.775rem;
  color: var(--text-whisper);
  font-weight: 400;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.shift-link {
  color: var(--text-muted);
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.04em;
  position: relative;
  transition: color 0.2s var(--ease-soft);
}

.shift-link:hover {
  color: var(--text-main);
}

.shift-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0px;
  width: 100%;
  height: 1px;
  background-color: currentColor;
  opacity: 0.35;
  transition: opacity 0.2s ease;
}

.shift-link:hover::after {
  opacity: 1;
}

/* ==========================================================================
   Modals (Soft Dialogs)
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: var(--modal-backdrop);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 100;
  display: flex;
  visibility: hidden;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.modal-backdrop.active {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.modal-dialog {
  width: 100%;
  max-width: 400px;
  background: var(--modal-bg);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 22px;
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.4);
  transform: scale(0.96);
  transition: transform 0.22s var(--ease-soft);
}

.modal-backdrop.active .modal-dialog {
  transform: scale(1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.modal-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-main);
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  transition: color 0.15s ease;
}

.modal-close-btn:hover {
  color: var(--text-main);
}

.modal-sub {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.modal-url-box {
  display: flex;
  gap: 8px;
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 6px 6px 6px 12px;
  margin-bottom: 16px;
}

.modal-url-input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-main);
  font-size: 0.8125rem;
  outline: none;
  font-family: inherit;
}

.modal-copy-btn {
  background: var(--text-main);
  border: none;
  color: var(--bg-canvas);
  padding: 7px 14px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.8125rem;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.modal-copy-btn:hover {
  opacity: 0.9;
}

.modal-share-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.share-option-btn {
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 12px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  font-size: 0.8125rem;
  font-weight: 500;
  transition: all 0.2s var(--ease-soft);
}

.share-option-btn:hover {
  background: var(--surface-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-1px);
}

/* QR Code Modal */
.qr-dialog {
  max-width: 320px;
  text-align: center;
}

.qr-body {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.qr-frame {
  background: #ffffff;
  padding: 14px;
  border-radius: 14px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  margin-bottom: 12px;
  display: inline-block;
}

#qrCanvasContainer svg, #qrCanvasContainer canvas, #qrCanvasContainer img {
  display: block;
}

.qr-handle {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-main);
}

/* ==========================================================================
   Toast Notification Pill
   ========================================================================== */
.toast-pill {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(24px);
  background: var(--surface-card);
  border: 1px solid var(--border-hover);
  color: var(--text-main);
  padding: 9px 18px;
  border-radius: var(--radius-pill);
  font-size: 0.8125rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.25s var(--ease-soft), opacity 0.2s ease;
  z-index: 200;
}

.toast-pill.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.toast-pill svg {
  color: var(--accent-dot);
  flex-shrink: 0;
}

/* ==========================================================================
   Mobile Responsive Adjustments
   ========================================================================== */
@media (max-width: 480px) {
  .page-container {
    padding: 18px 16px 36px;
  }

  .top-bar {
    margin-bottom: 20px;
  }

  .avatar-frame {
    width: 88px;
    height: 88px;
  }

  .profile-handle {
    font-size: 1.35rem;
  }

  .profile-tagline {
    font-size: 0.8125rem;
  }

  .social-pill-btn {
    width: 38px;
    height: 38px;
  }

  .link-item {
    padding: 12px 15px;
    border-radius: 14px;
  }

  .link-icon-wrap {
    width: 36px;
    height: 36px;
    margin-right: 12px;
    border-radius: 9px;
  }

  .link-heading {
    font-size: 0.925rem;
  }

  .link-subheading {
    font-size: 0.75rem;
  }
}
