:root {
  color-scheme: light dark;
  --color-background: #faf9f6;
  --color-text: #262521;
  --color-secondary: #625f59;
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-background: #1c1b19;
    --color-text: #f0eee9;
    --color-secondary: #bcb8b0;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--color-background);
  color: var(--color-text);
}

.profile {
  width: 100%;
  max-width: 768px;
  margin-inline: auto;
  padding: 48px 24px 72px;
  text-align: center;
}

.profile__portrait {
  display: block;
  width: 160px;
  height: auto;
  margin: 0 auto 20px;
}

h1 {
  margin: 0;
  font-size: 2.25rem;
}

h1 span {
  display: block;
}

.profile__specialty {
  margin: 8px 0 0;
  color: var(--color-secondary);
  font-size: 1.3125rem;
  line-height: 1.35;
}

.profile__description {
  max-width: 360px;
  margin: 24px auto 0;
  color: var(--color-secondary);
}

.profile__contacts {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: 20px;
  font-size: 1.25rem;
}

.profile__contacts a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.profile__contacts a,
.project h2 a {
  color: var(--color-secondary);
  text-decoration: none;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}

.profile__contacts a:hover,
.project h2 a:hover {
  color: var(--color-text);
  text-decoration-line: underline;
}

.profile__contacts a:focus-visible,
.project h2 a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 5px;
  border-radius: 0;
}

.project {
  margin-top: 48px;
  text-align: left;
}

.project__image {
  display: block;
  width: 100%;
  height: auto;
}

.project h2 {
  margin: 16px 0 0;
  color: var(--color-secondary);
  font-size: 1.375rem;
  line-height: 1.35;
}

@media (max-width: 767px) {
  .profile {
    padding-bottom: 36px;
  }
}

@media (min-width: 768px) {
  .profile {
    padding: 72px 24px 96px;
  }

  .profile__portrait {
    width: 240px;
  }

  h1 {
    font-size: 3.5rem;
  }

  h1 span {
    display: inline;
  }

  .profile__specialty {
    font-size: 1.75rem;
  }

  .profile__description {
    max-width: 720px;
    font-size: 1.375rem;
  }

  .profile__contacts {
    margin-top: 28px;
    font-size: 1.375rem;
  }

  .project {
    margin-top: 72px;
  }

  .project h2 {
    font-size: 1.625rem;
  }
}
