:root {
  --bg: #F5F0E8;
  --card: #F5F0E8;
  --text: #24211E;
  --muted: #6F655D;
  --line: #BBA999;
  --accent: #8E7A6A;
  --accent-2: #E7DED2;
  --shadow: 0 18px 60px rgba(36, 33, 30, 0.12);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background-color: var(--bg);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' seed='7'/><feColorMatrix values='0 0 0 0 0.14 0 0 0 0 0.13 0 0 0 0 0.12 0 0 0 0.12 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  color: var(--text);
  min-height: 100vh;
}

.page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.card {
  position: relative;
  width: min(100%, 460px);
  background: var(--card);
  border: 1px solid rgba(187, 169, 153, 0.35);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: 28px;
  isolation: isolate;
}

.card::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 22%;
  bottom: 38%;
  width: 14px;
  background: var(--accent);
  border-radius: 3px;
  z-index: -1;
  box-shadow: -1px 0 4px rgba(36, 33, 30, 0.15);
}

.wordmark {
  display: block;
  width: 100%;
  max-width: 180px;
  height: auto;
  margin: 8px auto 28px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 400;
}

h1 {
  margin: 0;
  font-size: clamp(2.4rem, 7vw, 3.2rem);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.bio {
  margin: 18px 0 30px;
  color: var(--text);
  font-size: clamp(1.25rem, 3.5vw, 1.6rem);
  font-weight: 300;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.actions {
  display: flex;
  gap: 12px;
}

.primary-actions {
  margin-bottom: 22px;
}

.btn {
  appearance: none;
  border: 0;
  text-decoration: none;
  cursor: pointer;
  border-radius: 14px;
  padding: 14px 18px;
  font: inherit;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  flex: 1;
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.btn-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.btn-primary {
  background: var(--text);
  color: var(--bg);
  box-shadow:
    0 10px 24px rgba(36, 33, 30, 0.22),
    0 2px 4px rgba(36, 33, 30, 0.12);
}

.btn-secondary {
  background: var(--accent-2);
  color: var(--text);
  box-shadow: 0 4px 14px rgba(36, 33, 30, 0.08);
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary:hover {
  box-shadow:
    0 14px 28px rgba(36, 33, 30, 0.28),
    0 3px 6px rgba(36, 33, 30, 0.14);
}

.btn-secondary:hover {
  box-shadow: 0 6px 18px rgba(36, 33, 30, 0.12);
}

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

.links {
  display: flex;
  flex-direction: column;
  margin-top: 6px;
}

.link-row {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 18px 4px;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid rgba(187, 169, 153, 0.55);
}

.link-row:last-child {
  border-bottom: 0;
}

.link-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  color: var(--text);
}

.link-icon svg {
  width: 28px;
  height: 28px;
}

.link-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-left: 20px;
  border-left: 1px solid rgba(187, 169, 153, 0.55);
  min-width: 0;
  flex: 1;
}

.link-label {
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text);
}

.link-value {
  color: var(--text);
  font-weight: 400;
  font-size: 1rem;
  overflow-wrap: anywhere;
}

.link-sub {
  color: var(--muted);
  font-size: 0.85rem;
}

.qr-dialog {
  border: none;
  border-radius: 24px;
  padding: 0;
  width: min(92vw, 360px);
  background: var(--card);
  color: var(--text);
  box-shadow: var(--shadow);
}

.qr-dialog::backdrop {
  background: rgba(36, 33, 30, 0.45);
}

.qr-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 18px 0;
}

.qr-header h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 500;
}

.icon-btn {
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

.qr-content {
  padding: 12px 18px 22px;
  text-align: center;
}

.qr-send {
  display: flex;
  width: 100%;
  margin-top: 8px;
}

#qrcode {
  display: grid;
  place-items: center;
  min-height: 240px;
}

#qrcode canvas,
#qrcode img,
#qrcode svg {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
}

@media (max-width: 520px) {
  .card { padding: 22px; border-radius: 24px; }
  .actions { flex-direction: column; }
}
