* {
  box-sizing: border-box;
}

:root {
  color-scheme: light;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
}

body {
  margin: 0;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 40px 24px;
  background: var(--background);
  color: var(--text);
}

a {
  font: inherit;
}

.card {
  width: min(100%, 880px);
  display: grid;
  grid-template-columns: 1fr 1.08fr;
  overflow: hidden;
  background: var(--surface);
  border-radius: var(--border-radius);
  border-top: 2px solid var(--accent);
  box-shadow: 0 16px 56px #24211f0a;
}

.portrait-wrap {
  position: relative;
  min-height: 500px;
  background: var(--background);
}

.portrait {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}

.content {
  min-width: 0;
  padding: 40px 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

h1 {
  margin: 0 0 10px;
  color: var(--primary);
  font-size: 36px;
  font-weight: 500;
  line-height: 1.18;
  letter-spacing: -0.025em;
  text-wrap: balance;
  overflow-wrap: anywhere;
}

.company {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.email-contact {
  min-width: 0;
  margin: 28px 0 24px;
}

.email-label {
  display: block;
  margin-bottom: 2px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
}

.email-link {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 44px;
  padding: 6px 0;
  color: var(--primary);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.6;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  overflow-wrap: anywhere;
}

.bio {
  margin: 0 0 24px;
  font-size: 15px;
  line-height: 1.6;
}

.bio h2, .bio h3, .bio h4 {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 600;
}

.bio p {
  margin: 0 0 12px;
}

.bio:empty {
  display: none;
}

.actions {
  display: grid;
  gap: 12px;
}

.action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 52px;
  padding: 13px 18px;
  border: 1px solid var(--primary);
  border-radius: 6px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
  transition: background-color 150ms ease, box-shadow 150ms ease;
}

.action span {
  flex: none;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 21px;
  font-weight: 400;
  line-height: 1;
}

.action-icon {
  flex: none;
  display: block;
}

.primary {
  background: var(--primary);
  color: var(--button-text);
}

.secondary {
  background: var(--surface);
  color: var(--primary);
}

a:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 4px;
}

@media (hover: hover) {
  .action:hover {
    box-shadow: 0 3px 12px #24211f18;
    text-decoration: underline;
    text-underline-offset: 3px;
  }

  .email-link:hover {
    text-decoration-thickness: 2px;
  }
}

@media (max-width: 600px) {
  body {
    padding: 12px 14px;
  }

  .card {
    display: block;
    max-width: 410px;
  }

  .portrait-wrap {
    min-height: 0;
    height: clamp(260px, 77vw, 310px);
  }

  .portrait {
    object-position: center 10%;
  }

  .content {
    padding: 20px 24px;
  }

  h1 {
    font-size: 30px;
  }

  .email-contact {
    margin: 16px 0;
  }
}

@media (max-width: 340px) {
  .content {
    padding: 24px 20px;
  }

  h1 {
    font-size: 28px;
  }
}

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