:root {
  --bg: #050914;
  --card-dark: #07111f;
  --card-blue: #10263a;
  --card-border: rgba(255, 255, 255, 0.14);

  --text: #f8fbff;
  --muted: #aab6c8;
  --soft: #d9e4f5;
  --navy: #07111f;

  --accent: #67d1ff;
  --white: #ffffff;
  --off-white: #f8fbff;

  --shadow-card: 0 28px 90px rgba(0, 0, 0, 0.52);
  --shadow-button: 0 10px 22px rgba(0, 0, 0, 0.2);
  --ring: 0 0 0 3px rgba(103, 209, 255, 0.3);

  --radius-card: 30px;
  --radius-large: 24px;
  --radius-round: 999px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 12%, rgba(103, 209, 255, 0.2), transparent 30%),
    radial-gradient(circle at 82% 18%, rgba(125, 211, 252, 0.12), transparent 32%),
    linear-gradient(135deg, #020617 0%, #050914 52%, #08111f 100%);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(circle at center, black 0%, transparent 74%);
  opacity: 0.5;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

img {
  display: block;
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

/* Page */

.card-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(16px, 3vw, 32px);
}

/* Card */

.identity-card {
  width: min(100%, 390px);
  position: relative;
  overflow: hidden;
  padding: 20px 20px 18px;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-card);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 25%),
    linear-gradient(145deg, rgba(16, 38, 58, 0.96), rgba(3, 8, 19, 0.96));
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(22px);
}

.identity-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  pointer-events: none;
  border-radius: inherit;
  background:
    radial-gradient(circle at 18% 8%, rgba(103, 209, 255, 0.2), transparent 36%),
    radial-gradient(circle at 92% 12%, rgba(125, 211, 252, 0.12), transparent 36%);
  opacity: 0.9;
}

.identity-card > * {
  position: relative;
  z-index: 1;
}

/* Top */

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  height: 44px;
  max-width: 170px;
  min-width: 0;
}

.brand-logo img {
  max-width: 100%;
  max-height: 40px;
  object-fit: contain;
}

.utility-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.top-icon-button {
  width: 38px;
  height: 38px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-round);
  color: var(--soft);
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    color 160ms ease,
    box-shadow 160ms ease;
}

.top-icon-button i {
  font-size: 1.05rem;
  line-height: 1;
}

.top-icon-button:hover {
  transform: translateY(-1px);
  color: var(--white);
  border-color: rgba(103, 209, 255, 0.55);
  background: rgba(103, 209, 255, 0.14);
  box-shadow: 0 10px 24px rgba(103, 209, 255, 0.12);
}

/* Profile */

.profile-block {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 6px;
  margin-bottom: 16px;
}

.profile-photo {
  width: 96px;
  height: 96px;
  object-fit: cover;
  object-position: center;
  border-radius: 28px;
  border: 1px solid rgba(103, 209, 255, 0.38);
  background: rgba(255, 255, 255, 0.08);
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.34),
    0 0 0 5px rgba(255, 255, 255, 0.045);
  margin-bottom: 8px;
}

.profile-block h1 {
  margin: 0;
  font-size: clamp(1.55rem, 5vw, 1.95rem);
  line-height: 1.05;
  letter-spacing: -0.045em;
  font-weight: 800;
}

.role {
  max-width: 330px;
  margin: 0 auto;
  display: grid;
  gap: 3px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.01em;
  text-align: center;
}

.role span {
  display: block;
}

.tagline {
  max-width: 275px;
  margin: 4px auto 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

/* QR */

.qr-section {
  display: grid;
  justify-items: center;
  gap: 10px;
  margin: 16px auto 16px;
}

.qr-button {
  width: 166px;
  height: 166px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 24px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.9),
    0 18px 36px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  overflow: hidden;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    border-color 160ms ease;
}

.qr-button:hover {
  transform: translateY(-2px);
  border-color: rgba(103, 209, 255, 0.55);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.95),
    0 22px 44px rgba(0, 0, 0, 0.36),
    0 0 28px rgba(103, 209, 255, 0.12);
}

.qr-image {
  width: 152px;
  height: 152px;
  object-fit: contain;
  border-radius: 14px;
}

.card-url {
  color: var(--soft);
  font-size: 0.76rem;
  line-height: 1;
  letter-spacing: 0.01em;
  border-bottom: 1px solid rgba(217, 228, 245, 0.35);
  transition:
    color 160ms ease,
    border-color 160ms ease;
}

.card-url:hover {
  color: var(--white);
  border-color: rgba(103, 209, 255, 0.72);
}

/* Social icons */

.contact-row {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 10px;
  margin: 18px auto 30px;
  flex-wrap: nowrap;
}

.social-item {
  width: 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
}

.social-button {
  width: 44px;
  height: 44px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: var(--radius-round);
  color: #0f172a;
  background: #ffffff;
  box-shadow: var(--shadow-button);
  cursor: pointer;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    color 160ms ease;
}

.social-button i {
  font-size: 1.18rem;
  line-height: 1;
}

