/* =============================================
   ERYEL MEDYA — Dijital Kartvizit
   ============================================= */
:root {
  --bg: #1a0f0f;
  --bg-card: #231515;
  --bg-card-2: #2a1919;
  --accent: #e7d1b1;
  --accent-dim: #c4a882;
  --accent-glow: rgba(231, 209, 177, 0.18);
  --text: #f5f5f5;
  --text-dim: #a89080;
  --border: rgba(231, 209, 177, 0.14);
  --border-hover: rgba(231, 209, 177, 0.4);
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'DM Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --radius: 18px;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 90% 50% at 50% -10%, rgba(231, 209, 177, 0.13), transparent 70%),
    radial-gradient(ellipse 70% 40% at 50% 110%, rgba(120, 30, 30, 0.25), transparent 70%);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img, svg { display: block; }

.card {
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  padding: max(20px, env(safe-area-inset-top)) 16px max(28px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* ── Top bar ── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.topbar-brand { display: flex; align-items: center; gap: 10px; }
.topbar-brand img { width: 40px; height: 40px; }
.topbar-brand span {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.06em;
  font-size: 1rem;
}
.topbar-brand em { font-style: normal; color: var(--accent); }

.icon-btn {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--accent);
  transition: border-color .25s, background .25s;
}
.icon-btn:hover, .icon-btn:focus-visible { border-color: var(--border-hover); background: var(--accent-glow); }

/* ── Profile ── */
.profile {
  position: relative;
  text-align: center;
  padding: 34px 20px 26px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: linear-gradient(160deg, var(--bg-card-2), var(--bg-card) 60%);
  overflow: hidden;
}
.profile::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("logo.webp") no-repeat right -40px top -30px / 180px;
  opacity: 0.05;
  pointer-events: none;
}
.monogram {
  position: relative;
  width: 108px; height: 108px;
  margin: 0 auto 18px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--bg);
  background: linear-gradient(145deg, #f3e3cb, var(--accent) 45%, var(--accent-dim));
  box-shadow: 0 0 0 6px rgba(231, 209, 177, 0.08), 0 12px 40px rgba(231, 209, 177, 0.18);
}
.name {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 8vw, 2.1rem);
  font-weight: 700;
  line-height: 1.15;
}
.role {
  margin-top: 6px;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.company { margin-top: 2px; color: var(--text-dim); font-size: 0.95rem; }
.tagline {
  margin: 16px auto 0;
  max-width: 30ch;
  color: var(--text-dim);
  font-size: 0.92rem;
}

/* ── Quick actions ── */
.actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 4px 12px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text);
  transition: transform .2s var(--ease-out), border-color .25s, background .25s;
}
.action svg { color: var(--accent); }
.action:hover, .action:focus-visible { border-color: var(--border-hover); background: var(--bg-card-2); }
.action:active { transform: scale(0.96); }

/* ── Save contact (primary) ── */
.btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, #f3e3cb, var(--accent) 50%, var(--accent-dim));
  color: var(--bg);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.02em;
  box-shadow: 0 10px 30px rgba(231, 209, 177, 0.18);
  transition: transform .2s var(--ease-out), box-shadow .25s;
}
.btn-primary:hover { box-shadow: 0 14px 40px rgba(231, 209, 177, 0.28); }
.btn-primary:active { transform: scale(0.98); }

/* ── Link list ── */
.section-label {
  margin: 6px 4px -6px;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.links { display: flex; flex-direction: column; gap: 10px; }
.link {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 64px;
  padding: 12px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  transition: border-color .25s, background .25s, transform .2s var(--ease-out);
}
.link:hover, .link:focus-visible { border-color: var(--border-hover); background: var(--bg-card-2); }
.link:active { transform: scale(0.985); }
.link-icon {
  flex: none;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: var(--accent-glow);
  color: var(--accent);
}
.link-text { flex: 1; min-width: 0; }
.link-title { display: block; font-weight: 500; font-size: 0.97rem; }
.link-sub {
  display: block;
  color: var(--text-dim);
  font-size: 0.83rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.link-arrow { flex: none; color: var(--text-dim); }

/* ── QR ── */
.qr-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  text-align: left;
  width: 100%;
}
.qr-card img { width: 76px; height: 76px; border-radius: 10px; flex: none; }
.qr-card .link-title { margin-bottom: 2px; }

.qr-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px 16px;
  background: rgba(10, 5, 5, 0.86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s, visibility .3s;
}
.qr-modal.open { opacity: 1; visibility: visible; }
.qr-modal-inner {
  width: min(340px, 100%);
  padding: 26px 22px 22px;
  border-radius: 24px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  text-align: center;
  transform: translateY(16px) scale(.97);
  transition: transform .35s var(--ease-out);
}
.qr-modal.open .qr-modal-inner { transform: none; }
.qr-modal img { width: 100%; height: auto; border-radius: 14px; }
.qr-modal h2 { font-family: var(--font-display); font-size: 1.3rem; margin-bottom: 4px; }
.qr-modal p { color: var(--text-dim); font-size: 0.88rem; margin-bottom: 16px; }
.qr-modal .close {
  margin-top: 16px;
  width: 100%;
  min-height: 48px;
  border-radius: 14px;
  border: 1px solid var(--border);
  color: var(--accent);
  font-weight: 500;
}

/* ── Toast ── */
.toast {
  position: fixed;
  left: 50%;
  bottom: max(24px, env(safe-area-inset-bottom));
  transform: translate(-50%, 20px);
  padding: 12px 20px;
  border-radius: 99px;
  background: var(--accent);
  color: var(--bg);
  font-weight: 500;
  font-size: 0.9rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s, transform .3s var(--ease-out);
  z-index: 60;
  white-space: nowrap;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ── Footer ── */
.footer {
  margin-top: 8px;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.8rem;
}
.footer a { color: var(--accent); }

/* ── Entrance animation ── */
@media (prefers-reduced-motion: no-preference) {
  .reveal { animation: rise .7s var(--ease-out) both; animation-delay: var(--d, 0s); }
  @keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
}

@media (max-width: 340px) {
  .actions { gap: 6px; }
  .action { font-size: 0.7rem; }
}
