:root {
  --bg: #0f0f0f;
  --surface: #1a1a1a;
  --text: #fafafa;
  --text-secondary: #8b8b8b;
  --accent: #d5001c;
  --accent-dark: #a80016;
  --line: rgba(250, 250, 250, 0.11);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  letter-spacing: 0;
}

body {
  min-height: 100%;
  margin: 0;
}

a {
  color: inherit;
}

.page {
  width: min(100%, 520px);
  margin: 0 auto;
  padding: 18px 18px 30px;
}

.profile-header {
  position: relative;
  padding: 4px 0 16px;
}

.profile-photo {
  border-radius: 8px;
  width: 100%;
  aspect-ratio: 1 / 1;
  display: block;
  object-fit: cover;
  background: var(--surface);
}

.profile-caption {
  position: absolute;
  left: 14px;
  bottom: 30px;
  display: grid;
  gap: 2px;
  max-width: calc(100% - 28px);
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(250, 250, 250, 0.34);
  background: rgba(250, 250, 250, 0.28);
  color: var(--accent-dark);
  backdrop-filter: blur(1px) saturate(1.35);
  -webkit-backdrop-filter: blur(1px) saturate(1.35);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
  opacity: 0;
  transform: translateX(-28px);
  transition:
    opacity 420ms ease,
    transform 420ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}

.profile-caption.is-visible {
  opacity: 1;
  transform: translateX(0);
}

.profile-caption strong,
.profile-caption span {
  display: block;
}

.profile-caption strong {
  font-size: 1.05rem;
  line-height: 1.1;
}

.profile-caption span {
  font-size: 0.88rem;
  line-height: 1.15;
  color: var(--accent-dark);
}

@media (prefers-reduced-motion: reduce) {
  .profile-caption {
    transition: none;
  }
}

.save-contact {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 14px;
  align-items: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.24);
}

.mark {
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  border-radius: 8px;
  background: var(--accent);
  color: var(--text);
  font-size: 1.4rem;
  font-weight: 800;
}

h1 {
  margin: 0 0 4px;
  font-size: 1.35rem;
  line-height: 1.15;
}

.save-contact p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.35;
}

.primary-button {
  grid-column: 1 / -1;
  display: flex;
  min-height: 104px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--text);
  font-size: 1.2rem;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 12px 24px rgba(213, 0, 28, 0.28);
}

.download-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  flex: 0 0 auto;
}

.download-icon svg {
  width: 34px;
  height: 34px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
}

.primary-button:active {
  background: var(--accent-dark);
}

.contact-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.contact-row {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  align-items: center;
  min-height: 64px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  text-decoration: none;
}

.bio-row {
  display: block;
  margin-bottom: 16px;
}

.contact-row strong,
.contact-row small {
  display: block;
}

.contact-row strong {
  margin-bottom: 3px;
  font-size: 0.96rem;
}

.contact-row small {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  background: var(--accent);
  color: var(--text);
  font-size: 1.25rem;
  font-weight: 800;
}

.social-icon {
  font-size: 0.92rem;
  letter-spacing: 0;
}

.social-card {
  align-items: start;
}

.social-content {
  min-width: 0;
}

.social-divider {
  height: 1px;
  margin: 13px 0 10px;
  background: var(--line);
}

.social-table {
  display: grid;
  gap: 8px;
}

.social-table-row {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 12px;
  align-items: baseline;
  font-size: 0.9rem;
  line-height: 1.2;
}

.social-table-row span {
  color: var(--text);
}

.social-table-row a {
  color: var(--accent);
  font-weight: 700;
  overflow-wrap: anywhere;
  text-decoration: none;
}

.social-table-row a:active {
  color: var(--text);
}

@media (min-width: 640px) {
  .page {
    padding-top: 28px;
  }
}