.social-button:hover {
  transform: translateY(-2px);
  color: #020617;
  border-color: rgba(103, 209, 255, 0.6);
  background: #ffffff;
  box-shadow:
    0 12px 24px rgba(0, 0, 0, 0.22),
    0 0 0 4px rgba(255, 255, 255, 0.08);
}

.social-button:active {
  transform: translateY(0);
}

.social-caption {
  width: 60px;
  display: block;
  color: var(--muted);
  font-size: 0.54rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.01em;
  text-align: center;
  white-space: nowrap;
}

/* Bottom website */

.site-link {
  display: table;
  margin: 0 auto;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-bottom: 1px solid rgba(170, 182, 200, 0.35);
  transition:
    color 160ms ease,
    border-color 160ms ease;
}

.site-link:hover {
  color: var(--white);
  border-color: rgba(103, 209, 255, 0.72);
}

/* Modal */

.modal {
  width: min(calc(100vw - 32px), 420px);
  padding: 0;
  border: 1px solid var(--card-border);
  border-radius: 26px;
  color: var(--text);
  background: transparent;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.62);
}

.modal::backdrop {
  background: rgba(2, 6, 23, 0.78);
  backdrop-filter: blur(8px);
}

.modal-card {
  padding: 18px;
  border-radius: inherit;
  background:
    radial-gradient(circle at 24% 0%, rgba(103, 209, 255, 0.16), transparent 34%),
    linear-gradient(145deg, rgba(8, 17, 31, 0.98), rgba(3, 8, 19, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.modal-top h2 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.modal-close {
  width: 36px;
  height: 36px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-round);
  color: var(--soft);
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.modal-close i {
  font-size: 0.95rem;
  line-height: 1;
}

.modal-close:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
}

.modal-qr {
  display: grid;
  place-items: center;
  width: 312px;
  height: 312px;
  max-width: 100%;
  margin: 0 auto 14px;
  border-radius: 26px;
  background: var(--off-white);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.85);
}

.modal-qr-image {
  width: 292px;
  height: 292px;
  object-fit: contain;
  border-radius: 16px;
}

.instagram-qr {
  width: min(292px, 100%);
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
  margin: 0 auto 14px;
  border-radius: 24px;
  background: var(--off-white);
  padding: 10px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.85);
}

.modal-url {
  display: table;
  margin: 0 auto 14px;
  max-width: 100%;
  color: var(--soft);
  font-size: 0.8rem;
  font-weight: 700;
  overflow-wrap: anywhere;
  text-align: center;
  border-bottom: 1px solid rgba(217, 228, 245, 0.32);
}

.modal-url:hover {
  color: var(--white);
  border-color: rgba(103, 209, 255, 0.68);
}

.modal-copy {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(103, 209, 255, 0.38);
  border-radius: var(--radius-round);
  color: var(--white);
  background:
    linear-gradient(135deg, rgba(103, 209, 255, 0.2), rgba(125, 211, 252, 0.08));
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.modal-copy:hover {
  transform: translateY(-1px);
  border-color: rgba(103, 209, 255, 0.68);
  background:
    linear-gradient(135deg, rgba(103, 209, 255, 0.28), rgba(125, 211, 252, 0.12));
}

/* Toast */

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 20;
  margin: 0;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-round);
  color: var(--white);
  background: rgba(3, 8, 19, 0.92);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.38);
  font-size: 0.78rem;
  font-weight: 700;
  backdrop-filter: blur(10px);
}

/* Focus */

.top-icon-button:focus-visible,
.social-button:focus-visible,
.qr-button:focus-visible,
.site-link:focus-visible,
.modal-close:focus-visible,
.modal-copy:focus-visible,
.card-url:focus-visible,
.modal-url:focus-visible {
  outline: none;
  box-shadow: var(--ring);
}

/* Mobile */

@media (max-width: 430px) {
  .card-page {
    padding: 12px;
  }

  .identity-card {
    width: min(100%, 370px);
    padding: 17px 16px 16px;
    border-radius: 24px;
  }

  .brand-logo {
    max-width: 168px;
  }

  .brand-logo img {
    max-height: 34px;
  }

  .profile-photo {
    width: 86px;
    height: 86px;
    border-radius: 24px;
  }

  .profile-block h1 {
    font-size: 1.55rem;
  }

 .role {
  max-width: 300px;
  font-size: 0.7rem;
}

  .tagline {
    font-size: 0.74rem;
  }

  .qr-button {
    width: 156px;
    height: 156px;
    border-radius: 22px;
  }

  .qr-image {
    width: 142px;
    height: 142px;
  }

  .contact-row {
    gap: 8px;
    margin-bottom: 28px;
  }

  .social-item,
  .social-button {
    width: 40px;
  }

  .social-button {
    height: 40px;
  }

  .social-button i {
    font-size: 1.05rem;
  }

  .social-caption {
    width: 56px;
    font-size: 0.5rem;
  }

  .modal {
    width: min(calc(100vw - 24px), 390px);
  }

  .modal-qr {
    width: 286px;
    height: 286px;
  }

  .modal-qr-image {
    width: 266px;
    height: 266px;
  }
}

/* Reduced motion */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
