:root {
  color-scheme: light;
  --white: #fff;
  --navy: #0f172a;
  --blue: #60a5fa;
  --soft-blue: #eff6ff;
  --ink-muted: #475569;
  --border: #dbe7f5;
  --whatsapp: #25d366;
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
  color: var(--navy);
}

*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(ellipse at 78% 0%, #d7eaff, transparent 48%), #f2f7fd;
  line-height: 1.65;
}

.symbols { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon {
  width: 1.4rem;
  height: 1.4rem;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.layout {
  width: min(70rem, calc(100% - 2rem));
  margin-inline: auto;
  padding-block: clamp(1rem, 4vw, 3.5rem) max(1.25rem, env(safe-area-inset-bottom));
  display: grid;
  gap: .875rem;
}

.surface, .card-tools {
  min-width: 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 1.5rem;
  box-shadow: 0 12px 32px rgb(30 64 115 / 7%);
}

.profile { display: grid; overflow: hidden; }
.portrait {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 1.25rem 1rem;
  background: linear-gradient(145deg, #eaf5ff 5%, #bfdbfe 65%, #8dc1ff);
}

.portrait::before {
  position: absolute;
  z-index: -1;
  width: min(84%, 24rem);
  aspect-ratio: 1;
  border: 1px solid rgb(255 255 255 / 78%);
  border-radius: 50%;
  box-shadow: 0 0 0 1.3rem rgb(255 255 255 / 20%), 0 0 0 2.7rem rgb(255 255 255 / 14%);
  content: "";
}

.portrait img {
  display: block;
  width: min(70%, 18rem);
  height: auto;
  border: 3px solid var(--white);
  border-radius: 1.1rem;
  box-shadow: 0 12px 24px rgb(15 55 105 / 22%);
}

.portrait-cross {
  position: absolute;
  inset-block-start: 12%;
  inset-inline-start: 6%;
  color: #245b99;
  opacity: .65;
}

.portrait-mark {
  position: absolute;
  inset-inline-end: 6%;
  inset-block-end: 11%;
  display: grid;
  place-items: center;
  width: 2.55rem;
  height: 2.55rem;
  border: 1px solid var(--white);
  border-radius: .9rem;
  color: #194c87;
  background: #f6fbff;
  box-shadow: 0 6px 16px rgb(38 85 140 / 16%);
}

.profile-info {
  align-self: center;
  min-width: 0;
  padding: 1rem clamp(.875rem, 4.5vw, 2.5rem) 1.2rem;
}

h1 { margin: 0; font-size: clamp(2.45rem, 7vw, 4.5rem); line-height: 1.16; }
.english {
  margin: .15rem 0 .6rem;
  text-align: right;
  color: var(--ink-muted);
  font-weight: 600;
  letter-spacing: .06em;
}

.role { margin: 0; color: #1e4d84; font-weight: 700; }
.bio { max-width: 38ch; color: var(--ink-muted); margin: .45rem 0 1rem; }

.primary-actions, .secondary-actions { display: grid; gap: .5rem; }
.primary-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.action, .floating-whatsapp {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  min-height: 3rem;
  padding: .5rem .45rem;
  border: 1px solid var(--border);
  border-radius: .85rem;
  background: var(--white);
  color: var(--navy);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .16s ease, border-color .16s ease, transform .16s ease;
}

.action:hover { background: var(--soft-blue); border-color: var(--blue); }
.action:active, .floating-whatsapp:active { transform: translateY(1px); }
.action:focus-visible, .floating-whatsapp:focus-visible, input:focus-visible {
  outline: 3px solid #2563eb;
  outline-offset: 3px;
}

.primary-actions .action { min-height: 3.5rem; border-color: transparent; }
.call { background: var(--blue); }
.call:hover { background: #82b9fd; }
.call small { display: block; font-size: .875rem; font-weight: 600; line-height: 1.2; }
.whatsapp, .floating-whatsapp { background: var(--whatsapp); color: #082319; }
.whatsapp:hover, .floating-whatsapp:hover { background: #4ee487; }

.services { padding: clamp(.875rem, 3vw, 1.5rem); }
h2 { font-size: clamp(1.25rem, 3vw, 1.65rem); margin: 0 0 .7rem; }
.service-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .5rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.service-list li {
  display: grid;
  align-content: start;
  justify-items: start;
  gap: .45rem;
  min-width: 0;
  padding: .65rem;
  border: 1px solid var(--border);
  border-radius: .95rem;
  background: linear-gradient(155deg, var(--white), var(--soft-blue));
  font-weight: 600;
  line-height: 1.4;
}

.service-icon {
  display: grid;
  place-items: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: .65rem;
  background: #e0edff;
  color: #174884;
}

.card-tools { padding: .65rem; }
.secondary-actions { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.secondary-actions .action {
  flex-direction: column;
  gap: .25rem;
  background: #f9fbff;
  text-align: center;
  font-size: .875rem;
  line-height: 1.25;
}

.secondary-actions .action:hover { background: var(--soft-blue); }
.secondary-actions .icon { color: #245b99; }
.status { margin: .5rem 0 0; color: var(--ink-muted); text-align: center; }
.status:empty { margin: 0; }
.manual-share { display: block; margin-block-start: .5rem; }
.manual-share[hidden], .floating-whatsapp { display: none; }
.manual-share input { display: block; width: 100%; padding: .6rem; border: 1px solid var(--border); border-radius: .5rem; font: inherit; }
.qr-slot { margin-block-start: 1rem; text-align: center; }

@media (max-width: 47.999rem) {
  .floating-whatsapp:not([hidden]) {
    position: fixed;
    z-index: 1;
    inset-inline-end: max(1rem, env(safe-area-inset-left));
    inset-block-end: calc(.75rem + env(safe-area-inset-bottom));
    display: flex;
    width: 3rem;
    border-radius: 50%;
    border-color: #158249;
    box-shadow: 0 6px 18px rgb(8 35 25 / 24%);
  }
}

@media (min-width: 48rem) {
  .layout { gap: 1rem; }
  .profile { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
  .profile-info { grid-column: 1; grid-row: 1; padding-block: 2rem; }
  .portrait { grid-column: 2; grid-row: 1; padding-block: 1.5rem; }
  .primary-actions { max-width: 26rem; }
  .service-list { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .service-list li { padding: .9rem; }
  .secondary-actions .action { flex-direction: row; gap: .5rem; font-size: 1rem; }
}

@media (prefers-reduced-motion: no-preference) {
  .profile-info, .services, .card-tools { animation: enter .35s ease-out backwards; }
  @keyframes enter {
    from { opacity: .65; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
  }
}

@media (prefers-reduced-motion: reduce) {
  .action, .floating-whatsapp { transition: none; }
  .action:active, .floating-whatsapp:active { transform: none; }
}
