:root {
  color-scheme: light;
  --bg: #fff;
  --ink: #1d1d1f;
  --secondary: #6e6e73;
  --link: #06c;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

body {
  max-width: 1080px;
  margin: 0 auto;
  padding: 3rem 2rem 6rem;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.58;
  letter-spacing: -0.006em;
}

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

a:hover {
  text-decoration: underline;
}

a:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 3px;
  border-radius: 2px;
}

::selection {
  background: var(--link);
  color: #fff;
}

header.id {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 42.5rem);
  column-gap: 3rem;
  margin-bottom: 8rem;
}

.masthead-top {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  color: var(--secondary);
  font-size: 13px;
  line-height: 1.4;
}

.masthead-top .quiet {
  color: inherit;
}

h1 {
  grid-column: 2;
  margin: 9rem 0 2.25rem;
  font-size: clamp(44px, 6vw, 64px);
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.045em;
}

.masthead-grid {
  grid-column: 2;
  max-width: 38rem;
}

.title {
  margin: 0;
  font-size: 20px;
  line-height: 1.4;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.contacts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.25rem;
  margin: 1.75rem 0 0;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.contacts br {
  display: none;
}

.about {
  max-width: 35rem;
  margin: 1.25rem 0 0;
  color: var(--secondary);
  font-size: 18px;
  line-height: 1.55;
}

section {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 42.5rem);
  column-gap: 3rem;
  margin-bottom: 6rem;
}

h2 {
  grid-column: 1;
  margin: 0;
  color: var(--secondary);
  font-size: 13px;
  line-height: 1.45;
  font-weight: 500;
  letter-spacing: 0;
}

section > :not(h2) {
  grid-column: 2;
}

.e {
  margin-bottom: 3rem;
}

.e .v {
  margin-bottom: 0.35rem;
  color: var(--secondary);
  font-size: 14px;
}

.e h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.45;
  font-weight: 600;
  letter-spacing: -0.012em;
}

.e .at {
  color: var(--secondary);
  font-weight: 400;
}

.e > div:last-child,
.g > div {
  min-width: 0;
  overflow-wrap: anywhere;
}

.b {
  margin: 0.75rem 0 0;
  padding-left: 1.15rem;
}

.b li {
  margin-bottom: 0.45rem;
  padding-left: 0.15rem;
}

.g {
  display: block;
}

.g .k {
  display: block;
  margin-top: 0.9rem;
  color: var(--secondary);
  font-size: 15px;
}

.plain {
  margin: 0;
  padding-left: 1.15rem;
}

.plain li {
  margin-bottom: 0.35rem;
  padding-left: 0.15rem;
}

.note {
  margin: 1.5rem 0 0;
  color: var(--secondary);
}

.compact {
  margin: 0;
}

.education-detail {
  margin: 0.75rem 0 0;
}

footer {
  max-width: 42.5rem;
  margin-left: 10.5rem;
  color: var(--secondary);
  font-size: 13px;
}

@media (max-width: 720px) {
  body {
    padding: 3rem 1.25rem 4rem;
    font-size: 16px;
  }

  header.id,
  section {
    display: block;
  }

  header.id {
    margin-bottom: 6rem;
  }

  h1 {
    margin: 6rem 0 2rem;
    font-size: 44px;
  }

  .masthead-top {
    display: block;
  }

  .masthead-top span {
    display: block;
  }

  .masthead-top span + span {
    margin-top: 0.25rem;
  }

  .title {
    font-size: 19px;
  }

  .about {
    margin-top: 1.25rem;
    font-size: 17px;
  }

  .contacts {
    display: block;
    margin-top: 1.5rem;
  }

  .contacts a {
    display: block;
  }

  h2 {
    margin-bottom: 2rem;
  }

  section {
    margin-bottom: 5rem;
  }

  footer {
    margin-left: 0;
  }
}

@media print {
  :root {
    --bg: #fff;
    --ink: #000;
    --secondary: #444;
    --link: #000;
  }

  body {
    max-width: none;
    padding: 0;
    font-size: 10.5px;
    line-height: 1.45;
  }

  header.id,
  section {
    display: block;
    margin-bottom: 1.5rem;
  }

  h1 {
    margin: 1rem 0 0.75rem;
    font-size: 24px;
    letter-spacing: -0.03em;
  }

  .masthead-top,
  .contacts {
    font-size: 9px;
  }

  .masthead-grid {
    max-width: none;
  }

  .title,
  .about {
    font-size: inherit;
  }

  h2 {
    margin-bottom: 0.8rem;
    font-size: 14px;
  }

  .e {
    break-inside: avoid;
    margin-bottom: 0.9rem;
  }

  .b li {
    margin-bottom: 0.1rem;
  }

  a {
    color: #000;
    text-decoration: none;
  }

  footer {
    margin-left: 0;
  }
}
