:root {
  color-scheme: dark;
  --bg: #06070a;
  --card: #101218;
  --card-soft: #171a22;
  --line: rgba(238, 241, 247, 0.14);
  --line-strong: rgba(238, 241, 247, 0.24);
  --text: #f7f8fb;
  --muted: #aab1bd;
  --red: #d72032;
  --red-deep: #76121c;
  --silver: #d8dce3;
}

* {
  box-sizing: border-box;
}

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

body {
  min-height: 100%;
  margin: 0;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  color: var(--text);
  background:
    linear-gradient(135deg, rgba(215, 32, 50, 0.36), transparent 30%),
    linear-gradient(155deg, #05060a 0%, #17191f 54%, #37383c 100%);
}

a,
button {
  color: inherit;
}

button {
  font: inherit;
}

.page-shell {
  width: 100%;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: max(10px, env(safe-area-inset-top)) 10px max(10px, env(safe-area-inset-bottom));
}

.card {
  width: min(100%, 420px);
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(22, 25, 33, 0.94), rgba(8, 9, 13, 0.98)),
    var(--card);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.46);
}

.hero {
  position: relative;
  height: clamp(225px, 34dvh, 292px);
  overflow: hidden;
  background:
    radial-gradient(circle at 72% 16%, rgba(255, 255, 255, 0.2), transparent 32%),
    linear-gradient(132deg, rgba(215, 32, 50, 0.84), rgba(87, 20, 27, 0.72) 29%, rgba(31, 33, 39, 0.88) 57%, #44454a);
}

.hero::before {
  position: absolute;
  inset: auto 0 0;
  z-index: 1;
  height: 42%;
  content: "";
  background: linear-gradient(180deg, transparent, rgba(5, 6, 10, 0.62));
  pointer-events: none;
}

.portrait {
  position: absolute;
  top: -18px;
  left: 50%;
  width: min(112%, 446px);
  height: auto;
  display: block;
  transform: translateX(-50%);
  filter: drop-shadow(0 20px 28px rgba(0, 0, 0, 0.38));
}

.identity {
  display: grid;
  gap: 5px;
}

.identity h1 {
  margin: 0;
  color: var(--text);
  font-size: clamp(2rem, 10vw, 2.75rem);
  line-height: 0.94;
  letter-spacing: 0;
}

.identity p {
  margin: 0;
  color: var(--muted);
  font-size: 0.96rem;
  font-weight: 720;
}

.accent-line {
  width: 108px;
  height: 4px;
  margin-top: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--red), #aeb3bd);
}

.contact-area {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.contact-lines {
  display: grid;
  gap: 6px;
}

.contact-lines a {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  min-height: 30px;
  gap: 9px;
  padding: 0 2px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 650;
  text-decoration: none;
}

.contact-lines span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.contact-lines svg {
  width: 18px;
  height: 18px;
  color: var(--red);
  stroke-width: 2.25;
}

.actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.action {
  display: inline-flex;
  min-width: 0;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
  font-size: 0.94rem;
  font-weight: 780;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 150ms ease,
    border-color 150ms ease,
    background 150ms ease;
}

.action.primary {
  grid-column: span 1;
  background: linear-gradient(135deg, #f13b4b, var(--red) 48%, var(--red-deep));
  border-color: rgba(255, 255, 255, 0.2);
}

.action:hover,
.action:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(247, 248, 251, 0.32);
  background: rgba(255, 255, 255, 0.075);
  outline: none;
}

.action.primary:hover,
.action.primary:focus-visible {
  background: linear-gradient(135deg, #ff4b59, var(--red) 48%, #901523);
}

.action svg {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  stroke-width: 2.25;
}

.qr-strip {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 100px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(215, 32, 50, 0.13), transparent 48%),
    rgba(255, 255, 255, 0.032);
}

.qr-code {
  display: grid;
  width: 88px;
  height: 88px;
  place-items: center;
  padding: 7px;
  border-radius: 8px;
  background: #fff;
  color: #111;
}

.qr-code img,
.qr-code canvas {
  width: 74px;
  height: 74px;
}

.qr-fallback {
  color: #15171d;
  font-size: 0.68rem;
  font-weight: 850;
  line-height: 1.1;
  text-align: center;
}

.qr-strip strong {
  display: block;
  margin-bottom: 3px;
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.1;
}

.qr-strip small {
  display: block;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 640;
  line-height: 1.22;
}

.toast {
  position: fixed;
  right: 14px;
  bottom: 14px;
  max-width: min(320px, calc(100vw - 28px));
  padding: 11px 13px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(11, 12, 17, 0.94);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 680;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition:
    opacity 170ms ease,
    transform 170ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 360px) {
  .page-shell {
    padding: 8px;
  }

  .hero {
    height: 208px;
  }

  .contact-area {
    padding: 12px;
  }

  .identity h1 {
    font-size: 2rem;
  }

  .action {
    min-height: 44px;
    font-size: 0.88rem;
  }
}

@media (max-height: 680px) {
  .page-shell {
    place-items: start center;
  }

  .hero {
    height: 206px;
  }

  .portrait {
    top: -12px;
    width: min(104%, 390px);
  }

  .contact-area {
    gap: 8px;
    padding: 12px;
  }

  .identity h1 {
    font-size: 2rem;
  }

  .identity p,
  .contact-lines a {
    font-size: 0.86rem;
  }

  .accent-line {
    margin-top: 4px;
  }

  .action {
    min-height: 42px;
  }

  .qr-strip {
    grid-template-columns: 78px minmax(0, 1fr);
    min-height: 88px;
    padding: 8px;
  }

  .qr-code {
    width: 78px;
    height: 78px;
  }

  .qr-code img,
  .qr-code canvas {
    width: 64px;
    height: 64px;
  }
}

@media (min-width: 720px) {
  .page-shell {
    place-items: center;
    padding: 24px;
  }
}

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