:root {
  --bg: #f4e4cf;
  --bg-deep: #e8c9a4;
  --card: #fffaf3;
  --ink: #3b2416;
  --muted: #7a5844;
  --accent: #c45c26;
  --accent-hover: #a84618;
  --accent-soft: #f8e0cc;
  --honey: #e6b35c;
  --line: #edd9c3;
  --shadow: 0 22px 50px rgba(90, 42, 16, 0.16);
  --radius: 1.7rem;
  --sans: "Avenir Next", "Segoe UI", ui-sans-serif, system-ui, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
}

* {
  box-sizing: border-box;
}

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

body {
  font-family: var(--sans);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 12% -10%, #f8d9b0 0%, transparent 55%),
    radial-gradient(900px 520px at 110% 10%, #f0b57a 0%, transparent 46%),
    radial-gradient(700px 420px at 50% 120%, #d97a45 0%, transparent 50%),
    var(--bg);
  line-height: 1.55;
}

.page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2.2rem 1.1rem 2.6rem;
}

.card {
  width: min(100%, 26.5rem);
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.7);
  padding: 2.1rem 1.55rem 1.45rem;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 7px;
  background: linear-gradient(90deg, #c45c26, #e08a3c 55%, #e6b35c);
}

.card-head {
  text-align: center;
}

.avatar-wrap {
  width: 7.4rem;
  height: 7.4rem;
  margin: 0.35rem auto 1rem;
  border-radius: 50%;
  padding: 5px;
  background: linear-gradient(160deg, #f3c48a, #c45c26);
  box-shadow: 0 10px 24px rgba(168, 70, 24, 0.22);
}

.avatar-wrap img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  background: #f6d7b0;
}

.badge {
  display: inline-block;
  margin: 0 0 0.55rem;
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  font-family: var(--serif);
  font-size: 2rem;
  line-height: 1.15;
  margin: 0 0 0.35rem;
  font-weight: 650;
}

.role {
  margin: 0;
  color: var(--muted);
  font-size: 1.02rem;
}

.org {
  margin: 0.2rem 0 0;
  color: var(--accent);
  font-weight: 650;
  font-size: 0.95rem;
}

.bio {
  margin: 1.25rem 0 0;
  color: #5d3d2b;
  font-size: 0.98rem;
}

.contacts {
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.contacts li + li {
  border-top: 1px solid var(--line);
}

.contacts a,
.contacts span.row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.78rem 0.1rem;
  color: inherit;
  text-decoration: none;
}

.contacts a:hover {
  color: var(--accent);
}

.icon {
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 0.7rem;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  flex: 0 0 auto;
}

.icon svg {
  width: 1.1rem;
  height: 1.1rem;
  display: block;
}

.contact-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.contact-text small {
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.contact-text strong {
  font-weight: 650;
  font-size: 0.96rem;
  word-break: break-word;
}

.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
  margin-top: 1.15rem;
}

.btn {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 0.78rem 0.9rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: var(--accent);
  color: #fffaf3;
  box-shadow: 0 8px 18px rgba(196, 92, 38, 0.28);
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-secondary {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
}

.btn-secondary:hover {
  background: var(--accent-soft);
}

.hint {
  margin: 1rem 0 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.78rem;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 1.3rem;
  transform: translateX(-50%) translateY(120%);
  background: var(--ink);
  color: #fff8ee;
  padding: 0.65rem 1rem;
  border-radius: 999px;
  font-size: 0.86rem;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.25s ease, opacity 0.25s ease;
  z-index: 10;
}

.toast.is-on {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--honey);
  outline-offset: 3px;
}

@media (max-width: 420px) {
  .actions {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 1.75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .btn,
  .toast {
    transition: none;
  }

  .btn:hover {
    transform: none;
  }
}

@media print {
  body {
    background: #fff;
  }

  .page {
    padding: 0;
  }

  .card {
    box-shadow: none;
    border: 1px solid #ddd;
  }

  .actions,
  .toast {
    display: none;
  }
}
