:root {
  --brand: #0b2447;
  --brand-deep: #071a33;
  --accent: #d7b46a;
  --paper: #ffffff;
  --canvas: #eef2f6;
  --ink: #172033;
  --muted: #657187;
  --line: #e3e8ef;
  --shadow: 0 24px 64px rgba(11, 36, 71, 0.16);
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { background: var(--canvas); }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 50% -10%, rgba(11, 36, 71, 0.13), transparent 34rem),
    var(--canvas);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

.card-shell {
  width: min(100%, 430px);
  min-height: 100svh;
  margin: 0 auto;
  overflow: hidden;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.hero {
  position: relative;
  padding: env(safe-area-inset-top) 24px 30px;
  text-align: center;
  color: white;
  background:
    radial-gradient(circle at 80% 10%, rgba(255,255,255,.11), transparent 13rem),
    linear-gradient(155deg, var(--brand) 0%, var(--brand-deep) 100%);
}

.portrait {
  display: block;
  width: calc(100% + 48px);
  height: auto;
  margin: 0 -24px 26px;
  object-fit: contain;
}

h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(30px, 8.5vw, 38px);
  font-weight: 500;
  letter-spacing: -.025em;
  line-height: 1.05;
}

.role {
  margin: 10px 0 0;
  color: rgba(255,255,255,.88);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.35;
}

.quick-actions {
  display: flex;
  justify-content: center;
  gap: clamp(20px, 8vw, 34px);
  margin-top: 26px;
}

.quick-action {
  display: grid;
  min-width: 64px;
  justify-items: center;
  gap: 8px;
  color: rgba(255,255,255,.9);
  font-size: 11px;
  font-weight: 650;
}

.action-icon {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border: 1px solid rgba(255,255,255,.32);
  border-radius: 50%;
  background: rgba(255,255,255,.10);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
  transition: background-color .2s ease, border-color .2s ease;
}

.at-icon { font-size: 21px; font-weight: 500; }

.quick-action:hover .action-icon,
.quick-action:focus-visible .action-icon {
  border-color: white;
  background: rgba(255,255,255,.2);
}

.quick-action:focus-visible,
.contact-row:focus-visible,
.save-contact:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.content { padding: 26px 20px calc(34px + env(safe-area-inset-bottom)); }

.intro {
  max-width: 35ch;
  margin: 0 auto 24px;
  color: #465268;
  font-size: 15px;
  line-height: 1.6;
  text-align: center;
}

.contact-list {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: white;
}

.contact-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 18px;
  min-height: 72px;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--line);
  transition: background-color .2s ease;
}

.contact-row:last-child { border-bottom: 0; }
.contact-row:hover { background: #f7f9fc; }

.row-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: var(--brand);
  border-radius: 50%;
  background: #e9eff7;
  font-size: 13px;
  font-weight: 800;
}

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

.contact-row small {
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: .02em;
}

.contact-row strong {
  overflow: hidden;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.3;
  text-overflow: ellipsis;
}

.arrow { color: #8a96a8; font-size: 27px; font-weight: 300; }

.save-contact {
  display: flex;
  min-height: 56px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 22px;
  padding: 14px 20px;
  color: white;
  border-radius: 14px;
  background: var(--brand);
  box-shadow: 0 10px 24px rgba(11,36,71,.2);
  font-size: 15px;
  font-weight: 750;
  transition: background-color .2s ease, box-shadow .2s ease;
}

.save-contact:hover {
  background: var(--brand-deep);
  box-shadow: 0 12px 28px rgba(11,36,71,.28);
}

.save-contact span {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border: 1px solid rgba(255,255,255,.5);
  border-radius: 50%;
  font-size: 20px;
  font-weight: 300;
  line-height: 1;
}

.helper {
  margin: 11px 0 0;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

@media (min-width: 600px) {
  body { padding: 32px 16px; }
  .card-shell { min-height: auto; border-radius: 26px; }
}

@media (max-width: 350px) {
  .hero { padding-inline: 16px; }
  .content { padding-inline: 14px; }
  .quick-actions { gap: 10px; }
  .action-icon { width: 48px; height: 48px; }
}

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