* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  color: var(--fg);
  transition: background 0.25s ease, color 0.25s ease;
}

/* Standard: Dark Mode */
body {
  --bg: #0f172a;
  --fg: #e5e7eb;
  --card-bg: rgba(15, 23, 42, 0.95);
  --border: rgba(148, 163, 184, 0.4);
  --muted: #9ca3af;
  --muted-soft: #6b7280;
  --accent: #38bdf8;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}

/* Light Mode */
body.light {
  --bg: #e5e7eb;
  --fg: #111827;
  --card-bg: #f9fafb;
  --border: rgba(156, 163, 175, 0.7);
  --muted: #4b5563;
  --muted-soft: #6b7280;
  --accent: #2563eb;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.18);
}

.card {
  background: var(--card-bg);
  padding: 2.5rem 2.75rem 2.3rem;
  border-radius: 1.5rem;
  box-shadow: var(--shadow);
  max-width: 480px;
  width: 92%;
  border: 1px solid var(--border);
  position: relative;
}

.name {
  font-size: 1.7rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.subtitle {
  font-size: 0.95rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.contact-list {
  list-style: none;
  display: grid;
  gap: 0.9rem;
  margin-top: 0.5rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.95rem;
  word-break: break-word;
}

.contact-item span.icon {
  font-size: 1.1rem;
  width: 1.6rem;
  text-align: center;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.footer-note {
  margin-top: 1.3rem;
  font-size: 0.8rem;
  color: var(--muted-soft);
}

.qr-section {
  margin-top: 1.8rem;
  border-top: 1px solid var(--border);
  padding-top: 1.3rem;
}

.qr-title {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
  color: var(--muted);
}

.qr-wrapper {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.qr-wrapper canvas {
  border-radius: 0.75rem;
  border: 1px solid var(--border);
  padding: 0.4rem;
  background: #ffffff;
}

.qr-text {
  font-size: 0.85rem;
  color: var(--muted-soft);
  max-width: 220px;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.7rem;
}

button {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--fg);
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  font-size: 0.8rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: background 0.2s ease, transform 0.1s ease, border-color 0.2s ease;
}

button:hover {
  background: rgba(148, 163, 184, 0.15);
  transform: translateY(-1px);
}

button:active {
  transform: translateY(0);
}

.theme-toggle {
  position: absolute;
  right: 1.6rem;
  top: 1.4rem;
  font-size: 0.8rem;
}

@media (max-width: 480px) {
  .card {
    padding: 2.1rem 1.6rem 1.9rem;
  }

  .name {
    font-size: 1.4rem;
  }

  .theme-toggle {
    right: 1.2rem;
    top: 1.1rem;
  }
}
