/* Elia Zoe Christou — digital business card */
:root {
  --bg: #0a0610;
  --bg-elev: #160c1f;
  --surface: rgba(255, 255, 255, 0.055);
  --surface-hover: rgba(255, 255, 255, 0.1);
  --border: rgba(255, 255, 255, 0.1);
  --text: #f8f3fa;
  --muted: rgba(248, 243, 250, 0.62);
  --accent: #ff00d4;
  --accent-soft: rgba(255, 0, 212, 0.16);
  --accent-glow: rgba(255, 0, 212, 0.55);
  --violet: #8a2bff;
  --radius: 1.25rem;
  --font-display: "Instrument Serif", "Times New Roman", Georgia, serif;
  --font-body: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; color-scheme: dark; }
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: env(safe-area-inset-top) 16px calc(1.5rem + env(safe-area-inset-bottom));
}
a { color: inherit; }
svg { display: block; }

/* ---------- ambient background ---------- */
.backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: radial-gradient(120% 70% at 50% -10%, #2b0d33 0%, var(--bg) 62%);
}
.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.6;
  will-change: transform;
}
.glow-a {
  width: 62vmax; height: 62vmax;
  left: -24vmax; top: -28vmax;
  background: radial-gradient(circle, rgba(255, 0, 212, 0.6), transparent 62%);
  animation: drift 20s ease-in-out infinite alternate;
}
.glow-b {
  width: 54vmax; height: 54vmax;
  right: -22vmax; bottom: -22vmax;
  background: radial-gradient(circle, rgba(138, 43, 255, 0.5), transparent 62%);
  animation: drift 26s ease-in-out infinite alternate-reverse;
}
.backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.07;
  mix-blend-mode: overlay;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
@keyframes drift {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(7vmax, 5vmax, 0); }
}

/* ---------- top bar ---------- */
.topbar {
  width: 100%;
  max-width: 440px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
}
.brand {
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: 0.4em;
  padding-left: 0.4em;
  color: var(--muted);
  user-select: none;
}
.topbar-actions { display: flex; gap: 0.5rem; }

.icon-btn {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  width: 44px; height: 44px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: background 0.2s, transform 0.15s, border-color 0.2s;
}
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn:hover { background: var(--surface-hover); border-color: rgba(255, 255, 255, 0.22); }
.icon-btn:active { transform: scale(0.92); }

/* ---------- card ---------- */
.card {
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 2.25rem;
}

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.avatar {
  position: relative;
  width: 160px; height: 160px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  isolation: isolate;
}
.avatar::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg, #ff00d4, #8a2bff, #ff7ae6, #ff00d4);
  animation: spin 14s linear infinite;
  z-index: -1;
}
.avatar::after {
  content: "";
  position: absolute;
  inset: -18px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 0, 212, 0.4), transparent 68%);
  filter: blur(12px);
  z-index: -2;
}
.avatar img {
  width: calc(100% - 8px);
  height: calc(100% - 8px);
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--bg);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.8);
}
@keyframes spin { to { transform: rotate(360deg); } }

.name {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.5rem, 10vw, 3.15rem);
  line-height: 1.02;
  letter-spacing: -0.01em;
  margin: 1.5rem 0 0.55rem;
}
.name em {
  font-style: italic;
  background: linear-gradient(90deg, #ffa8ee 0%, #ff4fe0 60%, #ff00d4 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-right: 0.08em; /* keep the italic tail from clipping */
}
.role {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  padding-left: 0.3em;
  text-transform: uppercase;
  color: #ff5fe3;
}
.role .dot { color: var(--muted); margin: 0 0.15em; }

/* ---------- primary CTA ---------- */
.cta {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  padding: 1.05rem 1.25rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff2ad9 0%, #d400b0 100%);
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  box-shadow: 0 14px 34px -10px var(--accent-glow), inset 0 1px 0 rgba(255, 255, 255, 0.28);
  transition: transform 0.15s, box-shadow 0.2s;
}
.cta::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, 0.28) 50%, transparent 65%);
  transform: translateX(-120%);
  animation: shimmer 5s ease-in-out 2s infinite;
}
.cta:hover { transform: translateY(-2px); box-shadow: 0 20px 44px -10px rgba(255, 0, 212, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.28); }
.cta:active { transform: scale(0.98); }
.cta svg { width: 22px; height: 22px; }
@keyframes shimmer {
  0%, 20% { transform: translateX(-120%); }
  45%, 100% { transform: translateX(120%); }
}

