:root {
  color-scheme: light;
  --page-bg: #ffffff;
  --surface: #ffffff;
  --surface-soft: #f5f8fc;
  --text-primary: #10233d;
  --text-secondary: #62758d;
  --accent: #3aa4ff;
  --accent-soft: #e8f4ff;
  --border: #e8eef5;
  --shadow: 0 18px 40px rgba(17, 35, 61, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--page-bg);
  color: var(--text-primary);
  font-family: "SF Pro Display", "SF Pro Text", "Segoe UI", sans-serif;
}

body {
  overflow-x: hidden;
}

.background-orb {
  display: none;
}

.page-shell {
  width: min(100%, 30rem);
  margin: 0 auto;
  padding: max(1rem, env(safe-area-inset-top)) 1rem calc(6.5rem + env(safe-area-inset-bottom));
}

.hero-intro {
  padding: 0;
  margin: 0;
}

.hero-intro.is-hidden {
  display: none;
}

.eyebrow,
.hero-intro h1,
.hero-intro p {
  display: none;
}

.content-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.profile-card {
  border-radius: 1.9rem;
  background: var(--profile-card-bg, var(--surface));
  color: var(--profile-text, var(--text-primary));
  border: 1px solid rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.profile-card.font-clean {
  font-family: "SF Pro Display", "SF Pro Text", "Segoe UI", sans-serif;
}

.profile-card.font-rounded {
  font-family: "Avenir Next", "SF Pro Rounded", "Nunito", sans-serif;
}

.profile-card.font-serif {
  font-family: "Iowan Old Style", "Georgia", serif;
}

.profile-card.font-mono {
  font-family: "SF Mono", "Menlo", "JetBrains Mono", monospace;
}

.profile-shell {
  padding: 1.15rem;
}

.profile-headline {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 1rem;
}

.avatar {
  width: 5.4rem;
  height: 5.4rem;
  border-radius: 1.5rem;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.48);
}

.avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-fallback {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--profile-text, var(--text-primary));
}

.profile-title-block h2 {
  margin: 0;
  font-size: clamp(1.7rem, 7vw, 2.1rem);
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--profile-text, var(--text-primary));
}

.profile-title-block p {
  margin: 0.55rem 0 0;
  line-height: 1.45;
  color: var(--profile-muted, var(--text-secondary));
}

.text-contact-stack {
  display: flex;
  flex-direction: column;
  gap: 0.72rem;
  margin-top: 1rem;
}

.text-contact-row {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  padding: 0.9rem 1rem;
  border-radius: 1.15rem;
  background: rgba(255, 255, 255, 0.38);
}

.text-contact-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--profile-muted, var(--text-secondary));
}

.text-contact-value {
  font-size: 1rem;
  font-weight: 700;
  color: var(--profile-text, var(--text-primary));
  text-decoration: none;
  word-break: break-word;
}

.text-contact-value.is-link {
  text-decoration: none;
}

.contacts-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.contact-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.contact-tile-icon {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 1.15rem;
  background: rgba(255, 255, 255, 0.38);
  color: var(--profile-text, var(--text-primary));
  font-size: 1rem;
  font-weight: 700;
}

.contact-tile-label {
  font-size: 0.72rem;
  line-height: 1.2;
  text-align: center;
  color: var(--profile-text, var(--text-primary));
}

.bottom-actions {
  position: fixed;
  left: 50%;
  bottom: calc(1rem + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: min(calc(100% - 2rem), 30rem);
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 0.75rem;
  z-index: 10;
}

.primary-button,
.ghost-button,
.text-button {
  appearance: none;
  border: none;
  text-decoration: none;
  font: inherit;
  cursor: pointer;
}

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.5rem;
  padding: 0.95rem 1rem;
  border-radius: 1.25rem;
  font-weight: 700;
}

.primary-button {
  background: #46aaff;
  color: #fff;
  box-shadow: 0 18px 30px rgba(58, 164, 255, 0.26);
}

.ghost-button {
  background: rgba(255, 255, 255, 0.96);
  color: var(--text-primary);
  border: 1px solid var(--border);
  box-shadow: 0 10px 22px rgba(17, 35, 61, 0.08);
}

.fallback-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
}

.text-button {
  background: transparent;
  color: var(--text-secondary);
  padding: 0.2rem 0;
  font-size: 0.92rem;
  font-weight: 600;
}

.handoff-status {
  position: fixed;
  left: 50%;
  bottom: calc(5.7rem + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  max-width: calc(100% - 3rem);
  padding: 0.72rem 1rem;
  border-radius: 999px;
  background: rgba(16, 35, 61, 0.92);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 600;
  z-index: 11;
  box-shadow: 0 12px 26px rgba(16, 35, 61, 0.16);
}

.empty-card,
.error-card {
  padding: 1.1rem;
  border-radius: 1.4rem;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.empty-card h2,
.error-card h2 {
  margin: 0;
  font-size: 1.02rem;
}

.empty-card p,
.error-card p {
  margin: 0.45rem 0 0;
  color: var(--text-secondary);
  line-height: 1.5;
  word-break: break-word;
}

@media (max-width: 420px) {
  .contacts-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
