:root {
  --font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --bg-color: #0f172a;
  --card-bg: rgba(30, 41, 59, 0.7);
  --card-hover: rgba(51, 65, 85, 0.85);
  --border-color: rgba(255, 255, 255, 0.12);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --primary-accent: #38bdf8;
  --blob-1: #6366f1;
  --blob-2: #0284c7;
  --shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.35);
}

[data-theme="light"] {
  --bg-color: #f1f5f9;
  --card-bg: rgba(255, 255, 255, 0.8);
  --card-hover: rgba(255, 255, 255, 0.95);
  --border-color: rgba(0, 0, 0, 0.08);
  --text-main: #0f172a;
  --text-muted: #64748b;
  --primary-accent: #0284c7;
  --blob-1: #c7d2fe;
  --blob-2: #bae6fd;
  --shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.06);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-color);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  position: relative;
  overflow-x: hidden;
  padding: 20px 14px 40px;
}

/* Background Blobs for Glassmorphism Effect */
.background-blobs {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  filter: blur(80px);
  opacity: 0.45;
}

.blob {
  position: absolute;
  border-radius: 50%;
}
.blob-1 { width: 350px; height: 350px; background: var(--blob-1); top: -50px; left: 10%; }
.blob-2 { width: 400px; height: 400px; background: var(--blob-2); bottom: 10%; right: 10%; }

.container {
  width: 100%;
  max-width: 580px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Top Nav */
.top-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.icon-btn {
  background: var(--card-bg);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  backdrop-filter: blur(12px);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.icon-btn:hover {
  background: var(--card-hover);
  transform: translateY(-2px);
}

/* Profile Card */
.profile-card {
  text-align: center;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 28px 20px 22px;
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
}

.avatar-wrap {
  position: relative;
  width: 100px;
  height: 100px;
  margin: 0 auto 12px;
}

.avatar-wrap img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--primary-accent);
}

.verified-icon {
  position: absolute;
  bottom: 4px;
  right: 4px;
  background: var(--primary-accent);
  color: #fff;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-color);
}

.profile-card h1 {
  font-size: 1.5rem;
  font-weight: 700;
}

.handle {
  color: var(--primary-accent);
  font-size: 0.95rem;
  margin-bottom: 8px;
}

.bio {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 16px;
}

.quick-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 16px;
}

.btn {
  padding: 8px 16px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}
.btn-primary { background: var(--primary-accent); color: #fff; }
.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  border: 1px solid var(--border-color);
}
.btn:hover { opacity: 0.9; transform: translateY(-1px); }

.social-bar {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 10px;
}

.social-bar a {
  color: var(--text-muted);
  font-size: 1.25rem;
  transition: transform 0.2s, color 0.2s;
}
.social-bar a:hover {
  color: var(--primary-accent);
  transform: translateY(-3px);
}
/* Search & Tabs */
.controls {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.search-bar {
  position: relative;
  display: flex;
  align-items: center;
}

.search-bar input {
  width: 100%;
  padding: 12px 38px 12px 42px;
  border-radius: 14px;
  border: 1px solid var(--border-color);
  background: var(--card-bg);
  color: var(--text-main);
  font-size: 0.9rem;
  outline: none;
  backdrop-filter: blur(10px);
}
.search-bar input:focus {
  border-color: var(--primary-accent);
}

.search-icon {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
}
.clear-btn {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
}

.category-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.category-tabs::-webkit-scrollbar { display: none; }

.tab-btn {
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  background: var(--card-bg);
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}
.tab-btn.active, .tab-btn:hover {
  background: var(--primary-accent);
  color: #fff;
  border-color: var(--primary-accent);
}

/* Links Container */
.links-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.section-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 700;
  margin-top: 6px;
}

.link-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  text-decoration: none;
  color: var(--text-main);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  transition: transform 0.2s, background 0.2s, border-color 0.2s;
}
.link-card:hover {
  transform: translateY(-3px);
  background: var(--card-hover);
  border-color: var(--primary-accent);
}

.link-left {
  display: flex;
  align-items: center;
  gap: 14px;
  overflow: hidden;
}

.link-icon-box {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: var(--primary-accent);
}

.link-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  overflow: hidden;
}

.title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.link-title {
  font-size: 0.98rem;
  font-weight: 600;
}

.link-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  text-transform: uppercase;
}
.badge-success { background: rgba(34, 197, 94, 0.2); color: #4ade80; }
.badge-warning { background: rgba(234, 179, 8, 0.2); color: #facc15; }
.badge-danger  { background: rgba(239, 68, 68, 0.2); color: #f87171; }
.badge-info    { background: rgba(56, 189, 248, 0.2); color: #38bdf8; }

.link-arrow {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-left: 8px;
}
  /* Modal */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  z-index: 999;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal.open { display: flex; }

.modal-content {
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  padding: 24px;
  border-radius: 20px;
  max-width: 320px;
  width: 100%;
  text-align: center;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
}

.qr-box {
  margin: 16px auto 0;
  background: #fff;
  padding: 12px;
  border-radius: 12px;
  width: 180px;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-box img {
  width: 100%;
  height: 100%;
}

.footer {
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 16px;
  }
/* ===== Added: 3rd background blob, sub-headings, Team section ===== */
.blob-3 {
  width: 300px;
  height: 300px;
  background: var(--blob-1);
  top: 45%;
  left: -80px;
  opacity: 0.6;
}

.sub-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  padding-left: 10px;
  border-left: 3px solid var(--primary-accent);
  margin-top: 4px;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

.team-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
  padding: 18px 12px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  color: var(--text-main);
  text-decoration: none;
}
a.team-card:hover {
  transform: translateY(-3px);
  background: var(--card-hover);
  border-color: var(--primary-accent);
}

.team-photo {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: 8px;
  border: 2px solid var(--primary-accent);
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: var(--primary-accent);
}
.team-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-name {
  font-size: 0.95rem;
  font-weight: 700;
}
.team-role {
  font-size: 0.8rem;
  color: var(--text-muted);
}