/* ---------- quick actions ---------- */
.actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.6rem;
}
.action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  padding: 0.9rem 0.25rem 0.8rem;
  border-radius: 1.1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 600;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: background 0.2s, transform 0.15s, border-color 0.2s;
}
.action:hover { background: var(--surface-hover); border-color: rgba(255, 0, 212, 0.45); transform: translateY(-2px); }
.action:active { transform: scale(0.95); }
.action-icon {
  width: 46px; height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: #ff8be9;
  transition: background 0.2s, color 0.2s;
}
.action:hover .action-icon { background: rgba(255, 0, 212, 0.28); color: #ffb8f1; }
.action-icon svg { width: 22px; height: 22px; }

/* ---------- socials ---------- */
.section-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.55rem;
  margin: 0.4rem 0 0.7rem;
  text-align: center;
}
.section-title em {
  font-style: italic;
  color: #ff8be9;
}
.link-list {
  list-style: none;
  margin: 0;
  padding: 0.35rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.link-row {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.7rem 0.8rem;
  border-radius: calc(var(--radius) - 0.35rem);
  color: var(--text);
  text-decoration: none;
  transition: background 0.2s;
}
.link-row:hover { background: var(--surface-hover); }
.link-row:hover .chevron { transform: translateX(3px); color: var(--text); }
.link-row:active { background: rgba(255, 255, 255, 0.14); }
.link-icon {
  flex: none;
  width: 46px; height: 46px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: #fff;
  color: #0a0610;
  box-shadow: 0 6px 16px -8px rgba(0, 0, 0, 0.7);
}
.link-icon svg { width: 27px; height: 27px; }
.link-icon.fb { background: #1877f2; color: #fff; }
.link-text { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.3; }
.link-name { font-weight: 700; font-size: 0.98rem; }
.link-handle {
  font-size: 0.82rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chevron { flex: none; color: var(--muted); transition: transform 0.2s, color 0.2s; }
.chevron svg { width: 18px; height: 18px; }

/* ---------- footer ---------- */
.footer {
  margin-top: 2.5rem;
  text-align: center;
  font-size: 0.78rem;
  color: var(--muted);
}
.footer p { margin: 0; }
.footer .footer-name { font-family: var(--font-display); font-size: 1rem; letter-spacing: 0.08em; color: var(--text); opacity: 0.8; }

/* ---------- QR dialog ---------- */
.dialog {
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(92vw, 380px);
  border: 1px solid var(--border);
  border-radius: 1.6rem;
  background: var(--bg-elev);
  color: var(--text);
  padding: 1.9rem 1.5rem 1.5rem;
  text-align: center;
  box-shadow: 0 40px 90px -20px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 0, 212, 0.08);
}
.dialog:focus { outline: none; }
.dialog::backdrop { background: rgba(5, 2, 8, 0.6); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.dialog[open] { animation: pop 0.28s cubic-bezier(0.2, 0.7, 0.2, 1); }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(0.97); } }
.dialog-close { position: absolute; top: 0.75rem; right: 0.75rem; width: 38px; height: 38px; }
.dialog-close svg { width: 18px; height: 18px; }
.dialog h2 { font-family: var(--font-display); font-weight: 400; font-size: 1.8rem; margin: 0 0 0.2rem; }
.dialog-sub { color: var(--muted); font-size: 0.9rem; margin: 0 0 1.25rem; }
.qr-box {
  background: #fff;
  border-radius: 1.1rem;
  padding: 0.9rem;
  width: 224px;
  margin: 0 auto;
  box-shadow: 0 10px 30px -12px rgba(255, 0, 212, 0.5);
}
.qr-box svg { width: 100%; height: auto; }
.url { font-size: 0.85rem; color: var(--muted); word-break: break-all; margin: 1rem 0 1.25rem; }
.dialog-actions { display: flex; gap: 0.6rem; }
.btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1rem;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.15s, background 0.2s;
}
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: linear-gradient(135deg, #ff2ad9, #d400b0); color: #fff; }
.btn-ghost { background: var(--surface); border-color: var(--border); color: var(--text); }
.btn:active { transform: scale(0.97); }
.btn[hidden] { display: none; }

/* ---------- toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(1.5rem + env(safe-area-inset-bottom));
  transform: translate(-50%, 20px);
  opacity: 0;
  background: #fff;
  color: var(--bg);
  padding: 0.7rem 1.2rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9rem;
  pointer-events: none;
  z-index: 50;
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.8);
  transition: transform 0.25s, opacity 0.25s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- entrance ---------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  animation: rise 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
  animation-delay: var(--d, 0s);
}
@keyframes rise { to { opacity: 1; transform: none; } }

/* ---------- focus & motion ---------- */
:focus-visible { outline: 2px solid #ff8be9; outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
  .reveal { animation: none; opacity: 1; transform: none; }
  .avatar::before, .glow, .cta::after, .dialog[open] { animation: none; }
  * { transition-duration: 0.01ms !important; }
}

/* ---------- larger screens ---------- */
@media (min-width: 720px) {
  body { padding-bottom: 3rem; }
  .topbar { padding-top: 1.5rem; }
  .card { margin-top: 2.75rem; }
}
