@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url("assets/fonts/manrope-cyrillic-ext.woff2") format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}

@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url("assets/fonts/manrope-cyrillic.woff2") format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url("assets/fonts/manrope-latin-ext.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url("assets/fonts/manrope-latin.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --paper: #fff;
  --ink: #3a3a3a;
  --muted: #929292;
  --accent: #de5012;
  --edge: 16px;
  --title-size: 16px;
  --title-leading: 24px;
  --body-size: 16px;
  --body-leading: 24px;
  --caption-size: 14px;
  --caption-leading: 20px;
  --section-gap: 48px;
  --section-inner-gap: 24px;
  --card-gap: 32px;
  --logo-size: 52px;
  --control-size: 52px;
  --contact-height: 54px;
  --mobile-controls-bottom: calc(16px + env(safe-area-inset-bottom));
}

* { box-sizing: border-box; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 500 var(--body-size)/var(--body-leading) Manrope, sans-serif;
  letter-spacing: -0.03em;
  overflow-wrap: break-word;
}

h1, h2, h3, p, ul { margin: 0; }
h2, h3 { font-weight: inherit; }
h2, h3 {
  font-size: var(--title-size);
  line-height: var(--title-leading);
}

h2 { color: var(--muted); }

img {
  display: block;
  max-width: 100%;
}

a { color: inherit; }

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

.site-header,
.content {
  width: min(100% - 2 * var(--edge), 600px);
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  column-gap: 16px;
  min-height: 80px;
  padding-top: 32px;
}

.profile h1 {
  font-size: 24.328px;
  font-weight: 700;
  line-height: 23.169px;
  letter-spacing: -0.06em;
}

.profile h1 span { display: block; }

.languages,
.contacts {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  line-height: 24px;
}

.languages a {
  color: var(--muted);
  text-decoration: none;
}

.languages [aria-current] { color: var(--ink); }
.languages a:hover { text-decoration: underline; }

.content {
  display: grid;
  gap: var(--section-gap);
  padding-block: 48px 24px;
}

.content > section {
  display: grid;
  gap: var(--section-inner-gap);
}

.content > .about { gap: 16px; }

.about__copy {
  display: grid;
  gap: 16px;
}

.projects__grid,
.experience__list {
  display: grid;
  gap: var(--card-gap);
}

.project {
  min-width: 0;
}

.project__image {
  position: relative;
  aspect-ratio: 399.5 / 285;
  overflow: hidden;
  border-radius: 12px;
}

.project__image--kuchenland,
.project__image--crop { aspect-ratio: 343 / 245; }

.project__image--kuchenland { border-radius: 8px; }

.project__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project__image--crop img {
  position: absolute;
  top: -0.87%;
  left: -1.04%;
  width: 102.95%;
  height: 102.15%;
  max-width: none;
  object-fit: fill;
}

.project__image--fit img { object-fit: contain; }

.project__image::after {
  position: absolute;
  inset: 0;
  border: 1px solid #ececec;
  border-radius: inherit;
  content: "";
  pointer-events: none;
}

.project__info {
  display: grid;
  gap: 4px;
  margin-top: 16px;
}

.project__info p {
  color: var(--muted);
  font-size: var(--caption-size);
  line-height: var(--caption-leading);
  letter-spacing: -0.03em;
}

.project__info .project__status { color: var(--accent); }

.project--globus h3 { letter-spacing: -0.03em; }

.project--globus h3,
.job h3 {
  font-size: 18px;
  line-height: 28px;
}

.job__header,
.skill {
  display: flex;
  align-items: center;
  gap: 16px;
}

.job__logo {
  display: grid;
  flex: 0 0 var(--logo-size);
  width: var(--logo-size);
  height: var(--logo-size);
  place-items: center;
  border-radius: 50%;
  overflow: hidden;
}

