:root {
  --heading: #860000;
  --text: #596d82;
  --nav: #26384d;
  --link: #168bd4;
  --line: #7d8c9a;
  --light-line: #dddddd;
  --panel: #f7f7f7;
  --shadow: rgba(0, 0, 0, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #fff;
  color: var(--text);
  font-family: "Lato", "Helvetica Neue", Arial, sans-serif;
  font-size: 16.2px;
  font-weight: 400;
  line-height: 1.55;
}

a {
  color: var(--link);
  text-decoration: none;
}

a:hover,
a:focus {
  text-decoration: underline;
}

.page {
  width: min(1180px, calc(100% - 56px));
  margin: 44px auto 56px;
  display: grid;
  grid-template-columns: 315px minmax(0, 1fr);
  gap: 42px;
}

.profile {
  color: #777;
}

.portrait {
  width: 100%;
  max-width: 315px;
  height: 280px;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.position {
  margin: 32px 0 24px 2px;
  font-size: 17.1px;
  font-weight: 700;
  line-height: 1.35;
}

.contact-list {
  border-top: 2px solid var(--light-line);
}

.contact-list a {
  min-height: 48px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  border-bottom: 2px solid var(--light-line);
  color: var(--link);
  font-size: 16.2px;
}

.contact-list a:first-child {
  color: #4f6173;
  font-weight: 700;
}

.icon {
  width: 24px;
  height: 24px;
  margin-left: 8px;
  border-radius: 4px;
  background: #566b80;
  color: white;
  display: inline-grid;
  place-items: center;
  font-size: 9.9px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.contact-list a:first-child .icon {
  background: transparent;
  color: #566b80;
  font-size: 21.6px;
}

.link-icon {
  width: 24px;
  height: 24px;
  margin-left: 8px;
  object-fit: contain;
  display: block;
}

h1 {
  margin: -8px 0 42px;
  color: var(--heading);
  font-size: 39.6px;
  font-weight: 900;
  line-height: 1.1;
}

.main-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 24px;
  padding: 0 0 12px;
  border-bottom: 4px solid var(--line);
}

.main-nav a {
  color: var(--nav);
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.01em;
}

p {
  margin: 0 0 22px;
}

.intro p:last-child,
.section p:last-child {
  margin-bottom: 0;
}

.section {
  padding-top: 36px;
}

h2 {
  margin: 0 0 28px;
  color: var(--heading);
  font-size: 27px;
  font-weight: 900;
  line-height: 1.1;
  display: flex;
  align-items: center;
  gap: 20px;
}

h2::after {
  content: "";
  height: 3px;
  background: var(--line);
  flex: 1;
  margin-top: 8px;
}

strong {
  color: #4f6173;
  font-weight: 900;
}

.accordion {
  margin: 18px 0 14px;
}

details {
  margin-bottom: 6px;
  border: 1px solid #ddd;
  border-radius: 5px;
  background: var(--panel);
  overflow: hidden;
}

summary {
  min-height: 38px;
  padding: 7px 42px 7px 16px;
  color: var(--link);
  cursor: pointer;
  font-size: 16.2px;
  line-height: 1.25;
  list-style: none;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  content: "";
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-35%);
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 7px solid var(--link);
}

details[open] summary::after {
  transform: translateY(-65%) rotate(180deg);
}

.date {
  color: #596d82;
  font-size: 0.86em;
  font-weight: 700;
  white-space: nowrap;
}

details > p,
details > ul {
  margin: 0;
  padding: 14px 18px 18px;
  background: #fff;
  border-top: 1px solid #ddd;
}

ul {
  margin: 0 0 24px 28px;
  padding: 0;
}

li {
  margin: 0 0 8px;
}

.publication-list {
  list-style-type: circle;
  padding: 16px 36px 22px 58px;
  color: #425b77;
  font-size: 16.2px;
  line-height: 1.5;
}

.publication-list li {
  margin-bottom: 14px;
  padding-left: 6px;
}

.publication-list li:last-child {
  margin-bottom: 0;
}

.publication-list em {
  font-style: italic;
}

.back-top {
  position: fixed;
  right: 24px;
  bottom: 22px;
  width: 54px;
  height: 50px;
  border-radius: 4px;
  background: var(--link);
  box-shadow: 0 2px 6px var(--shadow);
}

.back-top::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 47%;
  width: 14px;
  height: 14px;
  border-left: 6px solid white;
  border-top: 6px solid white;
  transform: translate(-50%, -35%) rotate(45deg);
  border-radius: 2px;
}

@media (max-width: 1000px) {
  body {
    font-size: 18px;
  }

  .page {
    width: min(100% - 36px, 760px);
    margin-top: 28px;
    display: block;
  }

  .profile {
    margin-bottom: 36px;
  }

  .portrait {
    max-width: 360px;
    height: 320px;
  }

  .position {
    margin-top: 26px;
    font-size: 19.8px;
  }

  .contact-list a {
    min-height: 54px;
    grid-template-columns: 58px minmax(0, 1fr);
    font-size: 18px;
  }

  h1 {
    margin-top: 0;
    margin-bottom: 28px;
    font-size: 37.8px;
  }

  .main-nav {
    gap: 14px 22px;
    border-bottom-width: 4px;
  }

  .main-nav a {
    font-size: 19.8px;
  }

  h2 {
    margin-bottom: 30px;
    font-size: 30.6px;
  }

  summary {
    min-height: 42px;
    font-size: 16.8px;
  }

  .date {
    white-space: normal;
    text-align: right;
  }

  .publication-list {
    padding: 16px 24px 22px 48px;
    font-size: 16.2px;
  }

  .back-top {
    width: 56px;
    height: 52px;
    right: 18px;
    bottom: 18px;
  }
}
