:root {
  --green: #2d6a4f;
  --green-light: #40916c;
  --green-soft: #d8f3dc;
  --green-muted: #74c69d;
  --white: #ffffff;
  --white-glass: rgba(255, 255, 255, 0.92);
  --text: #1b4332;
  --text-muted: #52796f;
  --border: rgba(45, 106, 79, 0.15);
  --shadow: 0 24px 48px rgba(27, 67, 50, 0.18);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-serif: 'Literata', Georgia, serif;

  /* Фон страницы и баннер карточки — разные файлы */
  --bg-image: url('../images/background.jpg');
  --banner-image: url('../images/banner.jpg');
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  height: 100%;
  touch-action: manipulation;
}

body {
  min-height: 100%;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  position: relative;
}

/* ===== Фон: поле с деревом ===== */
.page-bg {
  position: fixed;
  inset: -8px;
  z-index: 0;
  background-color: #cfe6d2;
  background-image: var(--bg-image);
  background-size: cover;
  background-position: center 40%;
  background-repeat: no-repeat;
  filter: blur(4px);
  transform: scale(1.03);
}

.page-overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.15) 0%, rgba(216, 243, 220, 0.45) 100%),
    rgba(27, 67, 50, 0.12);
  pointer-events: none;
}

/* ===== Карточка ===== */
.card {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 420px;
  background: var(--white-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.card__header {
  position: relative;
  margin-bottom: 56px;
}

.card__banner {
  height: 132px;
  position: relative;
  background-color: #7cb587;
  background-image: var(--banner-image);
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

.card__banner-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(27, 67, 50, 0.22) 100%),
    linear-gradient(180deg, transparent 55%, rgba(255, 255, 255, 0.25) 100%);
}

.card__body {
  padding: 0 28px 24px;
}

.card__avatar-wrap {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translate(-50%, 50%);
  z-index: 2;
}

.card__avatar {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  border: 5px solid var(--white);
  background: var(--green-soft);
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(27, 67, 50, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.card__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card__avatar-fallback {
  display: none;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-weight: 600;
  color: var(--green);
}

.card__intro {
  text-align: center;
  margin-bottom: 20px;
}

.card__name {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
  letter-spacing: -0.02em;
}

.card__location {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.card__location svg {
  flex-shrink: 0;
  color: var(--green-muted);
}

.card__role {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--green-light);
  margin-bottom: 14px;
  min-height: 1.25rem;
  transition: opacity 0.4s ease;
}

.card__role.fade {
  opacity: 0;
}

.card__bio {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.card__portfolio-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  margin-bottom: 20px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--white);
  background: linear-gradient(135deg, var(--green-light) 0%, var(--green) 100%);
  border-radius: 12px;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(45, 106, 79, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card__portfolio-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(45, 106, 79, 0.3);
}

.card__portfolio-btn svg {
  opacity: 0.9;
}

.card__divider {
  border: none;
  border-top: 1px solid var(--border);
  margin-bottom: 20px;
}

.card__section {
  margin-bottom: 20px;
}

.card__section-title {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--green);
  background: var(--green-soft);
  border: 1px solid rgba(45, 106, 79, 0.12);
  padding: 6px 12px;
  border-radius: 100px;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.tag:hover {
  background: #b7e4c7;
  border-color: rgba(45, 106, 79, 0.25);
}

.contacts {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.contact-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 16px;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  text-decoration: none;
}

.contact-btn:hover {
  background: var(--green-soft);
  border-color: rgba(45, 106, 79, 0.3);
  color: var(--green);
}

.contact-btn svg {
  flex-shrink: 0;
  color: var(--green-light);
}

.contact-btn--telegram {
  color: var(--green);
  background: rgba(216, 243, 220, 0.55);
  font-weight: 600;
}

.contact-btn--telegram:hover {
  background: var(--green-soft);
}

.contact-btn--telegram svg {
  color: #2aabee;
}

.contact-btn--email {
  color: var(--green);
  background: rgba(216, 243, 220, 0.5);
}

.contact-btn--email:hover {
  background: var(--green-soft);
}

.contact-btn--copy {
  padding: 12px 14px;
}

.card__footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px;
  background: rgba(216, 243, 220, 0.35);
  border-top: 1px solid var(--border);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.card__footer-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green-muted);
  box-shadow: 0 0 0 3px rgba(116, 198, 157, 0.3);
}

/* ===== Toast ===== */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--green);
  transform: translateY(80px);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  pointer-events: none;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast svg {
  color: var(--green-light);
}

@media (max-width: 480px) {
  body {
    padding: 16px 12px;
    align-items: flex-start;
    padding-top: 32px;
  }

  .card__banner {
    height: 116px;
  }

  .card__header {
    margin-bottom: 48px;
  }

  .card__avatar {
    width: 96px;
    height: 96px;
    border-width: 4px;
  }

  .card__body {
    padding: 0 20px 20px;
  }

  .toast {
    left: 16px;
    right: 16px;
    bottom: 16px;
    justify-content: center;
  }
}