.job__logo--medcomplex {
  background: linear-gradient(114.922deg, #0c9449 0%, #79db7d 101.79%);
}

.job__details {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.job__metadata {
  display: flex;
  flex-direction: column;
  gap: 2px;
  color: var(--muted);
  font-size: 16px;
  line-height: 20px;
}

.job__results {
  display: grid;
  gap: 12px;
  margin-top: 24px;
  padding-inline-start: 24px;
}

.job--globus .job__results {
  padding-inline-start: 27px;
  font-size: 18px;
  line-height: 28px;
}

.preserve-space { white-space: pre-wrap; }

.skills__list {
  display: grid;
  gap: 32px;
  padding: 0;
  list-style: none;
}

.skill__icon {
  display: grid;
  flex: 0 0 56px;
  height: 56px;
  place-items: center;
  border: 1px solid #dcdcdc;
  border-radius: 50%;
  background: #fff;
}

.skill__icon--vscode img { transform: translateX(-0.5px); }

.skill p {
  color: var(--muted);
  font-size: var(--caption-size);
  line-height: var(--caption-leading);
  letter-spacing: -0.03em;
}

.back-to-top {
  position: fixed;
  right: var(--edge);
  bottom: calc(var(--mobile-controls-bottom) + var(--contact-height) - var(--control-size));
  z-index: 1;
  width: var(--control-size);
  height: var(--control-size);
  border-radius: 50%;
}

.back-to-top img {
  width: auto;
  height: auto;
}

.desktop-only {
  display: none;
}

@media (max-width: 1099px) {
  .contacts {
    position: fixed;
    inset-inline: 0;
    bottom: var(--mobile-controls-bottom);
    z-index: 1;
    width: max-content;
    margin-inline: auto;
    gap: 0;
    color: var(--accent);
    font-size: 16px;
  }

  .contacts__link {
    display: grid;
    min-inline-size: 55px;
    min-block-size: var(--contact-height);
    place-items: center;
    padding: 14px 16px;
    border: 1px solid #dcdcdc;
    border-radius: 100px;
    background: #fff;
    text-decoration: none;
    white-space: nowrap;
  }

  .contacts__link:first-child { min-inline-size: 100px; }

  .content {
    padding-bottom: calc(24px + var(--contact-height) + var(--mobile-controls-bottom));
  }
}

@media (max-width: 359px) {
  .project-break { display: none; }
}

@media (min-width: 1100px) {
  :root {
    --paper: #f7f6f5;
    --edge: clamp(32px, 3.125vw, 60px);
    --title-size: 20px;
    --title-leading: 30px;
    --body-size: 20px;
    --body-leading: 30px;
    --caption-size: 16px;
    --caption-leading: 24px;
    --section-gap: 82px;
    --section-inner-gap: 32px;
    --card-gap: 48px;
    --logo-size: 56px;
    --control-size: 56px;
  }

  .mobile-only { display: none; }
  .desktop-only { display: revert; }

  .site-header {
    position: absolute;
    inset: 60px var(--edge) auto;
    width: auto;
    align-items: flex-start;
    min-height: 0;
    padding: 0;
  }

  .profile {
    display: grid;
    gap: 28px;
    width: 249px;
  }

  .profile__role {
    color: var(--muted);
    font-size: 18px;
    line-height: 24px;
  }

  .profile h1 {
    font-size: 42px;
    line-height: 40px;
  }

  .profile .contacts {
    display: flex;
    color: var(--accent);
  }

  .profile .contacts__link {
    text-decoration: underline;
    text-underline-offset: 4px;
  }

  .content {
    width: min(824px, calc(100% - 2 * (var(--edge) + 249px + 24px)));
    padding-block: 60px 82px;
  }

  .content h2 { line-height: 24px; }
  .content > .about { gap: 32px; }
  .about__copy.desktop-only { display: grid; gap: 24px; }

  .projects__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 25px;
  }

  .project-break { display: none; }
  .project__image--kuchenland,
  .project__image--crop { aspect-ratio: 399.5 / 285; }
  .project__image--kuchenland { border-radius: 12px; }
  .project__image::after { content: none; }
  .project__info { gap: 8px; margin-top: 20px; }
  .project__info p { font-size: 18px; line-height: 26px; }

  .project--globus h3,
  .job h3 {
    font-size: var(--title-size);
    line-height: var(--title-leading);
  }

  .job__details { gap: 0; }

  .job__metadata {
    flex-flow: row wrap;
    align-items: center;
    gap: 0 8px;
  }

  .job__results,
  .job--globus .job__results {
    padding-inline-start: 30px;
    font-size: inherit;
    line-height: inherit;
  }

  .job--medcomplex .job__results { gap: 16px; }
  .skills__list { gap: 16px; }
  .skill__icon { border: 0; }
  .skill p { font-size: 18px; line-height: 24px; }

  .back-to-top {
    top: min(816px, calc(100% - 56px - 28px));
    bottom: auto;
  }
}

@media (min-width: 1500px) {
  .project-break { display: revert; }
}
